This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.

23 lines
546 B
C++
Raw Normal View History

2021-05-20 23:18:44 +02:00
#include "backend/looped/looped.hpp"
#include "gta/enums.hpp"
#include "natives.hpp"
#include "util/math.hpp"
namespace big
{
void looped::vehicle_horn_boost()
{
if (!g.vehicle.horn_boost) return;
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_VEH_HORN))
{
Vehicle veh = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
if (veh == 0) return;
2021-07-23 00:48:46 +02:00
Vector3 velocity = ENTITY::GET_ENTITY_VELOCITY(veh) * 1.05f;
2021-05-20 23:18:44 +02:00
2021-07-23 00:48:46 +02:00
ENTITY::SET_ENTITY_VELOCITY(veh, velocity.x, velocity.y, velocity.z - 0.5f);
2021-05-20 23:18:44 +02:00
}
}
}