mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
feat(HornBoost): Don't boost unless driver
This commit is contained in:
parent
ceb7a03f06
commit
bf8816a116
@ -1,7 +1,7 @@
|
||||
#include "backend/looped/looped.hpp"
|
||||
#include "gta/enums.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "util/math.hpp"
|
||||
#include "util/entity.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
@ -11,12 +11,13 @@ namespace big
|
||||
|
||||
if (PAD::IS_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_VEH_HORN))
|
||||
{
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
|
||||
Ped ped = PLAYER::PLAYER_PED_ID();
|
||||
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(ped, false);
|
||||
|
||||
if (veh == 0) return;
|
||||
if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(veh, -1, 0) != ped) return;
|
||||
|
||||
Vector3 velocity = ENTITY::GET_ENTITY_VELOCITY(veh) * 1.05f;
|
||||
|
||||
ENTITY::SET_ENTITY_VELOCITY(veh, velocity.x, velocity.y, velocity.z - 0.5f);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user