25 lines
621 B
C++
Raw Normal View History

2022-05-16 15:33:43 -04:00
#include "natives.hpp"
#include "backend/looped_command.hpp"
2022-05-16 15:33:43 -04:00
namespace big
{
class seatbelt : looped_command
2022-05-16 15:33:43 -04:00
{
using looped_command::looped_command;
2022-05-16 15:33:43 -04:00
virtual void on_tick() override
2022-05-16 15:33:43 -04: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
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
}
};
seatbelt g_seatbelt("seatbelt", "Seatbelt", "Prevent you from falling off bikes or flying through the windshield", g.vehicle.no_water_collision);
2022-05-16 15:33:43 -04:00
}