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 "natives.hpp"
#include "util/water.hpp"
namespace big
{
static uint32_t lastProofBits = 0;
static uint32_t last_bits = 0;
static float last_water_collistion_strength = 0;
void looped::self_godmode() {
if (g_local_player != nullptr) {
uint32_t proofBits = g->self.proof_mask;
uint32_t changedProofBits = proofBits ^ lastProofBits;
uint32_t changedOrEnabledProofBits = proofBits | changedProofBits;
void looped::self_godmode()
{
if (g_local_player == nullptr)
{
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 "util/misc.hpp"
#include "util/water.hpp"
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()
{
if ((!g->vehicle.god_mode && last_veh_god == g->vehicle.god_mode) || 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)
if (g_local_player == nullptr || g_local_player->m_vehicle == nullptr)
{
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;
misc::set_bit((int*)&g_local_player->m_vehicle->m_damage_bits, 8);
}
else
{
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
};
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
{
TASK_NONE,
@ -259,4 +205,37 @@ namespace big
DROWN = 1 << 16,
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 force_wanted_level = false;
bool free_cam = false;
bool godmode = false;
bool invisibility = false;
bool local_visibility = true;
bool never_wanted = false;
@ -143,6 +142,7 @@ namespace big
bool super_run = false;
int wanted_level = 0;
bool god_mode = false;
bool proof_bullet = false;
bool proof_fire = false;
bool proof_collision = false;
@ -230,11 +230,20 @@ namespace big
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_wander = false;
bool auto_turn_signals = false;
bool drive_on_water = false;
bool god_mode = false;
bool horn_boost = false;
bool vehicle_jump = false;
bool instant_brake = false;
@ -493,8 +502,17 @@ namespace big
this->tunables.disable_phone = j["tunables"]["disable_phone"];
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.godmode = j["self"]["godmode"];
this->self.invisibility = j["self"]["invisibility"];
this->self.local_visibility = j["self"]["local_visibility"];
this->self.never_wanted = j["self"]["never_wanted"];
@ -534,13 +552,21 @@ namespace big
this->spoofing.rockstar_id = j["spoofing"]["rockstar_id"];
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_to_waypoint = j["vehicle"]["auto_drive_to_waypoint"];
this->vehicle.auto_drive_wander = j["vehicle"]["auto_drive_wander"];
this->vehicle.auto_turn_signals = j["vehicle"]["auto_turn_signals"];
this->vehicle.drive_on_water = j["vehicle"]["drive_on_water"];
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.vehicle_jump = j["vehicle"]["vehicle_jump"];
this->vehicle.instant_brake = j["vehicle"]["instant_brake"];
@ -734,8 +760,17 @@ namespace big
},
{
"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 },
{ "godmode", this->self.godmode },
{ "invisibility", this->self.invisibility },
{ "local_visibility", this->self.local_visibility },
{ "never_wanted", this->self.never_wanted },
@ -797,13 +832,21 @@ namespace big
},
{
"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_to_waypoint", this->vehicle.auto_drive_to_waypoint },
{ "auto_drive_wander", this->vehicle.auto_drive_wander },
{ "auto_turn_signals", this->vehicle.auto_turn_signals },
{ "drive_on_water", this->vehicle.drive_on_water },
{ "driving_style", this->vehicle.driving_style_id },
{ "god_mode", this->vehicle.god_mode },
{ "horn_boost", this->vehicle.horn_boost },
{ "vehicle_jump", this->vehicle.vehicle_jump },
{ "instant_brake", this->vehicle.instant_brake },

View File

@ -348,6 +348,12 @@ enum VehicleModType
MOD_HORNS,
MOD_SUSPENSION,
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_REARWHEEL,
MOD_PLATEHOLDER,
@ -363,7 +369,7 @@ enum VehicleModType
MOD_PLAQUES,
MOD_SPEAKERS,
MOD_TRUNK,
MOD_HYDRAULICS,
MOD_HYDRO,
MOD_ENGINEBLOCK,
MOD_AIRFILTER,
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" };
enum VehicleToggleModType
{
MOD_TURBO = 18,
MOD_TIRESMOKE = 20,
MOD_XENONHEADLIGHTS = 22
};
enum VehicleModHorns
{
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_ButtonHovered] = ImVec4(0.24f, 0.23f, 0.29f, 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_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);

View File

@ -24,6 +24,7 @@ namespace big
SETTINGS,
SPAWN,
PV,
VEHICLE_FUN,
SPOOFING,
TELEPORT,
VEHICLE,
@ -49,16 +50,17 @@ namespace big
{ tabs::MOBILE, {"Mobile", view::mobile}},
{ tabs::TELEPORT, {"Teleport", view::teleport}},
}}},
{tabs::VEHICLE, {"Vehicle", view::vehicle, {
{tabs::VEHICLE, { "Vehicle", view::vehicle, {
{ tabs::HANDLING, {"Handling", 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_SAVED_PROFILE, {"Saved Profiles", view::handling_saved_profiles } },
{ 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::PV, { "Personal Vehicle", view::pv }},
{ tabs::VEHICLE_FUN, { "Fun Features", view::vehicle_fun }},
}}},
{tabs::NETWORK, { "Network", nullptr, {
{ tabs::SPOOFING, { "Spoofing", view::spoofing }},

View File

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

View File

@ -63,7 +63,7 @@ namespace big
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;
@ -110,48 +110,49 @@ namespace big
return;
m_running = true;
g_fiber_pool->queue_job([this]
{
while (g_running && m_running && g->spawn.preview_vehicle && g_gui.m_opened)
g_fiber_pool->queue_job([this] {
while (
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);
if (m_current_veh == -1)
{
auto location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0.f, 10.f, .5f);
if (m_current_veh == -1)
{
m_new_model = false;
location.z = -10.f;
m_current_veh = vehicle::spawn(m_model_hash, location, 0.f, false);
ENTITY::FREEZE_ENTITY_POSITION(m_current_veh, true);
ENTITY::SET_ENTITY_ALPHA(m_current_veh, 0, 0);
ENTITY::SET_ENTITY_COLLISION(m_current_veh, false, false);
ENTITY::SET_CAN_CLIMB_ON_ENTITY(m_current_veh, false);
OBJECT::SET_OBJECT_ALLOW_LOW_LOD_BUOYANCY(m_current_veh, false);
}
else if (m_new_model)
{
entity::delete_entity(m_current_veh);
m_new_model = false;
location.z = -10.f;
m_current_veh = vehicle::spawn(m_model_hash, location, 0.f, false);
ENTITY::FREEZE_ENTITY_POSITION(m_current_veh, true);
ENTITY::SET_ENTITY_ALPHA(m_current_veh, 0, 0);
ENTITY::SET_ENTITY_COLLISION(m_current_veh, false, false);
ENTITY::SET_CAN_CLIMB_ON_ENTITY(m_current_veh, false);
OBJECT::SET_OBJECT_ALLOW_LOW_LOD_BUOYANCY(m_current_veh, false);
}
else if (m_new_model)
{
entity::delete_entity(m_current_veh);
m_current_veh = -1;
}
else
m_current_veh = -1;
}
else
{
if (const int alpha = ENTITY::GET_ENTITY_ALPHA(m_current_veh); alpha < 250)
{
if (const int alpha = ENTITY::GET_ENTITY_ALPHA(m_current_veh); alpha < 250)
{
ENTITY::SET_ENTITY_ALPHA(m_current_veh, std::min<int>(255, alpha + 10), 0);
}
ENTITY::SET_ENTITY_HEADING(m_current_veh, m_heading);
ENTITY::SET_ENTITY_COORDS(m_current_veh, location.x, location.y, location.z, 0, 0, 0, 0);
ENTITY::SET_ENTITY_ALPHA(m_current_veh, std::min<int>(255, alpha + 10), 0);
}
if (m_heading += 0.5f; m_heading > 359) m_heading = 0;
script::get_current()->yield();
ENTITY::SET_ENTITY_HEADING(m_current_veh, m_heading);
ENTITY::SET_ENTITY_COORDS(m_current_veh, location.x, location.y, location.z, 0, 0, 0, 0);
}
entity::delete_entity(m_current_veh);
m_current_veh = -1;
m_running = false;
});
if (m_heading += 0.5f; m_heading > 359) m_heading = 0;
script::get_current()->yield();
}
entity::delete_entity(m_current_veh);
m_current_veh = -1;
m_running = false;
});
}
void vehicle_preview_service::stop_preview()
@ -188,7 +189,7 @@ namespace big
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));
}
}

View File

@ -35,7 +35,7 @@ namespace big
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();
void set_preview_vehicle(const vehicle_preview_item& item);

View File

@ -8,4 +8,5 @@
#include "session.hpp"
#include "system.hpp"
#include "teleport.hpp"
#include "vehicle.hpp"
#include "vehicle.hpp"
#include "water.hpp"

View File

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

View File

@ -7,6 +7,7 @@
#include "script.hpp"
#include "teleport.hpp"
#include "script_global.hpp"
#include "gta\VehicleValues.h"
namespace big::vehicle
{
@ -17,7 +18,7 @@ namespace big::vehicle
*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");
@ -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++)
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;
float min_dist = range + 1;
float min_dist = FLT_MAX;
int32_t m_handle = 0;
for (int32_t i = 0; i < veh_interface_size; i++)
@ -68,8 +83,13 @@ namespace big::vehicle
if (dist < min_dist)
{
min_dist = dist;
m_handle = g_pointers->m_ptr_to_handle(veh_ptr);
int32_t tmp_handle = g_pointers->m_ptr_to_handle(veh_ptr);
if (entity::take_control_of(tmp_handle))
{
min_dist = dist;
m_handle = tmp_handle;
}
}
}
@ -245,7 +265,7 @@ namespace big::vehicle
for (int i = 0; i < 50; i++)
{
if (
i != eVehicleModType::VMT_LIVERY_MOD
i != MOD_LIVERY
) {
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
{
void view::self() {
void view::self()
{
components::button("Suicide", [] {
ENTITY::SET_ENTITY_HEALTH(self::ped, 0, 0);
});
@ -42,12 +43,14 @@ namespace big
g_fiber_pool->queue_job([] {
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);
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 ? ");
return;
@ -66,7 +69,7 @@ namespace big
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("Free Cam", &g->self.free_cam);
ImGui::Checkbox("Disable Phone", &g->tunables.disable_phone);
@ -99,25 +102,6 @@ namespace big
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");
if (ImGui::Button("Check all"))
@ -174,44 +158,61 @@ namespace big
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;
if (g->self.godmode)
if (g->self.god_mode)
{
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);
}
if (g->self.proof_fire)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::FIRE);
}
if (g->self.proof_collision)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::COLLISION);
}
if (g->self.proof_melee)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::MELEE);
}
if (g->self.proof_explosion)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::EXPLOSION);
}
if (g->self.proof_steam)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::STEAM);
}
if (g->self.proof_drown)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::DROWN);
}
if (g->self.proof_water)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::WATER);
}
g->self.proof_mask |= static_cast<int>(eEntityProofs::BULLET);
}
if (g->self.proof_fire)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::FIRE);
}
if (g->self.proof_collision)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::COLLISION);
}
if (g->self.proof_melee)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::MELEE);
}
if (g->self.proof_explosion)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::EXPLOSION);
}
if (g->self.proof_steam)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::STEAM);
}
if (g->self.proof_drown)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::DROWN);
}
if (g->self.proof_water)
{
g->self.proof_mask |= static_cast<int>(eEntityProofs::WATER);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,7 @@ namespace big
});
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())
@ -77,60 +77,58 @@ namespace big
display_name.find(lower_search) != std::string::npos ||
display_manufacturer.find(lower_search) != std::string::npos
) {
ImGui::PushID(personal_veh->get_id());
if (ImGui::Selectable(label.c_str(), false)) {
ImGui::PushID('v' << 24 & personal_veh->get_id());
components::selectable(label, false, [&personal_veh] {
if (g->clone_pv.spawn_clone)
{
g_fiber_pool->queue_job([&personal_veh] {
auto vehicle_idx = personal_veh->get_vehicle_idx();
auto veh_data = vehicle::get_vehicle_data_from_vehicle_idx(vehicle_idx);
auto vehicle_idx = personal_veh->get_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))
{
y_offset = 10.f;
}
else if (!g->spawn.spawn_inside)
{
y_offset = 5.f;
}
if (self::veh != 0)
{
y_offset = 10.f;
}
else if (!g->clone_pv.spawn_inside)
{
y_offset = 5.f;
}
auto spawn_location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0.f, y_offset, 0.f);
float spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
auto spawn_location = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(self::ped, 0.f, y_offset, 0.f);
float spawn_heading = ENTITY::GET_ENTITY_HEADING(self::ped);
const char* spawn_plate = plate;
if (g->clone_pv.clone_plate)
{
spawn_plate = personal_veh->get_plate();
}
const char* spawn_plate = plate;
if (g->clone_pv.clone_plate)
{
spawn_plate = personal_veh->get_plate();
}
auto veh = vehicle::clone(veh_data, spawn_location, spawn_heading);
auto veh = vehicle::clone(veh_data, spawn_location, spawn_heading);
if (g->clone_pv.spawn_inside)
{
vehicle::telport_into_veh(veh);
}
if (g->clone_pv.spawn_inside)
{
vehicle::telport_into_veh(veh);
}
if (g->clone_pv.spawn_maxed)
{
vehicle::max_vehicle(veh);
}
if (g->clone_pv.spawn_maxed)
{
vehicle::max_vehicle(veh);
}
vehicle::set_plate(veh, spawn_plate);
});
vehicle::set_plate(veh, spawn_plate);
}
else
{
strcpy(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();
if (g->clone_pv.preview_vehicle && ImGui::IsItemHovered())

View File

@ -6,7 +6,8 @@
namespace big
{
void view::spawn() {
void view::spawn()
{
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
ImGui::Checkbox("Preview", &g->spawn.preview_vehicle);
@ -52,12 +53,12 @@ namespace big
display_name.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] {
float y_offset = 0;
if (PED::IS_PED_IN_ANY_VEHICLE(self::ped, false))
if (self::veh != 0)
{
y_offset = 10.f;
}
@ -85,7 +86,7 @@ namespace big
g_vehicle_preview_service->stop_preview();
});
//ImGui::PopID();
ImGui::PopID();
if (g->spawn.preview_vehicle && ImGui::IsItemHovered())
{

View File

@ -4,17 +4,55 @@
#include "script.hpp"
#include "util/vehicle.hpp"
#include "views/view.hpp"
#include "util/mobile.hpp"
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::Checkbox("Can Be Targeted", &g->vehicle.is_targetable);
ImGui::Checkbox("God Mode", &g->vehicle.god_mode);
ImGui::Checkbox("Horn Boost", &g->vehicle.horn_boost);
ImGui::Checkbox("Vehicle Jump", &g->vehicle.vehicle_jump);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
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::EndGroup();
@ -22,31 +60,7 @@ namespace big
ImGui::BeginGroup();
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);
if (g->vehicle.turn_signals)
{
ImGui::Checkbox("Fully Automatic Signal", &g->vehicle.auto_turn_signals);
@ -56,91 +70,133 @@ namespace big
ImGui::Separator();
components::small_text("Auto Drive");
components::small_text("Proofs");
components::button("Drive To Waypoint", [] {
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))
if (ImGui::Button("Check all"))
{
g->vehicle.driving_style_flags = vehicle::driving_styles[g->vehicle.driving_style_id];
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_bullet = true;
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::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::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", [] {
g->vehicle.ls_customs = true;
});
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Water", &g->vehicle.proof_water);
ImGui::EndGroup();
ImGui::Separator();
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("###speedo_type", speedo_meters[(int)selected].name))
if (ImGui::BeginCombo("Format", speedo_meters[(int)*speed_meter_type_ptr].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::EndCombo();
}
ImGui::Text("Position");
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 (*speed_meter_type_ptr != SpeedoMeter::DISABLED)
{
g->vehicle.speedo_meter.x = pos[0];
g->vehicle.speedo_meter.y = pos[1];
ImGui::Text("Position (X, Y)");
float pos[2] = { g->vehicle.speedo_meter.x, g->vehicle.speedo_meter.y };
if (ImGui::SliderFloat2("###speedo_pos", pos, .001f, .999f, "%.3f"))
{
g->vehicle.speedo_meter.x = pos[0];
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 spawn();
static void pv();
static void vehicle_fun();
static void spoofing();
static void teleport();
static void vehicle();