2021-05-19 14:32:30 +02:00
|
|
|
#pragma once
|
2022-12-06 16:12:02 +00:00
|
|
|
#include <rage/rlSessionInfo.hpp>
|
|
|
|
#include <weapon/CAmmoInfo.hpp>
|
|
|
|
#include <weapon/CWeaponInfo.hpp>
|
2021-05-19 16:05:21 +02:00
|
|
|
#include "enums.hpp"
|
2022-02-22 01:18:49 +01:00
|
|
|
#include "file_manager.hpp"
|
2022-12-18 23:15:52 +01:00
|
|
|
#include <imgui.h>
|
2022-06-29 23:27:44 +02:00
|
|
|
#include <bitset>
|
2021-05-19 14:32:30 +02:00
|
|
|
|
2022-11-19 01:49:36 +00:00
|
|
|
class CNetGamePlayer;
|
|
|
|
|
2022-11-24 21:49:05 +00:00
|
|
|
namespace rage
|
|
|
|
{
|
2022-12-06 16:12:02 +00:00
|
|
|
class scrThread;
|
2022-11-24 21:49:05 +00:00
|
|
|
class scrProgram;
|
|
|
|
}
|
|
|
|
|
2022-02-22 01:18:49 +01:00
|
|
|
namespace big
|
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
class menu_settings
|
|
|
|
{
|
|
|
|
public:
|
2022-12-19 00:22:01 +01:00
|
|
|
void destroy();
|
2022-12-18 23:15:52 +01:00
|
|
|
void init(const file& save_file);
|
|
|
|
|
|
|
|
void attempt_save();
|
|
|
|
bool load();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool deep_compare(nlohmann::json& current_settings, const nlohmann::json& default_settings, bool compare_value = false);
|
|
|
|
bool save();
|
|
|
|
bool write_default_config();
|
|
|
|
|
|
|
|
private:
|
2022-12-19 00:22:01 +01:00
|
|
|
bool m_running;
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
std::unique_ptr<file> m_save_file;
|
|
|
|
|
|
|
|
nlohmann::json m_default_options;
|
|
|
|
nlohmann::json m_options;
|
|
|
|
|
|
|
|
public:
|
|
|
|
int friend_count = 0;
|
|
|
|
int player_count = 0;
|
2021-05-19 14:32:30 +02:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
CNetGamePlayer* m_syncing_player = nullptr;
|
|
|
|
std::unordered_map<std::uint64_t, std::uint64_t> m_spoofed_peer_ids;
|
|
|
|
|
|
|
|
int m_remote_controller_vehicle = -1;
|
|
|
|
int m_remote_controlled_vehicle = -1;
|
|
|
|
|
|
|
|
int m_mod_net_id = -1;
|
|
|
|
int m_test_net_id = -1;
|
|
|
|
|
|
|
|
rage::scrThread* m_hunt_the_beast_thread = nullptr;
|
|
|
|
|
|
|
|
rage::scrThread* m_dance_thread = nullptr;
|
|
|
|
rage::scrProgram* m_dance_program = nullptr;
|
|
|
|
|
|
|
|
rage::scrThread* m_mission_creator_thread = nullptr;
|
2021-05-20 18:00:03 +02:00
|
|
|
|
2022-05-22 16:38:28 +02:00
|
|
|
struct debug
|
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
struct logs
|
2022-10-21 23:47:50 +02:00
|
|
|
{
|
|
|
|
bool metric_logs{};
|
|
|
|
|
2022-10-23 20:48:51 +02:00
|
|
|
bool script_hook_logs{};
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
struct script_event
|
2022-10-23 20:48:51 +02:00
|
|
|
{
|
|
|
|
bool logs = false;
|
|
|
|
|
|
|
|
bool filter_player = true;
|
|
|
|
std::int8_t player_id = -1;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(script_event, logs, filter_player, player_id)
|
2022-10-23 20:48:51 +02:00
|
|
|
} script_event{};
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(logs, metric_logs, script_hook_logs, script_event)
|
2022-10-21 23:47:50 +02:00
|
|
|
} logs{};
|
2022-01-06 08:47:00 +01:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(debug, logs)
|
|
|
|
} debug{};
|
|
|
|
|
|
|
|
struct tunables
|
|
|
|
{
|
|
|
|
bool disable_phone = false;
|
|
|
|
bool no_idle_kick = false;
|
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(tunables, disable_phone, no_idle_kick)
|
|
|
|
} tunables{};
|
|
|
|
|
2022-03-21 18:10:18 +01:00
|
|
|
struct notifications
|
|
|
|
{
|
|
|
|
struct pair
|
|
|
|
{
|
|
|
|
bool log = false;
|
|
|
|
bool notify = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(pair, log, notify)
|
2022-03-21 18:10:18 +01:00
|
|
|
};
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
struct received_event
|
2022-03-21 18:10:18 +01:00
|
|
|
{
|
|
|
|
pair clear_ped_task{};
|
2022-07-28 20:19:07 +02:00
|
|
|
pair kick_vote{};
|
2022-03-21 18:10:18 +01:00
|
|
|
pair report_cash_spawn{};
|
|
|
|
pair modder_detect{};
|
|
|
|
pair request_control_event{};
|
2022-05-10 20:23:48 +02:00
|
|
|
pair vehicle_temp_action{};
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(received_event, clear_ped_task, kick_vote, report_cash_spawn, modder_detect, request_control_event, vehicle_temp_action)
|
2022-03-21 18:10:18 +01:00
|
|
|
} received_event{};
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
struct script_event_handler
|
2022-03-21 18:10:18 +01:00
|
|
|
{
|
|
|
|
pair bounty{};
|
|
|
|
pair ceo_ban{};
|
|
|
|
pair ceo_kick{};
|
|
|
|
pair ceo_money{};
|
|
|
|
pair clear_wanted_level{};
|
2022-05-16 00:56:15 +02:00
|
|
|
pair crash{};
|
2022-03-21 18:10:18 +01:00
|
|
|
pair fake_deposit{};
|
|
|
|
pair force_mission{};
|
|
|
|
pair force_teleport{};
|
|
|
|
pair gta_banner{};
|
2022-05-16 00:56:15 +02:00
|
|
|
pair mc_teleport{};
|
2022-03-21 18:10:18 +01:00
|
|
|
pair network_bail{};
|
|
|
|
pair personal_vehicle_destroyed{};
|
|
|
|
pair remote_off_radar{};
|
|
|
|
pair rotate_cam{};
|
|
|
|
pair send_to_cutscene{};
|
2022-07-15 14:55:40 +02:00
|
|
|
pair send_to_location{};
|
2022-03-21 18:10:18 +01:00
|
|
|
pair sound_spam{};
|
|
|
|
pair spectate{};
|
2022-11-12 00:38:28 +01:00
|
|
|
pair switch_player_model{};
|
2022-03-21 18:10:18 +01:00
|
|
|
pair transaction_error{};
|
2022-06-22 12:19:00 +02:00
|
|
|
pair tse_freeze{};
|
2022-10-19 17:51:55 +02:00
|
|
|
pair tse_sender_mismatch{};
|
2022-03-21 18:10:18 +01:00
|
|
|
pair vehicle_kick{};
|
2022-08-29 10:26:18 +00:00
|
|
|
pair teleport_to_warehouse{};
|
|
|
|
pair start_activity{};
|
2022-12-06 16:12:02 +00:00
|
|
|
pair null_function_kick{};
|
2022-12-27 01:49:55 +08:00
|
|
|
pair send_sms{};
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(script_event_handler,
|
|
|
|
bounty, ceo_ban, ceo_kick, clear_wanted_level, crash, fake_deposit, force_mission, force_teleport,
|
|
|
|
gta_banner, mc_teleport, network_bail, personal_vehicle_destroyed, remote_off_radar, rotate_cam,
|
|
|
|
send_to_cutscene, send_to_location, sound_spam, spectate, switch_player_model, transaction_error,
|
2022-12-27 01:49:55 +08:00
|
|
|
tse_freeze, tse_sender_mismatch, vehicle_kick, teleport_to_warehouse, start_activity, null_function_kick, send_sms)
|
2022-03-21 18:10:18 +01:00
|
|
|
} script_event_handler{};
|
|
|
|
|
|
|
|
pair gta_thread_kill{};
|
|
|
|
pair gta_thread_start{};
|
|
|
|
|
2022-05-28 17:44:05 +02:00
|
|
|
pair network_player_mgr_init{};
|
2022-03-21 18:10:18 +01:00
|
|
|
pair network_player_mgr_shutdown{};
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
struct player_join
|
2022-03-21 18:10:18 +01:00
|
|
|
{
|
|
|
|
bool above_map = true;
|
|
|
|
bool log = false;
|
|
|
|
bool notify = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(player_join, above_map, log, notify)
|
|
|
|
} player_join{};
|
2022-03-21 18:10:18 +01:00
|
|
|
pair player_leave{};
|
|
|
|
|
|
|
|
pair reports{};
|
|
|
|
|
|
|
|
pair send_net_info_to_lobby{};
|
|
|
|
pair transaction_rate_limit{};
|
2022-08-09 14:39:55 -04:00
|
|
|
pair mismatch_sync_type{};
|
|
|
|
pair out_of_allowed_range_sync_type{};
|
2022-05-23 00:31:21 +02:00
|
|
|
pair invalid_sync{};
|
2022-03-21 18:10:18 +01:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(notifications,
|
|
|
|
received_event, script_event_handler, gta_thread_kill, gta_thread_start, network_player_mgr_init,
|
|
|
|
network_player_mgr_shutdown, player_join, player_leave, reports, send_net_info_to_lobby,
|
|
|
|
transaction_rate_limit, mismatch_sync_type, out_of_allowed_range_sync_type, invalid_sync)
|
|
|
|
} notifications{};
|
|
|
|
|
|
|
|
struct player
|
|
|
|
{
|
2022-02-22 01:18:49 +01:00
|
|
|
int character_slot = 1;
|
|
|
|
int set_level = 130;
|
|
|
|
bool spectating = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(player, character_slot, set_level, spectating)
|
|
|
|
} player{};
|
2021-05-26 13:17:19 +02:00
|
|
|
|
2022-11-12 18:35:28 +00:00
|
|
|
struct protections
|
|
|
|
{
|
|
|
|
struct script_events
|
|
|
|
{
|
2022-02-22 01:18:49 +01:00
|
|
|
bool bounty = true;
|
|
|
|
bool ceo_ban = true;
|
|
|
|
bool ceo_kick = true;
|
|
|
|
bool ceo_money = true;
|
|
|
|
bool clear_wanted_level = true;
|
2022-05-16 00:56:15 +02:00
|
|
|
bool crash = true;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool fake_deposit = true;
|
|
|
|
bool force_mission = true;
|
|
|
|
bool force_teleport = true;
|
|
|
|
bool gta_banner = true;
|
2022-05-16 00:56:15 +02:00
|
|
|
bool mc_teleport = true;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool network_bail = true;
|
|
|
|
bool personal_vehicle_destroyed = true;
|
|
|
|
bool remote_off_radar = true;
|
|
|
|
bool rotate_cam = true;
|
|
|
|
bool send_to_cutscene = true;
|
2022-07-15 14:55:40 +02:00
|
|
|
bool send_to_location = true;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool sound_spam = true;
|
|
|
|
bool spectate = true;
|
2022-11-12 00:38:28 +01:00
|
|
|
bool switch_player_model = true;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool transaction_error = true;
|
|
|
|
bool vehicle_kick = true;
|
2022-08-29 10:26:18 +00:00
|
|
|
bool teleport_to_warehouse = true;
|
|
|
|
bool start_activity = true;
|
2022-12-27 01:49:55 +08:00
|
|
|
bool send_sms = true;
|
2022-02-22 01:18:49 +01:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(script_events,
|
|
|
|
bounty, ceo_ban, ceo_kick, ceo_money, clear_wanted_level, crash, fake_deposit,
|
|
|
|
force_mission, force_teleport, gta_banner, mc_teleport, network_bail,
|
|
|
|
personal_vehicle_destroyed, remote_off_radar, rotate_cam, send_to_cutscene,
|
|
|
|
send_to_location, sound_spam, spectate, switch_player_model, transaction_error,
|
2022-12-27 01:49:55 +08:00
|
|
|
vehicle_kick, teleport_to_warehouse, start_activity, send_sms)
|
2022-12-18 23:15:52 +01:00
|
|
|
} script_events{};
|
|
|
|
|
2022-11-12 18:35:28 +00:00
|
|
|
bool script_host_kick = true;
|
2022-11-13 16:34:44 +00:00
|
|
|
bool rid_join = false;
|
2022-11-21 15:42:12 +00:00
|
|
|
bool lessen_breakups = false; // disabled by default due to anticheat concerns
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(protections, script_events, script_host_kick, rid_join, lessen_breakups)
|
|
|
|
} protections{};
|
2021-08-05 23:06:47 +02:00
|
|
|
|
2022-11-12 18:35:28 +00:00
|
|
|
struct self
|
|
|
|
{
|
2022-03-02 08:48:53 -05:00
|
|
|
bool clean_player = false;
|
|
|
|
bool force_wanted_level = false;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool free_cam = false;
|
2022-03-02 08:48:53 -05:00
|
|
|
bool invisibility = false;
|
2022-05-02 15:15:49 -04:00
|
|
|
bool local_visibility = true;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool never_wanted = false;
|
|
|
|
bool no_ragdoll = false;
|
2022-05-02 15:15:49 -04:00
|
|
|
bool noclip = false;
|
2022-03-02 08:48:53 -05:00
|
|
|
bool off_radar = false;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool super_run = false;
|
2022-10-30 22:23:10 +08:00
|
|
|
bool no_collision = false;
|
2022-11-07 05:30:50 +08:00
|
|
|
bool unlimited_oxygen = false;
|
|
|
|
bool no_water_collision = false;
|
2022-02-22 01:18:49 +01:00
|
|
|
int wanted_level = 0;
|
2022-07-12 22:42:07 +08:00
|
|
|
bool god_mode = false;
|
2022-07-02 23:15:22 +08:00
|
|
|
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_drown = false;
|
|
|
|
bool proof_water = false;
|
|
|
|
uint32_t proof_mask = 0;
|
2022-11-07 13:23:24 -06:00
|
|
|
bool hide_radar = false;
|
|
|
|
bool hide_ammo = false;
|
|
|
|
int selected_hud_component = 1;
|
2022-12-18 23:15:52 +01:00
|
|
|
std::array<bool, 22> hud_components_states = { false };
|
2022-11-26 20:42:58 +01:00
|
|
|
bool force_show_hud_element = false;
|
|
|
|
bool force_show_hud = false;
|
2022-11-11 11:51:40 -06:00
|
|
|
bool mobile_radio = false;
|
2022-11-30 03:16:07 +08:00
|
|
|
bool fast_respawn = false;
|
2022-12-06 16:12:02 +00:00
|
|
|
bool auto_tp = false;
|
|
|
|
|
|
|
|
// do not save below entries
|
|
|
|
bool dance_mode = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(self,
|
|
|
|
clean_player, force_wanted_level, free_cam, invisibility, local_visibility, never_wanted, no_ragdoll,
|
|
|
|
noclip, off_radar, super_run, no_collision, unlimited_oxygen, no_water_collision, wanted_level, god_mode,
|
|
|
|
proof_bullet, proof_fire, proof_collision, proof_melee, proof_explosion, proof_steam, proof_drown, proof_water,
|
|
|
|
proof_mask, hide_radar, hide_ammo, selected_hud_component, hud_components_states, force_show_hud_element,
|
|
|
|
force_show_hud, mobile_radio, fast_respawn, auto_tp)
|
|
|
|
} self{};
|
2022-01-21 23:13:10 +01:00
|
|
|
|
2022-03-19 18:15:38 -04:00
|
|
|
struct session
|
|
|
|
{
|
2022-03-21 17:06:16 -04:00
|
|
|
int local_weather = 0;
|
2022-03-19 18:15:38 -04:00
|
|
|
bool override_time = {};
|
2022-03-21 17:06:16 -04:00
|
|
|
bool override_weather = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
struct custom_time
|
2022-03-19 18:15:38 -04:00
|
|
|
{
|
2022-05-16 02:22:11 -04:00
|
|
|
int hour{}, minute{}, second{};
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(custom_time, hour, minute, second)
|
2022-03-19 18:15:38 -04:00
|
|
|
} custom_time;
|
2022-10-26 15:38:01 -04:00
|
|
|
bool disable_chat_filter = false;
|
2022-11-12 03:17:22 +10:30
|
|
|
bool log_chat_messages = false;
|
|
|
|
bool log_text_messages = false;
|
2022-11-12 18:35:28 +00:00
|
|
|
bool decloak_players = false;
|
2022-11-13 16:34:44 +00:00
|
|
|
bool force_session_host = false;
|
2022-12-06 16:12:02 +00:00
|
|
|
bool force_script_host = false;
|
2022-11-19 01:49:36 +00:00
|
|
|
bool player_magnet_enabled = false;
|
|
|
|
int player_magnet_count = 32;
|
2022-11-14 23:37:38 +08:00
|
|
|
bool is_team = false;
|
2022-11-21 15:42:12 +00:00
|
|
|
bool name_spoof_enabled = false;
|
|
|
|
bool advertise_menu = false;
|
|
|
|
std::string spoofed_name = "";
|
2022-11-24 21:49:05 +00:00
|
|
|
bool join_in_sctv_slots = false;
|
2022-11-21 15:42:12 +00:00
|
|
|
|
2022-12-22 21:23:32 +00:00
|
|
|
const char chat_command_prefix = '/';
|
|
|
|
const char chat_output_prefix = '>';
|
|
|
|
|
|
|
|
bool chat_commands = false;
|
|
|
|
CommandAccessLevel chat_command_default_access_level = CommandAccessLevel::FRIENDLY;
|
|
|
|
|
2022-12-06 16:12:02 +00:00
|
|
|
bool kick_chat_spammers = false;
|
|
|
|
bool kick_host_when_forcing_host = false;
|
|
|
|
|
|
|
|
bool explosion_karma = false;
|
|
|
|
bool damage_karma = false;
|
|
|
|
|
|
|
|
bool disable_traffic = false;
|
|
|
|
bool disable_peds = false;
|
|
|
|
bool force_thunder = false;
|
|
|
|
|
|
|
|
bool block_ceo_money = false;
|
|
|
|
bool randomize_ceo_colors = false;
|
|
|
|
|
|
|
|
int send_to_apartment_idx = 1;
|
|
|
|
int send_to_warehouse_idx = 1;
|
|
|
|
|
2022-11-21 15:42:12 +00:00
|
|
|
// not to be saved
|
2022-12-18 23:15:52 +01:00
|
|
|
bool join_queued = false;
|
|
|
|
rage::rlSessionInfo info;
|
2022-11-21 15:42:12 +00:00
|
|
|
bool never_wanted_all = false;
|
|
|
|
bool off_radar_all = false;
|
|
|
|
bool semi_godmode_all = false;
|
2022-12-06 16:12:02 +00:00
|
|
|
bool wanted_level_all = false;
|
2022-03-19 18:15:38 -04:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(session,
|
|
|
|
local_weather, override_time, override_weather, custom_time, disable_chat_filter, log_chat_messages,
|
|
|
|
log_text_messages, decloak_players, force_session_host, force_script_host, player_magnet_enabled,
|
|
|
|
player_magnet_count, is_team, name_spoof_enabled, advertise_menu, spoofed_name, join_in_sctv_slots,
|
|
|
|
kick_chat_spammers, kick_host_when_forcing_host, explosion_karma, damage_karma, disable_traffic,
|
2022-12-22 21:23:32 +00:00
|
|
|
disable_peds, force_thunder, block_ceo_money, randomize_ceo_colors, send_to_apartment_idx, send_to_warehouse_idx,
|
|
|
|
chat_commands, chat_command_default_access_level)
|
2022-12-18 23:15:52 +01:00
|
|
|
} session{};
|
|
|
|
|
|
|
|
struct settings
|
|
|
|
{
|
2022-02-22 01:18:49 +01:00
|
|
|
struct hotkeys
|
|
|
|
{
|
|
|
|
bool editing_menu_toggle = false;
|
|
|
|
int menu_toggle = VK_INSERT;
|
|
|
|
int teleport_waypoint = 0;
|
2022-11-27 01:29:14 +08:00
|
|
|
int teleport_objective = 0;
|
2022-11-26 22:12:21 +01:00
|
|
|
int noclip = 0;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(hotkeys, editing_menu_toggle, menu_toggle, teleport_waypoint, teleport_objective, noclip)
|
|
|
|
} hotkeys{};
|
2021-07-26 00:38:03 +02:00
|
|
|
|
2022-09-08 14:20:56 +01:00
|
|
|
bool dev_dlc = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(settings, hotkeys, dev_dlc)
|
|
|
|
} settings{};
|
2021-07-26 21:18:19 +02:00
|
|
|
|
2022-08-10 08:42:34 +08:00
|
|
|
struct spawn_vehicle
|
2022-03-14 23:31:30 +01:00
|
|
|
{
|
|
|
|
bool preview_vehicle = false;
|
|
|
|
bool spawn_inside = false;
|
2022-03-21 17:05:13 -04:00
|
|
|
bool spawn_maxed = false;
|
2022-07-10 06:33:14 +08:00
|
|
|
std::string plate = "";
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(spawn_vehicle, preview_vehicle, spawn_inside, spawn_maxed, plate)
|
|
|
|
} spawn_vehicle{};
|
2022-07-10 06:33:14 +08:00
|
|
|
|
|
|
|
struct clone_pv
|
|
|
|
{
|
|
|
|
bool preview_vehicle = false;
|
|
|
|
bool spawn_inside = false;
|
|
|
|
bool spawn_clone = false;
|
|
|
|
bool spawn_maxed = false;
|
|
|
|
bool clone_plate = false;
|
|
|
|
std::string plate = "";
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(clone_pv, preview_vehicle, spawn_inside, spawn_clone, spawn_maxed, clone_plate, plate)
|
|
|
|
} clone_pv{};
|
|
|
|
|
|
|
|
struct spawn_ped
|
|
|
|
{
|
|
|
|
bool preview_ped = false;
|
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(spawn_ped, preview_ped)
|
|
|
|
} spawn_ped{};
|
2022-03-14 23:31:30 +01:00
|
|
|
|
2022-02-22 01:18:49 +01:00
|
|
|
struct spoofing
|
2022-01-18 02:38:51 +01:00
|
|
|
{
|
2022-02-22 01:18:49 +01:00
|
|
|
bool spoof_username = false;
|
2022-12-23 00:03:34 +01:00
|
|
|
bool spoof_local_username = false;
|
2022-02-22 01:18:49 +01:00
|
|
|
std::string username = "";
|
2022-01-18 02:38:51 +01:00
|
|
|
|
2022-12-23 00:03:34 +01:00
|
|
|
// enabling this by default causes confusion and many get dropped out of their sessions
|
|
|
|
bool spoof_ip = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
std::array<int, 4> ip_address = { 42, 42, 42, 42 };
|
2022-01-18 02:38:51 +01:00
|
|
|
|
2022-02-22 01:18:49 +01:00
|
|
|
bool spoof_rockstar_id = false;
|
|
|
|
uint64_t rockstar_id = 0;
|
2022-10-06 13:30:04 +02:00
|
|
|
|
|
|
|
bool spoof_cheater = false;
|
|
|
|
|
2022-11-12 18:35:28 +00:00
|
|
|
bool spoof_hide_god = true;
|
|
|
|
bool spoof_hide_spectate = true;
|
2022-10-29 05:54:32 -04:00
|
|
|
|
2022-10-06 13:30:04 +02:00
|
|
|
bool spoof_rockstar_dev = false;
|
|
|
|
bool spoof_rockstar_qa = false;
|
|
|
|
|
|
|
|
bool spoof_crew_data = false;
|
|
|
|
std::string crew_tag = "";
|
|
|
|
bool rockstar_crew = false;
|
|
|
|
bool square_crew_tag = false;
|
2022-12-06 16:12:02 +00:00
|
|
|
|
|
|
|
bool spoof_session_region_type = false;
|
|
|
|
int session_region_type = 0;
|
|
|
|
bool spoof_session_language = false;
|
|
|
|
int session_language = 0;
|
|
|
|
bool spoof_session_player_count = false;
|
|
|
|
int session_player_count = 25;
|
2022-12-08 12:23:57 +00:00
|
|
|
|
|
|
|
// don't save
|
|
|
|
bool should_spoof_rockstar_id = false;
|
|
|
|
uint64_t applied_spoof_rockstar_id = 0;
|
2021-12-18 19:24:30 +01:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(spoofing,
|
2022-12-23 00:03:34 +01:00
|
|
|
spoof_username, spoof_local_username, username, spoof_ip, ip_address, spoof_rockstar_id, rockstar_id,
|
|
|
|
spoof_cheater, spoof_hide_god, spoof_hide_spectate, spoof_rockstar_dev, spoof_rockstar_qa, spoof_crew_data,
|
|
|
|
crew_tag, rockstar_crew, square_crew_tag, spoof_session_region_type, session_region_type, spoof_session_language,
|
|
|
|
session_language, spoof_session_player_count, session_player_count)
|
2022-12-18 23:15:52 +01:00
|
|
|
} spoofing{};
|
2022-05-22 16:38:28 +02:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
struct vehicle
|
|
|
|
{
|
|
|
|
struct speedo_meter
|
|
|
|
{
|
2022-02-22 01:18:49 +01:00
|
|
|
float x = .9f;
|
|
|
|
float y = .72f;
|
2021-12-18 19:24:30 +01:00
|
|
|
|
2022-07-14 22:16:30 +08:00
|
|
|
bool enabled = false;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool left_side = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(speedo_meter, x, y, enabled, left_side)
|
|
|
|
} speedo_meter{};
|
2021-08-03 20:29:54 +02:00
|
|
|
|
2022-05-16 02:22:11 -04:00
|
|
|
struct fly
|
|
|
|
{
|
|
|
|
bool dont_stop = false;
|
|
|
|
bool enabled = false;
|
|
|
|
bool no_collision = false;
|
|
|
|
bool stop_on_exit = false;
|
|
|
|
float speed = 1;
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(fly, dont_stop, enabled, no_collision, stop_on_exit, speed)
|
|
|
|
} fly{};
|
|
|
|
|
|
|
|
struct rainbow_paint
|
|
|
|
{
|
2022-08-14 18:19:33 +08:00
|
|
|
RainbowPaintType type = RainbowPaintType::Off;
|
|
|
|
bool neon = false;
|
|
|
|
bool primary = false;
|
|
|
|
bool secondary = false;
|
|
|
|
bool smoke = false;
|
|
|
|
int speed = 0;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(rainbow_paint, type, neon, primary, secondary, smoke, speed)
|
|
|
|
} rainbow_paint{};
|
2022-08-14 18:19:33 +08:00
|
|
|
|
2022-07-14 22:16:30 +08:00
|
|
|
SpeedUnit speed_unit = SpeedUnit::MIPH;
|
|
|
|
|
2022-07-12 22:42:07 +08:00
|
|
|
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;
|
|
|
|
|
2022-07-31 00:53:08 +08:00
|
|
|
AutoDriveDestination auto_drive_destination = AutoDriveDestination::STOPPED;
|
|
|
|
AutoDriveStyle auto_drive_style = AutoDriveStyle::LAW_ABIDING;
|
2022-08-09 13:14:02 -04:00
|
|
|
float auto_drive_speed = 1;
|
2022-05-22 20:00:23 -04:00
|
|
|
bool auto_turn_signals = false;
|
2022-08-09 13:14:02 -04:00
|
|
|
eBoostBehaviors boost_behavior = eBoostBehaviors::DEFAULT;
|
2022-05-02 15:31:07 -04:00
|
|
|
bool drive_on_water = false;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool horn_boost = false;
|
2022-05-05 23:51:18 +03:00
|
|
|
bool instant_brake = false;
|
2022-12-22 21:23:32 +00:00
|
|
|
bool block_homing = true;
|
2022-08-09 13:14:02 -04:00
|
|
|
bool ls_customs = false; // don't save this to disk
|
|
|
|
bool seatbelt = false;
|
|
|
|
bool turn_signals = false;
|
|
|
|
bool vehicle_jump = false;
|
2022-10-21 18:22:52 +03:00
|
|
|
bool keep_vehicle_repaired = false;
|
2022-11-07 05:30:50 +08:00
|
|
|
bool no_water_collision = false;
|
2022-11-11 11:51:40 -06:00
|
|
|
bool disable_engine_auto_start = false;
|
|
|
|
bool change_engine_state_immediately = false;
|
2021-08-03 20:29:54 +02:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(vehicle,
|
|
|
|
speedo_meter, fly, rainbow_paint, speed_unit, god_mode,
|
|
|
|
proof_bullet, proof_fire, proof_collision, proof_melee, proof_explosion, proof_steam, proof_water, proof_mask,
|
|
|
|
auto_drive_destination, auto_drive_style, auto_drive_speed, auto_turn_signals, boost_behavior,
|
2022-12-22 21:23:32 +00:00
|
|
|
drive_on_water, horn_boost, instant_brake, block_homing, seatbelt, turn_signals, vehicle_jump,
|
2022-12-18 23:15:52 +01:00
|
|
|
keep_vehicle_repaired, no_water_collision, disable_engine_auto_start, change_engine_state_immediately)
|
|
|
|
} vehicle{};
|
|
|
|
|
|
|
|
struct weapons
|
|
|
|
{
|
2022-03-16 19:16:52 +01:00
|
|
|
struct ammo_special
|
|
|
|
{
|
|
|
|
bool toggle = false;
|
|
|
|
eAmmoSpecialType type = eAmmoSpecialType::None;
|
2022-09-30 22:38:56 +02:00
|
|
|
eExplosionTag explosion_tag = eExplosionTag::DONTCARE;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_JSON_SERIALIZE_ENUM(eAmmoSpecialType, {
|
|
|
|
{ eAmmoSpecialType::None, "none" },
|
|
|
|
{ eAmmoSpecialType::ArmorPiercing, "armor_piercing" },
|
|
|
|
{ eAmmoSpecialType::Explosive, "explosive" },
|
|
|
|
{ eAmmoSpecialType::FMJ, "fmj" },
|
|
|
|
{ eAmmoSpecialType::HollowPoint, "hollow_point" },
|
|
|
|
{ eAmmoSpecialType::Incendiary, "incendiary" },
|
|
|
|
{ eAmmoSpecialType::Tracer, "tracer" },
|
|
|
|
})
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(ammo_special, toggle, type, explosion_tag)
|
|
|
|
} ammo_special{};
|
2022-03-16 19:16:52 +01:00
|
|
|
|
2022-02-22 01:18:49 +01:00
|
|
|
CustomWeapon custom_weapon = CustomWeapon::NONE;
|
2022-03-02 08:48:53 -05:00
|
|
|
bool force_crosshairs = false;
|
2022-02-22 01:18:49 +01:00
|
|
|
bool infinite_ammo = false;
|
|
|
|
bool infinite_mag = false;
|
2022-03-02 08:48:53 -05:00
|
|
|
float increased_damage = 1;
|
|
|
|
bool no_recoil = false;
|
|
|
|
bool no_spread = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
std::string vehicle_gun_model = "bus";
|
2022-10-26 22:10:19 +02:00
|
|
|
bool bypass_c4_limit = false;
|
2022-11-30 03:16:07 +08:00
|
|
|
bool rapid_fire = false;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(weapons,
|
|
|
|
ammo_special, custom_weapon, force_crosshairs, infinite_ammo, infinite_mag, increased_damage, no_recoil,
|
|
|
|
no_spread, vehicle_gun_model, bypass_c4_limit, rapid_fire)
|
|
|
|
} weapons{};
|
2021-08-03 20:29:54 +02:00
|
|
|
|
2022-10-21 23:47:50 +02:00
|
|
|
struct window
|
|
|
|
{
|
2022-05-04 19:16:40 +02:00
|
|
|
ImU32 color = 3357612055;
|
2022-08-10 08:42:34 +08:00
|
|
|
float gui_scale = 1.f;
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2022-02-28 23:04:56 +01:00
|
|
|
ImFont* font_title = nullptr;
|
|
|
|
ImFont* font_sub_title = nullptr;
|
|
|
|
ImFont* font_small = nullptr;
|
2022-08-10 08:42:34 +08:00
|
|
|
ImFont* font_icon = nullptr;
|
2022-02-28 23:04:56 +01:00
|
|
|
|
|
|
|
bool switched_view = true;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(window, color, gui_scale, switched_view)
|
|
|
|
} window{};
|
2022-02-22 01:18:49 +01:00
|
|
|
|
2022-06-02 12:36:16 +02:00
|
|
|
struct context_menu
|
|
|
|
{
|
2022-12-06 16:12:02 +00:00
|
|
|
bool enabled = false;
|
2022-06-29 23:27:44 +02:00
|
|
|
|
|
|
|
uint8_t allowed_entity_types =
|
|
|
|
static_cast<uint8_t>(ContextEntityType::PED) |
|
|
|
|
static_cast<uint8_t>(ContextEntityType::PLAYER) |
|
|
|
|
static_cast<uint8_t>(ContextEntityType::VEHICLE) |
|
|
|
|
static_cast<uint8_t>(ContextEntityType::OBJECT);
|
|
|
|
|
|
|
|
ImU32 selected_option_color = 4278255360;
|
|
|
|
|
|
|
|
bool bounding_box_enabled = true;
|
|
|
|
ImU32 bounding_box_color = 4278255360;
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(context_menu,
|
|
|
|
enabled, allowed_entity_types, selected_option_color, bounding_box_enabled, bounding_box_color)
|
|
|
|
} context_menu{};
|
2022-06-02 12:36:16 +02:00
|
|
|
|
2022-03-09 00:03:14 +01:00
|
|
|
struct esp
|
|
|
|
{
|
|
|
|
bool enabled = true;
|
2022-05-11 18:00:54 +08:00
|
|
|
bool hide_self = true;
|
|
|
|
float global_render_distance[2] = { 0.f, 600.f };
|
|
|
|
float tracer_render_distance[2] = { 200.f, 600.f };
|
|
|
|
float box_render_distance[2] = { 0.f, 150.f };
|
2022-03-09 00:03:14 +01:00
|
|
|
bool tracer = true;
|
2022-05-11 18:00:54 +08:00
|
|
|
float tracer_draw_position[2] = { 0.5f, 1.f };
|
2022-03-09 00:03:14 +01:00
|
|
|
bool box = true;
|
|
|
|
bool health = true;
|
2022-05-11 18:00:54 +08:00
|
|
|
bool armor = true;
|
2022-03-09 00:03:14 +01:00
|
|
|
bool god = true;
|
|
|
|
bool distance = true;
|
|
|
|
bool name = true;
|
2022-05-11 18:00:54 +08:00
|
|
|
bool change_esp_color_from_dist = false;
|
|
|
|
bool scale_health_from_dist = false;
|
|
|
|
bool scale_armor_from_dist = false;
|
|
|
|
float distance_threshold[2] = { 100.f, 200.f };
|
|
|
|
ImU32 enemy_color = 4281479904;
|
|
|
|
ImU32 enemy_near_color = 4283794943;
|
|
|
|
ImU32 default_color = 4285713522;
|
|
|
|
ImU32 friend_color = 4293244509;
|
2022-03-09 00:03:14 +01:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(esp,
|
|
|
|
enabled, hide_self, global_render_distance, tracer_render_distance, box_render_distance, tracer, tracer_draw_position,
|
|
|
|
box, health, armor, god, distance, name, change_esp_color_from_dist, scale_health_from_dist, scale_armor_from_dist,
|
|
|
|
distance_threshold, enemy_color, enemy_near_color, default_color, friend_color)
|
|
|
|
} esp{};
|
2022-08-10 08:42:34 +08:00
|
|
|
|
2022-11-24 21:49:05 +00:00
|
|
|
struct session_browser
|
|
|
|
{
|
|
|
|
bool region_filter_enabled = true;
|
|
|
|
int region_filter = 0;
|
|
|
|
|
|
|
|
bool language_filter_enabled = false;
|
|
|
|
int language_filter = 0;
|
|
|
|
|
|
|
|
bool player_count_filter_enabled = false;
|
|
|
|
int player_count_filter_minimum = 0;
|
|
|
|
int player_count_filter_maximum = 32;
|
|
|
|
|
|
|
|
int sort_method = 0;
|
|
|
|
int sort_direction = 0;
|
|
|
|
|
|
|
|
bool replace_game_matchmaking = false;
|
2022-12-06 16:12:02 +00:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(session_browser,
|
|
|
|
region_filter_enabled, region_filter, language_filter_enabled, language_filter, player_count_filter_enabled,
|
|
|
|
player_count_filter_minimum, player_count_filter_maximum, sort_method, sort_direction, replace_game_matchmaking)
|
|
|
|
} session_browser{};
|
2021-05-19 15:32:51 +02:00
|
|
|
|
2022-12-30 02:09:33 +01:00
|
|
|
struct ugc
|
|
|
|
{
|
|
|
|
bool infinite_model_memory;
|
|
|
|
|
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(ugc, infinite_model_memory)
|
|
|
|
} ugc{};
|
|
|
|
|
2021-05-26 13:17:19 +02:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(menu_settings,
|
|
|
|
debug, tunables, notifications, player, protections, self, session, settings, spawn_vehicle, clone_pv,
|
2022-12-30 02:09:33 +01:00
|
|
|
spawn_ped, spoofing, vehicle, weapons, window, context_menu, esp, session_browser, ugc)
|
2022-02-22 01:18:49 +01:00
|
|
|
};
|
2022-12-18 23:15:52 +01:00
|
|
|
|
|
|
|
inline auto g = menu_settings();
|
2022-02-22 01:18:49 +01:00
|
|
|
}
|