Added proofs to vehicle menu and improved waterproof feature. (#330)

- Added proofs section to vehicle menu that allows player to control damage bits. 
- Player can now drive or walk underwater with waterproof turned on.
- Added bring closest vehicle feature.
- Vehicle will not deform with collision proof on.
- Improved vehicle menu arrangement.
- Added plate changer in LSC.
- Updated LSC layout.
- Expanded wheel type feature.
- Fixed a bug where the mod section shows repetitive wheel mods.

Fixed issue #331
This commit is contained in:
aa15032261 2022-07-12 22:42:07 +08:00 committed by GitHub
parent 2d9021f0b8
commit 15ef1b874d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 1207 additions and 713 deletions

View File

@ -1,21 +1,53 @@
#include "backend/looped/looped.hpp" #include "backend/looped/looped.hpp"
#include "natives.hpp" #include "util/water.hpp"
namespace big namespace big
{ {
static uint32_t lastProofBits = 0; static uint32_t last_bits = 0;
static float last_water_collistion_strength = 0;
void looped::self_godmode() { void looped::self_godmode()
if (g_local_player != nullptr) { {
uint32_t proofBits = g->self.proof_mask; if (g_local_player == nullptr)
uint32_t changedProofBits = proofBits ^ lastProofBits; {
uint32_t changedOrEnabledProofBits = proofBits | changedProofBits; return;
if (changedOrEnabledProofBits) {
uint32_t unchangedBits = g_local_player->m_damage_bits & ~changedOrEnabledProofBits;
g_local_player->m_damage_bits = unchangedBits | proofBits;
lastProofBits = proofBits;
} }
float* water_collision_ptr = nullptr;
if (g_local_player->m_navigation != nullptr)
{
water_collision_ptr = water::get_water_collision_ptr(g_local_player->m_navigation);
}
uint32_t bits = g->self.proof_mask;
uint32_t changed_bits = bits ^ last_bits;
uint32_t changed_or_enabled_bits = bits | changed_bits;
if (changed_or_enabled_bits)
{
uint32_t unchanged_bits = g_local_player->m_damage_bits & ~changed_or_enabled_bits;
g_local_player->m_damage_bits = unchanged_bits | bits;
last_bits = bits;
if (changed_or_enabled_bits & (uint32_t)eEntityProofs::WATER)
{
water::reset_ped_oxygen_time(g_local_player);
if (water_collision_ptr != nullptr && *water_collision_ptr != 0.f)
{
last_water_collistion_strength = *water_collision_ptr;
*water_collision_ptr = 0;
}
return;
}
}
if (last_water_collistion_strength != 0 && water_collision_ptr != nullptr)
{
*water_collision_ptr = last_water_collistion_strength;
last_water_collistion_strength = 0;
} }
} }
} }

View File

@ -1,25 +1,64 @@
#include "backend/looped/looped.hpp" #include "backend/looped/looped.hpp"
#include "util/misc.hpp" #include "util/misc.hpp"
#include "util/water.hpp"
namespace big namespace big
{ {
static bool last_veh_god = false; static uint32_t last_bits = 0;
static float last_water_collistion_strength = 0;
void looped::vehicle_god_mode() void looped::vehicle_god_mode()
{ {
if ((!g->vehicle.god_mode && last_veh_god == g->vehicle.god_mode) || g_local_player == nullptr || g_local_player->m_vehicle == nullptr) if (g_local_player == nullptr || g_local_player->m_vehicle == nullptr)
return;
if (g->vehicle.god_mode && g_local_player->m_ped_task_flag & (int)ePedTask::TASK_DRIVING)
{ {
return;
}
if (
(g->vehicle.god_mode || g->vehicle.proof_collision) &&
g_local_player->m_ped_task_flag & (int)ePedTask::TASK_DRIVING
) {
g_local_player->m_vehicle->m_deform_god = 0x8C; g_local_player->m_vehicle->m_deform_god = 0x8C;
misc::set_bit((int*)&g_local_player->m_vehicle->m_damage_bits, 8);
} }
else else
{ {
g_local_player->m_vehicle->m_deform_god = 0x9C; g_local_player->m_vehicle->m_deform_god = 0x9C;
misc::clear_bit((int*)&g_local_player->m_vehicle->m_damage_bits, 8);
} }
last_veh_god = g->vehicle.god_mode; float* water_collision_ptr = nullptr;
if (g_local_player->m_vehicle->m_navigation != nullptr)
{
water_collision_ptr = water::get_water_collision_ptr(g_local_player->m_vehicle->m_navigation);
}
uint32_t bits = g->vehicle.proof_mask;
uint32_t changed_bits = bits ^ last_bits;
uint32_t changed_or_enabled_bits = bits | changed_bits;
if (changed_or_enabled_bits)
{
uint32_t unchanged_bits = g_local_player->m_vehicle->m_damage_bits & ~changed_or_enabled_bits;
g_local_player->m_vehicle->m_damage_bits = unchanged_bits | bits;
last_bits = bits;
if (changed_or_enabled_bits & (uint32_t)eEntityProofs::WATER)
{
water::reset_ped_oxygen_time(g_local_player);
if (water_collision_ptr != nullptr && *water_collision_ptr != 0.f)
{
last_water_collistion_strength = *water_collision_ptr;
*water_collision_ptr = 0;
}
return;
}
}
if (last_water_collistion_strength != 0 && water_collision_ptr != nullptr)
{
*water_collision_ptr = last_water_collistion_strength;
last_water_collistion_strength = 0;
}
} }
} }

View File

@ -0,0 +1,18 @@
#pragma once
#include "gta\VehicleValues.h"
struct vehicle_plate_type {
PlateTextIndexs type;
const char name[16];
};
#define PLATE_TYPE_SIZE 6
vehicle_plate_type vehicle_plate_types[PLATE_TYPE_SIZE] = {
{ PLATE_BLUEONWHITE1, "Blue on White 1" },
{ PLATE_BLUEONWHITE2, "Blue on White 2" },
{ PLATE_BLUEONWHITE3, "Blue on White 3" },
{ PLATE_YELLOWONBLACK, "Yellow on Black" },
{ PLATE_YELLOWONBLUE, "Yellow on Blue" },
{ PLATE_YANKTON, "Yankton" }
};

View File

@ -0,0 +1,21 @@
#pragma once
#include "gta\VehicleValues.h"
struct vehicle_wheel_type {
WheelTypes type;
const char name[16];
};
std::map<int, std::string> vehicle_wheel_types = {
{ WHEEL_TYPE_SPORT, "Sport" },
{ WHEEL_TYPE_MUSCLE, "Muscle" },
{ WHEEL_TYPE_LOWRIDER, "Lowrider" },
{ WHEEL_TYPE_SUV, "SUV" },
{ WHEEL_TYPE_OFFROAD, "Offroad" },
{ WHEEL_TYPE_TUNER, "Tuner" },
{ WHEEL_TYPE_BIKEWHEELS, "Bike Wheels" },
{ WHEEL_TYPE_HIGHEND, "High End" },
{ WHEEL_TYPE_BENNYS_ORIGINAL, "Bennys Original" },
{ WHEEL_TYPE_BENNYS_BESPOKE, "Bennys Bespoke" },
{ WHEEL_TYPE_F1, "F1" }
};

View File

@ -119,60 +119,6 @@ namespace big
UNK2 = 1 << 16 UNK2 = 1 << 16
}; };
enum eVehicleModType
{
VMT_SPOILER = 0,
VMT_BUMPER_F = 1,
VMT_BUMPER_R = 2,
VMT_SKIRT = 3,
VMT_EXHAUST = 4,
VMT_CHASSIS = 5,
VMT_GRILL = 6,
VMT_BONNET = 7,
VMT_WING_L = 8,
VMT_WING_R = 9,
VMT_ROOF = 10,
VMT_ENGINE = 11,
VMT_BRAKES = 12,
VMT_GEARBOX = 13,
VMT_HORN = 14,
VMT_SUSPENSION = 15,
VMT_ARMOUR = 16,
VMT_NITROUS = 17,
VMT_TURBO = 18,
VMT_SUBWOOFER = 19,
VMT_TYRE_SMOKE = 20,
VMT_HYDRAULICS = 21,
VMT_XENON_LIGHTS = 22,
VMT_WHEELS = 23,
VMT_WHEELS_REAR_OR_HYDRAULICS = 24,
VMT_PLTHOLDER = 25,
VMT_PLTVANITY = 26,
VMT_INTERIOR1 = 27,
VMT_INTERIOR2 = 28,
VMT_INTERIOR3 = 29,
VMT_INTERIOR4 = 30,
VMT_INTERIOR5 = 31,
VMT_SEATS = 32,
VMT_STEERING = 33,
VMT_KNOB = 34,
VMT_PLAQUE = 35,
VMT_ICE = 36,
VMT_TRUNK = 37,
VMT_HYDRO = 38,
VMT_ENGINEBAY1 = 39,
VMT_ENGINEBAY2 = 40,
VMT_ENGINEBAY3 = 41,
VMT_CHASSIS2 = 42,
VMT_CHASSIS3 = 43,
VMT_CHASSIS4 = 44,
VMT_CHASSIS5 = 45,
VMT_DOOR_L = 46,
VMT_DOOR_R = 47,
VMT_LIVERY_MOD = 48,
VMT_LIGHTBAR = 49
};
enum class ePedTask enum class ePedTask
{ {
TASK_NONE, TASK_NONE,
@ -259,4 +205,37 @@ namespace big
DROWN = 1 << 16, DROWN = 1 << 16,
WATER = 1 << 24, WATER = 1 << 24,
}; };
enum ePedType : uint32_t
{
PED_TYPE_PLAYER_0,
PED_TYPE_PLAYER_1,
PED_TYPE_NETWORK_PLAYER,
PED_TYPE_PLAYER_2,
PED_TYPE_CIVMALE,
PED_TYPE_CIVFEMALE,
PED_TYPE_COP,
PED_TYPE_GANG_ALBANIAN,
PED_TYPE_GANG_BIKER_1,
PED_TYPE_GANG_BIKER_2,
PED_TYPE_GANG_ITALIAN,
PED_TYPE_GANG_RUSSIAN,
PED_TYPE_GANG_RUSSIAN_2,
PED_TYPE_GANG_IRISH,
PED_TYPE_GANG_JAMAICAN,
PED_TYPE_GANG_AFRICAN_AMERICAN,
PED_TYPE_GANG_KOREAN,
PED_TYPE_GANG_CHINESE_JAPANESE,
PED_TYPE_GANG_PUERTO_RICAN,
PED_TYPE_DEALER,
PED_TYPE_MEDIC,
PED_TYPE_FIREMAN,
PED_TYPE_CRIMINAL,
PED_TYPE_BUM,
PED_TYPE_PROSTITUTE,
PED_TYPE_SPECIAL,
PED_TYPE_MISSION,
PED_TYPE_SWAT,
PED_TYPE_ANIMAL,
PED_TYPE_ARMY
};
} }

View File

@ -133,7 +133,6 @@ namespace big
bool clean_player = false; bool clean_player = false;
bool force_wanted_level = false; bool force_wanted_level = false;
bool free_cam = false; bool free_cam = false;
bool godmode = false;
bool invisibility = false; bool invisibility = false;
bool local_visibility = true; bool local_visibility = true;
bool never_wanted = false; bool never_wanted = false;
@ -143,6 +142,7 @@ namespace big
bool super_run = false; bool super_run = false;
int wanted_level = 0; int wanted_level = 0;
bool god_mode = false;
bool proof_bullet = false; bool proof_bullet = false;
bool proof_fire = false; bool proof_fire = false;
bool proof_collision = false; bool proof_collision = false;
@ -230,11 +230,20 @@ namespace big
float speed = 1; float speed = 1;
}; };
bool god_mode = false;
bool proof_bullet = false;
bool proof_fire = false;
bool proof_collision = false;
bool proof_melee = false;
bool proof_explosion = false;
bool proof_steam = false;
bool proof_water = false;
uint32_t proof_mask = 0;
bool auto_drive_to_waypoint = false; bool auto_drive_to_waypoint = false;
bool auto_drive_wander = false; bool auto_drive_wander = false;
bool auto_turn_signals = false; bool auto_turn_signals = false;
bool drive_on_water = false; bool drive_on_water = false;
bool god_mode = false;
bool horn_boost = false; bool horn_boost = false;
bool vehicle_jump = false; bool vehicle_jump = false;
bool instant_brake = false; bool instant_brake = false;
@ -493,8 +502,17 @@ namespace big
this->tunables.disable_phone = j["tunables"]["disable_phone"]; this->tunables.disable_phone = j["tunables"]["disable_phone"];
this->tunables.no_idle_kick = j["tunables"]["no_idle_kick"]; this->tunables.no_idle_kick = j["tunables"]["no_idle_kick"];
this->self.god_mode = j["self"]["god_mode"];
this->self.proof_bullet = j["self"]["proof_bullet"];
this->self.proof_fire = j["self"]["proof_fire"];
this->self.proof_collision = j["self"]["proof_collision"];
this->self.proof_melee = j["self"]["proof_melee"];
this->self.proof_explosion = j["self"]["proof_explosion"];
this->self.proof_steam = j["self"]["proof_steam"];
this->self.proof_drown = j["self"]["proof_drown"];
this->self.proof_water = j["self"]["proof_water"];
this->self.proof_mask = j["self"]["proof_mask"];
this->self.clean_player = j["self"]["clean_player"]; this->self.clean_player = j["self"]["clean_player"];
this->self.godmode = j["self"]["godmode"];
this->self.invisibility = j["self"]["invisibility"]; this->self.invisibility = j["self"]["invisibility"];
this->self.local_visibility = j["self"]["local_visibility"]; this->self.local_visibility = j["self"]["local_visibility"];
this->self.never_wanted = j["self"]["never_wanted"]; this->self.never_wanted = j["self"]["never_wanted"];
@ -534,13 +552,21 @@ namespace big
this->spoofing.rockstar_id = j["spoofing"]["rockstar_id"]; this->spoofing.rockstar_id = j["spoofing"]["rockstar_id"];
this->spoofing.username = j["spoofing"]["username"]; this->spoofing.username = j["spoofing"]["username"];
this->vehicle.god_mode = j["vehicle"]["god_mode"];
this->vehicle.proof_bullet = j["vehicle"]["proof_bullet"];
this->vehicle.proof_fire = j["vehicle"]["proof_fire"];
this->vehicle.proof_collision = j["vehicle"]["proof_collision"];
this->vehicle.proof_melee = j["vehicle"]["proof_melee"];
this->vehicle.proof_explosion = j["vehicle"]["proof_explosion"];
this->vehicle.proof_steam = j["vehicle"]["proof_steam"];
this->vehicle.proof_water = j["vehicle"]["proof_water"];
this->vehicle.proof_mask = j["vehicle"]["proof_mask"];
this->vehicle.auto_drive_speed = j["vehicle"]["auto_drive_speed"]; this->vehicle.auto_drive_speed = j["vehicle"]["auto_drive_speed"];
this->vehicle.auto_drive_to_waypoint = j["vehicle"]["auto_drive_to_waypoint"]; this->vehicle.auto_drive_to_waypoint = j["vehicle"]["auto_drive_to_waypoint"];
this->vehicle.auto_drive_wander = j["vehicle"]["auto_drive_wander"]; this->vehicle.auto_drive_wander = j["vehicle"]["auto_drive_wander"];
this->vehicle.auto_turn_signals = j["vehicle"]["auto_turn_signals"]; this->vehicle.auto_turn_signals = j["vehicle"]["auto_turn_signals"];
this->vehicle.drive_on_water = j["vehicle"]["drive_on_water"]; this->vehicle.drive_on_water = j["vehicle"]["drive_on_water"];
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.horn_boost = j["vehicle"]["horn_boost"]; this->vehicle.horn_boost = j["vehicle"]["horn_boost"];
this->vehicle.vehicle_jump = j["vehicle"]["vehicle_jump"]; this->vehicle.vehicle_jump = j["vehicle"]["vehicle_jump"];
this->vehicle.instant_brake = j["vehicle"]["instant_brake"]; this->vehicle.instant_brake = j["vehicle"]["instant_brake"];
@ -734,8 +760,17 @@ namespace big
}, },
{ {
"self", { "self", {
{ "god_mode", this->self.god_mode },
{ "proof_bullet", this->self.proof_bullet },
{ "proof_fire", this->self.proof_fire },
{ "proof_collision", this->self.proof_collision },
{ "proof_melee", this->self.proof_melee },
{ "proof_explosion", this->self.proof_explosion },
{ "proof_steam", this->self.proof_steam },
{ "proof_drown", this->self.proof_drown },
{ "proof_water", this->self.proof_water },
{ "proof_mask", this->self.proof_mask },
{ "clean_player", this->self.clean_player }, { "clean_player", this->self.clean_player },
{ "godmode", this->self.godmode },
{ "invisibility", this->self.invisibility }, { "invisibility", this->self.invisibility },
{ "local_visibility", this->self.local_visibility }, { "local_visibility", this->self.local_visibility },
{ "never_wanted", this->self.never_wanted }, { "never_wanted", this->self.never_wanted },
@ -797,13 +832,21 @@ namespace big
}, },
{ {
"vehicle", { "vehicle", {
{ "god_mode", this->vehicle.god_mode },
{ "proof_bullet", this->vehicle.proof_bullet },
{ "proof_fire", this->vehicle.proof_fire },
{ "proof_collision", this->vehicle.proof_collision },
{ "proof_melee", this->vehicle.proof_melee },
{ "proof_explosion", this->vehicle.proof_explosion },
{ "proof_steam", this->vehicle.proof_steam },
{ "proof_water", this->vehicle.proof_water },
{ "proof_mask", this->vehicle.proof_mask },
{ "auto_drive_speed", this->vehicle.auto_drive_speed }, { "auto_drive_speed", this->vehicle.auto_drive_speed },
{ "auto_drive_to_waypoint", this->vehicle.auto_drive_to_waypoint }, { "auto_drive_to_waypoint", this->vehicle.auto_drive_to_waypoint },
{ "auto_drive_wander", this->vehicle.auto_drive_wander }, { "auto_drive_wander", this->vehicle.auto_drive_wander },
{ "auto_turn_signals", this->vehicle.auto_turn_signals }, { "auto_turn_signals", this->vehicle.auto_turn_signals },
{ "drive_on_water", this->vehicle.drive_on_water }, { "drive_on_water", this->vehicle.drive_on_water },
{ "driving_style", this->vehicle.driving_style_id }, { "driving_style", this->vehicle.driving_style_id },
{ "god_mode", this->vehicle.god_mode },
{ "horn_boost", this->vehicle.horn_boost }, { "horn_boost", this->vehicle.horn_boost },
{ "vehicle_jump", this->vehicle.vehicle_jump }, { "vehicle_jump", this->vehicle.vehicle_jump },
{ "instant_brake", this->vehicle.instant_brake }, { "instant_brake", this->vehicle.instant_brake },

View File

@ -348,6 +348,12 @@ enum VehicleModType
MOD_HORNS, MOD_HORNS,
MOD_SUSPENSION, MOD_SUSPENSION,
MOD_ARMOR, MOD_ARMOR,
MOD_NITROUS = 17,
MOD_TURBO = 18,
MOD_SUBWOOFER = 19,
MOD_TYRE_SMOKE = 20,
MOD_HYDRAULICS = 21,
MOD_XENON_LIGHTS = 22,
MOD_FRONTWHEEL = 23, MOD_FRONTWHEEL = 23,
MOD_REARWHEEL, MOD_REARWHEEL,
MOD_PLATEHOLDER, MOD_PLATEHOLDER,
@ -363,7 +369,7 @@ enum VehicleModType
MOD_PLAQUES, MOD_PLAQUES,
MOD_SPEAKERS, MOD_SPEAKERS,
MOD_TRUNK, MOD_TRUNK,
MOD_HYDRAULICS, MOD_HYDRO,
MOD_ENGINEBLOCK, MOD_ENGINEBLOCK,
MOD_AIRFILTER, MOD_AIRFILTER,
MOD_STRUTS, MOD_STRUTS,
@ -378,13 +384,6 @@ enum VehicleModType
static const char* mod_names[] = { "MOD_SPOILERS", "MOD_FRONTBUMPER", "MOD_REARBUMPER", "MOD_SIDESKIRT", "MOD_EXHAUST", "MOD_FRAME", "MOD_GRILLE", "MOD_HOOD", "MOD_FENDER", "MOD_RIGHTFENDER", "MOD_ROOF", "MOD_ENGINE", "MOD_BRAKES", "MOD_TRANSMISSION", "MOD_HORNS", "MOD_SUSPENSION", "MOD_ARMOR", "", "MOD_TURBO", "", "MOD_TIRESMOKE", "", "MOD_XENONHEADLIGHTS", "MOD_FRONTWHEEL", "MOD_REARWHEEL", "MOD_PLATEHOLDER", "MOD_VANITYPLATES", "MOD_TRIMDESIGN", "MOD_ORNAMENTS", "MOD_DASHBOARD", "MOD_DIALDESIGN", "MOD_DOORSPEAKERS", "MOD_SEATS", "MOD_STEERINGWHEELS", "MOD_COLUMNSHIFTERLEVERS", "MOD_PLAQUES", "MOD_SPEAKERS", "MOD_TRUNK", "MOD_HYDRAULICS", "MOD_ENGINEBLOCK", "MOD_AIRFILTER", "MOD_STRUTS", "MOD_ARCHCOVER", "MOD_AERIALS", "MOD_TRIM", "MOD_TANK", "MOD_WINDOWS", "", "MOD_LIVERY" }; static const char* mod_names[] = { "MOD_SPOILERS", "MOD_FRONTBUMPER", "MOD_REARBUMPER", "MOD_SIDESKIRT", "MOD_EXHAUST", "MOD_FRAME", "MOD_GRILLE", "MOD_HOOD", "MOD_FENDER", "MOD_RIGHTFENDER", "MOD_ROOF", "MOD_ENGINE", "MOD_BRAKES", "MOD_TRANSMISSION", "MOD_HORNS", "MOD_SUSPENSION", "MOD_ARMOR", "", "MOD_TURBO", "", "MOD_TIRESMOKE", "", "MOD_XENONHEADLIGHTS", "MOD_FRONTWHEEL", "MOD_REARWHEEL", "MOD_PLATEHOLDER", "MOD_VANITYPLATES", "MOD_TRIMDESIGN", "MOD_ORNAMENTS", "MOD_DASHBOARD", "MOD_DIALDESIGN", "MOD_DOORSPEAKERS", "MOD_SEATS", "MOD_STEERINGWHEELS", "MOD_COLUMNSHIFTERLEVERS", "MOD_PLAQUES", "MOD_SPEAKERS", "MOD_TRUNK", "MOD_HYDRAULICS", "MOD_ENGINEBLOCK", "MOD_AIRFILTER", "MOD_STRUTS", "MOD_ARCHCOVER", "MOD_AERIALS", "MOD_TRIM", "MOD_TANK", "MOD_WINDOWS", "", "MOD_LIVERY" };
enum VehicleToggleModType
{
MOD_TURBO = 18,
MOD_TIRESMOKE = 20,
MOD_XENONHEADLIGHTS = 22
};
enum VehicleModHorns enum VehicleModHorns
{ {
HORN_STOCK = -1, HORN_STOCK = -1,

View File

@ -58,7 +58,7 @@ namespace big
colors[ImGuiCol_Button] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f); colors[ImGuiCol_Button] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
colors[ImGuiCol_ButtonHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f); colors[ImGuiCol_ButtonHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f); colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_Header] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f); colors[ImGuiCol_Header] = ImVec4(0.30f, 0.29f, 0.32f, 1.00f);
colors[ImGuiCol_HeaderHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f); colors[ImGuiCol_HeaderHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f); colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);

View File

@ -24,6 +24,7 @@ namespace big
SETTINGS, SETTINGS,
SPAWN, SPAWN,
PV, PV,
VEHICLE_FUN,
SPOOFING, SPOOFING,
TELEPORT, TELEPORT,
VEHICLE, VEHICLE,
@ -49,16 +50,17 @@ namespace big
{ tabs::MOBILE, {"Mobile", view::mobile}}, { tabs::MOBILE, {"Mobile", view::mobile}},
{ tabs::TELEPORT, {"Teleport", view::teleport}}, { tabs::TELEPORT, {"Teleport", view::teleport}},
}}}, }}},
{tabs::VEHICLE, {"Vehicle", view::vehicle, { {tabs::VEHICLE, { "Vehicle", view::vehicle, {
{ tabs::HANDLING, {"Handling", view::handling_current_profile, { { tabs::HANDLING, {"Handling", view::handling_current_profile, {
{ tabs::HANDLING_CURRENT_PROFILE, {"Current Profile", view::handling_current_profile } }, { tabs::HANDLING_CURRENT_PROFILE, {"Current Profile", view::handling_current_profile } },
{ tabs::HANDLING_MY_PROFILES, {"My Profiles", view::handling_my_profiles } }, { tabs::HANDLING_MY_PROFILES, {"My Profiles", view::handling_my_profiles } },
{ tabs::HANDLING_SAVED_PROFILE, {"Saved Profiles", view::handling_saved_profiles } }, { tabs::HANDLING_SAVED_PROFILE, {"Saved Profiles", view::handling_saved_profiles } },
{ tabs::HANDLING_SEARCH, {"Search Handling", view::handling_search } }, { tabs::HANDLING_SEARCH, {"Search Handling", view::handling_search } },
}}}, }}},
{ tabs::LSC, {"LSC", view::lsc }}, { tabs::LSC, { "LS Customs", view::lsc }},
{ tabs::SPAWN, { "Spawn", view::spawn }}, { tabs::SPAWN, { "Spawn", view::spawn }},
{ tabs::PV, { "Personal Vehicle", view::pv }}, { tabs::PV, { "Personal Vehicle", view::pv }},
{ tabs::VEHICLE_FUN, { "Fun Features", view::vehicle_fun }},
}}}, }}},
{tabs::NETWORK, { "Network", nullptr, { {tabs::NETWORK, { "Network", nullptr, {
{ tabs::SPOOFING, { "Spoofing", view::spoofing }}, { tabs::SPOOFING, { "Spoofing", view::spoofing }},

View File

@ -106,7 +106,7 @@ namespace big
return HUD::GET_LABEL_TEXT_("CMM_MOD_S11"); return HUD::GET_LABEL_TEXT_("CMM_MOD_S11");
case MOD_TRUNK: case MOD_TRUNK:
return HUD::GET_LABEL_TEXT_("CMM_MOD_S12"); return HUD::GET_LABEL_TEXT_("CMM_MOD_S12");
case MOD_HYDRAULICS: case MOD_HYDRO:
return HUD::GET_LABEL_TEXT_("CMM_MOD_S13"); return HUD::GET_LABEL_TEXT_("CMM_MOD_S13");
case MOD_ENGINEBLOCK: case MOD_ENGINEBLOCK:
return HUD::GET_LABEL_TEXT_("CMM_MOD_S14"); return HUD::GET_LABEL_TEXT_("CMM_MOD_S14");

View File

@ -63,7 +63,7 @@ namespace big
g_vehicle_preview_service = nullptr; g_vehicle_preview_service = nullptr;
} }
const vehicle_preview_item& vehicle_preview_service::find_vehicle_item_by_hash(int hash) const vehicle_preview_item& vehicle_preview_service::find_vehicle_item_by_hash(Hash hash)
{ {
int idx = -1; int idx = -1;
@ -110,10 +110,11 @@ namespace big
return; return;
m_running = true; m_running = true;
g_fiber_pool->queue_job([this] g_fiber_pool->queue_job([this] {
{ while (
while (g_running && m_running && g->spawn.preview_vehicle && g_gui.m_opened) g_running && m_running && g_gui.m_opened &&
{ (g->spawn.preview_vehicle || g->clone_pv.preview_vehicle)
) {
auto location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0.f, 10.f, .5f); auto location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0.f, 10.f, .5f);
if (m_current_veh == -1) if (m_current_veh == -1)
{ {
@ -188,7 +189,7 @@ namespace big
continue; continue;
} }
m_hash_idx_map[item_json["SignedHash"]] = (int)m_vehicle_preview_item_arr.size(); m_hash_idx_map[item_json["Hash"]] = (int)m_vehicle_preview_item_arr.size();
m_vehicle_preview_item_arr.push_back(vehicle_preview_item(item_json)); m_vehicle_preview_item_arr.push_back(vehicle_preview_item(item_json));
} }
} }

View File

@ -35,7 +35,7 @@ namespace big
vehicle_preview_service(); vehicle_preview_service();
~vehicle_preview_service(); ~vehicle_preview_service();
const vehicle_preview_item& find_vehicle_item_by_hash(int hash); const vehicle_preview_item& find_vehicle_item_by_hash(Hash hash);
std::vector<vehicle_preview_item>& get_vehicle_preview_item_arr(); std::vector<vehicle_preview_item>& get_vehicle_preview_item_arr();
void set_preview_vehicle(const vehicle_preview_item& item); void set_preview_vehicle(const vehicle_preview_item& item);

View File

@ -9,3 +9,4 @@
#include "system.hpp" #include "system.hpp"
#include "teleport.hpp" #include "teleport.hpp"
#include "vehicle.hpp" #include "vehicle.hpp"
#include "water.hpp"

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include "gta/joaat.hpp" #include "gta/joaat.hpp"
#include "gta/replay.hpp"
#include "natives.hpp" #include "natives.hpp"
#include "script.hpp" #include "script.hpp"
#include "math.hpp" #include "math.hpp"

View File

@ -7,6 +7,7 @@
#include "script.hpp" #include "script.hpp"
#include "teleport.hpp" #include "teleport.hpp"
#include "script_global.hpp" #include "script_global.hpp"
#include "gta\VehicleValues.h"
namespace big::vehicle namespace big::vehicle
{ {
@ -17,7 +18,7 @@ namespace big::vehicle
*script_global(2671447).at(8).as<int*>() = 1; *script_global(2671447).at(8).as<int*>() = 1;
} }
inline void bring(Vehicle veh, Vector3 location, bool put_in = true) inline void bring(Vehicle veh, Vector3 location, bool put_in = true, int seatIdx = -1)
{ {
if (!ENTITY::IS_ENTITY_A_VEHICLE(veh)) return g_notification_service->push_error("Vehicle", "Invalid handle"); if (!ENTITY::IS_ENTITY_A_VEHICLE(veh)) return g_notification_service->push_error("Vehicle", "Invalid handle");
@ -36,7 +37,21 @@ namespace big::vehicle
for (size_t i = 0; i < 100 && math::distance_between_vectors(location, ENTITY::GET_ENTITY_COORDS(veh, true)) > 10; i++) for (size_t i = 0; i < 100 && math::distance_between_vectors(location, ENTITY::GET_ENTITY_COORDS(veh, true)) > 10; i++)
script::get_current()->yield(); script::get_current()->yield();
PED::SET_PED_INTO_VEHICLE(ped, veh, -1); auto driver_ped = VEHICLE::GET_PED_IN_VEHICLE_SEAT(veh, -1, false);
if (driver_ped != 0)
{
if (PED::GET_PED_TYPE(driver_ped) == ePedType::PED_TYPE_NETWORK_PLAYER)
{
TASK::CLEAR_PED_TASKS_IMMEDIATELY(driver_ped);
}
else
{
entity::delete_entity(driver_ped);
}
}
PED::SET_PED_INTO_VEHICLE(ped, veh, seatIdx);
} }
} }
@ -48,7 +63,7 @@ namespace big::vehicle
{ {
const auto veh_interface_size = veh_interface->m_max_vehicles; const auto veh_interface_size = veh_interface->m_max_vehicles;
float min_dist = range + 1; float min_dist = FLT_MAX;
int32_t m_handle = 0; int32_t m_handle = 0;
for (int32_t i = 0; i < veh_interface_size; i++) for (int32_t i = 0; i < veh_interface_size; i++)
@ -67,9 +82,14 @@ namespace big::vehicle
float dist = math::distance_between_vectors(veh_pos, location); float dist = math::distance_between_vectors(veh_pos, location);
if (dist < min_dist) if (dist < min_dist)
{
int32_t tmp_handle = g_pointers->m_ptr_to_handle(veh_ptr);
if (entity::take_control_of(tmp_handle))
{ {
min_dist = dist; min_dist = dist;
m_handle = g_pointers->m_ptr_to_handle(veh_ptr); m_handle = tmp_handle;
}
} }
} }
@ -245,7 +265,7 @@ namespace big::vehicle
for (int i = 0; i < 50; i++) for (int i = 0; i < 50; i++)
{ {
if ( if (
i != eVehicleModType::VMT_LIVERY_MOD i != MOD_LIVERY
) { ) {
VEHICLE::SET_VEHICLE_MOD(veh, i, VEHICLE::GET_NUM_VEHICLE_MODS(veh, i) - 1, true); VEHICLE::SET_VEHICLE_MOD(veh, i, VEHICLE::GET_NUM_VEHICLE_MODS(veh, i) - 1, true);
} }

View File

@ -0,0 +1,16 @@
#pragma once
namespace big::water
{
inline float* get_water_collision_ptr(CNavigation* nav)
{
auto nav_addr = (uint64_t)nav;
return (float*)(*(uint64_t*)(nav_addr + 0x10) + 0x54);
}
inline void reset_ped_oxygen_time(CPed* ped)
{
auto ped_addr = (uint64_t)ped;
*(float*)(*(uint64_t*)(ped_addr + 0x10C0) + 0x278) = 0;
}
}

View File

@ -5,7 +5,8 @@
namespace big namespace big
{ {
void view::self() { void view::self()
{
components::button("Suicide", [] { components::button("Suicide", [] {
ENTITY::SET_ENTITY_HEALTH(self::ped, 0, 0); ENTITY::SET_ENTITY_HEALTH(self::ped, 0, 0);
}); });
@ -42,12 +43,14 @@ namespace big
g_fiber_pool->queue_job([] { g_fiber_pool->queue_job([] {
const Hash hash = rage::joaat(model); const Hash hash = rage::joaat(model);
for (uint8_t i = 0; !STREAMING::HAS_MODEL_LOADED(hash) && i < 100; i++) { for (uint8_t i = 0; !STREAMING::HAS_MODEL_LOADED(hash) && i < 100; i++)
{
STREAMING::REQUEST_MODEL(hash); STREAMING::REQUEST_MODEL(hash);
script::get_current()->yield(); script::get_current()->yield();
} }
if (!STREAMING::HAS_MODEL_LOADED(hash)) { if (!STREAMING::HAS_MODEL_LOADED(hash))
{
g_notification_service->push_error("Self", "Failed to spawn model, did you give an incorrect model ? "); g_notification_service->push_error("Self", "Failed to spawn model, did you give an incorrect model ? ");
return; return;
@ -66,7 +69,7 @@ namespace big
ImGui::BeginGroup(); ImGui::BeginGroup();
ImGui::Checkbox("God Mode", &g->self.godmode); ImGui::Checkbox("God Mode", &g->self.god_mode);
ImGui::Checkbox("Off Radar", &g->self.off_radar); ImGui::Checkbox("Off Radar", &g->self.off_radar);
ImGui::Checkbox("Free Cam", &g->self.free_cam); ImGui::Checkbox("Free Cam", &g->self.free_cam);
ImGui::Checkbox("Disable Phone", &g->tunables.disable_phone); ImGui::Checkbox("Disable Phone", &g->tunables.disable_phone);
@ -99,25 +102,6 @@ namespace big
ImGui::Separator(); ImGui::Separator();
components::small_text("Police");
ImGui::Checkbox("Never Wanted", &g->self.never_wanted);
if (!g->self.never_wanted)
{
ImGui::Checkbox("Force Wanted Level", &g->self.force_wanted_level);
ImGui::Text("Wanted Level");
if (
ImGui::SliderInt("###wanted_level", &g->self.wanted_level, 0, 5) &&
!g->self.force_wanted_level &&
g_local_player != nullptr
) {
g_local_player->m_player_info->m_wanted_level = g->self.wanted_level;
}
}
ImGui::Separator();
components::small_text("Proofs"); components::small_text("Proofs");
if (ImGui::Button("Check all")) if (ImGui::Button("Check all"))
@ -174,12 +158,30 @@ namespace big
ImGui::EndGroup(); ImGui::EndGroup();
ImGui::Separator();
components::small_text("Police");
ImGui::Checkbox("Never Wanted", &g->self.never_wanted);
if (!g->self.never_wanted)
{
ImGui::Checkbox("Force Wanted Level", &g->self.force_wanted_level);
ImGui::Text("Wanted Level");
if (
ImGui::SliderInt("###wanted_level", &g->self.wanted_level, 0, 5) &&
!g->self.force_wanted_level &&
g_local_player != nullptr
) {
g_local_player->m_player_info->m_wanted_level = g->self.wanted_level;
}
}
g->self.proof_mask = 0; g->self.proof_mask = 0;
if (g->self.godmode) if (g->self.god_mode)
{ {
g->self.proof_mask |= static_cast<int>(eEntityProofs::GOD); g->self.proof_mask |= static_cast<int>(eEntityProofs::GOD);
} else }
{
if (g->self.proof_bullet) if (g->self.proof_bullet)
{ {
g->self.proof_mask |= static_cast<int>(eEntityProofs::BULLET); g->self.proof_mask |= static_cast<int>(eEntityProofs::BULLET);
@ -213,5 +215,4 @@ namespace big
g->self.proof_mask |= static_cast<int>(eEntityProofs::WATER); g->self.proof_mask |= static_cast<int>(eEntityProofs::WATER);
} }
} }
}
} }

View File

@ -3,36 +3,58 @@
#include "script.hpp" #include "script.hpp"
#include "services/vehicle_helper/vehicle_helper.hpp" #include "services/vehicle_helper/vehicle_helper.hpp"
#include "views/view.hpp" #include "views/view.hpp"
#include "util/vehicle.hpp"
#include "core/data/vehicle_plate_types.hpp"
#include "core/data/vehicle_wheel_types.hpp"
#include <imgui_internal.h>
namespace big namespace big
{ {
void view::lsc() void view::lsc()
{ {
static Vehicle player_vehicle{}; static Vehicle player_vehicle = 0;
static std::vector<std::string> slot_display_names{}; static std::map<int, int> owned_mods;
static std::map<int, int> owned_mods{}; static std::map<int, std::string> slot_display_names;
static std::map<int, std::vector<std::string>> mod_display_names{}; static std::map<int, std::map<int, std::string>> mod_display_names{};
static int selected_slot = -1; static int selected_slot = -1;
static bool can_tires_burst{}, tiresmoke{}, turbo{}, xenon{};
static int primary_color{}, secondary_color{}, pearlescent{}, wheel_color{}, interior_color{}, dashboard_color{}; static bool can_tires_burst = false;
static bool tiresmoke = false;
static bool turbo = false;
static bool xenon = false;
static int primary_color = 0;
static int secondary_color = 0;
static int pearlescent = 0;
static int wheel_color = 0;
static int interior_color = 0;
static int dashboard_color = 0;
static int plate_type = -1;
static int wheel_type = -1;
static Hash veh_model_hash = 0;
static bool is_bike = false;
if (self::veh == 0) if (self::veh == 0)
{ {
if (!slot_display_names.empty()) player_vehicle = 0;
{ owned_mods.clear();
player_vehicle = NULL;
mod_display_names.clear();
slot_display_names.clear(); slot_display_names.clear();
} mod_display_names.clear();
ImGui::Text("Please enter a vehicle."); ImGui::Text("Please enter a vehicle.");
return; return;
} }
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{ if (player_vehicle != self::veh)
if (player_vehicle != PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), FALSE))
{ {
player_vehicle = 0;
owned_mods.clear();
slot_display_names.clear();
mod_display_names.clear();
if (!HUD::HAS_THIS_ADDITIONAL_TEXT_LOADED("MOD_MNU", 10)) if (!HUD::HAS_THIS_ADDITIONAL_TEXT_LOADED("MOD_MNU", 10))
{ {
HUD::CLEAR_ADDITIONAL_TEXT(10, TRUE); HUD::CLEAR_ADDITIONAL_TEXT(10, TRUE);
@ -42,163 +64,244 @@ namespace big
player_vehicle = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), FALSE); player_vehicle = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), FALSE);
can_tires_burst = !VEHICLE::GET_VEHICLE_TYRES_CAN_BURST(player_vehicle); can_tires_burst = !VEHICLE::GET_VEHICLE_TYRES_CAN_BURST(player_vehicle);
tiresmoke = VEHICLE::IS_TOGGLE_MOD_ON(player_vehicle, MOD_TIRESMOKE); tiresmoke = VEHICLE::IS_TOGGLE_MOD_ON(player_vehicle, MOD_TYRE_SMOKE);
turbo = VEHICLE::IS_TOGGLE_MOD_ON(player_vehicle, MOD_TURBO); turbo = VEHICLE::IS_TOGGLE_MOD_ON(player_vehicle, MOD_TURBO);
xenon = VEHICLE::IS_TOGGLE_MOD_ON(player_vehicle, MOD_XENONHEADLIGHTS); xenon = VEHICLE::IS_TOGGLE_MOD_ON(player_vehicle, MOD_XENON_LIGHTS);
plate_type = VEHICLE::GET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(player_vehicle);
wheel_type = VEHICLE::GET_VEHICLE_WHEEL_TYPE(player_vehicle);
veh_model_hash = g_local_player->m_vehicle->m_model_info->m_model_hash;
is_bike = VEHICLE::IS_THIS_MODEL_A_BIKE(veh_model_hash) || VEHICLE::IS_THIS_MODEL_A_BICYCLE(veh_model_hash);
VEHICLE::GET_VEHICLE_COLOURS(player_vehicle, &primary_color, &secondary_color); VEHICLE::GET_VEHICLE_COLOURS(player_vehicle, &primary_color, &secondary_color);
VEHICLE::GET_VEHICLE_EXTRA_COLOURS(player_vehicle, &pearlescent, &wheel_color); VEHICLE::GET_VEHICLE_EXTRA_COLOURS(player_vehicle, &pearlescent, &wheel_color);
VEHICLE::GET_VEHICLE_INTERIOR_COLOR_(player_vehicle, &interior_color); VEHICLE::GET_VEHICLE_INTERIOR_COLOR_(player_vehicle, &interior_color);
VEHICLE::GET_VEHICLE_DASHBOARD_COLOR_(player_vehicle, &dashboard_color); VEHICLE::GET_VEHICLE_DASHBOARD_COLOR_(player_vehicle, &dashboard_color);
std::vector<std::string> dsp_names{};
for (int slot = MOD_SPOILERS; slot <= MOD_LIVERY; slot++) for (int slot = MOD_SPOILERS; slot <= MOD_LIVERY; slot++)
{ {
int count = VEHICLE::GET_NUM_VEHICLE_MODS(player_vehicle, slot); int count = VEHICLE::GET_NUM_VEHICLE_MODS(player_vehicle, slot);
if (count > 0) if (count > 0)
{ {
owned_mods[slot] = (VEHICLE::GET_VEHICLE_MOD(player_vehicle, selected_slot) + 1); owned_mods[slot] = VEHICLE::GET_VEHICLE_MOD(player_vehicle, slot);
dsp_names.push_back(vehicle_helper::get_mod_slot_name(slot, player_vehicle));
std::vector<std::string> names;
for (int mod = -1; mod < count; mod++)
names.push_back(vehicle_helper::get_mod_name(mod, slot, count, player_vehicle));
mod_display_names[slot] = names;
} std::string slot_name = vehicle_helper::get_mod_slot_name(slot, player_vehicle);
else if (slot_name.empty())
{ {
dsp_names.push_back(""); continue;
}
slot_display_names[slot] = slot_name;
std::map<int, std::string> mod_names;
for (int mod = -1; mod < count; mod++)
{
std::string mod_name = vehicle_helper::get_mod_name(mod, slot, count, player_vehicle);
if (mod_name.empty())
{
continue;
}
bool repeated = false;
for (const auto& it : mod_names)
{
if (it.second == mod_name)
{
repeated = true;
break;
}
}
if (!repeated)
{
mod_names[mod] = mod_name;
}
}
mod_display_names[slot] = mod_names;
} }
} }
slot_display_names = dsp_names;
} }
}); });
if (!slot_display_names.empty()) if (slot_display_names.empty())
{
if (ImGui::TreeNode("Los santos customs"))
{ {
return;
}
components::button("Start LS Customs", [] {
g->vehicle.ls_customs = true;
});
ImGui::SameLine();
if (components::button("Max Vehicle")) if (components::button("Max Vehicle"))
{ {
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{ vehicle::max_vehicle(self::veh);
Vehicle vehicle = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
VEHICLE::SET_VEHICLE_MOD_KIT(vehicle, 0); // refresh mod names
for (int i = 0; i < 50; i++) player_vehicle = 0;
{
VEHICLE::SET_VEHICLE_MOD(vehicle, i, VEHICLE::GET_NUM_VEHICLE_MODS(vehicle, i) - 1, false);
}
}); });
} }
ImGui::Separator(); ImGui::Separator();
components::small_text("Mod Options");
if (ImGui::Checkbox("Bulletproof Tires", &can_tires_burst)) if (ImGui::Checkbox("Bulletproof Tires", &can_tires_burst))
{ {
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::SET_VEHICLE_TYRES_CAN_BURST(player_vehicle, !can_tires_burst); VEHICLE::SET_VEHICLE_TYRES_CAN_BURST(player_vehicle, !can_tires_burst);
}); });
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Checkbox("Tiresmoke", &tiresmoke))
{
g_fiber_pool->queue_job([]
{
VEHICLE::TOGGLE_VEHICLE_MOD(player_vehicle, MOD_TIRESMOKE, tiresmoke);
});
}
ImGui::SameLine();
if (ImGui::Checkbox("Turbo", &turbo)) if (ImGui::Checkbox("Turbo", &turbo))
{ {
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::TOGGLE_VEHICLE_MOD(player_vehicle, MOD_TURBO, turbo); VEHICLE::TOGGLE_VEHICLE_MOD(player_vehicle, MOD_TURBO, turbo);
}); });
} }
if (ImGui::Button("F1 Wheels")) ImGui::SameLine();
if (ImGui::Checkbox("Tiresmoke", &tiresmoke))
{ {
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{ VEHICLE::TOGGLE_VEHICLE_MOD(player_vehicle, MOD_TYRE_SMOKE, tiresmoke);
VEHICLE::SET_VEHICLE_WHEEL_TYPE(player_vehicle, WHEEL_TYPE_F1);
}); });
} }
ImGui::SameLine();
if (ImGui::Checkbox("Xenon", &xenon)) if (ImGui::Checkbox("Xenon", &xenon))
{ {
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{ VEHICLE::TOGGLE_VEHICLE_MOD(player_vehicle, MOD_XENON_LIGHTS, xenon);
VEHICLE::TOGGLE_VEHICLE_MOD(player_vehicle, MOD_XENONHEADLIGHTS, xenon);
}); });
} }
static char plate[9] = { 0 };
ImGui::SetNextItemWidth(200.f);
components::input_text_with_hint("##plate", "Plate Number", plate, sizeof(plate), ImGuiInputTextFlags_None, [] {
g->spawn.plate = plate;
});
ImGui::SameLine();
if (components::button("Change Plate Number"))
{
g_fiber_pool->queue_job([] {
vehicle::set_plate(self::veh, plate);
});
}
ImGui::SetNextItemWidth(200);
if (ImGui::BeginCombo("Plate Style", vehicle_plate_types[plate_type].name))
{
for (int i = 0; i < PLATE_TYPE_SIZE; i++)
{
auto item = vehicle_plate_types[i];
if (ImGui::Selectable(item.name, (int)item.type == plate_type))
{
if (plate_type != item.type)
{
plate_type = item.type;
VEHICLE::SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(player_vehicle, plate_type);
}
}
if (item.type == plate_type)
{
ImGui::SetItemDefaultFocus();
}
}
ImGui::EndCombo();
}
if (!is_bike)
{
static int windowtint{};
static char* windowtint_combo[] = { "None", "Black", "Dark", "Light" };
ImGui::SetNextItemWidth(200);
if (ImGui::Combo("Window Tint", &windowtint, windowtint_combo, IM_ARRAYSIZE(windowtint_combo)))
{
g_fiber_pool->queue_job([] {
VEHICLE::SET_VEHICLE_WINDOW_TINT(player_vehicle, windowtint);
});
}
ImGui::SetNextItemWidth(200);
if (ImGui::BeginCombo("Wheel Type", vehicle_wheel_types[wheel_type].c_str()))
{
for (const auto& [type, name] : vehicle_wheel_types)
{
if (ImGui::Selectable(name.c_str(), (int)type == wheel_type))
{
if (wheel_type != type)
{
wheel_type = type;
g_fiber_pool->queue_job([] {
VEHICLE::SET_VEHICLE_WHEEL_TYPE(player_vehicle, wheel_type);
VEHICLE::SET_VEHICLE_MOD(player_vehicle, MOD_FRONTWHEEL, 0, false);
selected_slot = MOD_FRONTWHEEL;
// refresh mod names
player_vehicle = 0;
});
}
}
if (type == wheel_type)
{
ImGui::SetItemDefaultFocus();
}
}
ImGui::EndCombo();
}
}
ImGui::Separator();
if (ImGui::ListBoxHeader("Slot", ImVec2(200, 200))) if (ImGui::ListBoxHeader("Slot", ImVec2(200, 200)))
{ {
for (int slot = MOD_SPOILERS; slot <= MOD_LIVERY; slot++) for (const auto& [slot, name] : slot_display_names)
{
if (ImGui::Selectable(name.c_str(), slot == selected_slot))
{ {
if (slot_display_names[slot].empty())
continue;
if (ImGui::Selectable(slot_display_names[slot].c_str(), slot == selected_slot))
selected_slot = slot; selected_slot = slot;
} }
}
ImGui::ListBoxFooter(); ImGui::ListBoxFooter();
} }
if (selected_slot != -1) if (selected_slot != -1)
{ {
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::ListBoxHeader("Mod", ImVec2(200, 200))) if (ImGui::ListBoxHeader("Mod", ImVec2(200, 200)))
{ {
for (int i = 0; i < mod_display_names[selected_slot].size(); i++) for (const auto& it : mod_display_names[selected_slot])
{ {
if (mod_display_names[selected_slot][i].empty()) const auto& mod = it.first;
continue; const auto& name = it.second;
if (ImGui::Selectable(mod_display_names[selected_slot][i].c_str(), i == owned_mods[selected_slot])) if (ImGui::Selectable(name.c_str(), mod == owned_mods[selected_slot]))
{ {
g_fiber_pool->queue_job([i] g_fiber_pool->queue_job([&mod] {
{ NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(self::veh);
NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false)); VEHICLE::SET_VEHICLE_MOD(player_vehicle, selected_slot, mod, false);
owned_mods[selected_slot] = VEHICLE::GET_VEHICLE_MOD(player_vehicle, selected_slot);
owned_mods[selected_slot] = i;
VEHICLE::SET_VEHICLE_MOD(player_vehicle, selected_slot, i - 1, false);
}); });
} }
} }
ImGui::ListBoxFooter(); ImGui::ListBoxFooter();
} }
} }
static int windowtint{};
static char* windowtint_combo[] = { "None", "Black", "Dark", "Light" }; ImGui::Separator();
if (ImGui::Combo("Window Tint", &windowtint, windowtint_combo, IM_ARRAYSIZE(windowtint_combo))) components::small_text("Color Options");
{
g_fiber_pool->queue_job([]
{
VEHICLE::SET_VEHICLE_WINDOW_TINT(player_vehicle, windowtint);
});
}
static int main_color{};
ImGui::RadioButton("Primary Color", &main_color, 0);
ImGui::SameLine();
ImGui::RadioButton("Secondary Color", &main_color, 1);
ImGui::BeginGroup();
static int color_type{};
if (ImGui::ListBoxHeader("##colors", ImVec2(200, 200)))
{
if (ImGui::Selectable("Chrome", color_type == 0))
color_type = 0;
if (ImGui::Selectable("Classic", color_type == 1))
color_type = 1;
if (ImGui::Selectable("Matte", color_type == 2))
color_type = 2;
if (ImGui::Selectable("Metals", color_type == 3))
color_type = 3;
if (ImGui::Selectable("Pearlescent", color_type == 4))
color_type = 4;
if (ImGui::Selectable("Wheel Color", color_type == 5))
color_type = 5;
if (ImGui::Selectable("Interior Color", color_type == 6))
color_type = 6;
if (ImGui::Selectable("Dashboard Color", color_type == 7))
color_type = 7;
ImGui::ListBoxFooter();
}
static const char* classic_names[] = { "Black", "Carbon Black", "Graphite", "Anthracite Black", "Black Steel", "Dark Steel", "Silver", "Bluish Silver", "Rolled Steel", "Shadow SIlver", "Stone Silver", "Midnight Silver", "Cast Iron Silver", "Red", "Torino Red", "Formula Red", "Lava Red", "Blaze Red", "Grace Red", "Garnet Red", "Sunset Red", "Cabernet Red", "Wine Red", "Candy Red", "Hot Pink", "Pfister Pink", "Salmon Pink", "Sunrise Orange", "Orange", "Bright Orange", "Gold", "Bronze", "Yellow", "Race Yellow", "Dew Yellow", "Dark Green", "Racing Green", "Sea Green", "Olive Green", "Bright Green", "Gasoline Green", "Lime Green", "Midnight Blue", "Galaxy Blue", "Dark Blue", "Saxon Blue", "Blue", "Mariner Blue", "Harbor Blue", "Diamond Blue", "Surf Blue", "Nautical Blue", "Racing Blue", "Ultra Blue", "Light Blue", "Chocolate Brown", "Bison Brown", "Creek Brown", "Feltzer Brown", "Maple Brown", "Beechwood Brown", "Sienna Brown", "Saddle Brown", "Moss Brown", "Woodbeech Brown", "Straw Brown", "Sandy Brown", "Bleached Brown", "Schafter Purple", "Spinnaker Purple", "Midnight Purple", "Bright Purple", "Cream", "Ice White", "Frost White" }; static const char* classic_names[] = { "Black", "Carbon Black", "Graphite", "Anthracite Black", "Black Steel", "Dark Steel", "Silver", "Bluish Silver", "Rolled Steel", "Shadow SIlver", "Stone Silver", "Midnight Silver", "Cast Iron Silver", "Red", "Torino Red", "Formula Red", "Lava Red", "Blaze Red", "Grace Red", "Garnet Red", "Sunset Red", "Cabernet Red", "Wine Red", "Candy Red", "Hot Pink", "Pfister Pink", "Salmon Pink", "Sunrise Orange", "Orange", "Bright Orange", "Gold", "Bronze", "Yellow", "Race Yellow", "Dew Yellow", "Dark Green", "Racing Green", "Sea Green", "Olive Green", "Bright Green", "Gasoline Green", "Lime Green", "Midnight Blue", "Galaxy Blue", "Dark Blue", "Saxon Blue", "Blue", "Mariner Blue", "Harbor Blue", "Diamond Blue", "Surf Blue", "Nautical Blue", "Racing Blue", "Ultra Blue", "Light Blue", "Chocolate Brown", "Bison Brown", "Creek Brown", "Feltzer Brown", "Maple Brown", "Beechwood Brown", "Sienna Brown", "Saddle Brown", "Moss Brown", "Woodbeech Brown", "Straw Brown", "Sandy Brown", "Bleached Brown", "Schafter Purple", "Spinnaker Purple", "Midnight Purple", "Bright Purple", "Cream", "Ice White", "Frost White" };
static int classic_ids[] = { COLOR_CLASSIC_BLACK, COLOR_CLASSIC_CARBON_BLACK, COLOR_CLASSIC_GRAPHITE, COLOR_CLASSIC_ANHRACITE_BLACK, COLOR_CLASSIC_BLACK_STEEL, COLOR_CLASSIC_DARK_STEEL, COLOR_CLASSIC_SILVER, COLOR_CLASSIC_BLUISH_SILVER, COLOR_CLASSIC_ROLLED_STEEL, COLOR_CLASSIC_SHADOW_SILVER, COLOR_CLASSIC_STONE_SILVER, COLOR_CLASSIC_MIDNIGHT_SILVER, COLOR_CLASSIC_CAST_IRON_SILVER, COLOR_CLASSIC_RED, COLOR_CLASSIC_TORINO_RED, COLOR_CLASSIC_FORMULA_RED, COLOR_CLASSIC_LAVA_RED, COLOR_CLASSIC_BLAZE_RED, COLOR_CLASSIC_GRACE_RED, COLOR_CLASSIC_GARNET_RED, COLOR_CLASSIC_SUNSET_RED, COLOR_CLASSIC_CABERNET_RED, COLOR_CLASSIC_WINE_RED, COLOR_CLASSIC_CANDY_RED, COLOR_CLASSIC_HOT_PINK, COLOR_CLASSIC_PFSITER_PINK, COLOR_CLASSIC_SALMON_PINK, COLOR_CLASSIC_SUNRISE_ORANGE, COLOR_CLASSIC_ORANGE, COLOR_CLASSIC_BRIGHT_ORANGE, COLOR_CLASSIC_GOLD, COLOR_CLASSIC_BRONZE, COLOR_CLASSIC_YELLOW, COLOR_CLASSIC_RACE_YELLOW, COLOR_CLASSIC_DEW_YELLOW, COLOR_CLASSIC_DARK_GREEN, COLOR_CLASSIC_RACING_GREEN, COLOR_CLASSIC_SEA_GREEN, COLOR_CLASSIC_OLIVE_GREEN, COLOR_CLASSIC_BRIGHT_GREEN, COLOR_CLASSIC_GASOLINE_GREEN, COLOR_CLASSIC_LIME_GREEN, COLOR_CLASSIC_MIDNIGHT_BLUE, COLOR_CLASSIC_GALAXY_BLUE, COLOR_CLASSIC_DARK_BLUE, COLOR_CLASSIC_SAXON_BLUE, COLOR_CLASSIC_BLUE, COLOR_CLASSIC_MARINER_BLUE, COLOR_CLASSIC_HARBOR_BLUE, COLOR_CLASSIC_DIAMOND_BLUE, COLOR_CLASSIC_SURF_BLUE, COLOR_CLASSIC_NAUTICAL_BLUE, COLOR_CLASSIC_RACING_BLUE, COLOR_CLASSIC_ULTRA_BLUE, COLOR_CLASSIC_LIGHT_BLUE, COLOR_CLASSIC_CHOCOLATE_BROWN, COLOR_CLASSIC_BISON_BROWN, COLOR_CLASSIC_CREEEN_BROWN, COLOR_CLASSIC_FELTZER_BROWN, COLOR_CLASSIC_MAPLE_BROWN, COLOR_CLASSIC_BEECHWOOD_BROWN, COLOR_CLASSIC_SIENNA_BROWN, COLOR_CLASSIC_SADDLE_BROWN, COLOR_CLASSIC_MOSS_BROWN, COLOR_CLASSIC_WOODBEECH_BROWN, COLOR_CLASSIC_STRAW_BROWN, COLOR_CLASSIC_SANDY_BROWN, COLOR_CLASSIC_BLEACHED_BROWN, COLOR_CLASSIC_SCHAFTER_PURPLE, COLOR_CLASSIC_SPINNAKER_PURPLE, COLOR_CLASSIC_MIDNIGHT_PURPLE, COLOR_CLASSIC_BRIGHT_PURPLE, COLOR_CLASSIC_CREAM, COLOR_CLASSIC_ICE_WHITE, COLOR_CLASSIC_FROST_WHITE }; static int classic_ids[] = { COLOR_CLASSIC_BLACK, COLOR_CLASSIC_CARBON_BLACK, COLOR_CLASSIC_GRAPHITE, COLOR_CLASSIC_ANHRACITE_BLACK, COLOR_CLASSIC_BLACK_STEEL, COLOR_CLASSIC_DARK_STEEL, COLOR_CLASSIC_SILVER, COLOR_CLASSIC_BLUISH_SILVER, COLOR_CLASSIC_ROLLED_STEEL, COLOR_CLASSIC_SHADOW_SILVER, COLOR_CLASSIC_STONE_SILVER, COLOR_CLASSIC_MIDNIGHT_SILVER, COLOR_CLASSIC_CAST_IRON_SILVER, COLOR_CLASSIC_RED, COLOR_CLASSIC_TORINO_RED, COLOR_CLASSIC_FORMULA_RED, COLOR_CLASSIC_LAVA_RED, COLOR_CLASSIC_BLAZE_RED, COLOR_CLASSIC_GRACE_RED, COLOR_CLASSIC_GARNET_RED, COLOR_CLASSIC_SUNSET_RED, COLOR_CLASSIC_CABERNET_RED, COLOR_CLASSIC_WINE_RED, COLOR_CLASSIC_CANDY_RED, COLOR_CLASSIC_HOT_PINK, COLOR_CLASSIC_PFSITER_PINK, COLOR_CLASSIC_SALMON_PINK, COLOR_CLASSIC_SUNRISE_ORANGE, COLOR_CLASSIC_ORANGE, COLOR_CLASSIC_BRIGHT_ORANGE, COLOR_CLASSIC_GOLD, COLOR_CLASSIC_BRONZE, COLOR_CLASSIC_YELLOW, COLOR_CLASSIC_RACE_YELLOW, COLOR_CLASSIC_DEW_YELLOW, COLOR_CLASSIC_DARK_GREEN, COLOR_CLASSIC_RACING_GREEN, COLOR_CLASSIC_SEA_GREEN, COLOR_CLASSIC_OLIVE_GREEN, COLOR_CLASSIC_BRIGHT_GREEN, COLOR_CLASSIC_GASOLINE_GREEN, COLOR_CLASSIC_LIME_GREEN, COLOR_CLASSIC_MIDNIGHT_BLUE, COLOR_CLASSIC_GALAXY_BLUE, COLOR_CLASSIC_DARK_BLUE, COLOR_CLASSIC_SAXON_BLUE, COLOR_CLASSIC_BLUE, COLOR_CLASSIC_MARINER_BLUE, COLOR_CLASSIC_HARBOR_BLUE, COLOR_CLASSIC_DIAMOND_BLUE, COLOR_CLASSIC_SURF_BLUE, COLOR_CLASSIC_NAUTICAL_BLUE, COLOR_CLASSIC_RACING_BLUE, COLOR_CLASSIC_ULTRA_BLUE, COLOR_CLASSIC_LIGHT_BLUE, COLOR_CLASSIC_CHOCOLATE_BROWN, COLOR_CLASSIC_BISON_BROWN, COLOR_CLASSIC_CREEEN_BROWN, COLOR_CLASSIC_FELTZER_BROWN, COLOR_CLASSIC_MAPLE_BROWN, COLOR_CLASSIC_BEECHWOOD_BROWN, COLOR_CLASSIC_SIENNA_BROWN, COLOR_CLASSIC_SADDLE_BROWN, COLOR_CLASSIC_MOSS_BROWN, COLOR_CLASSIC_WOODBEECH_BROWN, COLOR_CLASSIC_STRAW_BROWN, COLOR_CLASSIC_SANDY_BROWN, COLOR_CLASSIC_BLEACHED_BROWN, COLOR_CLASSIC_SCHAFTER_PURPLE, COLOR_CLASSIC_SPINNAKER_PURPLE, COLOR_CLASSIC_MIDNIGHT_PURPLE, COLOR_CLASSIC_BRIGHT_PURPLE, COLOR_CLASSIC_CREAM, COLOR_CLASSIC_ICE_WHITE, COLOR_CLASSIC_FROST_WHITE };
static const char* matte_names[] = { "Black", "Gray", "Light Gray", "Ice White", "Blue", "Dark Blue", "Midnight Blue", "Midnight Purple", "Shafter Purple", "Red", "Dark Red", "Orange", "Yellow", "Lime Green", "Green", "Forest Green", "Foliage Green", "Olive Drab", "Dark Earth", "Desert Tan" }; static const char* matte_names[] = { "Black", "Gray", "Light Gray", "Ice White", "Blue", "Dark Blue", "Midnight Blue", "Midnight Purple", "Shafter Purple", "Red", "Dark Red", "Orange", "Yellow", "Lime Green", "Green", "Forest Green", "Foliage Green", "Olive Drab", "Dark Earth", "Desert Tan" };
@ -206,7 +309,149 @@ namespace big
static const char* metal_names[] = { "Brushed Steel", "Brushed Black Steel", "Brushed Aluminium", "Pure Gold", "Brushed Gold" }; static const char* metal_names[] = { "Brushed Steel", "Brushed Black Steel", "Brushed Aluminium", "Pure Gold", "Brushed Gold" };
static int metal_ids[] = { COLOR_METALS_BRUSHED_STEEL, COLOR_METALS_BRUSHED_BLACK_STEEL, COLOR_METALS_BRUSHED_ALUMINUM, COLOR_METALS_PURE_GOLD, COLOR_METALS_BRUSHED_GOLD }; static int metal_ids[] = { COLOR_METALS_BRUSHED_STEEL, COLOR_METALS_BRUSHED_BLACK_STEEL, COLOR_METALS_BRUSHED_ALUMINUM, COLOR_METALS_PURE_GOLD, COLOR_METALS_BRUSHED_GOLD };
int color_check{}; static int color_to_change = 0;
static int color_btn_clicked = 1;
static int color_type = 8;
if (ImGui::RadioButton("Primary", &color_to_change, 0))
{
color_btn_clicked = 1;
}
ImGui::SameLine();
if (ImGui::RadioButton("Secondary", &color_to_change, 1))
{
color_btn_clicked = 1;
}
ImGui::SameLine();
if (ImGui::RadioButton("Tire Smake", &color_to_change, 2))
{
color_btn_clicked = 1;
}
ImGui::SameLine();
if (ImGui::Button("Remove Custom Color"))
{
g_fiber_pool->queue_job([] {
VEHICLE::CLEAR_VEHICLE_CUSTOM_PRIMARY_COLOUR(player_vehicle);
VEHICLE::CLEAR_VEHICLE_CUSTOM_SECONDARY_COLOUR(player_vehicle);
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color);
});
}
ImGui::Separator();
ImGui::BeginGroup();
if (color_to_change == 0 || color_to_change == 1)
{
// primary and secondary color
if (ImGui::ListBoxHeader("##colors", ImVec2(200, 254)))
{
if (ImGui::Selectable("Custom", color_type == 8, ImGuiSelectableFlags_SelectOnClick))
{
color_type = 8;
}
if (ImGui::Selectable("Chrome", color_type == 0))
{
color_type = 0;
}
if (ImGui::Selectable("Classic", color_type == 1))
{
color_type = 1;
}
if (ImGui::Selectable("Matte", color_type == 2))
{
color_type = 2;
}
if (ImGui::Selectable("Metals", color_type == 3))
{
color_type = 3;
}
if (ImGui::Selectable("Pearlescent", color_type == 4))
{
color_type = 4;
}
if (ImGui::Selectable("Wheel Color", color_type == 5))
{
color_type = 5;
}
if (ImGui::Selectable("Interior Color", color_type == 6))
{
color_type = 6;
}
if (ImGui::Selectable("Dashboard Color", color_type == 7))
{
color_type = 7;
}
ImGui::ListBoxFooter();
}
}
else
{
// tyre smoke color
color_type = 8;
ImGui::Text("");
}
if (color_type == 8)
{
// custom color
static float color[3] = { 1, 1, 1 };
ImGui::SameLine();
ImGui::SetNextItemWidth(212);
if (ImGui::ColorPicker3("Custom VehColor", color, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHex))
{
g_fiber_pool->queue_job([] {
switch (color_to_change)
{
case 0:
VEHICLE::SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(player_vehicle, (int)(color[0] * 255), (int)(color[1] * 255), (int)(color[2] * 255));
break;
case 1:
VEHICLE::SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(player_vehicle, (int)(color[0] * 255), (int)(color[1] * 255), (int)(color[2] * 255));
break;
case 2:
VEHICLE::SET_VEHICLE_TYRE_SMOKE_COLOR(player_vehicle, (int)(color[0] * 255), (int)(color[1] * 255), (int)(color[2] * 255));
break;
}
});
}
if (color_btn_clicked == 1)
{
g_fiber_pool->queue_job([] {
int color_get[3];
if (color_to_change == 0)
{
VEHICLE::GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(player_vehicle, &color_get[0], &color_get[1], &color_get[2]);
}
else if (color_to_change == 1)
{
VEHICLE::GET_VEHICLE_CUSTOM_SECONDARY_COLOUR(player_vehicle, &color_get[0], &color_get[1], &color_get[2]);
}
else if (color_to_change == 2)
{
VEHICLE::GET_VEHICLE_TYRE_SMOKE_COLOR(player_vehicle, &color_get[0], &color_get[1], &color_get[2]);
}
color[0] = (float)color_get[0] / 255;
color[1] = (float)color_get[1] / 255;
color[2] = (float)color_get[2] / 255;
});
color_btn_clicked = 0;
}
}
else
{
// standard color
int color_check = 0;
switch (color_type) switch (color_type)
{ {
case 4: case 4:
@ -222,10 +467,11 @@ namespace big
color_check = dashboard_color; color_check = dashboard_color;
break; break;
default: default:
color_check = (main_color == 0) ? primary_color : secondary_color; color_check = (color_to_change == 0) ? primary_color : secondary_color;
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::ListBoxHeader("##color", ImVec2(200, 200))) if (ImGui::ListBoxHeader("##color", ImVec2(200, 254)))
{ {
switch (color_type) switch (color_type)
{ {
@ -233,12 +479,11 @@ namespace big
{ {
if (ImGui::Selectable("Chrome", color_check == COLOR_CHROME)) if (ImGui::Selectable("Chrome", color_check == COLOR_CHROME))
{ {
if (main_color == 0) if (color_to_change == 0)
primary_color = COLOR_CHROME; primary_color = COLOR_CHROME;
else else
secondary_color = COLOR_CHROME; secondary_color = COLOR_CHROME;
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color); VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color);
}); });
} }
@ -250,12 +495,11 @@ namespace big
{ {
if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i])) if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i]))
{ {
if (main_color == 0) if (color_to_change == 0)
primary_color = classic_ids[i]; primary_color = classic_ids[i];
else else
secondary_color = classic_ids[i]; secondary_color = classic_ids[i];
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color); VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color);
}); });
} }
@ -268,12 +512,11 @@ namespace big
{ {
if (ImGui::Selectable(matte_names[i], color_check == matte_ids[i])) if (ImGui::Selectable(matte_names[i], color_check == matte_ids[i]))
{ {
if (main_color == 0) if (color_to_change == 0)
primary_color = matte_ids[i]; primary_color = matte_ids[i];
else else
secondary_color = matte_ids[i]; secondary_color = matte_ids[i];
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color); VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color);
}); });
} }
@ -286,12 +529,11 @@ namespace big
{ {
if (ImGui::Selectable(metal_names[i], color_check == metal_ids[i])) if (ImGui::Selectable(metal_names[i], color_check == metal_ids[i]))
{ {
if (main_color == 0) if (color_to_change == 0)
primary_color = metal_ids[i]; primary_color = metal_ids[i];
else else
secondary_color = metal_ids[i]; secondary_color = metal_ids[i];
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color); VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color);
}); });
} }
@ -305,8 +547,7 @@ namespace big
if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i])) if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i]))
{ {
pearlescent = classic_ids[i]; pearlescent = classic_ids[i];
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::SET_VEHICLE_EXTRA_COLOURS(player_vehicle, pearlescent, wheel_color); VEHICLE::SET_VEHICLE_EXTRA_COLOURS(player_vehicle, pearlescent, wheel_color);
}); });
} }
@ -320,8 +561,7 @@ namespace big
if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i])) if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i]))
{ {
wheel_color = classic_ids[i]; wheel_color = classic_ids[i];
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::SET_VEHICLE_EXTRA_COLOURS(player_vehicle, pearlescent, wheel_color); VEHICLE::SET_VEHICLE_EXTRA_COLOURS(player_vehicle, pearlescent, wheel_color);
}); });
} }
@ -335,8 +575,7 @@ namespace big
if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i])) if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i]))
{ {
interior_color = classic_ids[i]; interior_color = classic_ids[i];
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::SET_VEHICLE_INTERIOR_COLOR_(player_vehicle, interior_color); VEHICLE::SET_VEHICLE_INTERIOR_COLOR_(player_vehicle, interior_color);
}); });
} }
@ -350,8 +589,7 @@ namespace big
if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i])) if (ImGui::Selectable(classic_names[i], color_check == classic_ids[i]))
{ {
dashboard_color = classic_ids[i]; dashboard_color = classic_ids[i];
g_fiber_pool->queue_job([] g_fiber_pool->queue_job([] {
{
VEHICLE::SET_VEHICLE_DASHBOARD_COLOR_(player_vehicle, dashboard_color); VEHICLE::SET_VEHICLE_DASHBOARD_COLOR_(player_vehicle, dashboard_color);
}); });
} }
@ -360,85 +598,9 @@ namespace big
} }
} }
ImGui::ListBoxFooter(); ImGui::ListBoxFooter();
ImGui::EndGroup(); }
} }
ImGui::Separator();
if (ImGui::CollapsingHeader("Custom Color"))
{
ImGui::PushItemWidth(400);
static float color[3]{};
static int color_type{};
if (ImGui::ColorPicker3("Custom VehColor", color, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoDragDrop | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHex))
{
g_fiber_pool->queue_job([]
{
switch (color_type)
{
case 0:
VEHICLE::SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(player_vehicle, (int)(color[0] * 255), (int)(color[1] * 255), (int)(color[2] * 255));
break;
case 1:
VEHICLE::SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(player_vehicle, (int)(color[0] * 255), (int)(color[1] * 255), (int)(color[2] * 255));
break;
case 2:
VEHICLE::SET_VEHICLE_TYRE_SMOKE_COLOR(player_vehicle, (int)(color[0] * 255), (int)(color[1] * 255), (int)(color[2] * 255));
break;
}
});
}
ImGui::BeginGroup();
if (ImGui::RadioButton("Primary", &color_type, 0))
{
g_fiber_pool->queue_job([]
{
int color_get[3];
VEHICLE::GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(player_vehicle, &color_get[0], &color_get[1], &color_get[2]);
color[0] = (float)color_get[0] / 255;
color[1] = (float)color_get[1] / 255;
color[2] = (float)color_get[2] / 255;
});
}
if (ImGui::RadioButton("Secondary", &color_type, 1))
{
g_fiber_pool->queue_job([]
{
int color_get[3];
VEHICLE::GET_VEHICLE_CUSTOM_SECONDARY_COLOUR(player_vehicle, &color_get[0], &color_get[1], &color_get[2]);
color[0] = (float)color_get[0] / 255;
color[1] = (float)color_get[1] / 255;
color[2] = (float)color_get[2] / 255;
});
}
if (tiresmoke)
{
if (ImGui::RadioButton("Tire Smoke", &color_type, 2))
{
g_fiber_pool->queue_job([]
{
int color_get[3];
VEHICLE::GET_VEHICLE_TYRE_SMOKE_COLOR(player_vehicle, &color_get[0], &color_get[1], &color_get[2]);
color[0] = (float)color_get[0] / 255;
color[1] = (float)color_get[1] / 255;
color[2] = (float)color_get[2] / 255;
});
}
}
if (ImGui::Button("Remove Custom Color"))
{
g_fiber_pool->queue_job([]
{
VEHICLE::CLEAR_VEHICLE_CUSTOM_PRIMARY_COLOUR(player_vehicle);
VEHICLE::CLEAR_VEHICLE_CUSTOM_SECONDARY_COLOUR(player_vehicle);
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, primary_color, secondary_color);
});
}
ImGui::EndGroup(); ImGui::EndGroup();
ImGui::PopItemWidth();
}
ImGui::TreePop();
}
}
} }
} }

View File

@ -52,7 +52,7 @@ namespace big
}); });
g_mobile_service->refresh_personal_vehicles(); g_mobile_service->refresh_personal_vehicles();
if (ImGui::ListBoxHeader("##personal_veh_list", { 300, static_cast<float>(*g_pointers->m_resolution_y - 184 - 38 * num_of_rows) })) if (ImGui::ListBoxHeader("###personal_veh_list", { 300, static_cast<float>(*g_pointers->m_resolution_y - 184 - 38 * num_of_rows) }))
{ {
if (g_mobile_service->personal_vehicles().empty()) if (g_mobile_service->personal_vehicles().empty())
@ -77,22 +77,21 @@ namespace big
display_name.find(lower_search) != std::string::npos || display_name.find(lower_search) != std::string::npos ||
display_manufacturer.find(lower_search) != std::string::npos display_manufacturer.find(lower_search) != std::string::npos
) { ) {
ImGui::PushID(personal_veh->get_id()); ImGui::PushID('v' << 24 & personal_veh->get_id());
if (ImGui::Selectable(label.c_str(), false)) {
components::selectable(label, false, [&personal_veh] {
if (g->clone_pv.spawn_clone) if (g->clone_pv.spawn_clone)
{ {
g_fiber_pool->queue_job([&personal_veh] {
auto vehicle_idx = personal_veh->get_vehicle_idx(); auto vehicle_idx = personal_veh->get_vehicle_idx();
auto veh_data = vehicle::get_vehicle_data_from_vehicle_idx(vehicle_idx); auto veh_data = vehicle::get_vehicle_data_from_vehicle_idx(vehicle_idx);
float y_offset = 0; float y_offset = 0;
if (PED::IS_PED_IN_ANY_VEHICLE(self::ped, false)) if (self::veh != 0)
{ {
y_offset = 10.f; y_offset = 10.f;
} }
else if (!g->spawn.spawn_inside) else if (!g->clone_pv.spawn_inside)
{ {
y_offset = 5.f; y_offset = 5.f;
} }
@ -119,18 +118,17 @@ namespace big
} }
vehicle::set_plate(veh, spawn_plate); vehicle::set_plate(veh, spawn_plate);
});
} }
else else
{ {
strcpy(search, ""); strcpy(search, "");
lower_search = search; lower_search = search;
g_fiber_pool->queue_job([&personal_veh] {
personal_veh->summon(); personal_veh->summon();
}
g_vehicle_preview_service->stop_preview();
}); });
}
}
ImGui::PopID(); ImGui::PopID();
if (g->clone_pv.preview_vehicle && ImGui::IsItemHovered()) if (g->clone_pv.preview_vehicle && ImGui::IsItemHovered())

View File

@ -6,7 +6,8 @@
namespace big namespace big
{ {
void view::spawn() { void view::spawn()
{
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always); ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
ImGui::Checkbox("Preview", &g->spawn.preview_vehicle); ImGui::Checkbox("Preview", &g->spawn.preview_vehicle);
@ -52,12 +53,12 @@ namespace big
display_name.find(lower_search) != std::string::npos || display_name.find(lower_search) != std::string::npos ||
display_manufacturer.find(lower_search) != std::string::npos display_manufacturer.find(lower_search) != std::string::npos
) { ) {
//ImGui::PushID(item.hash); ImGui::PushID(item.hash);
components::selectable(item.display_name, false, [item] { components::selectable(item.display_name, false, [item] {
float y_offset = 0; float y_offset = 0;
if (PED::IS_PED_IN_ANY_VEHICLE(self::ped, false)) if (self::veh != 0)
{ {
y_offset = 10.f; y_offset = 10.f;
} }
@ -85,7 +86,7 @@ namespace big
g_vehicle_preview_service->stop_preview(); g_vehicle_preview_service->stop_preview();
}); });
//ImGui::PopID(); ImGui::PopID();
if (g->spawn.preview_vehicle && ImGui::IsItemHovered()) if (g->spawn.preview_vehicle && ImGui::IsItemHovered())
{ {

View File

@ -4,17 +4,55 @@
#include "script.hpp" #include "script.hpp"
#include "util/vehicle.hpp" #include "util/vehicle.hpp"
#include "views/view.hpp" #include "views/view.hpp"
#include "util/mobile.hpp"
namespace big namespace big
{ {
void view::vehicle() { void view::vehicle()
{
components::button("MMI Fix All PV", [] {
int amount_fixed = mobile::mors_mutual::fix_all();
g_notification_service->push("Mobile",
fmt::format("{} vehicle{} been fixed.", amount_fixed, amount_fixed == 1 ? " has" : "s have")
);
});
ImGui::SameLine();
components::button("Repair", [] {
vehicle::repair(self::veh);
});
ImGui::Separator();
components::button("Teleport to PV", [] {
Vehicle veh = globals::get_personal_vehicle();
teleport::into_vehicle(veh);
});
ImGui::SameLine();
components::button("Bring PV", [] {
Vehicle veh = globals::get_personal_vehicle();
vehicle::bring(veh, self::pos, true);
});
ImGui::SameLine();
components::button("Bring Closest Vehicle", [] {
Vehicle veh = vehicle::get_closest_to_location(self::pos, 200);
vehicle::bring(veh, self::pos, true, -1);
});
ImGui::Separator();
components::small_text("General");
ImGui::BeginGroup(); ImGui::BeginGroup();
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("Vehicle Jump", &g->vehicle.vehicle_jump);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Instant Brake", &g->vehicle.instant_brake); ImGui::Checkbox("Instant Brake", &g->vehicle.instant_brake);
ImGui::Checkbox("Can Be Targeted", &g->vehicle.is_targetable);
ImGui::Checkbox("Drive On Water", &g->vehicle.drive_on_water); ImGui::Checkbox("Drive On Water", &g->vehicle.drive_on_water);
ImGui::EndGroup(); ImGui::EndGroup();
@ -22,31 +60,7 @@ namespace big
ImGui::BeginGroup(); ImGui::BeginGroup();
ImGui::Checkbox("Seatbelt", &g->vehicle.seatbelt); ImGui::Checkbox("Seatbelt", &g->vehicle.seatbelt);
components::button("Repair", [] {
vehicle::repair(self::veh);
});
components::button("Instant in personal vehicle", [] {
if (!*g_pointers->m_is_session_started) return g_notification_service->push_warning("WARNING", "Go into GTA V Online to use this option");
vehicle::go_into_personal_vehicle();
});
if (ImGui::TreeNode("Paint"))
{
ImGui::ListBox("RGB Type", &g->vehicle.rainbow_paint, vehicle::rgb_types, 3);
if (g->vehicle.rainbow_paint)
{
ImGui::SliderInt("RGB Speed", &g->rgb.speed, 1, 10);
}
ImGui::TreePop();
}
ImGui::Checkbox("Turn Signals", &g->vehicle.turn_signals); ImGui::Checkbox("Turn Signals", &g->vehicle.turn_signals);
if (g->vehicle.turn_signals) if (g->vehicle.turn_signals)
{ {
ImGui::Checkbox("Fully Automatic Signal", &g->vehicle.auto_turn_signals); ImGui::Checkbox("Fully Automatic Signal", &g->vehicle.auto_turn_signals);
@ -56,91 +70,133 @@ namespace big
ImGui::Separator(); ImGui::Separator();
components::small_text("Auto Drive"); components::small_text("Proofs");
components::button("Drive To Waypoint", [] { if (ImGui::Button("Check all"))
g->vehicle.auto_drive_to_waypoint = true;
});
components::button("Wander", [] {
g->vehicle.auto_drive_wander = true;
});
ImGui::SliderInt("Top Speed", &g->vehicle.auto_drive_speed, 1, 200);
components::button("E-Stop", [] {
g->vehicle.auto_drive_to_waypoint = false;
g->vehicle.auto_drive_wander = false;
VEHICLE::SET_VEHICLE_FORWARD_SPEED(self::veh, 0);
TASK::CLEAR_VEHICLE_TASKS_(self::veh);
TASK::CLEAR_PED_TASKS(self::ped);
});
if (ImGui::ListBox("Driving Style", &g->vehicle.driving_style_id, vehicle::driving_style_names, 2))
{ {
g->vehicle.driving_style_flags = vehicle::driving_styles[g->vehicle.driving_style_id]; g->vehicle.proof_bullet = true;
g_notification_service->push_warning("Auto Drive", fmt::format("Driving style set to {}.", vehicle::driving_style_names[g->vehicle.driving_style_id])); g->vehicle.proof_fire = true;
g->vehicle.proof_collision = true;
g->vehicle.proof_melee = true;
g->vehicle.proof_explosion = true;
g->vehicle.proof_steam = true;
g->vehicle.proof_water = true;
} }
ImGui::Separator();
components::small_text("Vehicle Fly");
ImGui::Checkbox("Enabled", &g->vehicle.fly.enabled);
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("Disable Collision", &g->vehicle.fly.no_collision);
ImGui::Checkbox("Don't Stop", &g->vehicle.fly.dont_stop); if (ImGui::Button("Uncheck all"))
{
g->vehicle.proof_bullet = false;
g->vehicle.proof_fire = false;
g->vehicle.proof_collision = false;
g->vehicle.proof_melee = false;
g->vehicle.proof_explosion = false;
g->vehicle.proof_steam = false;
g->vehicle.proof_water = false;
}
ImGui::BeginGroup();
ImGui::Checkbox("Bullet", &g->vehicle.proof_bullet);
ImGui::Checkbox("Fire", &g->vehicle.proof_fire);
ImGui::EndGroup();
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox("Stop On Exit", &g->vehicle.fly.stop_on_exit); ImGui::BeginGroup();
ImGui::SliderFloat("Speed", &g->vehicle.fly.speed, 1.f, 100.f, "%.0f", 1); ImGui::Checkbox("Collision", &g->vehicle.proof_collision);
ImGui::Checkbox("Melee", &g->vehicle.proof_melee);
ImGui::Separator(); ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
components::small_text("LS Customs"); ImGui::Checkbox("Explosion", &g->vehicle.proof_explosion);
ImGui::Checkbox("Steam", &g->vehicle.proof_steam);
components::button("Start LS Customs", [] { ImGui::EndGroup();
g->vehicle.ls_customs = true; ImGui::SameLine();
}); ImGui::BeginGroup();
ImGui::Checkbox("Water", &g->vehicle.proof_water);
ImGui::EndGroup();
ImGui::Separator(); ImGui::Separator();
components::small_text("Speedo Meter"); components::small_text("Speedo Meter");
SpeedoMeter selected = g->vehicle.speedo_meter.type; SpeedoMeter* speed_meter_type_ptr = &g->vehicle.speedo_meter.type;
ImGui::Text("Type:"); if (ImGui::BeginCombo("Format", speedo_meters[(int)*speed_meter_type_ptr].name))
if (ImGui::BeginCombo("###speedo_type", speedo_meters[(int)selected].name))
{ {
for (const speedo_meter& speedo : speedo_meters) for (const auto& speedo : speedo_meters)
{ {
if (ImGui::Selectable(speedo.name, speedo.id == selected)) if (ImGui::Selectable(speedo.name, speedo.id == *speed_meter_type_ptr))
{ {
g->vehicle.speedo_meter.type = speedo.id; *speed_meter_type_ptr = speedo.id;
} }
if (speedo.id == selected) if (speedo.id == *speed_meter_type_ptr)
{
ImGui::SetItemDefaultFocus(); ImGui::SetItemDefaultFocus();
} }
}
ImGui::EndCombo(); ImGui::EndCombo();
} }
ImGui::Text("Position"); if (*speed_meter_type_ptr != SpeedoMeter::DISABLED)
{
ImGui::Text("Position (X, Y)");
float pos[2] = { g->vehicle.speedo_meter.x, g->vehicle.speedo_meter.y };
float pos[2];
pos[0] = g->vehicle.speedo_meter.x;
pos[1] = g->vehicle.speedo_meter.y;
if (ImGui::SliderFloat2("###speedo_pos", pos, .001f, .999f, "%.3f")) if (ImGui::SliderFloat2("###speedo_pos", pos, .001f, .999f, "%.3f"))
{ {
g->vehicle.speedo_meter.x = pos[0]; g->vehicle.speedo_meter.x = pos[0];
g->vehicle.speedo_meter.y = pos[1]; g->vehicle.speedo_meter.y = pos[1];
} }
ImGui::SameLine();
ImGui::Checkbox("Left Sided", &g->vehicle.speedo_meter.left_side); ImGui::Checkbox("Left Sided", &g->vehicle.speedo_meter.left_side);
} }
g->vehicle.proof_mask = 0;
if (g->vehicle.god_mode)
{
g->vehicle.proof_mask |= static_cast<int>(eEntityProofs::GOD);
}
if (g->vehicle.proof_bullet)
{
g->vehicle.proof_mask |= static_cast<int>(eEntityProofs::BULLET);
}
if (g->vehicle.proof_fire)
{
g->vehicle.proof_mask |= static_cast<int>(eEntityProofs::FIRE);
}
if (g->vehicle.proof_collision)
{
g->vehicle.proof_mask |= static_cast<int>(eEntityProofs::COLLISION);
}
if (g->vehicle.proof_melee)
{
g->vehicle.proof_mask |= static_cast<int>(eEntityProofs::MELEE);
}
if (g->vehicle.proof_explosion)
{
g->vehicle.proof_mask |= static_cast<int>(eEntityProofs::EXPLOSION);
}
if (g->vehicle.proof_steam)
{
g->vehicle.proof_mask |= static_cast<int>(eEntityProofs::STEAM);
}
if (g->vehicle.proof_water)
{
g->vehicle.proof_mask |= static_cast<int>(eEntityProofs::WATER);
}
}
} }

View File

@ -0,0 +1,103 @@
#include "core/data/speedo_meters.hpp"
#include "fiber_pool.hpp"
#include "gui/handling/handling_tabs.hpp"
#include "script.hpp"
#include "util/vehicle.hpp"
#include "views/view.hpp"
#include "util/mobile.hpp"
namespace big
{
void view::vehicle_fun()
{
components::small_text("Auto Drive");
components::button("Drive To Waypoint", [] {
g->vehicle.auto_drive_to_waypoint = true;
});
ImGui::SameLine();
components::button("Wander", [] {
g->vehicle.auto_drive_wander = true;
});
ImGui::SameLine();
components::button("Emergency Stop", [] {
g->vehicle.auto_drive_to_waypoint = false;
g->vehicle.auto_drive_wander = false;
VEHICLE::SET_VEHICLE_FORWARD_SPEED(self::veh, 0);
TASK::CLEAR_VEHICLE_TASKS_(self::veh);
TASK::CLEAR_PED_TASKS(self::ped);
});
ImGui::SliderInt("Top Speed", &g->vehicle.auto_drive_speed, 1, 200);
if (ImGui::BeginCombo("Driving Style", vehicle::driving_style_names[g->vehicle.driving_style_id]))
{
for (int i = 0; i < 2; i++)
{
if (ImGui::Selectable(vehicle::driving_style_names[i], g->vehicle.driving_style_id == i))
{
g->vehicle.driving_style_id = i;
g_notification_service->push_warning("Auto Drive", fmt::format("Driving style set to {}.", vehicle::driving_style_names[i]));
}
if (g->vehicle.driving_style_id == i)
{
ImGui::SetItemDefaultFocus();
}
}
ImGui::EndCombo();
}
ImGui::Separator();
components::small_text("Rainbow Paint");
ImGui::SetNextItemWidth(120);
if (ImGui::BeginCombo("RGB Type", vehicle::rgb_types[g->vehicle.rainbow_paint]))
{
for (int i = 0; i < 3; i++)
{
bool itemSelected = g->vehicle.rainbow_paint == i;
if (ImGui::Selectable(vehicle::rgb_types[i], itemSelected))
{
g->vehicle.rainbow_paint = i;
}
if (itemSelected)
{
ImGui::SetItemDefaultFocus();
}
}
ImGui::EndCombo();
}
if (g->vehicle.rainbow_paint != 0)
{
ImGui::SameLine();
ImGui::SetNextItemWidth(150);
ImGui::SliderInt("RGB Speed", &g->rgb.speed, 1, 10);
}
ImGui::Separator();
components::small_text("Vehicle Fly");
ImGui::BeginGroup();
ImGui::Checkbox("Enabled", &g->vehicle.fly.enabled);
ImGui::Checkbox("Don't Stop", &g->vehicle.fly.dont_stop);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Disable Collision", &g->vehicle.fly.no_collision);
ImGui::Checkbox("Stop On Exit", &g->vehicle.fly.stop_on_exit);
ImGui::EndGroup();
ImGui::SliderFloat("Speed", &g->vehicle.fly.speed, 1.f, 100.f, "%.0f", 1);
}
}

View File

@ -34,6 +34,7 @@ namespace big
static void settings(); static void settings();
static void spawn(); static void spawn();
static void pv(); static void pv();
static void vehicle_fun();
static void spoofing(); static void spoofing();
static void teleport(); static void teleport();
static void vehicle(); static void vehicle();