feat(Features): Added never wanted looped feature
This commit is contained in:
parent
8539614d9b
commit
ebb14e073d
@ -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
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user