feat(Features): Added sticky tyres looped feature

This commit is contained in:
Yimura 2020-12-26 22:06:31 +01:00
parent 8784db09e7
commit f05af1937b
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78
5 changed files with 33 additions and 0 deletions

View File

@ -19,6 +19,7 @@ namespace big
no_ragdoll();
off_radar();
spoof_rank();
sticky_tyres();
super_sprint();
}

View File

@ -30,6 +30,7 @@ namespace big
void no_ragdoll();
void off_radar();
void spoof_rank();
void sticky_tyres();
void super_sprint();
void update_screen_sizes();

View File

@ -0,0 +1,28 @@
#include "features.hpp"
namespace big
{
void features::sticky_tyres()
{
if (g_settings.options["sticky_tyres"].get<bool>())
{
QUEUE_JOB_BEGIN_CLAUSE()
{
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
if (veh)
{
while (!NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(veh))
{
NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(veh);
script::get_current()->yield();
}
VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(veh, 5.f);
}
}QUEUE_JOB_END_CLAUSE
}
}
}

View File

@ -9,6 +9,8 @@ namespace big
{
ImGui::Checkbox("No Bike Fall", g_settings.options["no_bike_fall"].get<bool*>());
ImGui::Checkbox("Sticky Tyres", g_settings.options["sticky_tyres"].get<bool*>());
if (ImGui::Button("Repair Vehicle"))
{
QUEUE_JOB_BEGIN_CLAUSE()

View File

@ -21,6 +21,7 @@ namespace big
"ragdoll": false,
"rank": 6969,
"spoof_rank": false,
"sticky_tyres": false,
"super_sprint": false
})"_json;