feat(Features): Added off radar looped feature

This commit is contained in:
Yimura 2020-12-26 19:18:29 +01:00
parent 2d7db48b53
commit 5a1674881e
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78
3 changed files with 24 additions and 0 deletions

View File

@ -7,7 +7,10 @@ namespace big
{
void features::run_tick()
{
g_playerId = PLAYER::PLAYER_ID();
god_mode();
off_radar();
no_ragdoll();
}

View File

@ -24,6 +24,7 @@ namespace big
void script_func();
void god_mode();
void off_radar();
void no_ragdoll();
}
}

View File

@ -0,0 +1,20 @@
#include "features.hpp"
#include "script_global.hpp"
namespace big
{
void features::off_radar()
{
if (g_settings.options["off_radar"].get<bool>())
{
QUEUE_JOB_BEGIN_CLAUSE()
{
if (PLAYER::IS_PLAYER_ONLINE())
{
*script_global(2425869).at(1 + (g_playerId * 443)).at(204).as<int*>() = 1;
*script_global(2440049).at(70).as<int*>() = NETWORK::GET_NETWORK_TIME() + 999;
}
}QUEUE_JOB_END_CLAUSE
}
}
}