2022-12-22 21:23:32 +00:00
|
|
|
#include "backend/looped_command.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "natives.hpp"
|
2022-05-16 15:33:43 -04:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2022-12-22 21:23:32 +00:00
|
|
|
class seatbelt : looped_command
|
2022-05-16 15:33:43 -04:00
|
|
|
{
|
2022-12-22 21:23:32 +00:00
|
|
|
using looped_command::looped_command;
|
2022-05-16 15:33:43 -04:00
|
|
|
|
2022-12-22 21:23:32 +00:00
|
|
|
virtual void on_tick() override
|
2022-05-16 15:33:43 -04:00
|
|
|
{
|
2022-12-22 21:23:32 +00:00
|
|
|
PED::SET_PED_CONFIG_FLAG(self::ped, 32, true);
|
|
|
|
PED::SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(self::ped, true);
|
|
|
|
}
|
2022-05-16 15:33:43 -04:00
|
|
|
|
2022-12-22 21:23:32 +00:00
|
|
|
virtual void on_disable() override
|
|
|
|
{
|
|
|
|
PED::SET_PED_CONFIG_FLAG(self::ped, 32, false);
|
|
|
|
PED::SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(self::ped, false);
|
2022-05-16 15:33:43 -04:00
|
|
|
}
|
2022-12-22 21:23:32 +00:00
|
|
|
};
|
|
|
|
|
2023-07-27 00:26:09 +08:00
|
|
|
seatbelt g_seatbelt("seatbelt", "SEATBELT", "SEATBELT_DESC",
|
2023-03-01 21:27:15 +00:00
|
|
|
g.vehicle.seatbelt);
|
2022-05-16 15:33:43 -04:00
|
|
|
}
|