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()
|
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
bool b_seatbelt = g.vehicle.seatbelt;
|
2022-05-16 15:33:43 -04:00
|
|
|
|
|
|
|
if (b_seatbelt || (!b_seatbelt && b_seatbelt != b_last_seatbelt))
|
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
PED::SET_PED_CONFIG_FLAG(self::ped, 32, g.vehicle.seatbelt);
|
2022-05-16 15:33:43 -04:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
PED::SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(self::ped, g.vehicle.seatbelt);
|
2022-05-16 15:33:43 -04:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
b_last_seatbelt = g.vehicle.seatbelt;
|
2022-05-16 15:33:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|