2023-02-04 23:49:44 +01:00
|
|
|
#include "backend/looped_command.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "natives.hpp"
|
2023-02-04 23:49:44 +01:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
class keep_on_ground : looped_command
|
|
|
|
{
|
|
|
|
using looped_command::looped_command;
|
|
|
|
|
|
|
|
virtual void on_tick() override
|
|
|
|
{
|
2023-02-13 20:38:30 +00:00
|
|
|
auto model = ENTITY::GET_ENTITY_MODEL(self::veh);
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
if (ENTITY::IS_ENTITY_IN_AIR(self::veh) && (VEHICLE::IS_THIS_MODEL_A_CAR(model) || VEHICLE::IS_THIS_MODEL_A_BIKE(model)))
|
2023-02-13 20:38:30 +00:00
|
|
|
VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(self::veh, 5.0);
|
2023-02-04 23:49:44 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
keep_on_ground g_keep_on_ground("keeponground", "Keep On Ground", "Makes it so your vehicle is always on the ground on all four wheels",
|
|
|
|
g.vehicle.keep_on_ground);
|
2023-02-04 23:49:44 +01:00
|
|
|
}
|