Add vehicle jump (#290)
This commit is contained in:
parent
2c02b976bc
commit
1384bd600d
@ -66,6 +66,7 @@ namespace big
|
|||||||
looped::vehicle_drive_on_water();
|
looped::vehicle_drive_on_water();
|
||||||
looped::vehicle_god_mode();
|
looped::vehicle_god_mode();
|
||||||
looped::vehicle_horn_boost();
|
looped::vehicle_horn_boost();
|
||||||
|
looped::vehicle_jump();
|
||||||
looped::vehicle_instant_brake();
|
looped::vehicle_instant_brake();
|
||||||
looped::vehicle_is_targetable();
|
looped::vehicle_is_targetable();
|
||||||
looped::vehicle_rainbow_paint();
|
looped::vehicle_rainbow_paint();
|
||||||
|
@ -45,6 +45,7 @@ namespace big
|
|||||||
static void vehicle_fly();
|
static void vehicle_fly();
|
||||||
static void vehicle_god_mode();
|
static void vehicle_god_mode();
|
||||||
static void vehicle_horn_boost();
|
static void vehicle_horn_boost();
|
||||||
|
static void vehicle_jump();
|
||||||
static void vehicle_instant_brake();
|
static void vehicle_instant_brake();
|
||||||
static void vehicle_is_targetable();
|
static void vehicle_is_targetable();
|
||||||
static void vehicle_ls_customs();
|
static void vehicle_ls_customs();
|
||||||
|
23
BigBaseV2/src/backend/looped/vehicle/vehicle_jump.cpp
Normal file
23
BigBaseV2/src/backend/looped/vehicle/vehicle_jump.cpp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#include "backend/looped/looped.hpp"
|
||||||
|
#include "gta/enums.hpp"
|
||||||
|
#include "natives.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
void looped::vehicle_jump()
|
||||||
|
{
|
||||||
|
if (!g->vehicle.vehicle_jump) return;
|
||||||
|
|
||||||
|
const auto vehicle = self::veh;
|
||||||
|
|
||||||
|
if (!vehicle || !ENTITY::IS_ENTITY_A_VEHICLE(vehicle))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PAD::IS_CONTROL_JUST_PRESSED(0, (int)ControllerInputs::INPUT_VEH_HANDBRAKE))
|
||||||
|
{
|
||||||
|
ENTITY::APPLY_FORCE_TO_ENTITY(vehicle, 1, 0.0, 0.0, 20, 0.0, 0.0, 0.0, 0, 0, 1, 1, 0, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -214,6 +214,7 @@ namespace big
|
|||||||
bool drive_on_water = false;
|
bool drive_on_water = false;
|
||||||
bool god_mode = false;
|
bool god_mode = false;
|
||||||
bool horn_boost = false;
|
bool horn_boost = false;
|
||||||
|
bool vehicle_jump = false;
|
||||||
bool instant_brake = false;
|
bool instant_brake = false;
|
||||||
bool is_targetable = true;
|
bool is_targetable = true;
|
||||||
bool ls_customs = false; // don't save this to disk
|
bool ls_customs = false; // don't save this to disk
|
||||||
@ -490,6 +491,7 @@ namespace big
|
|||||||
this->vehicle.driving_style_id = j["vehicle"]["driving_style"];
|
this->vehicle.driving_style_id = j["vehicle"]["driving_style"];
|
||||||
this->vehicle.god_mode = j["vehicle"]["god_mode"];
|
this->vehicle.god_mode = j["vehicle"]["god_mode"];
|
||||||
this->vehicle.horn_boost = j["vehicle"]["horn_boost"];
|
this->vehicle.horn_boost = j["vehicle"]["horn_boost"];
|
||||||
|
this->vehicle.vehicle_jump = j["vehicle"]["vehicle_jump"];
|
||||||
this->vehicle.instant_brake = j["vehicle"]["instant_brake"];
|
this->vehicle.instant_brake = j["vehicle"]["instant_brake"];
|
||||||
this->vehicle.is_targetable = j["vehicle"]["is_targetable"];
|
this->vehicle.is_targetable = j["vehicle"]["is_targetable"];
|
||||||
this->vehicle.pv_teleport_into = j["vehicle"]["pv_teleport_into"];
|
this->vehicle.pv_teleport_into = j["vehicle"]["pv_teleport_into"];
|
||||||
@ -728,6 +730,7 @@ namespace big
|
|||||||
{ "driving_style", this->vehicle.driving_style_id },
|
{ "driving_style", this->vehicle.driving_style_id },
|
||||||
{ "god_mode", this->vehicle.god_mode },
|
{ "god_mode", this->vehicle.god_mode },
|
||||||
{ "horn_boost", this->vehicle.horn_boost },
|
{ "horn_boost", this->vehicle.horn_boost },
|
||||||
|
{ "vehicle_jump", this->vehicle.vehicle_jump },
|
||||||
{ "instant_brake", this->vehicle.instant_brake },
|
{ "instant_brake", this->vehicle.instant_brake },
|
||||||
{ "is_targetable", this->vehicle.is_targetable },
|
{ "is_targetable", this->vehicle.is_targetable },
|
||||||
{ "pv_teleport_into", this->vehicle.pv_teleport_into },
|
{ "pv_teleport_into", this->vehicle.pv_teleport_into },
|
||||||
|
@ -13,6 +13,7 @@ namespace big
|
|||||||
ImGui::Checkbox("Can Be Targeted", &g->vehicle.is_targetable);
|
ImGui::Checkbox("Can Be Targeted", &g->vehicle.is_targetable);
|
||||||
ImGui::Checkbox("God Mode", &g->vehicle.god_mode);
|
ImGui::Checkbox("God Mode", &g->vehicle.god_mode);
|
||||||
ImGui::Checkbox("Horn Boost", &g->vehicle.horn_boost);
|
ImGui::Checkbox("Horn Boost", &g->vehicle.horn_boost);
|
||||||
|
ImGui::Checkbox("Vehicle Jump", &g->vehicle.vehicle_jump);
|
||||||
ImGui::Checkbox("Instant Brake", &g->vehicle.instant_brake);
|
ImGui::Checkbox("Instant Brake", &g->vehicle.instant_brake);
|
||||||
ImGui::Checkbox("Drive On Water", &g->vehicle.drive_on_water);
|
ImGui::Checkbox("Drive On Water", &g->vehicle.drive_on_water);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user