TmpMenu/src/backend/looped/vehicle/keep_on_ground.cpp
maybegreat48 97a8c5d60b Add more spoofing options and added clang-format (#1020)
* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
2023-03-01 21:27:15 +00:00

21 lines
619 B
C++

#include "backend/looped_command.hpp"
#include "natives.hpp"
namespace big
{
class keep_on_ground : looped_command
{
using looped_command::looped_command;
virtual void on_tick() override
{
auto model = ENTITY::GET_ENTITY_MODEL(self::veh);
if (ENTITY::IS_ENTITY_IN_AIR(self::veh) && (VEHICLE::IS_THIS_MODEL_A_CAR(model) || VEHICLE::IS_THIS_MODEL_A_BIKE(model)))
VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(self::veh, 5.0);
}
};
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);
}