mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 23:07:26 +08:00
feat(Features): Added never wanted looped feature
This commit is contained in:
parent
02aaa5472c
commit
895e15a9e6
@ -13,6 +13,7 @@ namespace big
|
|||||||
update_screen_sizes();
|
update_screen_sizes();
|
||||||
|
|
||||||
god_mode();
|
god_mode();
|
||||||
|
never_wanted();
|
||||||
off_radar();
|
off_radar();
|
||||||
no_ragdoll();
|
no_ragdoll();
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ namespace big
|
|||||||
void script_func();
|
void script_func();
|
||||||
|
|
||||||
void god_mode();
|
void god_mode();
|
||||||
|
void never_wanted();
|
||||||
void off_radar();
|
void off_radar();
|
||||||
void no_ragdoll();
|
void no_ragdoll();
|
||||||
|
|
||||||
|
26
BigBaseV2/src/features/never_wanted.cpp
Normal file
26
BigBaseV2/src/features/never_wanted.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static bool bLastNeverWanted = false;
|
||||||
|
|
||||||
|
void features::never_wanted()
|
||||||
|
{
|
||||||
|
QUEUE_JOB_BEGIN_CLAUSE()
|
||||||
|
{
|
||||||
|
bool bNeverWanted = g_settings.options["never_wanted"].get<bool>();
|
||||||
|
|
||||||
|
if (bNeverWanted && PLAYER::GET_PLAYER_WANTED_LEVEL(g_playerId) > 0)
|
||||||
|
{
|
||||||
|
PLAYER::SET_PLAYER_WANTED_LEVEL(g_playerId, 0, true);
|
||||||
|
PLAYER::SET_MAX_WANTED_LEVEL(0);
|
||||||
|
}
|
||||||
|
else if (!bNeverWanted && bNeverWanted != bLastNeverWanted)
|
||||||
|
{
|
||||||
|
PLAYER::SET_MAX_WANTED_LEVEL(5);
|
||||||
|
}
|
||||||
|
|
||||||
|
bLastNeverWanted = bNeverWanted;
|
||||||
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user