2021-05-19 14:32:30 +02:00
# pragma once
2023-01-03 16:48:32 +00:00
# include "backend/reactions/interloper_reaction.hpp"
2023-03-01 21:27:15 +00:00
# include "backend/reactions/reaction.hpp"
2023-04-16 18:28:49 +00:00
# include "core/data/hud_colors.hpp"
2023-02-01 19:48:31 +01:00
# include "core/data/ptfx_effects.hpp"
2023-03-01 21:27:15 +00:00
# include "enums.hpp"
# include "file_manager.hpp"
2022-06-29 23:27:44 +02:00
# include <bitset>
2023-03-01 21:27:15 +00:00
# include <rage/rlSessionInfo.hpp>
# include <weapon/CAmmoInfo.hpp>
2023-09-14 23:19:32 +08:00
# include <weapon/CAmmoRocketInfo.hpp>
2023-12-05 11:35:05 +01:00
# include <weapon/CWeaponInfo.hpp>
2021-05-19 14:32:30 +02:00
2023-06-23 13:44:06 +05:00
# define IMGUI_DEFINE_MATH_OPERATORS
# include <imgui.h>
2023-09-17 16:23:26 -04:00
# define TYPING_TICKS 3
2023-06-23 13:44:06 +05:00
2022-11-19 01:49:36 +00:00
class CNetGamePlayer ;
2023-08-19 11:01:08 +00:00
enum class eNetObjType ;
2022-11-19 01:49:36 +00:00
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
{
2023-04-16 18:28:49 +00:00
struct color
{
int r ;
int g ;
int b ;
int a ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( color , r , g , b , a )
} ;
2023-06-06 07:40:40 +00:00
struct remote_player_teleport
{
std : : int16_t m_player_net_id ;
rage : : fvector3 m_position ;
} ;
2022-12-18 23:15:52 +01:00
class menu_settings
{
public :
void init ( const file & save_file ) ;
void attempt_save ( ) ;
bool load ( ) ;
2023-06-27 20:24:08 +02:00
bool write_default_config ( ) ;
2022-12-18 23:15:52 +01:00
private :
bool deep_compare ( nlohmann : : json & current_settings , const nlohmann : : json & default_settings , bool compare_value = false ) ;
bool save ( ) ;
private :
2023-07-08 17:54:59 +02:00
file m_save_file ;
2022-12-18 23:15:52 +01:00
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
2023-08-19 11:01:08 +00:00
CNetGamePlayer * m_syncing_player = nullptr ;
eNetObjType m_syncing_object_type = ( eNetObjType ) - 1 ;
2022-12-18 23:15:52 +01:00
int m_remote_controller_vehicle = - 1 ;
int m_remote_controlled_vehicle = - 1 ;
2023-07-20 22:46:32 +02:00
std : : unordered_map < uint16_t , remote_player_teleport > m_remote_player_teleports ;
2022-12-18 23:15:52 +01:00
rage : : scrThread * m_hunt_the_beast_thread = nullptr ;
2023-03-01 21:27:15 +00:00
rage : : scrThread * m_dance_thread = nullptr ;
2022-12-18 23:15:52 +01:00
rage : : scrProgram * m_dance_program = nullptr ;
rage : : scrThread * m_mission_creator_thread = nullptr ;
2021-05-20 18:00:03 +02:00
2023-03-11 00:06:09 +01:00
struct cmd_executor
{
bool enabled = false ;
} cmd_executor { } ;
2023-04-04 00:07:15 +02:00
2023-03-09 12:23:01 +00:00
rage : : scrThread * m_modshop_thread = nullptr ;
2023-03-30 00:37:10 +02:00
bool in_script_vm = false ;
2023-04-04 00:07:15 +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 { } ;
2023-01-22 21:57:32 +00:00
bool packet_logs { } ;
2022-10-21 23:47:50 +02:00
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 ;
2023-03-01 21:27:15 +00:00
bool filter_player = true ;
2022-10-23 20:48:51 +02:00
std : : int8_t player_id = - 1 ;
2022-12-18 23:15:52 +01:00
2023-03-09 12:23:01 +00:00
bool block_all = false ; //should not save
2023-02-20 06:04:13 +08:00
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
2023-01-22 21:57:32 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( logs , metric_logs , packet_logs , script_hook_logs , script_event )
2022-10-21 23:47:50 +02:00
} logs { } ;
2022-01-06 08:47:00 +01:00
2023-08-19 11:01:08 +00:00
struct fuzzer
{
bool enabled = false ;
bool enabled_object_types [ 14 ] ;
bool active = false ;
int thread_id = 0 ;
std : : int16_t syncing_object_id = - 1 ;
} fuzzer { } ;
2023-07-23 22:52:30 +02:00
bool window_hook = false ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( debug , logs , window_hook )
2022-12-18 23:15:52 +01:00
} debug { } ;
struct tunables
{
bool disable_phone = false ;
2023-03-01 21:27:15 +00:00
bool no_idle_kick = false ;
2022-12-18 23:15:52 +01:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( tunables , disable_phone , no_idle_kick )
} tunables { } ;
2023-03-01 21:27:15 +00:00
2022-03-21 18:10:18 +01:00
struct notifications
{
struct pair
{
2023-03-01 21:27:15 +00:00
bool log = false ;
2022-03-21 18:10:18 +01:00
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
} ;
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 ;
2023-03-01 21:27:15 +00:00
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
2023-01-03 16:48:32 +00:00
pair player_leave { } ;
2022-03-21 18:10:18 +01:00
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
2023-03-01 21:27:15 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( notifications , gta_thread_kill , gta_thread_start , network_player_mgr_init , network_player_mgr_shutdown , player_join , player_leave , send_net_info_to_lobby , transaction_rate_limit , mismatch_sync_type , out_of_allowed_range_sync_type , invalid_sync )
2022-12-18 23:15:52 +01:00
} notifications { } ;
2023-01-03 16:48:32 +00:00
struct reactions
{
2023-11-05 13:00:51 +01:00
// first constructor param is an internal identifier for the event
// it's never shown in the UI
reaction bounty { " Bounty " , " REACTION_BOUNTY_NOTIFY " , " REACTION_BOUNTY_ANNOUNCE " } ;
reaction ceo_kick { " CEO Kick " , " REACTION_CEO_KICK_NOTIFY " , " REACTION_CEO_KICK_ANNOUNCE " } ;
reaction ceo_money { " CEO Money " , " REACTION_CEO_MONEY_NOTIFY " , " REACTION_CEO_MONEY_ANNOUNCE " } ;
reaction clear_wanted_level { " Clear Wanted Level " , " REACTION_CLEAR_WANTED_LEVEL_NOTIFY " , " REACTION_CLEAR_WANTED_LEVEL_ANNOUNCE " } ;
reaction crash { " Crash " , " REACTION_CRASH_NOTIFY " , " REACTION_CRASH_ANNOUNCE " } ;
reaction end_session_kick { " End Session Kick " , " REACTION_END_SESSION_KICK_NOTIFY " , " REACTION_GENERIC_KICK_ANNOUNCE " } ;
reaction fake_deposit { " Fake Deposit " , " REACTION_FAKE_DEPOSIT_NOTIFY " , " REACTION_FAKE_DEPOSIT_ANNOUNCE " } ;
reaction force_mission { " Force Mission " , " REACTION_FORCE_MISSION_NOTIFY " , " REACTION_FORCE_MISSION_ANNOUNCE " } ;
reaction force_teleport { " Force Teleport " , " REACTION_FORCE_TELEPORT_NOTIFY " , " REACTION_FORCE_TELEPORT_ANNOUNCE " } ;
reaction gta_banner { " GTA Banner " , " REACTION_GTA_BANNER_NOTIFY " , " REACTION_GTA_BANNER_ANNOUNCE " } ; // please don't enable this
reaction kick_from_interior { " Kick From Interior " , " REACTION_KICK_FROM_INTERIOR_NOTIFY " , " REACTION_KICK_FROM_INTERIOR_ANNOUNCE " } ;
reaction mc_teleport { " MC Teleport " , " REACTION_MC_TELEPORT_NOTIFY " , " REACTION_MC_TELEPORT_ANNOUNCE " } ;
reaction network_bail { " Network Bail " , " REACTION_NETWORK_BAIL_NOTIFY " , " REACTION_GENERIC_KICK_ANNOUNCE " } ;
reaction personal_vehicle_destroyed { " Personal Vehicle Destroyed " , " REACTION_PERSONAL_VEHICLE_DESTROYED_NOTIFY " , " REACTION_PERSONAL_VEHICLE_DESTROYED_ANNOUNCE " } ;
reaction remote_off_radar { " Remote Off Radar " , " REACTION_OFF_RADAR_NOTIFY " , " REACTION_OFF_RADAR_ANNOUNCE " } ;
reaction rotate_cam { " Rotate Cam " , " REACTION_ROTATE_CAM_NOTIFY " , " REACTION_ROTATE_CAM_ANNOUNCE " } ;
reaction send_to_cutscene { " Send To Cutscene " , " REACTION_SEND_TO_CUTSCENE_NOTIFY " , " REACTION_SEND_TO_CUTSCENE_ANNOUNCE " } ;
reaction send_to_location { " Send To Location " , " REACTION_SEND_TO_LOCATION_NOTIFY " , " REACTION_SEND_TO_LOCATION_ANNOUNCE " } ;
reaction send_to_interior { " Send To Interior " , " REACTION_SEND_TO_INTERIOR_NOTIFY " , " REACTION_SEND_TO_INTERIOR_ANNOUNCE " } ;
reaction sound_spam { " Sound Spam " , " REACTION_SOUND_SPAM_NOTIFY " , " REACTION_SOUND_SPAM_ANNOUNCE " } ;
reaction spectate_notification { " Spectate Notification " , " REACTION_SPECTATE_NOTIFICATION_NOTIFY " , " REACTION_SPECTATE_NOTIFICATION_ANNOUNCE " } ;
reaction give_collectible { " Give Collectible " , " REACTION_GIVE_COLLECTIBLE_NOTIFY " , " REACTION_GIVE_COLLECTIBLE_ANNOUNCE " } ;
reaction transaction_error { " Transaction Error " , " REACTION_TRANSACTION_ERROR_NOTIFY " , " REACTION_TRANSACTION_ERROR_ANNOUNCE " } ;
reaction tse_freeze { " TSE Freeze " , " REACTION_TSE_FREEZE_NOTIFY " , " REACTION_TSE_FREEZE_ANNOUNCE " } ;
reaction tse_sender_mismatch { " TSE Sender Mismatch " , " REACTION_TSE_SENDER_MISMATCH_NOTIFY " , " REACTION_TSE_SENDER_MISMATCH_ANNOUNCE " } ;
reaction vehicle_kick { " Vehicle Kick " , " REACTION_VEHICLE_KICK_NOTIFY " , " REACTION_VEHICLE_KICK_ANNOUNCE " } ;
reaction teleport_to_warehouse { " Teleport To Warehouse " , " REACTION_TELEPORT_TO_WAREHOUSE_NOTIFY " , " REACTION_TELEPORT_TO_WAREHOUSE_ANNOUNCE " } ;
reaction start_activity { " Start Activity " , " REACTION_START_ACTIVITY_NOTIFY " , " REACTION_START_ACTIVITY_ANNOUNCE " } ;
reaction start_script { " Start Script " , " REACTION_START_SCRIPT_NOTIFY " , " REACTION_START_SCRIPT_ANNOUNCE " } ;
reaction null_function_kick { " Null Function Kick " , " REACTION_NULL_FUNCTION_KICK_NOTIFY " , " REACTION_GENERIC_KICK_ANNOUNCE " } ;
reaction destroy_personal_vehicle { " Destroy Personal Vehicle " , " REACTION_DESTROY_PERSONAL_VEHICLE_NOTIFY " , " REACTION_DESTROY_PERSONAL_VEHICLE_ANNOUNCE " } ;
reaction trigger_business_raid { " Trigger Business Raid " , " REACTION_TRIGGER_BUSINESS_RAID_NOTIFY " , " REACTION_TRIGGER_BUSINESS_RAID_ANNOUNCE " } ;
reaction turn_into_beast { " Turn Into Beast " , " REACTION_TURN_INTO_BEAST_NOTIFY " , " REACTION_TURN_INTO_BEAST_RAID_ANNOUNCE " } ;
reaction remote_wanted_level { " Remote Wanted Level " , " REACTION_REMOTE_WANTED_LEVEL_NOTIFY " , " REACTION_REMOTE_WANTED_LEVEL_ANNOUNCE " } ;
interloper_reaction remote_wanted_level_others { " Remote Wanted Level On Other Players " , " REACTION_REMOTE_WANTED_LEVEL_OTHERS_NOTIFY " , " REACTION_REMOTE_WANTED_LEVEL_OTHERS_ANNOUNCE " , false , false } ;
reaction clear_ped_tasks { " Clear Ped Tasks " , " REACTION_CLEAR_PED_TASKS_NOTIFY " , " REACTION_CLEAR_PED_TASKS_ANNOUNCE " } ;
reaction remote_ragdoll { " Remote Ragdoll " , " REACTION_REMOTE_RAGDOLL_NOTIFY " , " REACTION_REMOTE_RAGDOLL_ANNOUNCE " } ;
reaction kick_vote { " Kick Vote " , " REACTION_VOTE_KICK_NOTIFY " , " REACTION_VOTE_KICK_ANNOUNCE " } ;
reaction report_cash_spawn { " Cash Spawn " , " REACTION_CASH_SPAWN_GENERIC " , " REACTION_CASH_SPAWN_GENERIC " } ;
reaction modder_detection { " Modder Detection " , " REACTION_MODDER_DETECTED_GENERIC " , " REACTION_MODDER_DETECTED_GENERIC " } ;
reaction game_anti_cheat_modder_detection { " Game Anti-Cheat Modder Detection " , " REACTION_MODDER_DETECTED_BY_ANTICHEAT_GENERIC " , " REACTION_MODDER_DETECTED_BY_ANTICHEAT_GENERIC " } ;
reaction request_control_event { " Request Control Event " , " REACTION_REQUEST_CONTROL_NOTIFY " , " REACTION_REQUEST_CONTROL_ANNOUNCE " } ;
reaction report { " Report " , " REACTION_REPORT_NOTIFY " , " REACTION_REPORT_ANNOUNCE " } ;
reaction spectate { " Spectate " , " REACTION_SPECTATING_NOTIFY " , " REACTION_SPECTATING_ANNOUNCE " } ;
interloper_reaction spectate_others { " Spectate Others " , " REACTION_SPECTATING_OTHERS_NOTIFY " , " REACTION_SPECTATING_OTHERS_ANNOUNCE " , false , false } ;
2023-03-01 21:27:15 +00:00
2023-11-04 21:54:32 +08:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( reactions , bounty , ceo_money , ceo_kick , clear_wanted_level , crash , end_session_kick , fake_deposit , force_mission , force_teleport , gta_banner , kick_from_interior , mc_teleport , network_bail , personal_vehicle_destroyed , remote_off_radar , rotate_cam , send_to_cutscene , send_to_location , sound_spam , spectate_notification , give_collectible , transaction_error , tse_freeze , tse_sender_mismatch , vehicle_kick , teleport_to_warehouse , trigger_business_raid , start_activity , start_script , null_function_kick , destroy_personal_vehicle , clear_ped_tasks , turn_into_beast , remote_wanted_level , remote_wanted_level_others , remote_ragdoll , kick_vote , report_cash_spawn , modder_detection , game_anti_cheat_modder_detection , request_control_event , report , send_to_interior , spectate , spectate_others )
2023-01-03 16:48:32 +00:00
} reactions { } ;
2023-03-01 21:27:15 +00:00
2022-12-18 23:15:52 +01:00
struct player
{
2023-11-14 20:20:26 +01:00
bool spectating = false ;
bool override_cam_distance = false ;
int cam_distance = 10 ;
2022-12-18 23:15:52 +01:00
2023-11-14 20:20:26 +01:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( player , spectating , override_cam_distance , cam_distance )
2022-12-18 23:15:52 +01:00
} player { } ;
2021-05-26 13:17:19 +02:00
2023-05-01 23:23:07 +02:00
struct player_db
{
2023-07-14 09:02:47 +00:00
bool update_player_online_states = true ;
bool notify_when_online = false ;
bool notify_when_joinable = true ;
bool notify_when_unjoinable = false ;
bool notify_when_offline = false ;
bool notify_on_session_type_change = false ;
bool notify_on_session_change = false ;
2023-07-15 20:37:20 +00:00
bool notify_on_spectator_change = false ;
bool notify_on_become_host = false ;
bool notify_on_transition_change = false ;
bool notify_on_mission_change = false ;
2023-07-14 09:02:47 +00:00
2023-07-15 20:37:20 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( player_db , update_player_online_states , notify_when_online , notify_when_joinable , notify_when_unjoinable , notify_when_offline , notify_on_session_type_change , notify_on_session_change , notify_on_spectator_change , notify_on_become_host , notify_on_transition_change , notify_on_mission_change )
2023-05-01 23:23:07 +02:00
} player_db { } ;
2023-03-01 21:27:15 +00:00
struct protections
2022-11-12 18:35:28 +00:00
{
2023-03-01 21:27:15 +00:00
struct script_events
2022-11-12 18:35:28 +00:00
{
2023-03-01 21:27:15 +00:00
bool bounty = true ;
bool ceo_money = true ;
bool clear_wanted_level = true ;
bool force_mission = true ;
bool force_teleport = true ;
bool gta_banner = false ;
bool mc_teleport = true ;
2022-02-22 01:18:49 +01:00
bool personal_vehicle_destroyed = true ;
2023-03-01 21:27:15 +00:00
bool remote_off_radar = true ;
bool rotate_cam = true ;
bool send_to_cutscene = true ;
bool send_to_location = true ;
bool sound_spam = true ;
bool spectate = true ;
bool give_collectible = true ;
bool vehicle_kick = true ;
bool teleport_to_warehouse = true ;
bool start_activity = true ;
bool send_sms = true ;
2023-08-19 11:01:08 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( script_events , bounty , ceo_money , clear_wanted_level , force_mission , force_teleport , gta_banner , mc_teleport , personal_vehicle_destroyed , remote_off_radar , rotate_cam , send_to_cutscene , send_to_location , sound_spam , spectate , give_collectible , vehicle_kick , teleport_to_warehouse , start_activity , send_sms )
2022-12-18 23:15:52 +01:00
} script_events { } ;
2023-07-23 16:47:25 +00:00
bool rid_join = false ;
bool receive_pickup = false ;
bool admin_check = true ;
bool kick_rejoin = true ;
2023-09-09 00:04:08 +02:00
bool force_relay_connections = false ;
2022-12-18 23:15:52 +01:00
2023-07-23 16:47:25 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( protections , script_events , rid_join , receive_pickup , admin_check , kick_rejoin , force_relay_connections )
2022-12-18 23:15:52 +01:00
} protections { } ;
2021-08-05 23:06:47 +02:00
2023-03-01 21:27:15 +00:00
struct self
2022-11-12 18:35:28 +00:00
{
2023-02-01 19:48:31 +01:00
struct ptfx_effects
{
2023-03-01 21:27:15 +00:00
bool show = false ;
float size = 0.2f ;
int select = 0 ;
const char * asset = " scr_agencyheist " ;
2023-02-01 19:48:31 +01:00
const char * effect = " scr_fbi_mop_drips " ;
2023-07-20 22:46:32 +02:00
2023-02-01 19:48:31 +01:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( ptfx_effects , show , size )
2023-03-01 21:27:15 +00:00
} ptfx_effects { } ;
2023-04-29 13:29:28 +02:00
struct ipls
{
int select = 0 ;
2023-07-20 22:46:32 +02:00
2023-04-29 13:29:28 +02:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( ipls , select )
} ipls { } ;
2023-08-19 11:01:08 +00:00
bool clean_player = false ;
bool force_wanted_level = false ;
2023-08-24 22:56:35 +02:00
bool passive = false ;
2023-08-19 11:01:08 +00:00
bool free_cam = false ;
bool invisibility = false ;
bool local_visibility = true ;
bool never_wanted = false ;
bool no_ragdoll = false ;
bool noclip = false ;
2023-07-23 18:56:08 +02:00
float noclip_aim_speed_multiplier = 0.25f ;
float noclip_speed_multiplier = 20.f ;
2023-08-19 11:01:08 +00:00
bool off_radar = false ;
bool ghost_org = false ;
bool super_run = false ;
bool no_collision = false ;
bool unlimited_oxygen = false ;
bool no_water_collision = false ;
int wanted_level = 0 ;
bool god_mode = false ;
bool part_water = 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_drown = false ;
bool proof_water = false ;
uint32_t proof_mask = 0 ;
bool mobile_radio = false ;
bool fast_respawn = false ;
bool auto_tp = false ;
bool super_jump = false ;
bool beast_jump = false ;
bool healthregen = false ;
float healthregenrate = 1.0f ;
bool superman = false ;
bool custom_weapon_stop = true ;
bool prompt_ambient_animations = false ;
std : : string persist_outfit = " " ;
bool persist_outfits_mis = false ;
2023-12-08 14:13:06 +01:00
bool interaction_menu_freedom = false ;
2023-08-19 11:01:08 +00:00
2023-03-13 17:10:21 -04:00
struct hud
{
2023-04-16 18:28:49 +00:00
bool color_override = false ;
bool color_override_initialized = false ;
std : : array < color , hud_colors . size ( ) > hud_color_overrides = { } ;
std : : array < color , hud_colors . size ( ) > hud_color_defaults = { } ; // don't save
2023-03-13 17:10:21 -04:00
bool hide_radar = false ;
bool hide_ammo = false ;
int selected_hud_component = 1 ;
std : : array < bool , 22 > hud_components_states = { false } ;
bool force_show_hud_element = false ;
bool force_show_hud = false ;
2023-09-17 16:23:26 -04:00
std : : atomic_uint_fast8_t typing = 0 ;
2023-03-13 17:10:21 -04:00
2023-04-16 18:28:49 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( hud , color_override , color_override_initialized , hud_color_overrides , hide_radar , hide_ammo , selected_hud_component , hud_components_states , force_show_hud_element , force_show_hud )
2023-03-13 17:10:21 -04:00
} hud { } ;
2022-12-06 16:12:02 +00:00
// do not save below entries
bool dance_mode = false ;
2022-12-18 23:15:52 +01:00
2023-11-04 00:22:43 +01:00
struct super_hero_fly
{
bool enabled = false ;
bool gradual = true ;
bool explosions = true ;
bool auto_land = false ;
bool charge = true ;
bool ptfx = true ;
float fly_speed = 15.f ;
float initial_launch = 15.f ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( super_hero_fly , gradual , explosions , auto_land , charge , ptfx , fly_speed , initial_launch )
} super_hero_fly { } ;
2023-12-08 14:13:06 +01:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( self , ipls , ptfx_effects , clean_player , force_wanted_level , passive , free_cam , invisibility , local_visibility , never_wanted , no_ragdoll , noclip , noclip_aim_speed_multiplier , noclip_speed_multiplier , off_radar , super_run , no_collision , unlimited_oxygen , no_water_collision , wanted_level , god_mode , part_water , proof_bullet , proof_fire , proof_collision , proof_melee , proof_explosion , proof_steam , proof_drown , proof_water , proof_mask , mobile_radio , fast_respawn , auto_tp , super_jump , beast_jump , healthregen , healthregenrate , hud , superman , custom_weapon_stop , prompt_ambient_animations , persist_outfit , persist_outfits_mis , interaction_menu_freedom , super_hero_fly )
2022-12-18 23:15:52 +01:00
} self { } ;
2022-01-21 23:13:10 +01:00
2022-03-19 18:15:38 -04:00
struct session
{
2023-07-18 04:42:14 -04:00
bool log_chat_messages = false ;
bool log_text_messages = false ;
bool decloak_players = false ;
bool unhide_players_from_player_list = true ;
bool force_session_host = false ;
bool force_script_host = false ;
bool player_magnet_enabled = false ;
int player_magnet_count = 32 ;
bool is_team = false ;
bool join_in_sctv_slots = false ;
bool lock_session = false ;
bool allow_friends_into_locked_session = false ;
2023-11-04 21:54:32 +08:00
bool trust_friends = false ;
bool trust_session = false ;
2023-12-07 14:04:00 -05:00
bool use_spam_timer = true ;
float spam_timer = 2.5f ;
int spam_length = 55 ;
2022-11-21 15:42:12 +00:00
2022-12-22 21:23:32 +00:00
const char chat_command_prefix = ' / ' ;
2023-03-01 21:27:15 +00:00
const char chat_output_prefix = ' > ' ;
2022-12-22 21:23:32 +00:00
2023-03-01 21:27:15 +00:00
bool chat_commands = false ;
2022-12-22 21:23:32 +00:00
CommandAccessLevel chat_command_default_access_level = CommandAccessLevel : : FRIENDLY ;
2023-03-01 21:27:15 +00:00
bool kick_chat_spammers = false ;
2022-12-06 16:12:02 +00:00
bool kick_host_when_forcing_host = false ;
bool explosion_karma = false ;
2023-03-01 21:27:15 +00:00
bool damage_karma = false ;
2022-12-06 16:12:02 +00:00
bool disable_traffic = false ;
2023-03-01 21:27:15 +00:00
bool disable_peds = false ;
bool force_thunder = false ;
2022-12-06 16:12:02 +00:00
2023-03-01 21:27:15 +00:00
bool block_ceo_money = false ;
2022-12-06 16:12:02 +00:00
bool randomize_ceo_colors = false ;
2023-03-01 21:27:15 +00:00
bool block_jobs = false ;
bool block_muggers = false ;
bool block_ceo_raids = false ;
2022-12-06 16:12:02 +00:00
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 ;
2023-03-01 21:27:15 +00:00
bool off_radar_all = false ;
2022-11-21 15:42:12 +00:00
bool semi_godmode_all = false ;
2022-12-06 16:12:02 +00:00
bool wanted_level_all = false ;
2023-08-19 11:01:08 +00:00
bool vehicle_fix_all = false ;
2022-03-19 18:15:38 -04:00
2022-12-31 00:47:01 +00:00
bool show_cheating_message = false ;
2023-03-01 21:27:15 +00:00
bool anonymous_bounty = true ;
2023-07-05 07:30:06 +00:00
bool fast_join = false ;
2023-12-07 14:04:00 -05:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( session , log_chat_messages , log_text_messages , decloak_players , force_session_host , force_script_host , player_magnet_enabled , player_magnet_count , is_team , join_in_sctv_slots , kick_chat_spammers , kick_host_when_forcing_host , explosion_karma , damage_karma , disable_traffic , disable_peds , force_thunder , block_ceo_money , randomize_ceo_colors , block_jobs , block_muggers , block_ceo_raids , send_to_apartment_idx , send_to_warehouse_idx , chat_commands , chat_command_default_access_level , show_cheating_message , anonymous_bounty , lock_session , fast_join , unhide_players_from_player_list , allow_friends_into_locked_session , trust_friends , use_spam_timer , spam_timer , spam_length )
2022-12-18 23:15:52 +01:00
} session { } ;
struct settings
{
2023-07-14 17:31:03 -04:00
bool dev_dlc = false ;
2022-02-22 01:18:49 +01:00
struct hotkeys
{
2023-12-05 11:35:05 +01:00
bool editing_menu_toggle = false ;
2023-09-20 10:27:39 -04:00
std : : atomic < bool > is_mp_chat_active ;
2023-04-06 13:55:28 -04:00
int menu_toggle = VK_INSERT ;
int teleport_waypoint = 0 ;
int teleport_objective = 0 ;
2023-07-12 12:55:53 -04:00
int teleport_pv = 0 ;
2023-07-19 18:08:29 -04:00
int teleport_selected = 0 ;
2023-04-06 13:55:28 -04:00
int noclip = 0 ;
2023-07-12 12:55:53 -04:00
int vehicle_flymode = 0 ;
2023-04-06 13:55:28 -04:00
int bringvehicle = 0 ;
int invis = 0 ;
int heal = 0 ;
int fill_inventory = 0 ;
int skip_cutscene = 0 ;
int freecam = 0 ;
int superrun = 0 ;
2023-08-24 22:56:35 +02:00
int passive = 0 ;
2023-04-06 13:55:28 -04:00
int superjump = 0 ;
int beastjump = 0 ;
int invisveh = 0 ;
int localinvisveh = 0 ;
int fill_ammo = 0 ;
int fast_quit = 0 ;
2023-07-12 12:55:53 -04:00
int cmd_excecutor = ' U ' ;
2023-04-06 13:55:28 -04:00
int repairpv = 0 ;
2023-04-05 19:54:29 +02:00
int open_vehicle_controller = 0 ;
2023-06-27 14:05:44 +02:00
int clear_wanted = 0 ;
int random_ped_components = 0 ;
2023-03-26 13:45:46 -04:00
2023-08-24 22:56:35 +02:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( hotkeys , editing_menu_toggle , menu_toggle , teleport_waypoint , teleport_objective , teleport_selected , teleport_pv , noclip , vehicle_flymode , bringvehicle , invis , heal , fill_inventory , skip_cutscene , freecam , superrun , passive , superjump , beastjump , invisveh , localinvisveh , fill_ammo , fast_quit , cmd_excecutor , repairpv , open_vehicle_controller , clear_wanted , random_ped_components )
2022-12-18 23:15:52 +01:00
} hotkeys { } ;
2021-07-26 00:38:03 +02:00
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 ;
2023-03-01 21:27:15 +00:00
bool spawn_inside = false ;
bool spawn_maxed = false ;
std : : string plate = " " ;
2023-08-31 09:43:55 -04:00
int spawn_type = 0 ;
2022-12-18 23:15:52 +01:00
2023-08-31 09:43:55 -04:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( spawn_vehicle , preview_vehicle , spawn_inside , spawn_maxed , plate , spawn_type )
2022-12-18 23:15:52 +01:00
} spawn_vehicle { } ;
2022-07-10 06:33:14 +08:00
struct clone_pv
{
bool preview_vehicle = false ;
2023-03-01 21:27:15 +00:00
bool spawn_inside = false ;
bool spawn_clone = false ;
bool spawn_maxed = false ;
bool clone_plate = false ;
std : : string plate = " " ;
2023-09-22 17:16:33 -04:00
std : : string garage = " " ;
2022-12-18 23:15:52 +01:00
2023-09-22 17:16:33 -04:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( clone_pv , preview_vehicle , spawn_inside , spawn_clone , spawn_maxed , clone_plate , plate , garage )
2022-12-18 23:15:52 +01:00
} clone_pv { } ;
2023-03-01 21:27:15 +00:00
2023-08-31 09:43:55 -04:00
struct persist_car
{
bool preview_vehicle = false ;
bool spawn_inside = false ;
std : : string persist_vehicle_sub_folder = " " ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( persist_car , preview_vehicle , spawn_inside , persist_vehicle_sub_folder )
} persist_car { } ;
2023-01-15 16:39:57 -05:00
struct world
2022-12-18 23:15:52 +01:00
{
2023-03-30 00:37:10 +02:00
struct orbital_drone
{
2023-04-04 00:07:15 +02:00
bool enabled = false ;
2023-03-30 00:37:10 +02:00
bool detect_player = false ;
float nav_ovverride_fast = 3.f ;
float nav_ovverride_slow = 0.25f ;
2023-07-20 22:46:32 +02:00
2023-03-30 00:37:10 +02:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( orbital_drone , detect_player , nav_ovverride_fast , nav_ovverride_slow ) ;
} orbital_drone { } ;
2023-01-15 16:39:57 -05:00
struct train
{
2023-03-01 21:27:15 +00:00
bool drive_train = false ;
2023-06-06 07:40:40 +00:00
bool derail_train = false ;
2023-01-15 16:39:57 -05:00
} train { } ;
2022-12-18 23:15:52 +01:00
2023-01-15 16:39:57 -05:00
struct water
{
bool part_water = false ;
2023-07-20 22:46:32 +02:00
2023-01-15 16:39:57 -05:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( water , part_water )
} water { } ;
2022-03-14 23:31:30 +01:00
2023-11-08 23:16:10 +01:00
struct gravity
{
bool modify_gravity = false ;
float current_gravity = 9.8f ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( gravity , modify_gravity , current_gravity )
} gravity { } ;
2023-11-05 22:39:53 +01:00
struct ocean
{
2023-12-05 11:35:05 +01:00
bool modify_ocean = false ;
bool disable_ocean = false ;
int ocean_opacity = 100 ;
2023-11-05 22:39:53 +01:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( ocean , modify_ocean , disable_ocean , ocean_opacity )
} ocean { } ;
2023-11-08 23:16:10 +01:00
struct waypoint_n_objective
{
bool waypoint_beacon = false ;
bool objective_beacon = false ;
float waypoint_beacon_color [ 3 ] = { 1 , 0 , 1 } ;
float objective_beacon_color [ 3 ] = { 1 , 1 , 0 } ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( waypoint_n_objective , waypoint_beacon , objective_beacon , objective_beacon_color , waypoint_beacon_color )
} waypoint_n_objective { } ;
2023-01-15 16:39:57 -05:00
struct spawn_ped
{
2023-03-01 21:27:15 +00:00
bool preview_ped = false ;
bool spawn_invincible = false ;
bool spawn_invisible = false ;
2023-01-22 21:57:32 +00:00
bool spawn_as_attacker = false ;
2023-01-15 16:39:57 -05:00
2023-01-22 21:57:32 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( spawn_ped , preview_ped , spawn_invincible , spawn_invisible , spawn_as_attacker )
2023-01-15 16:39:57 -05:00
} spawn_ped { } ;
struct custom_time
{
2023-06-06 07:40:40 +00:00
bool override_time = { } ;
2023-01-15 16:39:57 -05:00
int hour { } , minute { } , second { } ;
2023-06-06 07:40:40 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( custom_time , override_time , hour , minute , second )
2023-01-15 16:39:57 -05:00
} custom_time ;
2023-02-08 22:50:26 +01:00
struct blackhole
{
2023-03-01 21:27:15 +00:00
bool enable = false ;
bool include_peds = false ;
2023-02-08 22:50:26 +01:00
bool include_vehicles = false ;
2023-03-01 21:27:15 +00:00
float scale = 6.f ;
float color [ 3 ] = { 1 , 1 , 1 } ;
int alpha = 150 ;
2023-02-08 22:50:26 +01:00
rage : : fvector3 pos ;
2023-03-13 17:10:21 -04:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( blackhole , include_peds , include_vehicles , color , alpha )
2023-02-08 22:50:26 +01:00
} blackhole { } ;
Feature Additions, GUI Tweaks, Fixes (#975)
* Added view nearby to view header, moved get_entities function to entities and refactored some code. Also implemented a sphere scale to the blackhole as it can get big
* added delete and kill nearby peds and updated ped header
* added some nearby ped looped commands, and some changes to extend the buttons
* add vehicle options to nearby
* add most ciritcal feature kill enemies
* changes to ignore peds based off of some of maybegreat's suggestions, same with ped_rain, removed loose comment. Updated vehicle.hpp, changed size of vehicle buttons and inlined kill enemies
* fixed a problem where the vehicle options crashed + added color
* updated colors and added on disable for ped_rush
* finished and added vehicle rain feature
* added aimbot and triggerbot, added templating to buttons
* update vehicle rain desc
* added vdistance check, player check, police check, enemy check. Added even more commenting... sue me. 3 toggles added for the checks and slider for dist. Will tweak more later
* switched to goto statements instead of continue, should be done now
* removed delete nearby vehicles
* there was no check in get_entities for our local vehicle
2023-02-25 13:33:16 -07:00
struct nearby
{
2023-03-01 21:27:15 +00:00
bool ignore = false ;
bool ped_rain = false ;
bool veh_rain = false ;
Feature Additions, GUI Tweaks, Fixes (#975)
* Added view nearby to view header, moved get_entities function to entities and refactored some code. Also implemented a sphere scale to the blackhole as it can get big
* added delete and kill nearby peds and updated ped header
* added some nearby ped looped commands, and some changes to extend the buttons
* add vehicle options to nearby
* add most ciritcal feature kill enemies
* changes to ignore peds based off of some of maybegreat's suggestions, same with ped_rain, removed loose comment. Updated vehicle.hpp, changed size of vehicle buttons and inlined kill enemies
* fixed a problem where the vehicle options crashed + added color
* updated colors and added on disable for ped_rush
* finished and added vehicle rain feature
* added aimbot and triggerbot, added templating to buttons
* update vehicle rain desc
* added vdistance check, player check, police check, enemy check. Added even more commenting... sue me. 3 toggles added for the checks and slider for dist. Will tweak more later
* switched to goto statements instead of continue, should be done now
* removed delete nearby vehicles
* there was no check in get_entities for our local vehicle
2023-02-25 13:33:16 -07:00
bool high_alert = false ;
2023-03-01 21:27:15 +00:00
bool ped_rush = false ;
2023-03-12 13:38:27 -04:00
bool combative = false ;
Feature Additions, GUI Tweaks, Fixes (#975)
* Added view nearby to view header, moved get_entities function to entities and refactored some code. Also implemented a sphere scale to the blackhole as it can get big
* added delete and kill nearby peds and updated ped header
* added some nearby ped looped commands, and some changes to extend the buttons
* add vehicle options to nearby
* add most ciritcal feature kill enemies
* changes to ignore peds based off of some of maybegreat's suggestions, same with ped_rain, removed loose comment. Updated vehicle.hpp, changed size of vehicle buttons and inlined kill enemies
* fixed a problem where the vehicle options crashed + added color
* updated colors and added on disable for ped_rush
* finished and added vehicle rain feature
* added aimbot and triggerbot, added templating to buttons
* update vehicle rain desc
* added vdistance check, player check, police check, enemy check. Added even more commenting... sue me. 3 toggles added for the checks and slider for dist. Will tweak more later
* switched to goto statements instead of continue, should be done now
* removed delete nearby vehicles
* there was no check in get_entities for our local vehicle
2023-02-25 13:33:16 -07:00
2023-06-17 18:39:16 +02:00
struct auto_disarm
{
bool enable = false ;
bool neutralize = false ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( auto_disarm , enable , neutralize )
} auto_disarm { } ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( nearby , ignore , ped_rain , veh_rain , high_alert , ped_rush , combative , auto_disarm )
Feature Additions, GUI Tweaks, Fixes (#975)
* Added view nearby to view header, moved get_entities function to entities and refactored some code. Also implemented a sphere scale to the blackhole as it can get big
* added delete and kill nearby peds and updated ped header
* added some nearby ped looped commands, and some changes to extend the buttons
* add vehicle options to nearby
* add most ciritcal feature kill enemies
* changes to ignore peds based off of some of maybegreat's suggestions, same with ped_rain, removed loose comment. Updated vehicle.hpp, changed size of vehicle buttons and inlined kill enemies
* fixed a problem where the vehicle options crashed + added color
* updated colors and added on disable for ped_rush
* finished and added vehicle rain feature
* added aimbot and triggerbot, added templating to buttons
* update vehicle rain desc
* added vdistance check, player check, police check, enemy check. Added even more commenting... sue me. 3 toggles added for the checks and slider for dist. Will tweak more later
* switched to goto statements instead of continue, should be done now
* removed delete nearby vehicles
* there was no check in get_entities for our local vehicle
2023-02-25 13:33:16 -07:00
} nearby { } ;
2023-02-21 06:20:40 +08:00
struct model_swapper
{
std : : vector < std : : pair < std : : string , std : : string > > models ;
std : : mutex m ;
bool update = false ;
2023-07-20 22:46:32 +02:00
2023-02-21 06:20:40 +08:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( model_swapper , models )
} model_swapper { } ;
2023-06-06 07:40:40 +00:00
bool override_weather = false ;
int local_weather = 0 ;
2023-11-08 23:16:10 +01:00
bool blackout = false ;
bool ground_snow = false ;
2023-08-19 11:01:08 +00:00
2023-11-08 23:16:10 +01:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( world , water , spawn_ped , custom_time , blackhole , model_swapper , nearby , orbital_drone , local_weather , override_weather , blackout , ground_snow )
2023-01-15 16:39:57 -05:00
} world { } ;
2023-01-06 23:25:16 +00:00
2022-02-22 01:18:49 +01:00
struct spoofing
2022-01-18 02:38:51 +01:00
{
2023-02-13 20:38:30 +00:00
bool hide_from_player_list = false ;
2023-03-01 21:27:15 +00:00
bool spoof_blip = false ;
2023-03-09 12:23:01 +00:00
int blip_type = 0 ; // actual blip type + 1
2023-03-01 21:27:15 +00:00
bool spoof_rank = false ;
int rank = 1 ;
bool spoof_job_points = false ;
int job_points = 1 ;
bool spoof_kd_ratio = false ;
float kd_ratio = 2.0f ;
bool spoof_bad_sport = false ;
int badsport_type = 0 ;
2023-08-19 11:01:08 +00:00
bool spoof_player_model = false ;
std : : string player_model = " " ;
std : : string player_outfit = " " ;
2023-03-01 21:27:15 +00:00
2022-10-06 13:30:04 +02:00
bool spoof_cheater = false ;
2023-03-01 21:27:15 +00:00
bool spoof_hide_god = true ;
2022-11-12 18:35:28 +00:00
bool spoof_hide_spectate = true ;
2022-10-29 05:54:32 -04:00
2022-10-06 13:30:04 +02:00
bool spoof_crew_data = false ;
std : : string crew_tag = " " ;
2023-03-01 21:27:15 +00:00
bool rockstar_crew = false ;
2022-10-06 13:30:04 +02:00
bool square_crew_tag = false ;
2022-12-06 16:12:02 +00:00
2023-06-23 06:43:44 +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 ;
bool spoof_session_bad_sport_status = false ;
bool session_bad_sport = false ;
2022-12-08 12:23:57 +00:00
2023-03-09 12:23:01 +00:00
bool voice_chat_audio = false ;
2023-07-22 21:18:47 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( spoofing , hide_from_player_list , spoof_blip , blip_type , spoof_rank , rank , spoof_job_points , job_points , spoof_kd_ratio , kd_ratio , spoof_bad_sport , badsport_type , spoof_player_model , player_model , spoof_cheater , spoof_hide_god , spoof_hide_spectate , 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 , spoof_session_bad_sport_status , session_bad_sport , voice_chat_audio )
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
2023-04-16 18:28:49 +00:00
bool enabled = false ;
bool left_side = false ;
2023-04-15 16:47:36 +02:00
bool show_current_gear = true ;
2022-12-18 23:15:52 +01:00
2023-04-15 16:47:36 +02:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( speedo_meter , x , y , enabled , left_side , show_current_gear )
2022-12-18 23:15:52 +01:00
} speedo_meter { } ;
2021-08-03 20:29:54 +02:00
2022-05-16 02:22:11 -04:00
struct fly
{
2023-03-01 21:27:15 +00:00
bool dont_stop = false ;
bool enabled = false ;
2022-05-16 02:22:11 -04:00
bool no_collision = false ;
bool stop_on_exit = false ;
2023-03-01 21:27:15 +00:00
float speed = 100 ;
2022-05-16 02:22:11 -04:00
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 ;
2023-03-01 21:27:15 +00:00
bool neon = false ;
bool primary = false ;
bool secondary = false ;
bool smoke = false ;
2023-06-06 07:40:40 +00:00
int speed = 1 ;
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 ;
2023-03-01 21:27:15 +00:00
bool god_mode = false ;
bool proof_bullet = false ;
bool proof_fire = false ;
2022-07-12 22:42:07 +08:00
bool proof_collision = false ;
2023-03-01 21:27:15 +00:00
bool proof_melee = false ;
2022-07-12 22:42:07 +08:00
bool proof_explosion = false ;
2023-03-01 21:27:15 +00:00
bool proof_steam = false ;
bool proof_water = false ;
uint32_t proof_mask = 0 ;
2022-07-12 22:42:07 +08:00
2022-07-31 00:53:08 +08:00
AutoDriveDestination auto_drive_destination = AutoDriveDestination : : STOPPED ;
2023-03-09 12:23:01 +00:00
AutoDriveStyle auto_drive_style = AutoDriveStyle : : LAW_ABIDING ;
float auto_drive_speed = 1 ;
bool auto_turn_signals = false ;
eBoostBehaviors boost_behavior = eBoostBehaviors : : DEFAULT ;
bool drive_on_water = false ;
bool horn_boost = false ;
bool instant_brake = false ;
bool block_homing = true ;
bool ls_customs = false ; // don't save this to disk
bool seatbelt = false ;
bool turn_signals = false ;
bool vehicle_jump = false ;
bool keep_vehicle_repaired = false ;
bool no_water_collision = false ;
bool disable_engine_auto_start = false ;
bool change_engine_state_immediately = false ;
2023-06-16 14:27:47 +02:00
bool keep_engine_running = false ;
2023-07-15 22:58:09 +02:00
bool keep_vehicle_clean = false ;
2023-03-09 12:23:01 +00:00
bool vehinvisibility = false ;
bool localveh_visibility = false ;
bool keep_on_ground = false ;
bool no_collision = false ;
bool unlimited_weapons = false ;
2023-06-06 01:02:49 +05:30
bool siren_mute = false ;
2023-08-24 14:23:50 -04:00
bool all_vehs_in_heists = false ;
2023-03-09 12:23:01 +00:00
2023-12-05 11:35:05 +01:00
struct abilities
{
bool enabled = false ;
bool jump = false ;
bool rocket = false ;
bool parachute = false ;
bool ramp = false ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( abilities , enabled )
} abilities { } ;
2023-09-14 23:19:32 +08:00
struct vehicle_ammo_special
{
bool enabled = false ;
eAmmoSpecialType type = eAmmoSpecialType : : None ;
eExplosionTag explosion_tag = eExplosionTag : : EXP_TAG_ROGUE_CANNON ;
float speed = 2000 ;
float time_between_shots = 0.04 ;
float alternate_wait_time = - 1 ;
float weapon_range = 250 ;
float rocket_time_between_shots = 0.66 ;
float rocket_alternate_wait_time = 0.66 ;
float rocket_lock_on_range = 500 ;
float rocket_range = 1000 ;
float rocket_reload_time = - 1 ;
eExplosionTag rocket_explosion_tag = eExplosionTag : : TANKSHELL ;
float rocket_lifetime = 15 ;
float rocket_launch_speed = 1200 ;
float rocket_time_before_homing = 0.75 ;
bool rocket_improve_tracking = true ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( vehicle_ammo_special , enabled , type , explosion_tag , speed , time_between_shots , alternate_wait_time , weapon_range , rocket_time_between_shots , rocket_alternate_wait_time , rocket_lock_on_range , rocket_range , rocket_reload_time , rocket_explosion_tag , rocket_lifetime , rocket_launch_speed , rocket_time_before_homing , rocket_improve_tracking )
} vehicle_ammo_special { } ;
2023-12-05 11:35:05 +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 , drive_on_water , horn_boost , instant_brake , block_homing , seatbelt , turn_signals , vehicle_jump , keep_vehicle_repaired , no_water_collision , disable_engine_auto_start , change_engine_state_immediately , keep_engine_running , keep_vehicle_clean , vehinvisibility , localveh_visibility , keep_on_ground , no_collision , unlimited_weapons , siren_mute , all_vehs_in_heists , abilities , vehicle_ammo_special )
2022-12-18 23:15:52 +01:00
} vehicle { } ;
struct weapons
{
2022-03-16 19:16:52 +01:00
struct ammo_special
{
2023-03-01 21:27:15 +00:00
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
2023-03-01 21:27:15 +00: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 " } ,
} )
2022-12-18 23:15:52 +01:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( ammo_special , toggle , type , explosion_tag )
} ammo_special { } ;
2022-03-16 19:16:52 +01:00
2023-01-16 22:16:06 +01:00
struct gravity_gun
{
bool launch_on_release = false ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( gravity_gun , launch_on_release )
2023-07-14 17:31:03 -04:00
} gravity_gun { } ;
struct paintgun
{
2023-07-18 04:42:14 -04:00
bool rainbow = false ;
2023-07-23 12:51:57 -04:00
float speed = 1.f ;
2023-07-18 04:42:14 -04:00
float col [ 4 ] = { 0.f , 0.f , 1.f , 1.f } ;
2023-07-14 17:31:03 -04:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( paintgun , rainbow , col )
} paintgun { } ;
2023-01-16 22:16:06 +01:00
Feature Additions, GUI Tweaks, Fixes (#975)
* Added view nearby to view header, moved get_entities function to entities and refactored some code. Also implemented a sphere scale to the blackhole as it can get big
* added delete and kill nearby peds and updated ped header
* added some nearby ped looped commands, and some changes to extend the buttons
* add vehicle options to nearby
* add most ciritcal feature kill enemies
* changes to ignore peds based off of some of maybegreat's suggestions, same with ped_rain, removed loose comment. Updated vehicle.hpp, changed size of vehicle buttons and inlined kill enemies
* fixed a problem where the vehicle options crashed + added color
* updated colors and added on disable for ped_rush
* finished and added vehicle rain feature
* added aimbot and triggerbot, added templating to buttons
* update vehicle rain desc
* added vdistance check, player check, police check, enemy check. Added even more commenting... sue me. 3 toggles added for the checks and slider for dist. Will tweak more later
* switched to goto statements instead of continue, should be done now
* removed delete nearby vehicles
* there was no check in get_entities for our local vehicle
2023-02-25 13:33:16 -07:00
struct aimbot
{
2023-07-22 21:18:47 +00:00
bool enable = false ;
bool smoothing = true ;
float smoothing_speed = 2.f ;
bool on_player = true ;
bool on_enemy = false ;
bool on_police = false ;
bool on_npc = false ;
float fov = 90.f ;
float distance = 200.f ;
2023-07-20 22:46:32 +02:00
uint32_t selected_bone = 0x796E ; // Default to head
2023-04-01 15:46:41 +02:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( aimbot , enable , smoothing , smoothing_speed , fov , distance , selected_bone )
Feature Additions, GUI Tweaks, Fixes (#975)
* Added view nearby to view header, moved get_entities function to entities and refactored some code. Also implemented a sphere scale to the blackhole as it can get big
* added delete and kill nearby peds and updated ped header
* added some nearby ped looped commands, and some changes to extend the buttons
* add vehicle options to nearby
* add most ciritcal feature kill enemies
* changes to ignore peds based off of some of maybegreat's suggestions, same with ped_rain, removed loose comment. Updated vehicle.hpp, changed size of vehicle buttons and inlined kill enemies
* fixed a problem where the vehicle options crashed + added color
* updated colors and added on disable for ped_rush
* finished and added vehicle rain feature
* added aimbot and triggerbot, added templating to buttons
* update vehicle rain desc
* added vdistance check, player check, police check, enemy check. Added even more commenting... sue me. 3 toggles added for the checks and slider for dist. Will tweak more later
* switched to goto statements instead of continue, should be done now
* removed delete nearby vehicles
* there was no check in get_entities for our local vehicle
2023-02-25 13:33:16 -07:00
} aimbot { } ;
2023-03-01 21:27:15 +00:00
CustomWeapon custom_weapon = CustomWeapon : : NONE ;
bool infinite_ammo = false ;
2023-07-05 17:29:07 -04:00
bool always_full_ammo = false ;
2023-03-01 21:27:15 +00:00
bool infinite_mag = false ;
float increased_damage = 1 ;
2023-03-13 17:10:21 -04:00
bool increase_damage = false ;
2023-12-08 14:13:06 +01:00
float set_explosion_radius = 1.f ;
bool modify_explosion_radius = false ;
2023-03-01 21:27:15 +00:00
bool no_recoil = false ;
bool no_spread = false ;
2022-12-18 23:15:52 +01:00
std : : string vehicle_gun_model = " bus " ;
2023-03-01 21:27:15 +00:00
bool increased_c4_limit = false ;
bool increased_flare_limit = false ;
bool rapid_fire = false ;
bool interior_weapon = false ;
bool triggerbot = false ;
2023-03-13 17:10:21 -04:00
bool infinite_range = false ;
2023-07-11 17:14:35 -04:00
bool enable_weapon_hotkeys = false ;
2023-07-20 22:46:32 +02:00
std : : map < int , std : : vector < uint32_t > > weapon_hotkeys { } ;
2023-03-01 21:27:15 +00:00
2023-12-08 14:13:06 +01:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( weapons , ammo_special , custom_weapon , aimbot , infinite_ammo , always_full_ammo , infinite_mag , increased_damage , increase_damage , set_explosion_radius , modify_explosion_radius , no_recoil , no_spread , vehicle_gun_model , increased_c4_limit , increased_flare_limit , rapid_fire , gravity_gun , paintgun , interior_weapon , triggerbot , infinite_range , enable_weapon_hotkeys , weapon_hotkeys )
2022-12-18 23:15:52 +01:00
} weapons { } ;
2021-08-03 20:29:54 +02:00
2022-10-21 23:47:50 +02:00
struct window
{
2023-06-27 14:05:44 +02:00
ImU32 background_color = 3696311571 ;
2023-06-23 06:43:44 +00:00
ImU32 text_color = 4294967295 ;
2023-06-27 14:05:44 +02:00
ImU32 button_color = 2947901213 ;
ImU32 frame_color = 2942518340 ;
2023-06-23 06:43:44 +00:00
float gui_scale = 1.f ;
2022-05-04 19:16:40 +02:00
2023-03-01 21:27:15 +00:00
ImFont * font_title = nullptr ;
2022-02-28 23:04:56 +01:00
ImFont * font_sub_title = nullptr ;
2023-03-01 21:27:15 +00:00
ImFont * font_small = nullptr ;
ImFont * font_icon = nullptr ;
2022-02-28 23:04:56 +01:00
2023-06-27 14:05:44 +02:00
bool demo = false ;
2022-02-28 23:04:56 +01:00
bool switched_view = true ;
2022-12-18 23:15:52 +01:00
2023-01-31 00:21:29 +01:00
struct ingame_overlay
{
2023-03-01 21:27:15 +00:00
bool opened = true ;
2023-01-31 00:21:29 +01:00
bool show_with_menu_opened = false ;
2023-03-01 21:27:15 +00:00
bool show_fps = true ;
2023-07-03 14:20:27 +02:00
bool show_indicators = true ;
2023-03-01 21:27:15 +00:00
bool show_players = true ;
bool show_time = true ;
2023-01-31 00:21:29 +01:00
bool show_replay_interface = true ;
2023-06-23 06:43:44 +00:00
bool show_position = false ;
2023-03-01 21:27:15 +00:00
bool show_game_versions = true ;
2023-01-31 00:21:29 +01:00
2023-07-03 14:20:27 +02:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( ingame_overlay , opened , show_with_menu_opened , show_fps , show_indicators , show_players , show_time , show_replay_interface , show_position , show_game_versions )
2023-01-31 00:21:29 +01:00
} ingame_overlay { } ;
2023-07-03 14:20:27 +02:00
struct ingame_overlay_indicators
{
2023-07-05 17:29:07 -04:00
bool show_player_godmode = true ;
bool show_off_radar = true ;
bool show_vehicle_godmode = true ;
bool show_never_wanted = true ;
bool show_infinite_ammo = false ;
bool show_always_full_ammo = false ;
bool show_infinite_mag = false ;
bool show_aimbot = false ;
bool show_triggerbot = false ;
2023-07-07 05:57:38 +00:00
bool show_invisibility = false ;
2023-07-05 17:29:07 -04:00
2023-07-05 23:51:19 +02:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( ingame_overlay_indicators , show_player_godmode , show_off_radar , show_vehicle_godmode , show_never_wanted , show_always_full_ammo , show_infinite_ammo , show_infinite_mag , show_aimbot , show_triggerbot , show_invisibility )
2023-07-03 14:20:27 +02:00
} ingame_overlay_indicators { } ;
2023-04-05 19:54:29 +02:00
struct vehicle_control
{
2023-04-06 13:55:28 -04:00
bool opened = false ;
bool operation_animation = true ;
bool render_distance_on_veh = false ;
2023-11-04 00:22:07 +01:00
bool show_info = false ;
2023-04-05 19:54:29 +02:00
2023-11-04 00:22:07 +01:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( vehicle_control , operation_animation , render_distance_on_veh , show_info )
2023-04-05 19:54:29 +02:00
} vehicle_control { } ;
2023-07-05 23:51:19 +02:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( window , background_color , demo , text_color , button_color , frame_color , gui_scale , switched_view , ingame_overlay , vehicle_control , ingame_overlay_indicators )
2022-12-18 23:15:52 +01:00
} 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
2023-03-01 21:27:15 +00: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 ) ;
2022-06-29 23:27:44 +02:00
ImU32 selected_option_color = 4278255360 ;
bool bounding_box_enabled = true ;
2023-03-01 21:27:15 +00:00
ImU32 bounding_box_color = 4278255360 ;
2022-12-18 23:15:52 +01:00
2023-03-01 21:27:15 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( context_menu , enabled , allowed_entity_types , selected_option_color , bounding_box_enabled , bounding_box_color )
2022-12-18 23:15:52 +01:00
} context_menu { } ;
2022-06-02 12:36:16 +02:00
2022-03-09 00:03:14 +01:00
struct esp
{
2023-03-01 21:27:15 +00:00
bool enabled = 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 } ;
bool tracer = true ;
float tracer_draw_position [ 2 ] = { 0.5f , 1.f } ;
bool box = true ;
bool health = true ;
bool armor = true ;
bool god = true ;
bool distance = true ;
bool name = true ;
2022-05-11 18:00:54 +08:00
bool change_esp_color_from_dist = false ;
2023-03-01 21:27:15 +00:00
bool scale_health_from_dist = false ;
bool scale_armor_from_dist = false ;
2023-12-02 05:48:28 -05:00
bool object_esp = false ;
bool show_gs_cache_boxes = false ;
2023-03-01 21:27:15 +00:00
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 ;
2023-12-02 05:48:28 -05:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( esp , enabled , 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 , object_esp , show_gs_cache_boxes , distance_threshold , enemy_color , enemy_near_color , default_color , friend_color )
2022-12-18 23:15:52 +01:00
} 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 ;
2023-03-01 21:27:15 +00:00
int region_filter = 0 ;
2022-11-24 21:49:05 +00:00
bool language_filter_enabled = false ;
2023-03-01 21:27:15 +00:00
int language_filter = 0 ;
2022-11-24 21:49:05 +00:00
2022-12-31 00:47:01 +00:00
bool pool_filter_enabled = false ;
2023-03-01 21:27:15 +00:00
int pool_filter = 0 ;
2022-12-31 00:47:01 +00:00
2022-11-24 21:49:05 +00:00
bool player_count_filter_enabled = false ;
2023-03-01 21:27:15 +00:00
int player_count_filter_minimum = 0 ;
int player_count_filter_maximum = 32 ;
2022-11-24 21:49:05 +00:00
2023-03-01 21:27:15 +00:00
int sort_method = 0 ;
2022-11-24 21:49:05 +00:00
int sort_direction = 0 ;
bool replace_game_matchmaking = false ;
2022-12-06 16:12:02 +00:00
2023-03-01 21:27:15 +00: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 , pool_filter_enabled , pool_filter )
2022-12-18 23:15:52 +01:00
} 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 { } ;
2023-01-23 05:57:55 +08:00
struct stat_editor
{
struct stat
{
2023-03-01 21:27:15 +00:00
int radio_button_index = 0 ;
std : : string int_text = " " ;
std : : string int_value = " " ;
bool int_read = false ;
std : : string bool_text = " " ;
std : : string bool_value = " " ;
bool bool_read = false ;
std : : string float_text = " " ;
std : : string float_value = " " ;
bool float_read = false ;
std : : string increment_text = " " ;
2023-01-23 05:57:55 +08:00
std : : string increment_value = " " ;
2023-03-01 21:27:15 +00:00
bool increment_loop_write = false ;
std : : string date_text = " " ;
std : : string date_value = " " ;
bool date_read = false ;
std : : string string_text = " " ;
std : : string string_value = " " ;
bool string_read = false ;
std : : string label_text = " " ;
std : : string label_value = " " ;
std : : string user_id_text = " " ;
std : : string user_id_value = " " ;
bool user_id_read = false ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( stat , radio_button_index , int_text , int_value , int_read , bool_text , bool_value , bool_read , float_text , float_value , float_read , increment_text , increment_value , increment_loop_write , date_text , date_value , date_read , string_text , string_value , string_read , label_text , label_value , user_id_text , user_id_value , user_id_read )
2023-01-23 05:57:55 +08:00
} stat { } ;
struct packed_stat
{
int radio_button_index = 0 ;
2023-03-01 21:27:15 +00:00
std : : string int_text = " " ;
2023-01-23 05:57:55 +08:00
std : : string int_value = " " ;
2023-03-01 21:27:15 +00:00
bool int_read = false ;
2023-01-23 05:57:55 +08:00
2023-03-01 21:27:15 +00:00
std : : string bool_text = " " ;
2023-01-23 05:57:55 +08:00
std : : string bool_value = " " ;
2023-03-01 21:27:15 +00:00
bool bool_read = false ;
2023-01-23 05:57:55 +08:00
2023-03-01 21:27:15 +00:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( packed_stat , radio_button_index , int_text , int_value , int_read , bool_text , bool_value , bool_read )
2023-01-23 05:57:55 +08:00
} packed_stat { } ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( stat_editor , stat , packed_stat )
} stat_editor { } ;
2023-07-02 22:32:46 +02:00
struct lua
{
bool enable_auto_reload_changed_scripts = false ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( lua , enable_auto_reload_changed_scripts )
} lua { } ;
2023-07-09 17:01:42 -04:00
struct persist_weapons
{
bool enabled = false ;
std : : string weapon_loadout_file ;
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( persist_weapons , enabled , weapon_loadout_file )
} persist_weapons { } ;
2023-07-20 22:46:32 +02:00
struct vfx
{
bool enable_custom_sky_color = false ;
float azimuth_east [ 4 ] = { 1 , 0 , 0 , 0 } ;
float azimuth_west [ 4 ] = { 1 , 0 , 0 , 0 } ;
float azimuth_transition [ 4 ] = { 1 , 0 , 0 , 0 } ;
float zenith [ 4 ] = { 1 , 0 , 0 , 0 } ;
float stars_intensity = 1 ;
2023-07-29 00:16:50 +02:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( vfx , enable_custom_sky_color , azimuth_east , azimuth_west , azimuth_transition , zenith , stars_intensity )
2023-07-20 22:46:32 +02:00
} vfx { } ;
2023-07-22 21:18:47 +00:00
2023-08-31 09:43:55 -04:00
NLOHMANN_DEFINE_TYPE_INTRUSIVE ( menu_settings , debug , tunables , notifications , player , player_db , protections , self , session , settings , spawn_vehicle , clone_pv , persist_car , spoofing , vehicle , weapons , window , context_menu , esp , session_browser , ugc , reactions , world , stat_editor , lua , persist_weapons , vfx )
2022-02-22 01:18:49 +01:00
} ;
2022-12-18 23:15:52 +01:00
inline auto g = menu_settings ( ) ;
2023-04-01 15:46:41 +02:00
}