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.
Files
YimMenu/src/backend/looped/vehicle/seatbelt.cpp

22 lines
460 B
C++
Raw Normal View History

2022-05-16 15:33:43 -04:00
#include "backend/looped/looped.hpp"
#include "natives.hpp"
namespace big
{
static bool b_last_seatbelt = false;
void looped::vehicle_seatbelt()
{
bool b_seatbelt = g->vehicle.seatbelt;
if (b_seatbelt || (!b_seatbelt && b_seatbelt != b_last_seatbelt))
{
PED::SET_PED_CONFIG_FLAG(self::ped, 32, g->vehicle.seatbelt);
PED::SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(self::ped, g->vehicle.seatbelt);
b_last_seatbelt = g->vehicle.seatbelt;
}
}
}