mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-09 02:43:38 +08:00
Should be working.
This commit is contained in:
parent
bd7e2467e7
commit
f0d1639884
@ -94,6 +94,7 @@ namespace big
|
|||||||
looped::vehicle_instant_brake();
|
looped::vehicle_instant_brake();
|
||||||
looped::vehicle_is_targetable();
|
looped::vehicle_is_targetable();
|
||||||
looped::vehicle_rainbow_paint();
|
looped::vehicle_rainbow_paint();
|
||||||
|
looped::vehicle_seatbelt();
|
||||||
looped::vehicle_speedo_meter();
|
looped::vehicle_speedo_meter();
|
||||||
}QUEUE_JOB_END_CLAUSE
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ namespace big
|
|||||||
static void vehicle_is_targetable();
|
static void vehicle_is_targetable();
|
||||||
static void vehicle_ls_customs();
|
static void vehicle_ls_customs();
|
||||||
static void vehicle_rainbow_paint();
|
static void vehicle_rainbow_paint();
|
||||||
|
static void vehicle_seatbelt();
|
||||||
static void vehicle_speedo_meter();
|
static void vehicle_speedo_meter();
|
||||||
|
|
||||||
static void weapons_ammo_special_type();
|
static void weapons_ammo_special_type();
|
||||||
|
21
BigBaseV2/src/backend/looped/vehicle/seatbelt.cpp
Normal file
21
BigBaseV2/src/backend/looped/vehicle/seatbelt.cpp
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#include "backend/looped/looped.hpp"
|
||||||
|
#include "natives.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
static bool b_last_seatbelt = false;
|
||||||
|
|
||||||
|
void looped::vehicle_seatbelt()
|
||||||
|
{
|
||||||
|
bool b_seatbelt = g->vehicle.seatbelt;
|
||||||
|
|
||||||
|
if (b_seatbelt || (!b_seatbelt && b_seatbelt != b_last_seatbelt))
|
||||||
|
{
|
||||||
|
PED::SET_PED_CONFIG_FLAG(self::ped, 32, g->vehicle.seatbelt);
|
||||||
|
|
||||||
|
PED::SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(self::ped, g->vehicle.seatbelt);
|
||||||
|
|
||||||
|
b_last_seatbelt = g->vehicle.seatbelt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -218,6 +218,7 @@ namespace big
|
|||||||
bool ls_customs = false; // don't save this to disk
|
bool ls_customs = false; // don't save this to disk
|
||||||
bool pv_teleport_into = false;
|
bool pv_teleport_into = false;
|
||||||
int rainbow_paint = 0;
|
int rainbow_paint = 0;
|
||||||
|
bool seatbelt = false;
|
||||||
speedo_meter speedo_meter{};
|
speedo_meter speedo_meter{};
|
||||||
fly fly{};
|
fly fly{};
|
||||||
};
|
};
|
||||||
@ -474,6 +475,7 @@ namespace big
|
|||||||
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"];
|
||||||
this->vehicle.rainbow_paint = j["vehicle"]["rainbow_paint"];
|
this->vehicle.rainbow_paint = j["vehicle"]["rainbow_paint"];
|
||||||
|
this->vehicle.seatbelt = j["vehicle"]["seatbelt"];
|
||||||
|
|
||||||
this->vehicle.speedo_meter.type = (SpeedoMeter)j["vehicle"]["speedo_meter"]["type"];
|
this->vehicle.speedo_meter.type = (SpeedoMeter)j["vehicle"]["speedo_meter"]["type"];
|
||||||
this->vehicle.speedo_meter.left_side = j["vehicle"]["speedo_meter"]["left_side"];
|
this->vehicle.speedo_meter.left_side = j["vehicle"]["speedo_meter"]["left_side"];
|
||||||
@ -704,6 +706,7 @@ namespace big
|
|||||||
{ "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 },
|
||||||
{ "rainbow_paint", this->vehicle.rainbow_paint },
|
{ "rainbow_paint", this->vehicle.rainbow_paint },
|
||||||
|
{ "seatbelt", this->vehicle.seatbelt },
|
||||||
{
|
{
|
||||||
"speedo_meter", {
|
"speedo_meter", {
|
||||||
{ "type", (int)this->vehicle.speedo_meter.type },
|
{ "type", (int)this->vehicle.speedo_meter.type },
|
||||||
|
@ -20,6 +20,8 @@ namespace big
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::BeginGroup();
|
ImGui::BeginGroup();
|
||||||
|
|
||||||
|
ImGui::Checkbox("Seatbelt", &g->vehicle.seatbelt);
|
||||||
|
|
||||||
components::button("Repair", [] {
|
components::button("Repair", [] {
|
||||||
|
|
||||||
vehicle::repair(self::veh);
|
vehicle::repair(self::veh);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user