feat(Features): Added super sprint looped feature
This commit is contained in:
parent
ebb14e073d
commit
94692bf6ec
@ -14,8 +14,9 @@ namespace big
|
|||||||
|
|
||||||
god_mode();
|
god_mode();
|
||||||
never_wanted();
|
never_wanted();
|
||||||
off_radar();
|
|
||||||
no_ragdoll();
|
no_ragdoll();
|
||||||
|
off_radar();
|
||||||
|
super_sprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
void features::script_func()
|
void features::script_func()
|
||||||
|
@ -25,8 +25,9 @@ namespace big
|
|||||||
|
|
||||||
void god_mode();
|
void god_mode();
|
||||||
void never_wanted();
|
void never_wanted();
|
||||||
void off_radar();
|
|
||||||
void no_ragdoll();
|
void no_ragdoll();
|
||||||
|
void off_radar();
|
||||||
|
void super_sprint();
|
||||||
|
|
||||||
void update_screen_sizes();
|
void update_screen_sizes();
|
||||||
void update_player_structs();
|
void update_player_structs();
|
||||||
|
37
BigBaseV2/src/features/super_sprint.cpp
Normal file
37
BigBaseV2/src/features/super_sprint.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "features.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static bool bLastSuperSprint = false;
|
||||||
|
|
||||||
|
void features::super_sprint()
|
||||||
|
{
|
||||||
|
bool bSuperSprint = g_settings.options["super_sprint"].get<bool>();
|
||||||
|
|
||||||
|
if (bSuperSprint)
|
||||||
|
{
|
||||||
|
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||||
|
{
|
||||||
|
if (PAD::IS_CONTROL_PRESSED(0, 32))
|
||||||
|
{
|
||||||
|
Ped player = PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_playerId);
|
||||||
|
|
||||||
|
Vector3 offset = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, 0, 0.6, 0);
|
||||||
|
ENTITY::APPLY_FORCE_TO_ENTITY(player, 1, 0.0f, 1.3, 0, 0.0f, 0.0f, 0.0f, 0, 1, 1, 1, 0, 1);
|
||||||
|
|
||||||
|
PLAYER::SET_PLAYER_SPRINT(g_playerId, 1);
|
||||||
|
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.49);
|
||||||
|
}
|
||||||
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
}
|
||||||
|
else if (!bSuperSprint && bSuperSprint != bLastSuperSprint)
|
||||||
|
{
|
||||||
|
QUEUE_JOB_BEGIN_CLAUSE(= )
|
||||||
|
{
|
||||||
|
PLAYER::SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(g_playerId, 1.0);
|
||||||
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
}
|
||||||
|
|
||||||
|
bLastSuperSprint = bSuperSprint;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user