mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
commit
ed362d07e6
@ -47,6 +47,11 @@ namespace stats
|
||||
|
||||
return is_item_unlocked_hook3.invoke<int>(a1);
|
||||
}
|
||||
|
||||
int is_item_unlocked()
|
||||
{
|
||||
return 0; // 0 == yes
|
||||
}
|
||||
}
|
||||
|
||||
class component final : public component_interface
|
||||
@ -54,18 +59,28 @@ namespace stats
|
||||
public:
|
||||
void post_unpack() override
|
||||
{
|
||||
if (!game::environment::is_mp())
|
||||
if (game::environment::is_sp())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// unlock all items
|
||||
cg_unlock_all_items = game::Dvar_RegisterBool("cg_unlockall_items", false, game::DVAR_FLAG_SAVED, "Whether items should be locked based on the player's stats or always unlocked.");
|
||||
game::Dvar_RegisterBool("cg_unlockall_classes", false, game::DVAR_FLAG_SAVED, "Whether classes should be locked based on the player's stats or always unlocked.");
|
||||
|
||||
is_item_unlocked_hook.create(0x1403BD790, is_item_unlocked_stub); // LiveStorage_IsItemUnlockedFromTable_LocalClient
|
||||
is_item_unlocked_hook2.create(0x1403BD290, is_item_unlocked_stub2); // LiveStorage_IsItemUnlockedFromTable
|
||||
is_item_unlocked_hook3.create(0x1403BAF60, is_item_unlocked_stub3); // idk (unlocks loot etc)
|
||||
if (game::environment::is_dedi())
|
||||
{
|
||||
// unlock all items
|
||||
utils::hook::jump(0x1403BD790, is_item_unlocked); // LiveStorage_IsItemUnlockedFromTable_LocalClient
|
||||
utils::hook::jump(0x1403BD290, is_item_unlocked); // LiveStorage_IsItemUnlockedFromTable
|
||||
utils::hook::jump(0x1403BAF60, is_item_unlocked); // idk ( unlocks loot etc )
|
||||
}
|
||||
else
|
||||
{
|
||||
// unlock all items
|
||||
cg_unlock_all_items = game::Dvar_RegisterBool("cg_unlockall_items", false, game::DVAR_FLAG_SAVED, "Whether items should be locked based on the player's stats or always unlocked.");
|
||||
game::Dvar_RegisterBool("cg_unlockall_classes", false, game::DVAR_FLAG_SAVED, "Whether classes should be locked based on the player's stats or always unlocked.");
|
||||
|
||||
is_item_unlocked_hook.create(0x1403BD790, is_item_unlocked_stub); // LiveStorage_IsItemUnlockedFromTable_LocalClient
|
||||
is_item_unlocked_hook2.create(0x1403BD290, is_item_unlocked_stub2); // LiveStorage_IsItemUnlockedFromTable
|
||||
is_item_unlocked_hook3.create(0x1403BAF60, is_item_unlocked_stub3); // idk (unlocks loot etc)
|
||||
}
|
||||
|
||||
command::add("setPlayerDataInt", [](const command::params& params)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user