From 25f07857ffd1224de393fe2af1be504ca0be0368 Mon Sep 17 00:00:00 2001 From: gtacodeshop <118129585+gtacodeshop@users.noreply.github.com> Date: Sun, 13 Nov 2022 19:41:26 +0100 Subject: [PATCH] Initial Commit --- CHEAT_1_SIGS.txt | 241 + GTAV/GTAV.vcxproj | 922 + GTAV/GTAV.vcxproj.filters | 2155 ++ GTAV/GTAV.vcxproj.user | 6 + GTAV/src/dllmain.cpp | 31 + GTAV/src/global/lists.cpp | 737 + GTAV/src/global/lists.h | 43 + GTAV/src/global/ui_vars.cpp | 94 + GTAV/src/global/ui_vars.h | 181 + GTAV/src/global/vars.cpp | 322 + GTAV/src/global/vars.h | 269 + GTAV/src/menu/base/base.cpp | 71 + GTAV/src/menu/base/base.h | 166 + GTAV/src/menu/base/options/break.cpp | 57 + GTAV/src/menu/base/options/break.h | 36 + GTAV/src/menu/base/options/button.cpp | 149 + GTAV/src/menu/base/options/button.h | 153 + GTAV/src/menu/base/options/color_option.cpp | 52 + GTAV/src/menu/base/options/color_option.h | 102 + GTAV/src/menu/base/options/number.cpp | 297 + GTAV/src/menu/base/options/number.h | 163 + GTAV/src/menu/base/options/option.cpp | 18 + GTAV/src/menu/base/options/option.h | 55 + GTAV/src/menu/base/options/radio.cpp | 36 + GTAV/src/menu/base/options/radio.h | 80 + GTAV/src/menu/base/options/scroll.h | 338 + GTAV/src/menu/base/options/submenu_option.cpp | 64 + GTAV/src/menu/base/options/submenu_option.h | 121 + GTAV/src/menu/base/options/toggle.cpp | 58 + GTAV/src/menu/base/options/toggle.h | 87 + GTAV/src/menu/base/renderer.cpp | 444 + GTAV/src/menu/base/renderer.h | 133 + GTAV/src/menu/base/submenu.cpp | 106 + GTAV/src/menu/base/submenu.h | 99 + GTAV/src/menu/base/submenu_handler.cpp | 89 + GTAV/src/menu/base/submenu_handler.h | 116 + GTAV/src/menu/base/submenus/main.cpp | 289 + GTAV/src/menu/base/submenus/main.h | 31 + .../main/helper/color/helper_color_preset.cpp | 95 + .../main/helper/color/helper_color_preset.h | 23 + .../main/helper/esp/helper_esp_settings.cpp | 122 + .../main/helper/esp/helper_esp_settings.h | 22 + .../helper/esp/helper_esp_settings_edit.cpp | 72 + .../helper/esp/helper_esp_settings_edit.h | 26 + .../submenus/main/helper/helper_color.cpp | 143 + .../base/submenus/main/helper/helper_color.h | 28 + .../base/submenus/main/helper/helper_esp.cpp | 297 + .../base/submenus/main/helper/helper_esp.h | 70 + .../submenus/main/helper/helper_rainbow.cpp | 77 + .../submenus/main/helper/helper_rainbow.h | 26 + .../helper/rainbow/helper_rainbow_load.cpp | 115 + .../main/helper/rainbow/helper_rainbow_load.h | 24 + GTAV/src/menu/base/submenus/main/misc.cpp | 127 + GTAV/src/menu/base/submenus/main/misc.h | 26 + .../main/misc/camera/aerial_camera.cpp | 59 + .../submenus/main/misc/camera/aerial_camera.h | 25 + .../menu/base/submenus/main/misc/dispatch.cpp | 143 + .../menu/base/submenus/main/misc/dispatch.h | 35 + .../menu/base/submenus/main/misc/display.cpp | 232 + .../menu/base/submenus/main/misc/display.h | 36 + GTAV/src/menu/base/submenus/main/misc/hud.cpp | 292 + GTAV/src/menu/base/submenus/main/misc/hud.h | 24 + .../base/submenus/main/misc/misc_camera.cpp | 127 + .../base/submenus/main/misc/misc_camera.h | 27 + .../base/submenus/main/misc/misc_disables.cpp | 234 + .../base/submenus/main/misc/misc_disables.h | 38 + .../base/submenus/main/misc/misc_panels.cpp | 63 + .../base/submenus/main/misc/misc_panels.h | 15 + .../base/submenus/main/misc/misc_radio.cpp | 73 + .../menu/base/submenus/main/misc/misc_radio.h | 25 + .../base/submenus/main/misc/misc_swaps.cpp | 41 + .../menu/base/submenus/main/misc/misc_swaps.h | 23 + .../submenus/main/misc/panels/panels_edit.cpp | 86 + .../submenus/main/misc/panels/panels_edit.h | 26 + .../main/misc/panels/panels_parent.cpp | 50 + .../submenus/main/misc/panels/panels_parent.h | 24 + .../base/submenus/main/misc/scripthook.cpp | 1339 + .../menu/base/submenus/main/misc/scripthook.h | 56 + .../submenus/main/misc/swaps/model_swaps.cpp | 246 + .../submenus/main/misc/swaps/model_swaps.h | 38 + .../main/misc/swaps/model_swaps_add.cpp | 73 + .../main/misc/swaps/model_swaps_add.h | 26 + .../main/misc/swaps/model_swaps_presets.cpp | 101 + .../main/misc/swaps/model_swaps_presets.h | 24 + .../main/misc/swaps/texture_swaps.cpp | 316 + .../submenus/main/misc/swaps/texture_swaps.h | 33 + .../main/misc/swaps/texture_swaps_add.cpp | 95 + .../main/misc/swaps/texture_swaps_add.h | 25 + .../menu/base/submenus/main/misc/visions.cpp | 84 + .../menu/base/submenus/main/misc/visions.h | 26 + GTAV/src/menu/base/submenus/main/network.cpp | 133 + GTAV/src/menu/base/submenus/main/network.h | 25 + .../network/account/network_account_kd.cpp | 65 + .../main/network/account/network_account_kd.h | 26 + .../network/account/network_account_level.cpp | 98 + .../network/account/network_account_level.h | 23 + .../account/network_account_outfits.cpp | 124 + .../network/account/network_account_outfits.h | 30 + .../network/account/network_account_times.cpp | 109 + .../network/account/network_account_times.h | 28 + .../account/network_account_unlocks.cpp | 670 + .../network/account/network_account_unlocks.h | 23 + .../account/network_account_wins_losses.cpp | 78 + .../account/network_account_wins_losses.h | 23 + .../outfits/network_account_outfits_edit.cpp | 158 + .../outfits/network_account_outfits_edit.h | 25 + .../network_account_outfits_edit_name.cpp | 109 + .../network_account_outfits_edit_name.h | 28 + .../wins/network_account_wins_losses_edit.cpp | 52 + .../wins/network_account_wins_losses_edit.h | 25 + .../chat/network_global_chat_ozark.cpp | 63 + .../network/chat/network_global_chat_ozark.h | 26 + .../chat/network_global_chat_presets.cpp | 68 + .../chat/network_global_chat_presets.h | 25 + .../chat/network_global_chat_targets.cpp | 50 + .../chat/network_global_chat_targets.h | 23 + .../finder/network_session_finder_edit.cpp | 53 + .../finder/network_session_finder_edit.h | 23 + .../friends/network_friends_selected.cpp | 58 + .../friends/network_friends_selected.h | 23 + .../submenus/main/network/network_account.cpp | 111 + .../submenus/main/network/network_account.h | 23 + .../submenus/main/network/network_friends.cpp | 186 + .../submenus/main/network/network_friends.h | 24 + .../main/network/network_global_chat.cpp | 303 + .../main/network/network_global_chat.h | 36 + .../main/network/network_host_toolkit.cpp | 156 + .../main/network/network_host_toolkit.h | 29 + .../main/network/network_join_bypass.cpp | 43 + .../main/network/network_join_bypass.h | 25 + .../network/network_player_search_join.cpp | 357 + .../main/network/network_player_search_join.h | 35 + .../submenus/main/network/network_players.cpp | 404 + .../submenus/main/network/network_players.h | 24 + .../main/network/network_recent_players.cpp | 368 + .../main/network/network_recent_players.h | 40 + .../submenus/main/network/network_session.cpp | 128 + .../submenus/main/network/network_session.h | 23 + .../main/network/network_session_finder.cpp | 173 + .../main/network/network_session_finder.h | 27 + .../main/network/network_spoofing.cpp | 205 + .../submenus/main/network/network_spoofing.h | 27 + .../network_players_abusive_attackers.cpp | 167 + .../network_players_abusive_attackers.h | 27 + .../network_players_abusive_explosions.cpp | 145 + .../network_players_abusive_explosions.h | 30 + .../network_players_friendly_drops.cpp | 207 + .../friendly/network_players_friendly_drops.h | 30 + .../players/network_players_abusive.cpp | 715 + .../network/players/network_players_abusive.h | 68 + .../players/network_players_commands.cpp | 485 + .../players/network_players_commands.h | 28 + .../players/network_players_friendly.cpp | 340 + .../players/network_players_friendly.h | 40 + .../players/network_players_removals.cpp | 281 + .../players/network_players_removals.h | 40 + .../players/network_players_selected.cpp | 220 + .../players/network_players_selected.h | 24 + .../network_players_spawn_blocking.cpp | 118 + .../players/network_players_spawn_blocking.h | 24 + .../players/network_players_teleport.cpp | 129 + .../players/network_players_teleport.h | 23 + .../network/players/network_players_text.cpp | 196 + .../network/players/network_players_text.h | 31 + .../players/network_players_trolling.cpp | 375 + .../players/network_players_trolling.h | 25 + .../players/network_players_vehicle.cpp | 537 + .../network/players/network_players_vehicle.h | 33 + .../network_players_teleport_apartments.cpp | 53 + .../network_players_teleport_apartments.h | 23 + .../text/network_players_text_presets.cpp | 91 + .../text/network_players_text_presets.h | 23 + .../text/network_players_text_save.cpp | 114 + .../players/text/network_players_text_save.h | 23 + ...k_players_trolling_attachments_presets.cpp | 71 + ...ork_players_trolling_attachments_presets.h | 23 + .../network_players_trolling_attachments.cpp | 345 + .../network_players_trolling_attachments.h | 31 + .../network_players_trolling_sounds.cpp | 77 + .../network_players_trolling_sounds.h | 26 + .../network_recent_players_permanent.cpp | 250 + .../recent/network_recent_players_permanent.h | 24 + .../network_recent_players_selected.cpp | 164 + .../recent/network_recent_players_selected.h | 24 + .../search/network_player_search_selected.cpp | 135 + .../search/network_player_search_selected.h | 25 + .../session/network_session_excludes.cpp | 55 + .../session/network_session_excludes.h | 28 + .../session/network_session_overseer.cpp | 441 + .../session/network_session_overseer.h | 61 + .../network_session_overseer_selected.cpp | 216 + .../network_session_overseer_selected.h | 42 + .../crew/network_spoofing_crew_icon.cpp | 95 + .../crew/network_spoofing_crew_icon.h | 28 + .../crew/network_spoofing_crew_motto.cpp | 93 + .../crew/network_spoofing_crew_motto.h | 28 + .../crew/network_spoofing_crew_name.cpp | 93 + .../crew/network_spoofing_crew_name.h | 28 + .../crew/network_spoofing_crew_presets.cpp | 150 + .../crew/network_spoofing_crew_presets.h | 23 + .../crew/network_spoofing_crew_rank.cpp | 93 + .../crew/network_spoofing_crew_rank.h | 28 + .../crew/network_spoofing_crew_tag.cpp | 93 + .../spoofing/crew/network_spoofing_crew_tag.h | 28 + .../spoofing/network_spoofing_crew.cpp | 56 + .../network/spoofing/network_spoofing_crew.h | 23 + .../spoofing/network_spoofing_intervals.cpp | 76 + .../spoofing/network_spoofing_intervals.h | 23 + .../network/spoofing/network_spoofing_ip.cpp | 116 + .../network/spoofing/network_spoofing_ip.h | 30 + .../spoofing/network_spoofing_name.cpp | 178 + .../network/spoofing/network_spoofing_name.h | 38 + .../network_spoofing_player_rotation.cpp | 81 + .../network_spoofing_player_rotation.h | 31 + .../spoofing/network_spoofing_profiles.cpp | 147 + .../spoofing/network_spoofing_profiles.h | 48 + .../network/spoofing/network_spoofing_rid.cpp | 104 + .../network/spoofing/network_spoofing_rid.h | 29 + .../network_spoofing_vehicle_rotation.cpp | 168 + .../network_spoofing_vehicle_rotation.h | 38 + .../network_spoofing_profiles_edit.cpp | 97 + .../profiles/network_spoofing_profiles_edit.h | 27 + .../blocking/network_join_blocking_add.cpp | 134 + .../blocking/network_join_blocking_add.h | 29 + .../blocking/network_join_blocking_edit.cpp | 90 + .../blocking/network_join_blocking_edit.h | 25 + .../blocking/network_join_blocking_manual.cpp | 86 + .../blocking/network_join_blocking_manual.h | 23 + .../network_join_blocking_manual_edit.cpp | 94 + .../network_join_blocking_manual_edit.h | 26 + .../network_join_blocking_manual_load.cpp | 184 + .../network_join_blocking_manual_load.h | 25 + .../network_join_blocking_manual_save.cpp | 74 + .../network_join_blocking_manual_save.h | 23 + .../toolkit/network_blacklisted_players.cpp | 198 + .../toolkit/network_blacklisted_players.h | 29 + .../network/toolkit/network_desync_kick.cpp | 43 + .../network/toolkit/network_desync_kick.h | 25 + .../network/toolkit/network_join_blocking.cpp | 118 + .../network/toolkit/network_join_blocking.h | 48 + GTAV/src/menu/base/submenus/main/player.cpp | 365 + GTAV/src/menu/base/submenus/main/player.h | 40 + .../base/submenus/main/player/animation.cpp | 40 + .../base/submenus/main/player/animation.h | 15 + .../main/player/animation/animations.cpp | 192 + .../main/player/animation/animations.h | 32 + .../main/player/animation/clipsets.cpp | 90 + .../submenus/main/player/animation/clipsets.h | 24 + .../main/player/animation/scenario.cpp | 109 + .../submenus/main/player/animation/scenario.h | 27 + .../base/submenus/main/player/appearance.cpp | 39 + .../base/submenus/main/player/appearance.h | 15 + .../menu/base/submenus/main/player/model.cpp | 132 + .../menu/base/submenus/main/player/model.h | 31 + .../base/submenus/main/player/movement.cpp | 184 + .../menu/base/submenus/main/player/movement.h | 38 + .../base/submenus/main/player/particles.cpp | 35 + .../base/submenus/main/player/particles.h | 15 + .../submenus/main/player/ptfx/hand_trails.cpp | 75 + .../submenus/main/player/ptfx/hand_trails.h | 27 + .../main/player/ptfx/particle_manager.cpp | 140 + .../main/player/ptfx/particle_manager.h | 41 + .../base/submenus/main/player/wardrobe.cpp | 213 + .../menu/base/submenus/main/player/wardrobe.h | 39 + .../main/player/wardrobe_save_load.cpp | 108 + .../submenus/main/player/wardrobe_save_load.h | 20 + .../entity/protection_entity_blocking.cpp | 87 + .../entity/protection_entity_blocking.h | 23 + .../entity/protection_entity_ghosting.cpp | 116 + .../entity/protection_entity_ghosting.h | 29 + .../protection_entity_ghosting_edit.cpp | 60 + .../entity/protection_entity_ghosting_edit.h | 25 + .../protection_spawn_rate_limit_add.cpp | 99 + .../entity/protection_spawn_rate_limit_add.h | 27 + .../protection_spawn_rate_limit_edit.cpp | 48 + .../entity/protection_spawn_rate_limit_edit.h | 23 + .../limits/protection_message_limit.cpp | 45 + .../limits/protection_message_limit.h | 24 + .../limits/protection_spawn_rate_limit.cpp | 125 + .../limits/protection_spawn_rate_limit.h | 35 + .../protection/protection_anti_detection.cpp | 56 + .../protection/protection_anti_detection.h | 27 + .../protection/protection_entity_events.cpp | 53 + .../protection/protection_entity_events.h | 24 + .../main/protection/protection_events.cpp | 129 + .../main/protection/protection_events.h | 45 + .../protection/protection_join_blocking.cpp | 174 + .../protection/protection_join_blocking.h | 30 + .../main/protection/protection_limits.cpp | 69 + .../main/protection/protection_limits.h | 33 + .../main/protection/protection_net_events.cpp | 79 + .../main/protection/protection_net_events.h | 37 + .../protection/protection_presence_events.cpp | 65 + .../protection/protection_presence_events.h | 28 + .../main/protection/protection_reactions.cpp | 251 + .../main/protection/protection_reactions.h | 73 + .../protection_reactions_selected.cpp | 106 + .../reactions/protection_reactions_selected.h | 23 + .../menu/base/submenus/main/protections.cpp | 176 + .../src/menu/base/submenus/main/protections.h | 26 + GTAV/src/menu/base/submenus/main/settings.cpp | 105 + GTAV/src/menu/base/submenus/main/settings.h | 15 + .../main/settings/color/color_sync.cpp | 44 + .../submenus/main/settings/color/color_sync.h | 23 + .../base/submenus/main/settings/hide_info.cpp | 77 + .../base/submenus/main/settings/hide_info.h | 27 + .../main/settings/hk/hotkey_selected.cpp | 61 + .../main/settings/hk/hotkey_selected.h | 24 + .../settings/pos/position_scale_selected.cpp | 41 + .../settings/pos/position_scale_selected.h | 23 + .../submenus/main/settings/position_scale.cpp | 56 + .../submenus/main/settings/position_scale.h | 19 + .../submenus/main/settings/settings_color.cpp | 75 + .../submenus/main/settings/settings_color.h | 19 + .../submenus/main/settings/settings_fonts.cpp | 243 + .../submenus/main/settings/settings_fonts.h | 37 + .../main/settings/settings_hotkey.cpp | 45 + .../submenus/main/settings/settings_hotkey.h | 15 + .../main/settings/settings_texture.cpp | 93 + .../submenus/main/settings/settings_texture.h | 32 + .../main/settings/settings_textures.cpp | 152 + .../main/settings/settings_textures.h | 36 + .../base/submenus/main/settings/themes.cpp | 262 + .../menu/base/submenus/main/settings/themes.h | 23 + .../main/settings/themes/themes_selected.cpp | 154 + .../main/settings/themes/themes_selected.h | 23 + .../submenus/main/settings/translation.cpp | 290 + .../base/submenus/main/settings/translation.h | 27 + .../translation/translation_selected.cpp | 53 + .../translation/translation_selected.h | 23 + GTAV/src/menu/base/submenus/main/spawner.cpp | 1031 + GTAV/src/menu/base/submenus/main/spawner.h | 45 + .../edit/spawner_object_manage_edit.cpp | 113 + .../object/edit/spawner_object_manage_edit.h | 29 + .../object/spawner_object_building.cpp | 186 + .../spawner/object/spawner_object_building.h | 25 + .../spawner/object/spawner_object_manage.cpp | 122 + .../spawner/object/spawner_object_manage.h | 33 + .../spawner/object/spawner_object_select.cpp | 40 + .../spawner/object/spawner_object_select.h | 24 + .../object/spawner_object_settings.cpp | 47 + .../spawner/object/spawner_object_settings.h | 26 + .../ped/edit/spawner_ped_manage_edit.cpp | 146 + .../ped/edit/spawner_ped_manage_edit.h | 29 + .../main/spawner/ped/spawner_ped_manage.cpp | 123 + .../main/spawner/ped/spawner_ped_manage.h | 33 + .../main/spawner/ped/spawner_ped_settings.cpp | 47 + .../main/spawner/ped/spawner_ped_settings.h | 26 + .../edit/spawner_vehicle_manage_edit.cpp | 233 + .../edit/spawner_vehicle_manage_edit.h | 34 + .../spawner_vehicle_garage_selected.cpp | 550 + .../garage/spawner_vehicle_garage_selected.h | 23 + .../vehicle/spawner_vehicle_garage.cpp | 641 + .../spawner/vehicle/spawner_vehicle_garage.h | 24 + .../vehicle/spawner_vehicle_manage.cpp | 110 + .../spawner/vehicle/spawner_vehicle_manage.h | 32 + .../vehicle/spawner_vehicle_modded.cpp | 944 + .../spawner/vehicle/spawner_vehicle_modded.h | 30 + .../spawner/vehicle/spawner_vehicle_save.cpp | 278 + .../spawner/vehicle/spawner_vehicle_save.h | 23 + .../vehicle/spawner_vehicle_selected.cpp | 267 + .../vehicle/spawner_vehicle_selected.h | 25 + .../vehicle/spawner_vehicle_settings.cpp | 96 + .../vehicle/spawner_vehicle_settings.h | 35 + GTAV/src/menu/base/submenus/main/teleport.cpp | 509 + GTAV/src/menu/base/submenus/main/teleport.h | 39 + .../stores/teleport_stores_selected.cpp | 125 + .../stores/teleport_stores_selected.h | 23 + .../main/teleport/teleport_directional.cpp | 102 + .../main/teleport/teleport_directional.h | 23 + .../submenus/main/teleport/teleport_ipl.cpp | 193 + .../submenus/main/teleport/teleport_ipl.h | 23 + .../main/teleport/teleport_save_load.cpp | 122 + .../main/teleport/teleport_save_load.h | 23 + .../main/teleport/teleport_selected.cpp | 38 + .../main/teleport/teleport_selected.h | 24 + .../main/teleport/teleport_settings.cpp | 44 + .../main/teleport/teleport_settings.h | 23 + .../main/teleport/teleport_stores.cpp | 56 + .../submenus/main/teleport/teleport_stores.h | 24 + GTAV/src/menu/base/submenus/main/vehicle.cpp | 431 + GTAV/src/menu/base/submenus/main/vehicle.h | 36 + .../neon/vehicle_customs_neon_color.cpp | 167 + .../lights/neon/vehicle_customs_neon_color.h | 23 + .../customs/lights/vehicle_customs_neon.cpp | 56 + .../customs/lights/vehicle_customs_neon.h | 23 + .../respray/vehicle_customs_respray_edit.cpp | 141 + .../respray/vehicle_customs_respray_edit.h | 24 + .../respray/vehicle_customs_respray_type.cpp | 137 + .../respray/vehicle_customs_respray_type.h | 32 + .../customs/vehicle_customs_bumpers.cpp | 68 + .../vehicle/customs/vehicle_customs_bumpers.h | 23 + .../customs/vehicle_customs_fender.cpp | 68 + .../vehicle/customs/vehicle_customs_fender.h | 23 + .../vehicle/customs/vehicle_customs_horn.cpp | 69 + .../vehicle/customs/vehicle_customs_horn.h | 23 + .../customs/vehicle_customs_interior.cpp | 143 + .../customs/vehicle_customs_interior.h | 23 + .../customs/vehicle_customs_lights.cpp | 56 + .../vehicle/customs/vehicle_customs_lights.h | 23 + .../vehicle/customs/vehicle_customs_lsc.cpp | 993 + .../vehicle/customs/vehicle_customs_lsc.h | 27 + .../customs/vehicle_customs_respray.cpp | 62 + .../vehicle/customs/vehicle_customs_respray.h | 24 + .../customs/vehicle_customs_wheels.cpp | 65 + .../vehicle/customs/vehicle_customs_wheels.h | 24 + .../wheels/vehicle_customs_wheels_color.cpp | 93 + .../wheels/vehicle_customs_wheels_color.h | 23 + .../wheels/vehicle_customs_wheels_tires.cpp | 70 + .../wheels/vehicle_customs_wheels_tires.h | 27 + .../vehicle_customs_wheels_tires_edit.cpp | 213 + .../vehicle_customs_wheels_tires_edit.h | 26 + .../wheels/vehicle_customs_wheels_type.cpp | 212 + .../wheels/vehicle_customs_wheels_type.h | 26 + .../vehicle_customs_wheels_type_edit.cpp | 751 + .../wheels/vehicle_customs_wheels_type_edit.h | 24 + .../vehicle_modifiers_handling_attr.cpp | 540 + .../vehicle_modifiers_handling_attr.h | 92 + .../vehicle_modifiers_handling_bike.cpp | 297 + .../vehicle_modifiers_handling_bike.h | 59 + .../vehicle_modifiers_handling_boat.cpp | 406 + .../vehicle_modifiers_handling_boat.h | 75 + .../vehicle_modifiers_handling_flying.cpp | 460 + .../vehicle_modifiers_handling_flying.h | 87 + .../vehicle_modifiers_handling_load.cpp | 584 + .../vehicle_modifiers_handling_load.h | 23 + .../vehicle_modifiers_handling_main.cpp | 158 + .../vehicle_modifiers_handling_main.h | 23 + .../modifiers/vehicle_modifiers_handling.cpp | 88 + .../modifiers/vehicle_modifiers_handling.h | 27 + .../movement/vehicle_movement_acrobatics.cpp | 39 + .../movement/vehicle_movement_acrobatics.h | 23 + .../movement/vehicle_movement_parachute.cpp | 66 + .../movement/vehicle_movement_parachute.h | 23 + .../main/vehicle/seats/vehicle_seats_edit.cpp | 41 + .../main/vehicle/seats/vehicle_seats_edit.h | 23 + .../main/vehicle/vehicle_autopilot.cpp | 106 + .../submenus/main/vehicle/vehicle_autopilot.h | 26 + .../submenus/main/vehicle/vehicle_boost.cpp | 138 + .../submenus/main/vehicle/vehicle_boost.h | 30 + .../main/vehicle/vehicle_collision.cpp | 52 + .../submenus/main/vehicle/vehicle_collision.h | 24 + .../submenus/main/vehicle/vehicle_customs.cpp | 1325 + .../submenus/main/vehicle/vehicle_customs.h | 169 + .../submenus/main/vehicle/vehicle_doors.cpp | 99 + .../submenus/main/vehicle/vehicle_doors.h | 25 + .../submenus/main/vehicle/vehicle_gravity.cpp | 126 + .../submenus/main/vehicle/vehicle_gravity.h | 30 + .../submenus/main/vehicle/vehicle_health.cpp | 65 + .../submenus/main/vehicle/vehicle_health.h | 24 + .../main/vehicle/vehicle_modifiers.cpp | 139 + .../submenus/main/vehicle/vehicle_modifiers.h | 28 + .../main/vehicle/vehicle_movement.cpp | 127 + .../submenus/main/vehicle/vehicle_movement.h | 31 + .../main/vehicle/vehicle_multipliers.cpp | 110 + .../main/vehicle/vehicle_multipliers.h | 28 + .../main/vehicle/vehicle_particles.cpp | 109 + .../submenus/main/vehicle/vehicle_particles.h | 26 + .../submenus/main/vehicle/vehicle_ramps.cpp | 148 + .../submenus/main/vehicle/vehicle_ramps.h | 29 + .../main/vehicle/vehicle_randomization.cpp | 171 + .../main/vehicle/vehicle_randomization.h | 41 + .../submenus/main/vehicle/vehicle_seats.cpp | 98 + .../submenus/main/vehicle/vehicle_seats.h | 23 + .../main/vehicle/vehicle_speedometer.cpp | 68 + .../main/vehicle/vehicle_speedometer.h | 26 + .../main/vehicle/vehicle_tyre_tracks.cpp | 166 + .../main/vehicle/vehicle_tyre_tracks.h | 30 + .../submenus/main/vehicle/vehicle_weapons.cpp | 118 + .../submenus/main/vehicle/vehicle_weapons.h | 28 + .../menu/base/submenus/main/weapon/aimbot.cpp | 220 + .../menu/base/submenus/main/weapon/aimbot.h | 40 + .../base/submenus/main/weapon/entity_gun.cpp | 322 + .../base/submenus/main/weapon/entity_gun.h | 33 + .../weapon/explosions/explosion_editor.cpp | 359 + .../main/weapon/explosions/explosion_editor.h | 30 + .../main/weapon/explosions/explosion_gun.cpp | 91 + .../main/weapon/explosions/explosion_gun.h | 33 + .../main/weapon/give/give_attachment.cpp | 134 + .../main/weapon/give/give_attachment.h | 24 + .../weapon/give/give_attachment_selected.cpp | 62 + .../weapon/give/give_attachment_selected.h | 23 + .../submenus/main/weapon/give/give_tint.cpp | 171 + .../submenus/main/weapon/give/give_tint.h | 19 + .../main/weapon/give/give_tint_selected.cpp | 56 + .../main/weapon/give/give_tint_selected.h | 24 + .../submenus/main/weapon/give/give_weapon.cpp | 105 + .../submenus/main/weapon/give/give_weapon.h | 26 + .../main/weapon/give/give_weapons.cpp | 41 + .../submenus/main/weapon/give/give_weapons.h | 15 + .../main/weapon/give_weapons_ammo.cpp | 56 + .../submenus/main/weapon/give_weapons_ammo.h | 15 + .../base/submenus/main/weapon/gravity_gun.cpp | 109 + .../base/submenus/main/weapon/gravity_gun.h | 33 + .../weapon/modifiers/ammo/ammo_modifier.cpp | 76 + .../weapon/modifiers/ammo/ammo_modifier.h | 23 + .../modifiers/ammo/ammo_modifier_edit.cpp | 142 + .../modifiers/ammo/ammo_modifier_edit.h | 40 + .../modifiers/ammo/ammo_modifier_load.cpp | 138 + .../modifiers/ammo/ammo_modifier_load.h | 24 + .../modifiers/ammo/ammo_modifier_swap.cpp | 89 + .../modifiers/ammo/ammo_modifier_swap.h | 24 + .../main/weapon/modifiers/weapon_matrix.cpp | 259 + .../main/weapon/modifiers/weapon_matrix.h | 26 + .../weapon/modifiers/weapon_multipliers.cpp | 63 + .../weapon/modifiers/weapon_multipliers.h | 29 + .../submenus/main/weapon/particle_gun.cpp | 69 + .../base/submenus/main/weapon/particle_gun.h | 25 + .../weapon/purchase/purchase_attachment.cpp | 105 + .../weapon/purchase/purchase_attachment.h | 23 + .../main/weapon/purchase/purchase_weapon.cpp | 2806 ++ .../main/weapon/purchase/purchase_weapon.h | 30 + .../main/weapon/purchase/purchase_weapons.cpp | 35 + .../main/weapon/purchase/purchase_weapons.h | 15 + .../base/submenus/main/weapon/triggerbot.cpp | 68 + .../base/submenus/main/weapon/triggerbot.h | 26 + .../submenus/main/weapon/weapon_disables.cpp | 231 + .../submenus/main/weapon/weapon_disables.h | 38 + .../submenus/main/weapon/weapon_modifiers.cpp | 58 + .../submenus/main/weapon/weapon_modifiers.h | 22 + .../base/submenus/main/weapon/weapon_mods.cpp | 572 + .../base/submenus/main/weapon/weapon_mods.h | 60 + GTAV/src/menu/base/submenus/main/world.cpp | 92 + GTAV/src/menu/base/submenus/main/world.h | 26 + .../submenus/main/world/bullet_tracers.cpp | 177 + .../base/submenus/main/world/bullet_tracers.h | 49 + .../base/submenus/main/world/clear_area.cpp | 61 + .../base/submenus/main/world/clear_area.h | 23 + .../base/submenus/main/world/fx/fx_color.cpp | 118 + .../base/submenus/main/world/fx/fx_color.h | 35 + .../main/world/fx/fx_cross_multiplier.cpp | 69 + .../main/world/fx/fx_cross_multiplier.h | 29 + .../base/submenus/main/world/fx/fx_liquid.cpp | 81 + .../base/submenus/main/world/fx/fx_liquid.h | 33 + .../base/submenus/main/world/fx/fx_load.cpp | 392 + .../base/submenus/main/world/fx/fx_load.h | 22 + .../submenus/main/world/fx/fx_puddles.cpp | 111 + .../base/submenus/main/world/fx/fx_puddles.h | 24 + .../base/submenus/main/world/fx/fx_sky.cpp | 270 + .../menu/base/submenus/main/world/fx/fx_sky.h | 50 + .../submenus/main/world/fx/fx_traffic.cpp | 139 + .../base/submenus/main/world/fx/fx_traffic.h | 35 + .../submenus/main/world/fx/fx_ui_color.cpp | 92 + .../base/submenus/main/world/fx/fx_ui_color.h | 32 + .../submenus/main/world/fx/fx_vehicle.cpp | 102 + .../base/submenus/main/world/fx/fx_vehicle.h | 27 + .../main/world/fx/fx_vehicle_neons.cpp | 90 + .../submenus/main/world/fx/fx_vehicle_neons.h | 37 + .../menu/base/submenus/main/world/game_fx.cpp | 108 + .../menu/base/submenus/main/world/game_fx.h | 31 + .../submenus/main/world/local_entities.cpp | 346 + .../base/submenus/main/world/local_entities.h | 34 + .../menu/base/submenus/main/world/ocean.cpp | 145 + .../src/menu/base/submenus/main/world/ocean.h | 42 + .../submenus/main/world/ocean/ocean_quads.cpp | 80 + .../submenus/main/world/ocean/ocean_quads.h | 25 + .../main/world/ocean/ocean_quads_edit.cpp | 103 + .../main/world/ocean/ocean_quads_edit.h | 27 + .../main/world/ocean/ocean_tuning.cpp | 128 + .../submenus/main/world/ocean/ocean_tuning.h | 23 + .../submenus/main/world/time/time_preset.cpp | 65 + .../submenus/main/world/time/time_preset.h | 22 + .../menu/base/submenus/main/world/trains.cpp | 235 + .../menu/base/submenus/main/world/trains.h | 30 + .../main/world/weather/fx/weather_fx.cpp | 249 + .../main/world/weather/fx/weather_fx.h | 32 + .../main/world/weather/weather_select.cpp | 101 + .../main/world/weather/weather_select.h | 26 + .../base/submenus/main/world/world_time.cpp | 209 + .../base/submenus/main/world/world_time.h | 31 + .../submenus/main/world/world_waypoint.cpp | 73 + .../base/submenus/main/world/world_waypoint.h | 28 + .../submenus/main/world/world_weather.cpp | 133 + .../base/submenus/main/world/world_weather.h | 31 + GTAV/src/menu/base/util/camera.cpp | 40 + GTAV/src/menu/base/util/camera.h | 8 + GTAV/src/menu/base/util/control.cpp | 237 + GTAV/src/menu/base/util/control.h | 109 + GTAV/src/menu/base/util/fonts.cpp | 114 + GTAV/src/menu/base/util/fonts.h | 46 + GTAV/src/menu/base/util/global.h | 37 + GTAV/src/menu/base/util/helpers.cpp | 1154 + GTAV/src/menu/base/util/helpers.h | 78 + GTAV/src/menu/base/util/hotkeys.cpp | 107 + GTAV/src/menu/base/util/hotkeys.h | 50 + GTAV/src/menu/base/util/input.cpp | 222 + GTAV/src/menu/base/util/input.h | 119 + GTAV/src/menu/base/util/instructionals.cpp | 345 + GTAV/src/menu/base/util/instructionals.h | 85 + GTAV/src/menu/base/util/menu_input.cpp | 446 + GTAV/src/menu/base/util/menu_input.h | 298 + GTAV/src/menu/base/util/notify.cpp | 242 + GTAV/src/menu/base/util/notify.h | 65 + GTAV/src/menu/base/util/on_screen_ped.cpp | 105 + GTAV/src/menu/base/util/on_screen_ped.h | 7 + GTAV/src/menu/base/util/panels.cpp | 1792 ++ GTAV/src/menu/base/util/panels.h | 239 + GTAV/src/menu/base/util/player_manager.cpp | 371 + GTAV/src/menu/base/util/player_manager.h | 278 + GTAV/src/menu/base/util/rainbow.cpp | 126 + GTAV/src/menu/base/util/rainbow.h | 29 + GTAV/src/menu/base/util/raycast.cpp | 31 + GTAV/src/menu/base/util/raycast.h | 37 + GTAV/src/menu/base/util/stacked_display.cpp | 90 + GTAV/src/menu/base/util/stacked_display.h | 36 + GTAV/src/menu/base/util/stats.cpp | 68 + GTAV/src/menu/base/util/stats.h | 12 + GTAV/src/menu/base/util/textures.cpp | 176 + GTAV/src/menu/base/util/textures.h | 45 + GTAV/src/menu/base/util/timers.cpp | 26 + GTAV/src/menu/base/util/timers.h | 17 + .../hooks/apply_player_physical_index.cpp | 88 + GTAV/src/menu/hooks/apply_weather_meta.cpp | 13 + GTAV/src/menu/hooks/arxan_integrity.cpp | 71 + GTAV/src/menu/hooks/crash.cpp | 257 + GTAV/src/menu/hooks/format_engine_string.cpp | 72 + GTAV/src/menu/hooks/game_chat.cpp | 265 + GTAV/src/menu/hooks/get_font_id.cpp | 15 + GTAV/src/menu/hooks/get_gxt_label.cpp | 20 + GTAV/src/menu/hooks/get_peer_address.cpp | 13 + GTAV/src/menu/hooks/get_proc_address.cpp | 79 + GTAV/src/menu/hooks/has_ros_privilege.cpp | 12 + GTAV/src/menu/hooks/hooks.cpp | 1551 ++ GTAV/src/menu/hooks/hooks.h | 358 + GTAV/src/menu/hooks/matchmaking.cpp | 115 + GTAV/src/menu/hooks/pack_clone_create.cpp | 66 + GTAV/src/menu/hooks/pack_clone_sync.cpp | 66 + GTAV/src/menu/hooks/process_game_event.cpp | 62 + GTAV/src/menu/hooks/process_relay_usage.cpp | 51 + GTAV/src/menu/hooks/profanity.cpp | 26 + .../src/menu/hooks/read_blacklist_message.cpp | 26 + .../menu/hooks/read_kick_player_message.cpp | 26 + .../hooks/read_new_script_host_message.cpp | 45 + GTAV/src/menu/hooks/receive_broadcast.cpp | 172 + GTAV/src/menu/hooks/receive_clone_create.cpp | 493 + GTAV/src/menu/hooks/receive_clone_remove.cpp | 49 + GTAV/src/menu/hooks/receive_clone_sync.cpp | 399 + GTAV/src/menu/hooks/receive_network_event.cpp | 817 + .../src/menu/hooks/receive_presence_event.cpp | 123 + GTAV/src/menu/hooks/receive_session_info.cpp | 65 + GTAV/src/menu/hooks/render_script_texture.cpp | 144 + GTAV/src/menu/hooks/scripts.cpp | 23 + GTAV/src/menu/hooks/shoot_bullet.cpp | 71 + GTAV/src/menu/hooks/stat_get_int.cpp | 140 + .../hooks/update_player_script_status.cpp | 80 + GTAV/src/menu/hooks/write_gs_item.cpp | 17 + .../menu/hooks/write_ped_health_data_node.cpp | 29 + .../write_player_game_state_data_node.cpp | 22 + .../hooks/write_player_gamer_data_node.cpp | 42 + GTAV/src/menu/hooks/write_rid.cpp | 32 + GTAV/src/menu/init.cpp | 308 + GTAV/src/menu/init.h | 7 + GTAV/src/rage/api/api.cpp | 164 + GTAV/src/rage/api/api.h | 54 + GTAV/src/rage/engine.cpp | 333 + GTAV/src/rage/engine.h | 68 + GTAV/src/rage/invoker/invoker.cpp | 6373 +++++ GTAV/src/rage/invoker/invoker.h | 122 + GTAV/src/rage/invoker/natives.h | 5906 +++++ GTAV/src/rage/types/base_types.cpp | 20 + GTAV/src/rage/types/base_types.h | 1562 ++ GTAV/src/rage/types/bit_buffer.cpp | 75 + GTAV/src/rage/types/bit_buffer.h | 97 + GTAV/src/rage/types/generic_types.cpp | 47 + GTAV/src/rage/types/generic_types.h | 1110 + GTAV/src/rage/types/global_types.h | 105 + GTAV/src/rage/types/invoker_types.cpp | 9 + GTAV/src/rage/types/invoker_types.h | 49 + GTAV/src/rage/types/network_types.cpp | 8 + GTAV/src/rage/types/network_types.h | 473 + GTAV/src/rage/types/script_types.h | 125 + GTAV/src/stdafx.h | 102 + GTAV/src/util/caller.h | 158 + GTAV/src/util/config.cpp | 306 + GTAV/src/util/config.h | 84 + GTAV/src/util/dirs.cpp | 108 + GTAV/src/util/dirs.h | 93 + GTAV/src/util/fiber.cpp | 87 + GTAV/src/util/fiber.h | 82 + GTAV/src/util/fiber_pool.cpp | 43 + GTAV/src/util/fiber_pool.h | 25 + GTAV/src/util/hooking/hooking.cpp | 113 + GTAV/src/util/hooking/hooking.h | 136 + GTAV/src/util/hooking/minhook.h | 168 + GTAV/src/util/json.h | 21291 ++++++++++++++++ GTAV/src/util/localization.cpp | 46 + GTAV/src/util/localization.h | 22 + GTAV/src/util/log.cpp | 78 + GTAV/src/util/log.h | 68 + GTAV/src/util/math.h | 344 + GTAV/src/util/memory/memory.cpp | 18 + GTAV/src/util/memory/memory.h | 25 + GTAV/src/util/memory/pattern.cpp | 161 + GTAV/src/util/memory/pattern.h | 34 + GTAV/src/util/threads.cpp | 69 + GTAV/src/util/threads.h | 41 + GTAV/src/util/util.cpp | 222 + GTAV/src/util/util.h | 38 + GTAV/src/util/va.cpp | 62 + GTAV/src/util/va.h | 9 + GTAV/src/util/wic/wic_texture_loader.cpp | 1617 ++ GTAV/src/util/wic/wic_texture_loader.h | 14 + GTAV/src/util/wmi.cpp | 99 + GTAV/src/util/wmi.h | 8 + GTAV/src/util/xml/pugiconfig.h | 74 + GTAV/src/util/xml/pugixml.cpp | 10947 ++++++++ GTAV/src/util/xml/pugixml.h | 1369 + Nefarious Cheats.sln | 117 + 708 files changed, 133787 insertions(+) create mode 100644 CHEAT_1_SIGS.txt create mode 100644 GTAV/GTAV.vcxproj create mode 100644 GTAV/GTAV.vcxproj.filters create mode 100644 GTAV/GTAV.vcxproj.user create mode 100644 GTAV/src/dllmain.cpp create mode 100644 GTAV/src/global/lists.cpp create mode 100644 GTAV/src/global/lists.h create mode 100644 GTAV/src/global/ui_vars.cpp create mode 100644 GTAV/src/global/ui_vars.h create mode 100644 GTAV/src/global/vars.cpp create mode 100644 GTAV/src/global/vars.h create mode 100644 GTAV/src/menu/base/base.cpp create mode 100644 GTAV/src/menu/base/base.h create mode 100644 GTAV/src/menu/base/options/break.cpp create mode 100644 GTAV/src/menu/base/options/break.h create mode 100644 GTAV/src/menu/base/options/button.cpp create mode 100644 GTAV/src/menu/base/options/button.h create mode 100644 GTAV/src/menu/base/options/color_option.cpp create mode 100644 GTAV/src/menu/base/options/color_option.h create mode 100644 GTAV/src/menu/base/options/number.cpp create mode 100644 GTAV/src/menu/base/options/number.h create mode 100644 GTAV/src/menu/base/options/option.cpp create mode 100644 GTAV/src/menu/base/options/option.h create mode 100644 GTAV/src/menu/base/options/radio.cpp create mode 100644 GTAV/src/menu/base/options/radio.h create mode 100644 GTAV/src/menu/base/options/scroll.h create mode 100644 GTAV/src/menu/base/options/submenu_option.cpp create mode 100644 GTAV/src/menu/base/options/submenu_option.h create mode 100644 GTAV/src/menu/base/options/toggle.cpp create mode 100644 GTAV/src/menu/base/options/toggle.h create mode 100644 GTAV/src/menu/base/renderer.cpp create mode 100644 GTAV/src/menu/base/renderer.h create mode 100644 GTAV/src/menu/base/submenu.cpp create mode 100644 GTAV/src/menu/base/submenu.h create mode 100644 GTAV/src/menu/base/submenu_handler.cpp create mode 100644 GTAV/src/menu/base/submenu_handler.h create mode 100644 GTAV/src/menu/base/submenus/main.cpp create mode 100644 GTAV/src/menu/base/submenus/main.h create mode 100644 GTAV/src/menu/base/submenus/main/helper/color/helper_color_preset.cpp create mode 100644 GTAV/src/menu/base/submenus/main/helper/color/helper_color_preset.h create mode 100644 GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings.cpp create mode 100644 GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings.h create mode 100644 GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/helper/helper_color.cpp create mode 100644 GTAV/src/menu/base/submenus/main/helper/helper_color.h create mode 100644 GTAV/src/menu/base/submenus/main/helper/helper_esp.cpp create mode 100644 GTAV/src/menu/base/submenus/main/helper/helper_esp.h create mode 100644 GTAV/src/menu/base/submenus/main/helper/helper_rainbow.cpp create mode 100644 GTAV/src/menu/base/submenus/main/helper/helper_rainbow.h create mode 100644 GTAV/src/menu/base/submenus/main/helper/rainbow/helper_rainbow_load.cpp create mode 100644 GTAV/src/menu/base/submenus/main/helper/rainbow/helper_rainbow_load.h create mode 100644 GTAV/src/menu/base/submenus/main/misc.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/camera/aerial_camera.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/camera/aerial_camera.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/dispatch.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/dispatch.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/display.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/display.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/hud.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/hud.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_camera.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_camera.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_disables.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_disables.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_panels.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_panels.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_radio.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_radio.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_swaps.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/misc_swaps.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/panels/panels_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/panels/panels_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/panels/panels_parent.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/panels/panels_parent.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/scripthook.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/scripthook.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_add.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_add.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_presets.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_presets.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps_add.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps_add.h create mode 100644 GTAV/src/menu/base/submenus/main/misc/visions.cpp create mode 100644 GTAV/src/menu/base/submenus/main/misc/visions.h create mode 100644 GTAV/src/menu/base/submenus/main/network.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network.h create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_kd.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_kd.h create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_level.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_level.h create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_outfits.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_outfits.h create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_times.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_times.h create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_unlocks.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_unlocks.h create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_wins_losses.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/account/network_account_wins_losses.h create mode 100644 GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit_name.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit_name.h create mode 100644 GTAV/src/menu/base/submenus/main/network/account/wins/network_account_wins_losses_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/account/wins/network_account_wins_losses_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_ozark.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_ozark.h create mode 100644 GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_presets.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_presets.h create mode 100644 GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_targets.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_targets.h create mode 100644 GTAV/src/menu/base/submenus/main/network/finder/network_session_finder_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/finder/network_session_finder_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/network/friends/network_friends_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/friends/network_friends_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_account.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_account.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_friends.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_friends.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_global_chat.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_global_chat.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_host_toolkit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_host_toolkit.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_join_bypass.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_join_bypass.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_player_search_join.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_player_search_join.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_players.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_players.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_recent_players.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_recent_players.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_session.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_session.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_session_finder.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_session_finder.h create mode 100644 GTAV/src/menu/base/submenus/main/network/network_spoofing.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/network_spoofing.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_attackers.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_attackers.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_explosions.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_explosions.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/friendly/network_players_friendly_drops.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/friendly/network_players_friendly_drops.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_abusive.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_abusive.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_commands.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_commands.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_friendly.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_friendly.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_removals.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_removals.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_spawn_blocking.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_spawn_blocking.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_teleport.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_teleport.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_text.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_text.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_trolling.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_trolling.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_vehicle.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/network_players_vehicle.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/teleport/network_players_teleport_apartments.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/teleport/network_players_teleport_apartments.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_presets.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_presets.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_save.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_save.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/trolling/attachments/network_players_trolling_attachments_presets.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/trolling/attachments/network_players_trolling_attachments_presets.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_attachments.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_attachments.h create mode 100644 GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_sounds.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_sounds.h create mode 100644 GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_permanent.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_permanent.h create mode 100644 GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/network/search/network_player_search_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/search/network_player_search_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/network/session/network_session_excludes.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/session/network_session_excludes.h create mode 100644 GTAV/src/menu/base/submenus/main/network/session/network_session_overseer.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/session/network_session_overseer.h create mode 100644 GTAV/src/menu/base/submenus/main/network/session/overseer/network_session_overseer_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/session/overseer/network_session_overseer_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_icon.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_icon.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_motto.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_motto.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_name.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_name.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_presets.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_presets.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_rank.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_rank.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_tag.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_tag.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_crew.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_crew.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_intervals.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_intervals.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_ip.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_ip.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_name.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_name.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_player_rotation.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_player_rotation.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_profiles.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_profiles.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_rid.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_rid.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_vehicle_rotation.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_vehicle_rotation.h create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/profiles/network_spoofing_profiles_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/spoofing/profiles/network_spoofing_profiles_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_add.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_add.h create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual.h create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_load.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_load.h create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_save.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_save.h create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/network_blacklisted_players.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/network_blacklisted_players.h create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/network_desync_kick.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/network_desync_kick.h create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/network_join_blocking.cpp create mode 100644 GTAV/src/menu/base/submenus/main/network/toolkit/network_join_blocking.h create mode 100644 GTAV/src/menu/base/submenus/main/player.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player.h create mode 100644 GTAV/src/menu/base/submenus/main/player/animation.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/animation.h create mode 100644 GTAV/src/menu/base/submenus/main/player/animation/animations.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/animation/animations.h create mode 100644 GTAV/src/menu/base/submenus/main/player/animation/clipsets.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/animation/clipsets.h create mode 100644 GTAV/src/menu/base/submenus/main/player/animation/scenario.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/animation/scenario.h create mode 100644 GTAV/src/menu/base/submenus/main/player/appearance.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/appearance.h create mode 100644 GTAV/src/menu/base/submenus/main/player/model.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/model.h create mode 100644 GTAV/src/menu/base/submenus/main/player/movement.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/movement.h create mode 100644 GTAV/src/menu/base/submenus/main/player/particles.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/particles.h create mode 100644 GTAV/src/menu/base/submenus/main/player/ptfx/hand_trails.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/ptfx/hand_trails.h create mode 100644 GTAV/src/menu/base/submenus/main/player/ptfx/particle_manager.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/ptfx/particle_manager.h create mode 100644 GTAV/src/menu/base/submenus/main/player/wardrobe.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/wardrobe.h create mode 100644 GTAV/src/menu/base/submenus/main/player/wardrobe_save_load.cpp create mode 100644 GTAV/src/menu/base/submenus/main/player/wardrobe_save_load.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_blocking.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_blocking.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_add.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_add.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/limits/protection_message_limit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/limits/protection_message_limit.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/limits/protection_spawn_rate_limit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/limits/protection_spawn_rate_limit.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_anti_detection.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_anti_detection.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_entity_events.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_entity_events.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_events.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_events.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_join_blocking.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_join_blocking.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_limits.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_limits.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_net_events.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_net_events.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_presence_events.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_presence_events.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_reactions.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/protection_reactions.h create mode 100644 GTAV/src/menu/base/submenus/main/protection/reactions/protection_reactions_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protection/reactions/protection_reactions_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/protections.cpp create mode 100644 GTAV/src/menu/base/submenus/main/protections.h create mode 100644 GTAV/src/menu/base/submenus/main/settings.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/color/color_sync.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/color/color_sync.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/hide_info.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/hide_info.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/hk/hotkey_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/hk/hotkey_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/pos/position_scale_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/pos/position_scale_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/position_scale.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/position_scale.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_color.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_color.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_fonts.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_fonts.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_hotkey.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_hotkey.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_texture.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_texture.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_textures.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/settings_textures.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/themes.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/themes.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/themes/themes_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/themes/themes_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/translation.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/translation.h create mode 100644 GTAV/src/menu/base/submenus/main/settings/translation/translation_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/settings/translation/translation_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/edit/spawner_object_manage_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/edit/spawner_object_manage_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_building.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_building.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_manage.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_manage.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_select.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_select.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_settings.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_settings.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/ped/edit/spawner_ped_manage_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/ped/edit/spawner_ped_manage_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_manage.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_manage.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_settings.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_settings.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/edit/spawner_vehicle_manage_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/edit/spawner_vehicle_manage_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/garage/spawner_vehicle_garage_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/garage/spawner_vehicle_garage_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_garage.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_garage.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_manage.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_manage.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_modded.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_modded.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_save.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_save.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_settings.cpp create mode 100644 GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_settings.h create mode 100644 GTAV/src/menu/base/submenus/main/teleport.cpp create mode 100644 GTAV/src/menu/base/submenus/main/teleport.h create mode 100644 GTAV/src/menu/base/submenus/main/teleport/stores/teleport_stores_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/teleport/stores/teleport_stores_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_directional.cpp create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_directional.h create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_ipl.cpp create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_ipl.h create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_save_load.cpp create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_save_load.h create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_settings.cpp create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_settings.h create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_stores.cpp create mode 100644 GTAV/src/menu/base/submenus/main/teleport/teleport_stores.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/lights/neon/vehicle_customs_neon_color.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/lights/neon/vehicle_customs_neon_color.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/lights/vehicle_customs_neon.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/lights/vehicle_customs_neon.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_type.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_type.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_bumpers.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_bumpers.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_fender.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_fender.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_horn.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_horn.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_interior.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_interior.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lights.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lights.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lsc.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lsc.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_respray.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_respray.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_wheels.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_wheels.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_color.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_color.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_attr.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_attr.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_bike.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_bike.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_boat.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_boat.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_flying.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_flying.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_load.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_load.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_main.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_main.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/vehicle_modifiers_handling.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/modifiers/vehicle_modifiers_handling.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_acrobatics.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_acrobatics.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_parachute.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_parachute.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/seats/vehicle_seats_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/seats/vehicle_seats_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_autopilot.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_autopilot.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_boost.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_boost.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_collision.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_collision.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_customs.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_customs.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_doors.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_doors.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_gravity.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_gravity.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_health.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_health.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_modifiers.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_modifiers.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_movement.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_movement.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_multipliers.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_multipliers.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_particles.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_particles.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_ramps.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_ramps.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_randomization.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_randomization.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_seats.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_seats.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_speedometer.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_speedometer.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_tyre_tracks.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_tyre_tracks.h create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_weapons.cpp create mode 100644 GTAV/src/menu/base/submenus/main/vehicle/vehicle_weapons.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/aimbot.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/aimbot.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/entity_gun.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/entity_gun.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_editor.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_editor.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_gun.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_gun.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_attachment.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_attachment.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_attachment_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_attachment_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_tint.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_tint.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_tint_selected.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_tint_selected.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_weapon.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_weapon.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_weapons.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give/give_weapons.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give_weapons_ammo.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/give_weapons_ammo.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/gravity_gun.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/gravity_gun.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_load.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_load.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_swap.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_swap.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_matrix.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_matrix.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_multipliers.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_multipliers.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/particle_gun.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/particle_gun.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_attachment.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_attachment.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapon.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapon.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapons.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapons.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/triggerbot.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/triggerbot.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/weapon_disables.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/weapon_disables.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/weapon_modifiers.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/weapon_modifiers.h create mode 100644 GTAV/src/menu/base/submenus/main/weapon/weapon_mods.cpp create mode 100644 GTAV/src/menu/base/submenus/main/weapon/weapon_mods.h create mode 100644 GTAV/src/menu/base/submenus/main/world.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world.h create mode 100644 GTAV/src/menu/base/submenus/main/world/bullet_tracers.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/bullet_tracers.h create mode 100644 GTAV/src/menu/base/submenus/main/world/clear_area.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/clear_area.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_color.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_color.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_cross_multiplier.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_cross_multiplier.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_liquid.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_liquid.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_load.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_load.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_puddles.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_puddles.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_sky.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_sky.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_traffic.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_traffic.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_ui_color.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_ui_color.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle.h create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle_neons.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle_neons.h create mode 100644 GTAV/src/menu/base/submenus/main/world/game_fx.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/game_fx.h create mode 100644 GTAV/src/menu/base/submenus/main/world/local_entities.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/local_entities.h create mode 100644 GTAV/src/menu/base/submenus/main/world/ocean.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/ocean.h create mode 100644 GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads.h create mode 100644 GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads_edit.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads_edit.h create mode 100644 GTAV/src/menu/base/submenus/main/world/ocean/ocean_tuning.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/ocean/ocean_tuning.h create mode 100644 GTAV/src/menu/base/submenus/main/world/time/time_preset.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/time/time_preset.h create mode 100644 GTAV/src/menu/base/submenus/main/world/trains.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/trains.h create mode 100644 GTAV/src/menu/base/submenus/main/world/weather/fx/weather_fx.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/weather/fx/weather_fx.h create mode 100644 GTAV/src/menu/base/submenus/main/world/weather/weather_select.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/weather/weather_select.h create mode 100644 GTAV/src/menu/base/submenus/main/world/world_time.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/world_time.h create mode 100644 GTAV/src/menu/base/submenus/main/world/world_waypoint.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/world_waypoint.h create mode 100644 GTAV/src/menu/base/submenus/main/world/world_weather.cpp create mode 100644 GTAV/src/menu/base/submenus/main/world/world_weather.h create mode 100644 GTAV/src/menu/base/util/camera.cpp create mode 100644 GTAV/src/menu/base/util/camera.h create mode 100644 GTAV/src/menu/base/util/control.cpp create mode 100644 GTAV/src/menu/base/util/control.h create mode 100644 GTAV/src/menu/base/util/fonts.cpp create mode 100644 GTAV/src/menu/base/util/fonts.h create mode 100644 GTAV/src/menu/base/util/global.h create mode 100644 GTAV/src/menu/base/util/helpers.cpp create mode 100644 GTAV/src/menu/base/util/helpers.h create mode 100644 GTAV/src/menu/base/util/hotkeys.cpp create mode 100644 GTAV/src/menu/base/util/hotkeys.h create mode 100644 GTAV/src/menu/base/util/input.cpp create mode 100644 GTAV/src/menu/base/util/input.h create mode 100644 GTAV/src/menu/base/util/instructionals.cpp create mode 100644 GTAV/src/menu/base/util/instructionals.h create mode 100644 GTAV/src/menu/base/util/menu_input.cpp create mode 100644 GTAV/src/menu/base/util/menu_input.h create mode 100644 GTAV/src/menu/base/util/notify.cpp create mode 100644 GTAV/src/menu/base/util/notify.h create mode 100644 GTAV/src/menu/base/util/on_screen_ped.cpp create mode 100644 GTAV/src/menu/base/util/on_screen_ped.h create mode 100644 GTAV/src/menu/base/util/panels.cpp create mode 100644 GTAV/src/menu/base/util/panels.h create mode 100644 GTAV/src/menu/base/util/player_manager.cpp create mode 100644 GTAV/src/menu/base/util/player_manager.h create mode 100644 GTAV/src/menu/base/util/rainbow.cpp create mode 100644 GTAV/src/menu/base/util/rainbow.h create mode 100644 GTAV/src/menu/base/util/raycast.cpp create mode 100644 GTAV/src/menu/base/util/raycast.h create mode 100644 GTAV/src/menu/base/util/stacked_display.cpp create mode 100644 GTAV/src/menu/base/util/stacked_display.h create mode 100644 GTAV/src/menu/base/util/stats.cpp create mode 100644 GTAV/src/menu/base/util/stats.h create mode 100644 GTAV/src/menu/base/util/textures.cpp create mode 100644 GTAV/src/menu/base/util/textures.h create mode 100644 GTAV/src/menu/base/util/timers.cpp create mode 100644 GTAV/src/menu/base/util/timers.h create mode 100644 GTAV/src/menu/hooks/apply_player_physical_index.cpp create mode 100644 GTAV/src/menu/hooks/apply_weather_meta.cpp create mode 100644 GTAV/src/menu/hooks/arxan_integrity.cpp create mode 100644 GTAV/src/menu/hooks/crash.cpp create mode 100644 GTAV/src/menu/hooks/format_engine_string.cpp create mode 100644 GTAV/src/menu/hooks/game_chat.cpp create mode 100644 GTAV/src/menu/hooks/get_font_id.cpp create mode 100644 GTAV/src/menu/hooks/get_gxt_label.cpp create mode 100644 GTAV/src/menu/hooks/get_peer_address.cpp create mode 100644 GTAV/src/menu/hooks/get_proc_address.cpp create mode 100644 GTAV/src/menu/hooks/has_ros_privilege.cpp create mode 100644 GTAV/src/menu/hooks/hooks.cpp create mode 100644 GTAV/src/menu/hooks/hooks.h create mode 100644 GTAV/src/menu/hooks/matchmaking.cpp create mode 100644 GTAV/src/menu/hooks/pack_clone_create.cpp create mode 100644 GTAV/src/menu/hooks/pack_clone_sync.cpp create mode 100644 GTAV/src/menu/hooks/process_game_event.cpp create mode 100644 GTAV/src/menu/hooks/process_relay_usage.cpp create mode 100644 GTAV/src/menu/hooks/profanity.cpp create mode 100644 GTAV/src/menu/hooks/read_blacklist_message.cpp create mode 100644 GTAV/src/menu/hooks/read_kick_player_message.cpp create mode 100644 GTAV/src/menu/hooks/read_new_script_host_message.cpp create mode 100644 GTAV/src/menu/hooks/receive_broadcast.cpp create mode 100644 GTAV/src/menu/hooks/receive_clone_create.cpp create mode 100644 GTAV/src/menu/hooks/receive_clone_remove.cpp create mode 100644 GTAV/src/menu/hooks/receive_clone_sync.cpp create mode 100644 GTAV/src/menu/hooks/receive_network_event.cpp create mode 100644 GTAV/src/menu/hooks/receive_presence_event.cpp create mode 100644 GTAV/src/menu/hooks/receive_session_info.cpp create mode 100644 GTAV/src/menu/hooks/render_script_texture.cpp create mode 100644 GTAV/src/menu/hooks/scripts.cpp create mode 100644 GTAV/src/menu/hooks/shoot_bullet.cpp create mode 100644 GTAV/src/menu/hooks/stat_get_int.cpp create mode 100644 GTAV/src/menu/hooks/update_player_script_status.cpp create mode 100644 GTAV/src/menu/hooks/write_gs_item.cpp create mode 100644 GTAV/src/menu/hooks/write_ped_health_data_node.cpp create mode 100644 GTAV/src/menu/hooks/write_player_game_state_data_node.cpp create mode 100644 GTAV/src/menu/hooks/write_player_gamer_data_node.cpp create mode 100644 GTAV/src/menu/hooks/write_rid.cpp create mode 100644 GTAV/src/menu/init.cpp create mode 100644 GTAV/src/menu/init.h create mode 100644 GTAV/src/rage/api/api.cpp create mode 100644 GTAV/src/rage/api/api.h create mode 100644 GTAV/src/rage/engine.cpp create mode 100644 GTAV/src/rage/engine.h create mode 100644 GTAV/src/rage/invoker/invoker.cpp create mode 100644 GTAV/src/rage/invoker/invoker.h create mode 100644 GTAV/src/rage/invoker/natives.h create mode 100644 GTAV/src/rage/types/base_types.cpp create mode 100644 GTAV/src/rage/types/base_types.h create mode 100644 GTAV/src/rage/types/bit_buffer.cpp create mode 100644 GTAV/src/rage/types/bit_buffer.h create mode 100644 GTAV/src/rage/types/generic_types.cpp create mode 100644 GTAV/src/rage/types/generic_types.h create mode 100644 GTAV/src/rage/types/global_types.h create mode 100644 GTAV/src/rage/types/invoker_types.cpp create mode 100644 GTAV/src/rage/types/invoker_types.h create mode 100644 GTAV/src/rage/types/network_types.cpp create mode 100644 GTAV/src/rage/types/network_types.h create mode 100644 GTAV/src/rage/types/script_types.h create mode 100644 GTAV/src/stdafx.h create mode 100644 GTAV/src/util/caller.h create mode 100644 GTAV/src/util/config.cpp create mode 100644 GTAV/src/util/config.h create mode 100644 GTAV/src/util/dirs.cpp create mode 100644 GTAV/src/util/dirs.h create mode 100644 GTAV/src/util/fiber.cpp create mode 100644 GTAV/src/util/fiber.h create mode 100644 GTAV/src/util/fiber_pool.cpp create mode 100644 GTAV/src/util/fiber_pool.h create mode 100644 GTAV/src/util/hooking/hooking.cpp create mode 100644 GTAV/src/util/hooking/hooking.h create mode 100644 GTAV/src/util/hooking/minhook.h create mode 100644 GTAV/src/util/json.h create mode 100644 GTAV/src/util/localization.cpp create mode 100644 GTAV/src/util/localization.h create mode 100644 GTAV/src/util/log.cpp create mode 100644 GTAV/src/util/log.h create mode 100644 GTAV/src/util/math.h create mode 100644 GTAV/src/util/memory/memory.cpp create mode 100644 GTAV/src/util/memory/memory.h create mode 100644 GTAV/src/util/memory/pattern.cpp create mode 100644 GTAV/src/util/memory/pattern.h create mode 100644 GTAV/src/util/threads.cpp create mode 100644 GTAV/src/util/threads.h create mode 100644 GTAV/src/util/util.cpp create mode 100644 GTAV/src/util/util.h create mode 100644 GTAV/src/util/va.cpp create mode 100644 GTAV/src/util/va.h create mode 100644 GTAV/src/util/wic/wic_texture_loader.cpp create mode 100644 GTAV/src/util/wic/wic_texture_loader.h create mode 100644 GTAV/src/util/wmi.cpp create mode 100644 GTAV/src/util/wmi.h create mode 100644 GTAV/src/util/xml/pugiconfig.h create mode 100644 GTAV/src/util/xml/pugixml.cpp create mode 100644 GTAV/src/util/xml/pugixml.h create mode 100644 Nefarious Cheats.sln diff --git a/CHEAT_1_SIGS.txt b/CHEAT_1_SIGS.txt new file mode 100644 index 0000000..bac992d --- /dev/null +++ b/CHEAT_1_SIGS.txt @@ -0,0 +1,241 @@ +NRT:0:true:48 8D 0D ? ? ? ? 48 8B 14 FA E8 +ST:0:true:48 03 15 ? ? ? ? 4C 23 C2 49 8B 08 +GS:0:true:83 3D ? ? ? ? ? 75 17 8B 43 20 25 ? ? ? ? 3C 03 75 0B +CPF:0:true:48 8B 05 ? ? ? ? 45 ? ? ? ? 48 8B +GCP:0:true:4C 8D 05 ? ? ? ? 4D 8B 08 4D 85 C9 74 11 +WCHL:0:true:8B 05 ? ? ? ? 44 8B D3 8D 48 FF 85 C9 78 35 46 +WIHL:0:true:44 0F B7 05 ? ? ? ? 44 8B DD 41 FF C8 78 28 48 8B 1D +GCA:0:true:48 8B 05 ? ? ? ? 4A 8B 1C F0 48 85 DB 0F 84 +GTPC:0:true:E8 ? ? ? ? 48 8B 0D ? ? ? ? 48 8B D3 48 8B F8 E8 ? ? ? ? 48 85 FF 74 3B 48 8B 17 48 8B CF FF 52 +TPCP:0:true:48 8B 05 ? ? ? ? 8B A8 ? ? ? ? E8 ? ? ? ? 48 8B F8 +GEA:0:true:E8 ? ? ? ? 48 8B D8 48 85 C0 0F 84 ? ? ? ? 48 8B 0D ? ? ? ? 8B D7 E8 ? ? ? ? 48 8B F8 48 85 C0 +GEH:-104:true:48 F7 F9 49 8B 48 08 48 63 D0 C1 E0 08 0F B6 1C 11 03 D8 +PMSP:28:false:40 53 48 83 EC 20 E8 ? ? ? ? 48 8B D8 48 85 C0 74 12 +MSP:0:false:48 85 C0 0F 84 ? ? ? ? 8B 48 50 +GCNGPFI:0:true:48 83 EC 28 33 C0 38 05 ? ? ? ? 74 0A 83 F9 1F 77 05 E8 ? ? ? ? 48 83 C4 28 +GMI:0:true:E8 ? ? ? ? 0F B7 45 58 66 89 45 50 8B 45 50 41 0B C7 41 23 C6 0F +SVG:0:true:8B 91 ? ? ? ? F3 0F 10 05 ? ? ? ? 8D 42 FD A9 +GVPA:0:true:4C 8B 0D ? ? ? ? 45 33 C0 4D 85 C9 75 03 33 C0 C3 +DOI:0:true:89 1D ? ? ? ? 48 8B 5C 24 ? 48 8B 6C 24 ? 48 8B 74 24 ? 48 83 C4 30 5F +ATCT:0:true:48 83 EC 28 45 8B C8 44 8B C2 8B D1 48 8D 0D ? ? ? ? E8 ? ? ? ? 8B 05 +DST:0:true:48 8D 3D ? ? ? ? 80 3B 00 76 12 48 8B 0F 48 85 C9 74 0A 48 8B 01 FF 50 10 84 C0 75 3C +EXPD:0:true:48 8D ? ? ? ? ? C1 EF 12 8B D0 89 85 88 00 00 00 40 80 E7 01 E8 +EXPFX:0:true:48 8D 0D ? ? ? ? 41 0F 28 D9 45 33 C0 48 8B D3 E8 ? ? ? ? 44 +BL:0:true:4C 8D 05 ? ? ? ? 0F B7 C1 +OQ:118:true:40 53 48 83 EC 20 33 DB 44 8D 43 01 41 3B C8 75 60 +WT:0:true:4C 8D 0D ? ? ? ? 48 0F 45 D1 48 8B 0D ? ? ? ? 48 83 64 24 ? ? 4C 8D 05 ? ? ? ? E8 ? ? ? ? 84 C0 0F 85 +SPH:0:true:4C 8B 81 ? ? ? ? 4D 85 C0 0F 84 ? ? ? ? 41 8B 80 ? ? ? ? F3 +AWM:0:true:40 53 48 83 EC 30 0F 29 74 24 ? 48 8B D9 E8 ? ? ? ? F3 0F 10 83 ? ? ? ? F3 0F 10 35 +SCPCS:0:true:0F B7 02 44 0F B7 4A ? 66 83 F8 05 73 58 33 D2 66 45 85 C9 74 50 0F B7 C0 4C 8D 04 80 4D 03 +SCPCSC:0:true:48 89 5C 24 ? 48 89 4C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 83 EC 30 4C 8B FA 4D 8B E8 48 8B D1 4D 85 FF 74 10 +FGES:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 56 48 83 EC 20 33 DB 49 8B F9 41 8B +RSTRB:0:false:40 22 F0 44 3B 77 20 +RSTEB:0:false:40 22 F8 3B 73 44 +SCT:0:true:48 89 5C 24 ? 57 48 83 EC 20 8B F9 48 8B 0D ? ? ? ? 48 8B DA 33 D2 E9 +SWU:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 30 40 8A E9 48 8B 0D +GHNGP:0:true:E8 ? ? ? ? 33 C9 48 85 C0 74 2A 44 8D 41 01 66 89 4C 24 ? 48 89 4C 24 ? 4C 8D 4C 24 ? 48 +TSE:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 56 48 81 EC ? ? ? ? 45 8B F0 41 8B F9 +SISE:22:true:48 8B 8B ? ? ? ? E8 ? ? ? ? 8B D7 B9 ? ? ? ? 4C 8B C0 E8 +AOEB:0:true:44 38 35 ? ? ? ? F3 0F 10 45 ? F3 0F 11 75 ? F3 0F 11 45 ? 8A +UNOO:-81:true:48 83 60 ? ? 48 8D 05 ? ? ? ? 48 89 03 EB 02 33 DB 48 85 DB 0F 84 ? ? ? ? 48 +NOM:0:true:48 8B 0D ? ? ? ? 48 8D 15 ? ? ? ? E8 ? ? ? ? 4C 8B 13 4C 8D 05 ? ? ? ? 48 +HROFV:0:true:45 33 C9 45 85 C0 74 56 41 FF C8 74 4C 41 FF C8 74 42 41 FF C8 74 38 41 FF C8 74 2E 41 FF +GNGPFH:0:true:E8 ? ? ? ? 48 8B 0D ? ? ? ? 48 8B F0 E8 ? ? ? ? 33 FF 48 +GST:0:true:48 89 5C 24 ? 57 48 83 EC 20 48 8B FA 4C 8B C1 48 8D 54 24 ? 48 8D 0D ? ? ? ? E8 ? ? ? ? 48 8B D8 83 +STMNM:80:true:48 89 9C 24 ? ? ? ? E8 ? ? ? ? 48 8D 8C 24 ? ? ? ? 48 8B D8 E8 ? ? ? ? 48 8D 94 24 ? ? ? ? 0F 10 +PMDN:0:true:40 53 48 83 EC 20 48 8B 02 4C 8B C2 48 8B D9 48 8B D1 49 8B C8 FF 50 58 B8 +STL:0:true:40 53 48 83 EC 30 80 3D ? ? ? ? ? 0F 84 ? ? ? ? 48 8D 1D ? ? ? ? 4C 8D 0D ? ? ? ? 4C 8D 05 +UTL:0:true:48 8B C4 48 89 58 08 55 56 57 41 54 41 55 41 56 41 57 48 8D 68 A1 48 81 EC ? ? ? ? 83 3D +STLC:0:true:48 8B C4 48 89 58 08 55 48 8D 68 B8 48 81 EC ? ? ? ? 0F 28 05 ? ? ? ? 0F 28 2A 0F 29 70 E8 +SVLC:0:true:48 89 5C 24 ? 57 48 83 EC 20 80 3D ? ? ? ? ? 0F 84 ? ? ? ? 48 8D 3D ? ? ? ? 48 8D 1D +GSTFCT:0:true:0F B7 CA 83 F9 07 7F 5E 74 54 85 C9 74 48 FF C9 74 3C FF C9 74 30 +GNOFNI:0:true:48 89 5C 24 ? 48 89 6C 24 ? 66 89 54 24 ? 56 57 41 56 48 83 EC 20 45 +RBFBB:0:true:48 89 5C 24 ? 57 48 83 EC 20 83 64 24 ? ? 48 8B FA BB ? ? ? ? 48 8D 54 24 ? 44 8B C3 E8 +RIFBB:0:true:E8 ? ? ? ? 48 8B 4C 24 ? 48 8D 53 34 41 B8 ? ? ? ? E8 ? ? ? ? 40 84 FF 74 1E 8B 0E E8 +RV3FBB:0:true:48 8B C4 48 89 58 08 48 89 70 10 57 48 83 EC 60 48 8B F2 48 8B F9 48 8D 50 C8 48 8D 48 E8 41 8B D9 E8 +RAFBB:0:true:48 89 5C 24 ? 57 48 83 EC 30 41 8B F8 4C 8B D2 48 8B D9 45 85 C0 74 4F 8A 41 1C A8 02 75 48 A8 +RSFBB:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B D9 33 C9 41 8B F8 8A 43 1C 48 8B F2 A8 02 75 45 A8 01 74 05 +NER:0:true:48 8B 0D ? ? ? ? 4C 8D 0D ? ? ? ? 4C 8D 05 ? ? ? ? BA ? ? ? ? E8 ? ? ? ? 48 8B 0D ? ? ? ? 4C 8D 0D +GPI:0:true:48 89 5C 24 ? 57 48 83 EC 20 48 8B D9 48 8B 0D ? ? ? ? 48 8B FA 48 8B 01 FF 90 ? ? ? ? 84 C0 74 47 8B +NARRCF3:0:false:48 8B 0D ? ? ? ? 48 85 C9 74 08 48 8B 01 B2 01 FF 50 18 0F B7 56 0A 41 B0 01 48 8B CD E8 ? ? ? ? 33 C9 +NB:0:false:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 30 41 8B D8 8B FA 8B F1 E8 +SSIR:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 56 48 83 EC 30 48 83 3D ? ? ? ? ? 8B +RSINFO:0:true:48 8D 05 ? ? ? ? 4D 69 C0 ? ? ? ? 4C 03 C0 41 83 B8 ? ? ? ? ? 0F 86 ? ? ? ? 83 CD FF 48 8D 15 +GSIFGS:0:true:48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 56 48 81 EC ? ? ? ? 48 8B F2 33 D2 49 8B F8 4C 8B F1 44 8D 42 7C 48 8D 4C 24 ? 41 8A E9 C6 44 24 ? ? E8 +SNER:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 57 41 56 41 57 48 83 EC 60 4C 8B F9 48 8D 48 C8 49 8B F1 49 +SNEA:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 30 8B 6C 24 60 8B 74 24 68 49 8B C1 4D 8B D0 +SGCE:0:true:4C 8B DC 49 89 5B 08 49 89 73 10 49 89 7B 18 41 56 48 83 EC 40 48 8B F1 48 8B C2 49 89 53 F0 48 8D 0D +SFR:0:true:80 3D ? ? ? ? ? 75 03 32 C0 C3 4C 8B CA 8B 15 ? ? ? ? 4C 8B C1 48 8D 0D ? ? ? ? E9 +SGCM:0:true:E8 ? ? ? ? 41 FF C4 48 83 C5 08 44 3B A7 ? ? ? ? 0F 8C ? ? ? ? 44 89 AB ? ? ? ? 45 88 2E +GCHP:0:true:48 8B 0D ? ? ? ? 4C 8D 44 24 ? 48 8D 95 ? ? ? ? 48 89 85 ? ? ? ? E8 ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? 48 8D +GCPK:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8D A9 ? ? ? ? 48 8B F1 41 8B D8 +NODES_1:0:true:48 8B 07 48 8B CF FF 90 ? ? ? ? 84 C0 74 07 41 C7 06 ? ? ? ? 41 39 36 76 5E 4C 8B 17 45 33 C9 48 +NODES_2:0:true:33 F6 39 75 00 0F 86 ? ? ? ? 48 8B 03 45 33 C9 44 8B FE 45 8D 41 03 48 8B CB 4D 6B FF 64 4D 8D 34 3F 49 +NODES_3:0:true:48 8B 07 48 8B CF FF 90 ? ? ? ? 84 C0 74 07 41 C7 06 ? ? ? ? 44 38 23 74 14 48 8B 07 48 8B CF FF 90 +NODES_4:0:true:48 8B 06 4C 8D B5 ? ? ? ? 49 8B D6 45 33 C0 48 8B CE FF 50 38 48 8B 06 48 8B CE FF 90 ? ? ? ? 33 +NODES_5:0:true:45 8B F4 45 39 27 76 7C 48 8B 07 45 33 C9 48 8D 96 ? ? ? ? 41 8B DE 45 8D 41 20 48 8B CF 48 8D 14 +NODES_6:0:true:48 8B 06 48 8B CE FF 90 ? ? ? ? 33 DB 84 C0 74 06 C7 07 ? ? ? ? 39 1F 76 21 4C 8B 0E 48 8D 95 ? ? ? ? 45 33 C0 +NODES_7:86:true:E8 ? ? ? ? 48 8B 07 48 8D 9E ? ? ? ? 48 8B D3 45 33 C0 48 8B CF FF 50 38 45 33 FF 44 38 3B 75 1C 48 8B 07 +NODES_8:0:true:48 8B 06 45 33 C9 4D 8D AE ? ? ? ? 45 8D 41 08 49 8B D5 48 8B CE FF 50 68 33 ED 4D 8D A6 ? ? ? ? 41 +NODES_9:0:true:33 ED 41 39 2E 76 2D 48 8D 96 ? ? ? ? 45 33 C0 48 8B CF 48 8D 14 AA E8 ? ? ? ? C6 84 35 ? ? ? ? ? C6 84 35 +NODES_10:0:true:B8 ? ? ? ? 41 39 06 41 0F 42 06 33 ED 41 89 06 85 C0 74 7A 44 8B FD 45 33 C0 48 8B CF +NODES_11:0:true:44 8B E7 41 39 3F 76 66 48 8B 06 45 33 C9 41 8B FC 49 8D 96 ? ? ? ? 48 8D 1C 7F 45 8D 41 03 +NODES_12:0:true:45 8B F7 44 39 3B 76 24 4C 8B 17 45 33 C9 41 8B D6 48 83 C2 4A 45 8D 41 20 48 8B CF 48 8D 14 96 41 FF 52 68 41 FF C6 44 3B 33 72 DC 48 8B +NODES_13:0:true:48 8B 07 48 8B CF FF 90 ? ? ? ? 84 C0 74 06 C7 03 ? ? ? ? 41 BF ? ? ? ? 44 38 65 00 75 33 45 38 26 75 2E 48 8B 07 48 8B CF +NODES_14:0:true:45 33 E4 41 8B EC 45 39 26 76 44 48 8B 07 44 8B FD 45 33 C0 49 8D 1C 37 48 8B CF 48 8D 93 ? ? ? ? FF 50 38 44 38 A3 ? ? ? ? 74 1A 48 8B 07 +RWOM:0:true:F3 0F 10 05 ? ? ? ? 0F 57 C9 0F 2F C1 76 1B 48 8B 05 ? ? ? ? 0F 2F 48 70 73 0E 48 8D 0D ? ? ? ? 33 +MFI:0:true:0F 2F 35 ? ? ? ? 0F 86 ? ? ? ? 0F 28 05 ? ? ? ? 48 8D 4D B0 41 0F 28 D9 48 8B D3 0F 28 D7 0F 29 45 A0 +VFXW:0:true:48 8D 05 ? ? ? ? 48 6B FF 45 F3 0F 59 0D ? ? ? ? F3 41 0F 59 9E ? ? ? ? F3 0F 10 BD ? ? ? ? 48 03 FE 48 69 FF ? ? ? ? F3 +FL:0:true:48 03 0D ? ? ? ? E8 ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? 84 C0 74 10 48 8D 4C 24 ? 44 8B +SPE:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 56 48 81 EC ? ? ? ? 48 8B EA 44 8B F1 49 8B D9 41 +NBC:0:true:48 8B 0D ? ? ? ? 33 D2 E8 ? ? ? ? 84 C0 75 ? 48 8B 05 ? ? ? ? BA +VFX-S:0:true:48 8D 0D ? ? ? ? 44 8A CE 44 8A C5 8B D3 44 89 64 24 ? 89 7C 24 20 E8 ? ? ? ? 8D +VFX-P:0:true:48 8B 05 ? ? ? ? 83 20 00 48 8B 0D ? ? ? ? 48 83 C4 28 E9 +POOL_PI:0:true:48 8B 05 ? ? ? ? 0F B7 48 10 66 03 CA 66 44 03 C1 41 80 F9 04 +POOL_A:0:true:48 8B 0D ? ? ? ? E8 ? ? ? ? 48 85 C0 74 0E 48 8B D6 48 8B C8 E8 ? ? ? ? 48 8B D8 48 89 5F 48 +POOL_NEQ:0:true:48 8B 05 ? ? ? ? 48 8B E9 44 8B 40 20 8B 40 10 41 C1 E0 02 41 C1 F8 02 41 2B C0 +GGXTL:0:false:48 89 5C 24 ? 57 48 83 EC 20 48 8B DA 48 8B F9 48 85 D2 75 44 +PGDN:0:true:48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 56 48 83 EC 20 48 8D 99 ? ? ? ? 33 ED 48 8B FA 48 8B F1 48 39 2B 74 +HRP:0:true:45 33 C9 4C 8B D1 44 39 89 ? ? ? ? 76 60 83 FA 1C 7D 5B 44 8B C2 41 FF C8 74 36 41 83 F8 06 74 30 +SJRM:0:true:E8 ? ? ? ? 48 8D 8C 24 ? ? ? ? 8A D8 E8 ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? 8A C3 48 81 C4 +RSIR:0:true:48 8B C4 48 89 58 08 48 89 70 10 48 89 78 18 55 41 54 41 56 48 8D 68 88 48 81 EC ? ? ? ? 45 33 F6 48 8B F9 45 8D 66 01 44 39 B1 ? ? ? ? 0F 86 ? ? ? ? 48 8D 4C 24 ? E8 +SAGTSC:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B F2 48 8B D9 E8 ? ? ? ? 84 C0 74 77 F6 43 1C 01 75 71 8B 4B 10 8D 41 06 3B 43 0C 7F 66 F6 43 1C 02 BF +RCC:-73:true:41 8A C6 44 88 AC 24 ? ? ? ? C0 E8 07 24 01 88 84 24 ? ? ? ? E8 ? ? ? ? 44 0F B7 +RCS:-48:true:E8 ? ? ? ? 4C 8B 8C 24 ? ? ? ? 48 83 64 24 ? ? 8D 55 FA 48 8B C8 45 33 C0 E8 +PADN:0:true:40 53 48 83 EC 70 8A 81 ? ? ? ? F3 0F 10 81 ? ? ? ? F3 0F 10 89 ? ? ? ? 4C 8B +SEM:0:true:40 53 48 83 EC 20 48 81 C1 ? ? ? ? 48 8B DA 48 8B 01 FF 90 ? ? ? ? 33 C9 48 85 C0 0F 84 ? ? ? ? 0F 28 48 60 0F +APCM:0:true:4D 85 C9 0F 84 ? ? ? ? 48 8B C4 48 89 58 08 48 89 70 10 48 89 78 18 4C 89 48 +RUTDRB:0:true:48 8D 05 ? ? ? ? 48 8D 8E ? ? ? ? 48 8D 54 24 ? 48 89 5C 24 ? 48 89 44 24 +RCR:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 54 41 56 41 57 48 83 EC 50 4C 8B F2 4D 8B E0 48 +HMKP:0:true:48 89 5C 24 ? 57 48 83 EC 20 41 B8 ? ? ? ? 48 8B FA 48 8B D9 E8 ? ? ? ? 84 C0 74 57 48 8D +HMNSH:0:true:E8 ? ? ? ? 84 C0 74 60 4C 39 77 40 74 29 48 8B 4C 24 ? 48 8B 01 FF 50 28 48 8B 4F 40 44 0F B7 +HNE:0:true:66 41 83 F9 ? 0F 83 ? ? ? ? 4C 8B DC 49 89 5B 08 49 89 6B 10 49 89 73 18 57 41 56 41 57 48 83 EC 50 8B +RBV:-46:true:49 8B F0 4C 8B F2 41 B7 01 E8 ? ? ? ? 44 8B E0 89 45 F4 48 8B 03 48 8B CB FF 90 +WUTDWB:0:true:48 89 5C 24 ? 57 48 83 EC 20 48 8B 59 18 41 8B F8 F6 43 1C 01 75 2D 8B 4B 10 42 8D 04 01 3B 43 0C 7F +HNGE:0:true:48 89 5C 24 ? 57 48 83 EC 20 48 8B 05 ? ? ? ? 33 DB 48 85 C0 74 39 8B 50 20 8B 40 10 C1 E2 02 C1 FA 02 3B C2 +APPI:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC 20 41 8A E8 4C 8B F2 48 8B F1 +HPE:0:true:E8 ? ? ? ? F6 C3 02 74 0D 48 8D 4C 24 ? 83 E3 FD E8 ? ? ? ? F6 C3 01 +STT:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 80 B9 ? ? ? ? ? 8B FA 48 8B D9 74 05 8B 41 10 EB 7F E8 ? ? ? ? 83 25 +PCC:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B F9 48 8B CA 49 8B E9 +SHP:0:true:0F B7 15 ? ? ? ? 45 33 F6 8B E9 85 C9 B8 ? ? ? ? 45 8D 7E 01 41 8A F6 41 8B DE 0F 44 E8 +MSH:0:true:48 89 5C 24 ? 57 48 83 EC 50 48 8B FA 48 8B D9 E8 ? ? ? ? 83 7B 10 08 +PCS:0:true:48 89 5C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 48 8B 02 +SULL:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 56 48 83 EC 20 48 8B F2 BB ? ? ? ? 45 8B F0 48 C1 +WDD:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 41 8B F0 48 8B EA 48 8B D9 41 83 F8 20 0F 8E +HPBR:0:true:E8 ? ? ? ? 84 C0 0F 85 ? ? ? ? 83 FB 01 75 2D 8B 45 7F 48 8D 55 CF 48 8D 4D EF 44 8B CE +PRU:-73:true:83 65 D0 00 83 65 D4 00 83 65 D8 00 83 65 E0 00 C6 45 DC 00 48 8D 5D E4 BF ? ? ? ? 48 +NPM:0:true:48 8B 0D ? ? ? ? E8 ? ? ? ? 48 85 C0 0F 84 ? ? ? ? 48 8B 0D ? ? ? ? E8 +GCRASH:51:true:48 83 EC 48 48 83 64 24 ? ? 83 4C 24 ? ? 33 D2 48 8D 05 ? ? ? ? 44 8D 4A 0F 48 8D 0D ? ? ? ? 41 B8 ? ? ? ? 48 89 44 24 ? E8 +CHATINF:0:true:4C 8B 05 ? ? ? ? 4D 85 C0 74 E4 83 CA FF 48 8D 05 ? ? ? ? 4C 8D 4B 70 89 54 24 48 89 54 24 40 48 89 44 24 +TEXS:0:true:48 8D 0D ? ? ? ? E8 ? ? ? ? 8B 45 EC 4C 8D 45 F0 48 8D 55 EC 48 8D 0D ? ? ? ? 89 45 F0 E8 +SMMR:0:true:48 8B C4 48 89 58 18 44 89 48 20 89 50 10 55 56 57 41 54 41 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 +RXMLS:0:true:E8 ? ? ? ? 48 85 C0 74 52 83 78 40 00 74 06 48 8B 40 38 EB 02 33 C0 +RXMLNS:0:true:E8 ? ? ? ? 48 89 45 38 48 85 C0 74 16 48 8D 55 38 48 8D 8F ? ? ? ? 41 B8 +RMMR:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 81 EC ? ? ? ? 41 83 21 00 49 8B C0 49 8B D9 48 8B F1 48 8D 15 ? ? ? ? 41 B1 01 48 8B C8 45 33 C0 E8 +WMMR:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ? 4D 8B F1 45 8B +WESTR:0:true:E8 ? ? ? ? 84 C0 0F 84 ? ? ? ? 48 BD ? ? ? ? ? ? ? ? 4D 8B C7 49 8D 04 2F 48 83 F8 +GGESLC:0:true:48 8B C4 48 89 58 08 48 89 70 10 48 89 78 18 4C 89 60 20 55 41 56 41 57 48 8D 68 C8 48 81 EC ? ? ? ? 0F 29 70 D8 49 8B F9 4C 8B FA 0F 28 +WAYP:0:true:48 8D 0D ? ? ? ? 48 98 4C 8B C6 41 8B 44 85 ? 0D ? ? ? ? 89 44 24 30 83 64 24 ? ? C6 44 24 +NSQ:0:true:48 8B 0D ? ? ? ? 41 8A D9 +UUIV1:0:true:48 83 EC 18 48 8B 0D ? ? ? ? 4C 8D 05 ? ? ? ? F3 0F 10 89 ? ? ? ? F3 0F 10 81 ? ? ? ? F3 0F 10 99 ? ? ? ? 0F 14 D9 +UUIV2:0:true:48 8B C4 53 48 81 EC ? ? ? ? 80 B9 ? ? ? ? ? 0F 29 70 E8 0F 29 78 D8 48 8B D9 44 0F 29 40 ? 44 0F 29 48 ? 44 +UIVS:0:true:48 8D 0D ? ? ? ? 0F 29 44 24 ? E8 ? ? ? ? 0F 28 05 ? ? ? ? 0F 59 44 24 ? F3 48 0F 2C C0 0F C6 C0 55 +SVNUI:0:true:40 53 48 83 EC 30 F3 0F 10 15 ? ? ? ? 48 8D 15 ? ? ? ? 41 B1 01 48 8B D9 E8 ? ? ? ? 48 8D 15 ? ? ? ? F3 0F +VFXL:0:true:48 8D 05 ? ? ? ? 4C 8D 1C 7F 48 8B 4A 10 49 C1 E3 05 4C 03 D8 0F B6 85 ? ? ? ? 48 23 C8 8B 42 18 48 3B +HVBO:0:true:40 53 48 83 EC 20 8A D9 8A D1 48 8D 0D ? ? ? ? 45 33 C0 E8 ? ? ? ? 88 1D ? ? ? ? 48 83 C4 20 +NS_ABTQ:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 83 EC 30 45 8B F9 41 8B E8 4C 8B F2 48 8B F1 33 DB E8 ? ? ? ? 48 85 C0 0F 85 ? ? ? ? 33 D2 +NS_AITB:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B F2 48 8D 54 24 +RTMH:0:true:48 8B C4 48 89 58 08 48 89 70 10 48 89 78 20 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 49 8B 00 48 +RTMBB:0:true:E8 ? ? ? ? 84 C0 0F 84 ? ? ? ? 48 8D 4C 24 ? E8 ? ? ? ? 3B C7 0F 85 ? ? ? ? 44 38 3D ? ? ? ? 0F 85 +RCMBB:0:true:E8 ? ? ? ? 84 C0 74 0A 48 8D 4C 24 ? E8 ? ? ? ? 48 8B 45 50 48 8D 55 +GCFP:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 56 48 83 EC 20 48 8B D9 48 81 C1 ? ? ? ? 48 8B EA 33 FF E8 ? ? ? ? 48 3B E8 75 09 48 8D BB ? ? ? ? EB 3D 8B F7 39 BB +CKL:0:false:E8 ? ? ? ? 48 8B 56 08 84 C0 74 59 48 FF C3 44 38 3C 1A 75 F7 48 8D 4D 00 4C 8B C3 E8 ? ? ? ? 48 8D 4D 48 E8 +CKK:0:false:E8 ? ? ? ? 84 C0 0F 85 ? ? ? ? 48 8B 56 08 4C 8B C3 49 FF C0 46 38 3C 02 75 F7 48 8D 4D 00 E8 ? ? ? ? 48 8D 4D 00 E8 ? ? ? ? 48 8B 56 08 84 C0 0F 84 +RULLFBB:0:true:48 8B C4 48 89 58 08 56 57 41 56 48 83 EC 20 41 8B F8 33 DB 41 B8 ? ? ? ? 4C 8B F2 48 8B F1 89 58 18 41 3B F8 7E 38 48 8D 50 20 89 58 20 E8 +RNMHFBB:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 8A 42 1C 40 32 FF 48 8B DA 48 8B F1 A8 02 0F 85 ? ? ? ? A8 01 74 05 8B 4A 0C EB 03 8B 4A 14 8B 42 10 83 +WUITBB:0:true:48 89 5C 24 ? 44 8B DA 83 CB FF 4D 63 D1 49 C1 FA 03 41 83 E1 07 4C 03 D1 B9 ? ? ? ? 41 2B C8 D3 E3 41 D3 E3 41 8B C9 8B D3 41 8B C3 C1 EA +RYTD:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 7C 24 ? 41 54 41 56 41 57 48 83 EC 50 48 8B EA 4C 8B FA 48 8B D9 4D 85 C9 B2 +ASDFWD:0:true:0F B7 9C 24 ? ? ? ? 41 B1 01 4D 8B C6 49 8B CF 0F B7 D3 E8 ? ? ? ? 48 +ASDFWE:0:true:45 84 C0 0F 85 ? ? ? ? 48 89 5C 24 ? 4C 89 4C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 83 EC 50 +CGIP:0:true:48 89 5C 24 ? 57 48 83 EC 20 48 8B DA 48 8B F9 E8 ? ? ? ? 48 8B 43 60 48 89 47 60 48 8B 43 68 48 89 47 68 0F 10 43 +SGIP:0:true:48 89 5C 24 ? 57 48 81 EC ? ? ? ? 48 8B FA 48 8B D9 E8 ? ? ? ? 8B 83 ? ? ? ? 4C 8D 4B 78 85 C0 74 2E C7 44 24 +SGIPT:0:true:48 8D 05 ? ? ? ? 48 8D 3D ? ? ? ? 48 8D 4C 24 ? 48 69 D2 ? ? ? ? 48 03 D0 48 89 7C 24 +RPFBB:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B 01 48 8D 71 0C 48 8B FA 66 83 3E 08 48 8B D9 0F 93 44 24 ? FF 50 10 48 +SRE:0:true:40 53 48 83 EC 20 0F B7 D9 48 8B 0D ? ? ? ? B2 01 E8 ? ? ? ? 48 8B 0D ? ? ? ? E8 ? ? ? ? 48 8B C8 33 C0 48 85 C9 74 08 0F B7 D3 E8 ? ? ? ? 48 8B 0D +UPSS:0:true:40 53 48 83 EC 30 48 8B 05 ? ? ? ? 4C 8B D1 41 83 7A ? ? 48 8B 48 40 7D 23 48 85 C9 0F 84 ? ? ? ? 48 8B 01 4C 8D 05 +WATDWB:0:true:48 8D 05 ? ? ? ? 48 8D 51 30 44 8D 4E 13 48 8D 4D E0 45 33 C0 48 89 75 F0 48 89 45 E0 C6 45 E8 02 E8 +HHJR:0:true:48 8B C4 4C 89 48 20 4C 89 40 18 48 89 50 10 55 53 56 57 41 54 41 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 4C 8B F9 48 8D 4D +PDN1:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 54 41 56 41 57 48 83 EC 30 4D 8B F9 8B F2 4C 8B F1 85 51 +PDN2:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC 30 48 8B 01 4C 8B F2 33 D2 48 8B F1 FF 90 ? ? ? ? 84 C0 0F 84 +RID0:0:true:48 89 5C 24 ? 57 48 83 EC 20 48 8B FA 48 8B D9 E8 ? ? ? ? 48 8B 47 60 4C 8B C7 48 8D 8B ? ? ? ? 48 89 43 60 +SBULLET:0:true:48 8B C4 48 89 58 20 4C 89 40 18 55 56 57 41 54 41 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 0F 29 70 B8 0F 29 78 A8 44 0F 29 40 ? 44 0F 29 48 +WPHDN:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 56 48 83 EC 20 48 8B B9 ? ? ? ? 4C 8D B1 +WPGDN:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC 30 0F B7 81 ? ? ? ? 48 8B B1 +RBLM:0:true:48 8B C4 48 89 58 08 48 89 70 10 57 48 83 EC 20 48 8B F1 48 8D 48 18 33 DB 48 8B FA 89 58 18 E8 ? ? ? ? 85 C0 74 48 8B 44 24 40 39 05 ? ? ? ? 75 3C 44 8D 43 40 48 8B D6 +HDNM:0:true:48 8B C4 48 89 58 08 48 89 70 10 48 89 78 20 55 41 56 41 57 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 83 8D ? ? ? ? ? 41 8B 78 40 49 8B 58 38 4C 8B F9 48 8D 4C 24 +HDPR:0:true:48 8B C4 48 89 58 10 44 89 48 20 4C 89 40 18 48 89 48 08 55 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 ? 48 81 EC +GPT:0:true:48 89 5C 24 ? 57 48 83 EC 20 48 8B F9 48 8D 0D ? ? ? ? E8 ? ? ? ? 80 3D ? ? ? ? ? 75 56 33 C9 E8 ? ? ? ? 48 8B D8 E8 +GSME:0:true:40 53 48 83 EC 20 48 8B C2 48 8B D9 33 D2 48 8B C8 E8 ? ? ? ? 33 D2 44 8B D0 F7 35 ? ? ? ? 44 8B C2 48 8B 15 ? ? ? ? 46 8B 0C 82 41 +RSF:0:true:89 54 24 10 55 53 56 57 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 48 83 79 ? ? 41 8B F8 48 8B F1 75 07 32 C0 E9 ? ? ? ? 48 8B 06 +CGFXF:0:true:40 53 48 83 EC 20 C7 41 ? ? ? ? ? 48 8D 05 ? ? ? ? 48 8B D9 48 89 01 C7 41 ? ? ? ? ? 48 8D 05 ? ? ? ? 48 89 01 +D:0:true:48 83 EC 28 F0 FF 49 08 75 0F 48 85 C9 74 0A 48 8B 01 BA ? ? ? ? FF 10 48 83 C4 28 C3 +CIDFF:0:true:40 55 48 8B EC 48 81 EC ? ? ? ? 49 8B 00 F3 0F 10 02 F3 0F 10 4A ? 83 65 B8 00 83 65 C0 00 83 65 C4 00 F3 +AFL:0:true:40 53 48 83 EC 20 48 8B 41 40 4D 63 C8 4C 8B D9 46 0F B6 14 08 48 8B DA 41 81 E2 ? ? ? ? 41 8B C2 45 8B CA 49 F7 D9 4C 0B +VERTEX:0:true:E8 ? ? ? ? F3 0F 10 35 ? ? ? ? F3 0F 10 44 1D ? F3 0F 10 4C 1D ? 8B 47 28 41 0F 28 DB 41 0F 28 +RST:0:true:48 8B C4 48 89 58 10 55 56 57 41 54 41 56 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 0F 29 70 C8 0F 29 78 B8 44 0F 29 40 ? 44 0F +FT:0:true:48 8B 05 ? ? ? ? 48 8B CB 48 69 C9 ? ? ? ? 40 38 AC 01 ? ? ? ? 74 0F E8 ? ? ? ? 0F 28 CE 8B CB E8 ? ? ? ? F3 0F 10 05 ? ? ? ? B2 01 E8 +FMH:0:true:48 8B 0D ? ? ? ? E8 ? ? ? ? 48 8B 0D ? ? ? ? 33 DB 48 85 C9 74 20 E8 ? ? ? ? 48 8B 0D +GFIDT:0:true:48 85 D2 74 10 49 83 C8 FF 49 FF C0 42 80 3C 02 ? 75 F6 EB 03 45 33 C0 E9 +MH:0:true:48 8B 0D ? ? ? ? 45 33 C0 48 8B 01 41 8D 50 20 FF 50 50 48 85 C0 74 0D 48 8B C8 E8 +SM:0:true:48 8D 0D ? ? ? ? 03 D3 E8 ? ? ? ? 66 44 39 7D ? 74 09 48 8B 4D E8 E8 +D3DDEV:0:true:48 8D 05 ? ? ? ? 33 D2 48 89 44 24 ? 48 8D 05 ? ? ? ? 48 8B CB 48 89 44 24 ? 48 8D 05 ? ? ? ? 48 89 44 24 +GRCTFDX:0:true:48 8B 0D ? ? ? ? 45 33 C0 48 8B 01 33 D2 FF 90 ? ? ? ? 48 8B 0D ? ? ? ? 83 64 24 +TLSA:0:true:E8 ? ? ? ? 48 85 C0 0F 84 ? ? ? ? 48 8B D7 48 8B C8 E8 ? ? ? ? E9 ? ? ? ? B9 +SD:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 63 FA 48 8B D9 E8 ? ? ? ? C7 43 ? ? ? ? ? 48 8D 05 ? ? ? ? 48 89 03 +SSI:0:true:E8 ? ? ? ? 8B 00 48 8B 0D ? ? ? ? 48 63 D0 0F AF 05 ? ? ? ? 44 0F B6 04 0A 48 63 D0 41 FF C7 48 03 15 +IVPS:0:true:45 33 D2 4C 8B D9 85 D2 78 3A 48 8B 41 40 4C 63 C2 46 0F B6 0C 00 8B 41 4C 41 81 E1 ? ? ? ? 45 8B C1 0F AF +ADTP:0:true:89 54 24 10 48 83 EC 28 48 8B 41 40 4C 63 CA 46 0F B6 14 08 8B 41 4C 41 81 E2 ? ? ? ? 45 8B CA 0F AF C2 +AGRCTD:0:true:48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 0F B7 41 28 45 33 D2 8B DA 4C 8B C9 49 8B F8 41 8B CA 8B D0 41 8D 72 01 +WEATHER:0:true:48 8D 0D ? ? ? ? E8 ? ? ? ? 39 05 ? ? ? ? 74 0B 39 05 +GSS:0:true:48 8D 0D ? ? ? ? E8 ? ? ? ? 83 38 FF 74 2D +GSS_G:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B EA 48 8B F1 49 8B D0 B9 ? ? ? ? 49 8B F8 E8 +PRESFIX:0:false:E8 ? ? ? ? 84 C0 0F 84 ? ? ? ? 8B 85 ? ? ? ? 8B 9D +GCHATS:0:true:48 8B 05 ? ? ? ? 44 38 60 14 75 06 44 39 60 04 74 10 33 C9 E8 ? ? ? ? 83 B8 +RI:0:true:48 8D 0D ? ? ? ? 48 8B D7 E8 ? ? ? ? 48 8D 0D ? ? ? ? 8A D8 E8 ? ? ? ? 84 DB 75 13 48 8D 0D ? ? ? ? 48 8B D7 +RESOL:0:true:44 8B 05 ? ? ? ? 48 8D 0D ? ? ? ? 48 8D 15 ? ? ? ? 48 8D 05 ? ? ? ? 48 0F 45 C1 44 39 2D ? ? ? ? 48 8D 0D +HHJR_1:0:true:85 FF 74 17 FF C9 75 26 8A 9D ? ? ? ? C7 44 24 ? ? ? ? ? 80 E3 01 EB 0F +HHJR_2:0:true:8A 85 ? ? ? ? 48 63 5C 24 ? 45 85 E4 88 44 24 48 41 8B 84 9F ? ? ? ? 40 0F 94 C7 4C 89 74 24 ? 44 89 +GFI:0:true:85 D2 74 68 FF CA 74 5B FF CA 74 4E FF CA 74 41 FF CA 74 34 FF CA 74 27 FF CA 74 1A FF CA 74 0D +RSTS:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 33 DB 41 8B F0 8B EA 48 8B F9 39 99 ? ? ? ? 76 1F 48 8D 0C 9B 44 8B C6 8B D5 48 C1 E1 +GNGRCT:0:true:8B 91 ? ? ? ? 33 C0 81 FA ? ? ? ? 73 13 48 8D 04 92 48 C1 E0 04 48 03 C1 FF C2 89 91 ? ? ? ? C3 +RSRP:0:true:8B 05 ? ? ? ? 3B 05 ? ? ? ? 0F 84 ? ? ? ? 48 63 0D ? ? ? ? F3 0F 10 05 +GNMTI:0:true:33 C0 33 D2 48 83 C1 70 80 39 00 74 18 48 FF C2 FF C0 48 81 C1 ? ? ? ? 48 81 FA ? ? ? ? 7C E6 83 C8 FF C3 +TMTS:0:true:48 8B C4 48 89 58 08 48 89 70 10 48 89 78 18 4C 89 70 20 55 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 0F 29 70 E8 0F 29 78 D8 44 0F 29 40 ? 48 8B F9 44 0F 29 48 +RMTS:0:true:48 89 5C 24 ? 55 56 57 41 56 41 57 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 48 8B F9 E8 ? ? ? ? BB ? ? ? ? 44 8D 7B 50 +AMTT:0:true:48 89 5C 24 ? 57 48 83 EC 20 48 8B FA 48 8B D9 E8 ? ? ? ? 4C 63 C8 83 C8 FF 44 3B C8 0F 84 ? ? ? ? 4D +SPROJ:14:true:4C 8D 4D 07 4C 8D 45 17 48 8B D3 48 8B CE E8 ? ? ? ? EB 17 4C 8D 4D 07 4C 8D 45 17 48 8B D3 48 8B CE E8 ? ? ? ? EB 02 +WGSITEM:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 81 EC ? ? ? ? 48 8B 02 8B F1 48 8D 4C 24 ? 48 89 44 24 ? 48 8B 42 +GGXTLFH:0:true:48 83 EC 28 E8 ? ? ? ? 48 85 C0 75 34 8B 0D ? ? ? ? 65 48 8B 04 25 ? ? ? ? BA ? ? ? ? 48 8B 04 C8 8B 0C 02 D1 +BB_C:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 55 41 56 41 57 48 83 EC 20 8B 7A 14 8B 5A 10 4C 8B E9 48 8B 4C 24 ? 41 8B E9 4D 8B F8 E8 +C1:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC 40 48 8B B1 ? ? ? ? 8A 9A ? ? ? ? 32 +C2:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 83 EC 20 48 8B D9 48 8B 49 30 45 33 +C3:0:true:48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 57 48 81 EC ? ? ? ? 48 8B D9 48 8B 89 ? ? ? ? 0F 29 70 E8 0F 29 78 D8 48 8B F2 E8 +C4:0:true:40 53 48 83 EC 20 48 83 79 ? ? 48 8D 05 ? ? ? ? 48 8B D9 48 89 01 74 05 E8 ? ? ? ? 48 +C5:0:true:48 8B 01 4C 8B C1 48 3B D0 75 21 48 8B 40 18 48 89 01 33 C0 48 89 42 18 48 8B 09 48 85 C9 74 06 48 89 41 20 EB 4E 49 +C6:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B F9 48 83 C1 30 41 8A F1 48 8B 19 EB 10 +C7:0:true:48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 80 3D ? ? ? ? ? 41 8B D8 8B F2 48 8B F9 74 2F E8 +C8:0:false:45 33 C0 48 8B 51 50 48 85 D2 74 06 48 8B 4A 48 EB 02 33 C9 48 85 C9 74 0E 8B 41 5C 24 0F 3C 02 72 +PLPSOM:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ? 4C 8D B9 ? ? ? ? 48 +RJRESP:0:true:E8 ? ? ? ? 84 C0 0F 84 ? ? ? ? 8B 7D B0 83 FF 09 75 5D 40 38 75 B8 74 1C 40 +SJRESP:75:true:48 8B 0D ? ? ? ? E8 ? ? ? ? 84 C0 74 0F 48 8B 0D ? ? ? ? E8 ? ? ? ? 44 8B F0 8B 05 +ROS_SHA:0:true:E8 ? ? ? ? F6 46 18 04 74 17 48 8D 96 ? ? ? ? 48 8D 4C 24 ? 41 B8 ? ? ? ? E8 ? ? ? ? 48 8D +ROS_XKE:0:true:E8 ? ? ? ? 8B D7 8B C7 49 8B CE 83 E0 0F FF C2 8A 44 04 20 30 01 48 63 C2 48 FF C1 48 83 F8 10 +GPIFNM:0:true:44 8B CA 4C 8B C1 0F B7 C2 85 D2 78 31 3B 81 ? ? ? ? 73 29 8A 89 ? ? ? ? 8B D0 48 D3 EA 49 8B 88 +GDROPS:0:true:48 8D 2D ? ? ? ? 0F 2F C6 0F 97 C0 88 44 24 40 84 C0 74 4A 8B 0D ? ? ? ? 83 CB FF 44 +GNMNP:0:true:E8 ? ? ? ? 4C 8B E8 48 85 C0 0F 84 ? ? ? ? 48 8B C8 E8 ? ? ? ? 84 C0 0F 84 +3DPED:0:true:4C 8B 15 ? ? ? ? F3 0F 11 45 ? F3 0F 10 05 ? ? ? ? BF ? ? ? ? BB ? ? ? ? 41 BE ? ? ? ? F3 0F 11 +INVALIDS:0:true:E8 ? ? ? ? 41 B8 ? ? ? ? 48 8B D7 48 8B C8 E8 ? ? ? ? EB 07 48 8D 05 ? ? ? ? 48 8B 5C 24 ? 48 83 C4 20 5F C3 +BB_RST:0:true:48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 56 48 83 EC 20 48 8B F2 45 8B F0 32 DB 88 1A 48 8D 54 24 ? 41 B8 ? ? ? ? 48 8B +BB_RTOK:0:true:48 89 5C 24 ? 55 56 57 48 83 EC 20 33 C0 48 8B EA 48 8B D9 8D 70 01 C6 44 24 ? ? 89 44 24 51 66 89 44 24 ? 88 +INVPLY:0:true:48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 30 49 8B D9 41 8B F8 48 8B F2 48 8B E9 4D 85 C9 75 16 48 8D 15 ? ? ? ? 48 +WUTDRB:0:true:48 8D 05 ? ? ? ? 48 8D 54 24 ? 48 8B CB 48 89 44 24 ? 48 89 7C 24 ? C6 44 24 ? ? E8 ? ? ? ? 48 8B \ No newline at end of file diff --git a/GTAV/GTAV.vcxproj b/GTAV/GTAV.vcxproj new file mode 100644 index 0000000..d385cb4 --- /dev/null +++ b/GTAV/GTAV.vcxproj @@ -0,0 +1,922 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {d7fd141f-81b7-45af-89d4-9e45c1887955} + GTAV + 10.0 + + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + Unicode + x64 + true + + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + $(SolutionDir)Build\$(Configuration)\$(ProjectName)\ + $(SolutionDir)Build\Intermediate\$(Configuration)\$(ProjectName)\ + $(SolutionDir)Dependencies;$(LibraryPath) + + + + Level3 + true + WIN32;_DEBUG;GTAV_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + true + true + WIN32;NDEBUG;GTAV_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;GTAV_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + NDEBUG;GTAV_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + false + NotUsing + pch.h + stdcpplatest + $(ProjectDir)/src;$(ProjectDir);%(AdditionalIncludeDirectories) + None + false + MaxSpeed + MultiThreaded + true + false + /MP64 %(AdditionalOptions) + true + false + stdc17 + + + Windows + true + true + true + false + false + $(SolutionDir)Dependencies\cryptopp\lib\cryptlib.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GTAV/GTAV.vcxproj.filters b/GTAV/GTAV.vcxproj.filters new file mode 100644 index 0000000..a02f097 --- /dev/null +++ b/GTAV/GTAV.vcxproj.filters @@ -0,0 +1,2155 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/GTAV/GTAV.vcxproj.user b/GTAV/GTAV.vcxproj.user new file mode 100644 index 0000000..429333d --- /dev/null +++ b/GTAV/GTAV.vcxproj.user @@ -0,0 +1,6 @@ + + + + true + + \ No newline at end of file diff --git a/GTAV/src/dllmain.cpp b/GTAV/src/dllmain.cpp new file mode 100644 index 0000000..83ba227 --- /dev/null +++ b/GTAV/src/dllmain.cpp @@ -0,0 +1,31 @@ +#include "stdafx.h" +#include "global/vars.h" +#include "util/threads.h" +#include "menu/init.h" +#include "global/auth_vars.h" +#include "security/security.h" + +#include +#pragma comment(lib, "Winmm.lib") + +BOOL APIENTRY DllMain(HMODULE handle, DWORD reason, LPVOID reserved) { + switch (reason) { + case DLL_PROCESS_ATTACH: + global::vars::g_module_handle = handle; + + if (handle) { + MODULEINFO module_info; + GetModuleInformation(GetCurrentProcess(), handle, &module_info, sizeof(module_info)); + global::vars::g_cheat_address = { (uint64_t)module_info.lpBaseOfDll, module_info.SizeOfImage }; + } + + util::threads::add_job(menu::init::entry, handle); + break; + + case DLL_PROCESS_DETACH: + global::vars::g_unloading = true; + break; + } + + return TRUE; +} \ No newline at end of file diff --git a/GTAV/src/global/lists.cpp b/GTAV/src/global/lists.cpp new file mode 100644 index 0000000..5c67701 --- /dev/null +++ b/GTAV/src/global/lists.cpp @@ -0,0 +1,737 @@ +#include "lists.h" + +namespace global::lists { + scroll_struct g_timers[] = { + { localization("Unlocked", true), 0 }, + { localization("100ms", true), 100 }, + { localization("250ms", true), 250 }, + { localization("500ms", true), 500 }, + { localization("750ms", true), 750 }, + { localization("1s", true), 1000 }, + { localization("2.5s", true), 2500 }, + { localization("5s", true), 5000 }, + { localization("10s", true), 10000 }, + { localization("15s", true), 15000 }, + }; + + scroll_struct g_distances[] = { + { localization("Unlocked", true), 99999.f }, + { localization("50m", true), 50.f }, + { localization("100m", true), 100.f }, + { localization("200m", true), 200.f }, + { localization("250m", true), 250.f }, + { localization("300m", true), 300.f }, + { localization("400m", true), 400.f }, + { localization("500m", true), 500.f } + }; + + scroll_struct g_ped_model_popular[] = { + { localization("Alien", true), 0x64611296 }, + { localization("Astronaut", true), 0xE7B31432 }, + { localization("Playboy (Naked)", true), 0x4498DDE }, + { localization("Hooker", true), 0x28ABF95 }, + { localization("Pogo", true), 0xDC59940D }, + { localization("Stripper", true), 0x52580019 }, + { localization("Swat", true), 0x8D8F1B10 }, + { localization("Topless", true), 0x9CF26183 }, + { localization("Zombie", true), 0xAC4B4506 }, + }; + + scroll_struct g_ped_model_story[] = { + { localization("Michael", true), 0xD7114C9 }, + { localization("Franklin", true), 0x9B22DBAF }, + { localization("Trevor", true), 0x9B810FA2 }, + { localization("Amanda", true), 0x6D1E15F7 }, + { localization("Ashley", true), 0x7EF440DB }, + { localization("Brad", true), 0xBDBB4922 }, + { localization("Chef", true), 0x49EADBF6 }, + { localization("Chris Formage", true), 0x286E54A7 }, + { localization("Clag", true), 0x6CCFE08A }, + { localization("Cletus", true), 0xE6631195 }, + { localization("Dave Norton", true), 0x15CD4C33 }, + { localization("Denise", true), 0x820B33BD }, + { localization("Fabien", true), 0xD090C350 }, + { localization("Floyd", true), 0xB1B196B2 }, + { localization("Jay Norris", true), 0x7A32EE74 }, + { localization("Jimmy", true), 0x570462B9 }, + { localization("Lamar", true), 0x65B93076 }, + { localization("Lazlow", true), 0xDFE443E5 }, + { localization("Lester", true), 0x4DA6E849 }, + { localization("Mrs Phillips", true), 0x3862EEA8 }, + { localization("Stretch", true), 0x36984358 }, + { localization("Tao Cheng", true), 0xDC5C5EA5 }, + { localization("Tennis Coach", true), 0xA23B5F57 }, + { localization("Tracy", true), 0xDE352A35 }, + { localization("Wade", true), 0x92991B72 } + }; + + scroll_struct g_ped_model_animal[] = { + { localization("Boar", true), 0xCE5FF074 }, + { localization("Chimp", true), 0xA8683715 }, + { localization("Chop", true), 0x14EC17EA }, + { localization("Cow", true), 0xFCFA9E1E }, + { localization("Coyote", true), 0x644AC75E }, + { localization("Crow", true), 0x18012A9F }, + { localization("Deer", true), 0xD86B5A95 }, + { localization("Fish", true), 0x2FD800B7 }, + { localization("Chicken Hawk", true), 0xAAB71F62 }, + { localization("Hen", true), 0x6AF51FAF }, + { localization("Husky", true), 0x4E8F95A2 }, + { localization("Mountain Lion", true), 0x1250D7BA }, + { localization("Pig", true), 0xB11BAB56 }, + { localization("Pigeon", true), 0x6A20728 }, + { localization("Retriever", true), 0x349F33E1 }, + { localization("Rhesus", true), 0xC2D06F53 }, + { localization("Rottweiler", true), 0x9563221D }, + { localization("Seagull", true), 0xD3939DFD }, + { localization("Tiger Shark", true), 0x6C3F072 }, + { localization("Shepherd", true), 0x431FC24C }, + }; + + scroll_struct g_ped_model_emergency[] = { + { localization("Black Ops", true), 0xB3F3EE34 }, + { localization("Chem Security", true), 0x2EFEAFD5 }, + { localization("City Cop", true), 0x5E3DA4A4 }, + { localization("County Cop", true), 0x9AB35F63 }, + { localization("Fireman", true), 0xB6B1EDA8 }, + { localization("Security Guard", true), 0x709220C7 }, + { localization("Highway Cop", true), 0x739B1EF5 }, + { localization("Lifeguard", true), 0xB4A6862 }, + { localization("Marine", true), 0x72C0CAD2 }, + { localization("Marine (Senior)", true), 0xF0259D83 }, + { localization("Paramedic", true), 0xB353629E }, + { localization("Ranger", true), 0xEF7135AE }, + { localization("Prison Guard", true), 0x56C96FC6 }, + { localization("Security Guard", true), 0xD768B228 }, + { localization("Sheriff", true), 0xB144F9B9 }, + { localization("Snow Cop", true), 0x1AE8BB58 }, + }; + + scroll_struct g_ped_model_role[] = { + { localization("Bouncer", true), 0x9FD4292D }, + { localization("Bride", true), 0x6162EC47 }, + { localization("Pest Control", true), 0x48114518 }, + { localization("Doctor", true), 0xD47303AC }, + { localization("Factory Worker", true), 0x4163A158 }, + { localization("Garbage Man", true), 0xEE75A00F }, + { localization("Groom", true), 0xFECE8B85 }, + { localization("Hunter", true), 0xCE1324DE }, + { localization("Jesus", true), 0xCE2CB751 }, + { localization("Mime", true), 0x3CDCA742 }, + { localization("Priest", true), 0x6437E77D }, + { localization("Prisoner", true), 0xB1BB9B59 }, + { localization("Scientist", true), 0x4117D39B }, + { localization("Spy", true), 0x5B81D86C }, + }; + + scroll_struct g_ped_model_ambient[] = { + { localization("Body Builder", true), 0xDA116E7E }, + { localization("Nonce", true), 0x7DC3908F }, + { localization("Guido", true), 0xC6B49A2F }, + { localization("Statue", true), 0x795AC7A8 }, + { localization("Mani", true), 0xC8BB1E52 }, + { localization("Griff", true), 0xC454BCBB }, + }; + + scroll_struct g_ped_model_misc[] = { + { localization("Dead Hooker", true), 0x73DEA88B }, + { localization("Imporage", true), 0x348065F5 }, + { localization("Marston", true), 0x38430167 }, + { localization("Misty", true), 0xD128FF9D }, + { localization("Niko", true), 0xEEDACFC9 }, + }; + + scroll_struct g_ped_bones[] = { + { localization("Head", true), 31086 }, + { localization("Neck", true), 39317 }, + { localization("Chest", true), 24818 }, + { localization("Right Hand", true), 57005 }, // 28422 + { localization("Left Hand", true), 18905 }, // 36029 + { localization("Right Foot", true), 52301 }, // 6286 + { localization("Left Foot", true), 14201 }, + { localization("Right Calf", true), 36864 }, + { localization("Left Calf", true), 63931 }, + { localization("Right Forearm", true), 28252 }, + { localization("Left Forearm", true), 61163 }, + { localization("Right Upper Arm", true), 40269 }, + { localization("Left Upper Arm", true), 45509 } + }; + + scroll_struct g_vehicle_bones[] = { + { localization("Front: Left Wheel", true), "wheel_lf" }, + { localization("Front: Right Wheel", true), "wheel_rf" }, + { localization("Rear: Left Wheel", true), "wheel_lr" }, + { localization("Rear: Right Wheel", true), "wheel_rr" }, + { localization("Left: Tail Light", true), "taillight_l" }, + { localization("Left: Headlight", true), "headlight_l" }, + { localization("Right: Tail Light", true), "taillight_r" }, + { localization("Right: Headlight", true), "headlight_r" }, + { localization("Numberplate", true), "numberplate" }, + { localization("Exhaust", true), "exhaust" } + }; + + scroll_struct g_particles[] = { + { localization("Purple Cloud 1", true), { "scr_rcbarry2", "scr_clown_appears", false } }, + { localization("Purple Cloud 2", true), { "scr_rcbarry2", "scr_clown_death", false } }, + { localization("Purple Cloud 3", true), { "scr_rcbarry2", "scr_exp_clown", false } }, + { localization("Firework Starburst", true), { "scr_indep_fireworks", "scr_indep_firework_starburst", false } }, + { localization("Firework Fountain", true), { "scr_indep_fireworks", "scr_indep_firework_fountain", false } }, + { localization("Firework Shotburst", true), { "scr_indep_fireworks", "scr_indep_firework_shotburst", false } }, + { localization("Xmas Firework Burst", true), { "proj_xmas_firework", "scr_firework_xmas_spiral_burst_rgw", false } }, + { localization("Teleport", true), { "scr_rcbarry1", "scr_alien_teleport", false } }, + { localization("Disintegration", true), { "scr_rcbarry1", "scr_alien_disintegrate", false } }, + { localization("Drip", true), { "scr_agencyheist", "scr_fbi_mop_drips", false } }, + { localization("Flower Jet", true), { "scr_rcbarry2", "scr_clown_bul", false } }, + { localization("Flash", true), { "scr_rcpaparazzo1", "scr_rcpap1_camera", false } }, + { localization("Blue Flash", true), { "scr_rcbarry1", "scr_alien_impact_bul", false } }, + { localization("Burnout", true), { "scr_recartheft", "scr_wheel_burnout", false } }, + { localization("Splash", true), { "scr_trevor1", "scr_trev1_trailer_splash", false } }, + { localization("Blood", true), { "scr_solomon3", "scr_trev4_747_blood_impact", false } }, + { localization("Sparks", true), { "scr_family4", "scr_fam4_trailer_sparks", false } }, + { localization("Shock", true), { "scr_trevor1", "scr_trev1_trailer_boosh", false } }, + { localization("Money Cloud", true), { "scr_ornate_heist", "scr_heist_ornate_banknotes", false } }, + { localization("Tire Smoke", true), { "scr_carsteal4", "scr_carsteal4_wheel_burnout", false } }, + { localization("Clouds", true), { "wpn_projectile", "proj_missile_trail", true } }, + { localization("Golf Trail", true), { "scr_minigamegolf", "scr_golf_ball_trail", true } }, + { localization("Tennis Trail", true), { "scr_minigametennis", "scr_tennis_ball_trail", true } }, + { localization("Water Trail", true), { "core", "trail_splash_water", true } }, + { localization("Parachute Trail", true), { "core", "ped_parachute_trail", true } }, + { localization("Flare Trail", true), { "core", "proj_flare_trail", true } }, + { localization("Blood Trail", true), { "core", "trail_splash_blood", true } }, + { localization("Grenade Trail", true), { "wpn_projectile", "proj_grenade_trail", true } }, + { localization("Flaregun Trail", true), { "wpn_projectile", "proj_flare_trail", true } }, + }; + + scroll_struct g_weapons[] = { + { localization("Pistol", true), 0x1b06d571 }, + { localization("Pistol Mk II", true), 0xbfe256d4 }, + { localization("Combat Pistol", true), 0x5ef9fec4 }, + { localization("AP Pistol", true), 0x22d8fe39 }, + { localization("Stun Gun", true), 0x3656c8c1 }, + { localization("Pistol .50", true), 0x99aeeb3b }, + { localization("SNS Pistol", true), 0xbfd21232 }, + { localization("SNS Pistol Mk II", true), 0x88374054 }, + { localization("Heavy Pistol", true), 0xd205520e }, + { localization("Vintage Pistol", true), 0x83839c4 }, + { localization("Flare Gun", true), 0x47757124 }, + { localization("Marksman Pistol", true), 0xdc4db296 }, + { localization("Heavy Revolver", true), 0xc1b3c3d1 }, + { localization("Heavy Revolver Mk II", true), 0xcb96392f }, + { localization("Double Action Revolver", true), 0x97ea20b8 }, + { localization("Up-n-Atomizer", true), 0xaf3696a1 }, + { localization("Ceramic Pistol", true), 0x2b5ef5ec }, + { localization("Navy Revolver", true), 0x917f6c8c }, + { localization("Gadget Pistol", true), 0x57a4368c }, + + { localization("Micro SMG", true), 0x13532244 }, + { localization("SMG", true), 0x2be6766b }, + { localization("SMG Mk II", true), 0x78a97cd0 }, + { localization("Assault SMG", true), 0xefe7e2df }, + { localization("Combat PDW", true), 0xa3d4d34 }, + { localization("Machine Pistol", true), 0xdb1aa450 }, + { localization("Mini SMG", true), 0xbd248b55 }, + { localization("Unholy Hellbringer", true), 0x476bf155 }, + + { localization("Pump Shotgun", true), 0x1d073a89 }, + { localization("Pump Shotgun Mk II", true), 0x555af99a }, + { localization("Sawed-Off Shotgun", true), 0x7846a318 }, + { localization("Assault Shotgun", true), 0xe284c527 }, + { localization("Bullpup Shotgun", true), 0x9d61e50f }, + { localization("Musket", true), 0xa89cb99e }, + { localization("Heavy Shotgun", true), 0x3aabbbaa }, + { localization("Double Barrel Shotgun", true), 0xef951fbb }, + { localization("Sweeper Shotgun", true), 0x12e82d3d }, + { localization("Combat Shotgun", true), 0x5a96ba4 }, + + { localization("Assault Rifle", true), 0xbfefff6d }, + { localization("Assault Rifle Mk II", true), 0x394f415c }, + { localization("Carbine Rifle", true), 0x83bf0278 }, + { localization("Carbine Rifle Mk II", true), 0xfad1f1c9 }, + { localization("Advanced Rifle", true), 0xaf113f99 }, + { localization("Special Carbine", true), 0xc0a3098d }, + { localization("Special Carbine Mk II", true), 0x969c3d67 }, + { localization("Bullpup Rifle", true), 0x7f229f94 }, + { localization("Bullpup Rifle Mk II", true), 0x84d6fafd }, + { localization("Compact Rifle", true), 0x624fe830 }, + { localization("Military Rifle", true), 0x9d1f17e6 }, + + { localization("MG", true), 0x9d07f764 }, + { localization("Combat MG", true), 0x7fd62962 }, + { localization("Combat MG Mk II", true), 0xdbbd7280 }, + { localization("Gusenberg Sweeper", true), 0x61012683 }, + + { localization("Sniper Rifle", true), 0x5fc3c11 }, + { localization("Heavy Sniper", true), 0xc472fe2 }, + { localization("Heavy Sniper Mk II", true), 0xa914799 }, + { localization("Marksman Rifle", true), 0xc734385a }, + { localization("Marksman Rifle Mk II", true), 0x6a6c02e0 }, + + { localization("RPG", true), 0xb1ca77b1 }, + { localization("Grenade Launcher", true), 0xa284510b }, + { localization("Grenade Launcher Smoke", true), 0x4dd2dc56 }, + { localization("Minigun", true), 0x42bf8a85 }, + { localization("Firework Launcher", true), 0x7f7497e5 }, + { localization("Railgun", true), 0x6d544c99 }, + { localization("Homing Launcher", true), 0x63ab0442 }, + { localization("Compact Grenade Launcher", true), 0x781fe4a }, + { localization("Widowmaker", true), 0xb62d1f67 }, + + { localization("Jerry Can", true), 0x34a67b97 }, + { localization("Hazardous Jerry Can", true), 0xba536372 }, + { localization("Parachute", true), 0xfbab5776 }, + { localization("Fire Extinguisher", true), 0x60ec506 }, + { localization("Digi Scanner", true), 0xfdbadced }, + + { localization("Grenade", true), 0x93e220bd }, + { localization("BZ Gas", true), 0xa0973d5e }, + { localization("Molotov Cocktail", true), 0x24b17070 }, + { localization("Sticky Bomb", true), 0x2c3731d9 }, + { localization("Proximity Mines", true), 0xab564b93 }, + { localization("Snowballs", true), 0x787f0bb }, + { localization("Pipe Bombs", true), 0xba45e8b8 }, + { localization("Baseball", true), 0x23c9f95c }, + { localization("Tear Gas", true), 0xfdbc8a50 }, + { localization("Flare", true), 0x497facc3 }, + + { localization("Antique Cavalry Dagger", true), 0x92a27487 }, + { localization("Baseball Bat", true), 0x958a4a8f }, + { localization("Broken Bottle", true), 0xf9e6aa4b }, + { localization("Crowbar", true), 0x84bd7bfd }, + { localization("Flashlight", true), 0x8bb05fd7 }, + { localization("Golf Club", true), 0x440e4788 }, + { localization("Hammer", true), 0x4e875f73 }, + { localization("Hatchet", true), 0xf9dcbf2d }, + { localization("Brass Knuckles", true), 0xd8df3c3c }, + { localization("Knife", true), 0x99b507ea }, + { localization("Machete", true), 0xdd5df8d9 }, + { localization("Switchblade", true), 0xdfe37640 }, + { localization("Nightstick", true), 0x678b81b1 }, + { localization("Pipe Wrench", true), 0x19044ee0 }, + { localization("Battle Axe", true), 0xcd274149 }, + { localization("Pool Cue", true), 0x94117305 }, + { localization("Stone Hatchet", true), 0x3813fc08 }, + }; + + scroll_struct g_explosions[] = { + { localization("Grenade", true), EXPLOSION_GRENADE }, + { localization("Grenade Launcher", true), EXPLOSION_GRENADELAUNCHER }, + { localization("Sticky Bomb", true), EXPLOSION_STICKYBOMB }, + { localization("Molotov", true), EXPLOSION_MOLOTOV }, + { localization("Rocket", true), EXPLOSION_ROCKET }, + { localization("Tank Shell", true), EXPLOSION_TANKSHELL }, + { localization("Hi-Octane", true), EXPLOSION_HI_OCTANE }, + { localization("Car", true), EXPLOSION_CAR }, + { localization("Plane", true), EXPLOSION_PLANE }, + { localization("Petrol Pump", true), EXPLOSION_PETROL_PUMP }, + { localization("Bike", true), EXPLOSION_BIKE }, + { localization("Steam", true), EXPLOSION_DIR_STEAM }, + { localization("Flame", true), EXPLOSION_DIR_FLAME }, + { localization("Water Hydrant", true), EXPLOSION_DIR_WATER_HYDRANT }, + { localization("Gas Fire", true), EXPLOSION_DIR_GAS_CANISTER }, + { localization("Boat", true), EXPLOSION_BOAT }, + { localization("Ship Destroy", true), EXPLOSION_SHIP_DESTROY }, + { localization("Truck", true), EXPLOSION_TRUCK }, + { localization("Bullet", true), EXPLOSION_BULLET }, + { localization("Smoke Grenade Launcher", true), EXPLOSION_SMOKEGRENADELAUNCHER }, + { localization("Smoke Grenade", true), EXPLOSION_SMOKEGRENADE }, + { localization("Bz Gas", true), EXPLOSION_BZGAS }, + { localization("Flare", true), EXPLOSION_FLARE }, + { localization("Gas Canister", true), EXPLOSION_GAS_CANISTER }, + { localization("Extinguisher", true), EXPLOSION_EXTINGUISHER }, + { localization("Programmable AR", true), EXPLOSION_PROGRAMMABLEAR }, + { localization("Train", true), EXPLOSION_TRAIN }, + { localization("Barrel", true), EXPLOSION_BARREL }, + { localization("Propane", true), EXPLOSION_PROPANE }, + { localization("Blimp", true), EXPLOSION_BLIMP }, + { localization("Flame Explode", true), EXPLOSION_DIR_FLAME_EXPLODE }, + { localization("Tanker", true), EXPLOSION_TANKER }, + { localization("Plane Rocket", true), EXPLOSION_PLANE_ROCKET }, + { localization("Vehicle Bullet", true), EXPLOSION_VEHICLE_BULLET }, + { localization("Gas Tank", true), EXPLOSION_GAS_TANK }, + { localization("Bird Crap", true), EXPLOSION_BIRD_CRAP }, + }; + + scroll_struct g_gravity[] = { + { localization("Earth", true), 9.807f }, + { localization("Moon", true), 1.62f }, + { localization("Mercury", true), 3.7f }, + { localization("Jupiter", true), 24.79f }, + { localization("Mars", true), 3.711f }, + { localization("Saturn", true), 10.44f }, + { localization("Uranus/Venus", true), 8.87f }, + { localization("Neptune", true), 11.15f }, + { localization("Sun", true), 274.0f }, + }; + + scroll_struct g_opacity[] = { + { localization("0%", true), 0 }, + { localization("20%", true), 51 }, + { localization("40%", true), 102 }, + { localization("60%", true), 153 }, + { localization("80%", true), 204 }, + { localization("100%", true), 255 } + }; + + scroll_struct g_vehicle_weapons[] = { + { localization("RPG", true), 0xb1ca77b1 }, + { localization("Snowball", true), 0x787F0BB }, + { localization("Firework", true), 0x7f7497e5 }, + { localization("Flare", true), 0x497FACC3 }, + { localization("Player Laser", true), 0xeffd014b }, + { localization("Enemy Laser", true), 0x5d6660ab }, + { localization("Space Rocket", true), 0xf8a3939f }, + { localization("Player Bullet", true), 0x4b139b2d }, + { localization("Player Buzzard", true), 0x46b89c8e }, + }; + + scroll_struct, math::vector3_>> g_acrobatics[] = { + { localization("Wheelie", true), { { 0.f, 0.f, 1.f }, { 0.f, 5.0f, 0.f } } }, + { localization("Kickflip", true), { { 0.f, 0.0f, 11.5f }, { 5.f, 0.f, 0.f } } }, + { localization("Double Kickflip", true), { { 0.f, 0.0f, 21.f }, { 10.f, 0.f, 0.f } } }, + { localization("Quadruple Kickflip", true), {{ 0.f, 0.0f, 33.f }, { 15.f, 0.f, 0.f } } }, + { localization("Leap", true), {{ 0.f, 0.f, 20.f }, { 0.f, 0.f, 0.f } } }, + { localization("Slingshot", true), {{ 0.f, 0.f, 200.f }, { 0.f, 0.f, 0.f } } }, + { localization("Backflip", true), {{ 0.f, 0.f, 15.5f }, { 0.f, 1.3f, 0.f } } }, + { localization("Frontflip", true), {{ 0.f, 0.f, 15.5f }, { 0.f, -1.f, 0.f } } }, + { localization("Right Jump", true), {{ 0.f, 0.f, 2.8f }, { -3.f, 0.f, 0.f } } }, + { localization("Left Jump", true), {{ 0.f, 0.f, 2.8f }, { 3.f, 0.f, 0.f } } } + }; + + scroll_struct> g_popular_locations[] = { + { localization("Diamond Casino", true), {919.94f, 50.7f, 80.90f } }, + { localization("Los Santos Customs", true), {-365.425f, -131.809f, 37.873f } }, + { localization("Los Santos Airport", true), {-1052.392f, -2933.508f, 13.951f } }, + { localization("Sandy Shores Airfield", true), {1770.241f, 3266.942f, 41.620f } }, + { localization("Eclipse Towers", true), {-807.247f, 301.868f, 86.073f } }, + { localization("Eclipse Towers Garage (Outside)", true), {-795.46f, 308.89f, 85.71f } }, + { localization("Eclipse Towers Roof", true), {-779.026f, 331.695f, 238.828f } }, + { localization("Fort Zancudo", true), {-2119.877f, 3284.521f, 32.810f } }, + { localization("Mount Chiliad", true), {498.142f, 5593.435f, 795.364f } }, + { localization("Michael's House", true), {-803.462f, 172.808f, 72.845f } }, + { localization("Franklin's House", true), {0.603f, 527.954f, 174.628f } }, + { localization("Lester's House", true), {1273.727f, -1712.099f, 54.771f } }, + { localization("Trevor's Meth Lab", true), {1393.173f, 3602.266f, 38.942f } }, + { localization("Floyd's Apartment", true), {-1159.055f, -1520.858f, 10.633f } }, + { localization("Prison", true), {1678.585f, 2513.168f, 45.565f } }, + { localization("Torture Room", true), {144.672f, -2201.973f, 4.688f } }, + { localization("Del Perro Beach", true), {-1583.278f, -1099.167f, 4.956f } }, + { localization("Del Perro Pier", true), {-1731.210f, -1110.329f, 13.102f } }, + { localization("Helicopter Pad", true), {-724.384f, -1443.399f, 5.001f } }, + { localization("Maze Bank", true), {-75.858f, -817.789f, 326.174f } }, + { localization("FIB Building", true), {135.786f, -749.233f, 258.152f } }, + { localization("IAA Office", true), {121.282f, -622.149f, 206.047f } }, + { localization("Blaine County Bank", true), {-108.245f, 6466.301f, 31.627f } }, + { localization("Pacific Standard Vault", true), {256.786f, 226.157f, 101.876f } }, + { localization("Humane Labs", true), {3616.195f, 3738.724f, 28.690f } }, + { localization("Humane Labs Tunnel", true), {3524.949f, 3708.167f, 20.992f } }, + { localization("Playboy Mansion", true), {-1461.834f, 179.259f, 54.752f } }, + { localization("Mors Mutual Insurance", true), {-232.084f, -1163.830f, 22.948f } }, + { localization("Impound Lot", true), {401.057f, -1631.766f, 29.293f } }, + { localization("Police Station", true), {441.259f, -983.160f, 30.690f } }, + { localization("Underwater UFO", true), {763.656f, 7381.180f, -110.135f } }, + { localization("Vinewood Sign", true), {741.941f, 1198.555f, 326.344f } }, + { localization("Waterfall", true), {-597.9525f, 4475.2910f, 25.6890f } }, + { localization("Island", true), {20.968f, 7636.292f, 15.943f } }, + { localization("Bank Vault", true), { 255.5819f, 217.6896f, 101.6834f }} + }; + + scroll_struct g_object_model_small[] = { + { localization("Alarm", true), 0x9E5FFFCB }, + { localization("Backpack", true), 0x47B7DAED }, + { localization("Barbell", true), 0xE2FBA8D8 }, + { localization("Basketball", true), 0x6DB9599A }, + { localization("Beachball", true), 0x81ECE1F }, + { localization("Bear 1", true), 0x772114C9 }, + { localization("Bear 2", true), 0x3CF34F26 }, + { localization("Bigfoot Mask", true), 0xC9751EF7 }, + { localization("Bong", true), 0xF0A61994 }, + { localization("Campfire", true), 0xC079B265 }, + { localization("Candle", true), 0x203011A1 }, + { localization("Dildo", true), 0xE6CB661E }, + { localization("Dog Cage", true), 0x16A39A90 }, + { localization("Egg", true), 0x6B795EBC }, + { localization("EMP", true), 0x3794ACC9 }, + { localization("Engine", true), 0xDD75614 }, + { localization("Fish", true), 0xCE3D7AA0 }, + { localization("Gold", true), 0xF046EA37 }, + { localization("Guitar 1", true), 0xD5C0BC07 }, + { localization("Guitar 2", true), 0xA4E7E0A7 }, + { localization("Hotdog", true), 0x98EE1ACD }, + { localization("Katana", true), 0xE2BA016F }, + { localization("Lawnmower", true), 0x1AB39621 }, + { localization("Leafblower", true), 0x5F989485 }, + { localization("Minigun", true), 0xC89630B8 }, + { localization("Missile", true), 0xB2274905 }, + { localization("Parachute", true), 0x34DCF0A3 }, + { localization("Pumpkin", true), 0x83C07621 }, + { localization("Safe", true), 0x40F52369 }, + { localization("Saxophone", true), 0x1212FE11 }, + { localization("Scuba Tank", true), 0x18B8F776 }, + { localization("Shield", true), 0x44083A8F }, + { localization("Shit", true), 0x84898EFE }, + { localization("Soccer Ball", true), 0xD541462D }, + { localization("Toilet", true), 0x6F9939C7 }, + { localization("Traffic Cone", true), 0xE0264F5D }, + { localization("TV", true), 0x5C9F1C35 }, + { localization("Volleyball", true), 0xC79A987E }, + { localization("Weed", true), 0x1AFA6A0A }, + }; + + scroll_struct g_object_model_medium[] = { + { localization("Anti-Aircraft", true), 0x98D3236B }, + { localization("Arcade", true), 0xA50DDDD0 }, + { localization("Bed", true), 0xB374CC1F }, + { localization("Bench", true), 0x6BA514AC }, + { localization("Blast Fence", true), 0xB4978950 }, + { localization("Block", true), 0xC3F13FCC }, + { localization("Bumper Car", true), 0xFB631122 }, + { localization("Cheetah", true), 0x37D80B0E }, + { localization("Dinghy", true), 0x282D6851 }, + { localization("Entity XF", true), 0xB155FD87 }, + { localization("Ferris Car", true), 0x1AFA509F }, + { localization("Helicopter", true), 0x8E8C7A5B }, + { localization("JB700", true), 0x72F54E90 }, + { localization("Jetski Ramp", true), 0xBF8918DE }, + { localization("Log", true), 0xACD6D1AB }, + { localization("Mannequin", true), 0x7FFBC1E2 }, + { localization("Orange Sphere", true), 0x8DA1C0E }, + { localization("Propeller", true), 0x5D20643D }, + { localization("Ramp 1", true), 0xB157C9E4 }, + { localization("Ramp 2", true), 0xF4F1511E }, + { localization("Ramp 3", true), 0x93948E5E }, + { localization("Repair", true), 0xE6FA7770 }, + { localization("Sand Block", true), 0xF724026D }, + { localization("Sofa", true), 0x5EF5520E }, + { localization("Stairs", true), 0x757C28D }, + { localization("Umbrella", true), 0xDCA9A809 }, + { localization("Xmas Tree", true), 0xE3BA450 }, + }; + + scroll_struct g_object_model_large[] = { + { localization("Asteroid", true), 0xDF9841D7 }, + { localization("Barge 1", true), 0x9C762726 }, + { localization("Barge 2", true), 0x8AF58425 }, + { localization("Cablecar", true), 0xD44295DD }, + { localization("Crane", true), 0x7D10B85C }, + { localization("Crane Cab", true), 0x3673E396 }, + { localization("Ferris Wheel", true), 0xC42C019A }, + { localization("Halfpipe", true), 0xF66F582F }, + { localization("Jet", true), 0xC2BC19CD }, + { localization("Lava", true), 0xD733DF }, + { localization("Radar", true), 0x8973A868 }, + { localization("Large Tarp", true), 0x6FA720A4 }, + { localization("Tree", true), 0xEDF5CD3C }, + { localization("Tugboat", true), 0xF20B1BDD }, + { localization("UFO", true), 0xB467C540 }, + { localization("Windmill", true), 0x745F3383 }, + { localization("Xmas Tree", true), 0x7121AC4 }, + }; + + scroll_struct g_object_model_flags[] = { + { localization("Canada", true), joaat("prop_flag_canada") }, + { localization("Europe", true), joaat("prop_flag_eu") }, + { localization("France", true), joaat("prop_flag_france") }, + { localization("Germany", true), joaat("prop_flag_german") }, + { localization("Ireland", true), joaat("prop_flag_ireland") }, + { localization("Japan", true), joaat("prop_flag_japan") }, + { localization("City of Los Santos", true), joaat("prop_flag_ls") }, + { localization("Los Santos Fire Department", true), joaat("prop_flag_lsfd") }, + { localization("Los Santos Services", true), joaat("prop_flag_lsservices") }, + { localization("Mexico", true), joaat("prop_flag_mexico") }, + { localization("Russia", true), joaat("prop_flag_russia") }, + { localization("San Andreas Republic", true), joaat("prop_flag_sa") }, + { localization("San Andreas Police Department", true), joaat("prop_flag_sapd") }, + { localization("Scotland", true), joaat("prop_flag_scotland") }, + { localization("Los Santos County Sheriff", true), joaat("prop_flag_sheriff") }, + { localization("United Kingdom", true), joaat("prop_flag_uk") }, + { localization("United States", true), joaat("prop_flag_us") }, + }; + + scroll_struct g_precisions[] = { + { localization(".0001", false), .0001f }, + { localization(".001", false), .001f }, + { localization(".01", false), .01f }, + { localization(".1", false), .1f }, + { localization("1", true), 1.f }, + { localization("2", true), 2.f }, + { localization("5", true), 5.f }, + { localization("10", true), 10.f }, + { localization("50", true), 50.f }, + { localization("100", true), 100.f } + }; + + scroll_struct> g_sounds[] = { + { localization("Alien", true), { "SPAWN", "BARRY_01_SOUNDSET" } }, + { localization("Whistle", true), { "Franklin_Whistle_For_Chop", "SPEECH_RELATED_SOUNDS" } }, + { localization("EMP", true), { "EMP_Vehicle_Hum", "DLC_HEIST_BIOLAB_DELIVER_EMP_SOUNDS" } }, + { localization("Helicopter", true), { "Helicopter_Wind", "BASEJUMPS_SOUNDS" } }, + { localization("Scan", true), { "SCAN", "EPSILONISM_04_SOUNDSET" } }, + { localization("Leafblower", true), { "GARDENING_LEAFBLOWER_ANIM_TRIGGERED", "" } }, + { localization("Unlock", true), { "Bar_Unlock_And_Raise", "DLC_IND_ROLLERCOASTER_SOUNDS" } }, + { localization("Brakes", true), { "MOD_SHOP_BRAKES_ONESHOT", "" } }, + + { localization("Carwash", true), { "SPRAY", "CARWASH_SOUNDS" } }, + { localization("Carwash 2", true), { "SPRAY_CAR", "CARWASH_SOUNDS" } }, + { localization("Carwash 3", true), { "DRYER", "CARWASH_SOUNDS" } }, + + { localization("Keycard", true), { "Keycard_Success", "DLC_HEISTS_BIOLAB_FINALE_SOUNDS" } }, + { localization("Keycard 2", true), { "Keycard_Fail", "DLC_HEISTS_BIOLAB_FINALE_SOUNDS" } }, + + { localization("Ringtone", true), { "Remote_Ring", "Phone_SoundSet_Michael" } }, + { localization("Ringtone 2", true), { "PED_PHONE_DIAL_01", "" } }, + + { localization("Beep", true), { "Crate_Beeps", "MP_CRATE_DROP_SOUNDS" } }, + { localization("Beep 2", true), { "Crate_Collect", "MP_CRATE_DROP_SOUNDS" } }, + { localization("Endless Beep", true), { "CONTINUAL_BEEP", "EPSILONISM_04_SOUNDSET" } }, + { localization("Short Beep", true), { "IDLE_BEEP", "EPSILONISM_04_SOUNDSET" } }, + { localization("Long Beep", true), { "Beep_Green", "DLC_HEIST_HACKING_SNAKE_SOUNDS" } }, + { localization("Solo Fast Beep", true), { "Beep_Red", "DLC_HEIST_HACKING_SNAKE_SOUNDS" } }, + { localization("Confirm Beep", true), { "CONFIRM_BEEP", "HUD_MINI_GAME_SOUNDSET" } }, + + { localization("5s Timer", true), { "5_Second_Timer", "DLC_HEISTS_GENERAL_FRONTEND_SOUNDS" } }, + { localization("5s Timer 2", true), { "MP_5_SECOND_TIMER", "HUD_FRONTEND_DEFAULT_SOUNDSET" } }, + { localization("Idle Timer", true), { "MP_IDLE_TIMER", "HUD_FRONTEND_DEFAULT_SOUNDSET" } }, + { localization("Out of Bounds Timer", true), { "Out_Of_Bounds_Timer", "DLC_HEISTS_GENERAL_FRONTEND_SOUNDS" } }, + { localization("Timer Stop", true), { "TIMER_STOP", "HUD_MINI_GAME_SOUNDSET" } }, + + { localization("Pickup", true), { "PICK_UP", "HUD_FRONTEND_DEFAULT_SOUNDSET" } }, + { localization("Pickup 2", true), { "PICK_UP_SOUND", "HUD_FRONTEND_CUSTOM_SOUNDSET" } }, + { localization("Pickup 3", true), { "PICKUP_WEAPON_SMOKEGRENADE", "HUD_FRONTEND_WEAPONS_PICKUPS_SOUNDSET" } }, + + { localization("Silence", true), { "3_2_1_NON_RACE", "HUD_MINI_GAME_SOUNDSET" } }, + { localization("Silence 2", true), { "Airhorn", "DLC_TG_Running_Back_Sounds" } }, + + { localization("Screen Flash", true), { "ScreenFlash", "MissionFailedSounds" } }, + { localization("Screen Flash 2", true), { "ScreenFlash", "WastedSounds" } }, + + { localization("Click", true), { "Click", "DLC_HEIST_HACKING_SNAKE_SOUNDS" } }, + { localization("Click Fail", true), { "Click_Fail", "WEB_NAVIGATION_SOUNDS_PHONE" } }, + { localization("Click Special", true), { "Click_Special", "WEB_NAVIGATION_SOUNDS_PHONE" } }, + + { localization("Nav Arrow Ahead", true), { "Nav_Arrow_Ahead", "DLC_HEISTS_GENERAL_FRONTEND_SOUNDS" } }, + { localization("Nav Arrow Left", true), { "Nav_Arrow_Left", "DLC_HEISTS_GENERAL_FRONTEND_SOUNDS" } }, + { localization("Nav Arrow Right", true), { "Nav_Arrow_Right", "DLC_HEISTS_GENERAL_FRONTEND_SOUNDS" } }, + + { localization("Checkpoint Missed", true), { "CHECKPOINT_MISSED", "HUD_MINI_GAME_SOUNDSET" } }, + { localization("Checkpoint Ahead", true), { "CHECKPOINT_AHEAD", "HUD_MINI_GAME_SOUNDSET" } }, + { localization("Checkpoint Perfect", true), { "CHECKPOINT_PERFECT", "HUD_MINI_GAME_SOUNDSET" } }, + { localization("Checkpoint Under Bridge", true), { "CHECKPOINT_UNDER_THE_BRIDGE", "HUD_MINI_GAME_SOUNDSET" } }, + + { localization("Menu Select", true), { "Apt_Style_Purchase", "DLC_APT_Apartment_SoundSet" } }, + { localization("Menu Select 2", true), { "SELECT", "HUD_MINI_GAME_SOUNDSET" } }, + + { localization("Hack Failed", true), { "Hack_Failed", "DLC_HEIST_BIOLAB_PREP_HACKING_SOUNDS" } }, + { localization("Hack Success", true), { "Hack_Success", "DLC_HEIST_BIOLAB_PREP_HACKING_SOUNDS" } }, + + { localization("Pin Bad", true), { "Pin_Bad", "DLC_HEIST_BIOLAB_PREP_HACKING_SOUNDS" } }, + { localization("Pin Button", true), { "PIN_BUTTON", "ATM_SOUNDS" } }, + { localization("Pin Good", true), { "Pin_Good", "DLC_HEIST_BIOLAB_PREP_HACKING_SOUNDS" } }, + + { localization("Tennis Match Point", true), { "TENNIS_MATCH_POINT", "HUD_AWARDS" } }, + { localization("Tennis Point Won", true), { "TENNIS_POINT_WON", "HUD_AWARDS" } }, + + { localization("Start Squelch", true), { "Start_Squelch", "CB_RADIO_SFX" } }, + { localization("End Squelch", true), { "End_Squelch", "CB_RADIO_SFX" } }, + + { localization("Garage Door Open", true), { "RAMP_UP", "TRUCK_RAMP_DOWN" } }, + { localization("1st Person Transition", true), { "1st_Person_Transition", "PLAYER_SWITCH_CUSTOM_SOUNDSET" } }, + { localization("Emphasis", true), { "3_2_1", "HUD_MINI_GAME_SOUNDSET" } }, + { localization("5s Warning", true), { "5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET" } }, + { localization("Notification", true), { "ATM_WINDOW", "HUD_FRONTEND_DEFAULT_SOUNDSET" } }, + { localization("Challenge Unlocked", true), { "CHALLENGE_UNLOCKED", "HUD_AWARDS" } }, + { localization("Mission Success", true), { "BASE_JUMP_PASSED", "HUD_AWARDS" } }, + { localization("Wasted", true), { "Bed", "WastedSounds" } }, + { localization("Bus Pickup", true), { "Bus_Schedule_Pickup", "DLC_PRISON_BREAK_HEIST_SOUNDS" } }, + { localization("Taken Photo", true), { "Camera_Shoot", "Phone_Soundset_Franklin" } }, + { localization("Switching Characters", true), { "CHARACTER_SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET" } }, + { localization("Close Window", true), { "CLOSE_WINDOW", "LESTER1A_SOUNDS" } }, + { localization("Crash", true), { "Crash", "DLC_HEIST_HACKING_SNAKE_SOUNDS" } }, + { localization("Delete", true), { "DELETE", "HUD_DEATHMATCH_SOUNDSET" } }, + { localization("Truck Rev", true), { "DiggerRevOneShot", "BulldozerDefault" } }, + { localization("Drill Pin Break", true), { "Drill_Pin_Break", "DLC_HEIST_FLEECA_SOUNDSET" } }, + { localization("Edit", true), { "EDIT", "HUD_DEATHMATCH_SOUNDSET" } }, + { localization("Error", true), { "ERROR", "HUD_AMMO_SHOP_SOUNDSET" } }, + { localization("Failure", true), { "Failure", "DLC_HEIST_HACKING_SNAKE_SOUNDS" } }, + { localization("Falling Crates", true), { "Falling_Crates", "EXILE_1" } }, + { localization("Car Breakdown", true), { "FAMILY_1_CAR_BREAKDOWN", "FAMILY1_BOAT" } }, + { localization("First Place", true), { "FIRST_PLACE", "HUD_MINI_GAME_SOUNDSET" } }, + { localization("Flight School Passed", true), { "FLIGHT_SCHOOL_LESSON_PASSED", "HUD_AWARDS" } }, + { localization("Focus In", true), { "FocusIn", "HintCamSounds" } }, + { localization("Go", true), { "GO", "HUD_MINI_GAME_SOUNDSET" } }, + { localization("Goal", true), { "Goal", "DLC_HEIST_HACKING_SNAKE_SOUNDS" } }, + { localization("Grab Parachute", true), { "Grab_Parachute", "BASEJUMPS_SOUNDS" } }, + { localization("Hang Up", true), { "Hang_Up", "Phone_SoundSet_Michael" } }, + { localization("Highlight Error", true), { "Highlight_Error", "DLC_HEIST_PLANNING_BOARD_SOUNDS" } }, + { localization("Hit", true), { "Hit", "RESPAWN_SOUNDSET" } }, + { localization("Hit 2", true), { "Hit_1", "LONG_PLAYER_SWITCH_SOUNDS" } }, + { localization("Hit Out", true), { "Hit_Out", "PLAYER_SWITCH_CUSTOM_SOUNDSET" } }, + { localization("Cash Counter Complete", true), { "LOCAL_PLYR_CASH_COUNTER_COMPLETE", "DLC_HEISTS_GENERAL_FRONTEND_SOUNDS" } }, + { localization("Lose Match", true), { "LOOSE_MATCH", "HUD_MINI_GAME_SOUNDSET" } }, + { localization("Loser", true), { "LOSER", "HUD_AWARDS" } }, + { localization("Menu Accept", true), { "Menu_Accept", "Phone_SoundSet_Default" } }, + { localization("Mission Pass Notify", true), { "Mission_Pass_Notify", "DLC_HEISTS_GENERAL_FRONTEND_SOUNDS" } }, + { localization("Award", true), { "MP_AWARD", "HUD_FRONTEND_DEFAULT_SOUNDSET" } }, + { localization("Idle Kick", true), { "MP_IDLE_KICK", "HUD_FRONTEND_DEFAULT_SOUNDSET" } }, + { localization("Rank Up", true), { "MP_RANK_UP", "HUD_FRONTEND_DEFAULT_SOUNDSET" } }, + { localization("Wave Complete", true), { "MP_WAVE_COMPLETE", "HUD_FRONTEND_DEFAULT_SOUNDSET" } }, + { localization("On", true), { "ON", "NOIR_FILTER_SOUNDS" } }, + { localization("On Call Player Join", true), { "On_Call_Player_Join", "DLC_HEISTS_GENERAL_FRONTEND_SOUNDS" } }, + { localization("Open Window", true), { "OPEN_WINDOW", "LESTER1A_SOUNDS" } }, + { localization("Other Text", true), { "OTHER_TEXT", "HUD_AWARDS" } }, + { localization("Player Collect", true), { "Player_Collect", "DLC_PILOT_MP_HUD_SOUNDS" } }, + { localization("Power Down", true), { "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS" } }, + { localization("Pre Screen Stinger", true), { "Pre_Screen_Stinger", "DLC_HEISTS_FAILED_SCREEN_SOUNDS" } }, + { localization("Property Purchase", true), { "PROPERTY_PURCHASE", "HUD_AWARDS" } }, + { localization("Money Lost", true), { "PS2A_MONEY_LOST", "PALETO_SCORE_2A_BANK_SS" } }, + { localization("Put Away", true), { "Put_Away", "Phone_SoundSet_Michael" } }, + { localization("Round Ending", true), { "ROUND_ENDING_STINGER_CUSTOM", "CELEBRATION_SOUNDSET" } }, + { localization("Heartbeat", true), { "Short_Transition_In", "PLAYER_SWITCH_CUSTOM_SOUNDSET" } }, + { localization("Bomb Loading", true), { "STUN_COLLECT", "MINUTE_MAN_01_SOUNDSET" } }, + }; + + scroll_struct g_markers[] = { + { localization("Upside Down Cone", true), 0 }, + { localization("Vertical Cylinder", true), 0 }, + { localization("Thick Chevron Up", true), 0 }, + { localization("Thin Chevron Up", true), 0 }, + { localization("Checkered Flag Rect", true), 0 }, + { localization("Checkered Flag Circle", true), 0 }, + { localization("Verticle Circle", true), 0 }, + { localization("Plane Model", true), 0 }, + { localization("Lost MC Transparent", true), 0 }, + { localization("Lost MC", true), 0 }, + { localization("Number 0", true), 0 }, + { localization("Number 1", true), 0 }, + { localization("Number 2", true), 0 }, + { localization("Number 3", true), 0 }, + { localization("Number 4", true), 0 }, + { localization("Number 5", true), 0 }, + { localization("Number 6", true), 0 }, + { localization("Number 7", true), 0 }, + { localization("Number 8", true), 0 }, + { localization("Number 9", true), 0 }, + { localization("Chevron Up X1", true), 0 }, + { localization("Chevron Up X2", true), 0 }, + { localization("Chevron Up X3", true), 0 }, + { localization("Horizontal Circle Fat", true), 0 }, + { localization("Replay Icon", true), 0 }, + { localization("Horizontal Circle Skinny", true), 0 }, + { localization("Horizontal Circle Skinny Arrow", true), 0 }, + { localization("Horizontal Split Arrow Circle", true), 0 }, + { localization("Debug Sphere", true), 0 }, + { localization("Dollar Sign", true), 0 }, + { localization("Horizontal Bars", true), 0 }, + { localization("Wolf Head", true), 0 }, + { localization("Question Mark", true), 0 }, + { localization("Plane Symbol", true), 0 }, + { localization("Helicopter Symbol", true), 0 }, + { localization("Boat Symbol", true), 0 }, + { localization("Car Symbol", true), 0 }, + { localization("Motorcycle Symbol", true), 0 }, + { localization("Bike Symbol", true), 0 }, + { localization("Truck Symbol", true), 0 }, + { localization("Parachute Symbol", true), 0 }, + { localization("Jetpack Symbol", true), 0 }, + { localization("Sawblade Symbol", true), 0 }, + }; +} \ No newline at end of file diff --git a/GTAV/src/global/lists.h b/GTAV/src/global/lists.h new file mode 100644 index 0000000..52ed2ca --- /dev/null +++ b/GTAV/src/global/lists.h @@ -0,0 +1,43 @@ +#pragma once +#include "stdafx.h" +#include "menu/base/options/scroll.h" +#include "util/math.h" +#include "rage/types/base_types.h" + +namespace global::lists { + struct particle { + const char* m_dict; + const char* m_texture; + bool m_looped; + + particle(const char* a = "", const char* b = "", bool c = false) + : m_dict(a), m_texture(b), m_looped(c) {} + }; + + extern scroll_struct g_timers[10]; + extern scroll_struct g_distances[8]; + extern scroll_struct g_ped_model_popular[9]; + extern scroll_struct g_ped_model_story[25]; + extern scroll_struct g_ped_model_animal[20]; + extern scroll_struct g_ped_model_emergency[16]; + extern scroll_struct g_ped_model_role[14]; + extern scroll_struct g_ped_model_ambient[6]; + extern scroll_struct g_ped_model_misc[5]; + extern scroll_struct g_particles[29]; + extern scroll_struct g_ped_bones[13]; + extern scroll_struct g_vehicle_bones[10]; + extern scroll_struct g_weapons[98]; + extern scroll_struct g_explosions[36]; + extern scroll_struct g_gravity[9]; + extern scroll_struct g_opacity[6]; + extern scroll_struct g_vehicle_weapons[9]; + extern scroll_struct, math::vector3_>> g_acrobatics[10]; + extern scroll_struct> g_popular_locations[35]; + extern scroll_struct g_object_model_small[39]; + extern scroll_struct g_object_model_medium[27]; + extern scroll_struct g_object_model_large[17]; + extern scroll_struct g_object_model_flags[17]; + extern scroll_struct g_precisions[10]; + extern scroll_struct> g_sounds[109]; + extern scroll_struct g_markers[43]; +} \ No newline at end of file diff --git a/GTAV/src/global/ui_vars.cpp b/GTAV/src/global/ui_vars.cpp new file mode 100644 index 0000000..53dc211 --- /dev/null +++ b/GTAV/src/global/ui_vars.cpp @@ -0,0 +1,94 @@ +#include "ui_vars.h" + +namespace global::ui { + float g_option_scale = 0.0315f; + float g_option_height = g_option_scale * 10.f; + + std::string g_render_queue[100]; + std::string g_rendering_tooltip; + line_2d* m_line_2d; + int g_line_2d_index = 0; + + int g_render_queue_index = 0; + bool g_stop_rendering; + bool g_rendering_color; + bool g_render_tooltip = true; + bool g_render_globe = true; + bool g_disable_title = false; + bool g_scroll_lerp = true; + bool g_input_open; + + float g_wrap = 0.063f; + float g_delta = 0.f; + float g_scroll_lerp_speed = 25.f; + + int g_header_font = 0; + int g_sub_header_font = 4; + int g_option_font = 4; + int g_open_tooltip_font = 4; + int g_tooltip_font = 4; + int g_stacked_display_font = 0; + int g_notify_title_font = 0; + int g_notify_body_font = 0; + int g_panel_font = 4; + + math::vector2 g_position = { 0.70f, 0.3f }; + math::vector2 g_scale = { 0.22f, 0.f }; + math::vector2 g_submenu_arrow_position = { 0.218f, 0.010f }; + math::vector2 g_submenu_arrow_scale = { 0.007f, 0.013f }; + math::vector2 g_toggle_position = { 0.221f, 0.016f }; + math::vector2 g_toggle_scale = { 0.007f, 0.011f }; + math::vector2 g_globe_position = { 0.4405f, 0.328f }; + math::vector2 g_globe_scale = { 0.978f, 0.906f }; + math::vector2 g_stacked_display_scale = { 0.15f, 0.015f }; + math::vector2 g_stacked_display_position = { 0.845f, 0.01f }; + + // 76, 37, 219 + + color_rgba g_success = color_rgba(70, 219, 37, 255); + color_rgba g_error = color_rgba(219, 37, 37, 255); + color_rgba g_main_header = color_rgba(220, 76, 81, 255); + color_rgba g_sub_header = color_rgba(0, 0, 0, 220); + color_rgba g_sub_header_text = color_rgba(255, 255, 255, 255); + color_rgba g_background = color_rgba(0, 0, 0, 255); + color_rgba g_scroller = color_rgba(186, 65, 69, 255); + color_rgba g_footer = color_rgba(220, 76, 81, 220); + color_rgba g_title = color_rgba(255, 255, 255, 255); + color_rgba g_open_tooltip = color_rgba(220, 76, 81, 255); + color_rgba g_tooltip = color_rgba(220, 76, 81, 255); + color_rgba g_option = color_rgba(255, 255, 255, 255); + color_rgba g_option_selected = color_rgba(255, 255, 255, 255); + color_rgba g_toggle_on = color_rgba(130, 214, 157, 255); + color_rgba g_toggle_off = color_rgba(200, 55, 80, 255); + color_rgba g_break = color_rgba(255, 255, 255, 255); + color_rgba g_submenu_bar = color_rgba(255, 255, 255, 255); + color_rgba g_clear_area_range = color_rgba(220, 76, 81, 255); + color_rgba g_hotkey_bar = color_rgba(220, 76, 81, 255); + color_rgba g_color_grid_bar = color_rgba(220, 76, 81, 255); + color_rgba g_notify_bar = color_rgba(220, 76, 81, 255); + color_rgba g_notify_background = color_rgba(40, 40, 40, 255); + color_rgba g_panel_bar = color_rgba(220, 76, 81, 255); + color_rgba g_stacked_display_bar = color_rgba(220, 76, 81, 255); + color_rgba g_stacked_display_background = color_rgba(0, 0, 0, 180); + color_rgba g_panel_background = color_rgba(0, 0, 0, 180); + color_rgba g_hotkey_background = color_rgba(0, 0, 0, 180); + color_rgba g_color_grid_background = color_rgba(0, 0, 0, 180); + color_rgba g_hotkey_input = color_rgba(40, 40, 40, 200); + color_rgba g_instructional_background = color_rgba(0, 0, 0, 255); + color_rgba g_globe = color_rgba(255, 255, 255, 255); + + menu_texture m_header = menu_texture(&g_main_header); + menu_texture m_background = menu_texture(&g_background); + menu_texture m_scroller = menu_texture(&g_scroller); + menu_texture m_footer = menu_texture(&g_footer); + menu_texture m_tooltip_background; + menu_texture m_tooltip_bar; + menu_texture m_stacked_display_background; + menu_texture m_stacked_display_bar; + menu_texture m_panel_background; + menu_texture m_panel_bar; + menu_texture m_notify_background; + menu_texture m_notify_bar; + menu_texture m_vehicle_stats_background; + menu_texture m_vehicle_stats_bar; +} \ No newline at end of file diff --git a/GTAV/src/global/ui_vars.h b/GTAV/src/global/ui_vars.h new file mode 100644 index 0000000..6dd11c1 --- /dev/null +++ b/GTAV/src/global/ui_vars.h @@ -0,0 +1,181 @@ +#pragma once +#include "stdafx.h" +#include "util/math.h" +#include "util/localization.h" +#include + +struct color_rgba { + int r; + int g; + int b; + int a = 255; + + color_rgba() + : r(0), g(0), b(0), a(0) {} + + color_rgba(int red, int green, int blue, int alpha = 255) + : r(red), g(green), b(blue), a(alpha) {} + + color_rgba(uint32_t hex) + : r(hex >> 24), g(((hex >> 16) & 0x00FF)), b(((hex >> 8) & 0x0000FF)), a(hex & 0xFF) {} + + color_rgba opacity(int opacity) { + return color_rgba(r, g, b, opacity); + } + + math::vector3_ as_vector() { + return { r, g, b }; + } + + std::initializer_list as_initializer_list() { + return std::initializer_list { r, g, b, a }; + } + + uint32_t to_argb() { + uint8_t val[4]; + val[0] = a; + val[1] = r; + val[2] = g; + val[3] = b; + + return *(uint32_t*)&val; + } +}; + +struct color_hsv { + float h; + float s; + float v; +}; + +struct radio_context { + std::unordered_map m_toggles; + int m_selected = 0; + int m_count = 0; + std::pair m_sprite = { "", "" }; + + radio_context(const char* dict, const char* texture) { + m_sprite = std::make_pair(dict, texture); + m_selected = 0; + m_count = 0; + } + + void reset() { + m_count = 0; + + for (auto& it : m_toggles) { + it.second = false; + } + } +}; + +struct menu_texture { + bool m_enabled; + radio_context m_context = { "commonmenu", "shop_art_icon" }; + std::string m_texture; + localization m_submenu_name; + color_rgba* m_color = nullptr; + + menu_texture() {} + + menu_texture(color_rgba* color) { + m_color = color; + } +}; + +struct line_2d { + math::vector2 m_from; + math::vector2 m_to; + color_rgba m_color; +}; + +namespace global::ui { + extern float g_option_scale; + extern float g_option_height; + + extern std::string g_render_queue[100]; + extern std::string g_rendering_tooltip; + extern line_2d* m_line_2d; + extern int g_line_2d_index; + + extern int g_render_queue_index; + extern bool g_stop_rendering; + extern bool g_render_tooltip; + extern bool g_rendering_color; + extern bool g_render_globe; + extern bool g_disable_title; + extern bool g_scroll_lerp; + extern bool g_input_open; + + extern float g_wrap; + extern float g_delta; + extern float g_scroll_lerp_speed; + + extern int g_header_font; + extern int g_sub_header_font; + extern int g_option_font; + extern int g_open_tooltip_font; + extern int g_tooltip_font; // + extern int g_stacked_display_font; + extern int g_notify_title_font; + extern int g_notify_body_font; + extern int g_panel_font; + + extern math::vector2 g_position; + extern math::vector2 g_scale; + extern math::vector2 g_submenu_arrow_position; + extern math::vector2 g_submenu_arrow_scale; + extern math::vector2 g_toggle_position; + extern math::vector2 g_toggle_scale; + extern math::vector2 g_globe_position; + extern math::vector2 g_globe_scale; + extern math::vector2 g_stacked_display_scale; + extern math::vector2 g_stacked_display_position; + + extern color_rgba g_success; + extern color_rgba g_error; + extern color_rgba g_main_header; + extern color_rgba g_sub_header; + extern color_rgba g_sub_header_text; + extern color_rgba g_background; + extern color_rgba g_scroller; + extern color_rgba g_footer; + extern color_rgba g_title; + extern color_rgba g_open_tooltip; + extern color_rgba g_tooltip; + extern color_rgba g_option; + extern color_rgba g_option_selected; + extern color_rgba g_toggle_on; + extern color_rgba g_toggle_off; + extern color_rgba g_break; + extern color_rgba g_submenu_bar; + extern color_rgba g_clear_area_range; + extern color_rgba g_hotkey_bar; + extern color_rgba g_notify_bar; + extern color_rgba g_notify_background; + extern color_rgba g_panel_bar; + extern color_rgba g_stacked_display_bar; + extern color_rgba g_stacked_display_background; + extern color_rgba g_panel_background; + extern color_rgba g_hotkey_background; + extern color_rgba g_hotkey_input; + extern color_rgba g_instructional_background; + extern color_rgba g_globe; + extern color_rgba g_color_grid_background; + extern color_rgba g_color_grid_bar; + + extern menu_texture m_header; + extern menu_texture m_background; + extern menu_texture m_scroller; + extern menu_texture m_footer; + extern menu_texture m_tooltip_background; + extern menu_texture m_tooltip_bar; + extern menu_texture m_stacked_display_background; + extern menu_texture m_stacked_display_bar; + extern menu_texture m_panel_background; + extern menu_texture m_panel_bar; + extern menu_texture m_notify_background; + extern menu_texture m_notify_bar; + extern menu_texture m_vehicle_stats_background; + extern menu_texture m_vehicle_stats_bar; +} \ No newline at end of file diff --git a/GTAV/src/global/vars.cpp b/GTAV/src/global/vars.cpp new file mode 100644 index 0000000..3ab2f35 --- /dev/null +++ b/GTAV/src/global/vars.cpp @@ -0,0 +1,322 @@ +#include "vars.h" + +namespace global::vars { + uint64_t g_ros_init_crypto; + uint64_t g_ros_read_stats_by_gamer; + uint64_t g_ros_download_player_image; + + bool g_arxan_called[10]; + bool g_chinese; + bool g_unloading = false; + bool g_unloading_queue = false; + bool g_freemode_terminated = false; + bool g_reapply_weapons = false; + HMODULE g_module_handle; + std::pair g_cheat_address; + std::pair g_game_address; + HWND g_window; + std::vector g_localization_table; + bool g_steam = false; + bool g_reload_weapons; + std::pair g_selected_metric_system = { 2.236936f, "MPH" }; + std::unordered_map> g_online_rockstar_ids; + std::vector g_online_rockstar_ids_queue; + std::vector g_relay_usage; + std::queue g_geo_queue; + std::unordered_map g_geo; + rage::types::dictionary* g_custom_dictionary; + rage::types::dictionary* g_player_img_dictionary; + math::vector2 g_resolution; + math::vector2 g_desktop_resolution; + uint64_t g_texture_bypass; + uint64_t g_marker_bypass; + std::unordered_map g_alignment_tests; + std::vector g_patches; + std::unordered_map < std::string, patches> g_hack_patches; + std::vector> g_return_address_node_iterations; + std::unordered_map g_desyncs_host; + std::unordered_map g_desyncs; + std::vector g_join_timeout_fix; + std::vector> g_host_desync_logs; + std::unordered_map g_last_synced_player_models; + std::vector g_gs_info_requests; + std::unordered_map g_spoofed_data_join_requests; + std::unordered_map> g_raw_buffer_translations; + std::unordered_map g_sync_real_ip; + std::unordered_map g_sync_peer_corruption; + uint8_t g_arxan_restore_bytes[2][2][25]; + uint64_t g_arxan_restore_addresses[2]; + std::unordered_map g_read_stats_by_gamer_results; + std::vector> g_player_image_queue; + PlayerMenuType g_network_menu_type; + bool g_change_peer; + + // game structures + game_state* g_game_state; + rage::invoker::native_registration** g_native_registration; + rage::network::rs_info* g_rs_info; + rage::types::ped_factory* g_ped_factory; + rage::network::game_camera_angles* g_game_camera_angles; + rage::types::waypoint_data* g_waypoint_data; + rage::network::net_shop_queue* g_net_shop_queue; + rage::types::ui_visual_settings* g_ui_visual_settings; + rage::types::vfx_liquid* g_vfx_liquid; + rage::network::friends* g_friends; + rage::types::texture_store* g_texture_store; + rage::types::store_manager* g_store_manager; + rage::types::memory_heap_pt* g_memory_heap; + //rage::types::replay_interface* g_replay_interface; + rage::types::explosion_data* g_explosion_data; + rage::types::explosion_fx* g_explosion_fx; + rage::network::network_base_config* g_network_base_config; + rage::types::ocean_quads g_ocean_quads; + rage::types::water_tune* g_water_tune; + rage::types::ui_weather* g_ui_weather; + rage::types::ui_puddle* g_ui_puddle; + rage::types::blip_list* g_blip_list; + + // game pools + guid_pool* g_object_pool; + guid_pool* g_ped_pool; + vehicle_pool* g_vehicle_pool; + guid_pool* g_pickup_pool; + + // game lists + hash_list g_weapon_components; + hash_list g_weapon_info; + hash_list g_script_handlers; + std::pair g_vfx_wheel; + + // game addresses + uint64_t g_d3d11_device; + uint64_t g_process_transaction_id; + uint64_t g_sync_data_reader_vtable; + uint64_t** g_global_cache; + uint64_t g_nullsub; + uint64_t g_read_bool_from_bit_buffer; + uint64_t g_read_int_from_bit_buffer; + uint64_t g_read_uint_from_bit_buffer; + uint64_t g_read_byte_from_bit_buffer; + uint64_t g_read_ulonglong_from_bit_Buffer; + uint64_t g_read_short_from_bit_buffer; + uint64_t g_read_vector3_from_bit_buffer; + uint64_t g_read_array_from_bit_buffer; + uint64_t g_read_msg_header_from_bit_buffer; + uint64_t g_read_pickup_from_bit_buffer; + uint64_t g_write_uint_to_bit_buffer; + uint64_t g_sc_game_info_table; + uint64_t g_sc_get_game_info_table; + uint64_t g_game_streamed_scripts; + uint64_t g_get_streamed_script; + uint64_t g_get_third_person_camera; + uint64_t g_third_person_camera; + uint64_t g_get_entity_address; + uint64_t g_get_entity_handle_from_address; + uint64_t g_get_net_game_player_from_index; + uint64_t g_get_model_info; + uint64_t g_set_vehicle_gravity; + uint64_t g_get_vehicle_paint_array; + uint64_t g_draw_origin_index; + uint64_t g_add_to_clock_time; + uint64_t g_dispatch_service_table; + uint64_t g_sync_clock_time; + uint64_t g_send_weather_update; + uint64_t g_get_host_net_game_player; + uint64_t g_send_increment_stat_event; + uint64_t g_update_net_object_owner; + uint64_t g_network_object_manager; + uint64_t g_network_player_manager; + uint64_t g_handle_rotation_values_from_order; + uint64_t g_get_net_game_player_from_handle; + uint64_t g_get_sprite_texture; + uint64_t g_send_text_message_net_msg; + uint64_t g_set_traffic_lights; + uint64_t g_update_traffic_lights; + uint64_t g_set_traffic_light_colors; + uint64_t g_set_vehicle_lights; + uint64_t g_get_sync_tree_from_clone_type; + uint64_t g_get_network_object_from_network_id; + uint64_t g_get_network_config_from_peer; + uint64_t g_network_event_registration; + uint64_t g_update_ui_values; + uint64_t g_update_ui_values_2; + uint64_t g_set_vehicle_neon_ui; + uint64_t g_set_seethrough; + uint64_t g_add_basket_to_queue; + uint64_t g_add_item_to_basket; + uint64_t g_send_session_info_request; + uint64_t g_get_session_info_from_gs; + uint64_t g_send_network_event_reply; + uint64_t g_send_network_event_ack; + uint64_t g_setup_give_control_event; + uint64_t g_send_friend_request; + uint64_t g_get_client_player_key; + uint64_t g_render_water_on_map_intensity; + uint64_t g_map_fog_intensity; + uint64_t g_send_presence_event; + uint64_t g_migrate_script_host; + uint64_t g_is_reported_for_reason; + uint64_t g_chat_info; + uint64_t g_send_matchmaking_request; + uint64_t g_read_xml_string; + uint64_t g_read_xml_node_string; + uint64_t g_register_streaming_file; + uint64_t g_create_game_invite_presence; + uint64_t g_send_game_invite_presence; + uint64_t g_send_game_invite_presence_table; + uint64_t g_send_ragdoll_event; + uint64_t g_grc_texture_factory_dx11; + uint64_t g_thread_alloc; + uint64_t g_setup_dictionary; + uint64_t g_setup_store_item; + uint64_t g_is_valid_pool_slot; + uint64_t g_add_dictionary_to_pool; + uint64_t g_add_grc_texture_to_dictionary; + uint64_t g_get_weather_id; + uint64_t g_weather_table; + uint64_t g_get_font_id_table; + uint64_t g_get_store_module_extension; + uint64_t g_request_streaming_file; + uint64_t g_construct_gfx_font; + uint64_t g_destruct; + uint64_t g_create_id_for_font; + uint64_t g_add_font_lib; + uint64_t g_vertex_begin; + uint64_t g_vertex_end; + uint64_t g_vertex_add; + uint64_t g_render_script_texture; + uint64_t g_font_table; + uint64_t g_font_memory_helper; + uint64_t g_parse_nodes; + uint64_t g_read_new_script_host_message; + uint64_t g_write_gs_item; + uint64_t g_game_script_handler_manager; + uint64_t g_translate_native; + uint64_t g_global_chat_ptr; + uint64_t g_send_global_chat_message; + uint64_t g_add_chat_message; + uint64_t g_chat_config; + uint64_t g_ped_orientation_writer; + uint64_t g_entity_orientation_writer; + uint64_t g_social_club_game_info_table; + uint64_t g_social_club_get_game_info_table; + uint64_t g_reset_script_render_params[2]; + uint64_t g_get_player_info_from_net_msg; + uint64_t g_drop_shaders; + uint64_t g_drop_shader_count; + uint64_t g_get_net_msg_net_player; + uint64_t g_ui_3d_draw_manager; + uint64_t g_push_scene_preset_to_manager; + uint64_t g_add_element_to_scene; + uint64_t g_set_scene_element_lighting; + uint64_t g_invalid_string_address; + uint64_t g_construct_read_session_join_request_msg; + uint64_t g_read_session_join_request_msg; + uint64_t g_read_token_from_bit_buffer; + uint64_t g_read_string_from_bit_buffer; + uint64_t g_invite_player; + uint64_t g_sync_data_writer_vtable; + + uint32_t g_ozark_detections[] = { + 0x22ae9ef7, + 0xd5c31f7a, + 0xf807b7e0, + 0x3895afe2, + 0x4ee4092c, + 0x8c16a626, + 0x3039cd1b, + 0xfe2d7811, + 0xff1816e5, + 0xf7badafb, + 0xb9d09512, + 0xfb2a0138, + 0x1c1fe653, + 0xcc50aa5a, + 0x4c0a1f3c, + 0x01397d8e, + 0x1cca797b, + 0xa3c78808, + 0xe0e0d4ae, + 0x80f00989, + 0xcc450cbb, + 0xc7dc381, + 0x3640ac4d, + 0xae6d9427, + 0x6613ba47, + 0xbd9b0ece, + 0x7989c8ef, + 0x6c0df033, + 0x2c826d8c, + 0x4d4a2dbf, + 0xcc1a895a, + 0x1097331, + 0xdf577ec3, + 0x62c5565, + 0xfe7b45da, + 0xd268409b, + 0x200bfa48, + 0xc3851eef, + 0x7d973e49, + 0x9e20d29, + 0x203ac304, + 0x35d0430d, + 0x0d1c850a, + 0x095436c0, + 0x68a29afa, + 0x753ec6fd, + 0x7cd15134, + 0xcb41f199, + 0xebbe7348, + 0xceba5a71, + 0xb4ad9f12, + 0x00b8b574, + 0xb5f0b06d, + 0xa4daa011, + 0x74be9134, + 0xc61f6ed7, + 0x92e195f9, + 0xe0732c89, + 0xcee496c4, + 0x048cd47d, + 0xd23d2d64, + 0xd2229f24, + 0xf0a8b10a, + 0x69a48342, + 0x6c548c90, + 0x94b993ab, + 0x2876763d, + 0xc300d11c, + 0x3aeb8203, + 0xcf4ac36e, + 0xfd0fc06b, + 0x551b54a5, + 0x4cc1c54b, + 0x03774cdb, + 0x379ce628, + 0xe8490ddd, + 0xd9352f6b, + 0xf47c081e, + 0xc765d720, + 0xfcca2774, + 0x114dee50, + 0xcb29360b, + 0x983162a9, + 0xbb98b280, + 0xb1fac843, + 0xae08ab79, + 0x646f1d41, + 0x8fc23a82, + 0x3543f2bd, + 0x8701d0e0, + 0x677a359f, + 0xa4ea31f, + 0x97c34e43, + 0x5b396fbb, + 0xf7080942, + 0x278946b1, + 0x6518b45a, + 0x6325d30f, + 0xa19b464, + 0x63794f98 + }; +} \ No newline at end of file diff --git a/GTAV/src/global/vars.h b/GTAV/src/global/vars.h new file mode 100644 index 0000000..31deffa --- /dev/null +++ b/GTAV/src/global/vars.h @@ -0,0 +1,269 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/base_types.h" +#include "rage/types/generic_types.h" +#include "rage/types/network_types.h" +#include "rage/types/invoker_types.h" +#include "rage/types/script_types.h" +#include "rage/types/ros_types.h" +#include "util/localization.h" +#include +#include + +#pragma pack(push) +#pragma pack(1) +struct protection_context { + int m_var = 0; + localization m_tooltip; + + bool block() { + return m_var == 2 || m_var == 3 || m_var == 5 || m_var == 7; + } + + bool notify() { + return m_var == 1 || m_var == 3 || m_var == 6 || m_var == 7; + } + + bool redirect() { + return m_var >= 4; + } + + bool enabled() { + return m_var > 0; + } +}; + +struct join_timeout_fix { + Player m_id; + uint32_t m_script_hash; + int m_retry_count; +}; + +struct gs_info_request { + bool m_finished = false; + int m_type; // 1 = join blocking, 2 = rid joiner, 69 = ozark + uint64_t m_rockstar_id; + uint32_t m_expiry; + std::function m_callback; +}; + +namespace global::vars { + extern uint64_t g_ros_init_crypto; + extern uint64_t g_ros_read_stats_by_gamer; + extern uint64_t g_ros_download_player_image; + + extern bool g_arxan_called[10]; + extern bool g_chinese; + extern bool g_unloading; + extern bool g_unloading_queue; + extern bool g_freemode_terminated; + extern bool g_reapply_weapons; + extern HMODULE g_module_handle; + extern std::pair g_cheat_address; + extern std::pair g_game_address; + extern HWND g_window; + extern std::vector g_localization_table; + extern bool g_steam; + extern bool g_reload_weapons; + extern std::pair g_selected_metric_system; + extern std::unordered_map> g_online_rockstar_ids; + extern std::vector g_online_rockstar_ids_queue; + extern std::vector g_relay_usage; + extern std::queue g_geo_queue; + extern std::unordered_map g_geo; + extern rage::types::dictionary* g_custom_dictionary; + extern rage::types::dictionary* g_player_img_dictionary; + extern math::vector2 g_resolution; + extern math::vector2 g_desktop_resolution; + extern uint64_t g_texture_bypass; + extern uint64_t g_marker_bypass; + extern std::unordered_map g_alignment_tests; + extern std::vector g_patches; + extern std::unordered_map g_hack_patches; + extern std::vector> g_return_address_node_iterations; + extern std::unordered_map g_desyncs_host; + extern std::unordered_map g_desyncs; + extern std::vector g_join_timeout_fix; + extern std::vector> g_host_desync_logs; + extern std::unordered_map g_last_synced_player_models; + extern std::vector g_gs_info_requests; + extern std::unordered_map g_spoofed_data_join_requests; + extern std::unordered_map> g_raw_buffer_translations; + extern std::unordered_map g_sync_real_ip; + extern std::unordered_map g_sync_peer_corruption; + extern uint8_t g_arxan_restore_bytes[2][2][25]; + extern uint64_t g_arxan_restore_addresses[2]; + extern std::unordered_map g_read_stats_by_gamer_results; + extern std::vector> g_player_image_queue; + extern PlayerMenuType g_network_menu_type; + extern bool g_change_peer; + + // game structures + extern game_state* g_game_state; + extern rage::invoker::native_registration** g_native_registration; + extern rage::network::rs_info* g_rs_info; + extern rage::types::ped_factory* g_ped_factory; + extern rage::network::game_camera_angles* g_game_camera_angles; + extern rage::types::waypoint_data* g_waypoint_data; + extern rage::network::net_shop_queue* g_net_shop_queue; + extern rage::types::ui_visual_settings* g_ui_visual_settings; + extern rage::types::vfx_liquid* g_vfx_liquid; + extern rage::network::friends* g_friends; + extern rage::types::texture_store* g_texture_store; + extern rage::types::store_manager* g_store_manager; + extern rage::types::memory_heap_pt* g_memory_heap; + //extern rage::types::replay_interface* g_replay_interface; + extern rage::types::explosion_data* g_explosion_data; + extern rage::types::explosion_fx* g_explosion_fx; + extern rage::network::network_base_config* g_network_base_config; + extern rage::types::ocean_quads g_ocean_quads; + extern rage::types::water_tune* g_water_tune; + extern rage::types::ui_weather* g_ui_weather; + extern rage::types::ui_puddle* g_ui_puddle; + extern rage::types::blip_list* g_blip_list; + + // game pools + extern guid_pool* g_object_pool; + extern guid_pool* g_ped_pool; + extern vehicle_pool* g_vehicle_pool; + extern guid_pool* g_pickup_pool; + + // game lists + extern hash_list g_weapon_components; + extern hash_list g_weapon_info; + extern hash_list g_script_handlers; + extern std::pair g_vfx_wheel; + + // game addresses + extern uint64_t g_d3d11_device; + extern uint64_t g_process_transaction_id; + extern uint64_t g_sync_data_reader_vtable; + extern uint64_t g_nullsub; + extern uint64_t** g_global_cache; + extern uint64_t g_read_bool_from_bit_buffer; + extern uint64_t g_read_int_from_bit_buffer; + extern uint64_t g_read_uint_from_bit_buffer; + extern uint64_t g_read_byte_from_bit_buffer; + extern uint64_t g_read_ulonglong_from_bit_Buffer; + extern uint64_t g_read_short_from_bit_buffer; + extern uint64_t g_read_vector3_from_bit_buffer; + extern uint64_t g_read_array_from_bit_buffer; + extern uint64_t g_read_msg_header_from_bit_buffer; + extern uint64_t g_read_pickup_from_bit_buffer; + extern uint64_t g_write_uint_to_bit_buffer; + extern uint64_t g_sc_game_info_table; + extern uint64_t g_sc_get_game_info_table; + extern uint64_t g_game_streamed_scripts; + extern uint64_t g_get_streamed_script; + extern uint64_t g_get_third_person_camera; + extern uint64_t g_third_person_camera; + extern uint64_t g_get_entity_address; + extern uint64_t g_get_entity_handle_from_address; + extern uint64_t g_get_net_game_player_from_index; + extern uint64_t g_get_model_info; + extern uint64_t g_set_vehicle_gravity; + extern uint64_t g_get_vehicle_paint_array; + extern uint64_t g_draw_origin_index; + extern uint64_t g_add_to_clock_time; + extern uint64_t g_dispatch_service_table; + extern uint64_t g_sync_clock_time; + extern uint64_t g_send_weather_update; + extern uint64_t g_get_host_net_game_player; + extern uint64_t g_send_increment_stat_event; + extern uint64_t g_update_net_object_owner; + extern uint64_t g_network_object_manager; + extern uint64_t g_network_player_manager; + extern uint64_t g_handle_rotation_values_from_order; + extern uint64_t g_get_net_game_player_from_handle; + extern uint64_t g_get_sprite_texture; + extern uint64_t g_send_text_message_net_msg; + extern uint64_t g_set_traffic_lights; + extern uint64_t g_update_traffic_lights; + extern uint64_t g_set_traffic_light_colors; + extern uint64_t g_set_vehicle_lights; + extern uint64_t g_get_sync_tree_from_clone_type; + extern uint64_t g_get_network_object_from_network_id; + extern uint64_t g_get_network_config_from_peer; + extern uint64_t g_network_event_registration; + extern uint64_t g_update_ui_values; + extern uint64_t g_update_ui_values_2; + extern uint64_t g_set_vehicle_neon_ui; + extern uint64_t g_set_seethrough; + extern uint64_t g_add_basket_to_queue; + extern uint64_t g_add_item_to_basket; + extern uint64_t g_send_session_info_request; + extern uint64_t g_get_session_info_from_gs; + extern uint64_t g_send_network_event_reply; + extern uint64_t g_send_network_event_ack; + extern uint64_t g_setup_give_control_event; + extern uint64_t g_send_friend_request; + extern uint64_t g_get_client_player_key; + extern uint64_t g_render_water_on_map_intensity; + extern uint64_t g_map_fog_intensity; + extern uint64_t g_send_presence_event; + extern uint64_t g_migrate_script_host; + extern uint64_t g_is_reported_for_reason; + extern uint64_t g_chat_info; + extern uint64_t g_send_matchmaking_request; + extern uint64_t g_read_xml_string; + extern uint64_t g_read_xml_node_string; + extern uint64_t g_register_streaming_file; + extern uint64_t g_create_game_invite_presence; + extern uint64_t g_send_game_invite_presence; + extern uint64_t g_send_game_invite_presence_table; + extern uint64_t g_send_ragdoll_event; + extern uint64_t g_grc_texture_factory_dx11; + extern uint64_t g_thread_alloc; + extern uint64_t g_setup_dictionary; + extern uint64_t g_setup_store_item; + extern uint64_t g_is_valid_pool_slot; + extern uint64_t g_add_dictionary_to_pool; + extern uint64_t g_add_grc_texture_to_dictionary; + extern uint64_t g_get_weather_id; + extern uint64_t g_weather_table; + extern uint64_t g_get_font_id_table; + extern uint64_t g_get_store_module_extension; + extern uint64_t g_request_streaming_file; + extern uint64_t g_construct_gfx_font; + extern uint64_t g_destruct; + extern uint64_t g_create_id_for_font; + extern uint64_t g_add_font_lib; + extern uint64_t g_vertex_begin; + extern uint64_t g_vertex_end; + extern uint64_t g_vertex_add; + extern uint64_t g_render_script_texture; + extern uint64_t g_font_table; + extern uint64_t g_font_memory_helper; + extern uint64_t g_parse_nodes; + extern uint64_t g_read_new_script_host_message; + extern uint64_t g_write_gs_item; + extern uint64_t g_game_script_handler_manager; + extern uint64_t g_translate_native; + extern uint64_t g_global_chat_ptr; + extern uint64_t g_send_global_chat_message; + extern uint64_t g_add_chat_message; + extern uint64_t g_chat_config; + extern uint64_t g_ped_orientation_writer; + extern uint64_t g_entity_orientation_writer; + extern uint64_t g_social_club_game_info_table; + extern uint64_t g_social_club_get_game_info_table; + extern uint64_t g_reset_script_render_params[2]; + extern uint64_t g_get_player_info_from_net_msg; + extern uint64_t g_drop_shaders; + extern uint64_t g_drop_shader_count; + extern uint64_t g_get_net_msg_net_player; + extern uint64_t g_ui_3d_draw_manager; + extern uint64_t g_push_scene_preset_to_manager; + extern uint64_t g_add_element_to_scene; + extern uint64_t g_set_scene_element_lighting; + extern uint64_t g_invalid_string_address; + extern uint64_t g_construct_read_session_join_request_msg; + extern uint64_t g_read_session_join_request_msg; + extern uint64_t g_read_token_from_bit_buffer; + extern uint64_t g_read_string_from_bit_buffer; + extern uint64_t g_invite_player; + extern uint64_t g_sync_data_writer_vtable; + + extern uint32_t g_ozark_detections[100]; +} +#pragma pack(pop) \ No newline at end of file diff --git a/GTAV/src/menu/base/base.cpp b/GTAV/src/menu/base/base.cpp new file mode 100644 index 0000000..76f3bed --- /dev/null +++ b/GTAV/src/menu/base/base.cpp @@ -0,0 +1,71 @@ +#include "base.h" +#include "renderer.h" +#include "rage/invoker/natives.h" +#include "submenu_handler.h" + +namespace menu::base { + void base::update() { + if (m_disable_input_this_frame) { + m_disable_input_this_frame = false; + m_input_disabled = true; + } else m_input_disabled = false; + + if (m_open) { + native::set_input_exclusive(2, INPUT_FRONTEND_ACCEPT); + native::set_input_exclusive(2, INPUT_FRONTEND_CANCEL); + native::set_input_exclusive(2, INPUT_FRONTEND_DOWN); + native::set_input_exclusive(2, INPUT_FRONTEND_UP); + native::set_input_exclusive(2, INPUT_FRONTEND_LEFT); + native::set_input_exclusive(2, INPUT_FRONTEND_RIGHT); + // native::disable_control_action(0, INPUT_NEXT_CAMERA, true); + native::disable_control_action(0, INPUT_VEH_SELECT_NEXT_WEAPON, true); + native::disable_control_action(0, INPUT_FRONTEND_RIGHT, true); + native::disable_control_action(0, INPUT_FRONTEND_DOWN, true); + native::disable_control_action(0, INPUT_FRONTEND_LEFT, true); + native::disable_control_action(0, INPUT_FRONTEND_UP, true); + native::disable_control_action(0, INPUT_ARREST, true); + native::disable_control_action(0, INPUT_CONTEXT, true); + native::disable_control_action(0, INPUT_MELEE_BLOCK, true); + native::disable_control_action(2, INPUT_FRONTEND_UP, true); + native::disable_control_action(0, INPUT_HUD_SPECIAL, true); + native::disable_control_action(0, INPUT_VEH_CIN_CAM, true); + native::disable_control_action(2, INPUT_VEH_CIN_CAM, true); + native::disable_control_action(0, INPUT_VEH_HEADLIGHT, true); + native::disable_control_action(2, INPUT_FRONTEND_LEFT, true); + native::disable_control_action(2, INPUT_FRONTEND_DOWN, true); + native::disable_control_action(2, INPUT_FRONTEND_RDOWN, true); + native::disable_control_action(2, INPUT_FRONTEND_RIGHT, true); + native::disable_control_action(0, INPUT_CHARACTER_WHEEL, true); + native::disable_control_action(0, INPUT_VEH_RADIO_WHEEL, true); + native::disable_control_action(2, INPUT_FRONTEND_CANCEL, true); + native::disable_control_action(0, INPUT_MELEE_ATTACK_LIGHT, true); + native::disable_control_action(0, INPUT_MELEE_ATTACK_HEAVY, true); + native::disable_control_action(0, INPUT_SELECT_CHARACTER_TREVOR, true); + native::disable_control_action(0, INPUT_SELECT_CHARACTER_MICHAEL, true); + native::disable_control_action(0, INPUT_SELECT_CHARACTER_FRANKLIN, true); + native::disable_control_action(0, INPUT_SELECT_CHARACTER_MULTIPLAYER, true); + + menu::renderer::render(); + menu::submenu::handler::update(); + } else { + if (global::ui::g_render_tooltip) { + menu::renderer::render_open_tooltip(); + } + } + } + + bool base::is_option_selected(int option) { + if (global::ui::g_scroll_lerp) { + float expected = global::ui::g_position.y + (option * global::ui::g_option_scale); + float current = menu::renderer::get_smooth_scroll(); + float buffer = (global::ui::g_option_scale * 0.5f); + + return current >= expected - buffer && current <= expected + buffer; + } else return menu::renderer::get_render_count() == option + 1; + } + + base* get_base() { + static base instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/base.h b/GTAV/src/menu/base/base.h new file mode 100644 index 0000000..d416e69 --- /dev/null +++ b/GTAV/src/menu/base/base.h @@ -0,0 +1,166 @@ +#pragma once +#include "stdafx.h" + +typedef enum { + SCROLL, + TOGGLE, + SCROLLSELECT +} scroll_option_type; + +namespace menu::base { + class base { + public: + void update(); + bool is_option_selected(int option); + + void set_max_options(int val) { + m_max_options = val; + } + + void set_current_option(int val) { + m_current_option = val; + } + + void set_scroll_offset(int val) { + m_scroll_offset = val; + } + + void set_break_scroll(int val) { + m_break_scroll = val; + } + + void set_open(bool open) { + m_open = open; + } + + void set_disable_input_this_frame() { + m_disable_input_this_frame = true; + } + + void set_keyboard_title(std::string title) { + m_keyboard_title = title; + } + + int get_max_options() { + return m_max_options; + } + + int get_current_option() { + return m_current_option; + } + + int get_scroll_offset() { + return m_scroll_offset; + } + + int get_break_scroll() { + return m_break_scroll; + } + + bool is_input_disabled() { + return m_input_disabled; + } + + bool is_open() { + return m_open; + } + + std::string get_keyboard_title() { + return m_keyboard_title; + } + + void set_open_key(int key) { + m_open_key = key; + } + + int get_open_key() { + return m_open_key; + } + private: + bool m_open; + int m_open_key = VK_F4; + bool m_disable_input_this_frame; + bool m_input_disabled; + + int m_max_options = 13; + int m_current_option; + int m_scroll_offset; + int m_break_scroll; + + std::string m_keyboard_title = ""; + }; + + base* get_base(); + + inline void update() { + get_base()->update(); + } + + inline bool is_option_selected(int option) { + return get_base()->is_option_selected(option); + } + + inline int get_max_options() { + return get_base()->get_max_options(); + } + + inline int get_current_option() { + return get_base()->get_current_option(); + } + + inline int get_scroll_offset() { + return get_base()->get_scroll_offset(); + } + + inline int get_break_scroll() { + return get_base()->get_break_scroll(); + } + + inline std::string get_keyboard_title() { + return get_base()->get_keyboard_title(); + } + + inline bool is_open() { + return get_base()->is_open(); + } + + inline bool is_input_disabled() { + return get_base()->is_input_disabled(); + } + + inline void set_max_options(int val) { + get_base()->set_max_options(val); + } + + inline void set_current_option(int val) { + get_base()->set_current_option(val); + } + + inline void set_scroll_offset(int val) { + get_base()->set_scroll_offset(val); + } + + inline void set_break_scroll(int val) { + get_base()->set_break_scroll(val); + } + + inline void set_open(bool open) { + get_base()->set_open(open); + } + + inline void set_keyboard_title(std::string title) { + get_base()->set_keyboard_title(title); + } + + inline void set_disable_input_this_frame() { + get_base()->set_disable_input_this_frame(); + } + + inline void set_open_key(int key) { + get_base()->set_open_key(key); + } + + inline int get_open_key() { + return get_base()->get_open_key(); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/options/break.cpp b/GTAV/src/menu/base/options/break.cpp new file mode 100644 index 0000000..010592c --- /dev/null +++ b/GTAV/src/menu/base/options/break.cpp @@ -0,0 +1,57 @@ +#include "break.h" +#include "menu/base/renderer.h" +#include "menu/base/submenu_handler.h" +#include "menu/base/util/input.h" + +void break_option::render(int position) { + m_on_update(this); + + menu::renderer::draw_text("~italic~" + m_name.get(), { global::ui::g_position.x + 0.004f + ((global::ui::g_scale.x - (0.004f * 2.f)) / 2.f), global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, global::ui::g_break, JUSTIFY_CENTER); +} + +void break_option::render_selected(int position, std::stack submenu_name_stack) { + switch (menu::base::get_break_scroll()) { + case 1: // up + if (menu::base::get_scroll_offset() > 0 && menu::base::get_current_option() - menu::base::get_scroll_offset() == 0) { + menu::base::set_scroll_offset(menu::base::get_scroll_offset() - 1); + } + + if (menu::base::get_current_option() - 1 < 0) { + menu::input::scroll_bottom(); + } else { + menu::base::set_current_option(menu::base::get_current_option() - 1); + } + + break; + + case 2: // down + if (menu::base::get_scroll_offset() < menu::submenu::handler::get_total_options() - menu::base::get_max_options() && menu::base::get_current_option() + 1 - menu::base::get_scroll_offset() == menu::base::get_max_options()) { + menu::base::set_scroll_offset(menu::base::get_scroll_offset() + 1); + } + + if (menu::base::get_current_option() + 1 >= menu::submenu::handler::get_total_options()) { + menu::input::scroll_top(); + } else { + menu::base::set_current_option(menu::base::get_current_option() + 1); + } + + break; + + case 3: // bottom + if (menu::base::get_scroll_offset() > 0 && menu::base::get_current_option() - menu::base::get_scroll_offset() == 1) { + menu::base::set_scroll_offset(menu::base::get_scroll_offset() - 1); + } + + menu::base::set_current_option(menu::base::get_current_option() - 1); + break; + + case 4: // top + if (menu::base::get_scroll_offset() < menu::submenu::handler::get_total_options() - menu::base::get_max_options() && menu::submenu::handler::get_total_options() >= menu::base::get_max_options() && menu::base::get_current_option() - menu::base::get_scroll_offset() == menu::base::get_max_options()) { + menu::base::set_scroll_offset(menu::base::get_scroll_offset() + 1); + } + + menu::base::set_current_option(menu::base::get_current_option() + 1); + break; + + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/options/break.h b/GTAV/src/menu/base/options/break.h new file mode 100644 index 0000000..0ab2666 --- /dev/null +++ b/GTAV/src/menu/base/options/break.h @@ -0,0 +1,36 @@ +#pragma once +#include "option.h" +#include "menu/base/base.h" +#include "rage/types/base_types.h" + +class break_option : public base_option { +public: + break_option(std::string name) + : base_option(name) {} + + break_option& add_requirement(std::function function) { + m_requirement = function; + return *this; + } + + break_option& add_update(std::function function) { + m_on_update = function; + return *this; + } + + break_option& add_translate() { + m_name.set_translate(true); + m_tooltip.set_translate(true); + return *this; + } + + void render(int position); + void render_selected(int position, std::stack submenu_name_stack); + void invoke_save(std::stack submenu_name_stack) {} + void invoke_hotkey() {} + void write_translation(nlohmann::json& object) {} + void read_translation(nlohmann::json& object) {} + void reset_translation() {} +private: + std::function m_on_update = [](break_option*) {}; +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/options/button.cpp b/GTAV/src/menu/base/options/button.cpp new file mode 100644 index 0000000..49c11e0 --- /dev/null +++ b/GTAV/src/menu/base/options/button.cpp @@ -0,0 +1,149 @@ +#include "button.h" +#include "menu/base/renderer.h" +#include "menu/base/util/instructionals.h" +#include "menu/base/util/input.h" +#include "menu/base/util/menu_input.h" +#include "menu/base/util/hotkeys.h" +#include "menu/base/util/notify.h" +#include "rage/invoker/natives.h" +#include "util/fiber_pool.h" +#include "util/fiber.h" +#include "util/va.h" + +void button_option::render(int position) { + bool selected = menu::base::is_option_selected(position); + color_rgba color = selected ? global::ui::g_option_selected : global::ui::g_option; + + m_on_update(this); + m_on_update_this(this, position); + + menu::renderer::draw_text(m_name.get(), { global::ui::g_position.x + 0.004f + m_offset, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color); + + if (m_keyboard.m_enabled) { + menu::renderer::draw_sprite({ "ozarktextures", "keyboard.png" }, { global::ui::g_position.x + 0.209f - (0.22f - global::ui::g_scale.x), global::ui::g_position.y + 0.016f + (position * global::ui::g_option_scale) }, { 0.015f * 0.9f, 0.022f * 0.9f }, 0.f, { 255, 255, 255, 255 }); + } else if (m_sprite.m_enabled && m_sprite.m_requirement()) { + color_rgba _color = color; + std::string sprite_name = m_sprite.m_asset.second; + if (strstr(sprite_name.c_str(), "shop_") && sprite_name.compare("shop_tick_icon")) { + sprite_name += "_a"; + _color = { 255, 255, 255, 255 }; + } + + if (m_sprite.m_rotate) { + m_sprite.m_rotation++; + if (m_sprite.m_rotation > 360.f) { + m_sprite.m_rotation = 0.f; + } + } + + menu::renderer::draw_sprite({ m_sprite.m_asset.first, sprite_name }, { global::ui::g_position.x + 0.2195f - (0.23f - global::ui::g_scale.x), global::ui::g_position.y + 0.016f + (position * global::ui::g_option_scale) }, m_sprite.m_scale, m_sprite.m_rotation, _color); + } + + if (m_side_text.m_enabled) { + float mod = 0.f; + if (m_keyboard.m_enabled) { + mod = 0.0135f + 0.002f; + } else if (m_sprite.m_enabled && m_sprite.m_requirement()) { + mod = m_sprite.m_scale.x + 0.002f; + } + + menu::renderer::draw_text(m_side_text.m_text, { global::ui::g_position.x + 0.004f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color, JUSTIFY_RIGHT, { 0.f, (1.0f - (1.0f - (global::ui::g_position.x + (0.315f / 2.f)) - global::ui::g_wrap)) - 0.005f - mod }); + } +} + +void button_option::render_selected(int position, std::stack submenu_name_stack) { + m_on_hover(); + + if (m_instructionals.size()) { + instructionals::setup(); + + for (std::tuple& instructional : m_instructionals) { + if (std::get<2>(instructional)) { + instructionals::add_instructional(std::get<0>(instructional), (eControls)std::get<1>(instructional)); + } else { + instructionals::add_instructional(std::get<0>(instructional), (eScaleformButtons)std::get<1>(instructional)); + } + } + + instructionals::close(); + } + + if (m_requirement() && menu::input::is_option_pressed()) { + m_on_click(); + m_on_click_this(this); + + if (m_keyboard.m_enabled) { + m_keyboard.m_is_active = true; + menu::base::set_keyboard_title(m_keyboard.m_title); + native::display_onscreen_keyboard(0, "Ozark", "", m_keyboard.m_default_text.c_str(), "", "", "", m_keyboard.m_max_chars); + } + } + + if (m_has_hotkey && m_requirement()) { + if (menu::input::is_just_released(true, VK_F12)) { + native::play_sound_frontend(-1, "ATM_WINDOW", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); + + menu::input::push([this] { + menu::input::hotkey(m_name.get(), this); + }); + } + } + + if (m_keyboard.m_enabled) { + if (m_keyboard.m_is_active) { + int status = native::update_onscreen_keyboard(); + if (status == 0) { + menu::base::set_disable_input_this_frame(); + } else if (status == 1) { + if (m_keyboard.m_callback) { + m_keyboard.m_callback(this, native::get_onscreen_keyboard_result()); + } + + m_keyboard.m_is_active = false; + } else if (status > 1) { + m_keyboard.m_is_active = false; + } + } + } +} + +void button_option::invoke_hotkey() { + if (!m_requirement()) return; + + m_on_click(); + m_on_click_this(this); + + if (m_keyboard.m_enabled) { + if (!m_keyboard.m_is_active) { + m_keyboard.m_is_active = true; + menu::base::set_keyboard_title(m_keyboard.m_title); + + util::fiber::pool::add([this] { + native::display_onscreen_keyboard(0, "Ozark", "", "", "", "", "", m_keyboard.m_max_chars); + + while (m_keyboard.m_is_active) { + util::fiber::go_to_main(); + + int status = native::update_onscreen_keyboard(); + if (status == 0) { + menu::base::set_disable_input_this_frame(); + } else if (status == 1) { + if (m_keyboard.m_callback) { + m_keyboard.m_callback(this, native::get_onscreen_keyboard_result()); + } + + m_keyboard.m_is_active = false; + } else if (status > 1) { + m_keyboard.m_is_active = false; + } + } + }); + } + } + + static std::unordered_map notifies; + if (notifies[native::get_hash_key(m_name.get_original().c_str())] > GetTickCount()) return; + + notifies[native::get_hash_key(m_name.get_original().c_str())] = GetTickCount() + 5000; + menu::notify::stacked(TRANSLATE(t_hotkey), util::va::va("%s %s", TRANSLATE(t_used_hotkey_for), m_name.get().c_str())); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/options/button.h b/GTAV/src/menu/base/options/button.h new file mode 100644 index 0000000..6a01a3c --- /dev/null +++ b/GTAV/src/menu/base/options/button.h @@ -0,0 +1,153 @@ +#pragma once +#include "option.h" +#include "menu/base/base.h" +#include "rage/types/base_types.h" +#include "util/math.h" + +class button_option : public base_option { +public: + button_option(std::string name) + : base_option(name) {} + + button_option& ref() { + return *this; + } + + button_option& add_click(std::function function) { + m_on_click = function; + return *this; + } + + button_option& add_click_this(std::function function) { + m_on_click_this = function; + return *this; + } + + button_option& add_requirement(std::function function) { + m_requirement = function; + return *this; + } + + button_option& add_update(std::function function) { + m_on_update = function; + return *this; + } + + button_option& add_update_this(std::function function) { + m_on_update_this = function; + return *this; + } + + button_option& add_hover(std::function function) { + m_on_hover = function; + return *this; + } + + button_option& add_tooltip(std::string tooltip) { + m_tooltip.set(tooltip.c_str()); + return *this; + } + + button_option& add_keyboard(std::string title, int max_chars, std::function function) { + m_keyboard = { true, false, max_chars, function, title }; + return *this; + } + + button_option& add_translate() { + m_name.set_translate(true); + m_tooltip.set_translate(true); + return *this; + } + + button_option& remove_sprite() { + m_sprite.m_enabled = false; + return *this; + } + + button_option& add_sprite(std::pair asset, std::function requirement = [] { return true; }) { + m_sprite = { true, asset, requirement }; + return *this; + } + + button_option& add_sprite_scale(math::vector2 scale) { + m_sprite.m_scale = scale; + return *this; + } + + button_option& add_sprite_rotation() { + m_sprite.m_rotate = true; + return *this; + } + + button_option& add_instructional(std::string text, eScaleformButtons button_option) { + m_instructionals.push_back({ text, button_option, false }); + return *this; + } + + button_option& add_instructional(std::string text, eControls button_option) { + m_instructionals.push_back({ text, button_option, true }); + return *this; + } + + button_option& add_side_text(std::string text) { + m_side_text = { true, text }; + return *this; + } + + button_option& add_hotkey() { + m_has_hotkey = true; + return *this; + } + + button_option& add_offset(float offset) { + m_offset = offset; + return *this; + } + + button_option& add_keyboard_default(std::string de) { + m_keyboard.m_default_text = de; + return *this; + } + + void render(int position); + void render_selected(int position, std::stack submenu_name_stack); + void invoke_save(std::stack submenu_name_stack) {} + void invoke_hotkey(); + void write_translation(nlohmann::json& object) {} + void read_translation(nlohmann::json& object) {} + void reset_translation() {} +private: + struct Keyboard { + bool m_enabled = false; + bool m_is_active = false; + int m_max_chars = 0; + std::function m_callback = {}; + std::string m_title = ""; + std::string m_default_text = ""; + }; + + struct Sprite { + bool m_enabled = false; + std::pair m_asset = {}; + std::function m_requirement = {}; + math::vector2 m_scale = { 0.f, 0.f }; + bool m_rotate = false; + float m_rotation = 0.f; + }; + + struct SideText { + bool m_enabled = false; + std::string m_text = ""; + }; + + Keyboard m_keyboard; + Sprite m_sprite; + SideText m_side_text; + float m_offset = 0.f; + + std::function m_on_click = []() {}; + std::function m_on_click_this = [](button_option*) {}; + std::function m_on_hover = []() {}; + std::function m_on_update = [](button_option*) {}; + std::function m_on_update_this = [](button_option*, int) {}; +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/options/color_option.cpp b/GTAV/src/menu/base/options/color_option.cpp new file mode 100644 index 0000000..93b37ba --- /dev/null +++ b/GTAV/src/menu/base/options/color_option.cpp @@ -0,0 +1,52 @@ +#include "color_option.h" +#include "menu/base/renderer.h" +#include "menu/base/util/instructionals.h" +#include "menu/base/util/input.h" +#include "menu/base/util/menu_input.h" + +void color_option::render(int position) { + bool selected = menu::base::is_option_selected(position); + color_rgba color = selected ? global::ui::g_option_selected : global::ui::g_option; + + m_on_update(this); + m_on_update_this(this, position); + + menu::renderer::draw_text(m_name.get(), { global::ui::g_position.x + 0.004f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color); + menu::renderer::draw_rect({ global::ui::g_position.x + 0.2145f - (0.23f - global::ui::g_scale.x), global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.0055f }, { 0.01f, 0.02f }, *m_color); +} + +void color_option::render_selected(int position, std::stack submenu_name_stack) { + m_on_hover(); + + if (m_instructionals.size()) { + instructionals::setup(); + + for (std::tuple& instructional : m_instructionals) { + if (std::get<2>(instructional)) { + instructionals::add_instructional(std::get<0>(instructional), (eControls)std::get<1>(instructional)); + } else { + instructionals::add_instructional(std::get<0>(instructional), (eScaleformButtons)std::get<1>(instructional)); + } + } + + instructionals::close(); + } + + if (m_requirement() && menu::input::is_option_pressed()) { + m_on_click(); + m_on_click_this(this); + + menu::input::push([this] { + menu::input::color(m_color); + }); + } + + if (m_savable) { + if (m_color) { + if (m_color->r != m_color_cache.r || m_color->g != m_color_cache.g || m_color->b != m_color_cache.b || m_color->a != m_color_cache.a) { + m_color_cache = *m_color; + util::config::write_color(submenu_name_stack, m_name.get_original(), m_color_cache, { "Color" }); + } + } + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/options/color_option.h b/GTAV/src/menu/base/options/color_option.h new file mode 100644 index 0000000..1ce9952 --- /dev/null +++ b/GTAV/src/menu/base/options/color_option.h @@ -0,0 +1,102 @@ +#pragma once +#include "option.h" +#include "menu/base/base.h" +#include "rage/types/base_types.h" +#include "util/math.h" +#include "util/config.h" + +class color_option : public base_option { +public: + color_option(std::string name) + : base_option(name) {} + + color_option& add_color(color_rgba& color) { + m_color = &color; + m_color_cache = color; + return *this; + } + + color_option& add_click(std::function function) { + m_on_click = function; + return *this; + } + + color_option& add_click_this(std::function function) { + m_on_click_this = function; + return *this; + } + + color_option& add_requirement(std::function function) { + m_requirement = function; + return *this; + } + + color_option& add_update(std::function function) { + m_on_update = function; + return *this; + } + + color_option& add_update_this(std::function function) { + m_on_update_this = function; + return *this; + } + + color_option& add_hover(std::function function) { + m_on_hover = function; + return *this; + } + + color_option& add_tooltip(std::string tooltip) { + m_tooltip.set(tooltip.c_str()); + return *this; + } + + color_option& add_translate() { + m_name.set_translate(true); + m_tooltip.set_translate(true); + return *this; + } + + color_option& add_instructional(std::string text, eScaleformButtons color_option) { + m_instructionals.push_back({ text, color_option, false }); + return *this; + } + + color_option& add_instructional(std::string text, eControls color_option) { + m_instructionals.push_back({ text, color_option, true }); + return *this; + } + + color_option& add_savable(std::stack menu_stack) { + if (menu_stack.size() <= 0) return *this; + + m_savable = true; + if (m_color && m_requirement()) { + util::config::read_color(menu_stack, m_name.get_original(), m_color, { "Color" }); + m_color_cache = *m_color; + } + + return *this; + } + + color_rgba* get_color() { + return m_color; + } + + void render(int position); + void render_selected(int position, std::stack submenu_name_stack); + void invoke_save(std::stack submenu_name_stack) {} + void invoke_hotkey() {} + void write_translation(nlohmann::json& object) {} + void read_translation(nlohmann::json& object) {} + void reset_translation() {} +private: + color_rgba* m_color; + color_rgba m_color_cache; + + std::function m_on_click = []() {}; + std::function m_on_click_this = [](color_option*) {}; + std::function m_on_hover = []() {}; + std::function m_on_update = [](color_option*) {}; + std::function m_on_update_this = [](color_option*, int) {}; +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/options/number.cpp b/GTAV/src/menu/base/options/number.cpp new file mode 100644 index 0000000..e855a51 --- /dev/null +++ b/GTAV/src/menu/base/options/number.cpp @@ -0,0 +1,297 @@ +#include "number.h" +#include "menu/base/renderer.h" +#include "menu/base/util/instructionals.h" +#include "menu/base/util/input.h" +#include "menu/base/util/menu_input.h" +#include "menu/base/util/hotkeys.h" +#include "menu/base/util/notify.h" +#include "rage/invoker/natives.h" +#include "util/fiber_pool.h" +#include "util/fiber.h" +#include "util/va.h" +#include + +template +void number_option::render(int position) { + bool selected = menu::base::is_option_selected(position); + color_rgba color = selected ? global::ui::g_option_selected : global::ui::g_option; + + m_on_update(this, position); + + menu::renderer::draw_text(m_name.get(), { global::ui::g_position.x + 0.004f + m_offset, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color); + + int size = 26; + if (global::vars::g_desktop_resolution.x == 5120) { + size = 20; + } + + char name_buffer[512]; + /*if (selected) { + if (m_show_max) { + sprintf_s(name_buffer, ("~s~ " + m_format + " / " + m_format + " ").c_str(), *m_number, m_max); + } else { + sprintf_s(name_buffer, ("~s~ " + m_format + " ").c_str(), *m_number); + } + } else { + if (m_show_max) { + sprintf_s(name_buffer, (m_format + " / " + m_format).c_str(), *m_number, m_max); + } else { + sprintf_s(name_buffer, m_format.c_str(), *m_number); + } + }*/ + + if (m_show_max) { + sprintf_s(name_buffer, (m_format + " / " + m_format).c_str(), *m_number, m_max); + } else { + sprintf_s(name_buffer, m_format.c_str(), *m_number); + } + + switch (m_type) { + case TOGGLE: + menu::renderer::draw_sprite({ "ozarktextures", "toggle_circle.png" }, { global::ui::g_position.x + global::ui::g_toggle_position.x - (0.23f - global::ui::g_scale.x), (global::ui::g_position.y + global::ui::g_toggle_position.y) + (position * global::ui::g_option_scale) }, global::ui::g_toggle_scale, 0.f, *m_toggle ? global::ui::g_toggle_on : global::ui::g_toggle_off); + menu::renderer::draw_text(name_buffer, { global::ui::g_position.x + 0.004f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color, JUSTIFY_RIGHT, { 0.f, (1.0f - (1.0f - (global::ui::g_position.x + (0.315f / 2.f)) - global::ui::g_wrap + (0.22f - global::ui::g_scale.x))) - 0.016f }); + break; + + case SCROLL: + case SCROLLSELECT: + menu::renderer::draw_text(name_buffer, { global::ui::g_position.x + 0.004f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color, JUSTIFY_RIGHT, { 0.f, (1.0f - (1.0f - (global::ui::g_position.x + (0.315f / 2.f)) - global::ui::g_wrap + (0.22f - global::ui::g_scale.x))) - 0.005f }); + break; + } +} + +template +void number_option::render_selected(int position, std::stack submenu_name_stack) { + m_on_hover(); + + if (m_requirement() && menu::input::is_option_pressed()) { + bool dont_process = false; + + switch (m_type) { + case TOGGLE: + *m_toggle = !*m_toggle; + break; + + case SCROLL: + m_keyboard_active = true; + dont_process = true; + menu::base::set_keyboard_title("Enter input"); + native::display_onscreen_keyboard(0, "Ozark", "", "", "", "", "", 10); + break; + } + + if (!dont_process) { + m_on_click(); + } + } + + if (m_has_hotkey && m_requirement()) { + if (menu::input::is_just_released(true, VK_F12)) { + native::play_sound_frontend(-1, "ATM_WINDOW", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); + + menu::input::push([this] { + menu::input::hotkey(m_name.get(), this); + }); + } + } + + if (m_keyboard_active) { + int status = native::update_onscreen_keyboard(); + if (status == 0) { + menu::base::set_disable_input_this_frame(); + } else if (status == 1) { + std::string name(native::get_onscreen_keyboard_result()); + + if (!name.empty()) { + bool bad = false; + static char valid_chars[] = { + '0', '1', '2', '3', '4', + '5', '6', '7', '8', '9', + '.', '-' + }; + + for (char c : name) { + bad = true; + + for (char v : valid_chars) { + if (v == c) { + bad = false; + break; + } + } + + if (bad) break; + } + + if (!bad) { + Type out = 0; + + if (std::is_same::value) { + out = (Type)std::stof(name); + } else if (std::is_same::value) { + out = (Type)std::stoll(name); + } else { + out = (Type)std::stoi(name); + } + + if (m_has_min && out < m_min) { + *m_number = m_min; + } else if (m_has_max && out > m_max) { + *m_number = m_max; + } else { + *m_number = out; + } + + m_on_click(); + } + } + + m_keyboard_active = false; + } else if (status > 1) { + m_keyboard_active = false; + } + } + + if (m_savable) { + if (m_number_cache != *m_number) { + m_number_cache = *m_number; + + if (std::is_same::value || std::is_same::value || std::is_same::value) { + util::config::write_int(submenu_name_stack, m_name.get_original(), (int)*m_number, { "Values" }); + } else if (std::is_same::value) { + util::config::write_float(submenu_name_stack, m_name.get_original(), (float)*m_number, { "Values" }); + } + } + + if (m_type == TOGGLE) { + if (m_toggle_cache != *m_toggle) { + m_toggle_cache = *m_toggle; + util::config::write_bool(submenu_name_stack, m_name.get_original(), *m_toggle); + } + } + } + + static uint32_t timer = 0; + + if (menu::input::is_left_just_pressed()) { + if (!m_left_disabled) { + *m_number -= m_step; + if (m_loop) { + if (*m_number < m_min) *m_number = m_max; + } else if (*m_number < m_min && m_has_min) *m_number = m_min; + + if (m_type == SCROLL || m_type == TOGGLE) { + m_on_click(); + } + + native::play_sound_frontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", FALSE); + } + + m_left_disabled = false; + m_left_timer = 0; + } + + if (menu::input::is_right_just_pressed()) { + if (!m_right_disabled) { + *m_number += m_step; + if (m_loop) { + if (*m_number > m_max) *m_number = m_min; + } else if (*m_number > m_max && m_has_max) *m_number = m_max; + + if (m_type == SCROLL || m_type == TOGGLE) { + m_on_click(); + } + + native::play_sound_frontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", FALSE); + } + + m_right_disabled = false; + m_right_timer = 0; + } + + if (menu::input::is_left_pressed()) { + if (++m_left_timer > 20) { + m_left_disabled = true; + if ((timeGetTime() - timer) > m_scroll_speed) { + *m_number -= m_step; + if (m_loop) { + if (*m_number < m_min) *m_number = m_max; + } else if (*m_number < m_min && m_has_min) *m_number = m_min; + + if (m_type == SCROLL || m_type == TOGGLE) { + m_on_click(); + } + + timer = timeGetTime(); + native::play_sound_frontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", FALSE); + } + } + } + + if (menu::input::is_right_pressed()) { + if (++m_right_timer > 20) { + m_right_disabled = true; + if ((timeGetTime() - timer) > m_scroll_speed) { + *m_number += m_step; + if (m_loop) { + if (*m_number > m_max) *m_number = m_min; + } else if (*m_number > m_max && m_has_max) *m_number = m_max; + + if (m_type == SCROLL || m_type == TOGGLE) { + m_on_click(); + } + + timer = timeGetTime(); + native::play_sound_frontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", FALSE); + } + } + } +} + +template +void number_option::invoke_save(std::stack submenu_name_stack) { + if (m_savable) { + if (std::is_same::value || std::is_same::value || std::is_same::value) { + util::config::write_int(submenu_name_stack, m_name.get_original(), (int)*m_number, { "Values" }); + } else if (std::is_same::value) { + util::config::write_float(submenu_name_stack, m_name.get_original(), (float)*m_number, { "Values" }); + } + + if (m_type == TOGGLE) { + util::config::write_bool(submenu_name_stack, m_name.get_original(), *m_toggle); + } + } +} + +template +void number_option::invoke_hotkey() { + if (!m_requirement()) return; + + bool dont_process = false; + switch (m_type) { + case TOGGLE: + *m_toggle = !*m_toggle; + break; + + case SCROLL: + m_keyboard_active = true; + dont_process = true; + menu::base::set_keyboard_title("Enter input"); + native::display_onscreen_keyboard(0, "Ozark", "", "", "", "", "", 10); + break; + } + + if (!dont_process) { + m_on_click(); + } + + static std::unordered_map notifies; + if (notifies[native::get_hash_key(m_name.get_original().c_str())] > GetTickCount()) return; + + notifies[native::get_hash_key(m_name.get_original().c_str())] = GetTickCount() + 5000; + menu::notify::stacked(TRANSLATE(t_hotkey), util::va::va("%s %s", TRANSLATE(t_used_hotkey_for), m_name.get().c_str())); +} + +template class number_option; +template class number_option; +template class number_option; +template class number_option; \ No newline at end of file diff --git a/GTAV/src/menu/base/options/number.h b/GTAV/src/menu/base/options/number.h new file mode 100644 index 0000000..a8d8018 --- /dev/null +++ b/GTAV/src/menu/base/options/number.h @@ -0,0 +1,163 @@ +#pragma once +#include "stdafx.h" +#include "option.h" +#include "menu/base/base.h" +#include "util/config.h" + +template +class number_option : public base_option { +public: + number_option(scroll_option_type type, std::string name) + : base_option(name, false, type, type == SCROLL), m_type(type) + {} + + number_option& add_toggle(bool& t) { + m_toggle = &t; + m_toggle_cache = t; + return *this; + } + + number_option& add_number(Type& num, std::string fmt, Type step) { + m_number = # + m_number_cache = num; + m_format = fmt; + m_step = step; + return *this; + } + + number_option& add_min(Type m) { + m_min = m; + m_has_min = true; + return *this; + } + + number_option& add_max(Type m) { + m_max = m; + m_has_max = true; + return *this; + } + + number_option& add_click(std::function func) { + m_on_click = func; + return *this; + } + + number_option& add_hover(std::function func) { + m_on_hover = func; + return *this; + } + + number_option& add_update(std::function func) { + m_on_update = func; + return *this; + } + + number_option& add_requirement(std::function func) { + m_requirement = func; + return *this; + } + + number_option& show_max() { + m_show_max = true; + return *this; + } + + number_option& add_tooltip(std::string tip) { + m_tooltip.set(tip); + return *this; + } + + number_option& set_scroll_speed(uint32_t speed) { + m_scroll_speed = speed; + return *this; + } + + number_option& can_loop() { + m_loop = true; + return *this; + } + + number_option& add_translate() { + m_name.set_translate(true); + m_tooltip.set_translate(true); + return *this; + } + + number_option& add_hotkey() { + m_has_hotkey = true; + return *this; + } + + number_option& add_savable(std::stack menu_stack) { + if (menu_stack.size() <= 0) return *this; + + m_savable = true; + if (m_number && m_requirement()) { + if (std::is_same::value || std::is_same::value || std::is_same::value) { + *m_number = (Type)util::config::read_int(menu_stack, m_name.get_original(), (int)*m_number, { "Values" }); + } else if (std::is_same::value) { + *m_number = (Type)util::config::read_float(menu_stack, m_name.get_original(), (float)*m_number, { "Values" }); + } + + if (m_type == TOGGLE) { + *m_toggle = util::config::read_bool(menu_stack, m_name.get_original(), *m_toggle); + m_toggle_cache = *m_toggle; + + if (*m_toggle) { + m_on_click(); + } + } + + if (m_has_min && *m_number < m_min) { + *m_number = m_min; + } + + if (m_has_max && *m_number > m_max) { + *m_number = m_max; + } + } + + return *this; + } + + number_option& add_offset(float offset) { + m_offset = offset; + return *this; + } + + void render(int position); + void render_selected(int position, std::stack submenu_name_stack); + void invoke_save(std::stack submenu_name_stack); + void invoke_hotkey(); + void write_translation(nlohmann::json& object) {} + void read_translation(nlohmann::json& object) {} + void reset_translation() {} +private: + std::function m_on_click = []() {}; + std::function m_on_hover = []() {}; + std::function*, int)> m_on_update = [](number_option*, int) {}; + + bool* m_toggle = nullptr; + bool m_has_min = false; + bool m_has_max = false; + bool m_loop = false; + bool m_show_max = false; + bool m_keyboard_active = false; + + scroll_option_type m_type = SCROLL; + std::string m_format = ""; + Type* m_number = nullptr; + Type m_step = (Type)0; + Type m_min = (Type)0; + Type m_max = (Type)0; + uint32_t m_scroll_speed = 100; + + int m_left_timer = 0; + int m_right_timer = 0; + bool m_left_disabled = false; + bool m_right_disabled = false; + float m_offset = 0.f; + + bool m_toggle_cache = false; + Type m_number_cache; +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/options/option.cpp b/GTAV/src/menu/base/options/option.cpp new file mode 100644 index 0000000..8f43894 --- /dev/null +++ b/GTAV/src/menu/base/options/option.cpp @@ -0,0 +1,18 @@ +#include "option.h" + +base_option::base_option() { } + +base_option::base_option(std::string name, bool breaker, bool slider, bool input) { + m_name = localization(name); + m_break_option = breaker; + m_slider = slider; + m_input = input; +} + +void base_option::render(int position) {} +void base_option::render_selected(int position, std::stack submenu_name_stack) {} +void base_option::invoke_save(std::stack submenu_name_stack) {} +void base_option::invoke_hotkey() {} +void base_option::write_translation(nlohmann::json& object) {} +void base_option::read_translation(nlohmann::json& object) {} +void base_option::reset_translation() {} \ No newline at end of file diff --git a/GTAV/src/menu/base/options/option.h b/GTAV/src/menu/base/options/option.h new file mode 100644 index 0000000..43d4721 --- /dev/null +++ b/GTAV/src/menu/base/options/option.h @@ -0,0 +1,55 @@ +#pragma once +#include "stdafx.h" +#include "util/localization.h" +#include "util/json.h" +#include "global/ui_vars.h" +#include + +static localization t_used_hotkey_for("Used hotkey for", true, true); +static localization t_hotkey("Hotkey", true, true); + +class base_option { +public: + base_option(); + base_option(std::string name, bool breaker = false, bool slider = false, bool input = false); + + virtual void render(int position); + virtual void render_selected(int position, std::stack submenu_name_stack); + virtual void invoke_save(std::stack submenu_name_stack); + virtual void invoke_hotkey(); + virtual void write_translation(nlohmann::json& object); + virtual void read_translation(nlohmann::json& object); + virtual void reset_translation(); + + bool is_visible() { return m_visible && m_requirement(); } + bool is_break() { return m_break_option; } + bool is_slider() { return m_slider; } + bool is_input() { return m_input; } + bool is_savable() { return m_savable; } + bool has_hotkey() { return m_has_hotkey; } + int get_hotkey() { return m_hotkey; } + + localization& get_name() { return m_name; } + localization& get_tooltip() { return m_tooltip; } + std::stack* get_submenu_name_stack() { return m_submenu_name_stack; } + + void set_hotkey(int key) { m_hotkey = key; }; + void set_name(std::string name) { m_name.set(name); }; + void set_submenu_name_stack(std::stack* stack) { m_submenu_name_stack = stack; } + void set_tooltip(std::string tooltip) { m_tooltip.set(tooltip); } +protected: + localization m_name; + localization m_tooltip; + + bool m_break_option = false; + bool m_visible = true; + bool m_savable = false; + bool m_slider = false; + bool m_input = false; + bool m_has_hotkey = false; + int m_hotkey = -1; + + std::function m_requirement = []() { return true; }; + std::vector> m_instructionals = {}; + std::stack* m_submenu_name_stack = nullptr; +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/options/radio.cpp b/GTAV/src/menu/base/options/radio.cpp new file mode 100644 index 0000000..24eaaa1 --- /dev/null +++ b/GTAV/src/menu/base/options/radio.cpp @@ -0,0 +1,36 @@ +#include "radio.h" +#include "menu/base/util/input.h" +#include "menu/base/renderer.h" + +void radio_option::render(int position) { + bool selected = menu::base::is_option_selected(position); + color_rgba color = selected ? global::ui::g_option_selected : global::ui::g_option; + + m_on_update(this); + + menu::renderer::draw_text(m_name.get(), { global::ui::g_position.x + 0.004f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color); + + if (m_context->m_toggles[m_index]) { + std::string sprite = m_context->m_sprite.second; + if (strstr(sprite.c_str(), "shop_") && !strstr(sprite.c_str(), "shop_tick_icon")) { + sprite += "_a"; + color = { 255, 255, 255, 255 }; + } + + menu::renderer::draw_sprite({ m_context->m_sprite.first, sprite }, { global::ui::g_position.x + 0.2195f - (0.23f - global::ui::g_scale.x), (global::ui::g_position.y + 0.016f) + (position * global::ui::g_option_scale) }, { 0.02112f * 0.8f, 0.03744f * 0.8f }, 0.f, color); + } +} + +void radio_option::render_selected(int position, std::stack submenu_name_stack) { + m_on_hover(); + + if (m_requirement() && menu::input::is_option_pressed()) { + if (!m_context->m_toggles[m_index]) { + m_context->m_toggles[m_index] = true; + m_context->m_toggles[m_context->m_selected] = false; + m_context->m_selected = m_id; + } + + m_on_click(); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/options/radio.h b/GTAV/src/menu/base/options/radio.h new file mode 100644 index 0000000..1cd2902 --- /dev/null +++ b/GTAV/src/menu/base/options/radio.h @@ -0,0 +1,80 @@ +#pragma once +#include "stdafx.h" +#include "option.h" +#include "menu/base/base.h" + +class radio_option : public base_option { +public: + radio_option(std::string name) + : base_option(name) {} + + radio_option& add_radio(radio_context& radio) { + m_context = &radio; + m_index = m_context->m_count; + m_id = m_context->m_count; + m_context->m_count++; + + if (m_id == 0) { + m_context->m_toggles[m_index] = true; + } + + return *this; + } + + radio_option& add_click(std::function function) { + m_on_click = function; + return *this; + } + + radio_option& add_requirement(std::function function) { + m_requirement = function; + return *this; + } + + radio_option& add_update(std::function function) { + m_on_update = function; + return *this; + } + + radio_option& add_hover(std::function function) { + m_on_hover = function; + return *this; + } + + radio_option& add_tooltip(std::string tooltip) { + m_tooltip.set(tooltip.c_str()); + return *this; + } + + radio_option& add_translate() { + m_name.set_translate(true); + m_tooltip.set_translate(true); + return *this; + } + + void update_selected() { + m_context->m_toggles[m_index] = true; + m_context->m_toggles[m_context->m_selected] = false; + m_context->m_selected = m_id; + } + + bool is_selected() { + return m_context->m_selected == m_id; + } + + void render(int position); + void render_selected(int position, std::stack submenu_name_stack); + void invoke_save(std::stack submenu_name_stack) {} + void invoke_hotkey() {} + void write_translation(nlohmann::json& object) {} + void read_translation(nlohmann::json& object) {} + void reset_translation() {} +private: + std::function m_on_click = []() {}; + std::function m_on_hover = []() {}; + std::function m_on_update = [](radio_option*) {}; + + int m_id = 0; + int m_index = 0; + radio_context* m_context = nullptr; +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/options/scroll.h b/GTAV/src/menu/base/options/scroll.h new file mode 100644 index 0000000..ccb534e --- /dev/null +++ b/GTAV/src/menu/base/options/scroll.h @@ -0,0 +1,338 @@ +#pragma once +#include "stdafx.h" +#include "option.h" +#include "util/localization.h" +#include "util/va.h" +#include "menu/base/base.h" +#include "menu/base/renderer.h" +#include "menu/base/util/input.h" +#include "menu/base/util/menu_input.h" +#include "menu/base/util/notify.h" +#include "global/vars.h" +#include "rage/invoker/natives.h" +#include + +template +struct scroll_struct { + localization m_name; + Type m_result; +}; + +template +class scroll_option : public base_option { +public: + scroll_option(scroll_option_type type, std::string name) + : base_option(name, false, true), m_type(type) + {} + + scroll_option& add_scroll(int& num, int min_, int max_, scroll_struct* structure) { + m_has_min = true; + m_has_max = true; + m_min = min_; + m_max = max_ - 1; + m_number = # + + if (*m_number < m_min) *m_number = m_min; + if (*m_number > m_max) *m_number = m_max; + + m_number_cache = *m_number; + m_scroll = structure; + return *this; + } + + scroll_option& add_toggle(bool& t) { + m_toggle = &t; + m_toggle_cache = t; + return *this; + } + + scroll_option& add_click(std::function function) { + m_on_click = function; + return *this; + } + + scroll_option& add_requirement(std::function function) { + m_requirement = function; + return *this; + } + + scroll_option& add_update(std::function function) { + m_on_update = function; + return *this; + } + + scroll_option& add_hover(std::function function) { + m_on_hover = function; + return *this; + } + + scroll_option& add_tooltip(std::string tooltip) { + m_tooltip.set(tooltip.c_str()); + return *this; + } + + scroll_option& add_translate() { + m_name.set_translate(true); + m_tooltip.set_translate(true); + return *this; + } + + scroll_option& add_hotkey() { + m_has_hotkey = true; + return *this; + } + + scroll_option& set_scroll_speed(uint32_t speed) { + m_scroll_speed = speed; + return *this; + } + + scroll_option& loop() { + m_loop = true; + return *this; + } + + scroll_option& add_offset(float offset) { + m_offset = offset; + return *this; + } + + scroll_option& add_savable(std::stack menu_stack) { + if (menu_stack.size() <= 0) return *this; + + m_savable = true; + if (m_toggle && m_requirement()) { + *m_number = util::config::read_int(menu_stack, m_name.get_original().c_str(), (int)*m_number, { "Values" }); + m_number_cache = *m_number; + + if (m_type == TOGGLE && m_toggle) { + *m_toggle = util::config::read_bool(menu_stack, m_name.get_original().c_str(), *m_toggle); + m_toggle_cache = *m_toggle; + + if (*m_toggle) { + m_on_click(); + } + } + } + + return *this; + } + + void render(int position) { + bool selected = menu::base::is_option_selected(position); + color_rgba color = selected ? global::ui::g_option_selected : global::ui::g_option; + + m_on_update(this, position); + + menu::renderer::draw_text(m_name.get(), { global::ui::g_position.x + 0.004f + m_offset, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color); + + int size = 26; + if (global::vars::g_desktop_resolution.x == 5120) { + size = 20; + } + + char name_buffer[512]; + /*if (selected) { + sprintf_s(name_buffer, ("~s~ %s ~s~ ~m~[%i/%i]").c_str(), m_scroll[*m_number].m_name.get().c_str(), (*m_number) + 1, m_max + 1); + } else { + sprintf_s(name_buffer, "%s ~m~[%i/%i]", m_scroll[*m_number].m_name.get().c_str(), (*m_number) + 1, m_max + 1); + }*/ + + sprintf_s(name_buffer, "%s ~m~[%i/%i]", m_scroll[*m_number].m_name.get().c_str(), (*m_number) + 1, m_max + 1); + + switch (m_type) { + case TOGGLE: + menu::renderer::draw_sprite({ "ozarktextures", "toggle_circle.png" }, { global::ui::g_position.x + global::ui::g_toggle_position.x - (0.23f - global::ui::g_scale.x), (global::ui::g_position.y + global::ui::g_toggle_position.y) + (position * global::ui::g_option_scale) }, global::ui::g_toggle_scale, 0.f, *m_toggle ? global::ui::g_toggle_on : global::ui::g_toggle_off); + menu::renderer::draw_text(name_buffer, { global::ui::g_position.x + 0.004f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color, JUSTIFY_RIGHT, { 0.f, (1.0f - (1.0f - (global::ui::g_position.x + (0.315f / 2.f)) - global::ui::g_wrap + (0.22f - global::ui::g_scale.x))) - 0.016f }); + break; + + case SCROLL: + case SCROLLSELECT: + menu::renderer::draw_text(name_buffer, { global::ui::g_position.x + 0.004f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color, JUSTIFY_RIGHT, { 0.f, (1.0f - (1.0f - (global::ui::g_position.x + (0.315f / 2.f)) - global::ui::g_wrap + (0.22f - global::ui::g_scale.x))) - 0.005f }); + break; + } + } + + void render_selected(int position, std::stack submenu_name_stack) { + m_on_hover(); + + if (m_requirement() && menu::input::is_option_pressed()) { + if (m_type == TOGGLE) { + *m_toggle = !*m_toggle; + } + + m_on_click(); + } + + if (m_savable) { + if (m_number_cache != *m_number) { + m_number_cache = *m_number; + + util::config::write_int(submenu_name_stack, m_name.get_original().c_str(), *m_number, { "Values" }); + } + + if (m_type == TOGGLE) { + if (m_toggle_cache != *m_toggle) { + m_toggle_cache = *m_toggle; + util::config::write_bool(submenu_name_stack, m_name.get_original().c_str(), *m_toggle); + } + } + } + + if (m_has_hotkey && m_requirement()) { + if (menu::input::is_just_released(true, VK_F12)) { + native::play_sound_frontend(-1, "ATM_WINDOW", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); + + menu::input::push([this] { + menu::input::hotkey(m_name.get(), this); + }); + } + } + + if (menu::input::is_left_just_pressed()) { + if (!m_left_disabled) { + *m_number -= 1; + if (m_loop) { + if (*m_number < m_min) *m_number = m_max; + } else if (*m_number < m_min && m_has_min) *m_number = m_min; + + if (m_type == SCROLL || m_type == TOGGLE) { + m_on_click(); + } + + native::play_sound_frontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", FALSE); + } + + m_left_disabled = false; + m_left_timer = 0; + } + + if (menu::input::is_right_just_pressed()) { + if (!m_right_disabled) { + *m_number += 1; + if (m_loop) { + if (*m_number > m_max) *m_number = m_min; + } else if (*m_number > m_max && m_has_max) *m_number = m_max; + + if (m_type == SCROLL || m_type == TOGGLE) { + m_on_click(); + } + + native::play_sound_frontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", FALSE); + } + + m_right_disabled = false; + m_right_timer = 0; + } + + static uint32_t timer = 0; + + if (menu::input::is_left_pressed()) { + if (++m_left_timer > 20) { + m_left_disabled = true; + if ((timeGetTime() - timer) > m_scroll_speed) { + *m_number -= 1; + if (m_loop) { + if (*m_number < m_min) *m_number = m_max; + } else if (*m_number < m_min && m_has_min) *m_number = m_min; + + if (m_type == SCROLL || m_type == TOGGLE) { + m_on_click(); + } + + timer = timeGetTime(); + native::play_sound_frontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", FALSE); + } + } + } + + if (menu::input::is_right_pressed()) { + if (++m_right_timer > 20) { + m_right_disabled = true; + if ((timeGetTime() - timer) > m_scroll_speed) { + *m_number += 1; + if (m_loop) { + if (*m_number > m_max) *m_number = m_min; + } else if (*m_number > m_max && m_has_max) *m_number = m_max; + + if (m_type == SCROLL || m_type == TOGGLE) { + m_on_click(); + } + + timer = timeGetTime(); + native::play_sound_frontend(-1, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET", FALSE); + } + } + } + } + + void invoke_save(std::stack submenu_name_stack) {} + + void invoke_hotkey() { + if (!m_requirement()) return; + + if (m_type == TOGGLE) { + *m_toggle = !*m_toggle; + } + + m_on_click(); + + static std::unordered_map notifies; + if (notifies[native::get_hash_key(m_name.get_original().c_str())] > GetTickCount()) return; + + notifies[native::get_hash_key(m_name.get_original().c_str())] = GetTickCount() + 5000; + menu::notify::stacked(TRANSLATE(t_hotkey), util::va::va("%s %s", TRANSLATE(t_used_hotkey_for), m_name.get().c_str())); + } + + void write_translation(nlohmann::json& object) { + for (int i = 0; i < m_max + 1; i++) { + if (m_scroll[i].m_name.has_translation()) { + if (object["scrollables"][m_scroll[i].m_name.get_original()].empty()) { + object["scrollables"][m_scroll[i].m_name.get_original()] = m_scroll[i].m_name.get_original(); + } + } + } + } + + void read_translation(nlohmann::json& object) { + for (int i = 0; i < m_max + 1; i++) { + if (m_scroll[i].m_name.has_translation()) { + std::string name = m_scroll[i].m_name.get_original(); + m_scroll[i].m_name.set_mapped(JsonGet(object["scrollables"], name, name).c_str()); + } + } + } + + void reset_translation() { + for (int i = 0; i < m_max + 1; i++) { + if (m_scroll[i].m_name.has_translation()) { + m_scroll[i].m_name.reset(); + } + } + } +private: + std::function m_on_click = []() {}; + std::function m_on_hover = []() {}; + std::function m_on_update = [](scroll_option*, int) {}; + + scroll_option_type m_type = SCROLL; + int* m_number = nullptr; + int m_min = 0; + int m_max = 0; + int m_left_timer = 0; + int m_right_timer = 0; + + bool* m_toggle = nullptr; + bool m_has_min = false; + bool m_has_max = false; + bool m_loop = false; + bool m_left_disabled = false; + bool m_right_disabled = false; + + scroll_struct* m_scroll = nullptr; + uint32_t m_scroll_speed = 200; + float m_offset = 0.f; + + int m_number_cache = 0; + bool m_toggle_cache = false; +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/options/submenu_option.cpp b/GTAV/src/menu/base/options/submenu_option.cpp new file mode 100644 index 0000000..0a62038 --- /dev/null +++ b/GTAV/src/menu/base/options/submenu_option.cpp @@ -0,0 +1,64 @@ +#include "submenu_option.h" +#include "menu/base/renderer.h" +#include "menu/base/util/input.h" +#include "menu/base/util/menu_input.h" +#include "menu/base/util/notify.h" +#include "menu/base/submenu_handler.h" +#include "rage/invoker/natives.h" +#include "util/va.h" + +void submenu_option::render(int position) { + bool selected = menu::base::is_option_selected(position); + color_rgba color = selected ? global::ui::g_option_selected : global::ui::g_option; + color_rgba bar_color = global::ui::g_submenu_bar; + + m_on_update(this, position); + + menu::renderer::draw_text(m_name.get(), { global::ui::g_position.x + 0.004f + m_offset, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color); + + if (!m_disable_icon) { + if (m_override.m_enabled) { + menu::renderer::draw_sprite_aligned(m_override.m_asset, { global::ui::g_position.x + m_override.m_offset.x - (0.23f - global::ui::g_scale.x), global::ui::g_position.y + (position * global::ui::g_option_scale) + m_override.m_offset.y }, m_override.m_scale, 0.f, *m_override.m_color); + } else { + menu::renderer::draw_sprite_aligned({ "ozarktextures", "arrow.png" }, { global::ui::g_position.x + global::ui::g_submenu_arrow_position.x - (0.23f - global::ui::g_scale.x), global::ui::g_position.y + (position * global::ui::g_option_scale) + global::ui::g_submenu_arrow_position.y }, global::ui::g_submenu_arrow_scale, 0.f, bar_color); + } + } + + if (m_side_text.m_enabled) { + menu::renderer::draw_text(m_side_text.m_text, { global::ui::g_position.x + 0.004f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color, JUSTIFY_RIGHT, { 0.f, (1.0f - (1.0f - (global::ui::g_position.x + (0.315f / 2.f)) - global::ui::g_wrap)) - 0.005f }); + } +} + +void submenu_option::render_selected(int position, std::stack submenu_name_stack) { + m_on_hover(this); + + if (m_has_hotkey && m_requirement()) { + if (menu::input::is_just_released(true, VK_F12)) { + native::play_sound_frontend(-1, "ATM_WINDOW", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); + + menu::input::push([this] { + menu::input::hotkey(m_name.get(), this); + }); + } + } + + if (m_requirement() && menu::input::is_option_pressed()) { + m_on_click(); + m_on_click_this(this); + menu::submenu::handler::set_submenu(m_submenu); + } +} + +void submenu_option::invoke_hotkey() { + if (!m_requirement()) return; + m_on_click(); + + if (!menu::base::is_open()) menu::base::set_open(true); + menu::submenu::handler::set_submenu(m_submenu); + + static std::unordered_map notifies; + if (notifies[native::get_hash_key(m_name.get_original().c_str())] > GetTickCount()) return; + + notifies[native::get_hash_key(m_name.get_original().c_str())] = GetTickCount() + 5000; + menu::notify::stacked(TRANSLATE(t_hotkey), util::va::va("%s %s", TRANSLATE(t_used_hotkey_for), m_name.get().c_str())); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/options/submenu_option.h b/GTAV/src/menu/base/options/submenu_option.h new file mode 100644 index 0000000..45b8f52 --- /dev/null +++ b/GTAV/src/menu/base/options/submenu_option.h @@ -0,0 +1,121 @@ +#pragma once +#include "stdafx.h" +#include "option.h" +#include "menu/base/submenu.h" +#include "menu/base/base.h" + +class submenu_option : public base_option { +public: + submenu_option(std::string name) + : base_option(name) {} + + template + submenu_option& add_submenu() { + m_submenu = T::get(); + return *this; + } + + submenu_option& add_click(std::function function) { + m_on_click = function; + return *this; + } + + submenu_option& add_click_this(std::function function) { + m_on_click_this = function; + return *this; + } + + submenu_option& add_requirement(std::function function) { + m_requirement = function; + return *this; + } + + submenu_option& add_update(std::function function) { + m_on_update = function; + return *this; + } + + submenu_option& add_hover(std::function function) { + m_on_hover = function; + return *this; + } + + submenu_option& add_tooltip(std::string tooltip) { + m_tooltip.set(tooltip.c_str()); + return *this; + } + + submenu_option& add_translate() { + m_name.set_translate(true); + m_tooltip.set_translate(true); + return *this; + } + + submenu_option& add_hotkey() { + m_has_hotkey = true; + return *this; + } + + submenu_option& add_side_text(std::string text) { + m_side_text = { true, text }; + return *this; + } + + submenu_option& add_offset(float offset) { + m_offset = offset; + return *this; + } + + submenu_option& add_icon_override(std::pair asset, math::vector2 offset, math::vector2 scale, color_rgba* color) { + m_override = { true, asset, offset, scale, color }; + return *this; + } + + submenu_option& add_custom_data(uint8_t* data) { + memcpy(m_custom_data, data, 0x10); + return *this; + } + + submenu_option& disable_icon() { + m_disable_icon = true; + return *this; + } + + uint8_t* get_custom_data() { + return m_custom_data; + } + + void render(int position); + void render_selected(int position, std::stack submenu_name_stack); + void invoke_save(std::stack submenu_name_stack) {} + void invoke_hotkey(); + void write_translation(nlohmann::json& object) {} + void read_translation(nlohmann::json& object) {} + void reset_translation() {} +private: + struct side_text { + bool m_enabled = false; + std::string m_text = ""; + }; + + struct icon_override { + bool m_enabled = false; + std::pair m_asset = {}; + math::vector2 m_offset; + math::vector2 m_scale; + color_rgba* m_color; + }; + + side_text m_side_text; + icon_override m_override; + float m_offset = 0.f; + uint8_t m_custom_data[0x10]; + bool m_disable_icon = false; + + menu::submenu::submenu* m_submenu = nullptr; + + std::function m_on_click = []() {}; + std::function m_on_click_this = [](submenu_option*) {}; + std::function m_on_hover = [](submenu_option*) {}; + std::function m_on_update = [](submenu_option*, int) {}; +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/options/toggle.cpp b/GTAV/src/menu/base/options/toggle.cpp new file mode 100644 index 0000000..e3c4059 --- /dev/null +++ b/GTAV/src/menu/base/options/toggle.cpp @@ -0,0 +1,58 @@ +#include "toggle.h" +#include "menu/base/renderer.h" +#include "menu/base/util/instructionals.h" +#include "menu/base/util/input.h" +#include "menu/base/util/menu_input.h" +#include "menu/base/util/hotkeys.h" +#include "menu/base/util/notify.h" +#include "rage/invoker/natives.h" +#include "util/fiber_pool.h" +#include "util/fiber.h" +#include "util/va.h" + +void toggle_option::render(int position) { + bool selected = menu::base::is_option_selected(position); + color_rgba color = selected ? global::ui::g_option_selected : global::ui::g_option; + color_rgba toggle_color = *m_toggle ? global::ui::g_toggle_on : global::ui::g_toggle_off; + + m_on_update(this, position); + + menu::renderer::draw_text(m_name.get(), { global::ui::g_position.x + 0.004f + m_offset, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.004f }, menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height), global::ui::g_option_font, color); + menu::renderer::draw_sprite({ "ozarktextures", "toggle_circle.png" }, { global::ui::g_position.x + global::ui::g_toggle_position.x - (0.23f - global::ui::g_scale.x), global::ui::g_position.y + global::ui::g_toggle_position.y + (position * global::ui::g_option_scale) }, global::ui::g_toggle_scale, 0.f, toggle_color); +} + +void toggle_option::render_selected(int position, std::stack submenu_name_stack) { + m_on_hover(); + + if (m_has_hotkey && m_requirement()) { + if (menu::input::is_just_released(true, VK_F12)) { + native::play_sound_frontend(-1, "ATM_WINDOW", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0); + + menu::input::push([this] { + menu::input::hotkey(m_name.get(), this); + }); + } + } + + if (m_toggle && m_requirement() && menu::input::is_option_pressed()) { + *m_toggle = !*m_toggle; + m_on_click(); + + if (m_savable) { + util::config::write_bool(submenu_name_stack, m_name.get_original(), *m_toggle); + } + } +} + +void toggle_option::invoke_hotkey() { + if (!m_requirement()) return; + + *m_toggle = !*m_toggle; + m_on_click(); + + static std::unordered_map notifies; + if (notifies[native::get_hash_key(m_name.get_original().c_str())] > GetTickCount()) return; + + notifies[native::get_hash_key(m_name.get_original().c_str())] = GetTickCount() + 5000; + menu::notify::stacked(TRANSLATE(t_hotkey), util::va::va("%s %s", TRANSLATE(t_used_hotkey_for), m_name.get().c_str())); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/options/toggle.h b/GTAV/src/menu/base/options/toggle.h new file mode 100644 index 0000000..67ef4bb --- /dev/null +++ b/GTAV/src/menu/base/options/toggle.h @@ -0,0 +1,87 @@ +#pragma once +#include "stdafx.h" +#include "option.h" +#include "menu/base/base.h" +#include "util/config.h" + +class toggle_option : public base_option { +public: + toggle_option(std::string name) + : base_option(name) + {} + + toggle_option& add_click(std::function function) { + m_on_click = function; + return *this; + } + + toggle_option& add_requirement(std::function function) { + m_requirement = function; + return *this; + } + + toggle_option& add_update(std::function function) { + m_on_update = function; + return *this; + } + + toggle_option& add_hover(std::function function) { + m_on_hover = function; + return *this; + } + + toggle_option& add_tooltip(std::string tooltip) { + m_tooltip.set(tooltip.c_str()); + return *this; + } + + toggle_option& add_translate() { + m_name.set_translate(true); + m_tooltip.set_translate(true); + return *this; + } + + toggle_option& add_hotkey() { + m_has_hotkey = true; + return *this; + } + + toggle_option& add_toggle(bool& tog) { + m_toggle = &tog; + return *this; + } + + toggle_option& add_savable(std::stack menu_stack) { + if (menu_stack.size() <= 0) return *this; + + m_savable = true; + if (m_toggle && m_requirement()) { + *m_toggle = util::config::read_bool(menu_stack, m_name.get_original().c_str(), *m_toggle); + if (*m_toggle) { + m_on_click(); + } + } + + return *this; + } + + toggle_option& add_offset(float offset) { + m_offset = offset; + return *this; + } + + void render(int position); + void render_selected(int position, std::stack submenu_name_stack); + void invoke_save(std::stack submenu_name_stack) {} + void invoke_hotkey(); + void write_translation(nlohmann::json& object) {} + void read_translation(nlohmann::json& object) {} + void reset_translation() {} +private: + float m_offset = 0.f; + bool* m_toggle = nullptr; + + std::function m_on_click = []() {}; + std::function m_on_hover = []() {}; + std::function m_on_update = [](toggle_option*, int) {}; +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/renderer.cpp b/GTAV/src/menu/base/renderer.cpp new file mode 100644 index 0000000..4a3d916 --- /dev/null +++ b/GTAV/src/menu/base/renderer.cpp @@ -0,0 +1,444 @@ +#include "renderer.h" +#include "base.h" +#include "submenu_handler.h" +#include "rage/invoker/natives.h" +#include "menu/base/util/textures.h" +#include "menu/base/util/fonts.h" +#include "menu/base/submenus/main.h" +#include + +static localization t_tooltip_1("put me in coach", true, true); +static localization t_tooltip_2("i've made a severe and continuous lapse in my judgment", true, true); +static localization t_tooltip_3("nothing. you get nothing here today. fuck you.", true, true); +static localization t_tooltip_4("I'll have you know I graduated top of my class in the Navy Seals", true, true); +static localization t_tooltip_5("penis size should be a volumetric measurement, let me explain...", true, true); +static localization t_tooltip_6("there's no such thing as a \"simp\"", true, true); +static localization t_tooltip_7("ligma", true, true); +static localization t_tooltip_8("sugma", true, true); +static localization t_tooltip_9("hi sisters", true, true); +static localization t_tooltip_10("one does not simply walk into mordor", true, true); +static localization t_tooltip_11("if you spill cleaning product, did you make a mess?", true, true); +static localization t_tooltip_13("bro where the fuck am i?", true, true); +static localization t_tooltip_14("welcome to pogzark :tm:", true, true); +static localization t_tooltip_15("see, the wait paid off didn't it? no??? fuck you then", true, true); +static localization t_tooltip_16("i aint ever gonna stop loving you, bitch", true, true); +static localization t_tooltip_17("ozark update when?", true, true); +static localization t_tooltip_19("sudo rm -f / -no-preserve-root", true, true); +static localization t_tooltip_20("bro that's cap", true, true); +static localization t_tooltip_21("dude, where's my car?", true, true); +static localization t_tooltip_22("rate the ozark exit scam 1 thru 10", true, true); +static localization t_tooltip_23("fuck you", true, true); +static localization t_tooltip_24("sponsored by cheatengine", true, true); +static localization t_tooltip_25("lets play a game; what has pink hair... wait, nevermind", true, true); +static localization t_tooltip_26("\"Such an obvious exit scam\" - DoneWithDegeneracy", true, true); +static localization t_tooltip_27("wow we can edit the weather color, we're so cool", true, true); + +namespace menu::renderer { + std::pair renderer::get_texture(menu_texture texture) { + if (texture.m_texture != "sa7anisafaggot") { + if (texture.m_enabled) { + std::vector list = menu::textures::get_list(); + + int texture_index = texture.m_context.m_selected; + if (texture_index < list.size()) { + auto vit = std::find_if(begin(list), end(list), [=](menu::textures::texture_context& context) { return context.m_name == texture.m_texture; }); + if (vit != end(list)) { + return { "ozarktextures", vit->m_name }; + } + } + } + } + + return { "randomha", "yesyesyesyes" }; + } + + void renderer::render() { + int current_option = base::get_current_option(); + int max_options = base::get_max_options(); + int scroll_offset = base::get_scroll_offset(); + int total_options = menu::submenu::handler::get_total_options(); + + m_render_count = math::clamp(current_option - scroll_offset > max_options ? max_options : (current_option - scroll_offset + 1), 0, max_options); + + int option_count = total_options > max_options ? max_options : total_options; + int scroller_position = math::clamp(current_option - scroll_offset > max_options ? max_options : current_option - scroll_offset, 0, max_options); + + // main header + std::pair texture = get_texture(global::ui::m_header); + draw_sprite_aligned(texture, { global::ui::g_position.x, global::ui::g_position.y - 0.08f }, { global::ui::g_scale.x, 0.08f }, 0.f, global::ui::g_main_header); + + // globe + if (global::ui::g_render_globe) { + if (!native::has_scaleform_movie_loaded(m_globe_handle)) { + m_globe_handle = native::request_scaleform_movie("MP_MENU_GLARE"); + } else { + float rotation = native::get_gameplay_cam_rot(2).z; + rotation -= round(rotation / 360.0f) * 360.0f; + if (rotation < 0.f) { + rotation += 360.0f; + } + + native::push_scaleform_movie_function(m_globe_handle, "SET_DATA_SLOT"); + native::push_scaleform_movie_function_parameter_float(rotation); + native::pop_scaleform_movie_function_void(); + } + + native::draw_scaleform_movie(m_globe_handle, global::ui::g_position.x + global::ui::g_globe_position.x, global::ui::g_position.y + global::ui::g_globe_position.y, global::ui::g_globe_scale.x, global::ui::g_globe_scale.y, global::ui::g_globe.r, global::ui::g_globe.g, global::ui::g_globe.b, global::ui::g_globe.a, 0); + } + + // background + texture = get_texture(global::ui::m_background); + if (texture.first == "randomha") texture = { "commonmenu", "gradient_bgd" }; + draw_sprite_aligned(texture, global::ui::g_position, { global::ui::g_scale.x, option_count * global::ui::g_option_scale }, 0.f, global::ui::g_background); + + // scroller + if (global::ui::g_scroll_lerp) { + m_smooth_scroll = math::lerp(m_smooth_scroll, global::ui::g_position.y + (scroller_position * global::ui::g_option_scale), global::ui::g_delta * global::ui::g_scroll_lerp_speed); + } else m_smooth_scroll = global::ui::g_position.y + (scroller_position * global::ui::g_option_scale); + + texture = get_texture(global::ui::m_scroller); + draw_sprite_aligned(texture, { global::ui::g_position.x, m_smooth_scroll }, { global::ui::g_scale.x, global::ui::g_option_scale }, 0.f, global::ui::g_scroller); + + std::vector> options = menu::submenu::handler::get_current()->get_options(); + int count = (int)std::count_if(begin(options), end(options), [](std::shared_ptr option) { return option->is_visible(); }); + int render_count = count; + + if (render_count > max_options) { + render_count = max_options; + } + + // footer + texture = get_texture(global::ui::m_footer); + draw_sprite_aligned(texture, { global::ui::g_position.x, global::ui::g_position.y + (render_count * global::ui::g_option_scale) }, { global::ui::g_scale.x, global::ui::g_option_scale }, 0.f, global::ui::g_footer); + + draw_sprite({ "commonmenu", "shop_arrows_upanddown" }, { global::ui::g_position.x + ((global::ui::g_scale.x) * 0.5f), global::ui::g_position.y + (render_count * global::ui::g_option_scale) + (global::ui::g_option_scale * 0.5f) }, { 0.015f, 0.027f }, 0.f, { 255, 255, 255, 255 }); + + // option counter + char counter[50]; + sprintf_s(counter, "%i ~s~• %i", current_option + 1, count); + draw_text(counter, { global::ui::g_position.x + 0.004f, global::ui::g_position.y + (render_count * global::ui::g_option_scale) + 0.004f }, get_normalized_font_scale(global::ui::g_sub_header_font, 0.30f), global::ui::g_sub_header_font, global::ui::g_sub_header_text, JUSTIFY_RIGHT, { 0.f, (1.0f - (1.0f - (global::ui::g_position.x + (0.315f / 2.f) - (0.23f - global::ui::g_scale.x)) - .068f)) }); + } + + void renderer::render_title(std::string title) { + if (global::ui::g_disable_title) return; + std::transform(begin(title), end(title), begin(title), ::toupper); + + if (menu::submenu::handler::get_current() == main_menu::get()) { + draw_text("~s~øZARK " VERSION_TYPE, { global::ui::g_position.x + 0.005f, global::ui::g_position.y - 0.061f }, 0.77f, global::ui::g_header_font, global::ui::g_title, JUSTIFY_LEFT); + } else { + std::string input_string = title; + std::string final_string = title; + + float width = calculate_string_width(input_string, global::ui::g_header_font, 0.77f); + while (width > global::ui::g_scale.x + (global::ui::g_header_font == menu::fonts::get_font_id("RDR") ? 0.055f : 0.f)) { + if (input_string.length() > 0) { + input_string.pop_back(); + + while (input_string[input_string.size() - 1] == ' ') { + input_string.pop_back(); + } + } + + final_string = input_string + "..."; + width = calculate_string_width(final_string, global::ui::g_header_font, 0.77f); + } + + + draw_text(final_string, { global::ui::g_position.x + 0.005f, global::ui::g_position.y - 0.061f }, 0.77f, global::ui::g_header_font, global::ui::g_title, JUSTIFY_LEFT); + } + } + + void renderer::render_tooltip(std::string tooltip) { + if (!tooltip.empty()) { + global::ui::g_rendering_tooltip = tooltip; + float y = 0.f; + + std::vector> options = menu::submenu::handler::get_current()->get_options(); + int count = (int)std::count_if(begin(options), end(options), [](std::shared_ptr option) { return option->is_visible(); }); + + if (count > base::get_max_options()) { + y = global::ui::g_position.y + ((base::get_max_options() + 1) * global::ui::g_option_scale) + 0.0025f; + } else { + y = global::ui::g_position.y + ((count + 1) * global::ui::g_option_scale) + 0.0025f; + } + + if (global::ui::g_rendering_color) { + y += 0.032f; + } + + float scaled_body_height = menu::renderer::get_normalized_font_scale(global::ui::g_tooltip_font, global::ui::g_option_height); + native::set_text_font(global::ui::g_tooltip_font); + native::set_text_scale(0.f, scaled_body_height); + native::set_text_wrap(global::ui::g_position.x + 0.004f, (1.0f - (1.0f - (global::ui::g_position.x + 0.1575f - (0.23f - global::ui::g_scale.x)) - global::ui::g_wrap))); + native::begin_text_command_line_count("STRING"); + native::add_text_component_substring_player_name(tooltip.c_str()); + + float height = global::ui::g_option_scale; + + int lines = native::end_text_command_get_line_count(global::ui::g_position.x + 0.004f, y + 0.005f); + if (lines > 1) { + height = (lines * native::get_text_scale_height(scaled_body_height, global::ui::g_tooltip_font)) + (0.005f * lines) + 0.005f; + } + + std::pair texture = get_texture(global::ui::m_tooltip_background); + draw_sprite_aligned(texture, { global::ui::g_position.x, y }, { global::ui::g_scale.x, height }, 0.f, global::ui::g_tooltip); + draw_text(tooltip.c_str(), { global::ui::g_position.x + 0.004f, y + 0.005f }, scaled_body_height, global::ui::g_tooltip_font, { 255, 255, 255, 255 }, JUSTIFY_LEFT, { global::ui::g_position.x + 0.004f, (1.0f - (1.0f - (global::ui::g_position.x + 0.1575f - (0.23f - global::ui::g_scale.x)) - global::ui::g_wrap)) }); + } + + global::ui::g_rendering_color = false; + } + + void renderer::render_open_tooltip() { + if (!global::ui::g_render_tooltip) return; + + static localization* names[] = { + &t_tooltip_1, + &t_tooltip_2, + &t_tooltip_3, + &t_tooltip_4, + &t_tooltip_5, + &t_tooltip_6, + &t_tooltip_7, + &t_tooltip_8, + &t_tooltip_9, + &t_tooltip_10, + &t_tooltip_11, + &t_tooltip_13, + &t_tooltip_14, + &t_tooltip_15, + &t_tooltip_16, + &t_tooltip_17, + &t_tooltip_19, + &t_tooltip_20, + &t_tooltip_21, + &t_tooltip_22, + &t_tooltip_23, + &t_tooltip_24, + &t_tooltip_25, + &t_tooltip_26, + &t_tooltip_27, + }; + + char text[200]; + + std::random_device r; + std::seed_seq seed2 { r(), r(), r(), r(), r(), r(), r(), r() }; + std::mt19937 rng(seed2); + std::uniform_int_distribution val(0, NUMOF(names) - 1); + static const int value = val(rng); + + native::set_text_outline(); + + if (native::is_input_disabled(2)) { + sprintf_s(text, "%s\n~c~%s", names[value]->get().c_str(), menu::input::g_key_names[menu::base::get_open_key()]); + draw_text(text, { 0.5f, 0.09f }, get_normalized_font_scale(global::ui::g_open_tooltip_font, 0.40f), global::ui::g_open_tooltip_font, global::ui::g_open_tooltip, JUSTIFY_CENTER); + } else { + sprintf_s(text, "%s\n~c~RB + RIGHT", names[value]->get().c_str()); + draw_text(text, { 0.5f, 0.09f }, get_normalized_font_scale(global::ui::g_open_tooltip_font, 0.40f), global::ui::g_open_tooltip_font, global::ui::g_open_tooltip, JUSTIFY_CENTER); + } + } + + void renderer::render_color_preview(color_rgba color) { + global::ui::g_rendering_color = true; + + std::vector> options = menu::submenu::handler::get_current()->get_options(); + int count = (int)std::count_if(begin(options), end(options), [](std::shared_ptr option) { return option->is_visible(); }); + + if (count > base::get_max_options()) { + count = base::get_max_options(); + } + + draw_rect({ global::ui::g_position.x, global::ui::g_position.y + ((count + 1) * global::ui::g_option_scale) + 0.0025f }, { global::ui::g_scale.x, global::ui::g_option_scale }, color); + } + + float renderer::calculate_string_width(std::string string, int font, float scale) { + native::begin_text_command_width("STRING"); + native::add_text_component_substring_player_name(string.c_str()); + native::set_text_scale(0.f, scale); + return native::end_text_command_get_width(font); + } + + float renderer::get_normalized_font_scale(int font, float scale) { + switch (font) { + case 0: return (scale * 1.0f); + case 1: return (scale * 1.3f); + case 2: return (scale * 1.11f); + case 4: return (scale * 1.11f); + case 7: return (scale * 1.29f); + } + + return scale; + } + + void renderer::draw_rect(math::vector2 position, math::vector2 scale, color_rgba color) { + if (global::ui::g_stop_rendering) return; + native::draw_rect(position.x + (scale.x * 0.5f), position.y + (scale.y * 0.5f), scale.x, scale.y, color.r, color.g, color.b, color.a, 0); + } + + void renderer::draw_rect_unaligned(math::vector2 position, math::vector2 scale, color_rgba color) { + if (global::ui::g_stop_rendering) return; + native::draw_rect(position.x, position.y, scale.x, scale.y, color.r, color.g, color.b, color.a, 0); + } + + void renderer::draw_outlined_rect(math::vector2 position, math::vector2 scale, float thickness, color_rgba box_color, color_rgba border_color) { + if (global::ui::g_stop_rendering) return; + + draw_rect({ position.x, position.y }, { scale.x, scale.y }, box_color); // bg + draw_rect({ position.x, position.y - thickness }, { scale.x, thickness }, border_color); // top + draw_rect({ position.x, position.y + scale.y }, { scale.x, thickness }, border_color); // bottom + + draw_rect({ position.x - (thickness * 0.60f), position.y - thickness }, { (thickness * 0.60f), scale.y + (thickness * 2.f) }, border_color); // left + draw_rect({ position.x + scale.x, position.y - thickness }, { (thickness * 0.60f), scale.y + (thickness * 2.f) }, border_color); // right + } + + void renderer::draw_text(std::string text, math::vector2 position, float scale, int font, color_rgba color, eJustify justification, math::vector2 wrap) { + if (global::ui::g_stop_rendering) return; + native::set_text_wrap(wrap.x, wrap.y); + + if (justification != JUSTIFY_LEFT) { + native::set_text_justification(justification == JUSTIFY_CENTER ? 0 : 2); + } + + native::set_text_centre(justification == JUSTIFY_CENTER); + native::set_text_scale(0.f, scale); + native::set_text_colour(color.r, color.g, color.b, color.a); + native::set_text_font(font); + + if (text.length() >= 98) { + global::ui::g_render_queue[global::ui::g_render_queue_index] = text; + global::ui::g_render_queue_index++; + global::ui::g_render_queue_index %= 100; + } + + native::begin_text_command_display_text("STRING"); + native::add_text_component_substring_player_name(text.c_str()); + native::end_text_command_display_text(position.x, position.y, 0); + } + + void renderer::draw_sprite(std::pair asset, math::vector2 position, math::vector2 scale, float rotation, color_rgba color) { + if (global::ui::g_stop_rendering) return; + + if (!native::has_streamed_texture_dict_loaded(asset.first.c_str()) && asset.first != "ozarktextures") { + native::request_streamed_texture_dict(asset.first.c_str(), true); + } + + native::draw_sprite(asset.first.c_str(), asset.second.c_str(), position.x, position.y, scale.x, scale.y, rotation, color.r, color.g, color.b, color.a, 0); + } + + void renderer::draw_sprite_aligned(std::pair asset, math::vector2 position, math::vector2 scale, float rotation, color_rgba color) { + if (global::ui::g_stop_rendering) return; + + if (!native::has_streamed_texture_dict_loaded(asset.first.c_str()) && asset.first != "ozarktextures") { + native::request_streamed_texture_dict(asset.first.c_str(), true); + } + + native::draw_sprite(asset.first.c_str(), asset.second.c_str(), position.x + (scale.x * 0.5f), position.y + (scale.y * 0.5f), scale.x, scale.y, rotation, color.r, color.g, color.b, color.a, TRUE); + } + + void renderer::draw_line(math::vector3 from, math::vector3 to, color_rgba color) { + if (global::ui::g_stop_rendering) return; + + native::draw_line(from.x, from.y, from.z, to.x, to.y, to.z, color.r, color.g, color.b, color.a); + } + + void renderer::draw_line_2d(math::vector3 from, math::vector3 to, color_rgba color) { + if (global::ui::g_stop_rendering) return; + + if (global::ui::g_line_2d_index < 5000) { + line_2d& line = global::ui::m_line_2d[global::ui::g_line_2d_index++]; + line.m_from.x = from.x; + line.m_from.y = from.y; + line.m_to.x = to.x; + line.m_to.y = to.y; + line.m_color = color; + } + } + + int renderer::get_render_count() { + return m_render_count; + } + + color_rgba renderer::hsv_to_rgb(float h, float s, float v, int original_alpha) { + double r = 0.f, g = 0.f, b = 0.f; + + if (s == 0.f) { + r = v; + g = v; + b = v; + } else { + int i; + double f, p, q, t; + + if (h == 360.f) { + h = 0.f; + } else h = h / 60.f; + + i = (int)trunc(h); + f = h - i; + + p = v * (1.f - s); + q = v * (1.f - (s * f)); + t = v * (1.f - (s * (1.f - f))); + + switch (i) { + case 0: r = v; g = t; b = p; break; + case 1: r = q; g = v; b = p; break; + case 2: r = p; g = v; b = t; break; + case 3: r = p; g = q; b = v; break; + case 4: r = t; g = p; b = v; break; + default: r = v; g = p; b = q; break; + } + } + + return color_rgba((int)(r * 255.f), (int)(g * 255.f), (int)(b * 255.f), original_alpha); + } + + color_hsv renderer::rgb_to_hsv(color_rgba in) { + color_hsv out; + +#define min_f(a, b, c) (fminf(a, fminf(b, c))) +#define max_f(a, b, c) (fmaxf(a, fmaxf(b, c))) + + float r = in.r / 255.0f; + float g = in.g / 255.0f; + float b = in.b / 255.0f; + + float h, s, v; // h:0-360.0, s:0.0-1.0, v:0.0-1.0 + + float max = max_f(r, g, b); + float min = min_f(r, g, b); + + v = max; + + if (max == 0.0f) { + s = 0; + h = 0; + } else if (max - min == 0.0f) { + s = 0; + h = 0; + } else { + s = (max - min) / max; + + if (max == r) { + h = 60 * ((g - b) / (max - min)) + 0; + } else if (max == g) { + h = 60 * ((b - r) / (max - min)) + 120; + } else { + h = 60 * ((r - g) / (max - min)) + 240; + } + } + + if (h < 0) h += 360.0f; + + out.h = h; + out.s = s; + out.v = v; + + return out; + } + + renderer* get_renderer() { + static renderer instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/renderer.h b/GTAV/src/menu/base/renderer.h new file mode 100644 index 0000000..baea918 --- /dev/null +++ b/GTAV/src/menu/base/renderer.h @@ -0,0 +1,133 @@ +#pragma once +#include "stdafx.h" +#include "global/ui_vars.h" +#include "util/math.h" + +enum eJustify { + JUSTIFY_LEFT, + JUSTIFY_RIGHT, + JUSTIFY_CENTER, +}; + +namespace menu::renderer { +#undef DrawText + class renderer { + public: + void render(); + + void render_title(std::string title); + void render_tooltip(std::string tooltip); + void render_open_tooltip(); + void render_color_preview(color_rgba color); + + float calculate_string_width(std::string string, int font, float scale); + float get_normalized_font_scale(int font, float scale); + std::pair get_texture(menu_texture texture); + + void draw_rect(math::vector2 position, math::vector2 scale, color_rgba color); + void draw_rect_unaligned(math::vector2 position, math::vector2 scale, color_rgba color); + void draw_outlined_rect(math::vector2 position, math::vector2 scale, float thickness, color_rgba box_color, color_rgba border_color); + void draw_text(std::string text, math::vector2 position, float scale, int font, color_rgba color, eJustify justification, math::vector2 wrap = { 0.f, 5.f }); + void draw_sprite(std::pair asset, math::vector2 position, math::vector2 scale, float rotation, color_rgba color); + void draw_sprite_aligned(std::pair asset, math::vector2 position, math::vector2 scale, float rotation, color_rgba color); + void draw_line(math::vector3 from, math::vector3 to, color_rgba color); + void draw_line_2d(math::vector3 from, math::vector3 to, color_rgba color); + + color_hsv rgb_to_hsv(color_rgba in); + color_rgba hsv_to_rgb(float h, float s, float v, int original_alpha = 255); + + int get_render_count(); + void set_smooth_scroll(float val) { m_smooth_scroll = val; } + float get_smooth_scroll() { return m_smooth_scroll; } + private: + float m_smooth_scroll = global::ui::g_position.y; + int m_render_count; + int m_globe_handle; + }; + + renderer* get_renderer(); + + inline void render() { + get_renderer()->render(); + } + + inline void render_open_tooltip() { + get_renderer()->render_open_tooltip(); + } + + inline int get_render_count() { + return get_renderer()->get_render_count(); + } + + inline void render_title(std::string title) { + get_renderer()->render_title(title); + } + + inline void render_tooltip(std::string tooltip) { + get_renderer()->render_tooltip(tooltip); + } + + inline void render_color_preview(color_rgba color) { + get_renderer()->render_color_preview(color); + } + + inline float calculate_string_width(std::string string, int font, float scale) { + return get_renderer()->calculate_string_width(string, font, scale); + } + + inline float get_normalized_font_scale(int font, float scale) { + return get_renderer()->get_normalized_font_scale(font, scale); + } + + inline void draw_rect(math::vector2 position, math::vector2 scale, color_rgba color) { + get_renderer()->draw_rect(position, scale, color); + } + + inline void draw_rect_unaligned(math::vector2 position, math::vector2 scale, color_rgba color) { + get_renderer()->draw_rect_unaligned(position, scale, color); + } + + inline void draw_outlined_rect(math::vector2 position, math::vector2 scale, float thickness, color_rgba box_color, color_rgba border_color) { + get_renderer()->draw_outlined_rect(position, scale, thickness, box_color, border_color); + } + + inline void draw_text(std::string text, math::vector2 position, float scale, int font, color_rgba color, eJustify justification = JUSTIFY_LEFT, math::vector2 wrap = { 0.f, 5.f }) { + get_renderer()->draw_text(text, position, scale, font, color, justification, wrap); + } + + inline void draw_sprite(std::pair asset, math::vector2 position, math::vector2 scale, float rotation, color_rgba color) { + get_renderer()->draw_sprite(asset, position, scale, rotation, color); + } + + inline void draw_sprite_aligned(std::pair asset, math::vector2 position, math::vector2 scale, float rotation, color_rgba color) { + get_renderer()->draw_sprite_aligned(asset, position, scale, rotation, color); + } + + inline void draw_line(math::vector3 from, math::vector3 to, color_rgba color) { + get_renderer()->draw_line(from, to, color); + } + + inline void draw_line_2d(math::vector3 from, math::vector3 to, color_rgba color) { + get_renderer()->draw_line_2d(from, to, color); + } + + inline std::pair get_texture(menu_texture texture) { + return get_renderer()->get_texture(texture); + } + + inline void set_smooth_scroll(float val) { + get_renderer()->set_smooth_scroll(val); + } + + inline float get_smooth_scroll() { + return get_renderer()->get_smooth_scroll(); + } + + inline color_hsv rgb_to_hsv(color_rgba in) { + return get_renderer()->rgb_to_hsv(in); + } + + inline color_rgba hsv_to_rgb(float h, float s, float v, int original_alpha = 255) { + return get_renderer()->hsv_to_rgb(h, s, v, original_alpha); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenu.cpp b/GTAV/src/menu/base/submenu.cpp new file mode 100644 index 0000000..1eedf3c --- /dev/null +++ b/GTAV/src/menu/base/submenu.cpp @@ -0,0 +1,106 @@ +#include "submenu.h" +#include "renderer.h" +#include "submenu_handler.h" +#include "base.h" +#include "util/instructionals.h" +#include "util/hotkeys.h" + +namespace menu::submenu { + void submenu::update_menu() { + update(); + + renderer::render_title(m_name.get()); + + handler::set_total_options(0); + handler::set_current_options_without_breaks(0); + handler::set_total_options_without_breaks(0); + + bool slider = false; + bool input = false; + bool hotkey = false; + + if (m_options.size() > 0) { + std::vector> options; + options.reserve(m_options.size()); + + int relative_position = 0; + int visibility_offset = 0; + + for (std::shared_ptr option : m_options) { + if (option->is_visible()) { + visibility_offset++; + options.push_back(option); + + handler::set_total_options(handler::get_total_options() + 1); + if (!option->is_break()) { + if (visibility_offset <= base::get_current_option()) { + handler::set_current_options_without_breaks(handler::get_current_options_without_breaks() + 1); + } + + handler::set_total_options_without_breaks(handler::get_total_options_without_breaks() + 1); + } + } + } + + for (int i = base::get_scroll_offset(); i < base::get_scroll_offset() + base::get_max_options(); i++) { + if (i >= 0 && i < options.size()) { + if (relative_position >= base::get_max_options()) break; + + options.at(i).get()->render(relative_position); + + if (relative_position == base::get_current_option() - base::get_scroll_offset()) { + if (base::is_open()) { + renderer::render_tooltip(options.at(i).get()->get_tooltip().get()); + options.at(i).get()->render_selected(relative_position, m_submenu_name_stack); + + slider = options.at(i).get()->is_slider(); + input = options.at(i).get()->is_input(); + hotkey = options.at(i).get()->has_hotkey(); + } + } + + relative_position++; + } + } + } + + if (m_default_instructionals) { + instructionals::standard(slider, input, hotkey); + } + } + + void submenu::clear_options(int offset) { + if (offset > m_options.size()) return; + + for (std::shared_ptr& option : m_options) { + if (option->has_hotkey()) { + hotkey::unregister_hotkey(&*option); + } + } + + m_options.resize(offset); + } + + std::string submenu::get_string(std::string str) { + for (localization local : m_strings) { + if (!local.get_original().compare(str)) { + return local.get(); + } + } + + return str; + } + + void submenu::set_name(std::string str, bool translation, bool searchable) { + if (!str.empty() && str.length() > 0) { + m_name.set(str); + m_name.set_translate(true); + m_can_be_searched = searchable; + } + } + + void submenu::load() {} + void submenu::update_once() {} + void submenu::update() {} + void submenu::feature_update() {} +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenu.h b/GTAV/src/menu/base/submenu.h new file mode 100644 index 0000000..8aff77e --- /dev/null +++ b/GTAV/src/menu/base/submenu.h @@ -0,0 +1,99 @@ +#pragma once +#include "stdafx.h" +#include "options/option.h" +#include "options/button.h" +#include "options/toggle.h" +#include "options/scroll.h" +#include "options/number.h" +#include "options/break.h" +#include "options/radio.h" +#include "options/color_option.h" +#include "util/hotkeys.h" +#include "rage/invoker/natives.h" +#include + +namespace menu::submenu { + class submenu { + public: + void update_menu(); + void clear_options(int offset); + + virtual void load(); + virtual void update_once(); + virtual void update(); + virtual void feature_update(); + + void set_parent(submenu* submenu) { m_parent = submenu; } + void set_can_be_searched(bool searchable) { m_can_be_searched = searchable; } + void set_default_instructionals(bool def) { m_default_instructionals = def; } + void set_old_current_option(int val) { m_old_current_option = val; } + void set_old_scroll_offset(int val) { m_old_scroll_offset = val; } + void set_name(std::string str, bool translation = true, bool searchable = true); + + submenu* get_parent() { return m_parent; } + bool can_be_searched() { return m_can_be_searched; } + bool get_default_instructionals() { return m_default_instructionals; } + int get_old_current_option() { return m_old_current_option; } + int get_old_scroll_offset() { return m_old_scroll_offset; } + std::vector>& get_options() { return m_options; } + std::vector& get_strings() { return m_strings; } + std::stack& get_submenu_name_stack() { return m_submenu_name_stack; } + std::string get_string(std::string str); + + void add_string(std::string str) { m_strings.push_back(localization(str, true)); } + localization& get_name() { return m_name; } + + template + std::shared_ptr add_option(T& option) { + std::shared_ptr ptr = std::make_shared(option); + m_options.push_back(ptr); + + ptr.get()->set_submenu_name_stack(&m_submenu_name_stack); + + if (ptr.get()->has_hotkey()) { + hotkey::read_hotkey(ptr.get()); + } + + return ptr; + } + + template + std::shared_ptr& add_option(std::shared_ptr& option) { + m_options.push_back(option); + + option.get()->set_submenu_name_stack(&m_submenu_name_stack); + + if (option.get()->has_hotkey()) { + hotkey::read_hotkey(option.get()); + } + + return option; + } + + template + void set_parent() { + m_parent = T::get(); + m_submenu_name_stack = {}; + + m_submenu_name_stack.push(m_name.get_original()); + + submenu* submenu = m_parent; + while (submenu) { + m_submenu_name_stack.push(submenu->m_name.get_original()); + submenu = submenu->get_parent(); + } + } + private: + localization m_name; + submenu* m_parent = nullptr; + + bool m_can_be_searched = true; + bool m_default_instructionals = true; + int m_old_current_option = 0; + int m_old_scroll_offset = 0; + + std::vector> m_options = {}; + std::vector m_strings = {}; + std::stack m_submenu_name_stack = {}; + }; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenu_handler.cpp b/GTAV/src/menu/base/submenu_handler.cpp new file mode 100644 index 0000000..99d8c96 --- /dev/null +++ b/GTAV/src/menu/base/submenu_handler.cpp @@ -0,0 +1,89 @@ +#include "submenu_handler.h" +#include "base.h" +#include "rage/invoker/natives.h" +#include "global/ui_vars.h" +#include "submenus/main.h" + +namespace menu::submenu::handler { + void submenu_handler::load() { + m_main = m_current = main_menu::get(); + } + + void submenu_handler::update() { + if (m_current) { + m_current->update_menu(); + + if (m_next) { + menu::base::set_current_option(m_next_current_option); + menu::base::set_scroll_offset(m_next_scroll_offset); + + m_current = m_next; + m_next = nullptr; + m_current->update_once(); + } + } + } + + void submenu_handler::feature_update() { + if (native::network_is_player_connected(native::player_id())) { + for (submenu* submenu : m_submenus) { + submenu->feature_update(); + } + } + } + + void submenu_handler::cleanup() { + for (submenu* submenu : m_submenus) { + delete submenu; + } + } + + void submenu_handler::add_submenu(submenu* submenu) { + m_submenus.push_back(submenu); + } + + void submenu_handler::set_submenu(submenu* submenu) { + menu::renderer::set_smooth_scroll(global::ui::g_position.y); + + m_current->set_old_current_option(menu::base::get_current_option()); + m_current->set_old_scroll_offset(menu::base::get_scroll_offset()); + + m_next_current_option = 0; + m_next_scroll_offset = 0; + + m_previous = m_current; + m_next = submenu; + } + + void submenu_handler::set_submenu_previous(bool reset) { + m_previous = m_current; + if (m_current->get_parent() == nullptr) { + m_next = m_main; + m_next_current_option = 0; + m_next_scroll_offset = 0; + menu::base::set_open(false); + } else { + m_next = m_current->get_parent(); + + if (reset) { + m_next_current_option = 0; + m_next_scroll_offset = 0; + menu::renderer::set_smooth_scroll(global::ui::g_position.y); + } else { + m_next_current_option = m_next->get_old_current_option(); + m_next_scroll_offset = m_next->get_old_scroll_offset(); + + int max_options = base::get_max_options(); + int scroller_position = math::clamp(m_next_current_option - m_next_scroll_offset > max_options ? max_options : m_next_current_option - m_next_scroll_offset, 0, max_options); + menu::renderer::set_smooth_scroll(global::ui::g_position.y + (scroller_position * global::ui::g_option_scale)); + } + } + + global::ui::g_rendering_tooltip.clear(); + } + + submenu_handler* get_submenu_handler() { + static submenu_handler instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenu_handler.h b/GTAV/src/menu/base/submenu_handler.h new file mode 100644 index 0000000..a9b441d --- /dev/null +++ b/GTAV/src/menu/base/submenu_handler.h @@ -0,0 +1,116 @@ +#pragma once +#include "stdafx.h" +#include "submenu.h" +#include "menu/base/options/submenu_option.h" +#include "menu/base/util/player_manager.h" +#include + +namespace menu::submenu::handler { + class submenu_handler { + public: + void load(); + void update(); + void feature_update(); + void cleanup(); + + void add_submenu(submenu* submenu); + void set_submenu(submenu* submenu); + void set_submenu_previous(bool reset = false); + + int get_total_options() { return m_total_options; } + int get_current_options_without_breaks() { return m_current_options_without_breaks; } + int get_total_options_without_breaks() { return m_total_options_without_breaks; } + + void set_total_options(int val) { m_total_options = val; } + void set_current_options_without_breaks(int val) { m_current_options_without_breaks = val; } + void set_total_options_without_breaks(int val) { m_total_options_without_breaks = val; } + + submenu* get_current() { return m_current; } + submenu* get_previous() { return m_previous; } + + void set_previous(submenu* submenu) { m_previous = submenu; } + std::vector& get_submenus() { return m_submenus; } + private: + submenu* m_main = nullptr; + submenu* m_current = nullptr; + submenu* m_next = nullptr; + submenu* m_previous = nullptr; + std::vector m_submenus = {}; + + int m_total_options = 0; + int m_current_options_without_breaks = 0; + int m_total_options_without_breaks = 0; + int m_next_current_option = 0; + int m_next_scroll_offset = 0; + }; + + submenu_handler* get_submenu_handler(); + + inline void load() { + get_submenu_handler()->load(); + } + + inline void update() { + get_submenu_handler()->update(); + } + + inline void feature_update() { + get_submenu_handler()->feature_update(); + } + + inline void cleanup() { + get_submenu_handler()->cleanup(); + } + + inline void add_submenu(submenu* submenu) { + get_submenu_handler()->add_submenu(submenu); + } + + inline void set_submenu(submenu* submenu) { + get_submenu_handler()->set_submenu(submenu); + } + + inline void set_submenu_previous(bool reset = false) { + get_submenu_handler()->set_submenu_previous(reset); + } + + inline int get_total_options() { + return get_submenu_handler()->get_total_options(); + } + + inline int get_current_options_without_breaks() { + return get_submenu_handler()->get_current_options_without_breaks(); + } + + inline int get_total_options_without_breaks() { + return get_submenu_handler()->get_total_options_without_breaks(); + } + + inline void set_total_options(int val) { + get_submenu_handler()->set_total_options(val); + } + + inline void set_current_options_without_breaks(int val) { + get_submenu_handler()->set_current_options_without_breaks(val); + } + + inline void set_total_options_without_breaks(int val) { + get_submenu_handler()->set_total_options_without_breaks(val); + } + + inline submenu* get_current() { + return get_submenu_handler()->get_current(); + } + + inline submenu* get_previous() { + return get_submenu_handler()->get_previous(); + } + + inline void set_previous(submenu* submenu) { + get_submenu_handler()->set_previous(submenu); + } + + inline std::vector& get_submenus() { + return get_submenu_handler()->get_submenus(); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main.cpp b/GTAV/src/menu/base/submenus/main.cpp new file mode 100644 index 0000000..7cf01a5 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main.cpp @@ -0,0 +1,289 @@ +#include "main.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "global/ui_vars.h" +#include "rage/invoker/natives.h" +#include "menu/base/submenu_handler.h" +#include "menu/base/util/instructionals.h" +#include "menu/base/util/notify.h" +#include "menu/base/util/panels.h" +#include "main/player.h" +#include "main/weapon/weapon_mods.h" +#include "main/misc.h" +#include "main/world.h" +#include "main/settings.h" +#include "main/teleport.h" +#include "main/spawner.h" +#include "main/vehicle.h" +#include "main/protections.h" +#include "main/network.h" +#include "main/helper/helper_color.h" +#include "main/helper/helper_esp.h" +#include "main/helper/helper_rainbow.h" +#include "rage/engine.h" +#include "util/caller.h" +#include "util/log.h" +#include "util/dirs.h" +#include "util/util.h" +#include "util/memory/memory.h" +#include "menu/base/util/global.h" +#include "menu/base/util/control.h" +#include "rage/types/global_types.h" +#include + +using namespace main::vars; + +namespace main::vars { + variables m_vars; + + void scaleform_fade_out_time(const char* sParam0, float fParam1) { + native::push_scaleform_movie_function(m_vars.m_scaleform_handle, "HIDE"); + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(sParam0); + native::end_text_command_scaleform_string(); + native::push_scaleform_movie_function_parameter_float(fParam1); + native::pop_scaleform_movie_function_void(); + } + + void scaleform_fade_in_time(const char* sParam0, float fParam1) { + native::push_scaleform_movie_function(m_vars.m_scaleform_handle, "SHOW_SINGLE_LINE"); + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(sParam0); + native::end_text_command_scaleform_string(); + native::push_scaleform_movie_function_parameter_float(fParam1); + native::pop_scaleform_movie_function_void(); + } + + void scaleform_render_line(const char* sParam0, const char* sParam1, const char* sParam2, const char* sParam3, bool bParam4) { + native::push_scaleform_movie_function(m_vars.m_scaleform_handle, "ADD_TEXT_TO_SINGLE_LINE"); + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(sParam0); + native::end_text_command_scaleform_string(); + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(sParam1); + native::end_text_command_scaleform_string(); + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(sParam2); + native::end_text_command_scaleform_string(); + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(sParam3); + native::end_text_command_scaleform_string(); + native::push_scaleform_movie_function_parameter_bool(bParam4); + native::pop_scaleform_movie_function_void(); + } + + void scaleform_setup_single_line(const char* sParam0, float fParam1, float fParam2, float fParam3, float fParam4, const char* sParam5) { + native::push_scaleform_movie_function(m_vars.m_scaleform_handle, "SETUP_SINGLE_LINE"); + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(sParam0); + native::end_text_command_scaleform_string(); + native::push_scaleform_movie_function_parameter_float(fParam1); + native::push_scaleform_movie_function_parameter_float(fParam2); + native::push_scaleform_movie_function_parameter_float(fParam3); + native::push_scaleform_movie_function_parameter_float(fParam4); + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(sParam5); + native::end_text_command_scaleform_string(); + native::pop_scaleform_movie_function_void(); + } + + void scaleform_render() { + if (!m_vars.m_has_initialized) { + native::transition_to_blurred(1000); + m_vars.m_scaleform_handle = native::request_scaleform_movie("OPENING_CREDITS"); + m_vars.m_has_initialized = true; + } + + if (native::has_scaleform_movie_loaded(m_vars.m_scaleform_handle)) { + static const DWORD TIMER = GetTickCount(); + switch (m_vars.m_current_index) { + case -1: + if (GetTickCount() - TIMER > 750) { + m_vars.m_current_index++; + } + break; + case 0: + scaleform_setup_single_line("presents", 1.5f, 1.5f, 20.f, 20.f, "left"); + scaleform_render_line("presents", "OZARK CHEATS", "$font2", "HUD_COLOUR_WHITE", 1); + scaleform_render_line("presents", "presents", "$font5", "HUD_COLOUR_FREEMODE", 1); + scaleform_fade_in_time("presents", 0.166f); + m_vars.m_cached_time = GetTickCount(); + m_vars.m_current_index++; + break; + case 1: + if (GetTickCount() - m_vars.m_cached_time > 3250) { + scaleform_fade_out_time("presents", 0.166f); + m_vars.m_current_index++; + } + + break; + case 2: + if (GetTickCount() - m_vars.m_cached_time > 5750) { // 70 + scaleform_setup_single_line("presents", 1.5f, 1.5f, 0.f, 190.f, "left"); + scaleform_render_line("presents", "a", "$font5", "HUD_COLOUR_MICHAEL", 1); + scaleform_render_line("presents", "NEW ERA", "$font2", "HUD_COLOUR_WHITE", 1); + scaleform_render_line("presents", "of modding", "$font5", "HUD_COLOUR_MICHAEL", 1); + scaleform_fade_in_time("presents", 0.166f); + m_vars.m_current_index++; + } + break; + case 3: + if (GetTickCount() - m_vars.m_cached_time > 5750 + 3250) { + scaleform_fade_out_time("presents", 0.166f); + m_vars.m_current_index++; + } + + break; + + case 4: + if (GetTickCount() - m_vars.m_cached_time > 5750 + 3250 + 3250) { + native::set_scaleform_movie_as_no_longer_needed(&m_vars.m_scaleform_handle); + m_vars.m_scaleform_handle = -1; + m_vars.m_shown_welcome = true; + native::transition_from_blurred(1000); + + util::fiber::pool::add([=] { + util::fiber::sleep(1500); + global::ui::g_stop_rendering = false; + }); + } + break; + } + + if (m_vars.m_scaleform_handle != -1) { + native::draw_scaleform_movie_fullscreen(m_vars.m_scaleform_handle, 255, 255, 255, 255, 0); + } + } + } + + void log_player_globals(Player player, int base, int size) { + LOG("--- Global_%i[%i <%i>] -------------------------", base, player, size); + + for (int i = 0; i < size; i++) { + int _int = *menu::script_global(base).at(player, size).at(i).get(); + uint32_t _uint = *menu::script_global(base).at(player, size).at(i).get(); + float _float = *menu::script_global(base).at(player, size).at(i).get(); + + LOG("Global_%i[%i <%i>].f_%i = %i (%u %.3f)", base, player, size, i, _int, _uint, _float); + } + + LOG("----------------------------------------------------------"); + } +} + +void main_menu::load() { + set_name("Ozark", false, false); + + get_submenu_name_stack().push("Ozark"); + set_default_instructionals(false); + + m_vars.m_shown_welcome = util::config::read_bool(get_submenu_name_stack(), "Shown Welcome", false, { "Main" }); + if (!m_vars.m_shown_welcome) { + global::ui::g_stop_rendering = true; + util::config::write_bool(get_submenu_name_stack(), "Shown Welcome", true, { "Main" }); + } + + menu::panels::load(); + + add_option(submenu_option("Player") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Network") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Protections") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Teleport") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Weapon") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Vehicle") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Spawner") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { spawner::vars::m_vars.m_flag = spawner::vars::SPAWNER_SELF; })); + + add_option(submenu_option("World") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Miscellaneous") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Settings") + .add_translate().add_hotkey() + .add_submenu()); + + helper_color_menu::get(); + helper_esp_menu::get(); + helper_rainbow_menu::get(); + + int language = native::get_current_language_id(); + if (language == 9 || language == 12) { + global::vars::g_chinese = true; + + global::ui::g_option_font = 0; + global::ui::g_header_font = 0; + global::ui::g_sub_header_font = 0; + global::ui::g_open_tooltip_font = 0; + global::ui::g_tooltip_font = 0; + global::ui::g_stacked_display_font = 0; + global::ui::g_notify_title_font = 0; + global::ui::g_notify_body_font = 0; + global::ui::g_panel_font = 0; + global::ui::g_option_height = 0.30f; + } +} + +void main_menu::update() { + instructionals::main_menu(); +} + +void main_menu::update_once() {} + +void main_menu::feature_update() { + if (!m_vars.m_shown_welcome) { + scaleform_render(); + } + + if (global::vars::g_network_base_config) { + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + real_config->set_network_session_was_invited(false); + } + + for (int i = 0; i < 10; i++) { + if (global::vars::g_arxan_called[i]) { + global::vars::g_arxan_called[i] = false; + LOG_DEV("[ARXAN] Called %i", i + 1); + } + } + + menu::script_global(rage::global::_155_spawn_dlc_in_sp).as() = true; +} + +main_menu* g_instance; +main_menu* main_menu::get() { + if (g_instance == nullptr) { + g_instance = new main_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main.h b/GTAV/src/menu/base/submenus/main.h new file mode 100644 index 0000000..25e5b06 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main.h @@ -0,0 +1,31 @@ +#pragma once +#include "menu/base/submenu.h" + +class main_menu : public menu::submenu::submenu { +public: + static main_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + main_menu() + : menu::submenu::submenu() + {} +}; + +namespace main::vars { + struct variables { + int m_scaleform_handle; + int m_current_index; + bool m_has_initialized; + bool m_shown_welcome; + uint32_t m_cached_time; + + + std::unordered_map callers; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/color/helper_color_preset.cpp b/GTAV/src/menu/base/submenus/main/helper/color/helper_color_preset.cpp new file mode 100644 index 0000000..236e717 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/color/helper_color_preset.cpp @@ -0,0 +1,95 @@ +#include "helper_color_preset.h" +#include "menu/base/submenu_handler.h" +#include "../helper_color.h" + +using namespace helper::color::preset::vars; + +namespace helper::color::preset::vars { + variables m_vars; + + scroll_struct presets[] = { + { localization("Ozark Blue", true), color_rgba(0x0095ffff) }, + { localization("Emerald", true), color_rgba(0, 155, 119, 200) }, + { localization("Tangerine Tango", true), color_rgba(221, 65, 36, 200) }, + { localization("Honeysucle", true), color_rgba(214, 80, 118, 200) }, + { localization("Turquoise", true), color_rgba(68, 184, 172, 200) }, + { localization("Mimosa", true), color_rgba(239, 192, 80, 200) }, + { localization("Blue Izis", true), color_rgba(91, 94, 166, 200) }, + { localization("Chili Pepper", true), color_rgba(155, 35, 53, 200) }, + { localization("Sand Dollar", true), color_rgba(223, 207, 190, 200) }, + { localization("Blue Turquoise", true), color_rgba(85, 180, 176, 200) }, + { localization("Tigerlily", true), color_rgba(225, 93, 68, 200) }, + { localization("Aqua Sky", true), color_rgba(127, 205, 205, 200) }, + { localization("True Red", true), color_rgba(188, 36, 60, 200) }, + { localization("Fuchsia Rose", true), color_rgba(195, 68, 122, 200) }, + { localization("Cerulean Blue", true), color_rgba(152, 180, 212, 200) }, + { localization("Galaxy Blue", true), color_rgba(0x2A, 0x4B, 0x7C, 200) }, + { localization("Dark Cheddar", true), color_rgba(0xE0, 0x81, 0x19, 200) }, + { localization("Orange Tiger", true), color_rgba(0xF9, 0x67, 0x14, 200) }, + { localization("Turmeric", true), color_rgba(0xFE, 0x84, 0x0E, 200) }, + { localization("Pink Peacock", true), color_rgba(0xC6, 0x21, 0x68, 200) }, + { localization("Aspen Gold", true), color_rgba(0xFF, 0xD6, 0x62, 200) }, + { localization("Eclipse", true), color_rgba(0x34, 0x31, 0x48, 200) }, + { localization("Valiant Poppy", true), color_rgba(0xBD, 0x3D, 0x3A, 200) }, + { localization("Nebulas Blue", true), color_rgba(0x3F, 0x69, 0xAA, 200) }, + { localization("Ceylon Yellow", true), color_rgba(0xD5, 0xAE, 0x41, 200) }, + { localization("Russet Orange", true), color_rgba(0xE4, 0x7A, 0x2E, 200) }, + { localization("Quetzal Green", true), color_rgba(0x00, 0x6E, 0x6D, 200) }, + { localization("Cherry Tomato", true), color_rgba(0xE9, 0x4B, 0x3C, 200) }, + { localization("Meadowlark", true), color_rgba(0xEC, 0xDB, 0x54, 200) }, + { localization("Baby Blue", true), color_rgba(0x6F, 0x9F, 0xD8, 200) }, + { localization("Arcadia", true), color_rgba(0x00, 0xA5, 0x91, 200) }, + { localization("Ultra Violet", true), color_rgba(0x6B, 0x5B, 0x95, 200) }, + { localization("Lime Punch", true), color_rgba(0xBF, 0xD6, 0x41, 200) }, + { localization("Harbor Mist", true), color_rgba(0xB4, 0xB7, 0xBA, 200) }, + { localization("Grenadine", true), color_rgba(0xDC, 0x4C, 0x46, 200) }, + { localization("Navy Peony", true), color_rgba(0x22, 0x3A, 0x5E, 200) }, + { localization("Marina", true), color_rgba(0x4F, 0x84, 0xC4, 200) }, + { localization("Autumn Maple", true), color_rgba(0xD2, 0x69, 0x1E, 200) }, + { localization("Niagara", true), color_rgba(0x57, 0x8C, 0xA9, 200) }, + { localization("Primrose Yellow", true), color_rgba(0xF6, 0xD1, 0x55, 200) }, + { localization("Flame", true), color_rgba(0xF2, 0x55, 0x2C, 200) }, + { localization("Lapis Blue", true), color_rgba(0x00, 0x4B, 0x8D, 200) }, + { localization("Island Paradise", true), color_rgba(0x95, 0xDE, 0xE3, 200) }, + { localization("Pink Yarrow", true), color_rgba(0xCE, 0x31, 0x75, 200) }, + { localization("Riverside", true), color_rgba(0x4C, 0x6A, 0x92, 200) }, + { localization("Aurora Red", true), color_rgba(0xB9, 0x3A, 0x32, 200) }, + { localization("Serenity", true), color_rgba(0x91, 0xA8, 0xD0, 200) }, + { localization("Green Flash", true), color_rgba(0x79, 0xC7, 0x53, 200) }, + { localization("Buttercup", true), color_rgba(0xFA, 0xE0, 0x3C, 200) }, + { localization("Limpet Shell", true), color_rgba(0x98, 0xDD, 0xDE, 200) } + }; +} + +void helper_color_preset_menu::load() { + set_name("Presets"); + set_parent(); +} + +void helper_color_preset_menu::update() {} + +void helper_color_preset_menu::update_once() { + clear_options(0); + + for (scroll_struct& preset : presets) { + add_option(button_option(preset.m_name.get()) + .add_click([=] { + *m_vars.m_color = preset.m_result; + helper::color::vars::m_vars.m_callback(); + }) + .add_hover([=] { menu::renderer::render_color_preview(preset.m_result); })); + } +} + +void helper_color_preset_menu::feature_update() {} + +helper_color_preset_menu* g_instance; +helper_color_preset_menu* helper_color_preset_menu::get() { + if (g_instance == nullptr) { + g_instance = new helper_color_preset_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/color/helper_color_preset.h b/GTAV/src/menu/base/submenus/main/helper/color/helper_color_preset.h new file mode 100644 index 0000000..633578b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/color/helper_color_preset.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class helper_color_preset_menu : public menu::submenu::submenu { +public: + static helper_color_preset_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + helper_color_preset_menu() + : menu::submenu::submenu() {} +}; + +namespace helper::color::preset::vars { + struct variables { + color_rgba* m_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings.cpp b/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings.cpp new file mode 100644 index 0000000..d390a9d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings.cpp @@ -0,0 +1,122 @@ +#include "helper_esp_settings.h" +#include "menu/base/submenu_handler.h" +#include "../helper_esp.h" +#include "helper_esp_settings_edit.h" + +using namespace helper::esp::settings::vars; + +namespace helper::esp::settings::vars { + variables m_vars; +} + +void helper_esp_settings_menu::load() { + set_name("Settings"); + set_parent(); + + add_option(submenu_option("Name") + .add_translate() + .add_submenu() + .add_click_this([] (submenu_option* option) { + helper_esp_settings_edit_menu::get()->set_name(option->get_name().get(), false, false); + helper::esp::settings::edit::vars::m_vars.m_color = &helper::esp::vars::m_vars.m_current->m_name_text_color; + helper::esp::settings::edit::vars::m_vars.m_rainbow = &helper::esp::vars::m_vars.m_current->m_name_text_rainbow.m_rainbow; + helper::esp::settings::edit::vars::m_vars.m_rainbow_toggle = &helper::esp::vars::m_vars.m_current->m_name_text_rainbow.m_rainbow_toggle; + })); + + add_option(submenu_option("Name - Background") + .add_translate() + .add_submenu() + .add_click_this([] (submenu_option* option) { + helper_esp_settings_edit_menu::get()->set_name(option->get_name().get(), false, false); + helper::esp::settings::edit::vars::m_vars.m_color = &helper::esp::vars::m_vars.m_current->m_name_bg_color; + helper::esp::settings::edit::vars::m_vars.m_rainbow = &helper::esp::vars::m_vars.m_current->m_name_bg_rainbow.m_rainbow; + helper::esp::settings::edit::vars::m_vars.m_rainbow_toggle = &helper::esp::vars::m_vars.m_current->m_name_bg_rainbow.m_rainbow_toggle; + })); + + /*add_option(submenu_option("2D - Box") + .add_translate() + .add_submenu() + .add_click_this([] (submenu_option* option) { + helper_esp_settings_edit_menu::get()->set_name(option->get_name().get(), false, false); + helper::esp::settings::edit::vars::m_vars.m_color = &helper::esp::vars::m_vars.m_current->m_2d_box_color; + helper::esp::settings::edit::vars::m_vars.m_rainbow = &helper::esp::vars::m_vars.m_current->m_2d_box_rainbow.m_rainbow; + helper::esp::settings::edit::vars::m_vars.m_rainbow_toggle = &helper::esp::vars::m_vars.m_current->m_2d_box_rainbow.m_rainbow_toggle; + })); + + add_option(submenu_option("2D - Corners") + .add_translate() + .add_submenu() + .add_click_this([] (submenu_option* option) { + helper_esp_settings_edit_menu::get()->set_name(option->get_name().get(), false, false); + helper::esp::settings::edit::vars::m_vars.m_color = &helper::esp::vars::m_vars.m_current->m_2d_corners_color; + helper::esp::settings::edit::vars::m_vars.m_rainbow = &helper::esp::vars::m_vars.m_current->m_2d_corners_rainbow.m_rainbow; + helper::esp::settings::edit::vars::m_vars.m_rainbow_toggle = &helper::esp::vars::m_vars.m_current->m_2d_corners_rainbow.m_rainbow_toggle; + }));*/ + + add_option(submenu_option("3D - Box") + .add_translate() + .add_submenu() + .add_click_this([] (submenu_option* option) { + helper_esp_settings_edit_menu::get()->set_name(option->get_name().get(), false, false); + helper::esp::settings::edit::vars::m_vars.m_color = &helper::esp::vars::m_vars.m_current->m_3d_box_color; + helper::esp::settings::edit::vars::m_vars.m_rainbow = &helper::esp::vars::m_vars.m_current->m_3d_box_rainbow.m_rainbow; + helper::esp::settings::edit::vars::m_vars.m_rainbow_toggle = &helper::esp::vars::m_vars.m_current->m_3d_box_rainbow.m_rainbow_toggle; + })); + + add_option(submenu_option("Skeleton - Bones") + .add_translate() + .add_submenu() + .add_click_this([] (submenu_option* option) { + helper_esp_settings_edit_menu::get()->set_name(option->get_name().get(), false, false); + helper::esp::settings::edit::vars::m_vars.m_color = &helper::esp::vars::m_vars.m_current->m_skeleton_bones_color; + helper::esp::settings::edit::vars::m_vars.m_rainbow = &helper::esp::vars::m_vars.m_current->m_skeleton_bones_rainbow.m_rainbow; + helper::esp::settings::edit::vars::m_vars.m_rainbow_toggle = &helper::esp::vars::m_vars.m_current->m_skeleton_bones_rainbow.m_rainbow_toggle; + }).add_requirement([] { return helper::esp::vars::m_vars.m_current->m_ped; })); + + add_option(submenu_option("Skeleton - Joints") + .add_translate() + .add_submenu() + .add_click_this([] (submenu_option* option) { + helper_esp_settings_edit_menu::get()->set_name(option->get_name().get(), false, false); + helper::esp::settings::edit::vars::m_vars.m_color = &helper::esp::vars::m_vars.m_current->m_skeleton_joints_color; + helper::esp::settings::edit::vars::m_vars.m_rainbow = &helper::esp::vars::m_vars.m_current->m_skeleton_joints_rainbow.m_rainbow; + helper::esp::settings::edit::vars::m_vars.m_rainbow_toggle = &helper::esp::vars::m_vars.m_current->m_skeleton_joints_rainbow.m_rainbow_toggle; + }).add_requirement([] { return helper::esp::vars::m_vars.m_current->m_ped; })); + + /*add_option(submenu_option("Weapon") + .add_translate() + .add_submenu() + .add_click_this([] (submenu_option* option) { + helper_esp_settings_edit_menu::get()->set_name(option->get_name().get(), false, false); + helper::esp::settings::edit::vars::m_vars.m_color = &helper::esp::vars::m_vars.m_current->m_weapon_color; + helper::esp::settings::edit::vars::m_vars.m_rainbow = &helper::esp::vars::m_vars.m_current->m_weapon_rainbow.m_rainbow; + helper::esp::settings::edit::vars::m_vars.m_rainbow_toggle = &helper::esp::vars::m_vars.m_current->m_weapon_rainbow.m_rainbow_toggle; + }).add_requirement([] { return helper::esp::vars::m_vars.m_current->m_ped; }));*/ + + add_option(submenu_option("Snapline") + .add_translate() + .add_submenu() + .add_click_this([] (submenu_option* option) { + helper_esp_settings_edit_menu::get()->set_name(option->get_name().get(), false, false); + helper::esp::settings::edit::vars::m_vars.m_color = &helper::esp::vars::m_vars.m_current->m_snapline_color; + helper::esp::settings::edit::vars::m_vars.m_rainbow = &helper::esp::vars::m_vars.m_current->m_snapline_rainbow.m_rainbow; + helper::esp::settings::edit::vars::m_vars.m_rainbow_toggle = &helper::esp::vars::m_vars.m_current->m_snapline_rainbow.m_rainbow_toggle; + })); +} + +void helper_esp_settings_menu::update() {} + +void helper_esp_settings_menu::update_once() {} + +void helper_esp_settings_menu::feature_update() {} + +helper_esp_settings_menu* g_instance; +helper_esp_settings_menu* helper_esp_settings_menu::get() { + if (g_instance == nullptr) { + g_instance = new helper_esp_settings_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings.h b/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings.h new file mode 100644 index 0000000..1ba1abd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings.h @@ -0,0 +1,22 @@ +#pragma once +#include "menu/base/submenu.h" + +class helper_esp_settings_menu : public menu::submenu::submenu { +public: + static helper_esp_settings_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + helper_esp_settings_menu() + : menu::submenu::submenu() {} +}; + +namespace helper::esp::settings::vars { + struct variables { + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings_edit.cpp b/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings_edit.cpp new file mode 100644 index 0000000..c56b00b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings_edit.cpp @@ -0,0 +1,72 @@ +#include "helper_esp_settings_edit.h" +#include "menu/base/submenu_handler.h" +#include "helper_esp_settings.h" +#include "../../helper/helper_color.h" +#include "menu/base/util/instructionals.h" +#include "../helper_rainbow.h" + +using namespace helper::esp::settings::edit::vars; + +namespace helper::esp::settings::edit::vars { + variables m_vars; +} + +void helper_esp_settings_edit_menu::load() { + set_parent(); + set_default_instructionals(false); + + add_string("Edit Color"); + add_string("Toggle Rainbow"); +} + +void helper_esp_settings_edit_menu::update() { + if (menu::base::get_current_option() == 0) { + instructionals::standard(false, false, false); + } else { + instructionals::rainbow(); + + if (menu::input::is_just_pressed(false, ControlFrontendX)) { + helper::rainbow::vars::m_vars.m_rainbow = m_vars.m_rainbow; + helper_rainbow_menu::get()->set_parent(); + menu::submenu::handler::set_submenu(helper_rainbow_menu::get()); + } + } +} + +void helper_esp_settings_edit_menu::update_once() { + clear_options(0); + + add_option(submenu_option(get_string("Edit Color")) + .add_submenu() + .add_click([=] { + helper_color_menu::get()->set_name(get_name().get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = m_vars.m_color; + helper::color::vars::m_vars.m_callback = [] {}; + }) + .add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, m_vars.m_color)); + + add_option(toggle_option(get_string("Toggle Rainbow")) + .add_toggle(*m_vars.m_rainbow_toggle) + .add_click([] { + m_vars.m_rainbow->toggle(*m_vars.m_rainbow_toggle); + if (*m_vars.m_rainbow_toggle) { + m_vars.m_rainbow->add(m_vars.m_color); + } else { + m_vars.m_rainbow->remove(m_vars.m_color); + } + })); +} + +void helper_esp_settings_edit_menu::feature_update() {} + +helper_esp_settings_edit_menu* g_instance; +helper_esp_settings_edit_menu* helper_esp_settings_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new helper_esp_settings_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings_edit.h b/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings_edit.h new file mode 100644 index 0000000..2e88447 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/esp/helper_esp_settings_edit.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/rainbow.h" + +class helper_esp_settings_edit_menu : public menu::submenu::submenu { +public: + static helper_esp_settings_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + helper_esp_settings_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace helper::esp::settings::edit::vars { + struct variables { + color_rgba* m_color; + bool* m_rainbow_toggle; + menu::rainbow* m_rainbow; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/helper_color.cpp b/GTAV/src/menu/base/submenus/main/helper/helper_color.cpp new file mode 100644 index 0000000..7d1650a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/helper_color.cpp @@ -0,0 +1,143 @@ +#include "helper_color.h" +#include "menu/base/submenu_handler.h" +#include "../../main.h" +#include "../settings/color/color_sync.h" +#include "color/helper_color_preset.h" + +using namespace helper::color::vars; + +namespace helper::color::vars { + variables m_vars; + + scroll_struct type[] = { + { localization("RGBA", true), 0 }, + { localization("HSVA", true), 0 }, + }; +} + +void helper_color_menu::load() { + set_name("Color", false, false); + set_parent(); + + // [s] Presets + // [s] Sync With... + // Open Color Picker + // ~ Custom Editor ~ + // Type + // ... + // + + add_option(submenu_option("Presets") + .add_translate() + .add_submenu() + .add_click([] { helper::color::preset::vars::m_vars.m_color = m_vars.m_color; })); + + add_option(submenu_option("Sync With...") + .add_translate() + .add_submenu() + .add_click([] { settings::color::sync::vars::m_vars.m_color = m_vars.m_color; })); + + add_option(button_option("Open Color Picker") + .add_translate() + .add_click([this] { + menu::input::push([this] { + menu::input::color(m_vars.m_color); + m_vars.m_callback(); + }); + })); + + add_option(break_option("Custom Editor") + .add_translate()); + + add_option(scroll_option(SCROLL, "Color Format") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(type), type) + .add_click([this] { update_once(); }) + .add_hover([] { menu::renderer::render_color_preview(*m_vars.m_color); })); + + add_string("[R]ed"); + add_string("[G]reen"); + add_string("[B]lue"); + add_string("[A]lpha"); + add_string("[H]ue"); + add_string("[S]aturation"); + add_string("[V]alue"); +} + +void helper_color_menu::update() {} + +void helper_color_menu::update_once() { + clear_options(5); + + // RGBA + if (m_vars.m_type == 0) { + add_option(number_option(SCROLL, get_string("[R]ed")) + .add_number(m_vars.m_color->r, "%i", 1).add_min(0).add_max(255).can_loop() + .add_hover([] { menu::renderer::render_color_preview(*m_vars.m_color); }) + .add_click(m_vars.m_callback)); + + add_option(number_option(SCROLL, get_string("[G]reen")) + .add_number(m_vars.m_color->g, "%i", 1).add_min(0).add_max(255).can_loop() + .add_hover([] { menu::renderer::render_color_preview(*m_vars.m_color); }) + .add_click(m_vars.m_callback)); + + add_option(number_option(SCROLL, get_string("[B]lue")) + .add_number(m_vars.m_color->b, "%i", 1).add_min(0).add_max(255).can_loop() + .add_hover([] { menu::renderer::render_color_preview(*m_vars.m_color); }) + .add_click(m_vars.m_callback)); + + add_option(number_option(SCROLL, get_string("[A]lpha")) + .add_number(m_vars.m_color->a, "%i", 1).add_min(0).add_max(255).can_loop() + .add_hover([] { menu::renderer::render_color_preview(*m_vars.m_color); }) + .add_click(m_vars.m_callback)); + + return; + } + + m_vars.m_hsv = menu::renderer::rgb_to_hsv(*m_vars.m_color); + + m_vars.m_hsv.s *= 100.f; + m_vars.m_hsv.v *= 100.f; + + add_option(number_option(SCROLL, get_string("[H]ue")) + .add_number(m_vars.m_hsv.h, "%.2f", 0.01f).add_min(0.f).add_max(360.f).set_scroll_speed(0) + .add_click([] { + *m_vars.m_color = menu::renderer::hsv_to_rgb(m_vars.m_hsv.h, m_vars.m_hsv.s / 100.f, m_vars.m_hsv.v / 100.f, m_vars.m_color->a); + m_vars.m_callback(); + }) + .add_hover([] { menu::renderer::render_color_preview(*m_vars.m_color); })); + + add_option(number_option(SCROLL, get_string("[S]aturation")) + .add_number(m_vars.m_hsv.s, "%.2f", 0.01f).add_min(0.f).add_max(100.f).set_scroll_speed(0) + .add_click([] { + *m_vars.m_color = menu::renderer::hsv_to_rgb(m_vars.m_hsv.h, m_vars.m_hsv.s / 100.f, m_vars.m_hsv.v / 100.f, m_vars.m_color->a); + m_vars.m_callback(); + }) + .add_hover([] { menu::renderer::render_color_preview(*m_vars.m_color); })); + + add_option(number_option(SCROLL, get_string("[V]alue")) + .add_number(m_vars.m_hsv.v, "%.2f", 0.01f).add_min(0.f).add_max(100.f).set_scroll_speed(0) + .add_click([] { + *m_vars.m_color = menu::renderer::hsv_to_rgb(m_vars.m_hsv.h, m_vars.m_hsv.s / 100.f, m_vars.m_hsv.v / 100.f, m_vars.m_color->a); + m_vars.m_callback(); + }) + .add_hover([] { menu::renderer::render_color_preview(*m_vars.m_color); })); + + add_option(number_option(SCROLL, get_string("[A]lpha")) + .add_number(m_vars.m_color->a, "%i", 1).add_min(0).add_max(255).can_loop() + .add_hover([] { menu::renderer::render_color_preview(*m_vars.m_color); }) + .add_click(m_vars.m_callback)); +} + +void helper_color_menu::feature_update() {} + +helper_color_menu* g_instance; +helper_color_menu* helper_color_menu::get() { + if (g_instance == nullptr) { + g_instance = new helper_color_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/helper_color.h b/GTAV/src/menu/base/submenus/main/helper/helper_color.h new file mode 100644 index 0000000..6fc7129 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/helper_color.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" +#include + +class helper_color_menu : public menu::submenu::submenu { +public: + static helper_color_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + helper_color_menu() + : menu::submenu::submenu() {} +}; + +namespace helper::color::vars { + struct variables { + int m_type; + color_rgba* m_color; + color_hsv m_hsv; + + std::function m_callback = []() {}; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/helper_esp.cpp b/GTAV/src/menu/base/submenus/main/helper/helper_esp.cpp new file mode 100644 index 0000000..6e5f3eb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/helper_esp.cpp @@ -0,0 +1,297 @@ +#include "helper_esp.h" +#include "menu/base/submenu_handler.h" +#include "esp/helper_esp_settings.h" +#include "util/caller.h" +#include "rage/engine.h" + +using namespace helper::esp::vars; + +namespace helper::esp::vars { + variables m_vars; + + scroll_struct name_types[] = { + { localization("Without Distance", true), 0 }, + { localization("With Distance", true), 0 }, + }; + + void name_esp(esp_context context, Entity entity, std::string name_override) { + math::vector3 coords = native::get_entity_coords(entity, false); + if (!coords.is_null()) { + math::vector2 screen_coords; + if (native::get_screen_coord_from_world_coord(coords.x, coords.y, coords.z, &screen_coords.x, &screen_coords.y)) { + native::set_draw_origin(coords.x, coords.y, coords.z, false); + + if (*(uint32_t*)(global::vars::g_draw_origin_index) != 0xFFFFFFFF) { + screen_coords = { 0.f, 0.f }; + } + + float x_offset = 0.002f; + float text_height = 0.2f; + float height = (text_height / 10.f); + + std::string text = ""; + + if (name_override.empty()) { + text = util::va::va("%X", native::get_entity_model(entity)); + } else { + text = name_override; + } + + float width = menu::renderer::calculate_string_width(text, 0, text_height) + (x_offset * 2.f); + menu::renderer::draw_rect({ screen_coords.x - (width * 0.5f), screen_coords.y }, { width, height }, context.m_name_bg_color); + menu::renderer::draw_text(text, { screen_coords.x, screen_coords.y + 0.002f }, text_height, 0, context.m_name_text_color, JUSTIFY_CENTER); + + // distance + if (context.m_name_type == 1) { + text = util::va::va("%.0fm", coords.get_distance(menu::player::get_local_player().m_coords)); + + width = menu::renderer::calculate_string_width(text, 0, text_height) + (x_offset * 2.f); + float new_y = screen_coords.y + height; + menu::renderer::draw_rect({ screen_coords.x - (width * 0.5f), new_y }, { width, height }, context.m_name_bg_color); + menu::renderer::draw_text(text, { screen_coords.x, new_y + 0.002f }, text_height, 0, context.m_name_text_color, JUSTIFY_CENTER); + } + + native::clear_draw_origin(); + } + } + } + + void snapline_esp(esp_context context, Entity entity) { + math::vector3 coords = native::get_entity_coords(entity, false); + if (!coords.is_null()) { + menu::renderer::draw_line(menu::player::get_local_player().m_coords, coords, context.m_snapline_color); + } + } + + void _2d_esp(esp_context context, Entity entity, int type) { + // 0 = box, 1 = corners + } + + void _3d_esp(esp_context context, Entity entity, int type) { + // 0 = box, 1= axis + math::vector3 coords = native::get_entity_coords(entity, false); + if (!coords.is_null()) { + math::vector3 min_dimensions; + math::vector3 max_dimensions; + native::get_model_dimensions(native::get_entity_model(entity), &min_dimensions, &max_dimensions); + + math::vector3 diameter = { max_dimensions.x - min_dimensions.x, max_dimensions.y - min_dimensions.y, max_dimensions.z - min_dimensions.z }; + math::vector3 radius = { diameter.x / 2.f, diameter.y / 2.f, diameter.z / 2.f }; + + if (type == 0) { + math::vector3 FACE_UL = native::get_offset_from_entity_in_world_coords(entity, radius.x * -1, radius.y, radius.z); + math::vector3 FACE_UR = native::get_offset_from_entity_in_world_coords(entity, radius.x, radius.y, radius.z); + math::vector3 FACE_BL = native::get_offset_from_entity_in_world_coords(entity, radius.x * -1, radius.y, radius.z * -1); + math::vector3 FACE_BR = native::get_offset_from_entity_in_world_coords(entity, radius.x, radius.y, radius.z * -1); + + math::vector3 BACK_UL = native::get_offset_from_entity_in_world_coords(entity, radius.x * -1, radius.y * -1, radius.z); + math::vector3 BACK_UR = native::get_offset_from_entity_in_world_coords(entity, radius.x, radius.y * -1, radius.z); + math::vector3 BACK_BL = native::get_offset_from_entity_in_world_coords(entity, radius.x * -1, radius.y * -1, radius.z * -1); + math::vector3 BACK_BR = native::get_offset_from_entity_in_world_coords(entity, radius.x, radius.y * -1, radius.z * -1); + + // Poles + menu::renderer::draw_line(FACE_BL, FACE_UL, context.m_3d_box_color); + menu::renderer::draw_line(FACE_BR, FACE_UR, context.m_3d_box_color); + menu::renderer::draw_line(BACK_BL, BACK_UL, context.m_3d_box_color); + menu::renderer::draw_line(BACK_BR, BACK_UR, context.m_3d_box_color); + menu::renderer::draw_line(FACE_UL, FACE_UR, context.m_3d_box_color); + menu::renderer::draw_line(FACE_BL, FACE_BR, context.m_3d_box_color); + menu::renderer::draw_line(BACK_UL, BACK_UR, context.m_3d_box_color); + menu::renderer::draw_line(BACK_BL, BACK_BR, context.m_3d_box_color); + + // Bridges + menu::renderer::draw_line(FACE_UL, BACK_UL, context.m_3d_box_color); + menu::renderer::draw_line(FACE_UR, BACK_UR, context.m_3d_box_color); + menu::renderer::draw_line(FACE_BL, BACK_BL, context.m_3d_box_color); + menu::renderer::draw_line(FACE_BR, BACK_BR, context.m_3d_box_color); + + // Inner Bridges + menu::renderer::draw_line(coords, FACE_UL, context.m_3d_box_color); + menu::renderer::draw_line(coords, FACE_UR, context.m_3d_box_color); + menu::renderer::draw_line(coords, FACE_BL, context.m_3d_box_color); + menu::renderer::draw_line(coords, FACE_BR, context.m_3d_box_color); + menu::renderer::draw_line(coords, BACK_UL, context.m_3d_box_color); + menu::renderer::draw_line(coords, BACK_UR, context.m_3d_box_color); + menu::renderer::draw_line(coords, BACK_BL, context.m_3d_box_color); + menu::renderer::draw_line(coords, BACK_BR, context.m_3d_box_color); + return; + } + + if (type == 1) { + math::vector3 X_L = native::get_offset_from_entity_in_world_coords(entity, (diameter.x * 2.f) * -1, 0, 0); + math::vector3 X_R = native::get_offset_from_entity_in_world_coords(entity, (diameter.x * 2.f), 0, 0); + math::vector3 Y_F = native::get_offset_from_entity_in_world_coords(entity, 0, (diameter.y * 2.f), 0); + math::vector3 Y_B = native::get_offset_from_entity_in_world_coords(entity, 0, (diameter.y * 2.f) * -1, 0); + math::vector3 Z_U = native::get_offset_from_entity_in_world_coords(entity, 0, 0, 500); + math::vector3 Z_D = native::get_offset_from_entity_in_world_coords(entity, 0, 0, -500); + + menu::renderer::draw_line(X_L, X_R, { 255, 0, 0, 255 }); + menu::renderer::draw_line(Y_F, Y_B, { 0, 255, 0, 255 }); + menu::renderer::draw_line(Z_U, Z_D, { 0, 0, 255, 255 }); + return; + } + } + } + + void draw_bone(Entity entity, int first, int second, color_rgba color) { + math::vector3 first_bone = native::get_ped_bone_coords(entity, first, 0.f, 0.f, 0.f); + math::vector3 second_bone = native::get_ped_bone_coords(entity, second, 0.f, 0.f, 0.f); + + if (!first_bone.is_null() && !second_bone.is_null()) { + float fx, fy, sx, sy; + if (native::get_screen_coord_from_world_coord(first_bone.x, first_bone.y, first_bone.z, &fx, &fy) + && native::get_screen_coord_from_world_coord(second_bone.x, second_bone.y, second_bone.z, &sx, &sy)) { + menu::renderer::draw_line_2d({ fx, fy, 0.f }, { sx, sy, 0.f }, color); + } + } + } + + void draw_joint(Entity entity, int bone, color_rgba color) { + math::vector3 coords = native::get_ped_bone_coords(entity, bone, 0.f, 0.f, 0.f); + if (!coords.is_null()) { + float x, y; + if (native::get_screen_coord_from_world_coord(coords.x, coords.y, coords.z, &x, &y)) { + native::draw_marker(28, coords.x, coords.y, coords.z, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.03f, 0.03f, 0.03f, color.r, color.g, color.b, color.a, 0, 0, 0, 0, 0, 0, 0); + } + } + } + + void draw_joint2(Entity entity, int first, int second, color_rgba color, bool skip_first = false, bool skip_second = false) { + math::vector3 first_bone = native::get_ped_bone_coords(entity, first, 0.f, 0.f, 0.f); + math::vector3 second_bone = native::get_ped_bone_coords(entity, second, 0.f, 0.f, 0.f); + + if (!first_bone.is_null() && !second_bone.is_null()) { + float x, y; + if (native::get_screen_coord_from_world_coord(first_bone.x, first_bone.y, first_bone.z, &x, &y)) { + math::vector3 mid; + mid.x = (first_bone.x + second_bone.x) / 2.f; + mid.y = (first_bone.y + second_bone.y) / 2.f; + mid.z = (first_bone.z + second_bone.z) / 2.f; + + if (!skip_first) native::draw_marker(28, first_bone.x, first_bone.y, first_bone.z, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.03f, 0.03f, 0.03f, color.r, color.g, color.b, color.a, 0, 0, 0, 0, 0, 0, 0); + if (!skip_second) native::draw_marker(28, second_bone.x, second_bone.y, second_bone.z, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.03f, 0.03f, 0.03f, color.r, color.g, color.b, color.a, 0, 0, 0, 0, 0, 0, 0); + native::draw_marker(28, mid.x, mid.y, mid.z, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.03f, 0.03f, 0.03f, color.r, color.g, color.b, color.a, 0, 0, 0, 0, 0, 0, 0); + } + } + } + + void skeleton_esp(esp_context context, Entity entity, int type) { + // 0 = bones, 1 = joints + math::vector3 coords = native::get_entity_coords(entity, false); + if (!coords.is_null()) { + if (native::is_entity_a_ped(entity) || native::is_ped_a_player(entity)) { + if (type == 0) { + // bones + draw_bone(entity, SKEL_R_Foot, MH_R_Knee, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_R_Toe0, SKEL_R_Foot, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_L_Toe0, SKEL_L_Foot, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_L_Foot, MH_L_Knee, context.m_skeleton_bones_color); + draw_bone(entity, MH_R_Knee, SKEL_Pelvis, context.m_skeleton_bones_color); + draw_bone(entity, MH_L_Knee, SKEL_Pelvis, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_Pelvis, SKEL_Neck_1, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_Neck_1, SKEL_R_UpperArm, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_Neck_1, SKEL_L_UpperArm, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_R_UpperArm, SKEL_R_Forearm, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_L_UpperArm, SKEL_L_Forearm, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_R_Forearm, SKEL_R_Hand, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_L_Forearm, SKEL_L_Hand, context.m_skeleton_bones_color); + draw_bone(entity, SKEL_Neck_1, SKEL_Head, context.m_skeleton_bones_color); + + return; + } + + if (type == 1) { + // joints + draw_joint2(entity, SKEL_R_Foot, MH_R_Knee, context.m_skeleton_bones_color); + draw_joint2(entity, SKEL_R_Toe0, SKEL_R_Foot, context.m_skeleton_bones_color, false, true); + draw_joint2(entity, SKEL_L_Toe0, SKEL_L_Foot, context.m_skeleton_bones_color); + draw_joint2(entity, SKEL_L_Foot, MH_L_Knee, context.m_skeleton_bones_color, true, false); + draw_joint2(entity, MH_R_Knee, SKEL_Pelvis, context.m_skeleton_bones_color, true, false); + draw_joint2(entity, MH_L_Knee, SKEL_Pelvis, context.m_skeleton_bones_color, true, true); + draw_joint2(entity, SKEL_Pelvis, SKEL_Neck_1, context.m_skeleton_bones_color, true, false); + draw_joint2(entity, SKEL_Neck_1, SKEL_R_UpperArm, context.m_skeleton_bones_color, true, false); + draw_joint2(entity, SKEL_Neck_1, SKEL_L_UpperArm, context.m_skeleton_bones_color, true, false); + draw_joint2(entity, SKEL_R_UpperArm, SKEL_R_Forearm, context.m_skeleton_bones_color, true, false); + draw_joint2(entity, SKEL_L_UpperArm, SKEL_L_Forearm, context.m_skeleton_bones_color, true, false); + draw_joint2(entity, SKEL_R_Forearm, SKEL_R_Hand, context.m_skeleton_bones_color, true, false); + draw_joint2(entity, SKEL_L_Forearm, SKEL_L_Hand, context.m_skeleton_bones_color, true, false); + draw_joint2(entity, SKEL_Neck_1, SKEL_Head, context.m_skeleton_bones_color, true, false); + + return; + } + } + } + } +} + +void helper_esp_menu::load() { + set_name("ESP"); + + add_option(submenu_option("Settings") + .add_translate() + .add_submenu()); + + add_string("Toggle Name"); + //add_string("Toggle 2D - Box"); + //add_string("Toggle 2D - Corners"); + add_string("Toggle 3D - Box"); + add_string("Toggle 3D - Axis"); + add_string("Toggle Skeleton - Bones"); + add_string("Toggle Skeleton - Joints"); + //add_string("Toggle Weapon"); +} + +void helper_esp_menu::update() {} + +void helper_esp_menu::update_once() { + clear_options(1); + + if (!m_vars.m_current) { + menu::submenu::handler::set_submenu_previous(true); + return; + } + + add_option(scroll_option(TOGGLE, get_string("Toggle Name")) + .add_toggle(m_vars.m_current->m_name) + .add_scroll(m_vars.m_current->m_name_type, 0, NUMOF(name_types), name_types)); + + add_option(toggle_option(get_string("Toggle Snapline")) + .add_toggle(m_vars.m_current->m_snapline)); + + /*add_option(toggle_option(get_string("Toggle 2D - Box")) + .add_toggle(m_vars.m_current->m_2d_box)); + + add_option(toggle_option(get_string("Toggle 2D - Corners")) + .add_toggle(m_vars.m_current->m_2d_corners));*/ + + add_option(toggle_option(get_string("Toggle 3D - Box")) + .add_toggle(m_vars.m_current->m_3d_box)); + + add_option(toggle_option(get_string("Toggle 3D - Axis")) + .add_toggle(m_vars.m_current->m_3d_axis)); + + add_option(toggle_option(get_string("Toggle Skeleton - Bones")) + .add_toggle(m_vars.m_current->m_skeleton_bones) + .add_requirement([] { return m_vars.m_current->m_ped; })); + + add_option(toggle_option(get_string("Toggle Skeleton - Joints")) + .add_toggle(m_vars.m_current->m_skeleton_joints) + .add_requirement([] { return m_vars.m_current->m_ped; })); + + /*add_option(toggle_option(get_string("Toggle Weapon")) + .add_toggle(m_vars.m_current->m_weapon) + .add_requirement([] { return m_vars.m_current->m_ped; }));*/ +} + +void helper_esp_menu::feature_update() {} + +helper_esp_menu* g_instance; +helper_esp_menu* helper_esp_menu::get() { + if (g_instance == nullptr) { + g_instance = new helper_esp_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/helper_esp.h b/GTAV/src/menu/base/submenus/main/helper/helper_esp.h new file mode 100644 index 0000000..cf636bd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/helper_esp.h @@ -0,0 +1,70 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/rainbow.h" + +class helper_esp_menu : public menu::submenu::submenu { +public: + static helper_esp_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + helper_esp_menu() + : menu::submenu::submenu() {} +}; + +namespace helper::esp::vars { + struct esp_rainbow { + menu::rainbow m_rainbow; + bool m_rainbow_toggle; + }; + + struct esp_context { + bool m_ped; // enables skeleton>weapon + + bool m_name; + bool m_snapline; + bool m_2d_box; + bool m_2d_corners; + bool m_3d_box; + bool m_3d_axis; + bool m_skeleton_bones; + bool m_skeleton_joints; + bool m_weapon; + + int m_name_type; + + color_rgba m_name_text_color = color_rgba(255, 255, 255, 255); + color_rgba m_name_bg_color = color_rgba(0, 0, 0, 180); + color_rgba m_snapline_color = color_rgba(255, 0, 255, 255); + color_rgba m_2d_box_color = color_rgba(255, 0, 255, 255); + color_rgba m_2d_corners_color = color_rgba(255, 0, 255, 255); + color_rgba m_3d_box_color = color_rgba(255, 0, 255, 255); + color_rgba m_skeleton_bones_color = color_rgba(255, 0, 255, 255); + color_rgba m_skeleton_joints_color = color_rgba(255, 0, 255, 255); + color_rgba m_weapon_color = color_rgba(255, 255, 255, 255); + + esp_rainbow m_name_text_rainbow; + esp_rainbow m_name_bg_rainbow; + esp_rainbow m_snapline_rainbow; + esp_rainbow m_2d_box_rainbow; + esp_rainbow m_2d_corners_rainbow; + esp_rainbow m_3d_box_rainbow; + esp_rainbow m_skeleton_bones_rainbow; + esp_rainbow m_skeleton_joints_rainbow; + esp_rainbow m_weapon_rainbow; + }; + + struct variables { + esp_context* m_current; + }; + + void name_esp(esp_context context, Entity entity, std::string name_override = ""); + void snapline_esp(esp_context context, Entity entity); + void _2d_esp(esp_context context, Entity entity, int type); + void _3d_esp(esp_context context, Entity entity, int type); + void skeleton_esp(esp_context context, Entity entity, int type); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/helper_rainbow.cpp b/GTAV/src/menu/base/submenus/main/helper/helper_rainbow.cpp new file mode 100644 index 0000000..aae45af --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/helper_rainbow.cpp @@ -0,0 +1,77 @@ +#include "helper_rainbow.h" +#include "menu/base/submenu_handler.h" +#include "rainbow/helper_rainbow_load.h" + +using namespace helper::rainbow::vars; + +namespace helper::rainbow::vars { + variables m_vars; + + void set_color() { + if (m_vars.m_rainbow) { + m_vars.m_rainbow->m_min = m_vars.m_local_rainbow.m_min; + m_vars.m_rainbow->m_max = m_vars.m_local_rainbow.m_max; + m_vars.m_rainbow->m_steps = m_vars.m_local_rainbow.m_steps; + } + } +} + +void helper_rainbow_menu::load() { + set_name("Rainbow Config"); + + add_option(submenu_option("Save and Load") + .add_translate() + .add_click([] { helper::rainbow::config::vars::m_vars.m_rainbow = m_vars.m_rainbow; }) + .add_submenu()); + + m_vars.m_local_rainbow.add(&m_vars.m_local_color); + m_vars.m_local_rainbow.toggle(true); + + helper_rainbow_config_menu::get(); + + add_string("Minimum"); + add_string("Maximum"); + add_string("Steps"); +} + +void helper_rainbow_menu::update() { + if (m_vars.m_rainbow) { + m_vars.m_local_color = m_vars.m_rainbow->m_color; + m_vars.m_local_rainbow.m_min = m_vars.m_rainbow->m_min; + m_vars.m_local_rainbow.m_max = m_vars.m_rainbow->m_max; + m_vars.m_local_rainbow.m_steps = m_vars.m_rainbow->m_steps; + m_vars.m_local_rainbow.run(); + } +} + +void helper_rainbow_menu::update_once() { + clear_options(1); + + add_option(number_option(SCROLL, get_string("Minimum")) + .add_number(m_vars.m_local_rainbow.m_min, "%i", 1).add_min(0).add_max(255).can_loop() + .add_hover([] { menu::renderer::render_color_preview(m_vars.m_local_color.opacity(255)); }) + .add_click(set_color)); + + add_option(number_option(SCROLL, get_string("Maximum")) + .add_number(m_vars.m_local_rainbow.m_max, "%i", 1).add_min(0).add_max(255).can_loop() + .add_hover([] { menu::renderer::render_color_preview(m_vars.m_local_color.opacity(255)); }) + .add_click(set_color)); + + add_option(number_option(SCROLL, get_string("Steps")) + .add_number(m_vars.m_local_rainbow.m_steps, "%i", 1).add_min(1).add_max(255).can_loop() + .add_hover([] { menu::renderer::render_color_preview(m_vars.m_local_color.opacity(255)); }) + .add_click(set_color)); +} + +void helper_rainbow_menu::feature_update() {} + +helper_rainbow_menu* g_instance; +helper_rainbow_menu* helper_rainbow_menu::get() { + if (g_instance == nullptr) { + g_instance = new helper_rainbow_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/helper_rainbow.h b/GTAV/src/menu/base/submenus/main/helper/helper_rainbow.h new file mode 100644 index 0000000..aa1c7b5 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/helper_rainbow.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/rainbow.h" + +class helper_rainbow_menu : public menu::submenu::submenu { +public: + static helper_rainbow_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + helper_rainbow_menu() + : menu::submenu::submenu() {} +}; + +namespace helper::rainbow::vars { + struct variables { + color_rgba m_local_color; + menu::rainbow m_local_rainbow; + menu::rainbow* m_rainbow; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/rainbow/helper_rainbow_load.cpp b/GTAV/src/menu/base/submenus/main/helper/rainbow/helper_rainbow_load.cpp new file mode 100644 index 0000000..3760757 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/rainbow/helper_rainbow_load.cpp @@ -0,0 +1,115 @@ +#include "helper_rainbow_load.h" +#include "menu/base/submenu_handler.h" +#include "../helper_rainbow.h" +#include "util/log.h" +#include "util/dirs.h" +#include + +using namespace helper::rainbow::config::vars; + +namespace helper::rainbow::config::vars { + variables m_vars; + + void save_config(std::string name) { + try { + nlohmann::json json; + + std::ifstream input(util::dirs::get_path(rainbow)); + if (input.good()) { + input >> json; + input.close(); + } + + std::ofstream output(util::dirs::get_path(rainbow)); + if (output.good()) { + json[name] = nlohmann::json::array({ m_vars.m_rainbow->m_min, m_vars.m_rainbow->m_max, m_vars.m_rainbow->m_steps }); + output << json.dump(4); + output.close(); + } + } catch (std::exception& E) { + LOG_WARN("[Json] %s", E.what()); + } + } + + void load_config(std::string name) { + try { + std::ifstream input(util::dirs::get_path(rainbow)); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + if (!json[name].is_null()) { + m_vars.m_rainbow->m_min = json[name][0].get(); + m_vars.m_rainbow->m_max = json[name][1].get(); + m_vars.m_rainbow->m_steps = json[name][2].get(); + } + } + } catch (std::exception& E) { + LOG_WARN("[Json] %s", E.what()); + } + } +} + +void helper_rainbow_config_menu::load() { + set_name("Rainbow Config"); + set_parent(); + + add_option(button_option("Save Rainbow Config") + .add_translate() + .add_keyboard("Enter rainbow config name", 30, [](button_option* option, const char* result) { + save_config(result); + })); + + add_option(break_option("Rainbows") + .add_translate()); + + add_string("~m~None"); +} + +void helper_rainbow_config_menu::update() {} + +void helper_rainbow_config_menu::update_once() { + clear_options(2); + + try { + std::ifstream input(util::dirs::get_path(rainbow)); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + if (json.size() > 0) { + std::vector names; + + for (auto& it = json.begin(); it != json.end(); ++it) { + names.push_back(it.key()); + } + + for (std::string name : names) { + add_option(button_option(name) + .add_click([=] { load_config(name); })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } +} + +void helper_rainbow_config_menu::feature_update() {} + +helper_rainbow_config_menu* g_instance; +helper_rainbow_config_menu* helper_rainbow_config_menu::get() { + if (g_instance == nullptr) { + g_instance = new helper_rainbow_config_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/helper/rainbow/helper_rainbow_load.h b/GTAV/src/menu/base/submenus/main/helper/rainbow/helper_rainbow_load.h new file mode 100644 index 0000000..1f929cd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/helper/rainbow/helper_rainbow_load.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/rainbow.h" + +class helper_rainbow_config_menu : public menu::submenu::submenu { +public: + static helper_rainbow_config_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + helper_rainbow_config_menu() + : menu::submenu::submenu() {} +}; + +namespace helper::rainbow::config::vars { + struct variables { + menu::rainbow* m_rainbow; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc.cpp b/GTAV/src/menu/base/submenus/main/misc.cpp new file mode 100644 index 0000000..16782bf --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc.cpp @@ -0,0 +1,127 @@ +#include "misc.h" +#include "menu/base/submenu_handler.h" +#include "../main.h" +#include "misc/scripthook.h" +#include "misc/misc_camera.h" +#include "menu/base/util/panels.h" +#include "misc/misc_radio.h" +#include "misc/hud.h" +#include "misc/visions.h" +#include "misc/display.h" +#include "misc/misc_panels.h" +#include "misc/misc_disables.h" +#include "misc/misc_swaps.h" +#include "misc/dispatch.h" + +using namespace misc::vars; + +namespace misc::vars { + variables m_vars; + + scroll_struct metric[] = { + { localization("Metric", true), 0 }, + { localization("Imperial", true), 1 } + }; +} + +void misc_menu::load() { + set_name("Miscellaneous"); + set_parent(); + + add_option(submenu_option("ScriptHook") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Camera") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Radio") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("HUD") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Visions") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Stacked Display") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Panels") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Disables") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Swaps") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Dispatch") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(scroll_option(SCROLL, "Speed Calculations") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_metric_system, 0, NUMOF(metric), metric) + .add_click([] { + global::vars::g_selected_metric_system = { m_vars.m_metric_system == 0 ? 2.236936f : 3.6f, m_vars.m_metric_system == 0 ? "MPH" : "KPH" }; + }) + .add_savable(get_submenu_name_stack()) + .add_tooltip("Metric to be used in features such as Speedometer")); + + add_option(toggle_option("Rockstar Developer Perks") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rockstar_developer_perks) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Decreased Graphics") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_decreased_graphics) + .add_click([] { + if (!m_vars.m_decreased_graphics) { + native::set_focus_entity(menu::player::get_local_player().m_ped); + } + }).add_savable(get_submenu_name_stack())); + + add_option(button_option("Bail") + .add_translate().add_hotkey() + .add_click([] { + if (is_valid_ptr(*(uint64_t*)(global::vars::g_network_player_manager))) { + native::network_bail(0, 0, 0); + } + }) + .add_tooltip("Bail to singleplayer")); +} + +void misc_menu::update() {} + +void misc_menu::update_once() { + for (menu::panels::panel_parent* panel : menu::panels::get_panel_manager()->get_panels()) { + panel->m_render = false; + } +} + +void misc_menu::feature_update() { + if (m_vars.m_decreased_graphics) { + native::set_focus_area(9999.f, 9999.f, 9999.f, 0.f, 0.f, 0.f); + } +} + +misc_menu* g_instance; +misc_menu* misc_menu::get() { + if (g_instance == nullptr) { + g_instance = new misc_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/misc.h b/GTAV/src/menu/base/submenus/main/misc.h new file mode 100644 index 0000000..39106cd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class misc_menu : public menu::submenu::submenu { +public: + static misc_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + misc_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::vars { + struct variables { + bool m_rockstar_developer_perks; + bool m_decreased_graphics; + + int m_metric_system; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/camera/aerial_camera.cpp b/GTAV/src/menu/base/submenus/main/misc/camera/aerial_camera.cpp new file mode 100644 index 0000000..b4d1144 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/camera/aerial_camera.cpp @@ -0,0 +1,59 @@ +#include "aerial_camera.h" +#include "menu/base/submenu_handler.h" +#include "../misc_camera.h" + +using namespace misc::camera::aerial::vars; + +namespace misc::camera::aerial::vars { + variables m_vars; +} + +void aerial_camera_menu::load() { + set_name("Aerial Camera"); + set_parent(); + + add_option(toggle_option("Toggle Aerial Camera") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_toggle_camera) + .add_click([] { + if (!native::does_cam_exist(m_vars.m_aerial_cam)) { + m_vars.m_aerial_cam = native::create_camera(26379945, true); + native::set_cam_active(m_vars.m_aerial_cam, true); + native::render_script_cams(true, true, 1000, true, false, 0); + } else { + native::destroy_cam(m_vars.m_aerial_cam, true); + native::render_script_cams(false, true, 1000, true, false, 0); + } + }).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Camera Distance") + .add_translate() + .add_number(m_vars.m_distance, "%i", 1).add_min(0).add_max(300).set_scroll_speed(10) + .add_savable(get_submenu_name_stack())); +} + +void aerial_camera_menu::update() {} + +void aerial_camera_menu::update_once() {} + +void aerial_camera_menu::feature_update() { + if (m_vars.m_toggle_camera) { + if (native::does_cam_exist(m_vars.m_aerial_cam)) { + math::vector3 coords = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_entity, 0, (float)(m_vars.m_distance / 2) * -1, (float)m_vars.m_distance); + coords.z = menu::player::get_local_player().m_coords.z + m_vars.m_distance; + native::set_cam_coord(m_vars.m_aerial_cam, coords.x, coords.y, coords.z); + native::point_cam_at_entity(m_vars.m_aerial_cam, menu::player::get_local_player().m_entity, 0, 0, 0, true); + } + } +} + +aerial_camera_menu* g_instance; +aerial_camera_menu* aerial_camera_menu::get() { + if (g_instance == nullptr) { + g_instance = new aerial_camera_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/misc/camera/aerial_camera.h b/GTAV/src/menu/base/submenus/main/misc/camera/aerial_camera.h new file mode 100644 index 0000000..c589473 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/camera/aerial_camera.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class aerial_camera_menu : public menu::submenu::submenu { +public: + static aerial_camera_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + aerial_camera_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::camera::aerial::vars { + struct variables { + bool m_toggle_camera; + int m_distance = 100; + Cam m_aerial_cam; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/dispatch.cpp b/GTAV/src/menu/base/submenus/main/misc/dispatch.cpp new file mode 100644 index 0000000..71b484e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/dispatch.cpp @@ -0,0 +1,143 @@ +#include "dispatch.h" +#include "menu/base/submenu_handler.h" +#include "../misc.h" + +using namespace misc::dispatch::vars; + +namespace misc::dispatch::vars { + variables m_vars; + + bool is_toggled(eDispatchType service) { + if (global::vars::g_dispatch_service_table) { + auto Table = *(uint64_t*)(global::vars::g_dispatch_service_table + (service * 8)); + if (Table) { + return *(bool*)(Table + 0x20); + } + } + + return false; + } + + void set_toggle(eDispatchType service, bool toggle) { + if (global::vars::g_dispatch_service_table) { + uint64_t table = *(uint64_t*)(global::vars::g_dispatch_service_table + (service * 8)); + if (table) { + *(bool*)(table + 0x20) = !toggle; + } + } + } +} + +void dispatch_menu::load() { + set_name("Dispatch"); + set_parent(); + + add_option(toggle_option("Disable Police Automobile") + .add_translate() + .add_toggle(m_vars.m_disable_police_automobile) + .add_click([] { set_toggle(DT_PoliceAutomobile, m_vars.m_disable_police_automobile); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Police Helicopter") + .add_translate() + .add_toggle(m_vars.m_disable_police_helicopter) + .add_click([] { set_toggle(DT_PoliceHelicopter, m_vars.m_disable_police_helicopter); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Police Riders") + .add_translate() + .add_toggle(m_vars.m_disable_police_riders) + .add_click([] { set_toggle(DT_PoliceRiders, m_vars.m_disable_police_riders); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Police Vehicle Request") + .add_translate() + .add_toggle(m_vars.m_disable_police_vehicle_request) + .add_click([] { set_toggle(DT_PoliceVehicleRequest, m_vars.m_disable_police_vehicle_request); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Police Road Block") + .add_translate() + .add_toggle(m_vars.m_disable_police_roadblock) + .add_click([] { set_toggle(DT_PoliceRoadBlock, m_vars.m_disable_police_roadblock); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Police Boat") + .add_translate() + .add_toggle(m_vars.m_disable_police_boat) + .add_click([] { set_toggle(DT_PoliceBoat, m_vars.m_disable_police_boat); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Swat Automobile") + .add_translate() + .add_toggle(m_vars.m_disable_swat_automobile) + .add_click([] { set_toggle(DT_SwatAutomobile, m_vars.m_disable_swat_automobile); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Swat Helicopter") + .add_translate() + .add_toggle(m_vars.m_disable_swat_helicopter) + .add_click([] { set_toggle(DT_SwatHelicopter, m_vars.m_disable_swat_helicopter); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Fire Department") + .add_translate() + .add_toggle(m_vars.m_disable_fire_department) + .add_click([] { set_toggle(DT_FireDepartment, m_vars.m_disable_fire_department); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Ambulance Department") + .add_translate() + .add_toggle(m_vars.m_disable_ambulance_department) + .add_click([] { set_toggle(DT_AmbulanceDepartment, m_vars.m_disable_ambulance_department); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Gangs") + .add_translate() + .add_toggle(m_vars.m_disable_gangs) + .add_click([] { set_toggle(DT_Gangs, m_vars.m_disable_gangs); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Army Vehicle") + .add_translate() + .add_toggle(m_vars.m_disable_army_vehicle) + .add_click([] { set_toggle(DT_ArmyVehicle, m_vars.m_disable_army_vehicle); }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Bikers") + .add_translate() + .add_toggle(m_vars.m_disable_bikers) + .add_click([] { set_toggle(DT_BikerBackup, m_vars.m_disable_bikers); }) + .add_savable(get_submenu_name_stack())); +} + +void dispatch_menu::update() {} + +void dispatch_menu::update_once() { + m_vars.m_disable_police_automobile = !is_toggled(DT_PoliceAutomobile); + m_vars.m_disable_police_helicopter = !is_toggled(DT_PoliceHelicopter); + m_vars.m_disable_police_riders = !is_toggled(DT_PoliceRiders); + m_vars.m_disable_police_vehicle_request = !is_toggled(DT_PoliceVehicleRequest); + m_vars.m_disable_police_roadblock = !is_toggled(DT_PoliceRoadBlock); + m_vars.m_disable_police_boat = !is_toggled(DT_PoliceBoat); + m_vars.m_disable_swat_automobile = !is_toggled(DT_SwatAutomobile); + m_vars.m_disable_swat_helicopter = !is_toggled(DT_SwatHelicopter); + m_vars.m_disable_fire_department = !is_toggled(DT_FireDepartment); + m_vars.m_disable_ambulance_department = !is_toggled(DT_AmbulanceDepartment); + m_vars.m_disable_gangs = !is_toggled(DT_Gangs); + m_vars.m_disable_army_vehicle = !is_toggled(DT_ArmyVehicle); + m_vars.m_disable_bikers = !is_toggled(DT_BikerBackup); +} + +void dispatch_menu::feature_update() {} + +dispatch_menu* g_instance; +dispatch_menu* dispatch_menu::get() { + if (g_instance == nullptr) { + g_instance = new dispatch_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/misc/dispatch.h b/GTAV/src/menu/base/submenus/main/misc/dispatch.h new file mode 100644 index 0000000..c10e1eb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/dispatch.h @@ -0,0 +1,35 @@ +#pragma once +#include "menu/base/submenu.h" + +class dispatch_menu : public menu::submenu::submenu { +public: + static dispatch_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + dispatch_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::dispatch::vars { + struct variables { + bool m_disable_police_automobile; + bool m_disable_police_helicopter; + bool m_disable_police_riders; + bool m_disable_police_vehicle_request; + bool m_disable_police_roadblock; + bool m_disable_police_boat; + bool m_disable_swat_automobile; + bool m_disable_swat_helicopter; + bool m_disable_fire_department; + bool m_disable_ambulance_department; + bool m_disable_gangs; + bool m_disable_army_vehicle; + bool m_disable_bikers; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/display.cpp b/GTAV/src/menu/base/submenus/main/misc/display.cpp new file mode 100644 index 0000000..ca8d45b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/display.cpp @@ -0,0 +1,232 @@ +#include "display.h" +#include "menu/base/submenu_handler.h" +#include "../misc.h" +#include "menu/base/util/stacked_display.h" +#include "menu/base/util/timers.h" +#include "util/va.h" +#include "rage/engine.h" + +using namespace misc::display::vars; + +namespace misc::display::vars { + variables m_vars; + + scroll_struct fps[] = { + { localization("FPS", true), 0, }, + { localization("Average", true), 1, }, + { localization("Both", true), 2 }, + }; + + std::string get_next_host() { + std::vector> players; + + menu::player::for_each([&](menu::player::player_context& player) { + if (is_valid_ptr(player.m_net_player)) { + if (is_valid_ptr(player.m_net_player->m_player_info)) { + if (player.m_net_player == rage::engine::get_host_net_game_player()) return; + players.push_back({ player.m_name, player.m_net_player->m_player_info->m_host_token }); + } + } + }, true, true); + + std::sort(begin(players), end(players), [](std::pair first, std::pair second) { + return first.second < second.second; + }); + + if (players.empty()) return "N/A"; + return players[0].first; + } +} + +void display_menu::load() { + set_name("Stacked Display"); + set_parent(); + + add_option(scroll_option(TOGGLE, "FPS") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_fps) + .add_scroll(m_vars.m_fps_var, 0, NUMOF(fps), fps) + .add_click([] { + if (!m_vars.m_fps) { + menu::display::disable("SR_FPS"); + } + }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Position") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_position) + .add_click([] { + if (!m_vars.m_position) { + menu::display::disable("SR_POS"); + } + }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Free Slots") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_free_slots) + .add_click([] { + if (!m_vars.m_free_slots) { + menu::display::disable("SR_FREESLOTS"); + } + }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Modder Count") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_modder_count) + .add_click([] { + if (!m_vars.m_modder_count) { + menu::display::disable("SR_MODDERS"); + } + }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Host") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_host) + .add_click([] { + if (!m_vars.m_host) { + menu::display::disable("SR_HOST"); + } + }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Next Host") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_next_host) + .add_click([] { + if (!m_vars.m_next_host) { + menu::display::disable("SR_NHOST"); + } + }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Pools") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_entity_pools) + .add_click([] { + if (!m_vars.m_entity_pools) { + menu::display::disable("SR_AttachmentPool"); + menu::display::disable("SR_ObjectPool"); + menu::display::disable("SR_PedPool"); + menu::display::disable("SR_PickupPool"); + menu::display::disable("SR_VehiclePool"); + } + }).add_savable(get_submenu_name_stack())); + + add_string("Modders"); + add_string("Free Slots"); + add_string("Position"); + add_string("Average FPS"); + add_string("Avg"); + add_string("FPS"); + add_string("Object Pool"); + add_string("Ped Pool"); + add_string("Pickup Pool"); + add_string("Vehicle Pool"); + add_string("Camera Pool"); + add_string("Frame Count"); + add_string("Next Host"); + add_string("Host"); +} + +void display_menu::update() {} + +void display_menu::update_once() {} + +void display_menu::feature_update() { + static int timer = 0; + menu::timers::run_timed(&timer, 1000, [] { + m_vars.m_draw_fps_cache[1] = m_vars.m_draw_fps_cache[0]; + m_vars.m_draw_fps_cache[0] = native::get_frame_count(); + }); + + if (m_vars.m_fps) { + int frames = m_vars.m_draw_fps_cache[0] - m_vars.m_draw_fps_cache[1] - 1; + + if (m_vars.m_draw_fps_average_count < 900) { + m_vars.m_draw_fps_average_total += frames; + m_vars.m_draw_fps_average_count++; + } else { + m_vars.m_draw_fps_average_total = m_vars.m_draw_fps_average_count = 0; + } + + if (m_vars.m_draw_fps_average_total != 0 && m_vars.m_draw_fps_average_count != 0) { + m_vars.m_draw_fps_average = m_vars.m_draw_fps_average_total / m_vars.m_draw_fps_average_count; + } + + char buffer[50]; + if (m_vars.m_fps_var == 0) { + sprintf_s(buffer, "%s%i", frames < 60 ? "~r~" : frames > 100 ? "~g~" : "", frames); + } else if (m_vars.m_fps_var == 1) { + sprintf_s(buffer, "%s%i", m_vars.m_draw_fps_average < 60 ? "~r~" : m_vars.m_draw_fps_average > 100 ? "~g~" : "", m_vars.m_draw_fps_average); + menu::display::update("SR_FPS", get_string("Average FPS"), buffer); + return; + } else { + sprintf_s(buffer, "%s%i~w~ (%s. %s%i~w~)", frames < 60 ? "~r~" : frames > 100 ? "~g~" : "", frames, get_string("Avg").c_str(), m_vars.m_draw_fps_average < 60 ? "~r~" : m_vars.m_draw_fps_average > 100 ? "~g~" : "", m_vars.m_draw_fps_average); + } + + menu::display::update("SR_FPS", get_string("FPS"), buffer); + } + + if (m_vars.m_position) { + math::vector3 coords = menu::player::get_local_player().m_coords; + menu::display::update("SR_POS", get_string("Position"), util::va::va("[%.2f, %.2f, %.2f]", coords.x, coords.y, coords.z)); + } + + if (m_vars.m_free_slots) { + menu::display::update("SR_FREESLOTS", get_string("Free Slots"), std::to_string(32 - native::network_get_num_connected_players())); + } + + if (m_vars.m_modder_count) { + int count = 0; + + menu::player::for_each([&](menu::player::player_context& player) { + if (player.m_is_modder) count++; + }, true); + + menu::display::update("SR_MODDERS", get_string("Modders"), std::to_string(count)); + } + + if (m_vars.m_entity_pools) { + std::vector>> pool_info; + + pool_info.push_back(std::make_pair(get_string("Object Pool"), std::make_pair(global::vars::g_object_pool->m_count, global::vars::g_object_pool->m_max))); + pool_info.push_back(std::make_pair(get_string("Ped Pool"), std::make_pair(global::vars::g_ped_pool->m_count, global::vars::g_ped_pool->m_max))); + pool_info.push_back(std::make_pair(get_string("Pickup Pool"), std::make_pair(global::vars::g_pickup_pool->m_count, global::vars::g_pickup_pool->m_max))); + pool_info.push_back(std::make_pair(get_string("Vehicle Pool"), std::make_pair(global::vars::g_vehicle_pool->m_count, global::vars::g_vehicle_pool->m_max))); + + for (std::size_t i = 0; i < pool_info.size(); i++) { + std::string name = pool_info[i].first; + name.erase(remove(name.begin(), name.end(), ' '), name.end()); + menu::display::update(("SR_" + name), pool_info[i].first.c_str(), util::va::va("%i/%i", pool_info[i].second.first, pool_info[i].second.second)); + } + } + + if (m_vars.m_frame_count) { + menu::display::update("SR_FRAMECOUNT", get_string("Frame Count"), std::to_string(native::get_frame_count())); + } + + if (m_vars.m_host) { + if (rage::engine::get_host_net_game_player() && rage::engine::get_host_net_game_player()->m_player_info) { + menu::display::update("SR_HOST", get_string("Host"), rage::engine::get_host_net_game_player()->m_player_info->m_name); + } else { + menu::display::disable("SR_HOST"); + } + } + + if (m_vars.m_next_host) { + if (native::network_get_num_connected_players() > 1) { + menu::display::update("SR_NHOST", get_string("Next Host"), get_next_host()); + } else { + menu::display::disable("SR_NHOST"); + } + } +} + +display_menu* g_instance; +display_menu* display_menu::get() { + if (g_instance == nullptr) { + g_instance = new display_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/misc/display.h b/GTAV/src/menu/base/submenus/main/misc/display.h new file mode 100644 index 0000000..0feefb9 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/display.h @@ -0,0 +1,36 @@ +#pragma once +#include "menu/base/submenu.h" + +class display_menu : public menu::submenu::submenu { +public: + static display_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + display_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::display::vars { + struct variables { + bool m_fps; + bool m_position; + bool m_free_slots; + bool m_modder_count; + bool m_entity_pools; + bool m_host; + bool m_next_host; + bool m_frame_count; + + int m_fps_var; + int m_draw_fps_cache[2]; + int m_draw_fps_average = 0; + int m_draw_fps_average_total = 0; + int m_draw_fps_average_count = 0; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/hud.cpp b/GTAV/src/menu/base/submenus/main/misc/hud.cpp new file mode 100644 index 0000000..9a12f0e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/hud.cpp @@ -0,0 +1,292 @@ +#include "hud.h" +#include "menu/base/submenu_handler.h" +#include "../misc.h" +#include "../helper/helper_color.h" + +using namespace misc::hud::vars; + +namespace misc::hud::vars { + variables m_vars; + + scroll_struct hud_color_labels[] = { + { localization("Pure White", true), 0 }, + { localization("White", true), 0 }, + { localization("Black", true), 0 }, + { localization("Grey", true), 0 }, + { localization("Grey Light", true), 0 }, + { localization("Grey Dark", true), 0 }, + { localization("Red", true), 0 }, + { localization("Red Light", true), 0 }, + { localization("Red Dark", true), 0 }, + { localization("Blue", true), 0 }, + { localization("Blue Light", true), 0 }, + { localization("Blue Dark", true), 0 }, + { localization("Yellow", true), 0 }, + { localization("Yellow Light", true), 0 }, + { localization("Yellow Dark", true), 0 }, + { localization("Orange", true), 0 }, + { localization("Orange Light", true), 0 }, + { localization("Orange Dark", true), 0 }, + { localization("Green", true), 0 }, + { localization("Green Light", true), 0 }, + { localization("Green Dark", true), 0 }, + { localization("Purple", true), 0 }, + { localization("Purple Light", true), 0 }, + { localization("Purple Dark", true), 0 }, + { localization("Pink", true), 0 }, + { localization("Radar Health", true), 0 }, + { localization("Radar Armour", true), 0 }, + { localization("Radar Damage", true), 0 }, + { localization("Player 1", true), 0 }, + { localization("Player 2", true), 0 }, + { localization("Player 3", true), 0 }, + { localization("Player 4", true), 0 }, + { localization("Player 5", true), 0 }, + { localization("Player 6", true), 0 }, + { localization("Player 7", true), 0 }, + { localization("Player 8", true), 0 }, + { localization("Player 9", true), 0 }, + { localization("Player 10", true), 0 }, + { localization("Player 11", true), 0 }, + { localization("Player 12", true), 0 }, + { localization("Player 13", true), 0 }, + { localization("Player 14", true), 0 }, + { localization("Player 15", true), 0 }, + { localization("Player 16", true), 0 }, + { localization("Player 17", true), 0 }, + { localization("Player 18", true), 0 }, + { localization("Player 19", true), 0 }, + { localization("Player 20", true), 0 }, + { localization("Player 21", true), 0 }, + { localization("Player 22", true), 0 }, + { localization("Player 23", true), 0 }, + { localization("Player 24", true), 0 }, + { localization("Player 25", true), 0 }, + { localization("Player 26", true), 0 }, + { localization("Player 27", true), 0 }, + { localization("Player 28", true), 0 }, + { localization("Player 29", true), 0 }, + { localization("Player 30", true), 0 }, + { localization("Player 31", true), 0 }, + { localization("Player 32", true), 0 }, + { localization("Simple Blip Default", true), 0 }, + { localization("Menu Blue", true), 0 }, + { localization("Menu Grey Light", true), 0 }, + { localization("Menu Blue Extra Dark", true), 0 }, + { localization("Menu Yellow", true), 0 }, + { localization("Menu Yellow Dark", true), 0 }, + { localization("Menu Green", true), 0 }, + { localization("Menu Grey", true), 0 }, + { localization("Menu Grey Dark", true), 0 }, + { localization("Menu Highlight", true), 0 }, + { localization("Menu Standard", true), 0 }, + { localization("Menu Dimmed", true), 0 }, + { localization("Menu Extra Dimmed", true), 0 }, + { localization("Brief Title", true), 0 }, + { localization("Mid Grey MP", true), 0 }, + { localization("Player 1 Dark", true), 0 }, + { localization("Player 2 Dark", true), 0 }, + { localization("Player 3 Dark", true), 0 }, + { localization("Player 4 Dark", true), 0 }, + { localization("Player 5 Dark", true), 0 }, + { localization("Player 6 Dark", true), 0 }, + { localization("Player 7 Dark", true), 0 }, + { localization("Player 8 Dark", true), 0 }, + { localization("Player 9 Dark", true), 0 }, + { localization("Player 10 Dark", true), 0 }, + { localization("Player 11 Dark", true), 0 }, + { localization("Player 12 Dark", true), 0 }, + { localization("Player 13 Dark", true), 0 }, + { localization("Player 14 Dark", true), 0 }, + { localization("Player 15 Dark", true), 0 }, + { localization("Player 16 Dark", true), 0 }, + { localization("Player 17 Dark", true), 0 }, + { localization("Player 18 Dark", true), 0 }, + { localization("Player 19 Dark", true), 0 }, + { localization("Player 20 Dark", true), 0 }, + { localization("Player 21 Dark", true), 0 }, + { localization("Player 22 Dark", true), 0 }, + { localization("Player 23 Dark", true), 0 }, + { localization("Player 24 Dark", true), 0 }, + { localization("Player 25 Dark", true), 0 }, + { localization("Player 26 Dark", true), 0 }, + { localization("Player 27 Dark", true), 0 }, + { localization("Player 28 Dark", true), 0 }, + { localization("Player 29 Dark", true), 0 }, + { localization("Player 30 Dark", true), 0 }, + { localization("Player 31 Dark", true), 0 }, + { localization("Player 32 Dark", true), 0 }, + { localization("Bronze", true), 0 }, + { localization("Silver", true), 0 }, + { localization("Gold", true), 0 }, + { localization("Platinum", true), 0 }, + { localization("Gang 1", true), 0 }, + { localization("Gang 2", true), 0 }, + { localization("Gang 3", true), 0 }, + { localization("Gang 4", true), 0 }, + { localization("Same Crew", true), 0 }, + { localization("Freemode", true), 0 }, + { localization("Pause BG", true), 0 }, + { localization("Friendly", true), 0 }, + { localization("Enemy", true), 0 }, + { localization("Location", true), 0 }, + { localization("Pickup", true), 0 }, + { localization("Pause Singleplayer", true), 0 }, + { localization("Freemode Dark", true), 0 }, + { localization("Inactive Mission", true), 0 }, + { localization("Damage", true), 0 }, + { localization("Pink Light", true), 0 }, + { localization("PM Item Highlight", true), 0 }, + { localization("Script Variable", true), 0 }, + { localization("Yoga", true), 0 }, + { localization("Tennis", true), 0 }, + { localization("Golf", true), 0 }, + { localization("Shooting Range", true), 0 }, + { localization("Flight School", true), 0 }, + { localization("North Blue", true), 0 }, + { localization("Social Club", true), 0 }, + { localization("Platform Blue", true), 0 }, + { localization("Platform Green", true), 0 }, + { localization("Platform Grey", true), 0 }, + { localization("Facebook Blue", true), 0 }, + { localization("In-Game BG", true), 0 }, + { localization("Darts", true), 0 }, + { localization("Waypoint", true), 0 }, + { localization("Michael", true), 0 }, + { localization("Franklin", true), 0 }, + { localization("Trevor", true), 0 }, + { localization("Golf P1", true), 0 }, + { localization("Golf P2", true), 0 }, + { localization("Golf P3", true), 0 }, + { localization("Golf P4", true), 0 }, + { localization("Waypoint Light", true), 0 }, + { localization("Waypoint Dark", true), 0 }, + { localization("panel Light", true), 0 }, + { localization("Michael Dark", true), 0 }, + { localization("Franklin Dark", true), 0 }, + { localization("Trevor Dark", true), 0 }, + { localization("Objective Route", true), 0 }, + { localization("Pause Map Tint", true), 0 }, + { localization("Pause Deselect", true), 0 }, + { localization("PM Weapons Purchasable", true), 0 }, + { localization("PM Weapons Locked", true), 0 }, + { localization("End Screen BG", true), 0 }, + { localization("Chop", true), 0 }, + { localization("Pausemap Tint Half", true), 0 }, + { localization("North Blue Official", true), 0 }, + { localization("Script Variable 2", true), 0 }, + { localization("H", true), 0 }, + { localization("H Dark", true), 0 }, + { localization("T", true), 0 }, + { localization("T Dark", true), 0 }, + { localization("HS Hard", true), 0 }, + { localization("Controller Michael", true), 0 }, + { localization("Controller Franklin", true), 0 }, + { localization("Controller Trevor", true), 0 }, + { localization("Controller Chop", true), 0 }, + { localization("Video Editor Video", true), 0 }, + { localization("Video Editor Audio", true), 0 }, + { localization("Video Editor Text", true), 0 }, + { localization("HB Blue", true), 0 }, + { localization("HB Yellow", true), 0 }, + { localization("Video Editor Score", true), 0 }, + { localization("Video Editor Audio Fadeout", true), 0 }, + { localization("Video Editor Text Fadeout", true), 0 }, + { localization("Video Editor Score Fadeout", true), 0 }, + { localization("Heist Background", true), 0 }, + { localization("Video Editor Ambient", true), 0 }, + { localization("Video Editor Ambient Fadeout", true), 0 }, + { localization("GB", true), 0 }, + { localization("G", true), 0 }, + { localization("B", true), 0 }, + { localization("Low Flow", true), 0 }, + { localization("Low Flow Dark", true), 0 }, + { localization("G1", true), 0 }, + { localization("G2", true), 0 }, + { localization("G3", true), 0 }, + { localization("G4", true), 0 }, + { localization("G5", true), 0 }, + { localization("G6", true), 0 }, + { localization("G7", true), 0 }, + { localization("G8", true), 0 }, + { localization("G9", true), 0 }, + { localization("G10", true), 0 }, + { localization("G11", true), 0 }, + { localization("G12", true), 0 }, + { localization("G13", true), 0 }, + { localization("G14", true), 0 }, + { localization("G15", true), 0 }, + { localization("Adversary", true), 0 }, + { localization("Degen Red", true), 0 }, + { localization("Degen Yellow", true), 0 }, + { localization("Degen Green", true), 0 }, + { localization("Degen Cyan", true), 0 }, + { localization("Degen Blue", true), 0 }, + { localization("Degen Magenta", true), 0 }, + { localization("Stunt 1", true), 0 }, + { localization("Stunt 2", true), 0 }, + { localization("Special Race Series", true), 0 }, + { localization("Special Race Series Dark", true), 0 }, + { localization("CS", true), 0 }, + { localization("CS Dark", true), 0 }, + { localization("Tech Green", true), 0 }, + { localization("Tech Green Dark", true), 0 }, + { localization("Tech Red", true), 0 }, + { localization("Tech Green Very Dark", true), 0 }, + }; + + void set_color(hud_menu* _this) { + native::set_hud_colour(m_vars.m_hud, m_vars.m_color.r, m_vars.m_color.g, m_vars.m_color.b, m_vars.m_color.a); + + // Save color + util::config::write_color(_this->get_submenu_name_stack(), hud_color_labels[m_vars.m_hud].m_name.get_original(), m_vars.m_color); + } +} + +void hud_menu::load() { + set_name("HUD"); + set_parent(); + + native::get_hud_colour(m_vars.m_hud, &m_vars.m_color.r, &m_vars.m_color.g, &m_vars.m_color.b, &m_vars.m_color.a); + + add_option(scroll_option(SCROLL, "HUD") + .add_translate() + .add_scroll(m_vars.m_hud, 0, NUMOF(hud_color_labels), hud_color_labels) + .add_click([] { native::get_hud_colour(m_vars.m_hud, &m_vars.m_color.r, &m_vars.m_color.g, &m_vars.m_color.b, &m_vars.m_color.a); })); + + add_option(submenu_option("Edit Color") + .add_translate() + .add_submenu() + .add_click([this] { + helper_color_menu::get()->set_name(hud_color_labels[m_vars.m_hud].m_name.get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = &m_vars.m_color; + helper::color::vars::m_vars.m_callback = [this] { set_color(this); }; + }) + .add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, &m_vars.m_color)); + + // Load colors + for (int i = 0; i < NUMOF(hud_color_labels); i++) { + color_rgba color; + if (util::config::read_color(get_submenu_name_stack(), hud_color_labels[i].m_name.get_original(), &color)) { + native::set_hud_colour(m_vars.m_hud, color.r, color.g, color.b, color.a); + } + } +} + +void hud_menu::update() {} + +void hud_menu::update_once() {} + +void hud_menu::feature_update() {} + +hud_menu* g_instance; +hud_menu* hud_menu::get() { + if (g_instance == nullptr) { + g_instance = new hud_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/hud.h b/GTAV/src/menu/base/submenus/main/misc/hud.h new file mode 100644 index 0000000..01b209a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/hud.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class hud_menu : public menu::submenu::submenu { +public: + static hud_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + hud_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::hud::vars { + struct variables { + int m_hud; + color_rgba m_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_camera.cpp b/GTAV/src/menu/base/submenus/main/misc/misc_camera.cpp new file mode 100644 index 0000000..e171c5d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_camera.cpp @@ -0,0 +1,127 @@ +#include "misc_camera.h" +#include "menu/base/submenu_handler.h" +#include "../misc.h" +#include "menu/base/util/camera.h" +#include "menu/base/util/timers.h" +#include "camera/aerial_camera.h" + +using namespace misc::camera::vars; + +namespace misc::camera::vars { + variables m_vars; +} + +void camera_menu::load() { + set_name("Camera"); + set_parent(); + + add_option(submenu_option("Aerial Camera") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Freecam") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_freecam) + .add_click([] { + if (!m_vars.m_freecam) { + if (native::does_cam_exist(m_vars.m_freecam_handle)) { + native::set_cam_active(m_vars.m_freecam_handle, false); + native::render_script_cams(false, true, 1000, true, false, 1); + native::destroy_cam(m_vars.m_freecam_handle, false); + native::set_focus_entity(menu::player::get_local_player().m_ped); + } + } + })); + + add_option(number_option(TOGGLE, "Camera Zoom") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_camera_zoom) + .add_number(m_vars.m_camera_zoom_val, "%.0f", 1.f).add_min(0).add_max(1000.f).set_scroll_speed(10) + .add_savable(get_submenu_name_stack())); +} + +void camera_menu::update() {} + +void camera_menu::update_once() {} + +void camera_menu::feature_update() { + if (m_vars.m_camera_zoom) { + native::animate_gameplay_cam_zoom(1.f, m_vars.m_camera_zoom_val); + } + + if (m_vars.m_freecam) { + if (!native::does_cam_exist(m_vars.m_freecam_handle)) { + math::vector3 coords = menu::player::get_local_player().m_coords; + m_vars.m_freecam_handle = native::create_cam("DEFAULT_SCRIPTED_CAMERA", 0); + native::set_cam_active(m_vars.m_freecam_handle, true); + native::render_script_cams(true, true, 1000, true, false, 1); + native::set_cam_coord(m_vars.m_freecam_handle, coords.x, coords.y, coords.z + 7.0f); + } else { + math::vector3 cam_coords = native::get_cam_coord(m_vars.m_freecam_handle); + math::vector3 gameplay_cam_rot = native::get_gameplay_cam_rot(0); + native::set_cam_rot(m_vars.m_freecam_handle, gameplay_cam_rot.x, gameplay_cam_rot.y, gameplay_cam_rot.z, 2); + + if (menu::player::get_local_player().m_in_vehicle) { + native::set_vehicle_forward_speed(menu::player::get_local_player().m_vehicle, 0.0f); + } else { + native::task_stand_still(menu::player::get_local_player().m_ped, 10); + } + + math::vector3 infront = menu::camera::get_direction(); + + int left_right = native::get_control_value(2, 188); + int up_down = native::get_control_value(2, 189); + + auto w_down = GetKeyState('W') & 0x8000 || up_down == 0; + auto s_down = GetKeyState('S') & 0x8000 || up_down == 254; + auto d_down = GetKeyState('D') & 0x8000 || left_right == 254; + auto a_down = GetKeyState('A') & 0x8000 || left_right == 0; + + if (w_down) { + native::set_cam_coord(m_vars.m_freecam_handle, cam_coords.x + infront.x * 2.f, cam_coords.y + infront.y * 2.f, cam_coords.z + infront.z * 2.f); + } else if (s_down) { + native::set_cam_coord(m_vars.m_freecam_handle, cam_coords.x - infront.x * 2.f, cam_coords.y - infront.y * 2.f, cam_coords.z - infront.z * 2.f); + } + + if (a_down) { + math::vector3 gameplay_cam_rot_new = gameplay_cam_rot; + + gameplay_cam_rot_new.x = 0.f; + gameplay_cam_rot_new.y = 0.f; + gameplay_cam_rot_new.z += 90.f; + + math::vector3 new_coords = cam_coords + (menu::camera::get_direction(gameplay_cam_rot_new) * 2.f); + native::set_cam_coord(m_vars.m_freecam_handle, new_coords.x, new_coords.y, new_coords.z); + } + + if (d_down) { + math::vector3 gameplay_cam_rot_new = gameplay_cam_rot; + + gameplay_cam_rot_new.x = 0.f; + gameplay_cam_rot_new.y = 0.f; + gameplay_cam_rot_new.z -= 90.f; + + math::vector3 new_coords = cam_coords + (menu::camera::get_direction(gameplay_cam_rot_new) * 2.f); + native::set_cam_coord(m_vars.m_freecam_handle, new_coords.x, new_coords.y, new_coords.z); + } + + cam_coords = native::get_cam_coord(m_vars.m_freecam_handle); + + static int timer = 0; + menu::timers::run_timed(&timer, 1000, [&] { + native::set_focus_area(cam_coords.x, cam_coords.y, cam_coords.z, 0, 0, 0); + }); + } + } +} + +camera_menu* g_instance; +camera_menu* camera_menu::get() { + if (g_instance == nullptr) { + g_instance = new camera_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_camera.h b/GTAV/src/menu/base/submenus/main/misc/misc_camera.h new file mode 100644 index 0000000..cb0ff1f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_camera.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class camera_menu : public menu::submenu::submenu { +public: + static camera_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + camera_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::camera::vars { + struct variables { + bool m_freecam; + Cam m_freecam_handle; + + bool m_camera_zoom; + float m_camera_zoom_val = 1.f; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_disables.cpp b/GTAV/src/menu/base/submenus/main/misc/misc_disables.cpp new file mode 100644 index 0000000..440a1b2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_disables.cpp @@ -0,0 +1,234 @@ +#include "misc_disables.h" +#include "menu/base/submenu_handler.h" +#include "../misc.h" +#include "menu/base/util/global.h" +#include "rage/types/global_types.h" + +using namespace misc::disables::vars; + +namespace misc::disables::vars { + variables m_vars; + + template + void set_tunable(int Tunable, TYPE Value) { + menu::script_global(rage::global::_155_tunables).at(Tunable).as() = Value; + } + + void disable_phone() { + int type = rage::global::_155_disable_phone_type; + int bool_1 = rage::global::_155_disable_phone_bool_1; + int phone_pos_set = rage::global::_155_disable_phone_phone_pos_set; + int phone_pos_get = rage::global::_155_disable_phone_phone_pos_get; + int bitset_1 = rage::global::_155_disable_phone_bitset_1; + int bitset_2 = rage::global::_155_disable_phone_bitset_2; + int unk_1 = rage::global::_155_disable_phone_unk_1; + + if (*menu::script_global(type).at(1).get() != 1) { + if (native::get_number_of_instances_of_script_with_name_hash(joaat("cellphone_flashhand")) > 0 || + *menu::script_global(type).at(1).get() > 3) { + if (*menu::script_global(bool_1).get()) { + menu::script_global(bool_1).as() = 0; + menu::script_global(phone_pos_set).as() = *menu::script_global(phone_pos_get).get(); + menu::script_global(phone_pos_set).at(1).as() = *menu::script_global(phone_pos_get).at(1).get(); + menu::script_global(phone_pos_set).at(2).as() = *menu::script_global(phone_pos_get).at(2).get(); + + native::set_mobile_phone_position(*menu::script_global(phone_pos_set).get(), *menu::script_global(phone_pos_set).at(1).get(), *menu::script_global(phone_pos_set).at(2).get()); + } + + if (*menu::script_global(type).at(1).get() == 10 || *menu::script_global(type).at(1).get() == 9) { + native::set_bit((int*)menu::script_global(bitset_1).get(), 16); + } + + if (native::is_mobile_phone_call_ongoing()) { + native::stop_scripted_conversation(false); + } + + menu::script_global(unk_1).as() = 5; + native::clear_bit(menu::script_global(bitset_2).get(), 30); + + if (*menu::script_global(type).at(1).get() != 1 && *menu::script_global(type).at(1).get() != 0) { + menu::script_global(type).at(1).as() = 3; + } + } + + native::set_bit((int*)menu::script_global(bitset_1).get(), 2); + } + } +} + +void misc_disables_menu::load() { + set_name("Disables"); + set_parent(); + + add_option(toggle_option("Disable Idle Kick") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_idle_kick).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Profanity Filter") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_profanity_filter).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Phone") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_phone).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Calls") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_calls).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Stunt Jumps") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_stunt_jumps).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Cinematic Camera") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_cinematic_camera).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Minimap") + .add_translate().add_hotkey() + .add_click([] { native::display_radar(true); }) + .add_toggle(m_vars.m_disable_minimap).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable HUD") + .add_translate().add_hotkey() + .add_click([] { native::display_hud(true); }) + .add_toggle(m_vars.m_disable_hud).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Chat on Open") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_chat_on_open).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Restricted Areas") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_restricted_areas).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Notifications") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_notifications).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Loading Prompts") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_loading_prompts).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Cutscenes") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_cutscenes).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Boundary Limit") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_boundry_limit).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Easy Way Out Limit") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_easy_way_out_limit).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Passive Mode Limit") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_passive_mode_limit).add_savable(get_submenu_name_stack())); + + add_option(button_option("Disable Mission Circles") + .add_translate().add_hotkey() + .add_click([] { native::terminate_all_scripts_with_this_name("fmmc_launcher"); })); +} + +void misc_disables_menu::update() {} + +void misc_disables_menu::update_once() {} + +void misc_disables_menu::feature_update() { + if (m_vars.m_disable_easy_way_out_limit) { + set_tunable(27907, 0); + set_tunable(27908, 0); + } + + if (m_vars.m_disable_passive_mode_limit) { + set_tunable(26681, 0); + set_tunable(26682, 0); + set_tunable(26683, 0); + } + + if (m_vars.m_disable_idle_kick) { +#undef max + set_tunable(87, std::numeric_limits::max()); + set_tunable(88, std::numeric_limits::max()); + set_tunable(89, std::numeric_limits::max()); + set_tunable(90, std::numeric_limits::max()); + } + + if (m_vars.m_disable_boundry_limit) { + native::expand_world_limits(-9000.f, -11000.f, 30.f); + native::expand_world_limits(10000.f, 12000.f, 30.f); + } + + if (m_vars.m_disable_cutscenes) { + if (native::is_cutscene_active() || native::is_cutscene_playing()) { + native::stop_cutscene_immediately(); + } + } + + if (m_vars.m_disable_loading_prompts) { + if (native::is_loading_prompt_being_displayed()) { + native::remove_loading_prompt(); + } + } + + if (m_vars.m_disable_notifications) { + native::clear_all_help_messages(); + } + + if (m_vars.m_disable_minimap) { + native::display_radar(false); + } + + if (m_vars.m_disable_hud) { + native::display_hud(false); + } + + if (m_vars.m_disable_calls) { + if (native::is_mobile_phone_call_ongoing()) { + native::stop_scripted_conversation(false); + } + } + + if (m_vars.m_disable_stunt_jumps) { + if (native::is_stunt_jump_in_progress()) { + native::cancel_stunt_jump(); + } + } + + if (m_vars.m_disable_cinematic_camera) { + native::disable_control_action(0, ControlVehicleCinCam, true); + } + + if (m_vars.m_disable_phone) { + disable_phone(); + } + + if (m_vars.m_disable_restricted_areas) { + std::string scripts[] = { + "am_armybase", + "restrictedareas", + "re_armybase", + "re_lossantosintl", + "re_prison", + "re_prisonvanbreak" + }; + + for (std::string area : scripts) { + if (native::does_script_exist(area.c_str())) { + native::terminate_all_scripts_with_this_name(area.c_str()); + } + } + } +} + +misc_disables_menu* g_instance; +misc_disables_menu* misc_disables_menu::get() { + if (g_instance == nullptr) { + g_instance = new misc_disables_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_disables.h b/GTAV/src/menu/base/submenus/main/misc/misc_disables.h new file mode 100644 index 0000000..107764c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_disables.h @@ -0,0 +1,38 @@ +#pragma once +#include "menu/base/submenu.h" + +class misc_disables_menu : public menu::submenu::submenu { +public: + static misc_disables_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + misc_disables_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::disables::vars { + struct variables { + bool m_disable_phone; + bool m_disable_calls; + bool m_disable_stunt_jumps; + bool m_disable_cinematic_camera; + bool m_disable_profanity_filter; + bool m_disable_minimap; + bool m_disable_hud; + bool m_disable_chat_on_open; + bool m_disable_restricted_areas; + bool m_disable_notifications; + bool m_disable_loading_prompts; + bool m_disable_cutscenes; + bool m_disable_boundry_limit; + bool m_disable_idle_kick; + bool m_disable_easy_way_out_limit; + bool m_disable_passive_mode_limit; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_panels.cpp b/GTAV/src/menu/base/submenus/main/misc/misc_panels.cpp new file mode 100644 index 0000000..eea116f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_panels.cpp @@ -0,0 +1,63 @@ +#include "misc_panels.h" +#include "menu/base/submenu_handler.h" +#include "../misc.h" +#include "panels/panels_parent.h" +#include "menu/base/submenus/main/network/network_players.h" + +void panels_menu::load() { + set_name("Panels"); + set_parent(); + + for (menu::panels::panel_parent* parent : menu::panels::get_panels()) { + for (menu::panels::panel_child& child : parent->m_children_panels) { + int index = util::config::read_int(get_submenu_name_stack(), "Index", child.m_index, { parent->m_name, child.m_name }); + int column = util::config::read_int(get_submenu_name_stack(), "Column", child.m_column, { parent->m_name, child.m_name }); + child.m_render = util::config::read_bool(get_submenu_name_stack(), "Render", child.m_render, { parent->m_name, child.m_name }); + + menu::panels::rearrange(parent, child.m_id, column, index); + } + } +} + +void panels_menu::update() {} + +void panels_menu::update_once() { + clear_options(0); + + for (menu::panels::panel_parent* parent : menu::panels::get_panels()) { + add_option(submenu_option(parent->m_name) + .add_click([=] { + misc::panel::parent::vars::m_vars.m_parent = parent; + panels_parent_menu::get()->set_name(parent->m_name, false, false); + }) + .add_hover([=](submenu_option*) { + for (menu::panels::panel_parent* p : menu::panels::get_panels()) { + if (p != parent) { + p->m_render = false; + } + } + + network::players::vars::m_vars.m_selected_player = menu::player::get_local_player().m_id; // for panel preview + + for (menu::panels::panel_child& child : parent->m_children_panels) { + menu::panels::null_structure(child); + } + + parent->m_render = true; + }) + .add_submenu()); + } +} + +void panels_menu::feature_update() {} + +panels_menu* g_instance; +panels_menu* panels_menu::get() { + if (g_instance == nullptr) { + g_instance = new panels_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_panels.h b/GTAV/src/menu/base/submenus/main/misc/misc_panels.h new file mode 100644 index 0000000..1ea1868 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_panels.h @@ -0,0 +1,15 @@ +#pragma once +#include "menu/base/submenu.h" + +class panels_menu : public menu::submenu::submenu { +public: + static panels_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + panels_menu() + : menu::submenu::submenu() {} +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_radio.cpp b/GTAV/src/menu/base/submenus/main/misc/misc_radio.cpp new file mode 100644 index 0000000..9fc2d6e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_radio.cpp @@ -0,0 +1,73 @@ +#include "misc_radio.h" +#include "menu/base/submenu_handler.h" +#include "../misc.h" +#include "menu/base/util/panels.h" + +using namespace misc::radio::vars; + +namespace misc::radio::vars { + variables m_vars; +} + +void radio_menu::load() { + set_name("Radio"); + set_parent(); + + add_option(toggle_option("Mobile Radio") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_mobile_radio) + .add_click([] { + native::set_mobile_radio_enabled_during_gameplay(m_vars.m_mobile_radio); + native::set_mobile_phone_radio_state(m_vars.m_mobile_radio); + }).add_savable(get_submenu_name_stack())); + + add_option(button_option("Skip Radio Track") + .add_translate().add_hotkey() + .add_click([] { native::skip_radio_forward(); })); + + add_option(break_option("Radio Stations") + .add_translate()); + + add_string("Change to"); +} + +void radio_menu::update() {} + +void radio_menu::update_once() { + menu::panels::toggle_panel_render("PANEL_RADIO", true); + + clear_options(3); + + m_vars.m_context.reset(); + m_vars.m_context.m_selected = 0; + + std::vector> temp_options; + + for (int i = 0; i < native::max_radio_station_index(); i++) { + temp_options.push_back(add_option(radio_option(util::va::va("%s %s", get_string("Change to").c_str(), native::get_label_text(native::get_radio_station_name(i)))) + .add_radio(m_vars.m_context) + .add_click([=] { native::set_radio_to_station_index(i); }))); + } + + int index = native::get_player_radio_station_index(); + if (index >= 0 && index < native::max_radio_station_index()) { + temp_options[index]->update_selected(); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } +} + +void radio_menu::feature_update() {} + +radio_menu* g_instance; +radio_menu* radio_menu::get() { + if (g_instance == nullptr) { + g_instance = new radio_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_radio.h b/GTAV/src/menu/base/submenus/main/misc/misc_radio.h new file mode 100644 index 0000000..ead6f15 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_radio.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class radio_menu : public menu::submenu::submenu { +public: + static radio_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + radio_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::radio::vars { + struct variables { + bool m_mobile_radio; + + radio_context m_context = { "commonmenu", "shop_garage_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_swaps.cpp b/GTAV/src/menu/base/submenus/main/misc/misc_swaps.cpp new file mode 100644 index 0000000..74c2d63 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_swaps.cpp @@ -0,0 +1,41 @@ +#include "misc_swaps.h" +#include "menu/base/submenu_handler.h" +#include "../misc.h" +#include "swaps/model_swaps.h" +#include "swaps/texture_swaps.h" + +using namespace misc::swaps::vars; + +namespace misc::swaps::vars { + variables m_vars; +} + +void misc_swaps_menu::load() { + set_name("Swaps"); + set_parent(); + + add_option(submenu_option("Model Swaps") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Texture Swaps") + .add_translate().add_hotkey() + .add_submenu()); +} + +void misc_swaps_menu::update() {} + +void misc_swaps_menu::update_once() {} + +void misc_swaps_menu::feature_update() {} + +misc_swaps_menu* g_instance; +misc_swaps_menu* misc_swaps_menu::get() { + if (g_instance == nullptr) { + g_instance = new misc_swaps_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/misc_swaps.h b/GTAV/src/menu/base/submenus/main/misc/misc_swaps.h new file mode 100644 index 0000000..b5771c2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/misc_swaps.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class misc_swaps_menu : public menu::submenu::submenu { +public: + static misc_swaps_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + misc_swaps_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::swaps::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/panels/panels_edit.cpp b/GTAV/src/menu/base/submenus/main/misc/panels/panels_edit.cpp new file mode 100644 index 0000000..9887c21 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/panels/panels_edit.cpp @@ -0,0 +1,86 @@ +#include "panels_edit.h" +#include "menu/base/submenu_handler.h" +#include "panels_parent.h" +#include "menu/base/util/timers.h" +#include "../misc_panels.h" + +using namespace misc::panel::edit::vars; + +namespace misc::panel::edit::vars { + variables m_vars; +} + +void panels_edit_menu::load() { + set_name("Edit"); + set_parent(); + + add_string("Toggle"); + add_string("Column"); + add_string("Index"); +} + +void panels_edit_menu::update() { + static bool update_cache = true; + static int timer_1 = 0; + + static bool write_config = true; + static int timer_2 = 0; + + menu::timers::run_timed(&timer_1, 100, [&] { update_cache = true; }); + menu::timers::run_timed(&timer_2, 500, [&] { write_config = true; }); + + if (update_cache) { + update_cache = false; + + clear_options(0); + menu::panels::panel_child& child = menu::panels::get_child(misc::panel::parent::vars::m_vars.m_parent, m_vars.m_id); // account for sorting + + if (write_config) { + util::config::write_int(panels_menu::get()->get_submenu_name_stack(), "Index", child.m_index, { child.m_parent->m_name, child.m_name }); + util::config::write_int(panels_menu::get()->get_submenu_name_stack(), "Column", child.m_column, { child.m_parent->m_name, child.m_name }); + util::config::write_bool(panels_menu::get()->get_submenu_name_stack(), "Render", child.m_render, { child.m_parent->m_name, child.m_name }); + } + + add_option(toggle_option(get_string("Toggle")) + .add_toggle(child.m_render)); + + if (child.m_parent->m_children_panels.size() == 1) { + return; + } + + int max_column = 0; + for (menu::panels::panel_child& it : child.m_parent->m_children_panels) { + if (it.m_column > max_column) { + max_column = it.m_column; + } + } + + add_option(number_option(SCROLL, get_string("Column")) + .add_number(m_vars.m_local_column, "%i", 1).add_min(0).add_max(max_column + 1) + .add_click([=] { menu::panels::rearrange(child.m_parent, child.m_id, m_vars.m_local_column, m_vars.m_local_index); })); + + add_option(number_option(SCROLL, get_string("Index")) + .add_number(m_vars.m_local_index, "%i", 1).add_min(0).add_max(1000) + .add_click([=] { menu::panels::rearrange(child.m_parent, child.m_id, m_vars.m_local_column, m_vars.m_local_index); })); + } +} + +void panels_edit_menu::update_once() { + menu::panels::panel_child& child = misc::panel::parent::vars::m_vars.m_parent->m_children_panels[m_vars.m_index] ; + m_vars.m_id = child.m_id; + m_vars.m_local_column = child.m_column; + m_vars.m_local_index = child.m_index; +} + +void panels_edit_menu::feature_update() {} + +panels_edit_menu* g_instance; +panels_edit_menu* panels_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new panels_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/panels/panels_edit.h b/GTAV/src/menu/base/submenus/main/misc/panels/panels_edit.h new file mode 100644 index 0000000..dac03cc --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/panels/panels_edit.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class panels_edit_menu : public menu::submenu::submenu { +public: + static panels_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + panels_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::panel::edit::vars { + struct variables { + std::size_t m_index; + std::string m_id; + int m_local_column; + int m_local_index; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/panels/panels_parent.cpp b/GTAV/src/menu/base/submenus/main/misc/panels/panels_parent.cpp new file mode 100644 index 0000000..50e1c71 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/panels/panels_parent.cpp @@ -0,0 +1,50 @@ +#include "panels_parent.h" +#include "menu/base/submenu_handler.h" +#include "../misc_panels.h" +#include "panels_edit.h" + +using namespace misc::panel::parent::vars; + +namespace misc::panel::parent::vars { + variables m_vars; +} + +void panels_parent_menu::load() { + set_name("Parent"); + set_parent(); +} + +void panels_parent_menu::update() {} + +void panels_parent_menu::update_once() { + clear_options(0); + + if (!m_vars.m_parent || m_vars.m_parent->m_children_panels.size() <= 0) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + for (std::size_t i = 0; i < m_vars.m_parent->m_children_panels.size(); i++) { + menu::panels::panel_child& child = m_vars.m_parent->m_children_panels[i]; + + add_option(submenu_option(child.m_name) + .add_click([=] { + misc::panel::edit::vars::m_vars.m_index = i; + panels_edit_menu::get()->set_name(child.m_name, false, false); + }) + .add_submenu()); + } +} + +void panels_parent_menu::feature_update() {} + +panels_parent_menu* g_instance; +panels_parent_menu* panels_parent_menu::get() { + if (g_instance == nullptr) { + g_instance = new panels_parent_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/panels/panels_parent.h b/GTAV/src/menu/base/submenus/main/misc/panels/panels_parent.h new file mode 100644 index 0000000..ddbc0c1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/panels/panels_parent.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/panels.h" + +class panels_parent_menu : public menu::submenu::submenu { +public: + static panels_parent_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + panels_parent_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::panel::parent::vars { + struct variables { + menu::panels::panel_parent* m_parent; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/scripthook.cpp b/GTAV/src/menu/base/submenus/main/misc/scripthook.cpp new file mode 100644 index 0000000..d91246f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/scripthook.cpp @@ -0,0 +1,1339 @@ +#include "scripthook.h" +#include "menu/base/submenu_handler.h" +#include "menu/base/util/notify.h" +#include "../misc.h" +#include "rage/engine.h" +#include "util/va.h" +#include "util/fiber.h" +#include "util/dirs.h" +#include + +using namespace misc::scripthook::vars; + +namespace misc::scripthook::vars { + variables m_vars; + + namespace proxy { + uint8_t shv_dummy[12800] = { + 0x4D, 0x5A, 0x90, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0x00, 0x00, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0xBA, 0x0E, 0x00, 0xB4, 0x09, 0xCD, + 0x21, 0xB8, 0x01, 0x4C, 0xCD, 0x21, 0x54, 0x68, 0x69, 0x73, 0x20, 0x70, + 0x72, 0x6F, 0x67, 0x72, 0x61, 0x6D, 0x20, 0x63, 0x61, 0x6E, 0x6E, 0x6F, + 0x74, 0x20, 0x62, 0x65, 0x20, 0x72, 0x75, 0x6E, 0x20, 0x69, 0x6E, 0x20, + 0x44, 0x4F, 0x53, 0x20, 0x6D, 0x6F, 0x64, 0x65, 0x2E, 0x0D, 0x0D, 0x0A, + 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x37, 0x26, 0xEB, + 0x1C, 0x56, 0x48, 0xB8, 0x1C, 0x56, 0x48, 0xB8, 0x1C, 0x56, 0x48, 0xB8, + 0x15, 0x2E, 0xDB, 0xB8, 0x1E, 0x56, 0x48, 0xB8, 0x4E, 0x3E, 0x49, 0xB9, + 0x1E, 0x56, 0x48, 0xB8, 0x4E, 0x3E, 0x4D, 0xB9, 0x15, 0x56, 0x48, 0xB8, + 0x4E, 0x3E, 0x4C, 0xB9, 0x14, 0x56, 0x48, 0xB8, 0x4E, 0x3E, 0x4B, 0xB9, + 0x1E, 0x56, 0x48, 0xB8, 0x47, 0x3E, 0x49, 0xB9, 0x1F, 0x56, 0x48, 0xB8, + 0x1C, 0x56, 0x49, 0xB8, 0x3E, 0x56, 0x48, 0xB8, 0x86, 0x3F, 0x41, 0xB9, + 0x1F, 0x56, 0x48, 0xB8, 0x86, 0x3F, 0x48, 0xB9, 0x1D, 0x56, 0x48, 0xB8, + 0x86, 0x3F, 0xB7, 0xB8, 0x1D, 0x56, 0x48, 0xB8, 0x86, 0x3F, 0x4A, 0xB9, + 0x1D, 0x56, 0x48, 0xB8, 0x52, 0x69, 0x63, 0x68, 0x1C, 0x56, 0x48, 0xB8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x45, 0x00, 0x00, + 0x64, 0x86, 0x06, 0x00, 0x0E, 0x32, 0x58, 0x5E, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x22, 0x20, 0x0B, 0x02, 0x0E, 0x10, + 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x94, 0x17, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x60, 0x01, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x10, 0x38, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, + 0x50, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, + 0x00, 0x50, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0xF0, 0x32, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x33, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x74, 0x65, 0x78, + 0x74, 0x00, 0x00, 0x00, 0x13, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x60, + 0x2E, 0x72, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0xE6, 0x0F, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x40, 0x2E, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, + 0x40, 0x06, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x2E, 0x70, 0x64, 0x61, + 0x74, 0x61, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, + 0x2E, 0x72, 0x73, 0x72, 0x63, 0x00, 0x00, 0x00, 0xE0, 0x01, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x40, 0x2E, 0x72, 0x65, 0x6C, 0x6F, 0x63, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x48, 0x89, 0x5C, 0x24, 0x08, 0x57, 0x48, 0x83, + 0xEC, 0x20, 0x48, 0x8B, 0xDA, 0x48, 0x8B, 0xF9, 0x48, 0x8D, 0x15, 0x51, + 0x21, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, 0x63, 0xFF, 0x15, 0xDE, 0x1F, + 0x00, 0x00, 0x48, 0x8B, 0xD3, 0x48, 0x8B, 0xCF, 0x48, 0x8B, 0x5C, 0x24, + 0x30, 0x48, 0x83, 0xC4, 0x20, 0x5F, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x48, 0x89, 0x5C, 0x24, + 0x08, 0x57, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, 0xDA, 0x48, 0x8B, 0xF9, + 0x48, 0x8D, 0x15, 0x21, 0x21, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, 0x63, + 0xFF, 0x15, 0x9E, 0x1F, 0x00, 0x00, 0x48, 0x8B, 0xD3, 0x48, 0x8B, 0xCF, + 0x48, 0x8B, 0x5C, 0x24, 0x30, 0x48, 0x83, 0xC4, 0x20, 0x5F, 0x48, 0xFF, + 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, 0xD9, 0x48, 0x8D, 0x15, + 0x08, 0x21, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, 0x63, 0xFF, 0x15, 0x65, + 0x1F, 0x00, 0x00, 0x48, 0x8B, 0xCB, 0x48, 0x83, 0xC4, 0x20, 0x5B, 0x48, + 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xC2, 0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, + 0xD9, 0x48, 0x8D, 0x15, 0xE0, 0x20, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, + 0x63, 0xFF, 0x15, 0x25, 0x1F, 0x00, 0x00, 0x48, 0x8B, 0xCB, 0x48, 0x83, + 0xC4, 0x20, 0x5B, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, + 0xD9, 0x48, 0x8D, 0x15, 0xC0, 0x20, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, + 0x63, 0xFF, 0x15, 0xF5, 0x1E, 0x00, 0x00, 0x48, 0x8B, 0xCB, 0x48, 0x83, + 0xC4, 0x20, 0x5B, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0x48, 0x83, 0xEC, 0x28, 0x48, 0x8D, 0x15, 0xA5, + 0x20, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, 0x63, 0xFF, 0x15, 0xCA, 0x1E, + 0x00, 0x00, 0x48, 0x83, 0xC4, 0x28, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, + 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x8B, 0xD9, 0x48, 0x8D, 0x15, 0x91, + 0x20, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, 0x63, 0xFF, 0x15, 0xA6, 0x1E, + 0x00, 0x00, 0x8B, 0xCB, 0x48, 0x83, 0xC4, 0x20, 0x5B, 0x48, 0xFF, 0xE0, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x33, 0xC0, 0xC3, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x8B, 0xD9, + 0x48, 0x8D, 0x15, 0x61, 0x20, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, 0x63, + 0xFF, 0x15, 0x66, 0x1E, 0x00, 0x00, 0x8B, 0xCB, 0x48, 0x83, 0xC4, 0x20, + 0x5B, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, + 0xD9, 0x48, 0x8D, 0x15, 0x40, 0x20, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, + 0x63, 0xFF, 0x15, 0x35, 0x1E, 0x00, 0x00, 0x48, 0x8B, 0xCB, 0x48, 0x83, + 0xC4, 0x20, 0x5B, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, + 0xD9, 0x48, 0x8D, 0x15, 0x28, 0x20, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, + 0x63, 0xFF, 0x15, 0x05, 0x1E, 0x00, 0x00, 0x48, 0x8B, 0xCB, 0x48, 0x83, + 0xC4, 0x20, 0x5B, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xB8, 0x02, 0x00, 0x00, 0x00, 0xC3, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x48, 0x83, + 0xEC, 0x20, 0x8B, 0xD9, 0x48, 0x8D, 0x15, 0x09, 0x20, 0x00, 0x00, 0xB9, + 0x70, 0x69, 0x68, 0x63, 0xFF, 0x15, 0xC6, 0x1D, 0x00, 0x00, 0x8B, 0xCB, + 0x48, 0x83, 0xC4, 0x20, 0x5B, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x48, 0x83, + 0xEC, 0x20, 0x48, 0x8B, 0xD9, 0x48, 0x8D, 0x15, 0xF8, 0x1F, 0x00, 0x00, + 0xB9, 0x70, 0x69, 0x68, 0x63, 0xFF, 0x15, 0x95, 0x1D, 0x00, 0x00, 0x48, + 0x8B, 0xCB, 0x48, 0x83, 0xC4, 0x20, 0x5B, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x48, 0x83, + 0xEC, 0x20, 0x48, 0x8B, 0xD9, 0x48, 0x8D, 0x15, 0xE0, 0x1F, 0x00, 0x00, + 0xB9, 0x70, 0x69, 0x68, 0x63, 0xFF, 0x15, 0x65, 0x1D, 0x00, 0x00, 0x48, + 0x8B, 0xCB, 0x48, 0x83, 0xC4, 0x20, 0x5B, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x48, 0x89, 0x5C, 0x24, + 0x08, 0x57, 0x48, 0x83, 0xEC, 0x20, 0x8B, 0xDA, 0x48, 0x8B, 0xF9, 0x48, + 0x8D, 0x15, 0xCA, 0x1F, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, 0x63, 0xFF, + 0x15, 0x2F, 0x1D, 0x00, 0x00, 0x8B, 0xD3, 0x48, 0x8B, 0xCF, 0x48, 0x8B, + 0x5C, 0x24, 0x30, 0x48, 0x83, 0xC4, 0x20, 0x5F, 0x48, 0xFF, 0xE0, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x48, 0x89, 0x5C, 0x24, 0x08, 0x57, 0x48, 0x83, 0xEC, 0x20, 0x8B, 0xDA, + 0x48, 0x8B, 0xF9, 0x48, 0x8D, 0x15, 0xA2, 0x1F, 0x00, 0x00, 0xB9, 0x70, + 0x69, 0x68, 0x63, 0xFF, 0x15, 0xEF, 0x1C, 0x00, 0x00, 0x8B, 0xD3, 0x48, + 0x8B, 0xCF, 0x48, 0x8B, 0x5C, 0x24, 0x30, 0x48, 0x83, 0xC4, 0x20, 0x5F, + 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0x48, 0x89, 0x5C, 0x24, 0x08, 0x57, 0x48, 0x83, + 0xEC, 0x20, 0x8B, 0xDA, 0x48, 0x8B, 0xF9, 0x48, 0x8D, 0x15, 0x72, 0x1F, + 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, 0x63, 0xFF, 0x15, 0xAF, 0x1C, 0x00, + 0x00, 0x8B, 0xD3, 0x48, 0x8B, 0xCF, 0x48, 0x8B, 0x5C, 0x24, 0x30, 0x48, + 0x83, 0xC4, 0x20, 0x5F, 0x48, 0xFF, 0xE0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x48, 0x89, 0x5C, 0x24, + 0x08, 0x57, 0x48, 0x83, 0xEC, 0x20, 0x8B, 0xDA, 0x48, 0x8B, 0xF9, 0x48, + 0x8D, 0x15, 0x4A, 0x1F, 0x00, 0x00, 0xB9, 0x70, 0x69, 0x68, 0x63, 0xFF, + 0x15, 0x6F, 0x1C, 0x00, 0x00, 0x8B, 0xD3, 0x48, 0x8B, 0xCF, 0x48, 0x8B, + 0x5C, 0x24, 0x30, 0x48, 0x83, 0xC4, 0x20, 0x5F, 0x48, 0xFF, 0xE0, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x48, 0x83, 0xEC, 0x28, 0x80, 0x3D, 0x75, 0x32, 0x00, 0x00, 0x00, 0x75, + 0x17, 0x0F, 0x1F, 0x00, 0xB9, 0xE8, 0x03, 0x00, 0x00, 0xFF, 0x15, 0x3D, + 0x1C, 0x00, 0x00, 0x80, 0x3D, 0x5E, 0x32, 0x00, 0x00, 0x00, 0x74, 0xEC, + 0x33, 0xC0, 0x48, 0x83, 0xC4, 0x28, 0xC3, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0x48, 0x83, 0xEC, 0x38, 0x85, 0xD2, 0x74, 0x2E, 0x83, 0xFA, 0x01, 0x75, + 0x30, 0x33, 0xC0, 0x4C, 0x8D, 0x05, 0xBA, 0xFF, 0xFF, 0xFF, 0x48, 0x89, + 0x44, 0x24, 0x28, 0x45, 0x33, 0xC9, 0x33, 0xD2, 0x89, 0x44, 0x24, 0x20, + 0x33, 0xC9, 0xFF, 0x15, 0x04, 0x1C, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, + 0x00, 0x48, 0x83, 0xC4, 0x38, 0xC3, 0xC6, 0x05, 0x13, 0x32, 0x00, 0x00, + 0x01, 0xB8, 0x01, 0x00, 0x00, 0x00, 0x48, 0x83, 0xC4, 0x38, 0xC3, 0xCC, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0x66, 0x66, 0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0x3B, 0x0D, 0xC1, 0x2B, 0x00, 0x00, 0xF2, 0x75, 0x12, 0x48, 0xC1, + 0xC1, 0x10, 0x66, 0xF7, 0xC1, 0xFF, 0xFF, 0xF2, 0x75, 0x02, 0xF2, 0xC3, + 0x48, 0xC1, 0xC9, 0x10, 0xE9, 0xA7, 0x03, 0x00, 0x00, 0xCC, 0xCC, 0xCC, + 0x48, 0x83, 0xEC, 0x28, 0x85, 0xD2, 0x74, 0x39, 0x83, 0xEA, 0x01, 0x74, + 0x28, 0x83, 0xEA, 0x01, 0x74, 0x16, 0x83, 0xFA, 0x01, 0x74, 0x0A, 0xB8, + 0x01, 0x00, 0x00, 0x00, 0x48, 0x83, 0xC4, 0x28, 0xC3, 0xE8, 0x6A, 0x06, + 0x00, 0x00, 0xEB, 0x05, 0xE8, 0x3B, 0x06, 0x00, 0x00, 0x0F, 0xB6, 0xC0, + 0x48, 0x83, 0xC4, 0x28, 0xC3, 0x49, 0x8B, 0xD0, 0x48, 0x83, 0xC4, 0x28, + 0xE9, 0x0F, 0x00, 0x00, 0x00, 0x4D, 0x85, 0xC0, 0x0F, 0x95, 0xC1, 0x48, + 0x83, 0xC4, 0x28, 0xE9, 0x1C, 0x01, 0x00, 0x00, 0x48, 0x89, 0x5C, 0x24, + 0x08, 0x48, 0x89, 0x74, 0x24, 0x10, 0x48, 0x89, 0x7C, 0x24, 0x20, 0x41, + 0x56, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, 0xF2, 0x4C, 0x8B, 0xF1, 0x33, + 0xC9, 0xE8, 0xDA, 0x06, 0x00, 0x00, 0x84, 0xC0, 0x75, 0x18, 0x33, 0xC0, + 0x48, 0x8B, 0x5C, 0x24, 0x30, 0x48, 0x8B, 0x74, 0x24, 0x38, 0x48, 0x8B, + 0x7C, 0x24, 0x48, 0x48, 0x83, 0xC4, 0x20, 0x41, 0x5E, 0xC3, 0xE8, 0x4D, + 0x05, 0x00, 0x00, 0x8A, 0xD8, 0x88, 0x44, 0x24, 0x40, 0x40, 0xB7, 0x01, + 0x83, 0x3D, 0xD9, 0x30, 0x00, 0x00, 0x00, 0x0F, 0x85, 0xB4, 0x00, 0x00, + 0x00, 0xC7, 0x05, 0xC9, 0x30, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xE8, + 0x98, 0x05, 0x00, 0x00, 0x84, 0xC0, 0x74, 0x4F, 0xE8, 0xF7, 0x09, 0x00, + 0x00, 0xE8, 0xD2, 0x04, 0x00, 0x00, 0xE8, 0xF9, 0x04, 0x00, 0x00, 0x48, + 0x8D, 0x15, 0xEA, 0x1B, 0x00, 0x00, 0x48, 0x8D, 0x0D, 0xDB, 0x1B, 0x00, + 0x00, 0xE8, 0x06, 0x0C, 0x00, 0x00, 0x85, 0xC0, 0x75, 0x29, 0xE8, 0x35, + 0x05, 0x00, 0x00, 0x84, 0xC0, 0x74, 0x20, 0x48, 0x8D, 0x15, 0xBA, 0x1B, + 0x00, 0x00, 0x48, 0x8D, 0x0D, 0xAB, 0x1B, 0x00, 0x00, 0xE8, 0xE0, 0x0B, + 0x00, 0x00, 0xC7, 0x05, 0x74, 0x30, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x40, 0x32, 0xFF, 0x8A, 0xCB, 0xE8, 0xFA, 0x07, 0x00, 0x00, 0x40, 0x84, + 0xFF, 0x0F, 0x85, 0x5B, 0xFF, 0xFF, 0xFF, 0xE8, 0x3C, 0x08, 0x00, 0x00, + 0x48, 0x8B, 0xD8, 0x48, 0x83, 0x38, 0x00, 0x74, 0x24, 0x48, 0x8B, 0xC8, + 0xE8, 0x3F, 0x07, 0x00, 0x00, 0x84, 0xC0, 0x74, 0x18, 0x4C, 0x8B, 0xC6, + 0xBA, 0x02, 0x00, 0x00, 0x00, 0x49, 0x8B, 0xCE, 0x48, 0x8B, 0x03, 0x4C, + 0x8B, 0x0D, 0x52, 0x1B, 0x00, 0x00, 0x41, 0xFF, 0xD1, 0xFF, 0x05, 0x89, + 0x2A, 0x00, 0x00, 0xB8, 0x01, 0x00, 0x00, 0x00, 0xE9, 0x1B, 0xFF, 0xFF, + 0xFF, 0xB9, 0x07, 0x00, 0x00, 0x00, 0xE8, 0x05, 0x08, 0x00, 0x00, 0x90, + 0xCC, 0xCC, 0xCC, 0xCC, 0x48, 0x89, 0x5C, 0x24, 0x08, 0x48, 0x89, 0x74, + 0x24, 0x18, 0x57, 0x48, 0x83, 0xEC, 0x20, 0x40, 0x8A, 0xF1, 0x8B, 0x05, + 0x58, 0x2A, 0x00, 0x00, 0x33, 0xDB, 0x85, 0xC0, 0x7F, 0x12, 0x33, 0xC0, + 0x48, 0x8B, 0x5C, 0x24, 0x30, 0x48, 0x8B, 0x74, 0x24, 0x40, 0x48, 0x83, + 0xC4, 0x20, 0x5F, 0xC3, 0xFF, 0xC8, 0x89, 0x05, 0x38, 0x2A, 0x00, 0x00, + 0xE8, 0x37, 0x04, 0x00, 0x00, 0x40, 0x8A, 0xF8, 0x88, 0x44, 0x24, 0x38, + 0x83, 0x3D, 0xC5, 0x2F, 0x00, 0x00, 0x02, 0x75, 0x35, 0xE8, 0x4A, 0x05, + 0x00, 0x00, 0xE8, 0xE5, 0x03, 0x00, 0x00, 0xE8, 0x2C, 0x09, 0x00, 0x00, + 0x89, 0x1D, 0xAE, 0x2F, 0x00, 0x00, 0xE8, 0x65, 0x05, 0x00, 0x00, 0x40, + 0x8A, 0xCF, 0xE8, 0x31, 0x07, 0x00, 0x00, 0x33, 0xD2, 0x40, 0x8A, 0xCE, + 0xE8, 0x4B, 0x07, 0x00, 0x00, 0x84, 0xC0, 0x0F, 0x95, 0xC3, 0x8B, 0xC3, + 0xEB, 0x9E, 0xB9, 0x07, 0x00, 0x00, 0x00, 0xE8, 0x74, 0x07, 0x00, 0x00, + 0x90, 0xCC, 0xCC, 0xCC, 0x48, 0x8B, 0xC4, 0x48, 0x89, 0x58, 0x20, 0x4C, + 0x89, 0x40, 0x18, 0x89, 0x50, 0x10, 0x48, 0x89, 0x48, 0x08, 0x56, 0x57, + 0x41, 0x56, 0x48, 0x83, 0xEC, 0x40, 0x49, 0x8B, 0xF0, 0x8B, 0xFA, 0x4C, + 0x8B, 0xF1, 0x85, 0xD2, 0x75, 0x0F, 0x39, 0x15, 0xB4, 0x29, 0x00, 0x00, + 0x7F, 0x07, 0x33, 0xC0, 0xE9, 0xF0, 0x00, 0x00, 0x00, 0x8D, 0x42, 0xFF, + 0x83, 0xF8, 0x01, 0x77, 0x45, 0x48, 0x8B, 0x05, 0xAC, 0x1A, 0x00, 0x00, + 0x48, 0x85, 0xC0, 0x75, 0x0A, 0xC7, 0x44, 0x24, 0x30, 0x01, 0x00, 0x00, + 0x00, 0xEB, 0x14, 0xFF, 0x15, 0x47, 0x1A, 0x00, 0x00, 0x8B, 0xD8, 0x89, + 0x44, 0x24, 0x30, 0x85, 0xC0, 0x0F, 0x84, 0xB4, 0x00, 0x00, 0x00, 0x4C, + 0x8B, 0xC6, 0x8B, 0xD7, 0x49, 0x8B, 0xCE, 0xE8, 0x90, 0xFD, 0xFF, 0xFF, + 0x8B, 0xD8, 0x89, 0x44, 0x24, 0x30, 0x85, 0xC0, 0x0F, 0x84, 0x99, 0x00, + 0x00, 0x00, 0x4C, 0x8B, 0xC6, 0x8B, 0xD7, 0x49, 0x8B, 0xCE, 0xE8, 0xF1, + 0xFC, 0xFF, 0xFF, 0x8B, 0xD8, 0x89, 0x44, 0x24, 0x30, 0x83, 0xFF, 0x01, + 0x75, 0x38, 0x85, 0xC0, 0x75, 0x34, 0x4C, 0x8B, 0xC6, 0x33, 0xD2, 0x49, + 0x8B, 0xCE, 0xE8, 0xD5, 0xFC, 0xFF, 0xFF, 0x4C, 0x8B, 0xC6, 0x33, 0xD2, + 0x49, 0x8B, 0xCE, 0xE8, 0x4C, 0xFD, 0xFF, 0xFF, 0x48, 0x8B, 0x05, 0x31, + 0x1A, 0x00, 0x00, 0x48, 0x85, 0xC0, 0x74, 0x0E, 0x4C, 0x8B, 0xC6, 0x33, + 0xD2, 0x49, 0x8B, 0xCE, 0xFF, 0x15, 0xCE, 0x19, 0x00, 0x00, 0x85, 0xFF, + 0x74, 0x05, 0x83, 0xFF, 0x03, 0x75, 0x40, 0x4C, 0x8B, 0xC6, 0x8B, 0xD7, + 0x49, 0x8B, 0xCE, 0xE8, 0x1C, 0xFD, 0xFF, 0xFF, 0x8B, 0xD8, 0x89, 0x44, + 0x24, 0x30, 0x85, 0xC0, 0x74, 0x29, 0x48, 0x8B, 0x05, 0xF7, 0x19, 0x00, + 0x00, 0x48, 0x85, 0xC0, 0x75, 0x09, 0x8D, 0x58, 0x01, 0x89, 0x5C, 0x24, + 0x30, 0xEB, 0x14, 0x4C, 0x8B, 0xC6, 0x8B, 0xD7, 0x49, 0x8B, 0xCE, 0xFF, + 0x15, 0x8B, 0x19, 0x00, 0x00, 0x8B, 0xD8, 0x89, 0x44, 0x24, 0x30, 0xEB, + 0x06, 0x33, 0xDB, 0x89, 0x5C, 0x24, 0x30, 0x8B, 0xC3, 0x48, 0x8B, 0x5C, + 0x24, 0x78, 0x48, 0x83, 0xC4, 0x40, 0x41, 0x5E, 0x5F, 0x5E, 0xC3, 0xCC, + 0x48, 0x89, 0x5C, 0x24, 0x08, 0x48, 0x89, 0x74, 0x24, 0x10, 0x57, 0x48, + 0x83, 0xEC, 0x20, 0x49, 0x8B, 0xF8, 0x8B, 0xDA, 0x48, 0x8B, 0xF1, 0x83, + 0xFA, 0x01, 0x75, 0x05, 0xE8, 0x9B, 0x01, 0x00, 0x00, 0x4C, 0x8B, 0xC7, + 0x8B, 0xD3, 0x48, 0x8B, 0xCE, 0x48, 0x8B, 0x5C, 0x24, 0x30, 0x48, 0x8B, + 0x74, 0x24, 0x38, 0x48, 0x83, 0xC4, 0x20, 0x5F, 0xE9, 0x8F, 0xFE, 0xFF, + 0xFF, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, + 0xD9, 0x33, 0xC9, 0xFF, 0x15, 0x7B, 0x18, 0x00, 0x00, 0x48, 0x8B, 0xCB, + 0xFF, 0x15, 0x7A, 0x18, 0x00, 0x00, 0xFF, 0x15, 0x64, 0x18, 0x00, 0x00, + 0x48, 0x8B, 0xC8, 0xBA, 0x09, 0x04, 0x00, 0xC0, 0x48, 0x83, 0xC4, 0x20, + 0x5B, 0x48, 0xFF, 0x25, 0x48, 0x18, 0x00, 0x00, 0x48, 0x89, 0x4C, 0x24, + 0x08, 0x48, 0x83, 0xEC, 0x38, 0xB9, 0x17, 0x00, 0x00, 0x00, 0xE8, 0x57, + 0x09, 0x00, 0x00, 0x85, 0xC0, 0x74, 0x07, 0xB9, 0x02, 0x00, 0x00, 0x00, + 0xCD, 0x29, 0x48, 0x8D, 0x0D, 0xC3, 0x28, 0x00, 0x00, 0xE8, 0xAA, 0x00, + 0x00, 0x00, 0x48, 0x8B, 0x44, 0x24, 0x38, 0x48, 0x89, 0x05, 0xAA, 0x29, + 0x00, 0x00, 0x48, 0x8D, 0x44, 0x24, 0x38, 0x48, 0x83, 0xC0, 0x08, 0x48, + 0x89, 0x05, 0x3A, 0x29, 0x00, 0x00, 0x48, 0x8B, 0x05, 0x93, 0x29, 0x00, + 0x00, 0x48, 0x89, 0x05, 0x04, 0x28, 0x00, 0x00, 0x48, 0x8B, 0x44, 0x24, + 0x40, 0x48, 0x89, 0x05, 0x08, 0x29, 0x00, 0x00, 0xC7, 0x05, 0xDE, 0x27, + 0x00, 0x00, 0x09, 0x04, 0x00, 0xC0, 0xC7, 0x05, 0xD8, 0x27, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xC7, 0x05, 0xE2, 0x27, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0xB8, 0x08, 0x00, 0x00, 0x00, 0x48, 0x6B, 0xC0, 0x00, 0x48, + 0x8D, 0x0D, 0xDA, 0x27, 0x00, 0x00, 0x48, 0xC7, 0x04, 0x01, 0x02, 0x00, + 0x00, 0x00, 0xB8, 0x08, 0x00, 0x00, 0x00, 0x48, 0x6B, 0xC0, 0x00, 0x48, + 0x8B, 0x0D, 0x5A, 0x27, 0x00, 0x00, 0x48, 0x89, 0x4C, 0x04, 0x20, 0xB8, + 0x08, 0x00, 0x00, 0x00, 0x48, 0x6B, 0xC0, 0x01, 0x48, 0x8B, 0x0D, 0x3D, + 0x27, 0x00, 0x00, 0x48, 0x89, 0x4C, 0x04, 0x20, 0x48, 0x8D, 0x0D, 0x89, + 0x18, 0x00, 0x00, 0xE8, 0x00, 0xFF, 0xFF, 0xFF, 0x48, 0x83, 0xC4, 0x38, + 0xC3, 0xCC, 0xCC, 0xCC, 0x40, 0x53, 0x56, 0x57, 0x48, 0x83, 0xEC, 0x40, + 0x48, 0x8B, 0xD9, 0xFF, 0x15, 0x93, 0x17, 0x00, 0x00, 0x48, 0x8B, 0xB3, + 0xF8, 0x00, 0x00, 0x00, 0x33, 0xFF, 0x45, 0x33, 0xC0, 0x48, 0x8D, 0x54, + 0x24, 0x60, 0x48, 0x8B, 0xCE, 0xFF, 0x15, 0x71, 0x17, 0x00, 0x00, 0x48, + 0x85, 0xC0, 0x74, 0x39, 0x48, 0x83, 0x64, 0x24, 0x38, 0x00, 0x48, 0x8D, + 0x4C, 0x24, 0x68, 0x48, 0x8B, 0x54, 0x24, 0x60, 0x4C, 0x8B, 0xC8, 0x48, + 0x89, 0x4C, 0x24, 0x30, 0x4C, 0x8B, 0xC6, 0x48, 0x8D, 0x4C, 0x24, 0x70, + 0x48, 0x89, 0x4C, 0x24, 0x28, 0x33, 0xC9, 0x48, 0x89, 0x5C, 0x24, 0x20, + 0xFF, 0x15, 0x32, 0x17, 0x00, 0x00, 0xFF, 0xC7, 0x83, 0xFF, 0x02, 0x7C, + 0xB1, 0x48, 0x83, 0xC4, 0x40, 0x5F, 0x5E, 0x5B, 0xC3, 0xCC, 0xCC, 0xCC, + 0x48, 0x89, 0x5C, 0x24, 0x20, 0x55, 0x48, 0x8B, 0xEC, 0x48, 0x83, 0xEC, + 0x20, 0x48, 0x8B, 0x05, 0xA4, 0x26, 0x00, 0x00, 0x48, 0xBB, 0x32, 0xA2, + 0xDF, 0x2D, 0x99, 0x2B, 0x00, 0x00, 0x48, 0x3B, 0xC3, 0x75, 0x74, 0x48, + 0x83, 0x65, 0x18, 0x00, 0x48, 0x8D, 0x4D, 0x18, 0xFF, 0x15, 0xA6, 0x16, + 0x00, 0x00, 0x48, 0x8B, 0x45, 0x18, 0x48, 0x89, 0x45, 0x10, 0xFF, 0x15, + 0xA0, 0x16, 0x00, 0x00, 0x8B, 0xC0, 0x48, 0x31, 0x45, 0x10, 0xFF, 0x15, + 0x9C, 0x16, 0x00, 0x00, 0x8B, 0xC0, 0x48, 0x8D, 0x4D, 0x20, 0x48, 0x31, + 0x45, 0x10, 0xFF, 0x15, 0x94, 0x16, 0x00, 0x00, 0x8B, 0x45, 0x20, 0x48, + 0x8D, 0x4D, 0x10, 0x48, 0xC1, 0xE0, 0x20, 0x48, 0x33, 0x45, 0x20, 0x48, + 0x33, 0x45, 0x10, 0x48, 0x33, 0xC1, 0x48, 0xB9, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0x00, 0x00, 0x48, 0x23, 0xC1, 0x48, 0xB9, 0x33, 0xA2, 0xDF, + 0x2D, 0x99, 0x2B, 0x00, 0x00, 0x48, 0x3B, 0xC3, 0x48, 0x0F, 0x44, 0xC1, + 0x48, 0x89, 0x05, 0x21, 0x26, 0x00, 0x00, 0x48, 0x8B, 0x5C, 0x24, 0x48, + 0x48, 0xF7, 0xD0, 0x48, 0x89, 0x05, 0x0A, 0x26, 0x00, 0x00, 0x48, 0x83, + 0xC4, 0x20, 0x5D, 0xC3, 0x48, 0x8D, 0x0D, 0xBD, 0x2B, 0x00, 0x00, 0x48, + 0xFF, 0x25, 0x16, 0x16, 0x00, 0x00, 0xCC, 0xCC, 0x48, 0x8D, 0x0D, 0xAD, + 0x2B, 0x00, 0x00, 0xE9, 0x1E, 0x07, 0x00, 0x00, 0x48, 0x8D, 0x05, 0xB1, + 0x2B, 0x00, 0x00, 0xC3, 0x48, 0x8D, 0x05, 0xB1, 0x2B, 0x00, 0x00, 0xC3, + 0x48, 0x83, 0xEC, 0x28, 0xE8, 0xE7, 0xFF, 0xFF, 0xFF, 0x48, 0x83, 0x08, + 0x04, 0xE8, 0xE6, 0xFF, 0xFF, 0xFF, 0x48, 0x83, 0x08, 0x02, 0x48, 0x83, + 0xC4, 0x28, 0xC3, 0xCC, 0x48, 0x83, 0xEC, 0x28, 0xE8, 0xCB, 0x06, 0x00, + 0x00, 0x85, 0xC0, 0x74, 0x21, 0x65, 0x48, 0x8B, 0x04, 0x25, 0x30, 0x00, + 0x00, 0x00, 0x48, 0x8B, 0x48, 0x08, 0xEB, 0x05, 0x48, 0x3B, 0xC8, 0x74, + 0x14, 0x33, 0xC0, 0xF0, 0x48, 0x0F, 0xB1, 0x0D, 0x78, 0x2B, 0x00, 0x00, + 0x75, 0xEE, 0x32, 0xC0, 0x48, 0x83, 0xC4, 0x28, 0xC3, 0xB0, 0x01, 0xEB, + 0xF7, 0xCC, 0xCC, 0xCC, 0x48, 0x83, 0xEC, 0x28, 0xE8, 0x8F, 0x06, 0x00, + 0x00, 0x85, 0xC0, 0x74, 0x07, 0xE8, 0x02, 0x05, 0x00, 0x00, 0xEB, 0x19, + 0xE8, 0x77, 0x06, 0x00, 0x00, 0x8B, 0xC8, 0xE8, 0xB4, 0x06, 0x00, 0x00, + 0x85, 0xC0, 0x74, 0x04, 0x32, 0xC0, 0xEB, 0x07, 0xE8, 0xAD, 0x06, 0x00, + 0x00, 0xB0, 0x01, 0x48, 0x83, 0xC4, 0x28, 0xC3, 0x48, 0x83, 0xEC, 0x28, + 0x33, 0xC9, 0xE8, 0x3D, 0x01, 0x00, 0x00, 0x84, 0xC0, 0x0F, 0x95, 0xC0, + 0x48, 0x83, 0xC4, 0x28, 0xC3, 0xCC, 0xCC, 0xCC, 0x48, 0x83, 0xEC, 0x28, + 0xE8, 0xA3, 0x06, 0x00, 0x00, 0x84, 0xC0, 0x75, 0x04, 0x32, 0xC0, 0xEB, + 0x12, 0xE8, 0x96, 0x06, 0x00, 0x00, 0x84, 0xC0, 0x75, 0x07, 0xE8, 0x8D, + 0x06, 0x00, 0x00, 0xEB, 0xEC, 0xB0, 0x01, 0x48, 0x83, 0xC4, 0x28, 0xC3, + 0x48, 0x83, 0xEC, 0x28, 0xE8, 0x7B, 0x06, 0x00, 0x00, 0xE8, 0x76, 0x06, + 0x00, 0x00, 0xB0, 0x01, 0x48, 0x83, 0xC4, 0x28, 0xC3, 0xCC, 0xCC, 0xCC, + 0x48, 0x89, 0x5C, 0x24, 0x08, 0x48, 0x89, 0x6C, 0x24, 0x10, 0x48, 0x89, + 0x74, 0x24, 0x18, 0x57, 0x48, 0x83, 0xEC, 0x20, 0x49, 0x8B, 0xF9, 0x49, + 0x8B, 0xF0, 0x8B, 0xDA, 0x48, 0x8B, 0xE9, 0xE8, 0xE8, 0x05, 0x00, 0x00, + 0x85, 0xC0, 0x75, 0x16, 0x83, 0xFB, 0x01, 0x75, 0x11, 0x4C, 0x8B, 0xC6, + 0x33, 0xD2, 0x48, 0x8B, 0xCD, 0x48, 0x8B, 0xC7, 0xFF, 0x15, 0xB6, 0x15, + 0x00, 0x00, 0x48, 0x8B, 0x54, 0x24, 0x58, 0x8B, 0x4C, 0x24, 0x50, 0x48, + 0x8B, 0x5C, 0x24, 0x30, 0x48, 0x8B, 0x6C, 0x24, 0x38, 0x48, 0x8B, 0x74, + 0x24, 0x40, 0x48, 0x83, 0xC4, 0x20, 0x5F, 0xE9, 0xE2, 0x05, 0x00, 0x00, + 0x48, 0x83, 0xEC, 0x28, 0xE8, 0xA3, 0x05, 0x00, 0x00, 0x85, 0xC0, 0x74, + 0x10, 0x48, 0x8D, 0x0D, 0x78, 0x2A, 0x00, 0x00, 0x48, 0x83, 0xC4, 0x28, + 0xE9, 0xDD, 0x05, 0x00, 0x00, 0xE8, 0xE2, 0xF5, 0xFF, 0xFF, 0x85, 0xC0, + 0x75, 0x05, 0xE8, 0xD5, 0x05, 0x00, 0x00, 0x48, 0x83, 0xC4, 0x28, 0xC3, + 0x48, 0x83, 0xEC, 0x28, 0x33, 0xC9, 0xE8, 0xD1, 0x05, 0x00, 0x00, 0x48, + 0x83, 0xC4, 0x28, 0xE9, 0xC8, 0x05, 0x00, 0x00, 0x40, 0x53, 0x48, 0x83, + 0xEC, 0x20, 0x0F, 0xB6, 0x05, 0x33, 0x2A, 0x00, 0x00, 0x85, 0xC9, 0xBB, + 0x01, 0x00, 0x00, 0x00, 0x0F, 0x44, 0xC3, 0x88, 0x05, 0x23, 0x2A, 0x00, + 0x00, 0xE8, 0xC2, 0x03, 0x00, 0x00, 0xE8, 0xA1, 0x05, 0x00, 0x00, 0x84, + 0xC0, 0x75, 0x04, 0x32, 0xC0, 0xEB, 0x14, 0xE8, 0x94, 0x05, 0x00, 0x00, + 0x84, 0xC0, 0x75, 0x09, 0x33, 0xC9, 0xE8, 0x89, 0x05, 0x00, 0x00, 0xEB, + 0xEA, 0x8A, 0xC3, 0x48, 0x83, 0xC4, 0x20, 0x5B, 0xC3, 0xCC, 0xCC, 0xCC, + 0x40, 0x53, 0x48, 0x83, 0xEC, 0x40, 0x80, 0x3D, 0xE8, 0x29, 0x00, 0x00, + 0x00, 0x8B, 0xD9, 0x0F, 0x85, 0xB0, 0x00, 0x00, 0x00, 0x83, 0xF9, 0x01, + 0x0F, 0x87, 0xAF, 0x00, 0x00, 0x00, 0xE8, 0xF9, 0x04, 0x00, 0x00, 0x85, + 0xC0, 0x74, 0x28, 0x85, 0xDB, 0x75, 0x24, 0x48, 0x8D, 0x0D, 0xCA, 0x29, + 0x00, 0x00, 0xE8, 0x2D, 0x05, 0x00, 0x00, 0x85, 0xC0, 0x75, 0x10, 0x48, + 0x8D, 0x0D, 0xD2, 0x29, 0x00, 0x00, 0xE8, 0x1D, 0x05, 0x00, 0x00, 0x85, + 0xC0, 0x74, 0x73, 0x32, 0xC0, 0xEB, 0x78, 0x48, 0x8B, 0x15, 0xB6, 0x23, + 0x00, 0x00, 0xB9, 0x40, 0x00, 0x00, 0x00, 0x8B, 0xC2, 0x83, 0xE0, 0x3F, + 0x2B, 0xC8, 0x48, 0x83, 0xC8, 0xFF, 0x48, 0xD3, 0xC8, 0x48, 0x33, 0xC2, + 0x48, 0x89, 0x44, 0x24, 0x20, 0x48, 0x89, 0x44, 0x24, 0x28, 0x0F, 0x10, + 0x44, 0x24, 0x20, 0x48, 0x89, 0x44, 0x24, 0x30, 0xF2, 0x0F, 0x10, 0x4C, + 0x24, 0x30, 0x0F, 0x11, 0x05, 0x6F, 0x29, 0x00, 0x00, 0x48, 0x89, 0x44, + 0x24, 0x20, 0x48, 0x89, 0x44, 0x24, 0x28, 0x0F, 0x10, 0x44, 0x24, 0x20, + 0x48, 0x89, 0x44, 0x24, 0x30, 0xF2, 0x0F, 0x11, 0x0D, 0x63, 0x29, 0x00, + 0x00, 0xF2, 0x0F, 0x10, 0x4C, 0x24, 0x30, 0x0F, 0x11, 0x05, 0x5E, 0x29, + 0x00, 0x00, 0xF2, 0x0F, 0x11, 0x0D, 0x66, 0x29, 0x00, 0x00, 0xC6, 0x05, + 0x30, 0x29, 0x00, 0x00, 0x01, 0xB0, 0x01, 0x48, 0x83, 0xC4, 0x40, 0x5B, + 0xC3, 0xB9, 0x05, 0x00, 0x00, 0x00, 0xE8, 0xFD, 0x00, 0x00, 0x00, 0xCC, + 0x48, 0x83, 0xEC, 0x18, 0x4C, 0x8B, 0xC1, 0xB8, 0x4D, 0x5A, 0x00, 0x00, + 0x66, 0x39, 0x05, 0x19, 0xE3, 0xFF, 0xFF, 0x75, 0x79, 0x48, 0x63, 0x05, + 0x4C, 0xE3, 0xFF, 0xFF, 0x48, 0x8D, 0x15, 0x09, 0xE3, 0xFF, 0xFF, 0x48, + 0x8D, 0x0C, 0x10, 0x81, 0x39, 0x50, 0x45, 0x00, 0x00, 0x75, 0x5F, 0xB8, + 0x0B, 0x02, 0x00, 0x00, 0x66, 0x39, 0x41, 0x18, 0x75, 0x54, 0x4C, 0x2B, + 0xC2, 0x0F, 0xB7, 0x41, 0x14, 0x48, 0x8D, 0x51, 0x18, 0x48, 0x03, 0xD0, + 0x0F, 0xB7, 0x41, 0x06, 0x48, 0x8D, 0x0C, 0x80, 0x4C, 0x8D, 0x0C, 0xCA, + 0x48, 0x89, 0x14, 0x24, 0x49, 0x3B, 0xD1, 0x74, 0x18, 0x8B, 0x4A, 0x0C, + 0x4C, 0x3B, 0xC1, 0x72, 0x0A, 0x8B, 0x42, 0x08, 0x03, 0xC1, 0x4C, 0x3B, + 0xC0, 0x72, 0x08, 0x48, 0x83, 0xC2, 0x28, 0xEB, 0xDF, 0x33, 0xD2, 0x48, + 0x85, 0xD2, 0x75, 0x04, 0x32, 0xC0, 0xEB, 0x14, 0x83, 0x7A, 0x24, 0x00, + 0x7D, 0x04, 0x32, 0xC0, 0xEB, 0x0A, 0xB0, 0x01, 0xEB, 0x06, 0x32, 0xC0, + 0xEB, 0x02, 0x32, 0xC0, 0x48, 0x83, 0xC4, 0x18, 0xC3, 0xCC, 0xCC, 0xCC, + 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x8A, 0xD9, 0xE8, 0x9B, 0x03, 0x00, + 0x00, 0x33, 0xD2, 0x85, 0xC0, 0x74, 0x0B, 0x84, 0xDB, 0x75, 0x07, 0x48, + 0x87, 0x15, 0x5A, 0x28, 0x00, 0x00, 0x48, 0x83, 0xC4, 0x20, 0x5B, 0xC3, + 0x40, 0x53, 0x48, 0x83, 0xEC, 0x20, 0x80, 0x3D, 0x4F, 0x28, 0x00, 0x00, + 0x00, 0x8A, 0xD9, 0x74, 0x04, 0x84, 0xD2, 0x75, 0x0E, 0x8A, 0xCB, 0xE8, + 0xC8, 0x03, 0x00, 0x00, 0x8A, 0xCB, 0xE8, 0xC1, 0x03, 0x00, 0x00, 0xB0, + 0x01, 0x48, 0x83, 0xC4, 0x20, 0x5B, 0xC3, 0xCC, 0x48, 0x8D, 0x05, 0x71, + 0x28, 0x00, 0x00, 0xC3, 0x83, 0x25, 0x59, 0x28, 0x00, 0x00, 0x00, 0xC3, + 0x48, 0x89, 0x5C, 0x24, 0x08, 0x55, 0x48, 0x8D, 0xAC, 0x24, 0x40, 0xFB, + 0xFF, 0xFF, 0x48, 0x81, 0xEC, 0xC0, 0x05, 0x00, 0x00, 0x8B, 0xD9, 0xB9, + 0x17, 0x00, 0x00, 0x00, 0xE8, 0x81, 0x03, 0x00, 0x00, 0x85, 0xC0, 0x74, + 0x04, 0x8B, 0xCB, 0xCD, 0x29, 0xB9, 0x03, 0x00, 0x00, 0x00, 0xE8, 0xC5, + 0xFF, 0xFF, 0xFF, 0x33, 0xD2, 0x48, 0x8D, 0x4D, 0xF0, 0x41, 0xB8, 0xD0, + 0x04, 0x00, 0x00, 0xE8, 0x28, 0x03, 0x00, 0x00, 0x48, 0x8D, 0x4D, 0xF0, + 0xFF, 0x15, 0x62, 0x12, 0x00, 0x00, 0x48, 0x8B, 0x9D, 0xE8, 0x00, 0x00, + 0x00, 0x48, 0x8D, 0x95, 0xD8, 0x04, 0x00, 0x00, 0x48, 0x8B, 0xCB, 0x45, + 0x33, 0xC0, 0xFF, 0x15, 0x40, 0x12, 0x00, 0x00, 0x48, 0x85, 0xC0, 0x74, + 0x3C, 0x48, 0x83, 0x64, 0x24, 0x38, 0x00, 0x48, 0x8D, 0x8D, 0xE0, 0x04, + 0x00, 0x00, 0x48, 0x8B, 0x95, 0xD8, 0x04, 0x00, 0x00, 0x4C, 0x8B, 0xC8, + 0x48, 0x89, 0x4C, 0x24, 0x30, 0x4C, 0x8B, 0xC3, 0x48, 0x8D, 0x8D, 0xE8, + 0x04, 0x00, 0x00, 0x48, 0x89, 0x4C, 0x24, 0x28, 0x48, 0x8D, 0x4D, 0xF0, + 0x48, 0x89, 0x4C, 0x24, 0x20, 0x33, 0xC9, 0xFF, 0x15, 0xF7, 0x11, 0x00, + 0x00, 0x48, 0x8B, 0x85, 0xC8, 0x04, 0x00, 0x00, 0x48, 0x8D, 0x4C, 0x24, + 0x50, 0x48, 0x89, 0x85, 0xE8, 0x00, 0x00, 0x00, 0x33, 0xD2, 0x48, 0x8D, + 0x85, 0xC8, 0x04, 0x00, 0x00, 0x41, 0xB8, 0x98, 0x00, 0x00, 0x00, 0x48, + 0x83, 0xC0, 0x08, 0x48, 0x89, 0x85, 0x88, 0x00, 0x00, 0x00, 0xE8, 0x91, + 0x02, 0x00, 0x00, 0x48, 0x8B, 0x85, 0xC8, 0x04, 0x00, 0x00, 0x48, 0x89, + 0x44, 0x24, 0x60, 0xC7, 0x44, 0x24, 0x50, 0x15, 0x00, 0x00, 0x40, 0xC7, + 0x44, 0x24, 0x54, 0x01, 0x00, 0x00, 0x00, 0xFF, 0x15, 0x4B, 0x11, 0x00, + 0x00, 0x83, 0xF8, 0x01, 0x48, 0x8D, 0x44, 0x24, 0x50, 0x48, 0x89, 0x44, + 0x24, 0x40, 0x48, 0x8D, 0x45, 0xF0, 0x0F, 0x94, 0xC3, 0x48, 0x89, 0x44, + 0x24, 0x48, 0x33, 0xC9, 0xFF, 0x15, 0x72, 0x11, 0x00, 0x00, 0x48, 0x8D, + 0x4C, 0x24, 0x40, 0xFF, 0x15, 0x6F, 0x11, 0x00, 0x00, 0x85, 0xC0, 0x75, + 0x0C, 0x84, 0xDB, 0x75, 0x08, 0x8D, 0x48, 0x03, 0xE8, 0xBF, 0xFE, 0xFF, + 0xFF, 0x48, 0x8B, 0x9C, 0x24, 0xD0, 0x05, 0x00, 0x00, 0x48, 0x81, 0xC4, + 0xC0, 0x05, 0x00, 0x00, 0x5D, 0xC3, 0xCC, 0xCC, 0x48, 0x89, 0x5C, 0x24, + 0x08, 0x57, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8D, 0x1D, 0x4B, 0x17, 0x00, + 0x00, 0x48, 0x8D, 0x3D, 0x44, 0x17, 0x00, 0x00, 0xEB, 0x12, 0x48, 0x8B, + 0x03, 0x48, 0x85, 0xC0, 0x74, 0x06, 0xFF, 0x15, 0xBC, 0x11, 0x00, 0x00, + 0x48, 0x83, 0xC3, 0x08, 0x48, 0x3B, 0xDF, 0x72, 0xE9, 0x48, 0x8B, 0x5C, + 0x24, 0x30, 0x48, 0x83, 0xC4, 0x20, 0x5F, 0xC3, 0x48, 0x89, 0x5C, 0x24, + 0x08, 0x57, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8D, 0x1D, 0x1F, 0x17, 0x00, + 0x00, 0x48, 0x8D, 0x3D, 0x18, 0x17, 0x00, 0x00, 0xEB, 0x12, 0x48, 0x8B, + 0x03, 0x48, 0x85, 0xC0, 0x74, 0x06, 0xFF, 0x15, 0x80, 0x11, 0x00, 0x00, + 0x48, 0x83, 0xC3, 0x08, 0x48, 0x3B, 0xDF, 0x72, 0xE9, 0x48, 0x8B, 0x5C, + 0x24, 0x30, 0x48, 0x83, 0xC4, 0x20, 0x5F, 0xC3, 0x48, 0x89, 0x5C, 0x24, + 0x10, 0x48, 0x89, 0x74, 0x24, 0x18, 0x57, 0x48, 0x83, 0xEC, 0x10, 0x33, + 0xC0, 0xC7, 0x05, 0x6D, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x33, + 0xC9, 0xC7, 0x05, 0x5D, 0x20, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, + 0xA2, 0x44, 0x8B, 0xC1, 0x33, 0xFF, 0x44, 0x8B, 0xCB, 0x41, 0x81, 0xF0, + 0x6E, 0x74, 0x65, 0x6C, 0x41, 0x81, 0xF1, 0x47, 0x65, 0x6E, 0x75, 0x44, + 0x8B, 0xD2, 0x8B, 0xF0, 0x33, 0xC9, 0x8D, 0x47, 0x01, 0x45, 0x0B, 0xC8, + 0x0F, 0xA2, 0x41, 0x81, 0xF2, 0x69, 0x6E, 0x65, 0x49, 0x89, 0x04, 0x24, + 0x45, 0x0B, 0xCA, 0x89, 0x5C, 0x24, 0x04, 0x44, 0x8B, 0xD9, 0x89, 0x4C, + 0x24, 0x08, 0x89, 0x54, 0x24, 0x0C, 0x75, 0x50, 0x48, 0x83, 0x0D, 0x18, + 0x20, 0x00, 0x00, 0xFF, 0x25, 0xF0, 0x3F, 0xFF, 0x0F, 0x3D, 0xC0, 0x06, + 0x01, 0x00, 0x74, 0x28, 0x3D, 0x60, 0x06, 0x02, 0x00, 0x74, 0x21, 0x3D, + 0x70, 0x06, 0x02, 0x00, 0x74, 0x1A, 0x05, 0xB0, 0xF9, 0xFC, 0xFF, 0x83, + 0xF8, 0x20, 0x77, 0x24, 0x48, 0xB9, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x48, 0x0F, 0xA3, 0xC1, 0x73, 0x14, 0x44, 0x8B, 0x05, 0xE9, + 0x25, 0x00, 0x00, 0x41, 0x83, 0xC8, 0x01, 0x44, 0x89, 0x05, 0xDE, 0x25, + 0x00, 0x00, 0xEB, 0x07, 0x44, 0x8B, 0x05, 0xD5, 0x25, 0x00, 0x00, 0xB8, + 0x07, 0x00, 0x00, 0x00, 0x3B, 0xF0, 0x7C, 0x26, 0x33, 0xC9, 0x0F, 0xA2, + 0x89, 0x04, 0x24, 0x8B, 0xFB, 0x89, 0x5C, 0x24, 0x04, 0x89, 0x4C, 0x24, + 0x08, 0x89, 0x54, 0x24, 0x0C, 0x0F, 0xBA, 0xE3, 0x09, 0x73, 0x0B, 0x41, + 0x83, 0xC8, 0x02, 0x44, 0x89, 0x05, 0xA6, 0x25, 0x00, 0x00, 0x41, 0x0F, + 0xBA, 0xE3, 0x14, 0x73, 0x70, 0xC7, 0x05, 0x81, 0x1F, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0xC7, 0x05, 0x7B, 0x1F, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x00, 0x41, 0x0F, 0xBA, 0xE3, 0x1B, 0x73, 0x55, 0x41, 0x0F, 0xBA, 0xE3, + 0x1C, 0x73, 0x4E, 0x33, 0xC9, 0x0F, 0x01, 0xD0, 0x48, 0xC1, 0xE2, 0x20, + 0x48, 0x0B, 0xD0, 0x48, 0x89, 0x54, 0x24, 0x20, 0x48, 0x8B, 0x44, 0x24, + 0x20, 0x24, 0x06, 0x3C, 0x06, 0x75, 0x32, 0x8B, 0x05, 0x4B, 0x1F, 0x00, + 0x00, 0x83, 0xC8, 0x08, 0xC7, 0x05, 0x3A, 0x1F, 0x00, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x89, 0x05, 0x38, 0x1F, 0x00, 0x00, 0x40, 0xF6, 0xC7, 0x20, + 0x74, 0x13, 0x83, 0xC8, 0x20, 0xC7, 0x05, 0x21, 0x1F, 0x00, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x89, 0x05, 0x1F, 0x1F, 0x00, 0x00, 0x48, 0x8B, 0x5C, + 0x24, 0x28, 0x33, 0xC0, 0x48, 0x8B, 0x74, 0x24, 0x30, 0x48, 0x83, 0xC4, + 0x10, 0x5F, 0xC3, 0xCC, 0xB8, 0x01, 0x00, 0x00, 0x00, 0xC3, 0xCC, 0xCC, + 0x33, 0xC0, 0x39, 0x05, 0x10, 0x1F, 0x00, 0x00, 0x0F, 0x95, 0xC0, 0xC3, + 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xFF, 0x25, 0x5A, 0x0F, 0x00, 0x00, 0xFF, 0x25, 0x64, 0x0F, 0x00, 0x00, + 0xFF, 0x25, 0x56, 0x0F, 0x00, 0x00, 0xFF, 0x25, 0x88, 0x0F, 0x00, 0x00, + 0xFF, 0x25, 0x7A, 0x0F, 0x00, 0x00, 0xFF, 0x25, 0x6C, 0x0F, 0x00, 0x00, + 0xFF, 0x25, 0x5E, 0x0F, 0x00, 0x00, 0xFF, 0x25, 0x80, 0x0F, 0x00, 0x00, + 0xFF, 0x25, 0x4A, 0x0F, 0x00, 0x00, 0xFF, 0x25, 0x6C, 0x0F, 0x00, 0x00, + 0xFF, 0x25, 0x76, 0x0F, 0x00, 0x00, 0xFF, 0x25, 0xD0, 0x0E, 0x00, 0x00, + 0xB0, 0x01, 0xC3, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, + 0xCC, 0xCC, 0x66, 0x66, 0x0F, 0x1F, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xE0, 0x40, 0x55, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, 0xEA, 0x8A, + 0x4D, 0x40, 0x48, 0x83, 0xC4, 0x20, 0x5D, 0xE9, 0xC8, 0xFB, 0xFF, 0xFF, + 0xCC, 0x40, 0x55, 0x48, 0x83, 0xEC, 0x20, 0x48, 0x8B, 0xEA, 0xE8, 0xE5, + 0xF9, 0xFF, 0xFF, 0x8A, 0x4D, 0x38, 0x48, 0x83, 0xC4, 0x20, 0x5D, 0xE9, + 0xAC, 0xFB, 0xFF, 0xFF, 0xCC, 0x40, 0x55, 0x48, 0x83, 0xEC, 0x30, 0x48, + 0x8B, 0xEA, 0x48, 0x8B, 0x01, 0x8B, 0x10, 0x48, 0x89, 0x4C, 0x24, 0x28, + 0x89, 0x54, 0x24, 0x20, 0x4C, 0x8D, 0x0D, 0x81, 0xF2, 0xFF, 0xFF, 0x4C, + 0x8B, 0x45, 0x70, 0x8B, 0x55, 0x68, 0x48, 0x8B, 0x4D, 0x60, 0xE8, 0x19, + 0xF9, 0xFF, 0xFF, 0x90, 0x48, 0x83, 0xC4, 0x30, 0x5D, 0xC3, 0xCC, 0x40, + 0x55, 0x48, 0x8B, 0xEA, 0x48, 0x8B, 0x01, 0x33, 0xC9, 0x81, 0x38, 0x05, + 0x00, 0x00, 0xC0, 0x0F, 0x94, 0xC1, 0x8B, 0xC1, 0x5D, 0xC3, 0xCC, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0x3D, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x62, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xD2, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBC, 0x3F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xA2, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x8C, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x3F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x5C, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0x3F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x18, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFA, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, 0x3E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xCA, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xB0, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x3E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB8, 0x3D, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x98, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xEE, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x3D, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xD4, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x58, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A, 0x3E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x70, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x10, 0x00, 0x80, + 0x01, 0x00, 0x00, 0x00, 0x90, 0x21, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x00, 0x80, + 0x01, 0x00, 0x00, 0x00, 0xF0, 0x40, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x00, 0x00, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69, + 0x6F, 0x6E, 0x61, 0x6C, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x00, 0x00, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x55, 0x6E, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x6E, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6E, 0x69, 0x74, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x6E, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x75, + 0x73, 0x68, 0x36, 0x34, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x43, 0x61, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x67, 0x65, 0x74, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x50, 0x74, 0x72, + 0x00, 0x00, 0x00, 0x00, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x57, 0x61, + 0x69, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6B, 0x65, 0x79, 0x62, + 0x6F, 0x61, 0x72, 0x64, 0x48, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x72, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x00, 0x6B, 0x65, 0x79, 0x62, + 0x6F, 0x61, 0x72, 0x64, 0x48, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x72, 0x55, + 0x6E, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x67, 0x65, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x48, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x42, 0x61, 0x73, 0x65, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x6E, 0x74, 0x43, 0x61, 0x6C, 0x6C, 0x62, + 0x61, 0x63, 0x6B, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x00, + 0x70, 0x72, 0x65, 0x73, 0x65, 0x6E, 0x74, 0x43, 0x61, 0x6C, 0x6C, 0x62, + 0x61, 0x63, 0x6B, 0x55, 0x6E, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x6F, 0x72, 0x6C, + 0x64, 0x47, 0x65, 0x74, 0x41, 0x6C, 0x6C, 0x56, 0x65, 0x68, 0x69, 0x63, + 0x6C, 0x65, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x6F, 0x72, 0x6C, + 0x64, 0x47, 0x65, 0x74, 0x41, 0x6C, 0x6C, 0x50, 0x65, 0x64, 0x73, 0x00, + 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x47, 0x65, 0x74, 0x41, 0x6C, 0x6C, 0x4F, + 0x62, 0x6A, 0x65, 0x63, 0x74, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x47, 0x65, 0x74, 0x41, 0x6C, 0x6C, 0x50, + 0x69, 0x63, 0x6B, 0x75, 0x70, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0E, 0x32, 0x58, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x40, 0x02, 0x00, 0x00, 0x30, 0x34, 0x00, 0x00, 0x30, 0x1C, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0E, 0x32, 0x58, 0x5E, 0x00, 0x00, 0x00, 0x00, + 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0x30, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x31, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x47, 0x43, 0x54, 0x4C, 0x00, 0x10, 0x00, 0x00, + 0x80, 0x11, 0x00, 0x00, 0x2E, 0x74, 0x65, 0x78, 0x74, 0x24, 0x6D, 0x6E, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x2E, 0x74, 0x65, 0x78, 0x74, 0x24, 0x6D, 0x6E, 0x24, 0x30, 0x30, 0x00, + 0x92, 0x21, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x2E, 0x74, 0x65, 0x78, + 0x74, 0x24, 0x78, 0x00, 0x00, 0x30, 0x00, 0x00, 0xF8, 0x00, 0x00, 0x00, + 0x2E, 0x69, 0x64, 0x61, 0x74, 0x61, 0x24, 0x35, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0x30, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2E, 0x30, 0x30, 0x63, + 0x66, 0x67, 0x00, 0x00, 0x08, 0x31, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x2E, 0x43, 0x52, 0x54, 0x24, 0x58, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x31, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x2E, 0x43, 0x52, 0x54, + 0x24, 0x58, 0x43, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x18, 0x31, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x2E, 0x43, 0x52, 0x54, 0x24, 0x58, 0x49, 0x41, + 0x00, 0x00, 0x00, 0x00, 0x20, 0x31, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x2E, 0x43, 0x52, 0x54, 0x24, 0x58, 0x49, 0x5A, 0x00, 0x00, 0x00, 0x00, + 0x28, 0x31, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x2E, 0x43, 0x52, 0x54, + 0x24, 0x58, 0x50, 0x41, 0x00, 0x00, 0x00, 0x00, 0x30, 0x31, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x2E, 0x43, 0x52, 0x54, 0x24, 0x58, 0x50, 0x5A, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x31, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x2E, 0x43, 0x52, 0x54, 0x24, 0x58, 0x54, 0x41, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x31, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2E, 0x43, 0x52, 0x54, + 0x24, 0x58, 0x54, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x50, 0x31, 0x00, 0x00, + 0xE0, 0x02, 0x00, 0x00, 0x2E, 0x72, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, + 0x30, 0x34, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x2E, 0x72, 0x64, 0x61, + 0x74, 0x61, 0x24, 0x7A, 0x7A, 0x7A, 0x64, 0x62, 0x67, 0x00, 0x00, 0x00, + 0x70, 0x36, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x2E, 0x72, 0x74, 0x63, + 0x24, 0x49, 0x41, 0x41, 0x00, 0x00, 0x00, 0x00, 0x78, 0x36, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x2E, 0x72, 0x74, 0x63, 0x24, 0x49, 0x5A, 0x5A, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x36, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x2E, 0x72, 0x74, 0x63, 0x24, 0x54, 0x41, 0x41, 0x00, 0x00, 0x00, 0x00, + 0x88, 0x36, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x2E, 0x72, 0x74, 0x63, + 0x24, 0x54, 0x5A, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x90, 0x36, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x2E, 0x78, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, + 0x10, 0x38, 0x00, 0x00, 0xF0, 0x03, 0x00, 0x00, 0x2E, 0x65, 0x64, 0x61, + 0x74, 0x61, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, + 0x2E, 0x69, 0x64, 0x61, 0x74, 0x61, 0x24, 0x32, 0x00, 0x00, 0x00, 0x00, + 0x3C, 0x3C, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x2E, 0x69, 0x64, 0x61, + 0x74, 0x61, 0x24, 0x33, 0x00, 0x00, 0x00, 0x00, 0x50, 0x3C, 0x00, 0x00, + 0xF8, 0x00, 0x00, 0x00, 0x2E, 0x69, 0x64, 0x61, 0x74, 0x61, 0x24, 0x34, + 0x00, 0x00, 0x00, 0x00, 0x48, 0x3D, 0x00, 0x00, 0x9E, 0x02, 0x00, 0x00, + 0x2E, 0x69, 0x64, 0x61, 0x74, 0x61, 0x24, 0x36, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x2E, 0x64, 0x61, 0x74, + 0x61, 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, + 0x2E, 0x62, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, + 0x70, 0x02, 0x00, 0x00, 0x2E, 0x70, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, + 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x2E, 0x72, 0x73, 0x72, + 0x63, 0x24, 0x30, 0x31, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x80, 0x01, 0x00, 0x00, 0x2E, 0x72, 0x73, 0x72, 0x63, 0x24, 0x30, 0x32, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x0A, 0x04, 0x00, 0x0A, 0x34, 0x06, 0x00, 0x0A, 0x32, 0x06, 0x70, + 0x01, 0x06, 0x02, 0x00, 0x06, 0x32, 0x02, 0x30, 0x01, 0x04, 0x01, 0x00, + 0x04, 0x42, 0x00, 0x00, 0x01, 0x04, 0x01, 0x00, 0x04, 0x62, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x15, 0x08, 0x00, + 0x15, 0x74, 0x09, 0x00, 0x15, 0x64, 0x07, 0x00, 0x15, 0x34, 0x06, 0x00, + 0x15, 0x32, 0x11, 0xE0, 0x30, 0x21, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x15, 0x00, 0x00, 0x6F, 0x15, 0x00, 0x00, 0x92, 0x21, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xC1, 0x15, 0x00, 0x00, 0xCC, 0x15, 0x00, 0x00, + 0x92, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x02, 0x00, + 0x06, 0x32, 0x02, 0x50, 0x11, 0x0F, 0x06, 0x00, 0x0F, 0x64, 0x08, 0x00, + 0x0F, 0x34, 0x06, 0x00, 0x0F, 0x32, 0x0B, 0x70, 0x30, 0x21, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x14, 0x16, 0x00, 0x00, 0x32, 0x16, 0x00, 0x00, + 0xA9, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x16, 0x00, 0x00, + 0x5D, 0x16, 0x00, 0x00, 0xA9, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x1A, 0x06, 0x00, 0x1A, 0x34, 0x0F, 0x00, 0x1A, 0x72, 0x16, 0xE0, + 0x14, 0x70, 0x13, 0x60, 0x30, 0x21, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x95, 0x16, 0x00, 0x00, 0x7D, 0x17, 0x00, 0x00, 0xC5, 0x21, 0x00, 0x00, + 0x7D, 0x17, 0x00, 0x00, 0x01, 0x06, 0x02, 0x00, 0x06, 0x52, 0x02, 0x50, + 0x01, 0x0F, 0x06, 0x00, 0x0F, 0x64, 0x07, 0x00, 0x0F, 0x34, 0x06, 0x00, + 0x0F, 0x32, 0x0B, 0x70, 0x01, 0x09, 0x01, 0x00, 0x09, 0x62, 0x00, 0x00, + 0x01, 0x08, 0x04, 0x00, 0x08, 0x72, 0x04, 0x70, 0x03, 0x60, 0x02, 0x30, + 0x01, 0x0D, 0x04, 0x00, 0x0D, 0x34, 0x09, 0x00, 0x0D, 0x32, 0x06, 0x50, + 0x09, 0x04, 0x01, 0x00, 0x04, 0x22, 0x00, 0x00, 0x30, 0x21, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0xDB, 0x1C, 0x00, 0x00, 0x66, 0x1D, 0x00, 0x00, + 0xFB, 0x21, 0x00, 0x00, 0x66, 0x1D, 0x00, 0x00, 0x01, 0x02, 0x01, 0x00, + 0x02, 0x50, 0x00, 0x00, 0x01, 0x06, 0x02, 0x00, 0x06, 0x72, 0x02, 0x30, + 0x01, 0x14, 0x08, 0x00, 0x14, 0x64, 0x08, 0x00, 0x14, 0x54, 0x07, 0x00, + 0x14, 0x34, 0x06, 0x00, 0x14, 0x32, 0x10, 0x70, 0x01, 0x15, 0x05, 0x00, + 0x15, 0x34, 0xBA, 0x00, 0x15, 0x01, 0xB8, 0x00, 0x06, 0x50, 0x00, 0x00, + 0x01, 0x0F, 0x06, 0x00, 0x0F, 0x64, 0x06, 0x00, 0x0F, 0x34, 0x05, 0x00, + 0x0F, 0x12, 0x0B, 0x70, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0x0A, 0x39, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x8C, 0x38, 0x00, 0x00, + 0xE0, 0x38, 0x00, 0x00, 0x70, 0x11, 0x00, 0x00, 0xB0, 0x10, 0x00, 0x00, + 0x10, 0x12, 0x00, 0x00, 0x40, 0x11, 0x00, 0x00, 0x20, 0x12, 0x00, 0x00, + 0xB0, 0x11, 0x00, 0x00, 0xE0, 0x11, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, + 0xC0, 0x10, 0x00, 0x00, 0xF0, 0x10, 0x00, 0x00, 0x50, 0x12, 0x00, 0x00, + 0x80, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, + 0xB0, 0x10, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x80, 0x11, 0x00, 0x00, + 0x30, 0x13, 0x00, 0x00, 0xF0, 0x12, 0x00, 0x00, 0x70, 0x13, 0x00, 0x00, + 0xB0, 0x12, 0x00, 0x00, 0x1D, 0x39, 0x00, 0x00, 0x37, 0x39, 0x00, 0x00, + 0x5B, 0x39, 0x00, 0x00, 0x83, 0x39, 0x00, 0x00, 0x9D, 0x39, 0x00, 0x00, + 0xC4, 0x39, 0x00, 0x00, 0xF1, 0x39, 0x00, 0x00, 0x20, 0x3A, 0x00, 0x00, + 0x37, 0x3A, 0x00, 0x00, 0x4C, 0x3A, 0x00, 0x00, 0x63, 0x3A, 0x00, 0x00, + 0x8D, 0x3A, 0x00, 0x00, 0xB9, 0x3A, 0x00, 0x00, 0xE7, 0x3A, 0x00, 0x00, + 0x25, 0x3B, 0x00, 0x00, 0x44, 0x3B, 0x00, 0x00, 0x6E, 0x3B, 0x00, 0x00, + 0x82, 0x3B, 0x00, 0x00, 0xA2, 0x3B, 0x00, 0x00, 0xBF, 0x3B, 0x00, 0x00, + 0xDF, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, + 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, + 0x0A, 0x00, 0x0B, 0x00, 0x0C, 0x00, 0x0D, 0x00, 0x0E, 0x00, 0x0F, 0x00, + 0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x53, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x48, 0x6F, 0x6F, 0x6B, 0x56, 0x2E, 0x64, 0x6C, + 0x6C, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x40, 0x40, 0x59, 0x41, 0x48, + 0x50, 0x45, 0x42, 0x44, 0x40, 0x5A, 0x00, 0x3F, 0x64, 0x72, 0x61, 0x77, + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x40, 0x40, 0x59, 0x41, 0x58, + 0x48, 0x48, 0x48, 0x48, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, 0x4D, + 0x4D, 0x4D, 0x4D, 0x4D, 0x40, 0x5A, 0x00, 0x3F, 0x67, 0x65, 0x74, 0x47, + 0x61, 0x6D, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x40, 0x40, + 0x59, 0x41, 0x3F, 0x41, 0x57, 0x34, 0x65, 0x47, 0x61, 0x6D, 0x65, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x40, 0x40, 0x58, 0x5A, 0x00, 0x3F, + 0x67, 0x65, 0x74, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x50, 0x74, 0x72, + 0x40, 0x40, 0x59, 0x41, 0x50, 0x45, 0x41, 0x5F, 0x4B, 0x48, 0x40, 0x5A, + 0x00, 0x3F, 0x67, 0x65, 0x74, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x48, + 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x42, 0x61, 0x73, 0x65, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x40, 0x40, 0x59, 0x41, 0x50, 0x45, 0x41, 0x45, + 0x48, 0x40, 0x5A, 0x00, 0x3F, 0x6B, 0x65, 0x79, 0x62, 0x6F, 0x61, 0x72, + 0x64, 0x48, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x40, 0x40, 0x59, 0x41, 0x58, 0x50, 0x36, 0x41, + 0x58, 0x4B, 0x47, 0x45, 0x48, 0x48, 0x48, 0x48, 0x40, 0x5A, 0x40, 0x5A, + 0x00, 0x3F, 0x6B, 0x65, 0x79, 0x62, 0x6F, 0x61, 0x72, 0x64, 0x48, 0x61, + 0x6E, 0x64, 0x6C, 0x65, 0x72, 0x55, 0x6E, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x40, 0x40, 0x59, 0x41, 0x58, 0x50, 0x36, 0x41, 0x58, + 0x4B, 0x47, 0x45, 0x48, 0x48, 0x48, 0x48, 0x40, 0x5A, 0x40, 0x5A, 0x00, + 0x3F, 0x6E, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 0x61, 0x6C, 0x6C, 0x40, + 0x40, 0x59, 0x41, 0x50, 0x45, 0x41, 0x5F, 0x4B, 0x58, 0x5A, 0x00, 0x3F, + 0x6E, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6E, 0x69, 0x74, 0x40, 0x40, + 0x59, 0x41, 0x58, 0x5F, 0x4B, 0x40, 0x5A, 0x00, 0x3F, 0x6E, 0x61, 0x74, + 0x69, 0x76, 0x65, 0x50, 0x75, 0x73, 0x68, 0x36, 0x34, 0x40, 0x40, 0x59, + 0x41, 0x58, 0x5F, 0x4B, 0x40, 0x5A, 0x00, 0x3F, 0x70, 0x72, 0x65, 0x73, + 0x65, 0x6E, 0x74, 0x43, 0x61, 0x6C, 0x6C, 0x62, 0x61, 0x63, 0x6B, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x40, 0x40, 0x59, 0x41, 0x58, + 0x50, 0x36, 0x41, 0x58, 0x50, 0x45, 0x41, 0x58, 0x40, 0x5A, 0x40, 0x5A, + 0x00, 0x3F, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6E, 0x74, 0x43, 0x61, 0x6C, + 0x6C, 0x62, 0x61, 0x63, 0x6B, 0x55, 0x6E, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x40, 0x40, 0x59, 0x41, 0x58, 0x50, 0x36, 0x41, 0x58, + 0x50, 0x45, 0x41, 0x58, 0x40, 0x5A, 0x40, 0x5A, 0x00, 0x3F, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x40, 0x40, 0x59, 0x41, 0x58, 0x50, 0x45, 0x41, 0x55, 0x48, 0x49, 0x4E, + 0x53, 0x54, 0x41, 0x4E, 0x43, 0x45, 0x5F, 0x5F, 0x40, 0x40, 0x50, 0x36, + 0x41, 0x58, 0x58, 0x5A, 0x40, 0x5A, 0x00, 0x3F, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x64, + 0x64, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x61, 0x6C, 0x54, 0x68, 0x72, 0x65, + 0x61, 0x64, 0x40, 0x40, 0x59, 0x41, 0x58, 0x50, 0x45, 0x41, 0x55, 0x48, + 0x49, 0x4E, 0x53, 0x54, 0x41, 0x4E, 0x43, 0x45, 0x5F, 0x5F, 0x40, 0x40, + 0x50, 0x36, 0x41, 0x58, 0x58, 0x5A, 0x40, 0x5A, 0x00, 0x3F, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x55, 0x6E, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x40, 0x40, 0x59, 0x41, 0x58, 0x50, 0x36, 0x41, 0x58, 0x58, + 0x5A, 0x40, 0x5A, 0x00, 0x3F, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x55, + 0x6E, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x40, 0x40, 0x59, + 0x41, 0x58, 0x50, 0x45, 0x41, 0x55, 0x48, 0x49, 0x4E, 0x53, 0x54, 0x41, + 0x4E, 0x43, 0x45, 0x5F, 0x5F, 0x40, 0x40, 0x40, 0x5A, 0x00, 0x3F, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x57, 0x61, 0x69, 0x74, 0x40, 0x40, 0x59, + 0x41, 0x58, 0x4B, 0x40, 0x5A, 0x00, 0x3F, 0x77, 0x6F, 0x72, 0x6C, 0x64, + 0x47, 0x65, 0x74, 0x41, 0x6C, 0x6C, 0x4F, 0x62, 0x6A, 0x65, 0x63, 0x74, + 0x73, 0x40, 0x40, 0x59, 0x41, 0x48, 0x50, 0x45, 0x41, 0x48, 0x48, 0x40, + 0x5A, 0x00, 0x3F, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x47, 0x65, 0x74, 0x41, + 0x6C, 0x6C, 0x50, 0x65, 0x64, 0x73, 0x40, 0x40, 0x59, 0x41, 0x48, 0x50, + 0x45, 0x41, 0x48, 0x48, 0x40, 0x5A, 0x00, 0x3F, 0x77, 0x6F, 0x72, 0x6C, + 0x64, 0x47, 0x65, 0x74, 0x41, 0x6C, 0x6C, 0x50, 0x69, 0x63, 0x6B, 0x75, + 0x70, 0x73, 0x40, 0x40, 0x59, 0x41, 0x48, 0x50, 0x45, 0x41, 0x48, 0x48, + 0x40, 0x5A, 0x00, 0x3F, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x47, 0x65, 0x74, + 0x41, 0x6C, 0x6C, 0x56, 0x65, 0x68, 0x69, 0x63, 0x6C, 0x65, 0x73, 0x40, + 0x40, 0x59, 0x41, 0x48, 0x50, 0x45, 0x41, 0x48, 0x48, 0x40, 0x5A, 0x00, + 0x50, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x72, 0x3D, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xE0, 0x3C, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC2, 0x3D, 0x00, 0x00, + 0x90, 0x30, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7A, 0x3E, 0x00, 0x00, 0xB0, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x3D, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x5A, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x62, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD2, 0x3F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xBC, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xA2, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x3F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x76, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5C, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x3F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2C, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFA, 0x3E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xDE, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xCA, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB0, 0x3E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x9C, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3D, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xB8, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x98, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEE, 0x3D, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xE0, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xD4, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x3E, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1A, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x70, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xB5, 0x02, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6F, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x00, 0x00, 0x8B, 0x05, + 0x53, 0x6C, 0x65, 0x65, 0x70, 0x00, 0xF2, 0x00, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x00, 0x00, 0x4B, 0x45, + 0x52, 0x4E, 0x45, 0x4C, 0x33, 0x32, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0x00, + 0x08, 0x00, 0x5F, 0x5F, 0x43, 0x5F, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, + 0x69, 0x63, 0x5F, 0x68, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x72, 0x00, 0x00, + 0x25, 0x00, 0x5F, 0x5F, 0x73, 0x74, 0x64, 0x5F, 0x74, 0x79, 0x70, 0x65, + 0x5F, 0x69, 0x6E, 0x66, 0x6F, 0x5F, 0x64, 0x65, 0x73, 0x74, 0x72, 0x6F, + 0x79, 0x5F, 0x6C, 0x69, 0x73, 0x74, 0x00, 0x00, 0x3E, 0x00, 0x6D, 0x65, + 0x6D, 0x73, 0x65, 0x74, 0x00, 0x00, 0x56, 0x43, 0x52, 0x55, 0x4E, 0x54, + 0x49, 0x4D, 0x45, 0x31, 0x34, 0x30, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0x00, + 0x36, 0x00, 0x5F, 0x69, 0x6E, 0x69, 0x74, 0x74, 0x65, 0x72, 0x6D, 0x00, + 0x37, 0x00, 0x5F, 0x69, 0x6E, 0x69, 0x74, 0x74, 0x65, 0x72, 0x6D, 0x5F, + 0x65, 0x00, 0x3F, 0x00, 0x5F, 0x73, 0x65, 0x68, 0x5F, 0x66, 0x69, 0x6C, + 0x74, 0x65, 0x72, 0x5F, 0x64, 0x6C, 0x6C, 0x00, 0x18, 0x00, 0x5F, 0x63, + 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x5F, 0x6E, 0x61, 0x72, + 0x72, 0x6F, 0x77, 0x5F, 0x61, 0x72, 0x67, 0x76, 0x00, 0x00, 0x33, 0x00, + 0x5F, 0x69, 0x6E, 0x69, 0x74, 0x69, 0x61, 0x6C, 0x69, 0x7A, 0x65, 0x5F, + 0x6E, 0x61, 0x72, 0x72, 0x6F, 0x77, 0x5F, 0x65, 0x6E, 0x76, 0x69, 0x72, + 0x6F, 0x6E, 0x6D, 0x65, 0x6E, 0x74, 0x00, 0x00, 0x34, 0x00, 0x5F, 0x69, + 0x6E, 0x69, 0x74, 0x69, 0x61, 0x6C, 0x69, 0x7A, 0x65, 0x5F, 0x6F, 0x6E, + 0x65, 0x78, 0x69, 0x74, 0x5F, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x00, 0x00, + 0x22, 0x00, 0x5F, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x5F, 0x6F, + 0x6E, 0x65, 0x78, 0x69, 0x74, 0x5F, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x00, + 0x16, 0x00, 0x5F, 0x63, 0x65, 0x78, 0x69, 0x74, 0x00, 0x00, 0x61, 0x70, + 0x69, 0x2D, 0x6D, 0x73, 0x2D, 0x77, 0x69, 0x6E, 0x2D, 0x63, 0x72, 0x74, + 0x2D, 0x72, 0x75, 0x6E, 0x74, 0x69, 0x6D, 0x65, 0x2D, 0x6C, 0x31, 0x2D, + 0x31, 0x2D, 0x30, 0x2E, 0x64, 0x6C, 0x6C, 0x00, 0xD3, 0x04, 0x52, 0x74, + 0x6C, 0x43, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6F, 0x6E, 0x74, + 0x65, 0x78, 0x74, 0x00, 0xDA, 0x04, 0x52, 0x74, 0x6C, 0x4C, 0x6F, 0x6F, + 0x6B, 0x75, 0x70, 0x46, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x45, + 0x6E, 0x74, 0x72, 0x79, 0x00, 0x00, 0xE1, 0x04, 0x52, 0x74, 0x6C, 0x56, + 0x69, 0x72, 0x74, 0x75, 0x61, 0x6C, 0x55, 0x6E, 0x77, 0x69, 0x6E, 0x64, + 0x00, 0x00, 0xBC, 0x05, 0x55, 0x6E, 0x68, 0x61, 0x6E, 0x64, 0x6C, 0x65, + 0x64, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6F, 0x6E, 0x46, 0x69, + 0x6C, 0x74, 0x65, 0x72, 0x00, 0x00, 0x7B, 0x05, 0x53, 0x65, 0x74, 0x55, + 0x6E, 0x68, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x64, 0x45, 0x78, 0x63, 0x65, + 0x70, 0x74, 0x69, 0x6F, 0x6E, 0x46, 0x69, 0x6C, 0x74, 0x65, 0x72, 0x00, + 0x1D, 0x02, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6E, 0x74, + 0x50, 0x72, 0x6F, 0x63, 0x65, 0x73, 0x73, 0x00, 0x9A, 0x05, 0x54, 0x65, + 0x72, 0x6D, 0x69, 0x6E, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6F, 0x63, 0x65, + 0x73, 0x73, 0x00, 0x00, 0x89, 0x03, 0x49, 0x73, 0x50, 0x72, 0x6F, 0x63, + 0x65, 0x73, 0x73, 0x6F, 0x72, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x50, 0x72, 0x65, 0x73, 0x65, 0x6E, 0x74, 0x00, 0x50, 0x04, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x65, 0x72, 0x66, 0x6F, 0x72, 0x6D, 0x61, 0x6E, + 0x63, 0x65, 0x43, 0x6F, 0x75, 0x6E, 0x74, 0x65, 0x72, 0x00, 0x1E, 0x02, + 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6E, 0x74, 0x50, 0x72, + 0x6F, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x00, 0x22, 0x02, 0x47, 0x65, + 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6E, 0x74, 0x54, 0x68, 0x72, 0x65, + 0x61, 0x64, 0x49, 0x64, 0x00, 0x00, 0xF0, 0x02, 0x47, 0x65, 0x74, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6D, 0x54, 0x69, 0x6D, 0x65, 0x41, 0x73, 0x46, + 0x69, 0x6C, 0x65, 0x54, 0x69, 0x6D, 0x65, 0x00, 0x6C, 0x03, 0x49, 0x6E, + 0x69, 0x74, 0x69, 0x61, 0x6C, 0x69, 0x7A, 0x65, 0x53, 0x4C, 0x69, 0x73, + 0x74, 0x48, 0x65, 0x61, 0x64, 0x00, 0x82, 0x03, 0x49, 0x73, 0x44, 0x65, + 0x62, 0x75, 0x67, 0x67, 0x65, 0x72, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6E, + 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xCD, 0x5D, 0x20, 0xD2, 0x66, 0xD4, 0xFF, 0xFF, + 0x32, 0xA2, 0xDF, 0x2D, 0x99, 0x2B, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x2F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x35, 0x10, 0x00, 0x00, 0x90, 0x36, 0x00, 0x00, + 0x40, 0x10, 0x00, 0x00, 0x75, 0x10, 0x00, 0x00, 0x90, 0x36, 0x00, 0x00, + 0x80, 0x10, 0x00, 0x00, 0xA6, 0x10, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0xC0, 0x10, 0x00, 0x00, 0xE6, 0x10, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0xF0, 0x10, 0x00, 0x00, 0x16, 0x11, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0x20, 0x11, 0x00, 0x00, 0x3D, 0x11, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0x40, 0x11, 0x00, 0x00, 0x64, 0x11, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0x80, 0x11, 0x00, 0x00, 0xA4, 0x11, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0xB0, 0x11, 0x00, 0x00, 0xD6, 0x11, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0xE0, 0x11, 0x00, 0x00, 0x06, 0x12, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0x20, 0x12, 0x00, 0x00, 0x44, 0x12, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0x50, 0x12, 0x00, 0x00, 0x76, 0x12, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0x80, 0x12, 0x00, 0x00, 0xA6, 0x12, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0xB0, 0x12, 0x00, 0x00, 0xE3, 0x12, 0x00, 0x00, 0x90, 0x36, 0x00, 0x00, + 0xF0, 0x12, 0x00, 0x00, 0x23, 0x13, 0x00, 0x00, 0x90, 0x36, 0x00, 0x00, + 0x30, 0x13, 0x00, 0x00, 0x63, 0x13, 0x00, 0x00, 0x90, 0x36, 0x00, 0x00, + 0x70, 0x13, 0x00, 0x00, 0xA3, 0x13, 0x00, 0x00, 0x90, 0x36, 0x00, 0x00, + 0xB0, 0x13, 0x00, 0x00, 0xDB, 0x13, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0xE0, 0x13, 0x00, 0x00, 0x27, 0x14, 0x00, 0x00, 0xAC, 0x36, 0x00, 0x00, + 0x40, 0x14, 0x00, 0x00, 0x61, 0x14, 0x00, 0x00, 0xB8, 0x36, 0x00, 0x00, + 0x64, 0x14, 0x00, 0x00, 0xB4, 0x14, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0xB4, 0x14, 0x00, 0x00, 0xCD, 0x15, 0x00, 0x00, 0xBC, 0x36, 0x00, 0x00, + 0xD0, 0x15, 0x00, 0x00, 0x5E, 0x16, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, + 0x60, 0x16, 0x00, 0x00, 0x93, 0x17, 0x00, 0x00, 0x38, 0x37, 0x00, 0x00, + 0x94, 0x17, 0x00, 0x00, 0xD1, 0x17, 0x00, 0x00, 0x68, 0x37, 0x00, 0x00, + 0xD4, 0x17, 0x00, 0x00, 0x08, 0x18, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0x08, 0x18, 0x00, 0x00, 0xD9, 0x18, 0x00, 0x00, 0x78, 0x37, 0x00, 0x00, + 0xDC, 0x18, 0x00, 0x00, 0x4D, 0x19, 0x00, 0x00, 0x80, 0x37, 0x00, 0x00, + 0x50, 0x19, 0x00, 0x00, 0xFC, 0x19, 0x00, 0x00, 0x8C, 0x37, 0x00, 0x00, + 0x28, 0x1A, 0x00, 0x00, 0x43, 0x1A, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0x44, 0x1A, 0x00, 0x00, 0x7D, 0x1A, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0x80, 0x1A, 0x00, 0x00, 0xB4, 0x1A, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0xB4, 0x1A, 0x00, 0x00, 0xC9, 0x1A, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0xCC, 0x1A, 0x00, 0x00, 0xF4, 0x1A, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0xF4, 0x1A, 0x00, 0x00, 0x09, 0x1B, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0x0C, 0x1B, 0x00, 0x00, 0x6C, 0x1B, 0x00, 0x00, 0xC8, 0x37, 0x00, 0x00, + 0x6C, 0x1B, 0x00, 0x00, 0x9C, 0x1B, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0x9C, 0x1B, 0x00, 0x00, 0xB0, 0x1B, 0x00, 0x00, 0xA4, 0x36, 0x00, 0x00, + 0xB0, 0x1B, 0x00, 0x00, 0xF9, 0x1B, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0xFC, 0x1B, 0x00, 0x00, 0xD4, 0x1C, 0x00, 0x00, 0xC0, 0x37, 0x00, 0x00, + 0xD4, 0x1C, 0x00, 0x00, 0x6D, 0x1D, 0x00, 0x00, 0x98, 0x37, 0x00, 0x00, + 0x70, 0x1D, 0x00, 0x00, 0x94, 0x1D, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0x94, 0x1D, 0x00, 0x00, 0xBF, 0x1D, 0x00, 0x00, 0x9C, 0x36, 0x00, 0x00, + 0xD0, 0x1D, 0x00, 0x00, 0x1A, 0x1F, 0x00, 0x00, 0xDC, 0x37, 0x00, 0x00, + 0x1C, 0x1F, 0x00, 0x00, 0x58, 0x1F, 0x00, 0x00, 0x90, 0x36, 0x00, 0x00, + 0x58, 0x1F, 0x00, 0x00, 0x94, 0x1F, 0x00, 0x00, 0x90, 0x36, 0x00, 0x00, + 0x94, 0x1F, 0x00, 0x00, 0x0F, 0x21, 0x00, 0x00, 0xEC, 0x37, 0x00, 0x00, + 0x90, 0x21, 0x00, 0x00, 0x92, 0x21, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, + 0x92, 0x21, 0x00, 0x00, 0xA9, 0x21, 0x00, 0x00, 0xF8, 0x36, 0x00, 0x00, + 0xA9, 0x21, 0x00, 0x00, 0xC5, 0x21, 0x00, 0x00, 0xF8, 0x36, 0x00, 0x00, + 0xC5, 0x21, 0x00, 0x00, 0xFB, 0x21, 0x00, 0x00, 0x60, 0x37, 0x00, 0x00, + 0xFB, 0x21, 0x00, 0x00, 0x13, 0x22, 0x00, 0x00, 0xB8, 0x37, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x04, 0x00, 0x00, + 0x48, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x7D, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D, 0x27, 0x31, 0x2E, 0x30, 0x27, 0x20, + 0x65, 0x6E, 0x63, 0x6F, 0x64, 0x69, 0x6E, 0x67, 0x3D, 0x27, 0x55, 0x54, + 0x46, 0x2D, 0x38, 0x27, 0x20, 0x73, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x6C, + 0x6F, 0x6E, 0x65, 0x3D, 0x27, 0x79, 0x65, 0x73, 0x27, 0x3F, 0x3E, 0x0D, + 0x0A, 0x3C, 0x61, 0x73, 0x73, 0x65, 0x6D, 0x62, 0x6C, 0x79, 0x20, 0x78, + 0x6D, 0x6C, 0x6E, 0x73, 0x3D, 0x27, 0x75, 0x72, 0x6E, 0x3A, 0x73, 0x63, + 0x68, 0x65, 0x6D, 0x61, 0x73, 0x2D, 0x6D, 0x69, 0x63, 0x72, 0x6F, 0x73, + 0x6F, 0x66, 0x74, 0x2D, 0x63, 0x6F, 0x6D, 0x3A, 0x61, 0x73, 0x6D, 0x2E, + 0x76, 0x31, 0x27, 0x20, 0x6D, 0x61, 0x6E, 0x69, 0x66, 0x65, 0x73, 0x74, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D, 0x27, 0x31, 0x2E, 0x30, + 0x27, 0x3E, 0x0D, 0x0A, 0x20, 0x20, 0x3C, 0x74, 0x72, 0x75, 0x73, 0x74, + 0x49, 0x6E, 0x66, 0x6F, 0x20, 0x78, 0x6D, 0x6C, 0x6E, 0x73, 0x3D, 0x22, + 0x75, 0x72, 0x6E, 0x3A, 0x73, 0x63, 0x68, 0x65, 0x6D, 0x61, 0x73, 0x2D, + 0x6D, 0x69, 0x63, 0x72, 0x6F, 0x73, 0x6F, 0x66, 0x74, 0x2D, 0x63, 0x6F, + 0x6D, 0x3A, 0x61, 0x73, 0x6D, 0x2E, 0x76, 0x33, 0x22, 0x3E, 0x0D, 0x0A, + 0x20, 0x20, 0x20, 0x20, 0x3C, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x3E, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, + 0x69, 0x6C, 0x65, 0x67, 0x65, 0x73, 0x3E, 0x0D, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6F, 0x6E, + 0x4C, 0x65, 0x76, 0x65, 0x6C, 0x20, 0x6C, 0x65, 0x76, 0x65, 0x6C, 0x3D, + 0x27, 0x61, 0x73, 0x49, 0x6E, 0x76, 0x6F, 0x6B, 0x65, 0x72, 0x27, 0x20, + 0x75, 0x69, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x3D, 0x27, 0x66, 0x61, + 0x6C, 0x73, 0x65, 0x27, 0x20, 0x2F, 0x3E, 0x0D, 0x0A, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x3C, 0x2F, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6C, 0x65, 0x67, 0x65, 0x73, + 0x3E, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x3C, 0x2F, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x3E, 0x0D, 0x0A, 0x20, 0x20, 0x3C, 0x2F, + 0x74, 0x72, 0x75, 0x73, 0x74, 0x49, 0x6E, 0x66, 0x6F, 0x3E, 0x0D, 0x0A, + 0x3C, 0x2F, 0x61, 0x73, 0x73, 0x65, 0x6D, 0x62, 0x6C, 0x79, 0x3E, 0x0D, + 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x30, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0xF8, 0xA0, 0x00, 0xA1, + 0x58, 0xA1, 0x60, 0xA1, 0x88, 0xA3, 0xA0, 0xA3, 0xA8, 0xA3, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + void script_register(HMODULE mod, void(*callback)()) { + util::fiber::add_shv(util::va::va("%llx_%llx", (uint64_t)mod, (uint64_t)callback), callback); + + MODULEINFO info; + GetModuleInformation(GetCurrentProcess(), mod, &info, sizeof(info)); + m_vars.m_modules[mod] = std::make_pair((uint64_t)info.lpBaseOfDll, (uint64_t)info.SizeOfImage); + } + + void script_register_additional_thread(HMODULE mod, void(*callback)()) { + util::fiber::add_shv(util::va::va("%llx_%llx", (uint64_t)mod, (uint64_t)callback), callback); + } + + void script_unregister(HMODULE mod) { + for (util::fiber::fiber_context& fiber : util::fiber::get_fibers()) { + if (strstr(fiber.m_name.c_str(), util::va::va("%llx_", (uint64_t)mod))) { + fiber.m_running = false; + } + } + } + + void native_init(uint64_t hash) { + m_vars.m_context.reset(); + m_vars.m_native_hash = hash; + } + + void native_push_64(uint64_t val) { + m_vars.m_context.push(val); + } + + uint64_t* native_call() { + uint64_t online_natives[] = { + 0xA4A79DD2D9600654, // NETWORK_GET_NUM_CONNECTED_PLAYERS + 0xA6C90FBC38E395EE, // NETWORK_GET_NUM_PARTICIPANTS + 0xCF61D4B4702EE9EB, // NETWORK_GET_TOTAL_NUM_PLAYERS + 0x10FAB35428CCC9D7, // NETWORK_IS_GAME_IN_PROGRESS + 0xCA97246103B63917, // NETWORK_IS_IN_SESSION + 0xB8DFD30D6973E135, // NETWORK_IS_PLAYER_ACTIVE + 0x93DC1BE4E1ABE9D1, // NETWORK_IS_PLAYER_CONNECTED + 0xD83C2B94E7508980, // NETWORK_IS_SESSION_ACTIVE + 0x9DE624D2FC4B603F, // NETWORK_IS_SESSION_STARTED + 0x1077788E268557C2, // NETWORK_IS_SIGNED_ONLINE + }; + + for (uint64_t hash : online_natives) { + if (m_vars.m_native_hash == hash) { + m_vars.m_context.set_return(0, 0); + return (uint64_t*)m_vars.m_context.get_return_data(); + } + } + + // CREATE_OBJECT + if (m_vars.m_native_hash == 0x509D5878EB39E842) { + m_vars.m_context.set_argument(4, TRUE); + m_vars.m_context.set_argument(5, FALSE); + m_vars.m_context.set_argument(6, TRUE); + m_vars.m_context.set_argument(7, FALSE); + m_vars.m_context.set_argument(8, FALSE); + } + + // CREATE_PED + if (m_vars.m_native_hash == 0xD49F9B0955C367DE) { + m_vars.m_context.set_argument(5, TRUE); + m_vars.m_context.set_argument(6, TRUE); + m_vars.m_context.set_argument(7, TRUE); + m_vars.m_context.set_argument(8, TRUE); + } + + // CREATE_VEHICLE + if (m_vars.m_native_hash == 0xAF35D0D2583051B0) { + m_vars.m_context.set_argument(5, TRUE); + m_vars.m_context.set_argument(6, TRUE); + m_vars.m_context.set_argument(7, FALSE); + m_vars.m_context.set_argument(8, TRUE); + } + + rage::invoker::call_native(m_vars.m_native_hash, &m_vars.m_context); + m_vars.m_context.update_result_vectors(&m_vars.m_context); + return (uint64_t*)m_vars.m_context.get_return_data(); + } + + uint64_t* get_global_ptr(int index) { + return &global::vars::g_global_cache[index >> 18 & 0x3F][index & 0x3FFFF]; + } + + void script_wait(uint32_t wait_time) { + util::fiber::sleep_shv(wait_time); + } + + void keyboard_handler_register(void(*callback)(uint32_t, int16_t, uint8_t, int, int, int, int)) { + m_vars.m_keyboards.push_back(callback); + } + + void keyboard_handler_unregister(void(*callback)(uint32_t, int16_t, uint8_t, int, int, int, int)) { + for (std::size_t i = 0; i < m_vars.m_keyboards.size(); i++) { + if (m_vars.m_keyboards[i] == callback) { + m_vars.m_keyboards.erase(m_vars.m_keyboards.begin() + i); + break; + } + } + } + + uint8_t* get_script_handle_base_address(int handle) { + return (uint8_t*)rage::engine::get_entity_address(handle); + } + + void present_callback_register(void(*callback)()) { + return; + } + + void present_callback_unregister(void(*callback)()) { + return; + } + + int world_get_all_vehicles(int* arr, int arr_size) { + int size = global::vars::g_vehicle_pool->m_count; + if (size > arr_size) size = arr_size; + + for (int i = 0; i < size; i++) { + arr[i] = rage::engine::get_entity_handle((uint64_t)global::vars::g_vehicle_pool->get(i)); + } + + return size; + } + + int world_get_all_peds(int* arr, int arr_size) { + int size = global::vars::g_ped_pool->m_count; + if (size > arr_size) size = arr_size; + + for (int i = 0; i < size; i++) { + arr[i] = rage::engine::get_entity_handle((uint64_t)global::vars::g_ped_pool->get(i)); + } + + return size; + } + + int world_get_all_objects(int* arr, int arr_size) { + int size = global::vars::g_object_pool->m_count; + if (size > arr_size) size = arr_size; + + for (int i = 0; i < size; i++) { + arr[i] = rage::engine::get_entity_handle((uint64_t)global::vars::g_object_pool->get(i)); + } + + return size; + } + + int world_get_all_pickups(int* arr, int arr_size) { + int size = global::vars::g_pickup_pool->m_count; + if (size > arr_size) size = arr_size; + + for (int i = 0; i < size; i++) { + arr[i] = rage::engine::get_entity_handle((uint64_t)global::vars::g_pickup_pool->get(i)); + } + + return size; + } + } + + void unload_all() { + for (std::pair& state : m_vars.m_script_state) { + proxy::script_unregister(state.second.m_module); + state.second.m_loaded = false; + } + } + + void handle_toggle(std::string script) { + if (m_vars.m_script_state[script].m_initialized) { + if (m_vars.m_script_state[script].m_loaded) { + for (util::fiber::fiber_context& fiber : util::fiber::get_fibers()) { + if (strstr(fiber.m_name.c_str(), util::va::va("%llx_", (uint64_t)m_vars.m_script_state[script].m_module))) { + fiber.m_running = true; + } + } + } else { + proxy::script_unregister(m_vars.m_script_state[script].m_module); + } + } else { + m_vars.m_script_state[script].m_module = LoadLibraryA((std::string(util::dirs::get_path(scripthook)) + script).c_str()); + + if (m_vars.m_script_state[script].m_module) { + m_vars.m_script_state[script].m_initialized = true; + } + } + } +} + +void scripthook_menu::load() { + set_name("ScriptHook"); + set_parent(); + + add_option(button_option("Unload All") + .add_translate().add_hotkey() + .add_click(unload_all)); + + add_option(break_option("Scripts") + .add_translate()); + + add_string("~m~None"); + add_string("ScriptHook"); + add_string("ScriptHookV.dll successfully loaded"); + add_string("ScriptHookV.dll failed to load"); +} + +void scripthook_menu::update() {} + +void scripthook_menu::update_once() { + if (!GetModuleHandleA("ScriptHookV.dll")) { + FILE* fp; + fopen_s(&fp, (util::dirs::get_path(tmp) + std::string("ScriptHookV.dll")).c_str(), "wb"); + + if (fp) { + fwrite(proxy::shv_dummy, 1, sizeof(proxy::shv_dummy), fp); + fclose(fp); + } + + if (LoadLibraryA((util::dirs::get_path(tmp) + std::string("ScriptHookV.dll")).c_str())) { + menu::notify::stacked(get_string("ScriptHook"), get_string("ScriptHookV.dll successfully loaded"), global::ui::g_success); + } else { + menu::notify::stacked(get_string("ScriptHook"), get_string("ScriptHookV.dll failed to load"), global::ui::g_error); + } + } + + clear_options(2); + + for (std::string script : util::dirs::get_files_in_directory(util::dirs::get_path(scripthook), ".asi")) { + add_option(toggle_option(script) + .add_toggle(m_vars.m_script_state[script + ".asi"].m_loaded) + .add_click([=] { handle_toggle(script + ".asi"); })); + } + + for (std::string script : util::dirs::get_files_in_directory(util::dirs::get_path(scripthook), ".dll")) { + add_option(toggle_option(script) + .add_toggle(m_vars.m_script_state[script + ".dll"].m_loaded) + .add_click([=] { handle_toggle(script + ".dll"); })); + } + + if (get_options().size() == 2) { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void scripthook_menu::feature_update() {} + +scripthook_menu* g_instance; +scripthook_menu* scripthook_menu::get() { + if (g_instance == nullptr) { + g_instance = new scripthook_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/scripthook.h b/GTAV/src/menu/base/submenus/main/misc/scripthook.h new file mode 100644 index 0000000..b0c79e1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/scripthook.h @@ -0,0 +1,56 @@ +#pragma once +#include "menu/base/submenu.h" + +class scripthook_menu : public menu::submenu::submenu { +public: + static scripthook_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + scripthook_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::scripthook::vars { + struct ScriptHookScript { + bool m_initialized; + bool m_loaded; + HMODULE m_module; + + ScriptHookScript() + : m_initialized(false), m_loaded(false), m_module(0) {} + }; + + struct variables { + rage::invoker::native_setup m_context; + uint64_t m_native_hash = 0; + std::unordered_map> m_modules; + std::vector m_keyboards; + std::unordered_map m_script_state; + }; + + namespace proxy { + void script_register(HMODULE mod, void(*callback)()); + void script_register_additional_thread(HMODULE mod, void(*callback)()); + void script_unregister(HMODULE mod); + void native_init(uint64_t hash); + void native_push_64(uint64_t val); + uint64_t* native_call(); + uint64_t* get_global_ptr(int index); + void script_wait(uint32_t wait_time); + void keyboard_handler_register(void(*callback)(uint32_t, int16_t, uint8_t, int, int, int, int)); + void keyboard_handler_unregister(void(*callback)(uint32_t, int16_t, uint8_t, int, int, int, int)); + uint8_t* get_script_handle_base_address(int handle); + void present_callback_register(void(*callback)()); + void present_callback_unregister(void(*callback)()); + int world_get_all_vehicles(int* arr, int arr_size); + int world_get_all_peds(int* arr, int arr_size); + int world_get_all_objects(int* arr, int arr_size); + int world_get_all_pickups(int* arr, int arr_size); + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps.cpp b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps.cpp new file mode 100644 index 0000000..e6885f6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps.cpp @@ -0,0 +1,246 @@ +#include "model_swaps.h" +#include "menu/base/submenu_handler.h" +#include "../misc_swaps.h" +#include "util/memory/memory.h" +#include "menu/base/util/control.h" +#include "util/log.h" +#include "util/dirs.h" +#include "model_swaps_presets.h" +#include "model_swaps_add.h" +#include +#include + +using namespace misc::swaps::model::vars; + +namespace misc::swaps::model::vars { + variables m_vars; + + struct HashNode { + uint32_t m_hash; + uint16_t m_data; + uint16_t m_padding; + HashNode* m_next; + }; + + HashNode* find_model_in_map(uint32_t model) { + uint16_t count = *(uint16_t*)memory::read_instruction(global::vars::g_get_model_info); + HashNode** map = *(HashNode***)memory::read_instruction(global::vars::g_get_model_info + 0x21); + + for (uint16_t i = 0; i < count; i++) { + for (HashNode* Current = map[i]; Current; Current = Current->m_next) { + if (Current->m_hash == model) { + return Current; + } + } + } + + return nullptr; + } + + void remove_swap(uint32_t original_model) { + auto vit = std::find_if(begin(m_vars.m_swaps), end(m_vars.m_swaps), [=](model_swap& element) { return element.m_original_model == original_model; }); + if (vit != end(m_vars.m_swaps)) { + HashNode* node = find_model_in_map(original_model); + if (node) { + node->m_data = vit->m_original_offset; + } + + m_vars.m_swaps.erase(vit); + } + } + + bool add_swap(const char* original_model, const char* new_model, model_swap* out) { + if (!strcmp(original_model, new_model)) { + return false; + } + + for (model_swap& swap : m_vars.m_swaps) { + if (!strcmp(swap.m_original_name.c_str(), original_model)) { + remove_swap(swap.m_original_model); + break; + } + } + + uint32_t original_hash = 0; + uint32_t new_hash = 0; + + if (original_model[0] == '0' && (original_model[1] == 'x' || original_model[1] == 'X')) { + original_hash = (uint32_t)_strtoui64(original_model, 0, 0); + } else { + std::string string_name(original_model); + if (std::find_if(string_name.begin(), string_name.end(), [](unsigned char c) { return !std::isdigit(c); }) == string_name.end()) { + original_hash = (uint32_t)std::stoul(original_model); + } else { + original_hash = native::get_hash_key(original_model); + } + } + + if (new_model[0] == '0' && (new_model[1] == 'x' || new_model[1] == 'X')) { + new_hash = (uint32_t)_strtoui64(new_model, 0, 0); + } else { + std::string string_name(new_model); + if (std::find_if(string_name.begin(), string_name.end(), [](unsigned char c) { return !std::isdigit(c); }) == string_name.end()) { + new_hash = (uint32_t)std::stoul(new_model); + } else { + new_hash = native::get_hash_key(new_model); + } + } + + menu::control::simple_request_model(original_hash); + menu::control::simple_request_model(new_hash); + + if (!native::is_model_valid(original_hash) || !native::is_model_valid(new_hash) + || !native::is_model_in_cdimage(original_hash) || !native::is_model_in_cdimage(new_hash)) { + return false; + } + + HashNode* node = find_model_in_map(original_hash); + if (node) { + HashNode* new_node = find_model_in_map(new_hash); + if (new_node) { + model_swap swap; + swap.m_original_model = original_hash; + swap.m_new_model = new_hash; + swap.m_original_name = original_model; + swap.m_new_name = new_model; + swap.m_original_offset = node->m_data; + node->m_data = new_node->m_data; + + if (out) *out = swap; + m_vars.m_swaps.push_back(swap); + return true; + } + } + + return false; + } + + void add_json(model_swap swap) { + nlohmann::json json; + + try { + if (std::filesystem::exists(util::dirs::get_path(model_swap))) { + std::ifstream input(util::dirs::get_path(model_swap)); + if (input.good()) { + input >> json; + input.close(); + } + + json = json["models"]; + json[std::to_string(swap.m_original_model)]["model"] = swap.m_new_model; + json[std::to_string(swap.m_original_model)]["enabled"] = true; + + std::ofstream output(util::dirs::get_path(model_swap)); + if (output.good()) { + output << json.dump(4); + output.close(); + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + void swap_existing(model_swap& instance) { + add_json(instance); + + if (instance.m_toggled) { + HashNode* node = find_model_in_map(instance.m_original_model); + if (node) { + HashNode* new_node = find_model_in_map(instance.m_new_model); + if (new_node) { + instance.m_original_offset = node->m_data; + node->m_data = new_node->m_data; + } + } + } else { + HashNode* node = find_model_in_map(instance.m_original_model); + if (node) { + node->m_data = instance.m_original_offset; + } + } + } + + void load_swaps(model_swaps_menu* _this) { + try { + std::ifstream input(util::dirs::get_path(model_swap)); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + if (json.size() > 0) { + json = json["models"]; + + for (auto& it = json.begin(); it != json.end(); ++it) { + nlohmann::json& element = *it; + + if (std::find_if(begin(m_vars.m_swaps), end(m_vars.m_swaps), [=](model_swap& swap) { return !strcmp(swap.m_original_name.c_str(), it.key().c_str()); }) == end(m_vars.m_swaps)) { + model_swap swap; + swap.m_original_name = it.key(); + swap.m_original_model = std::stoul(it.key()); + swap.m_new_model = element["model"].get(); + swap.m_toggled = element["enabled"].get(); + + if (swap.m_toggled) { + add_swap(it.key().c_str(), std::to_string(element["model"].get()).c_str()); + } else m_vars.m_swaps.push_back(swap); + } + } + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } +} + +void model_swaps_menu::load() { + set_name("Model Swaps"); + set_parent(); + + add_option(submenu_option("Add Swap") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Presets") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(break_option("Swaps") + .add_translate()); + + add_string("~m~None"); + add_string("Swapped with"); + load_swaps(this); +} + +void model_swaps_menu::update() {} + +void model_swaps_menu::update_once() { + clear_options(3); + + for (model_swap& swap : m_vars.m_swaps) { + add_option(toggle_option(swap.m_original_name) + .add_toggle(swap.m_toggled) + .add_click([&] { swap_existing(swap); }) + .add_tooltip(util::va::va("%s %s", get_string("Swapped with").c_str(), swap.m_new_name.c_str()))); + } + + if (m_vars.m_swaps.size() == 0) { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void model_swaps_menu::feature_update() {} + +model_swaps_menu* g_instance; +model_swaps_menu* model_swaps_menu::get() { + if (g_instance == nullptr) { + g_instance = new model_swaps_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps.h b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps.h new file mode 100644 index 0000000..fb45581 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps.h @@ -0,0 +1,38 @@ +#pragma once +#include "menu/base/submenu.h" + +class model_swaps_menu : public menu::submenu::submenu { +public: + static model_swaps_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + model_swaps_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::swaps::model::vars { + struct model_swap { + uint32_t m_original_model = 0; + uint32_t m_new_model = 0; + + uint16_t m_original_offset = 0; + + // UI + std::string m_original_name = ""; + std::string m_new_name = ""; + bool m_toggled = true; + }; + + struct variables { + std::vector m_swaps; + }; + + void add_json(model_swap swap); + bool add_swap(const char* original_model, const char* new_model, model_swap* out = nullptr); + void remove_swap(uint32_t original_model); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_add.cpp b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_add.cpp new file mode 100644 index 0000000..52f9f3f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_add.cpp @@ -0,0 +1,73 @@ +#include "model_swaps_add.h" +#include "menu/base/submenu_handler.h" +#include "model_swaps.h" +#include "util/fiber_pool.h" + +using namespace misc::swaps::model::add::vars; + +namespace misc::swaps::model::add::vars { + variables m_vars; +} + +void model_swaps_add_menu::load() { + set_name("Add Swap"); + set_parent(); + + m_vars.m_options.push_back(add_option(button_option("Input Original Model") + .add_translate() + .add_keyboard("Input the model! (Hint: name, hash or numeric)", 100, [](button_option* option, const char* model) { + m_vars.m_original = model; + }))); + + m_vars.m_options.push_back(add_option(button_option("Input New Model") + .add_translate() + .add_keyboard("Input the model! (Hint: name, hash or numeric)", 100, [](button_option* option, const char* model) { m_vars.m_new = model; }))); + + m_vars.m_options.push_back(add_option(button_option("Add Swap") + .add_translate() + .add_click([] { + if (!m_vars.m_original.empty() && !m_vars.m_new.empty()) { + util::fiber::pool::add([] { + misc::swaps::model::vars::model_swap output; + if (misc::swaps::model::vars::add_swap(m_vars.m_original.c_str(), m_vars.m_new.c_str(), &output)) { + misc::swaps::model::vars::add_json(output); + } + + menu::submenu::handler::set_submenu_previous(true); + }); + } + }))); + + add_string("Current"); + add_string("New"); +} + +void model_swaps_add_menu::update() { + char tooltip[100]; + sprintf_s(tooltip, "%s=%s %s=%s", get_string("Current").c_str(), + m_vars.m_original.empty() ? "~italic~unset~s~" : m_vars.m_original.c_str(), + get_string("New").c_str(), + m_vars.m_new.empty() ? "~italic~unset~s~" : m_vars.m_new.c_str()); + + for (std::shared_ptr& option : m_vars.m_options) { + option->set_tooltip(tooltip); + } +} + +void model_swaps_add_menu::update_once() { + m_vars.m_original.clear(); + m_vars.m_new.clear(); +} + +void model_swaps_add_menu::feature_update() {} + +model_swaps_add_menu* g_instance; +model_swaps_add_menu* model_swaps_add_menu::get() { + if (g_instance == nullptr) { + g_instance = new model_swaps_add_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_add.h b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_add.h new file mode 100644 index 0000000..b4a1a2d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_add.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class model_swaps_add_menu : public menu::submenu::submenu { +public: + static model_swaps_add_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + model_swaps_add_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::swaps::model::add::vars { + struct variables { + std::string m_original; + std::string m_new; + + std::vector> m_options; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_presets.cpp b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_presets.cpp new file mode 100644 index 0000000..27f0598 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_presets.cpp @@ -0,0 +1,101 @@ +#include "model_swaps_presets.h" +#include "menu/base/submenu_handler.h" +#include "model_swaps.h" +#include "model_swaps.h" +#include "util/fiber_pool.h" +#include "util/fiber.h" + +using namespace misc::swaps::model::presets::vars; + +namespace misc::swaps::model::presets::vars { + variables m_vars; + + std::string police_vehicles[] = { + "PBUS", + "PRANGER", + "POLICE", + "POLICE2", + "POLICE3", + "POLICE4", + "POLICEB", + "POLICEOLD1", + "POLICEOLD2", + "POLICET", + "SHERIFF", + "SHERIFF2", + "RIOT", + "RIOT2" + }; + + std::string police_peds[] = { + "CSB_COP", + "S_F_Y_COP_01", + "S_F_Y_COP_01_P", + "S_F_Y_HWAYCOP_01", + "S_F_Y_HWAYCOP_01_P", + "S_F_M_SNOWCOP_01", + "S_F_M_SNOWCOP_01_P", + "S_F_Y_SHERIFF_01", + "S_F_Y_BLACKOPS_01", + "S_F_Y_BLACKOPS_02", + "S_F_Y_BLACKOPS_03", + "S_M_Y_COP_01", + "S_M_Y_COP_01_P", + "S_M_Y_HWAYCOP_01", + "S_M_Y_HWAYCOP_01_P", + "S_M_M_SNOWCOP_01", + "S_M_M_SNOWCOP_01_P", + "S_M_Y_SHERIFF_01", + "S_M_Y_BLACKOPS_01", + "S_M_Y_BLACKOPS_02", + "S_M_Y_BLACKOPS_03", + }; +} + +void model_swaps_presets_menu::load() { + set_name("Presets"); + set_parent(); + + add_option(toggle_option("Monster Truck Police Vehicles") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_monster_truck_police) + .add_click([] { + util::fiber::pool::add([] { + for (std::string str : police_vehicles) { + if (m_vars.m_monster_truck_police) { + misc::swaps::model::vars::add_swap(str.c_str(), "marshall"); + } else misc::swaps::model::vars::remove_swap(native::get_hash_key(str.c_str())); + } + }); + }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Astronaut Police Peds") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_astronaut_police_peds) + .add_click([] { + util::fiber::pool::add([] { + for (std::string str : police_peds) { + if (m_vars.m_astronaut_police_peds) { + misc::swaps::model::vars::add_swap(str.c_str(), "S_M_M_MovSpace_01"); + } else misc::swaps::model::vars::remove_swap(native::get_hash_key(str.c_str())); + } + }); + }).add_savable(get_submenu_name_stack())); +} + +void model_swaps_presets_menu::update() {} + +void model_swaps_presets_menu::update_once() {} + +void model_swaps_presets_menu::feature_update() {} + +model_swaps_presets_menu* g_instance; +model_swaps_presets_menu* model_swaps_presets_menu::get() { + if (g_instance == nullptr) { + g_instance = new model_swaps_presets_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_presets.h b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_presets.h new file mode 100644 index 0000000..dd4939c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/model_swaps_presets.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class model_swaps_presets_menu : public menu::submenu::submenu { +public: + static model_swaps_presets_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + model_swaps_presets_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::swaps::model::presets::vars { + struct variables { + bool m_monster_truck_police; + bool m_astronaut_police_peds; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps.cpp b/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps.cpp new file mode 100644 index 0000000..2aa62ef --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps.cpp @@ -0,0 +1,316 @@ +#include "texture_swaps.h" +#include "menu/base/submenu_handler.h" +#include "../misc_swaps.h" +#include "util/dirs.h" +#include "util/log.h" +#include "util/fiber_pool.h" +#include "util/memory/memory.h" +#include "rage/engine.h" +#include "menu/base/util/textures.h" +#include "menu/base/util/notify.h" +#include "menu/base/util/control.h" +#include "texture_swaps_add.h" +#include +#include + +using namespace misc::swaps::texture::vars; + +namespace misc::swaps::texture::vars { + variables m_vars; + + rage::types::dictionary_pool* find_dictionary(std::string dict) { + uint32_t hash = native::get_hash_key(dict.c_str()); + uint32_t texture_hash = native::get_hash_key(("platform:/textures/" + dict).c_str()); + + rage::types::texture_store* txd = global::vars::g_texture_store; + if (is_valid_ptr(txd) && is_valid_ptr(txd->m_pool) && is_valid_ptr(txd->m_mask)) { + rage::types::dictionary_pool* pool = txd->m_pool; + for (uint32_t i = 0; i < txd->m_count; i++) { + if (~(txd->m_mask[i] >> 7) & 1) { + rage::types::dictionary_pool element = pool[i]; + if (is_valid_ptr(element.m_pool)) { + if (element.m_dictionary_hash == hash || element.m_dictionary_hash == texture_hash) { + return &pool[i]; + } + } + } + } + } + + return nullptr; + } + + rage::types::grc_texture_dx11* find_texture(std::string dict, std::string name) { + uint32_t hash = native::get_hash_key(dict.c_str()); + uint32_t texture_hash = native::get_hash_key(("platform:/textures/" + dict).c_str()); + + rage::types::texture_store* txd = global::vars::g_texture_store; + if (is_valid_ptr(txd) && is_valid_ptr(txd->m_pool) && is_valid_ptr(txd->m_mask)) { + rage::types::dictionary_pool* pool = txd->m_pool; + for (uint32_t i = 0; i < txd->m_count; i++) { + if (~(txd->m_mask[i] >> 7) & 1) { + rage::types::dictionary_pool element = pool[i]; + if (is_valid_ptr(element.m_pool)) { + if (element.m_dictionary_hash == hash || element.m_dictionary_hash == texture_hash) { + for (short j = 0; j < element.m_pool->m_count; j++) { + rage::types::grc_texture_dx11* item = element.m_pool->m_items[j]; + if (is_valid_ptr(item)) { + if (is_valid_ptr(item->m_name)) { + if (!strcmp(item->m_name, name.c_str())) { + return item; + } + } + } + } + } + } + } + } + } + + return nullptr; + } + + void add_json(texture_swap* swap) { + nlohmann::json json; + + try { + if (std::filesystem::exists(util::dirs::get_path(texture_swap))) { + std::ifstream input(util::dirs::get_path(texture_swap)); + if (input.good()) { + input >> json; + input.close(); + } + + nlohmann::json& arr = json["textures"][swap->m_asset.first][swap->m_asset.second]; + + bool add = true; + for (nlohmann::json& item : arr) { + if (item["texture"].get() == swap->m_texture) { + add = false; + + item["texture"] = swap->m_texture; + item["enabled"] = swap->m_toggled; + } + } + + if (add) { + nlohmann::json& array = nlohmann::json::object(); + array["texture"] = swap->m_texture; + array["enabled"] = swap->m_toggled; + + json["textures"][swap->m_asset.first][swap->m_asset.second].push_back(array); + } + + std::ofstream output(util::dirs::get_path(texture_swap)); + if (output.good()) { + output << json.dump(4); + output.close(); + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + void remove_swap(texture_swap* swap); + + bool add_swap(texture_swap* swap) { + texture_swaps_menu* instance = texture_swaps_menu::get(); + + std::vector textures = menu::textures::get_list(); + rage::types::grc_texture_dx11* asset = find_texture(swap->m_asset.first.c_str(), swap->m_asset.second.c_str()); + + // disable active ones for this texture + for (texture_swap* texture : m_vars.m_swaps) { + if (texture->m_asset.first == swap->m_asset.first + && texture->m_asset.second == swap->m_asset.second + && texture->m_toggled + && texture != swap) { + remove_swap(texture); + } + } + + if (!swap->m_initialized) { + if (std::find_if(begin(textures), end(textures), [=](menu::textures::texture_context& element) { return !element.m_name.compare(swap->m_texture); }) == end(textures)) { + menu::notify::stacked(instance->get_string("Texture"), util::va::va("%s %s %s %s, %s %s %s", instance->get_string("Failed to swap texture").c_str(), swap->m_asset.second.c_str(), instance->get_string("in").c_str(), swap->m_asset.first.c_str(), instance->get_string("couldn't find").c_str(), swap->m_texture.c_str(), instance->get_string("in textures folder").c_str()), global::ui::g_error); + return false; + } + + if (asset) { + swap->m_initialized = true; + swap->m_original.m_width = asset->m_width; + swap->m_original.m_height = asset->m_height; + swap->m_original.m_texture = asset->m_texture; + swap->m_original.m_shader = asset->m_shader; + goto start; + } + + return false; + } + + start: + auto vit = std::find_if(begin(textures), end(textures), [=](menu::textures::texture_context& element) { return !element.m_name.compare(swap->m_texture); }); + if (vit != end(textures)) { + asset->m_width = vit->m_texture->m_width; + asset->m_height = vit->m_texture->m_height; + asset->m_texture = vit->m_texture->m_texture; + asset->m_shader = vit->m_texture->m_shader; + return true; + } + + return false; + } + + void remove_swap(texture_swap* swap) { + swap->m_toggled = false; + + if (swap->m_initialized) { + rage::types::grc_texture_dx11* asset = find_texture(swap->m_asset.first.c_str(), swap->m_asset.second.c_str()); + if (asset) { + asset->m_width = swap->m_original.m_width; + asset->m_height = swap->m_original.m_height; + asset->m_texture = swap->m_original.m_texture; + asset->m_shader = swap->m_original.m_shader; + } + } + } + + void load_swaps(texture_swaps_menu* _this) { + texture_swaps_menu* instance = texture_swaps_menu::get(); + + try { + std::ifstream input(util::dirs::get_path(texture_swap)); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + if (json["textures"].size() > 0) { + for (auto& it = json["textures"].begin(); it != json["textures"].end(); ++it) { + nlohmann::json& dictionary = *it; + + for (auto& it2 = dictionary.begin(); it2 != dictionary.end(); ++it2) { + nlohmann::json& assets = *it2; + + for (nlohmann::json& asset : assets) { + texture_swap* swap = new texture_swap(); + swap->m_asset = { it.key(), it2.key() }; + swap->m_texture = asset["texture"].get(); + swap->m_toggled = asset["enabled"].get(); + + // if not exist + std::vector textures = menu::textures::get_list(); + if (std::find_if(begin(textures), end(textures), [=](menu::textures::texture_context& element) { return !element.m_name.compare(swap->m_texture); }) == end(textures)) { + menu::notify::stacked(instance->get_string("Texture"), util::va::va("%s %s %s %s, %s %s %s", instance->get_string("Failed to swap texture").c_str(), swap->m_asset.second.c_str(), instance->get_string("in").c_str(), swap->m_asset.first.c_str(), instance->get_string("couldn't find").c_str(), swap->m_texture.c_str(), instance->get_string("in textures folder").c_str()), global::ui::g_error); + continue; + } + + // disable active ones for this texture + for (texture_swap* texture : m_vars.m_swaps) { + if (texture->m_asset.first == swap->m_asset.first + && texture->m_asset.second == swap->m_asset.second + && texture->m_toggled + && texture != swap) { + swap->m_toggled = false; + } + } + + if (swap->m_toggled) { + util::fiber::pool::add([=] { + menu::control::simple_request_dictionary(swap->m_asset.first); + + rage::types::grc_texture_dx11* asset = find_texture(swap->m_asset.first.c_str(), swap->m_asset.second.c_str()); + if (asset) { + add_swap(swap); + } else { + menu::notify::stacked(instance->get_string("Texture"), util::va::va("%s %s %s %s, %s", instance->get_string("Failed to swap texture").c_str(), swap->m_asset.second.c_str(), instance->get_string("in").c_str(), swap->m_asset.first.c_str(), instance->get_string("couldn't find texture in memory").c_str()), global::ui::g_error); + } + }); + } + + m_vars.m_swaps.push_back(swap); + } + } + } + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + void swap_existing(texture_swap* swap) { + texture_swaps_menu* instance = texture_swaps_menu::get(); + + add_json(swap); + + if (swap->m_toggled) { + util::fiber::pool::add([=] { + menu::control::simple_request_dictionary(swap->m_asset.first); + + rage::types::grc_texture_dx11* asset = find_texture(swap->m_asset.first.c_str(), swap->m_asset.second.c_str()); + if (asset) { + add_swap(swap); + } else { + menu::notify::stacked(instance->get_string("Texture"), util::va::va("%s %s %s %s, %s", instance->get_string("Failed to swap texture").c_str(), swap->m_asset.second.c_str(), instance->get_string("in").c_str(), swap->m_asset.first.c_str(), instance->get_string("couldn't find texture in memory").c_str()), global::ui::g_error); + } + }); + } else { + remove_swap(swap); + } + } +} + +void texture_swaps_menu::load() { + set_name("Texture Swaps"); + set_parent(); + + add_option(submenu_option("Add Swap") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(break_option("Swaps") + .add_translate()); + + add_string("~m~None"); + add_string("Texture"); + add_string("Failed to swap texture"); + add_string("in"); + add_string("couldn't find texture in memory"); + add_string("couldn't find"); + add_string("in textures folder"); + load_swaps(this); +} + +void texture_swaps_menu::update() {} + +void texture_swaps_menu::update_once() { + menu::textures::update(); + + clear_options(2); + + for (texture_swap* swap : m_vars.m_swaps) { + add_option(toggle_option(swap->m_asset.first + ":" + swap->m_asset.second) + .add_toggle(swap->m_toggled) + .add_click([=] { swap_existing(swap); }) + .add_tooltip(util::va::va("%s %s", get_string("Swapped with").c_str(), swap->m_texture.c_str()))); + } + + if (m_vars.m_swaps.size() == 0) { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void texture_swaps_menu::feature_update() {} + +texture_swaps_menu* g_instance; +texture_swaps_menu* texture_swaps_menu::get() { + if (g_instance == nullptr) { + g_instance = new texture_swaps_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps.h b/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps.h new file mode 100644 index 0000000..891076b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps.h @@ -0,0 +1,33 @@ +#pragma once +#include "menu/base/submenu.h" + +class texture_swaps_menu : public menu::submenu::submenu { +public: + static texture_swaps_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + texture_swaps_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::swaps::texture::vars { + struct texture_swap { + std::pair m_asset = {}; + std::string m_texture = ""; + bool m_toggled = false; + bool m_initialized = false; + rage::types::grc_texture_dx11 m_original; + }; + + struct variables { + std::vector m_swaps; + }; + + void add_json(texture_swap* swap); + bool add_swap(texture_swap* swap); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps_add.cpp b/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps_add.cpp new file mode 100644 index 0000000..e79d5f3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps_add.cpp @@ -0,0 +1,95 @@ +#include "texture_swaps_add.h" +#include "menu/base/submenu_handler.h" +#include "texture_swaps.h" +#include "util/fiber_pool.h" +#include "menu/base/util/textures.h" + +using namespace misc::swaps::texture::add::vars; + +namespace misc::swaps::texture::add::vars { + variables m_vars; + + scroll_struct textures[200]; +} + +void texture_swaps_add_menu::load() { + set_name("Add Swap"); + set_parent(); + + m_vars.m_options.push_back(add_option(button_option("Input Dictionary") + .add_translate() + .add_keyboard("Input the dictionary! (Hint: name, hash or numeric)", 100, [](button_option* option, const char* dictionary) { m_vars.m_asset.first = dictionary; }))); + + m_vars.m_options.push_back(add_option(button_option("Input Texture") + .add_translate() + .add_keyboard("Input the texture! (Hint: name, hash or numeric)", 100, [](button_option* option, const char* texture) { m_vars.m_asset.second = texture; }))); + + m_vars.m_options.push_back(add_option(scroll_option(SCROLL, "Image") + .add_translate() + .add_scroll(m_vars.m_image, 0, NUMOF(textures), textures) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_image, 0, (int)menu::textures::get_list().size(), textures); + }))); + + m_vars.m_options.push_back(add_option(button_option("Add Swap") + .add_translate() + .add_click([] { + if (!m_vars.m_asset.first.empty() && !m_vars.m_asset.second.empty()) { + util::fiber::pool::add([] { + misc::swaps::texture::vars::texture_swap* swap = new misc::swaps::texture::vars::texture_swap(); + swap->m_asset = m_vars.m_asset; + swap->m_texture = menu::textures::get_list()[m_vars.m_image].m_name; + swap->m_toggled = true; + + if (misc::swaps::texture::vars::add_swap(swap)) { + misc::swaps::texture::vars::add_json(swap); + misc::swaps::texture::vars::m_vars.m_swaps.push_back(swap); + + menu::submenu::handler::set_submenu_previous(true); + } + }); + } + }))); + + add_string("Dictionary"); + add_string("Texture"); +} + +void texture_swaps_add_menu::update() { + char tooltip[100]; + sprintf_s(tooltip, "%s=%s %s=%s", get_string("Dictionary").c_str(), + m_vars.m_asset.first.empty() ? "~italic~unset~s~" : m_vars.m_asset.first.c_str(), + get_string("Texture").c_str(), + m_vars.m_asset.second.empty() ? "~italic~unset~s~" : m_vars.m_asset.second.c_str()); + + for (std::shared_ptr& option : m_vars.m_options) { + option->set_tooltip(tooltip); + } +} + +void texture_swaps_add_menu::update_once() { + menu::textures::update(); + + m_vars.m_image = 0; + m_vars.m_asset.first.clear(); + m_vars.m_asset.second.clear(); + + for (std::size_t i = 0; i < menu::textures::get_list().size(); i++) { + if (i == 200) break; + textures[i].m_name = menu::textures::get_list()[i].m_name; + textures[i].m_result = (int)i; + } +} + +void texture_swaps_add_menu::feature_update() {} + +texture_swaps_add_menu* g_instance; +texture_swaps_add_menu* texture_swaps_add_menu::get() { + if (g_instance == nullptr) { + g_instance = new texture_swaps_add_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps_add.h b/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps_add.h new file mode 100644 index 0000000..1d453e8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/swaps/texture_swaps_add.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class texture_swaps_add_menu : public menu::submenu::submenu { +public: + static texture_swaps_add_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + texture_swaps_add_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::swaps::texture::add::vars { + struct variables { + int m_image; + std::pair m_asset; + std::vector> m_options; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/visions.cpp b/GTAV/src/menu/base/submenus/main/misc/visions.cpp new file mode 100644 index 0000000..1bd5436 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/visions.cpp @@ -0,0 +1,84 @@ +#include "visions.h" +#include "menu/base/submenu_handler.h" +#include "../misc.h" +#include "util/memory/memory.h" + +using namespace misc::visions::vars; + +namespace misc::visions::vars { + variables m_vars; + + scroll_struct visions[]{ + { localization("None", true), "" }, + { localization("Sunglasses", true), "sunglasses" }, + { localization("Camera BW", true), "CAMERA_BW" }, + { localization("Hint Cam", true), "Hint_cam" }, + { localization("UFO", true), "ufo" }, + { localization("UFO Deathray", true), "ufo_deathray" }, + { localization("Dying", true), "dying" }, + { localization("Underwater", true), "underwater" }, + { localization("Spectator", true), "spectator1" }, + { localization("Cops Splash", true), "CopsSPLASH" }, + { localization("Crane Cam", true), "crane_cam" }, + { localization("Secret Camera", true), "secret_camera" }, + { localization("Graveyard Shootout", true), "graveyard_shootout" }, + { localization("Cops", true), "cops" }, + { localization("Damage", true), "damage" }, + { localization("Bikers Splash", true), "BikersSPLASH" }, + { localization("Bikers", true), "Bikers" }, + { localization("Prologue Shootout", true), "prologue_shootout" }, + { localization("Vagos", true), "vagos" }, + { localization("Sniper", true), "sniper" }, + }; +} + +void visions_menu::load() { + set_name("Visions"); + set_parent(); + + memcpy(m_vars.m_backup, (void*)(global::vars::g_set_seethrough + 0x14), 5); + + add_option(toggle_option("Thermal Vision") + .add_translate().add_hotkey() + .add_click([] { + if (m_vars.m_thermal_vision) { + memory::write_vector(global::vars::g_set_seethrough + 0x14, { 0xB3, 0x01, 0x90, 0x90, 0x90 }); + native::set_seethrough(true); + } else { + memory::write(global::vars::g_set_seethrough + 0x14, m_vars.m_backup, 5); + native::set_seethrough(false); + } + }) + .add_toggle(m_vars.m_thermal_vision).add_savable(get_submenu_name_stack())); + + add_option(break_option("Visions") + .add_translate()); + + for (int i = 0; i < NUMOF(visions); i++) { + add_option(radio_option(visions[i].m_name.get()) + .add_translate() + .add_radio(m_vars.m_context) + .add_click([=] { if (i == 0) native::clear_timecycle_modifier(); })); + } +} + +void visions_menu::update() {} + +void visions_menu::update_once() {} + +void visions_menu::feature_update() { + if (m_vars.m_context.m_selected != 0) { + native::set_timecycle_modifier(visions[m_vars.m_context.m_selected].m_result); + } +} + +visions_menu* g_instance; +visions_menu* visions_menu::get() { + if (g_instance == nullptr) { + g_instance = new visions_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/misc/visions.h b/GTAV/src/menu/base/submenus/main/misc/visions.h new file mode 100644 index 0000000..7aeb873 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/misc/visions.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class visions_menu : public menu::submenu::submenu { +public: + static visions_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + visions_menu() + : menu::submenu::submenu() {} +}; + +namespace misc::visions::vars { + struct variables { + bool m_thermal_vision; + uint8_t m_backup[5]; + + radio_context m_context = { "commonmenu", "shop_mask_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network.cpp b/GTAV/src/menu/base/submenus/main/network.cpp new file mode 100644 index 0000000..f92593d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network.cpp @@ -0,0 +1,133 @@ +#include "network.h" +#include "menu/base/submenu_handler.h" +#include "../main.h" +#include "util/fiber_pool.h" +#include "util/fiber.h" +#include "menu/base/util/global.h" +#include "rage/types/global_types.h" +#include "menu/base/util/panels.h" +#include "network/network_session_finder.h" +#include "network/network_host_toolkit.h" +#include "network/network_global_chat.h" +#include "network/network_recent_players.h" +#include "network/network_friends.h" +#include "network/network_player_search_join.h" +#include "network/network_spoofing.h" +#include "network/network_account.h" +#include "network/network_join_bypass.h" +#include "network/network_players.h" +#include "network/network_session.h" + +using namespace network::vars; + +namespace network::vars { + variables m_vars; + + scroll_struct transitions[] = { + { localization("Public", true), 0 }, + { localization("Crew", true), 12 }, + { localization("Friend", true), 9 }, + { localization("Leave Online", true), -1 } + }; + + void find_new_session(int id) { + util::fiber::pool::add([=] { + if (id == -1) { + menu::script_global(rage::global::transition_session_flag + 2).as() = id; + } else { + menu::script_global(rage::global::transition_session).as() = id; + } + + menu::script_global(rage::global::transition_session_flag).as() = 1; + util::fiber::sleep(200); + menu::script_global(rage::global::transition_session_flag).as() = 0; + }); + } +} + +void network_menu::load() { + set_name("Network"); + set_parent(); + + add_option(submenu_option("Players") + .add_translate() + .add_submenu() + .add_click([] { global::vars::g_network_menu_type = SELECTED_PLAYER; })); + + add_option(submenu_option("Session") + .add_translate() + .add_submenu() + .add_click([] { global::vars::g_network_menu_type = ALL_PLAYERS; })); + + add_option(submenu_option("Spoofing") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Account") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Friends") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Player Search") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Recent Players") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Global Chat") + .add_translate() + .add_submenu()); + + add_option(submenu_option(XOR("Host Toolkit")) + .add_translate() + .add_submenu()); + + add_option(submenu_option("Session Finder") + .add_translate() + .add_submenu()); + + /*add_option(submenu_option("Join Bypass") + .add_translate() + .add_submenu());*/ + + add_option(toggle_option("Join Notifications") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_join_notifications).add_savable(get_submenu_name_stack()) + .add_tooltip("Show when players are leaving and joining")); + + add_option(scroll_option(SCROLLSELECT, "Find New Session") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_transition, 0, NUMOF(transitions), transitions) + .add_click([] { find_new_session(transitions[m_vars.m_transition].m_result); })); +} + +void network_menu::update() {} + +void network_menu::update_once() { + rage::api::get_social_club()->m_clear_queue = true; + menu::panels::toggle_panel_render("PANEL_PLAYER_INFO", false); + menu::panels::toggle_panel_render("PANEL_RECENT_PLAYER", false); + menu::panels::toggle_panel_render("PANEL_FRIEND", false); + menu::panels::toggle_panel_render("PANEL_OVERSEER", false); + menu::panels::toggle_panel_render("PANEL_SESSION", false); + menu::panels::toggle_panel_render("PANEL_SESSION_BROWSER", false); + menu::panels::toggle_panel_render("PANEL_PLAYER_SEARCH", false); +} + +void network_menu::feature_update() {} + +network_menu* g_instance; +network_menu* network_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network.h b/GTAV/src/menu/base/submenus/main/network.h new file mode 100644 index 0000000..84881f2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_menu : public menu::submenu::submenu { +public: + static network_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_menu() + : menu::submenu::submenu() {} +}; + +namespace network::vars { + struct variables { + int m_transition; + bool m_join_notifications = true; + }; + + void find_new_session(int id); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_kd.cpp b/GTAV/src/menu/base/submenus/main/network/account/network_account_kd.cpp new file mode 100644 index 0000000..2807f1b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_kd.cpp @@ -0,0 +1,65 @@ +#include "network_account_kd.h" +#include "menu/base/submenu_handler.h" +#include "../network_account.h" +#include "menu/base/util/stats.h" + +using namespace network::account::kd::vars; + +namespace network::account::kd::vars { + variables m_vars; + + float calculate() { + float calculated = 0.f; + if (m_vars.m_deaths == 0) { + calculated = (float)m_vars.m_kills; + } else calculated = (float)((float)m_vars.m_kills / (float)m_vars.m_deaths); + + return calculated; + } + + void set_kd() { + stats::set("MPPLY_KILLS_PLAYERS", m_vars.m_kills); + stats::set("MPPLY_DEATHS_PLAYER", m_vars.m_deaths); + } +} + +void network_account_kd_menu::load() { + set_name("K/D"); + set_parent(); + + add_option(number_option(SCROLL, "Set Kills") + .add_translate() + .add_number(m_vars.m_kills, "%i", 1).add_min(0).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Set Deaths") + .add_translate() + .add_number(m_vars.m_deaths, "%i", 1).add_min(0).set_scroll_speed(0)); + + m_vars.m_button = add_option(button_option("") + .add_click(set_kd)); + + add_string("Set K/D:"); +} + +void network_account_kd_menu::update() { + m_vars.m_calculated = calculate(); + m_vars.m_button->set_name(std::string(util::va::va("%s %.2f", get_string("Set K/D:").c_str(), m_vars.m_calculated)).c_str()); +} + +void network_account_kd_menu::update_once() { + m_vars.m_kills = stats::get("MPPLY_KILLS_PLAYERS"); + m_vars.m_deaths = stats::get("MPPLY_DEATHS_PLAYER"); +} + +void network_account_kd_menu::feature_update() {} + +network_account_kd_menu* g_instance; +network_account_kd_menu* network_account_kd_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_kd_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_kd.h b/GTAV/src/menu/base/submenus/main/network/account/network_account_kd.h new file mode 100644 index 0000000..81a14af --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_kd.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_kd_menu : public menu::submenu::submenu { +public: + static network_account_kd_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_kd_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::kd::vars { + struct variables { + int m_kills; + int m_deaths; + float m_calculated; + std::shared_ptr m_button; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_level.cpp b/GTAV/src/menu/base/submenus/main/network/account/network_account_level.cpp new file mode 100644 index 0000000..e7b91c6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_level.cpp @@ -0,0 +1,98 @@ +#include "network_account_level.h" +#include "menu/base/submenu_handler.h" +#include "../network_account.h" +#include "menu/base/util/stats.h" +#include "menu/base/util/global.h" +#include "rage/types/global_types.h" + +using namespace network::account::level::vars; + +namespace network::account::level::vars { + variables m_vars; + + scroll_struct types[] = { + { localization("RP", true), 0 }, + { localization("Crew", true), 1 } + }; + + int levels[] = { 1, 25, 50, 69, 75, 100, 120, 250, 420, 500, 666, 1000, 1234, 1337, 2000, 4000, 6969, 8000 }; + + int level_to_rp(int level) { + return menu::script_global(rage::global::_155_convert_rp_to_level).at(level + 1).as(); + } + + int get_rp_level() { + return stats::get("CHAR_SET_RP_GIFT_ADMIN"); + } + + int get_crew_level() { + return stats::get("MPPLY_CREW_LOCAL_XP_0"); + } + + void set_rp_level(int level) { + if (level > 8000) level = 8000; + + stats::set("CHAR_SET_RP_GIFT_ADMIN", level_to_rp(level)); + menu::notify::stacked(network_account_level_menu::get()->get_name().get(), network_account_level_menu::get()->get_string("Rank set! Change lobbies for it to take effect :)")); + } + + void set_crew_level(int level) { + if (level > 8000) level = 8000; + stats::set("MPPLY_CREW_LOCAL_XP_0", level_to_rp(level)); + stats::set("MPPLY_CREW_LOCAL_XP_1", level_to_rp(level)); + stats::set("MPPLY_CREW_LOCAL_XP_2", level_to_rp(level)); + stats::set("MPPLY_CREW_LOCAL_XP_3", level_to_rp(level)); + stats::set("MPPLY_CREW_LOCAL_XP_4", level_to_rp(level)); + } + + void set_level(int level) { + if (m_vars.m_type == 0) set_rp_level(level); + else set_crew_level(level); + } + + int get_level() { + if (m_vars.m_type == 0) return get_rp_level(); + else return get_crew_level(); + } +} + +void network_account_level_menu::load() { + set_name("Level"); + set_parent(); + + add_option(scroll_option(SCROLL, "Type") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(types), types)); + + add_option(button_option("Input Level") + .add_translate() + .add_keyboard("Enter level", 4, [](button_option* option, const char* level) { set_level(std::stoi(level)); })); + + add_option(break_option("Levels") + .add_translate()); + + for (int level : levels) { + add_option(button_option("Level " + std::to_string(level)) + .add_translate() + .add_click([=] { set_level(level); })); + } + + add_string("Rank set! Change lobbies for it to take effect :)"); +} + +void network_account_level_menu::update() {} + +void network_account_level_menu::update_once() {} + +void network_account_level_menu::feature_update() {} + +network_account_level_menu* g_instance; +network_account_level_menu* network_account_level_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_level_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_level.h b/GTAV/src/menu/base/submenus/main/network/account/network_account_level.h new file mode 100644 index 0000000..9f89d6a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_level.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_level_menu : public menu::submenu::submenu { +public: + static network_account_level_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_level_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::level::vars { + struct variables { + int m_type; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_outfits.cpp b/GTAV/src/menu/base/submenus/main/network/account/network_account_outfits.cpp new file mode 100644 index 0000000..e97300f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_outfits.cpp @@ -0,0 +1,124 @@ +#include "network_account_outfits.h" +#include "menu/base/submenu_handler.h" +#include "../network_account.h" +#include "menu/base/util/global.h" +#include "outfits/network_account_outfits_edit.h" +#include "rage/types/global_types.h" + +using namespace network::account::outfits::vars; + +namespace network::account::outfits::vars { + variables m_vars; + + bool does_outfit_slot_exist(int outfit_index) { + return menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_5).at(outfit_index).at(2).as(); + } + + char* get_outfit_slot_name_ptr(int outfit_index) { + return menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_6).at(outfit_index, 8).at(1).get(); + } + + int get_max_slots() { + return menu::script_global(rage::global::_155_outfit_editor_base2).at(rage::global::_155_outfit_editor_base2_offset).as(); + } + + int get_free_slots() { + int count = 0; + + for (int i = 0; i < get_max_slots(); i++) { + if (does_outfit_slot_exist(i)) { + if (!native::is_string_null_or_empty(get_outfit_slot_name_ptr(i))) { + continue; + } + } + + count++; + } + + return count; + } + + int get_free_slot_index() { + for (int i = 0; i < get_max_slots(); i++) { + if (native::is_string_null_or_empty(get_outfit_slot_name_ptr(i))) { + return i; + } + } + + return -1; + } + + void delete_slot(int slot) { + menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_5).at(slot).at(2).as() = 0; + *get_outfit_slot_name_ptr(slot) = 0; + } + + void save_outfit_edit() { + native::stat_save(0, false, 3); + } +} + +void network_account_outfits_menu::load() { + set_name("Outfits"); + set_parent(); + + add_string("Create Outfit"); + add_string("Outfits"); + add_string("New Outfit"); + add_string("~m~None"); + + network_account_outfits_edit_menu::get(); +} + +void network_account_outfits_menu::update() {} + +void network_account_outfits_menu::update_once() { + clear_options(0); + + if (get_free_slots()) { + add_option(submenu_option(get_string("Create Outfit")) + .add_click([this] { + network_account_outfits_edit_menu::get()->set_name(get_string("New Outfit"), false, false); + network::account::outfits::edit::vars::m_vars.m_slot = get_free_slot_index(); + }) + .add_submenu()); + + add_option(break_option(get_string("Outfits"))); + } + + bool valid = false; + for (int i = 0; i < get_max_slots(); i++) { + if (does_outfit_slot_exist(i)) { + char* name = get_outfit_slot_name_ptr(i); + if (name) { + if (!native::is_string_null_or_empty(name)) { + valid = true; + + add_option(submenu_option(name) + .add_submenu() + .add_click([=] { + network_account_outfits_edit_menu::get()->set_name(name, false, false); + network::account::outfits::edit::vars::m_vars.m_slot = i; + })); + } + } + } + } + + if (!valid) { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void network_account_outfits_menu::feature_update() {} + +network_account_outfits_menu* g_instance; +network_account_outfits_menu* network_account_outfits_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_outfits_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_outfits.h b/GTAV/src/menu/base/submenus/main/network/account/network_account_outfits.h new file mode 100644 index 0000000..bdab31f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_outfits.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_outfits_menu : public menu::submenu::submenu { +public: + static network_account_outfits_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_outfits_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::outfits::vars { + struct variables { + + }; + + bool does_outfit_slot_exist(int outfit_index); + char* get_outfit_slot_name_ptr(int outfit_index); + int get_max_slots(); + int get_free_slots(); + int get_free_slot_index(); + void delete_slot(int slot); + void save_outfit_edit(); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_times.cpp b/GTAV/src/menu/base/submenus/main/network/account/network_account_times.cpp new file mode 100644 index 0000000..b36d264 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_times.cpp @@ -0,0 +1,109 @@ +#include "network_account_times.h" +#include "menu/base/submenu_handler.h" +#include "../network_account.h" +#include "menu/base/util/stats.h" + +using namespace network::account::times::vars; + +namespace network::account::times::vars { + variables m_vars; + + scroll_struct stat_names[] = { + { localization("In Multiplayer", true), "MP_PLAYING_TIME" }, + { localization("In Car", true), "TIME_IN_CAR" }, + { localization("In Cover", true), "TIME_IN_COVER" }, + { localization("In Water", true), "TIME_IN_WATER" }, + { localization("As a Passenger", true), "TIME_AS_A_PASSENGER" }, + { localization("As a Driver", true), "TIME_AS_A_DRIVER" }, + { localization("Flying", true), "TIME_SPENT_FLYING" }, + { localization("Swimming", true), "TIME_SWIMMING" }, + { localization("Underwater", true), "TIME_UNDERWATER" }, + { localization("Walking", true), "TIME_WALKING" }, + { localization("On Lost Bike", true), "TIME_ON_LOST_BIKE" }, + { localization("Riding a Bicycle", true), "TIME_DRIVING_BICYCLE" }, + { localization("Riding a Bike", true), "TIME_DRIVING_BIKE" }, + { localization("Driving a Boat", true), "TIME_DRIVING_BOAT" }, + { localization("Driving a Car", true), "TIME_DRIVING_CAR" }, + { localization("Flying a Helicopter", true), "TIME_DRIVING_HELI" }, + { localization("Flying a Plane", true), "TIME_DRIVING_PLANE" }, + { localization("Driving a Quad Bike", true), "TIME_DRIVING_QUADBIKE" }, + { localization("Driving a Submarine", true), "TIME_DRIVING_SUBMARINE" }, + { localization("Specating Crew Members", true), "TIME_SPECT_CREW_MEMBERS" }, + { localization("Spectating Freeroam", true), "TIME_SPECT_FREEROAM" }, + { localization("Spectating Friends", true), "TIME_SPECT_FRIENDS" }, + { localization("Spectating Friends (Non Crew)", true), "TIME_SPECT_FRIEND_NOT_CREW" }, + { localization("Spectating Jobs", true), "TIME_SPECT_JOBS" }, + { localization("Spectating Strangers", true), "TIME_SPECT_STRANGERS" }, + }; + + void set_time() { + int math = (m_vars.m_days * 86400000) + (m_vars.m_hours * 3600000) + (m_vars.m_minutes * 60000) + (m_vars.m_seconds * 1000) + m_vars.m_milliseconds; + stats::set(stat_names[m_vars.m_type].m_result, math); + } + + void initialize() { + int total = stats::get(stat_names[m_vars.m_type].m_result); + m_vars.m_days = total / 86400000; + total = total % 86400000; + m_vars.m_hours = total / 3600000; + total = total % 3600000; + m_vars.m_minutes = total / 60000; + total = total % 60000; + m_vars.m_seconds = total / 1000; + m_vars.m_milliseconds = total % 1000; + } +} + +void network_account_times_menu::load() { + set_name("Times"); + set_parent(); + + add_option(scroll_option(SCROLL, "Type") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(stat_names), stat_names) + .add_click(initialize)); + + add_option(number_option(SCROLL, "Days") + .add_translate() + .add_number(m_vars.m_days, "%i", 1).add_min(0).add_max(std::numeric_limits::max()) + .add_click(set_time)); + + add_option(number_option(SCROLL, "Hours") + .add_translate() + .add_number(m_vars.m_hours, "%i", 1).add_min(0).add_max(24) + .add_click(set_time)); + + add_option(number_option(SCROLL, "Minutes") + .add_translate() + .add_number(m_vars.m_minutes, "%i", 1).add_min(0).add_max(60) + .add_click(set_time)); + + add_option(number_option(SCROLL, "Seconds") + .add_translate() + .add_number(m_vars.m_seconds, "%i", 1).add_min(0).add_max(60) + .add_click(set_time)); + + add_option(number_option(SCROLL, "Milliseconds") + .add_translate() + .add_number(m_vars.m_milliseconds, "%i", 1).add_min(0).add_max(1000) + .add_click(set_time)); +} + +void network_account_times_menu::update() {} + +void network_account_times_menu::update_once() { + initialize(); +} + +void network_account_times_menu::feature_update() {} + +network_account_times_menu* g_instance; +network_account_times_menu* network_account_times_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_times_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_times.h b/GTAV/src/menu/base/submenus/main/network/account/network_account_times.h new file mode 100644 index 0000000..4e5c6ba --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_times.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_times_menu : public menu::submenu::submenu { +public: + static network_account_times_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_times_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::times::vars { + struct variables { + int m_type; + int m_days; + int m_hours; + int m_minutes; + int m_seconds; + int m_milliseconds; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_unlocks.cpp b/GTAV/src/menu/base/submenus/main/network/account/network_account_unlocks.cpp new file mode 100644 index 0000000..6b147db --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_unlocks.cpp @@ -0,0 +1,670 @@ +#include "network_account_unlocks.h" +#include "menu/base/submenu_handler.h" +#include "../network_account.h" +#include "menu/base/util/stats.h" + +using namespace network::account::unlocks::vars; + +namespace network::account::unlocks::vars { + variables m_vars; + + void unlock_misc() { + stats::set("CHAR_HEIST_1_UNLCK", -1); + stats::set("CHAR_ABILITY_1_UNLCK", -1); + stats::set("CHAR_ABILITY_2_UNLCK", -1); + stats::set("CHAR_ABILITY_3_UNLCK", -1); + stats::set("CHAR_FM_HEALTH_1_UNLCK", -1); + stats::set("CHAR_FM_HEALTH_2_UNLCK", -1); + stats::set("CHAR_CREWUNLOCK_1_UNLCK", -1); + } + + void unlock_heist_vehicles() { + stats::set("CHAR_FM_VEHICLE_1_UNLCK", -1); + stats::set("CHAR_FM_VEHICLE_2_UNLCK", -1); + } + + void unlock_weapons() { + stats::set("CHAR_WEAP_UNLOCKED", -1); + stats::set("CHAR_WEAP_UNLOCKED2", -1); + stats::set("CHAR_FM_WEAP_UNLOCKED", -1); + stats::set("CHAR_FM_WEAP_UNLOCKED2", -1); + stats::set("CHAR_FM_WEAP_UNLOCKED3", -1); + stats::set("CHAR_WEAP_ADDON_1_UNLCK", -1); + stats::set("CHAR_WEAP_ADDON_2_UNLCK", -1); + stats::set("CHAR_WEAP_ADDON_3_UNLCK", -1); + stats::set("CHAR_WEAP_ADDON_4_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_1_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_2_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_3_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_4_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_5_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_6_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_7_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_8_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_9_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_10_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_11_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_12_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_13_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_14_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_15_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_16_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_17_UNLCK", -1); + stats::set("CHAR_FM_WEAP_ADDON_18_UNLCK", -1); + stats::set("GRENADE_ENEMY_KILLS", 50); + stats::set("AWD_20_KILLS_MELEE", 50); + stats::set("CMBTPISTOL_ENEMY_KILLS", 600); + stats::set("PISTOL50_ENEMY_KILLS", 600); + stats::set("APPISTOL_ENEMY_KILLS", 600); + stats::set("MICROSMG_ENEMY_KILLS", 600); + stats::set("SMG_ENEMY_KILLS", 600); + stats::set("ASLTSMG_ENEMY_KILLS", 600); + stats::set("ASLTRIFLE_ENEMY_KILLS", 600); + stats::set("CRBNRIFLE_ENEMY_KILLS", 600); + stats::set("ADVRIFLE_ENEMY_KILLS", 600); + stats::set("MG_ENEMY_KILLS", 600); + stats::set("CMBTMG_ENEMY_KILLS", 600); + stats::set("ASLTMG_ENEMY_KILLS", 600); + stats::set("PUMP_ENEMY_KILLS", 600); + stats::set("SAWNOFF_ENEMY_KILLS", 600); + stats::set("BULLPUP_ENEMY_KILLS", 600); + stats::set("ASLTSHTGN_ENEMY_KILLS", 600); + stats::set("SNIPERRFL_ENEMY_KILLS", 600); + stats::set("HVYSNIPER_ENEMY_KILLS", 600); + stats::set("GRNLAUNCH_ENEMY_KILLS", 600); + stats::set("RPG_ENEMY_KILLS", 600); + stats::set("MINIGUNS_ENEMY_KILLS", 600); + stats::set("SMKGRENADE_ENEMY_KILLS", 600); + stats::set("STKYBMB_ENEMY_KILLS", 600); + stats::set("MOLOTOV_ENEMY_KILLS", 600); + } + + void unlock_clothes() { + stats::set("CHAR_FM_CLOTHES_1_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_2_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_3_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_4_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_5_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_6_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_7_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_8_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_9_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_10_UNLCK", -1); + stats::set("CHAR_FM_CLOTHES_11_UNLCK", -1); + stats::set("CLTHS_AVAILABLE_FEET_1", -1); + stats::set("CLTHS_AVAILABLE_JBIB", -1); + stats::set("CLTHS_AVAILABLE_JBIB_1", -1); + stats::set("CLTHS_AVAILABLE_JBIB_2", -1); + stats::set("CLTHS_AVAILABLE_JBIB_3", -1); + stats::set("CLTHS_AVAILABLE_JBIB_4", -1); + stats::set("CLTHS_AVAILABLE_JBIB_5", -1); + stats::set("CLTHS_AVAILABLE_JBIB_6", -1); + stats::set("CLTHS_AVAILABLE_JBIB_7", -1); + stats::set("CLTHS_AVAILABLE_LEGS", -1); + stats::set("CLTHS_AVAILABLE_LEGS_1", -1); + stats::set("CLTHS_AVAILABLE_LEGS_2", -1); + stats::set("CLTHS_AVAILABLE_LEGS_3", -1); + stats::set("CLTHS_AVAILABLE_LEGS_4", -1); + stats::set("CLTHS_AVAILABLE_LEGS_5", -1); + stats::set("CLTHS_AVAILABLE_LEGS_6", -1); + stats::set("CLTHS_AVAILABLE_LEGS_7", -1); + stats::set("CLTHS_AVAILABLE_FEET", -1); + stats::set("CLTHS_AVAILABLE_FEET_1", -1); + stats::set("CLTHS_AVAILABLE_FEET_2", -1); + stats::set("CLTHS_AVAILABLE_FEET_3", -1); + stats::set("CLTHS_AVAILABLE_FEET_4", -1); + stats::set("CLTHS_AVAILABLE_FEET_5", -1); + stats::set("CLTHS_AVAILABLE_FEET_6", -1); + stats::set("CLTHS_AVAILABLE_FEET_7", -1); + stats::set("CLTHS_AVAILABLE_BERD", -1); + stats::set("CLTHS_AVAILABLE_BERD_1", -1); + stats::set("CLTHS_AVAILABLE_BERD_2", -1); + stats::set("CLTHS_AVAILABLE_BERD_3", -1); + stats::set("CLTHS_AVAILABLE_BERD_4", -1); + stats::set("CLTHS_AVAILABLE_BERD_5", -1); + stats::set("CLTHS_AVAILABLE_BERD_6", -1); + stats::set("CLTHS_AVAILABLE_BERD_7", -1); + stats::set("CLTHS_AVAILABLE_PROPS", -1); + stats::set("CLTHS_AVAILABLE_PROPS_1", -1); + stats::set("CLTHS_AVAILABLE_PROPS_2", -1); + stats::set("CLTHS_AVAILABLE_PROPS_3", -1); + stats::set("CLTHS_AVAILABLE_PROPS_4", -1); + stats::set("CLTHS_AVAILABLE_PROPS_5", -1); + stats::set("CLTHS_AVAILABLE_PROPS_6", -1); + stats::set("CLTHS_AVAILABLE_PROPS_7", -1); + stats::set("CLTHS_AVAILABLE_PROPS_8", -1); + stats::set("CLTHS_AVAILABLE_PROPS_9", -1); + stats::set("CLTHS_AVAILABLE_PROPS_10", -1); + stats::set("CLTHS_AVAILABLE_OUTFIT", -1); + stats::set("CLTHS_ACQUIRED_HAIR", -1); + stats::set("CLTHS_ACQUIRED_HAIR_1", -1); + stats::set("CLTHS_ACQUIRED_HAIR_2", -1); + stats::set("CLTHS_ACQUIRED_HAIR_3", -1); + stats::set("CLTHS_ACQUIRED_HAIR_4", -1); + stats::set("CLTHS_ACQUIRED_HAIR_5", -1);; + stats::set("CLTHS_ACQUIRED_HAIR_6", -1); + stats::set("CLTHS_ACQUIRED_HAIR_7", -1); + stats::set("CLTHS_ACQUIRED_JBIB", -1); + stats::set("CLTHS_ACQUIRED_JBIB_1", -1); + stats::set("CLTHS_ACQUIRED_JBIB_2", -1); + stats::set("CLTHS_ACQUIRED_JBIB_3", -1); + stats::set("CLTHS_ACQUIRED_JBIB_4", -1); + stats::set("CLTHS_ACQUIRED_JBIB_5", -1); + stats::set("CLTHS_ACQUIRED_JBIB_6", -1); + stats::set("CLTHS_ACQUIRED_JBIB_7", -1); + stats::set("CLTHS_ACQUIRED_LEGS", -1); + stats::set("CLTHS_ACQUIRED_LEGS_1", -1); + stats::set("CLTHS_ACQUIRED_LEGS_2", -1); + stats::set("CLTHS_ACQUIRED_LEGS_3", -1); + stats::set("CLTHS_ACQUIRED_LEGS_4", -1); + stats::set("CLTHS_ACQUIRED_LEGS_5", -1); + stats::set("CLTHS_ACQUIRED_LEGS_6", -1);; + stats::set("CLTHS_ACQUIRED_LEGS_7", -1); + stats::set("CLTHS_ACQUIRED_FEET", -1); + stats::set("CLTHS_ACQUIRED_FEET_1", -1); + stats::set("CLTHS_ACQUIRED_FEET_2", -1); + stats::set("CLTHS_ACQUIRED_FEET_3", -1); + stats::set("CLTHS_ACQUIRED_FEET_4", -1); + stats::set("CLTHS_ACQUIRED_FEET_5", -1); + stats::set("CLTHS_ACQUIRED_FEET_6", -1); + stats::set("CLTHS_ACQUIRED_FEET_7", -1); + stats::set("CLTHS_ACQUIRED_BERD", -1); + stats::set("CLTHS_ACQUIRED_BERD_1", -1); + stats::set("CLTHS_ACQUIRED_BERD_2", -1); + stats::set("CLTHS_ACQUIRED_BERD_3", -1); + stats::set("CLTHS_ACQUIRED_BERD_4", -1); + stats::set("CLTHS_ACQUIRED_BERD_5", -1); + stats::set("CLTHS_ACQUIRED_BERD_6", -1); + stats::set("CLTHS_ACQUIRED_BERD_7", -1); + stats::set("CLTHS_ACQUIRED_PROPS", -1); + stats::set("CLTHS_ACQUIRED_PROPS_1", -1); + stats::set("CLTHS_ACQUIRED_PROPS_2", -1); + stats::set("CLTHS_ACQUIRED_PROPS_3", -1); + stats::set("CLTHS_ACQUIRED_PROPS_4", -1); + stats::set("CLTHS_ACQUIRED_PROPS_5", -1); + stats::set("CLTHS_ACQUIRED_PROPS_6", -1); + stats::set("CLTHS_ACQUIRED_PROPS_7", -1); + stats::set("CLTHS_ACQUIRED_PROPS_8", -1); + stats::set("CLTHS_ACQUIRED_PROPS_9", -1); + stats::set("CLTHS_ACQUIRED_PROPS_10", -1); + stats::set("CLTHS_ACQUIRED_OUTFIT", -1); + stats::set("CLTHS_AVAILABLE_TORSO", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL_1", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL_2", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL_3", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL_4", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL_5", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL_6", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL_7", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL2", -1); + stats::set("CLTHS_AVAILABLE_SPECIAL2_1", -1); + stats::set("CLTHS_AVAILABLE_DECL", -1); + stats::set("CLTHS_AVAILABLE_TEETH", -1); + stats::set("CLTHS_AVAILABLE_TEETH_1", -1); + stats::set("CLTHS_AVAILABLE_TEETH_2", -1); + stats::set("CLTHS_ACQUIRED_TORSO", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL_1", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL_2", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL_3", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL_4", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL_5", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL_6", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL_7", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL2", -1); + stats::set("CLTHS_ACQUIRED_SPECIAL2_1", -1); + stats::set("CLTHS_ACQUIRED_DECL", -1); + stats::set("CLTHS_ACQUIRED_TEETH", -1); + stats::set("CLTHS_ACQUIRED_TEETH_1", -1); + stats::set("CLTHS_ACQUIRED_TEETH_2", -1); + stats::set("DLC_APPAREL_ACQUIRED_0", -1); + stats::set("DLC_APPAREL_ACQUIRED_1", -1); + stats::set("DLC_APPAREL_ACQUIRED_2", -1); + stats::set("DLC_APPAREL_ACQUIRED_3", -1); + stats::set("DLC_APPAREL_ACQUIRED_4", -1); + stats::set("DLC_APPAREL_ACQUIRED_5", -1); + stats::set("DLC_APPAREL_ACQUIRED_6", -1); + stats::set("DLC_APPAREL_ACQUIRED_7", -1); + stats::set("DLC_APPAREL_ACQUIRED_8", -1); + stats::set("DLC_APPAREL_ACQUIRED_9", -1); + stats::set("DLC_APPAREL_ACQUIRED_10", -1); + stats::set("DLC_APPAREL_ACQUIRED_11", -1); + stats::set("DLC_APPAREL_ACQUIRED_12", -1); + stats::set("DLC_APPAREL_ACQUIRED_13", -1); + stats::set("DLC_APPAREL_ACQUIRED_14", -1); + stats::set("DLC_APPAREL_ACQUIRED_15", -1); + stats::set("DLC_APPAREL_ACQUIRED_16", -1); + stats::set("DLC_APPAREL_ACQUIRED_17", -1); + stats::set("DLC_APPAREL_ACQUIRED_18", -1); + stats::set("DLC_APPAREL_ACQUIRED_19", -1); + stats::set("DLC_APPAREL_ACQUIRED_21", -1); + stats::set("DLC_APPAREL_ACQUIRED_22", -1); + stats::set("DLC_APPAREL_ACQUIRED_23", -1); + stats::set("DLC_APPAREL_ACQUIRED_24", -1); + stats::set("DLC_APPAREL_ACQUIRED_24", -1); + stats::set("DLC_APPAREL_ACQUIRED_25", -1); + stats::set("DLC_APPAREL_ACQUIRED_26", -1); + stats::set("DLC_APPAREL_ACQUIRED_27", -1); + stats::set("DLC_APPAREL_ACQUIRED_28", -1); + stats::set("DLC_APPAREL_ACQUIRED_29", -1); + stats::set("DLC_APPAREL_ACQUIRED_30", -1); + stats::set("DLC_APPAREL_ACQUIRED_31", -1); + stats::set("DLC_APPAREL_ACQUIRED_32", -1); + stats::set("DLC_APPAREL_ACQUIRED_33", -1); + stats::set("DLC_APPAREL_ACQUIRED_34", -1); + stats::set("DLC_APPAREL_ACQUIRED_35", -1); + stats::set("DLC_APPAREL_ACQUIRED_36", -1); + stats::set("DLC_APPAREL_ACQUIRED_37", -1); + stats::set("DLC_APPAREL_ACQUIRED_38", -1); + stats::set("DLC_APPAREL_ACQUIRED_39", -1); + stats::set("DLC_APPAREL_ACQUIRED_40", -1); + stats::set("DLC_APPAREL_ACQUIRED_41", -1); + stats::set("DLC_APPAREL_ACQUIRED_42", -1); + stats::set("DLC_APPAREL_ACQUIRED_43", -1); + stats::set("DLC_APPAREL_ACQUIRED_44", -1); + stats::set("DLC_APPAREL_ACQUIRED_45", -1); + stats::set("DLC_APPAREL_ACQUIRED_46", -1); + stats::set("DLC_APPAREL_ACQUIRED_47", -1); + stats::set("DLC_APPAREL_ACQUIRED_48", -1); + stats::set("DLC_APPAREL_ACQUIRED_49", -1); + stats::set("DLC_APPAREL_ACQUIRED_50", -1); + stats::set("DLC_APPAREL_ACQUIRED_51", -1); + stats::set("DLC_APPAREL_ACQUIRED_52", -1); + stats::set("DLC_APPAREL_ACQUIRED_53", -1); + stats::set("DLC_APPAREL_ACQUIRED_54", -1); + stats::set("DLC_APPAREL_ACQUIRED_55", -1); + stats::set("DLC_APPAREL_ACQUIRED_56", -1); + stats::set("ADMIN_CLOTHES_GV_BS_1", -1); + stats::set("ADMIN_CLOTHES_GV_BS_2", -1); + stats::set("ADMIN_CLOTHES_GV_BS_3", -1); + stats::set("ADMIN_CLOTHES_GV_BS_4", -1); + stats::set("ADMIN_CLOTHES_GV_BS_5", -1); + stats::set("ADMIN_CLOTHES_GV_BS_6", -1); + stats::set("ADMIN_CLOTHES_GV_BS_7", -1); + stats::set("ADMIN_CLOTHES_GV_BS_8", -1); + stats::set("ADMIN_CLOTHES_GV_BS_9", -1); + stats::set("ADMIN_CLOTHES_GV_BS_10", -1); + stats::set("ADMIN_CLOTHES_GV_BS_11", -1); + stats::set("ADMIN_CLOTHES_GV_BS_12", -1); + stats::set("ADMIN_CLOTHES_GV_BS_13", -1); + stats::set("ADMIN_CLOTHES_GV_BS_1", -1); + stats::set("ADMIN_CLOTHES_RM_BS_10", -1); + stats::set("ADMIN_CLOTHES_GV_BS_10", -1); + stats::set("ADMIN_CLOTHES_RM_BS_11", -1); + stats::set("ADMIN_CLOTHES_GV_BS_11", -1); + stats::set("ADMIN_CLOTHES_RM_BS_12", -1); + stats::set("ADMIN_CLOTHES_GV_BS_12", -1); + stats::set("AWD_FMHORDWAVESSURVIVE", 10); + stats::set("AWD_FMPICKUPDLCCRATE1ST", 1); + stats::set("AWD_WIN_CAPTURE_DONT_DYING", 25); + stats::set("AWD_DO_HEIST_AS_MEMBER", 25); + stats::set("AWD_PICKUP_CAP_PACKAGES", 100); + stats::set("AWD_FINISH_HEIST_NO_DAMAGE", 1); + stats::set("AWD_WIN_GOLD_MEDAL_HEISTS", 25); + stats::set("AWD_KILL_TEAM_YOURSELF_LTS", 25); + stats::set("AWD_KILL_PSYCHOPATHS", 100); + stats::set("AWD_DO_HEIST_AS_THE_LEADER", 25); + stats::set("AWD_STORE_20_CAR_IN_GARAGES", 1); + } + + void unlock_haircuts() { + stats::set("CHAR_HAIR_UNLCK1", -1); + stats::set("CHAR_HAIR_UNLCK2", -1); + stats::set("CHAR_HAIR_UNLCK3", -1); + stats::set("CHAR_HAIR_UNLCK4", -1); + stats::set("CHAR_HAIR_UNLCK5", -1); + stats::set("CHAR_HAIR_UNLCK6", -1); + stats::set("CHAR_HAIR_UNLCK7", -1); + stats::set("CHAR_HAIR_UNLCK8", -1); + stats::set("CHAR_HAIR_UNLCK9", -1); + stats::set("CHAR_HAIR_UNLCK10", -1); + stats::set("CHAR_HAIR_UNLCK11", -1); + stats::set("CHAR_HAIR_UNLCK12", -1); + stats::set("CHAR_HAIR_UNLCK13", -1); + stats::set("CHAR_HAIR_UNLCK14", -1); + stats::set("CHAR_HAIR_UNLCK15", -1); + stats::set("CHAR_HAIR_UNLCK16", -1); + stats::set("CHAR_FM_HAIRCUT_1_UNLCK", -1); + stats::set("CLTHS_AVAILABLE_HAIR", -1); + stats::set("CLTHS_AVAILABLE_HAIR1", -1); + stats::set("CLTHS_AVAILABLE_HAIR2", -1); + stats::set("CLTHS_AVAILABLE_HAIR3", -1); + stats::set("CLTHS_AVAILABLE_HAIR4", -1); + stats::set("CLTHS_AVAILABLE_HAIR5", -1); + stats::set("CLTHS_AVAILABLE_HAIR6", -1); + stats::set("CLTHS_AVAILABLE_HAIR7", -1); + } + + void unlock_tattoos() { + stats::set("AWD_FMATTGANGHQ", true); + stats::set("AWD_FMKILLSTREAKSDM", true); + stats::set("AWD_FMWINEVERYGAMEMODE", true); + stats::set("AWD_FMRACEWORLDRECHOLDER", true); + stats::set("AWD_FMFULLYMODDEDCAR", true); + stats::set("AWD_FMMOSTKILLSSURVIVE", true); + stats::set("AWD_FMKILL3ANDWINGTARACE", true); + stats::set("AWD_FM_DM_WINS", 50); + stats::set("AWD_FM_TDM_MVP", 50); + stats::set("AWD_FM_DM_TOTALKILLS", 500); + stats::set("AWD_FMBBETWIN", 50000); + stats::set("AWD_FMKILLBOUNTY", 25); + stats::set("AWD_FMREVENGEKILLSDM", 50); + stats::set("AWD_HOLD_UP_SHOPS", 20); + stats::set("AWD_LAPDANCES", 25); + stats::set("AWD_SECURITY_CARS_ROBBED", 25); + stats::set("AWD_RACES_WON", 50); + stats::set("AWD_CAR_BOMBS_ENEMY_KILLS", 25); + stats::set("PLAYER_HEADSHOTS", 500); + stats::set("DB_PLAYER_KILLS", 1000); + stats::set("TATTOO_FM_UNLOCKS_0", -1); + stats::set("TATTOO_FM_UNLOCKS_1", -1); + stats::set("TATTOO_FM_UNLOCKS_2", -1); + stats::set("TATTOO_FM_UNLOCKS_3", -1); + stats::set("TATTOO_FM_UNLOCKS_4", -1); + stats::set("TATTOO_FM_UNLOCKS_5", -1); + stats::set("TATTOO_FM_UNLOCKS_6", -1); + stats::set("TATTOO_FM_UNLOCKS_7", -1); + stats::set("TATTOO_FM_UNLOCKS_8", -1); + stats::set("TATTOO_FM_UNLOCKS_9", -1); + stats::set("TATTOO_FM_UNLOCKS_10", -1); + stats::set("TATTOO_FM_UNLOCKS_11", -1); + stats::set("TATTOO_FM_UNLOCKS_12", -1); + stats::set("TATTOO_FM_UNLOCKS_13", -1); + stats::set("TATTOO_FM_UNLOCKS_14", -1); + stats::set("TATTOO_FM_UNLOCKS_15", -1); + stats::set("TATTOO_FM_UNLOCKS_16", -1); + stats::set("TATTOO_FM_UNLOCKS_17", -1); + stats::set("TATTOO_FM_UNLOCKS_18", -1); + stats::set("TATTOO_FM_UNLOCKS_19", -1); + stats::set("TATTOO_FM_UNLOCKS_20", -1); + stats::set("TATTOO_FM_UNLOCKS_21", -1); + stats::set("TATTOO_FM_UNLOCKS_22", -1); + stats::set("TATTOO_FM_UNLOCKS_23", -1); + stats::set("TATTOO_FM_UNLOCKS_24", -1); + stats::set("TATTOO_FM_UNLOCKS_25", -1); + stats::set("TATTOO_FM_UNLOCKS_26", -1); + stats::set("TATTOO_FM_UNLOCKS_27", -1); + stats::set("TATTOO_FM_UNLOCKS_28", -1); + stats::set("TATTOO_FM_UNLOCKS_29", -1); + stats::set("TATTOO_FM_UNLOCKS_30", -1); + stats::set("TATTOO_FM_UNLOCKS_31", -1); + stats::set("TATTOO_FM_UNLOCKS_32", -1); + stats::set("TATTOO_FM_UNLOCKS_33", -1); + stats::set("TATTOO_FM_UNLOCKS_34", -1); + stats::set("TATTOO_FM_UNLOCKS_35", -1); + stats::set("TATTOO_FM_UNLOCKS_36", -1); + stats::set("TATTOO_FM_UNLOCKS_37", -1); + stats::set("TATTOO_FM_UNLOCKS_38", -1); + stats::set("TATTOO_FM_UNLOCKS_39", -1); + stats::set("TATTOO_FM_UNLOCKS_40", -1); + stats::set("TATTOO_FM_UNLOCKS_41", -1); + stats::set("TATTOO_FM_UNLOCKS_42", -1); + stats::set("TATTOO_FM_UNLOCKS_43", -1); + stats::set("TATTOO_FM_UNLOCKS_44", -1); + stats::set("TATTOO_FM_UNLOCKS_45", -1); + } + + void unlock_camo_and_parachutes() { + stats::set("CHAR_KIT_1_FM_UNLCK", -1); + stats::set("CHAR_KIT_2_FM_UNLCK", -1); + stats::set("CHAR_KIT_3_FM_UNLCK", -1); + stats::set("CHAR_KIT_4_FM_UNLCK", -1); + stats::set("CHAR_KIT_5_FM_UNLCK", -1); + stats::set("CHAR_KIT_6_FM_UNLCK", -1); + stats::set("CHAR_KIT_7_FM_UNLCK", -1); + stats::set("CHAR_KIT_8_FM_UNLCK", -1); + stats::set("CHAR_KIT_9_FM_UNLCK", -1); + stats::set("CHAR_KIT_10_FM_UNLCK", -1); + stats::set("CHAR_KIT_11_FM_UNLCK", -1); + stats::set("CHAR_KIT_12_FM_UNLCK", -1); + stats::set("CHAR_KIT_13_FM_UNLCK", -1); + stats::set("CHAR_KIT_14_FM_UNLCK", -1); + stats::set("CHAR_KIT_15_FM_UNLCK", -1); + stats::set("CHAR_KIT_16_FM_UNLCK", -1); + stats::set("CHAR_KIT_17_FM_UNLCK", -1); + stats::set("CHAR_KIT_18_FM_UNLCK", -1); + stats::set("CHAR_KIT_19_FM_UNLCK", -1); + stats::set("CHAR_KIT_20_FM_UNLCK", -1); + stats::set("CHAR_KIT_21_FM_UNLCK", -1); + stats::set("CHAR_KIT_22_FM_UNLCK", -1); + stats::set("CHAR_KIT_23_FM_UNLCK", -1); + stats::set("CHAR_KIT_24_FM_UNLCK", -1); + stats::set("CHAR_KIT_25_FM_UNLCK", -1); + stats::set("CHAR_KIT_26_FM_UNLCK", -1); + stats::set("CHAR_KIT_27_FM_UNLCK", -1); + stats::set("CHAR_KIT_28_FM_UNLCK", -1); + stats::set("CHAR_KIT_29_FM_UNLCK", -1); + stats::set("CHAR_KIT_30_FM_UNLCK", -1); + stats::set("CHAR_KIT_31_FM_UNLCK", -1); + stats::set("CHAR_KIT_32_FM_UNLCK", -1); + stats::set("CHAR_KIT_33_FM_UNLCK", -1); + stats::set("CHAR_KIT_34_FM_UNLCK", -1); + stats::set("CHAR_KIT_35_FM_UNLCK", -1); + stats::set("CHAR_KIT_36_FM_UNLCK", -1); + stats::set("CHAR_KIT_37_FM_UNLCK", -1); + stats::set("CHAR_KIT_38_FM_UNLCK", -1); + stats::set("CHAR_KIT_39_FM_UNLCK", -1); + stats::set("CHAR_KIT_40_FM_UNLCK", -1); + } + + void unlock_los_santos_customs() { + stats::set("RACES_WON", 50); + stats::set("CHAR_FM_CARMOD_1_UNLCK", -1); + stats::set("CHAR_FM_CARMOD_2_UNLCK", -1); + stats::set("CHAR_FM_CARMOD_3_UNLCK", -1); + stats::set("CHAR_FM_CARMOD_4_UNLCK", -1); + stats::set("CHAR_FM_CARMOD_5_UNLCK", -1); + stats::set("CHAR_FM_CARMOD_6_UNLCK", -1); + stats::set("CHAR_FM_CARMOD_7_UNLCK", -1); + stats::set("NUMBER_SLIPSTREAMS_IN_RACE", 110); + stats::set("NUMBER_TURBO_STARTS_IN_RACE", 90); + stats::set("USJS_FOUND", 50); + stats::set("USJS_COMPLETED", 50); + stats::set("AWD_FMRALLYWONDRIVE", 2); + stats::set("AWD_FMRALLYWONNAV", 2); + stats::set("AWD_FMWINSEARACE", 2); + stats::set("AWD_FMWINAIRRACE", 2); + stats::set("AWD_FM_RACES_FASTEST_LAP", 101); + stats::set("AWD_WIN_CAPTURES", 25); + stats::set("AWD_DROPOFF_CAP_PACKAGES", 100); + stats::set("AWD_KILL_CARRIER_CAPTURE", 100); + stats::set("AWD_FINISH_HEISTS", 50); + stats::set("AWD_FINISH_HEIST_SETUP_JOB", 50); + stats::set("AWD_NIGHTVISION_KILLS", 100); + stats::set("AWD_WIN_LAST_TEAM_STANDINGS", 50); + stats::set("AWD_ONLY_PLAYER_ALIVE_LTS", 50); + stats::set("AWD_ENEMYDRIVEBYKILLS", 600); + stats::set("DB_PLAYER_KILLS", 1000); + stats::set("KILLS_PLAYERS", 1000); + stats::set("AWD_FMHORDWAVESSURVIVE", 21); + stats::set("AWD_CAR_BOMBS_ENEMY_KILLS", 25); + stats::set("AWD_FM_TDM_MVP", 60); + stats::set("AWD_HOLD_UP_SHOPS", 20); + stats::set("AWD_RACES_WON", 101); + stats::set("AWD_NO_ARMWRESTLING_WINS", 21); + stats::set("AWD_FMBBETWIN", 50000); + stats::set("AWD_FM_DM_WINS", 51); + stats::set("AWD_FM_DM_TOTALKILLS", 500); + stats::set("MPPLY_DM_TOTAL_DEATHS", 412); + stats::set("MPPLY_TIMES_FINISH_DM_TOP_3", 36); + stats::set("PLAYER_HEADSHOTS", 623); + stats::set("AWD_FM_DM_WINS", 63); + stats::set("AWD_FM_TDM_WINS", 13); + stats::set("AWD_FM_GTA_RACES_WON", 12); + stats::set("AWD_FM_GOLF_WON", 2); + stats::set("AWD_FM_SHOOTRANG_TG_WON", 2); + stats::set("AWD_FM_SHOOTRANG_RT_WON", 2); + stats::set("AWD_FM_SHOOTRANG_CT_WON", 2); + stats::set("AWD_FM_SHOOTRANG_GRAN_WON", 2); + stats::set("AWD_FM_TENNIS_WON", 2); + stats::set("MPPLY_TENNIS_MATCHES_WON", 2); + stats::set("MPPLY_TOTAL_TDEATHMATCH_WON", 63); + stats::set("MPPLY_TOTAL_RACES_WON", 101); + stats::set("MPPLY_TOTAL_DEATHMATCH_LOST", 23); + stats::set("MPPLY_TOTAL_RACES_LOST", 36); + stats::set("AWD_25_KILLS_STICKYBOMBS", 50); + stats::set("AWD_50_KILLS_GRENADES", 50); + stats::set("GRENADE_ENEMY_KILLS", 50); + stats::set("AWD_20_KILLS_MELEE", 50); + stats::set("ARENAWARS_AP_TIER", 1000); + } + + void unlock_club_popularity() { + stats::set("CLUB_POPULARITY", 1000); + } + + void unlock_bunker_research() { + std::map map({ { 0, 15381 }, { 1, 15382 }, { 2, 15428 }, { 3, 15429 }, { 4, 15430 }, { 5, 15431 }, { 6, 15491 }, { 7, 15432 }, { 8, 15433 }, { 9, 15434 }, { 10, 15435 }, { 11, 15436 }, { 12, 15437 }, { 13, 15438 }, { 14, 15439 }, { 15, 15447 }, { 16, 15448 }, { 17, 15449 }, { 18, 15450 }, { 19, 15451 }, { 20, 15452 }, { 21, 15453 }, { 22, 15454 }, { 23, 15455 }, { 24, 15456 }, { 25, 15457 }, { 26, 15458 }, { 27, 15459 }, { 28, 15460 }, { 29, 15461 }, { 30, 15462 }, { 31, 15463 }, { 32, 15464 }, { 33, 15465 }, { 34, 15466 }, { 35, 15467 }, { 36, 15468 }, { 37, 15469 }, { 38, 15470 }, { 39, 15471 }, { 40, 15472 }, { 41, 15473 }, { 42, 15474 }, { 43, 15492 }, { 44, 15493 }, { 45, 15494 }, { 46, 15495 }, { 47, 15496 }, { 48, 15497 }, { 49, 15498 }, { 50, 15499 } }); + + for (auto entry : map) { + const auto hash = native::get_ngstat_bool_hash(entry.second - 15369, 0, 1, network::account::vars::m_vars.m_selected_character, "_DLCGUNPSTAT_BOOL"); + const auto mask = ((entry.second - 15369) - native::_0xF4D8E7AC2A27758C(entry.second - 15369) * 64); + native::stat_set_bool_masked(hash, true, mask, true); + } + + stats::set("GUNR_RESEARCH_ITEM", -1); + } + + void unlock_max_abilities() { + stats::set("SCRIPT_INCREASE_STAM", 100); + stats::set("SCRIPT_INCREASE_STRN", 100); + stats::set("SCRIPT_INCREASE_LUNG", 100); + stats::set("SCRIPT_INCREASE_DRIV", 100); + stats::set("SCRIPT_INCREASE_FLY", 100); + stats::set("SCRIPT_INCREASE_SHO", 100); + stats::set("SCRIPT_INCREASE_STL", 100); + } + + void unlock_max_snacks() { + stats::set("NO_BOUGHT_YUM_SNACKS", 30); + stats::set("NO_BOUGHT_HEALTH_SNACKS", 15); + stats::set("NO_BOUGHT_EPIC_SNACKS", 5); + stats::set("NUMBER_OF_CHAMP_BOUGHT", 5); + stats::set("NUMBER_OF_ORANGE_BOUGHT", 10); + stats::set("NUMBER_OF_BOURGE_BOUGHT", 10); + stats::set("CIGARETTES_BOUGHT", 20); + } + + void unlock_max_armor() { + stats::set("MP_CHAR_ARMOUR_1_COUNT", 10); + stats::set("MP_CHAR_ARMOUR_2_COUNT", 10); + stats::set("MP_CHAR_ARMOUR_3_COUNT", 10); + stats::set("MP_CHAR_ARMOUR_4_COUNT", 10); + stats::set("MP_CHAR_ARMOUR_5_COUNT", 10); + } + + void unlock_max_fireworks() { + stats::set("FIREWORK_TYPE_1_WHITE", 2000000); + stats::set("FIREWORK_TYPE_1_RED", 2000000); + stats::set("FIREWORK_TYPE_1_BLUE", 2000000); + stats::set("FIREWORK_TYPE_2_WHITE", 2000000); + stats::set("FIREWORK_TYPE_2_RED", 2000000); + stats::set("FIREWORK_TYPE_2_BLUE", 2000000); + stats::set("FIREWORK_TYPE_3_WHITE", 2000000); + stats::set("FIREWORK_TYPE_3_RED", 2000000); + stats::set("FIREWORK_TYPE_3_BLUE", 2000000); + stats::set("FIREWORK_TYPE_4_WHITE", 2000000); + stats::set("FIREWORK_TYPE_4_RED", 2000000); + stats::set("FIREWORK_TYPE_4_BLUE", 2000000); + } + + void unlock_all() { + unlock_misc(); + unlock_heist_vehicles(); + unlock_weapons(); + unlock_clothes(); + unlock_haircuts(); + unlock_tattoos(); + unlock_camo_and_parachutes(); + unlock_los_santos_customs(); + unlock_club_popularity(); + unlock_bunker_research(); + unlock_max_abilities(); + unlock_max_snacks(); + unlock_max_armor(); + unlock_max_fireworks(); + } +} + +void network_account_unlocks_menu::load() { + set_name("Unlocks"); + set_parent(); + + add_option(button_option("Unlock All") + .add_translate() + .add_click(unlock_all)); + + add_option(button_option("Tattoos") + .add_translate() + .add_click(unlock_tattoos)); + + add_option(button_option("Clothes") + .add_translate() + .add_click(unlock_clothes)); + + add_option(button_option("Haircuts") + .add_translate() + .add_click(unlock_haircuts)); + + add_option(button_option("Weapons") + .add_translate() + .add_click(unlock_weapons)); + + add_option(button_option("Camo and Parachutes") + .add_translate() + .add_click(unlock_camo_and_parachutes)); + + add_option(button_option("Los Santos Customs") + .add_translate() + .add_click(unlock_los_santos_customs)); + + add_option(button_option("Heist Vehicles") + .add_translate() + .add_click(unlock_heist_vehicles)); + + add_option(button_option("Club Propularity") + .add_translate() + .add_click(unlock_club_popularity)); + + add_option(button_option("Bunker Research") + .add_translate() + .add_click(unlock_bunker_research)); + + add_option(button_option("Abilities") + .add_translate() + .add_click(unlock_max_abilities)); + + add_option(button_option("Snacks") + .add_translate() + .add_click(unlock_max_snacks)); + + add_option(button_option("Armor") + .add_translate() + .add_click(unlock_max_armor)); + + add_option(button_option("Fireworks") + .add_translate() + .add_click(unlock_max_fireworks)); + + add_option(button_option("Misc") + .add_translate() + .add_click(unlock_misc)); +} + +void network_account_unlocks_menu::update() {} + +void network_account_unlocks_menu::update_once() {} + +void network_account_unlocks_menu::feature_update() {} + +network_account_unlocks_menu* g_instance; +network_account_unlocks_menu* network_account_unlocks_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_unlocks_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_unlocks.h b/GTAV/src/menu/base/submenus/main/network/account/network_account_unlocks.h new file mode 100644 index 0000000..1d78fb6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_unlocks.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_unlocks_menu : public menu::submenu::submenu { +public: + static network_account_unlocks_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_unlocks_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::unlocks::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_wins_losses.cpp b/GTAV/src/menu/base/submenus/main/network/account/network_account_wins_losses.cpp new file mode 100644 index 0000000..2e88f2f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_wins_losses.cpp @@ -0,0 +1,78 @@ +#include "network_account_wins_losses.h" +#include "menu/base/submenu_handler.h" +#include "../network_account.h" +#include "wins/network_account_wins_losses_edit.h" + +using namespace network::account::wins::losses::vars; + +namespace network::account::wins::losses::vars { + variables m_vars; + + void set(std::string win, std::string loss, bool total = false) { + network::account::wins::losses::edit::vars::m_vars.m_wins.first = win; + network::account::wins::losses::edit::vars::m_vars.m_losses.first = loss; + network::account::wins::losses::edit::vars::m_vars.m_total = total; + } +} + +void network_account_wins_losses_menu::load() { + set_name("Wins and Losses"); + set_parent(); + + add_option(submenu_option("Races") + .add_translate() + .add_submenu() + .add_click([] { set("MPPLY_TOTAL_RACES_WON", "MPPLY_TOTAL_RACES_LOST"); })); + + add_option(submenu_option("Deathmatch") + .add_translate() + .add_submenu() + .add_click([] { set("MPPLY_TOTAL_DEATHMATCH_WON", "MPPLY_TOTAL_DEATHMATCH_LOST"); })); + + add_option(submenu_option("Team Deathmatch") + .add_translate() + .add_submenu() + .add_click([] { set("MPPLY_TOTAL_TDEATHMATCH_WON", "MPPLY_TOTAL_TDEATHMATCH_LOST"); })); + + add_option(submenu_option("Darts") + .add_translate() + .add_submenu() + .add_click([] { set("MPPLY_DARTS_TOTAL_WINS", "MPPLY_DARTS_TOTAL_MATCHES", true); })); + + add_option(submenu_option("Arm Wrestling") + .add_translate() + .add_submenu() + .add_click([] { set("MPPLY_ARMWRESTLING_TOTAL_WINS", "MPPLY_ARMWRESTLING_TOTAL_MATCH", true); })); + + add_option(submenu_option("Tennis") + .add_translate() + .add_submenu() + .add_click([] { set("MPPLY_TENNIS_MATCHES_WON", "MPPLY_TENNIS_MATCHES_LOST"); })); + + add_option(submenu_option("Golf") + .add_translate() + .add_submenu() + .add_click([] { set("MPPLY_GOLF_WINS", "MPPLY_GOLF_LOSSES"); })); + + add_option(submenu_option("Shooting Range") + .add_translate() + .add_submenu() + .add_click([] { set("MPPLY_SHOOTINGRANGE_WINS", "MPPLY_SHOOTINGRANGE_LOSSES"); })); +} + +void network_account_wins_losses_menu::update() {} + +void network_account_wins_losses_menu::update_once() {} + +void network_account_wins_losses_menu::feature_update() {} + +network_account_wins_losses_menu* g_instance; +network_account_wins_losses_menu* network_account_wins_losses_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_wins_losses_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/network_account_wins_losses.h b/GTAV/src/menu/base/submenus/main/network/account/network_account_wins_losses.h new file mode 100644 index 0000000..d233068 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/network_account_wins_losses.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_wins_losses_menu : public menu::submenu::submenu { +public: + static network_account_wins_losses_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_wins_losses_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::wins::losses::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit.cpp b/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit.cpp new file mode 100644 index 0000000..300bb2e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit.cpp @@ -0,0 +1,158 @@ +#include "network_account_outfits_edit.h" +#include "menu/base/submenu_handler.h" +#include "../network_account_outfits.h" +#include "menu/base/submenus/main/player/wardrobe.h" +#include "menu/base/util/global.h" +#include "network_account_outfits_edit_name.h" +#include "rage/types/global_types.h" + +using namespace network::account::outfits::edit::vars; + +namespace network::account::outfits::edit::vars { + variables m_vars; + + void set_accessory_model(int slot, int index, int value) { + menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_1).at(slot, 10).at(index).at(2).as() = value; + } + + void set_accessory_variation(int slot, int index, int value) { + menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_2).at(slot, 10).at(index).at(2).as() = value; + } + + void set_clothing_model(int slot, int index, int value) { + menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_3).at(slot, 13).at(index).at(2).as() = value; + } + + void set_clothing_variation(int slot, int index, int value) { + menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_4).at(slot, 13).at(index).at(2).as() = value; + } + + int get_accessory_model(int slot, int index) { + return menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_1).at(slot, 10).at(index).at(2).as(); + } + + int get_accessory_variation(int slot, int index) { + return menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_2).at(slot, 10).at(index).at(2).as(); + } + + int get_clothing_model(int slot, int index) { + return menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_3).at(slot, 13).at(index).at(2).as(); + } + + int get_clothing_variation(int slot, int index) { + return menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_4).at(slot, 13).at(index).at(2).as(); + } + + void update_slot_to_current(int slot) { + for (int i = 0; i < 12; i++) { + set_clothing_model(slot, i, native::get_ped_drawable_variation(menu::player::get_local_player().m_ped, i)); + set_clothing_variation(slot, i, native::get_ped_texture_variation(menu::player::get_local_player().m_ped, i)); + } + + for (int i = 0; i < 9; i++) { + set_accessory_model(slot, i, native::get_ped_prop_index(menu::player::get_local_player().m_ped, i)); + set_accessory_variation(slot, i, native::get_ped_prop_texture_index(menu::player::get_local_player().m_ped, i)); + } + } + + void cache_current_outfit() { + for (int i = 0; i < 12; i++) { + m_vars.m_clothing_cache[0][i] = native::get_ped_drawable_variation(menu::player::get_local_player().m_ped, i); + m_vars.m_clothing_cache[1][i] = native::get_ped_texture_variation(menu::player::get_local_player().m_ped, i); + } + + for (int i = 0; i < 9; i++) { + m_vars.m_accessory_cache[0][i] = native::get_ped_prop_index(menu::player::get_local_player().m_ped, i); + m_vars.m_accessory_cache[1][i] = native::get_ped_prop_texture_index(menu::player::get_local_player().m_ped, i); + } + } + + void set_cached_outfit() { + for (int i = 0; i < 12; i++) { + native::set_ped_component_variation(menu::player::get_local_player().m_ped, i, m_vars.m_clothing_cache[0][i], m_vars.m_clothing_cache[1][i], 0); + } + + for (int i = 0; i < 9; i++) { + native::set_ped_prop_index(menu::player::get_local_player().m_ped, i, m_vars.m_accessory_cache[0][i], m_vars.m_accessory_cache[1][i], true); + } + } + + void set_current_outfit_to_slot(int slot) { + for (int i = 0; i < 12; i++) { + native::set_ped_component_variation(menu::player::get_local_player().m_ped, i, get_clothing_model(slot, i), get_clothing_variation(slot, i), 0); + } + + for (int i = 0; i < 9; i++) { + native::set_ped_prop_index(menu::player::get_local_player().m_ped, i, get_accessory_model(slot, i), get_accessory_variation(slot, i), true); + } + } + + void create_outfit(int slot) { + update_slot_to_current(slot); + strcpy(network::account::outfits::vars::get_outfit_slot_name_ptr(slot), ("Ozark - " + std::to_string(slot)).c_str()); + + menu::script_global(rage::global::_155_outfit_editor_base).at(rage::global::_155_outfit_editor_base_offset).at(rage::global::_155_outfit_editor_offset_5).at(slot).at(2).as() = 1; + network::account::outfits::vars::save_outfit_edit(); + } +} + +void network_account_outfits_edit_menu::load() { + set_parent(); + + add_option(submenu_option("Name") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Wardrobe") + .add_translate() + .add_submenu() + .add_click([] { + wardrobe_menu::get()->set_parent(); + cache_current_outfit(); + set_current_outfit_to_slot(m_vars.m_slot); + })); + + add_option(button_option("Load") + .add_translate() + .add_click([] { set_current_outfit_to_slot(m_vars.m_slot); })); + + add_option(button_option("Delete") + .add_translate() + .add_click([] { + network::account::outfits::vars::delete_slot(m_vars.m_slot); + network::account::outfits::vars::save_outfit_edit(); + menu::submenu::handler::set_submenu_previous(true); + })); +} + +void network_account_outfits_edit_menu::update() {} + +void network_account_outfits_edit_menu::update_once() { + if (menu::submenu::handler::get_previous() == wardrobe_menu::get()) { + // update the slots components to our current outfit that we just edited + update_slot_to_current(m_vars.m_slot); + + // restore our current outfit to our real outfit we cached + set_cached_outfit(); + + network::account::outfits::vars::save_outfit_edit(); + } + + // creating an outfit + if (m_vars.m_slot == network::account::outfits::vars::get_free_slot_index()) { + create_outfit(m_vars.m_slot); + } +} + +void network_account_outfits_edit_menu::feature_update() {} + +network_account_outfits_edit_menu* g_instance; +network_account_outfits_edit_menu* network_account_outfits_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_outfits_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit.h b/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit.h new file mode 100644 index 0000000..ca9eaf6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_outfits_edit_menu : public menu::submenu::submenu { +public: + static network_account_outfits_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_outfits_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::outfits::edit::vars { + struct variables { + int m_slot; + int m_clothing_cache[2][12]; + int m_accessory_cache[2][9]; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit_name.cpp b/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit_name.cpp new file mode 100644 index 0000000..96ece3b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit_name.cpp @@ -0,0 +1,109 @@ +#include "network_account_outfits_edit_name.h" +#include "menu/base/submenu_handler.h" +#include "network_account_outfits_edit.h" +#include "../network_account_outfits.h" +#include "../../spoofing/network_spoofing_name.h" +#include "util/util.h" + +using namespace network::account::outfits::edit::name::vars; + +namespace network::account::outfits::edit::name::vars { + variables m_vars; + + scroll_struct text_settings[] = { + { localization("Normal", true), "" }, + { localization("Bold", true), "~h~" }, + { localization("Italic", true), "~italic~" }, + }; + + scroll_struct special_icons[] = { + { localization("Normal", true), "" }, + { localization("Wanted Star", true), "~ws~" }, + { localization("Rockstar Verified", true), "\xC2\xA6" }, + { localization("Rockstar", true), "\xE2\x88\x91" }, + }; + + void change_outfit_name() { + char* name = network::account::outfits::vars::get_outfit_slot_name_ptr(network::account::outfits::edit::vars::m_vars.m_slot); + snprintf(name, 64, "%s%s%s%s", text_settings[m_vars.m_style].m_result, special_icons[m_vars.m_icon].m_result, network::spoofing::name::vars::text_colors[m_vars.m_color].m_result, m_vars.m_temp_name.c_str()); + } +} + +void network_account_outfits_edit_name_menu::load() { + set_name("Name"); + set_parent(); + + add_option(button_option("Input Name") + .add_translate() + .add_keyboard("Enter name", 64, [](button_option* option, const char* name) { m_vars.m_temp_name = std::string(name); })); + + add_option(break_option("Text Settings") + .add_translate()); + + add_option(scroll_option(SCROLL, "Special Icons") + .add_translate() + .add_scroll(m_vars.m_icon, 0, NUMOF(special_icons), special_icons)); + + add_option(scroll_option(SCROLL, "Style") + .add_translate() + .add_scroll(m_vars.m_style, 0, NUMOF(text_settings), text_settings)); + + add_option(scroll_option(SCROLL, "Color") + .add_translate() + .add_scroll(m_vars.m_color, 0, NUMOF(network::spoofing::name::vars::text_colors), network::spoofing::name::vars::text_colors)); + + m_vars.m_preview_button = add_option(button_option("") + .add_click(change_outfit_name)); +} + +void network_account_outfits_edit_name_menu::update() { + snprintf(m_vars.m_preview_name, 50, "Apply: %s%s%s%s", text_settings[m_vars.m_style].m_result, special_icons[m_vars.m_icon].m_result, network::spoofing::name::vars::text_colors[m_vars.m_color].m_result, m_vars.m_temp_name.c_str()); + m_vars.m_preview_button->set_name(m_vars.m_preview_name); +} + +void network_account_outfits_edit_name_menu::update_once() { + char* local_name = network::account::outfits::vars::get_outfit_slot_name_ptr(network::account::outfits::edit::vars::m_vars.m_slot); + if (!local_name || native::is_string_null_or_empty(local_name)) { + return; + } + + std::string name = std::string(local_name); + + for (int i = 1; i < NUMOF(text_settings); i++) { + if (strstr(name.c_str(), text_settings[i].m_result)) { + m_vars.m_style = i; + util::replace_string(name, text_settings[i].m_result, ""); + break; + } + } + + for (int i = 1; i < NUMOF(special_icons); i++) { + if (strstr(name.c_str(), special_icons[i].m_result)) { + m_vars.m_icon = i; + util::replace_string(name, special_icons[i].m_result, ""); + break; + } + } + + for (int i = 1; i < NUMOF(network::spoofing::name::vars::text_colors); i++) { + if (strstr(name.c_str(), network::spoofing::name::vars::text_colors[i].m_result)) { + m_vars.m_color = i; + util::replace_string(name, network::spoofing::name::vars::text_colors[i].m_result, ""); + } + } + + m_vars.m_temp_name = name; +} + +void network_account_outfits_edit_name_menu::feature_update() {} + +network_account_outfits_edit_name_menu* g_instance; +network_account_outfits_edit_name_menu* network_account_outfits_edit_name_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_outfits_edit_name_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit_name.h b/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit_name.h new file mode 100644 index 0000000..02e2a6d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/outfits/network_account_outfits_edit_name.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_outfits_edit_name_menu : public menu::submenu::submenu { +public: + static network_account_outfits_edit_name_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_outfits_edit_name_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::outfits::edit::name::vars { + struct variables { + int m_color; + int m_style; + int m_icon; + std::string m_temp_name; + char m_preview_name[50]; + std::shared_ptr m_preview_button; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/wins/network_account_wins_losses_edit.cpp b/GTAV/src/menu/base/submenus/main/network/account/wins/network_account_wins_losses_edit.cpp new file mode 100644 index 0000000..e15f61c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/wins/network_account_wins_losses_edit.cpp @@ -0,0 +1,52 @@ +#include "network_account_wins_losses_edit.h" +#include "menu/base/submenu_handler.h" +#include "../network_account_wins_losses.h" +#include "menu/base/util/stats.h" + +using namespace network::account::wins::losses::edit::vars; + +namespace network::account::wins::losses::edit::vars { + variables m_vars; +} + +void network_account_wins_losses_edit_menu::load() { + set_name("Wins and Losses"); + set_parent(); + + add_option(number_option(SCROLL, "Wins") + .add_translate() + .add_number(m_vars.m_wins.second, "%i", 1).add_min(0).add_max(std::numeric_limits::max()) + .add_click([] { stats::set(m_vars.m_wins.first.c_str(), m_vars.m_wins.second); })); + + add_option(number_option(SCROLL, "Losses") + .add_translate() + .add_number(m_vars.m_losses.second, "%i", 1).add_min(0).add_max(std::numeric_limits::max()) + .add_click([] { stats::set(m_vars.m_losses.first.c_str(), m_vars.m_losses.second); }) + .add_requirement([] { return !m_vars.m_total; })); + + add_option(number_option(SCROLL, "Matches") + .add_translate() + .add_number(m_vars.m_losses.second, "%i", 1).add_min(0).add_max(std::numeric_limits::max()) + .add_click([] { stats::set(m_vars.m_losses.first.c_str(), m_vars.m_losses.second); }) + .add_requirement([] { return m_vars.m_total; })); +} + +void network_account_wins_losses_edit_menu::update() {} + +void network_account_wins_losses_edit_menu::update_once() { + m_vars.m_wins.second = stats::get(m_vars.m_wins.first.c_str()); + m_vars.m_losses.second = stats::get(m_vars.m_losses.first.c_str()); +} + +void network_account_wins_losses_edit_menu::feature_update() {} + +network_account_wins_losses_edit_menu* g_instance; +network_account_wins_losses_edit_menu* network_account_wins_losses_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_wins_losses_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/account/wins/network_account_wins_losses_edit.h b/GTAV/src/menu/base/submenus/main/network/account/wins/network_account_wins_losses_edit.h new file mode 100644 index 0000000..239f324 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/account/wins/network_account_wins_losses_edit.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_wins_losses_edit_menu : public menu::submenu::submenu { +public: + static network_account_wins_losses_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_wins_losses_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::wins::losses::edit::vars { + struct variables { + bool m_total = false; + std::pair m_wins; + std::pair m_losses; + }; + + extern variables m_vars; +} diff --git a/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_ozark.cpp b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_ozark.cpp new file mode 100644 index 0000000..0a743bf --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_ozark.cpp @@ -0,0 +1,63 @@ +#include "network_global_chat_ozark.h" +#include "menu/base/submenu_handler.h" +#include "../network_global_chat.h" + +using namespace network::gchat::ozark::vars; + +namespace network::gchat::ozark::vars { + variables m_vars; + + scroll_struct colors[] = { + { localization("White", true), HUD_COLOUR_WHITE }, + { localization("Black", true), HUD_COLOUR_BLACK }, + { localization("Grey", true), HUD_COLOUR_GREY }, + { localization("Red", true), HUD_COLOUR_RED }, + { localization("Blue", true), HUD_COLOUR_BLUE }, + { localization("Yellow", true), HUD_COLOUR_YELLOW }, + { localization("Orange", true), HUD_COLOUR_ORANGE }, + { localization("Green", true), HUD_COLOUR_GREEN }, + { localization("Purple", true), HUD_COLOUR_PURPLE }, + { localization("Pink", true), HUD_COLOUR_PINK }, + }; +} + +void network_global_chat_ozark_menu::load() { + set_name("Ozark Chat"); + set_parent(); + + add_option(toggle_option("Toggle Ozark Chat") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_enabled).add_savable(get_submenu_name_stack())); + + add_option(button_option("Input Prefix") + .add_translate().add_hotkey() + .add_keyboard("Input prefix", 30, [this](button_option* option, const char* result) { + m_vars.m_prefix = result; + util::config::write_string(get_submenu_name_stack(), "Prefix", m_vars.m_prefix); + }) + .add_update([](button_option* option) { option->add_side_text(m_vars.m_prefix); }) + .add_tooltip("The prefix you have to type in chat before your message.\nExample: !oz hey")); + + add_option(scroll_option(SCROLL, "Chat Color") + .add_translate() + .add_scroll(m_vars.m_color, 0, NUMOF(colors), colors).add_savable(get_submenu_name_stack())); + + m_vars.m_prefix = util::config::read_string(get_submenu_name_stack(), "Prefix", m_vars.m_prefix); +} + +void network_global_chat_ozark_menu::update() {} + +void network_global_chat_ozark_menu::update_once() {} + +void network_global_chat_ozark_menu::feature_update() {} + +network_global_chat_ozark_menu* g_instance; +network_global_chat_ozark_menu* network_global_chat_ozark_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_global_chat_ozark_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_ozark.h b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_ozark.h new file mode 100644 index 0000000..0ae4c8f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_ozark.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_global_chat_ozark_menu : public menu::submenu::submenu { +public: + static network_global_chat_ozark_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_global_chat_ozark_menu() + : menu::submenu::submenu() {} +}; + +namespace network::gchat::ozark::vars { + struct variables { + bool m_enabled; + int m_color; + std::string m_prefix = "!oz"; + }; + + extern scroll_struct colors[10]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_presets.cpp b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_presets.cpp new file mode 100644 index 0000000..ce841dc --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_presets.cpp @@ -0,0 +1,68 @@ +#include "network_global_chat_presets.h" +#include "menu/base/submenu_handler.h" +#include "../network_global_chat.h" + +using namespace network::gchat::presets::vars; + +namespace network::gchat::presets::vars { + variables m_vars; + + std::string presets[] = { + "buy Ozark at ozark.gg", "money drop at the airport", "i love penis", + "i'm actually retarded", "i don't get any action in bed", "fuck everyone here", + "everyone here sucks", "crash me if you can losers", "spare some coochie?", + "i need love and attention", "i have no fwends :(", "someone PLEASE send me feet pics" + }; +} + +void network_global_chat_presets_menu::load() { + set_name("Presets"); + set_parent(); + + for (std::string& str : presets) { + add_string(str); + } + + add_option(toggle_option("Send Translated Preset") + .add_translate() + .add_hotkey() + .add_toggle(m_vars.m_send_tanslated) + .add_tooltip("Send the translated version of the presets")); + + add_option(toggle_option("Show Locally") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_show_locally) + .add_tooltip("Show the message you send for you too")); + + add_option(number_option(SCROLL, "Amount to Send") + .add_translate() + .add_number(m_vars.m_count, "%i", 1).add_min(1).add_max(100)); + + add_option(break_option("Presets") + .add_translate()); +} + +void network_global_chat_presets_menu::update() {} + +void network_global_chat_presets_menu::update_once() { + clear_options(4); + + for (std::string str : presets) { + add_option(button_option(get_string(str)) + .add_hotkey() + .add_click([=] { network::gchat::vars::send_message(m_vars.m_send_tanslated ? get_string(str) : str, m_vars.m_count, m_vars.m_show_locally); })); + } +} + +void network_global_chat_presets_menu::feature_update() {} + +network_global_chat_presets_menu* g_instance; +network_global_chat_presets_menu* network_global_chat_presets_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_global_chat_presets_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_presets.h b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_presets.h new file mode 100644 index 0000000..f969848 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_presets.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_global_chat_presets_menu : public menu::submenu::submenu { +public: + static network_global_chat_presets_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_global_chat_presets_menu() + : menu::submenu::submenu() {} +}; + +namespace network::gchat::presets::vars { + struct variables { + int m_count = 1; + bool m_show_locally; + bool m_send_tanslated; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_targets.cpp b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_targets.cpp new file mode 100644 index 0000000..59f8d4b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_targets.cpp @@ -0,0 +1,50 @@ +#include "network_global_chat_targets.h" +#include "menu/base/submenu_handler.h" +#include "../network_global_chat.h" +#include "menu/base/util/timers.h" + +using namespace network::gchat::targets::vars; + +namespace network::gchat::targets::vars { + variables m_vars; +} + +void network_global_chat_targets_menu::load() { + set_name("Modify Targets"); + set_parent(); + + add_option(toggle_option("Toggle Targeted Messages") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_enabled)); + + add_option(break_option("Players") + .add_translate()); +} + +void network_global_chat_targets_menu::update() { + static int timer = 0; + + menu::timers::run_timed(&timer, 250, [this] { + clear_options(2); + + menu::player::for_each([this](menu::player::player_context& player) { + add_option(toggle_option(player.m_name) + .add_toggle(player.m_chat_target)); + }, false, true); + }); +} + +void network_global_chat_targets_menu::update_once() {} + +void network_global_chat_targets_menu::feature_update() {} + +network_global_chat_targets_menu* g_instance; +network_global_chat_targets_menu* network_global_chat_targets_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_global_chat_targets_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_targets.h b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_targets.h new file mode 100644 index 0000000..84126bf --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/chat/network_global_chat_targets.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_global_chat_targets_menu : public menu::submenu::submenu { +public: + static network_global_chat_targets_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_global_chat_targets_menu() + : menu::submenu::submenu() {} +}; + +namespace network::gchat::targets::vars { + struct variables { + bool m_enabled; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/finder/network_session_finder_edit.cpp b/GTAV/src/menu/base/submenus/main/network/finder/network_session_finder_edit.cpp new file mode 100644 index 0000000..4720ebc --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/finder/network_session_finder_edit.cpp @@ -0,0 +1,53 @@ +#include "network_session_finder_edit.h" +#include "menu/base/submenu_handler.h" +#include "../network_session_finder.h" +#include "rage/engine.h" +#include "menu/base/submenus/main/network/search/network_player_search_selected.h" + +using namespace network::sfinder::edit::vars; + +namespace network::sfinder::edit::vars { + variables m_vars; +} + +void network_session_finder_edit_menu::load() { + set_name("Session Finder"); + set_parent(); + + add_option(button_option("Show Profile") + .add_translate() + .add_click([] { + rage::network::network_handle handle; + native::network_handle_from_user_id(std::to_string(network::sfinder::vars::m_vars.m_sessions[m_vars.m_selected].m_rockstar_id).c_str(), &handle.m_handle, sizeof(handle) / 4); + native::network_show_profile_ui(&handle.m_handle); + })); + + add_option(button_option("Send Friend Request") + .add_translate() + .add_click([] { rage::engine::send_friend_request(network::sfinder::vars::m_vars.m_sessions[m_vars.m_selected].m_rockstar_id); })); + + add_option(button_option("Invite to Session") + .add_translate() + .add_click([] { rage::engine::invite_player(network::sfinder::vars::m_vars.m_sessions[m_vars.m_selected].m_rockstar_id); })); + + add_option(button_option("Join Player") + .add_translate() + .add_click([] { network::player::search::selected::vars::join_player(network::sfinder::vars::m_vars.m_sessions[m_vars.m_selected].m_rockstar_id); })); +} + +void network_session_finder_edit_menu::update() {} + +void network_session_finder_edit_menu::update_once() {} + +void network_session_finder_edit_menu::feature_update() {} + +network_session_finder_edit_menu* g_instance; +network_session_finder_edit_menu* network_session_finder_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_session_finder_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/finder/network_session_finder_edit.h b/GTAV/src/menu/base/submenus/main/network/finder/network_session_finder_edit.h new file mode 100644 index 0000000..8f8886f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/finder/network_session_finder_edit.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_session_finder_edit_menu : public menu::submenu::submenu { +public: + static network_session_finder_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_session_finder_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace network::sfinder::edit::vars { + struct variables { + std::size_t m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/friends/network_friends_selected.cpp b/GTAV/src/menu/base/submenus/main/network/friends/network_friends_selected.cpp new file mode 100644 index 0000000..0034024 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/friends/network_friends_selected.cpp @@ -0,0 +1,58 @@ +#include "network_friends_selected.h" +#include "menu/base/submenu_handler.h" +#include "../network_friends.h" +#include "menu/base/submenus/main/network/search/network_player_search_selected.h" +#include "menu/base/submenus/main/network/session/network_session_overseer.h" +#include "rage/engine.h" + +using namespace network::friends::selected::vars; + +namespace network::friends::selected::vars { + variables m_vars; + + void add_to_overseer() { + network::session::overseer::vars::save(m_vars.m_selected->m_name, m_vars.m_selected->m_rockstar_id, "Friend"); + } +} + +void network_friends_selected_menu::load() { + set_name("Friend"); + set_parent(); + + add_option(button_option("Add to Overseer") + .add_translate() + .add_click(add_to_overseer)); + + add_option(button_option("Show Profile") + .add_translate() + .add_click([] { + rage::network::network_handle handle; + native::network_handle_from_user_id(std::to_string(m_vars.m_selected->m_rockstar_id).c_str(), &handle.m_handle, sizeof(handle) / 4); + native::network_show_profile_ui(&handle.m_handle); + })); + + add_option(button_option("Invite to Session") + .add_translate() + .add_click([] { rage::engine::invite_player(m_vars.m_selected->m_rockstar_id); })); + + add_option(button_option("Join Player") + .add_translate() + .add_click([] { network::player::search::selected::vars::join_player(m_vars.m_selected->m_rockstar_id); })); +} + +void network_friends_selected_menu::update() {} + +void network_friends_selected_menu::update_once() {} + +void network_friends_selected_menu::feature_update() {} + +network_friends_selected_menu* g_instance; +network_friends_selected_menu* network_friends_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_friends_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/friends/network_friends_selected.h b/GTAV/src/menu/base/submenus/main/network/friends/network_friends_selected.h new file mode 100644 index 0000000..7a63826 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/friends/network_friends_selected.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_friends_selected_menu : public menu::submenu::submenu { +public: + static network_friends_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_friends_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace network::friends::selected::vars { + struct variables { + rage::network::friends* m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_account.cpp b/GTAV/src/menu/base/submenus/main/network/network_account.cpp new file mode 100644 index 0000000..417de43 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_account.cpp @@ -0,0 +1,111 @@ +#include "network_account.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "menu/base/util/stats.h" +#include "account/network_account_level.h" +#include "account/network_account_unlocks.h" +#include "account/network_account_times.h" +#include "account/network_account_outfits.h" +#include "account/network_account_wins_losses.h" +#include "account/network_account_kd.h" + +using namespace network::account::vars; + +namespace network::account::vars { + variables m_vars; + + scroll_struct characters[] = { + { localization("PLACEHOLDER", true), 0 }, + { localization("PLACEHOLDER", true), 1 } + }; + + int get_character_count() { + const char* character_two = native::stat_get_string(0xD2AB0EC6, -1); + if (!character_two || strlen(character_two) < 1) return 1; + return 2; + } +} + +void network_account_menu::load() { + set_name("Account"); + set_parent(); + + int current_char = 0; + native::stat_get_int(0x2F2F120F, ¤t_char, -1); + m_vars.m_selected_character = current_char ? 1 : 0; + + add_option(scroll_option(SCROLL, "Selected Character") + .add_translate() + .add_scroll(m_vars.m_selected_character, 0, NUMOF(characters), characters) + .add_update([](scroll_option* option, int pos) { option->add_scroll(m_vars.m_selected_character, 0, get_character_count(), characters); })); + + // TODO: Presets maybe? + + add_option(submenu_option("Level") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Unlocks") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Times") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Outfits") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Wins and Losses") + .add_translate() + .add_submenu()); + + add_option(submenu_option("K/D") + .add_translate() + .add_submenu()); + + add_option(button_option("Edit Character Name") + .add_translate() + .add_keyboard("Enter new character name", 32, [](button_option* option, const char* name) { + native::stat_set_string(native::get_hash_key(("MP" + std::to_string(m_vars.m_selected_character) + "_CHAR_NAME").c_str()), name, true); + }) + .add_update([](button_option* option) { + option->add_keyboard_default(characters[m_vars.m_selected_character].m_name.get_original()); + })); + + add_option(button_option("Redesign Character") + .add_translate() + .add_click([] { stats::set("FM_CHANGECHAR_ASKED", false); })); + + add_option(button_option("Clear Mental State") + .add_translate() + .add_click([] { stats::set("PLAYER_MENTAL_STATE", 0.0f); })); + + add_string("Unavailable"); +} + +void network_account_menu::update() {} + +void network_account_menu::update_once() { + characters[0].m_name.set(native::stat_get_string(0x4A211FC8, -1)); + characters[1].m_name.set(native::stat_get_string(0xD2AB0EC6, -1)); + + if (!native::network_is_in_session()) { + characters[0].m_name.set("~c~" + get_string("Unavailable")); + characters[1].m_name.set("~c~" + get_string("Unavailable")); + } +} + +void network_account_menu::feature_update() {} + +network_account_menu* g_instance; +network_account_menu* network_account_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_account_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_account.h b/GTAV/src/menu/base/submenus/main/network/network_account.h new file mode 100644 index 0000000..763662f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_account.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_account_menu : public menu::submenu::submenu { +public: + static network_account_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_account_menu() + : menu::submenu::submenu() {} +}; + +namespace network::account::vars { + struct variables { + int m_selected_character; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_friends.cpp b/GTAV/src/menu/base/submenus/main/network/network_friends.cpp new file mode 100644 index 0000000..8ec2866 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_friends.cpp @@ -0,0 +1,186 @@ +#include "network_friends.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "menu/base/util/panels.h" +#include "friends/network_friends_selected.h" +#include "rage/engine.h" + +#include "menu/base/util/timers.h" +#include "util/threads.h" +#include "menu/base/util/textures.h" + +using namespace network::friends::vars; + +namespace network::friends::vars { + variables m_vars; + + void invite_all() { + for (int i = 0; i < native::network_get_friend_count(); i++) { + rage::network::friends* _friend = (rage::network::friends*) & global::vars::g_friends[i]; + rage::engine::invite_player(_friend->m_rockstar_id); + } + } +} + +void network_friends_menu::load() { + set_name("Friends"); + set_parent(); + + add_option(button_option("Invite All") + .add_translate().add_hotkey() + .add_click(invite_all)); + + add_option(break_option("Friends") + .add_translate()); + + network_friends_selected_menu::get(); + + add_string("~m~None"); +} + +void network_friends_menu::update() { + static int timer = 0; + static bool update_online = true; + + menu::timers::run_timed(&timer, 4000, [] { update_online = true; }); + + if (update_online) { + update_online = false; + + for (std::size_t i = 0; i < m_vars.m_queue.size(); i++) { + auto vit = std::find_if(begin(global::vars::g_online_rockstar_ids_queue), end(global::vars::g_online_rockstar_ids_queue), [=] (uint64_t value) { + return value == m_vars.m_queue[i]; + }); + + if (vit == end(global::vars::g_online_rockstar_ids_queue)) { + global::vars::g_online_rockstar_ids_queue.push_back(m_vars.m_queue[i]); + } + } + + std::size_t process_size = m_vars.m_queue.size() > 32 ? 32 : m_vars.m_queue.size(); + + rage::network::rockstar_identifier* identifiers = (rage::network::rockstar_identifier*)malloc(process_size * sizeof(rage::network::rockstar_identifier)); + memset(identifiers, 0, process_size * sizeof(rage::network::rockstar_identifier)); + + for (std::size_t i = 0; i < process_size; i++) { + identifiers[i].m_rockstar_id = m_vars.m_queue.back(); + identifiers[i].m_type = 3; + m_vars.m_queue.pop_back(); + } + + native::clear_gamer_task_data(); + rage::engine::send_session_info_request(identifiers, (int)process_size); + free(identifiers); + + // recreate the queue + if (m_vars.m_queue.size() == 0) { + for (int i = 0; i < native::network_get_friend_count(); i++) { + rage::network::friends* _friend = (rage::network::friends*) & global::vars::g_friends[i]; + m_vars.m_queue.push_back(_friend->m_rockstar_id); + } + } + } + + if (menu::base::get_current_option() <= 1) { + menu::panels::toggle_panel_render("PANEL_FRIEND", false); + } +} + +void network_friends_menu::update_once() { + clear_options(2); + + if (native::network_get_friend_count() == 0) { + add_option(button_option(get_string("~m~None")).ref()); + } else { + for (int i = 0; i < native::network_get_friend_count(); i++) { + rage::network::friends* _friend = (rage::network::friends*)&global::vars::g_friends[i]; + m_vars.m_queue.push_back(_friend->m_rockstar_id); + m_vars.m_image_queue.push_back(_friend->m_rockstar_id); + + bool in_session = false; + menu::player::for_each([&] (menu::player::player_context& pl) { + if (pl.m_net_player) { + if (pl.m_net_player->m_player_info) { + if (pl.m_net_player->m_player_info->m_identifier.m_rockstar_id == _friend->m_rockstar_id) { + in_session = true; + } + } + } + }, true); + + add_option(submenu_option(util::va::va("%s%s", (global::vars::g_online_rockstar_ids[_friend->m_rockstar_id].first || in_session) ? "" : "~m~", _friend->m_name)) + .add_submenu() + .add_hover([=](submenu_option*) { + menu::panels::panel_custom_friend tmp; + tmp.m_rockstar_id = _friend->m_rockstar_id; + tmp.m_in_session = in_session; + tmp.m_online = global::vars::g_online_rockstar_ids[_friend->m_rockstar_id].first || in_session; + tmp.m_session_type = tmp.m_online ? global::vars::g_online_rockstar_ids[_friend->m_rockstar_id].second : -1; + strcpy(tmp.m_name, _friend->m_name); + + if (global::vars::g_read_stats_by_gamer_results.contains(_friend->m_rockstar_id)) { + tmp.m_has_stats = true; + memcpy(&tmp.m_stats, &global::vars::g_read_stats_by_gamer_results[_friend->m_rockstar_id], sizeof(tmp.m_stats)); + } else { + tmp.m_has_stats = false; + } + + menu::panels::set_structure(menu::panels::get_child(menu::panels::get_parent("PANEL_FRIEND"), "PANEL_FRIEND_INFO"), &tmp, sizeof(tmp)); + menu::panels::toggle_panel_render("PANEL_FRIEND", true); + }) + .add_click([=] { + network::friends::selected::vars::m_vars.m_selected = _friend; + }) + .add_update([=] (submenu_option* option, int pos) { + menu::textures::texture_context context; + if (menu::textures::get_texture(std::string("playerimg_" + std::to_string(_friend->m_rockstar_id)), &context)) { + option->add_offset(0.016f); + + menu::renderer::draw_rect_unaligned({ global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, { 200, 200, 200, 255 }); + menu::renderer::draw_sprite({ "ozarkplayerimg", context.m_name }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, 0.f, { 255, 255, 255, 255 }); + } + })); + } + } + + if (!m_vars.m_image_queue.empty()) { + uint32_t* rids = new uint32_t[m_vars.m_image_queue.size()]; + + for (std::size_t i = 0; i < m_vars.m_image_queue.size(); i++) { + rids[i] = (uint32_t)m_vars.m_image_queue[i]; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)m_vars.m_image_queue.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + m_vars.m_image_queue.clear(); + + util::threads::add_job([] (void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + rage::ros::send_stat_requests(ridss, (int)count); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } +} + +void network_friends_menu::feature_update() {} + +network_friends_menu* g_instance; +network_friends_menu* network_friends_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_friends_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_friends.h b/GTAV/src/menu/base/submenus/main/network/network_friends.h new file mode 100644 index 0000000..0579b31 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_friends.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_friends_menu : public menu::submenu::submenu { +public: + static network_friends_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_friends_menu() + : menu::submenu::submenu() {} +}; + +namespace network::friends::vars { + struct variables { + std::vector m_queue; + std::vector m_image_queue; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_global_chat.cpp b/GTAV/src/menu/base/submenus/main/network/network_global_chat.cpp new file mode 100644 index 0000000..40a239a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_global_chat.cpp @@ -0,0 +1,303 @@ +#include "network_global_chat.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "util/caller.h" +#include "util/log.h" +#include "rage/engine.h" +#include "chat/network_global_chat_presets.h" +#include "chat/network_global_chat_targets.h" +#include "chat/network_global_chat_ozark.h" +#include + +using namespace network::gchat::vars; + +namespace network::gchat::vars { + variables m_vars; + + scroll_struct mocking[] = { + { localization("Send to Sender Only", true), 0 }, + { localization("Send to Session", true), 0 }, + }; + + uint64_t get_sender_chat_token(uint64_t _default) { + uint64_t token = _default; + + if (_default == 0) { + if (menu::player::get_local_player().m_net_player) { + if (menu::player::get_local_player().m_net_player->m_player_info) { + token = menu::player::get_local_player().m_net_player->m_player_info->m_chat_token; + } + } + } + + if (m_vars.m_randomize_sender) { + menu::player::player_context& player = menu::player::random(menu::player::get_local_player().m_id); + if (player.m_connected) { + if (player.m_net_player) { + if (player.m_net_player->m_player_info) { + return player.m_net_player->m_player_info->m_chat_token; + } + } + } + } + + if (m_vars.m_sender_toggle) { + menu::player::player_context& player = menu::player::get_player(m_vars.m_sender_id); + + if (player.m_net_player) { + if (player.m_net_player->m_player_info) { + return player.m_net_player->m_player_info->m_chat_token; + } + } + + m_vars.m_sender_toggle = false; + m_vars.m_sender = 0; + + network_global_chat_menu* _this = network_global_chat_menu::get(); + menu::notify::stacked(_this->get_string("Global Chat Spoof"), _this->get_string("Spoof sender disabled, player is no longer valid"), global::ui::g_error); + } + + return token; + } + + Player get_player_from_key(int key) { + rage::network::global_chat_raw* data = (rage::network::global_chat_raw*)(*(uint64_t*)(global::vars::g_global_chat_ptr) + 0x78); + if (!is_valid_ptr(data->m_manager_ptr)) return -1; + + std::vector> users; + menu::player::for_each([&](menu::player::player_context& player) { + if (player.m_net_player) { + if (player.m_net_player->m_player_info) { + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + uint64_t config = caller::call(global::vars::g_get_network_config_from_peer, real_config->m_unk_ptr, player.m_net_player->m_player_info->m_host_token); + if (config) { + uint64_t yes = caller::call(global::vars::g_get_player_info_from_net_msg, data->m_manager_ptr, *(uint32_t*)config); + if (yes) { + users.push_back({ *(uint64_t*)(yes + 0xD8), player.m_id }); + } + } + } + } + }); + + uint64_t ptr = caller::call(global::vars::g_get_player_info_from_net_msg, data->m_manager_ptr, key); + if (ptr) { + auto vit = std::find_if(begin(users), end(users), [=](std::pair yes) { return yes.first == ptr; }); + if (vit != end(users)) { + return vit->second; + } + } + + return -1; + } + + int get_key_from_player(Player id) { + rage::network::global_chat_raw* data = (rage::network::global_chat_raw*)(*(uint64_t*)(global::vars::g_global_chat_ptr) + 0x78); + + std::vector> users; + menu::player::for_each([&](menu::player::player_context& player) { + if (player.m_net_player) { + if (player.m_net_player->m_player_info) { + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + uint64_t config = caller::call(global::vars::g_get_network_config_from_peer, real_config->m_unk_ptr, player.m_net_player->m_player_info->m_host_token); + if (config) { + uint64_t yes = caller::call(global::vars::g_get_player_info_from_net_msg, data->m_manager_ptr, *(uint32_t*)config); + if (yes) { + users.push_back({ *(uint64_t*)(yes + 0xD8), player.m_id }); + } + } + } + } + }); + + if (data->m_player_count > 0) { + for (int i = 0; i < data->m_player_count; i++) { + rage::network::player_peer* peer = data->m_player_peers[i]; + if (peer) { + if ((peer->get_bitset() & 2) == 0 && (peer->get_bitset() & 1) != 0 && (data->m_flag0 != -1 || peer->get_flag())) { + int key = peer->get_player_key(); + if (key < 0) { + key = caller::call(global::vars::g_get_client_player_key, data->m_manager_ptr, peer->get_secondary_key(), (data->m_bitset & 1) ? data->m_flag2 : data->m_flag1); + } + + if (key > 0) { + uint64_t ptr = caller::call(global::vars::g_get_player_info_from_net_msg, data->m_manager_ptr, key); + if (ptr) { + auto vit = std::find_if(begin(users), end(users), [=](std::pair yes) { return yes.first == ptr; }); + if (vit != end(users)) { + if (vit->second == id) { + return key; + } + } + } + } + } + } + } + } + + return 0; + } + + bool can_send_to_player(Player id) { + if (!network::gchat::targets::vars::m_vars.m_enabled) return true; + return menu::player::get_player(id).m_chat_target; + } + + void send_message(std::string str, int count, bool locally) { + rage::network::global_chat_raw* data = (rage::network::global_chat_raw*)(*(uint64_t*)(global::vars::g_global_chat_ptr) + 0x78); + if (!is_valid_ptr(data->m_manager_ptr)) { + LOG_DEV("Manager ptr is bad"); + return; + } + + rage::network::global_msg_context* context = new rage::network::global_msg_context(); + context->m_message[0xff] = 0; + context->m_flag0_is_neg1 = data->m_flag0 == -1; + strncpy(context->m_message, str.c_str(), 0x100); + + std::vector senders; + + LOG_DEV("Players: %i", data->m_player_count); + if (data->m_player_count > 0) { + for (int i = 0; i < count; i++) { + senders.push_back(get_sender_chat_token(0)); + } + + for (int i = 0; i < data->m_player_count; i++) { + rage::network::player_peer* peer = data->m_player_peers[i]; + if (peer) { + if ((peer->get_bitset() & 2) == 0 && (peer->get_bitset() & 1) != 0 && (data->m_flag0 != -1 || peer->get_flag())) { + int key = peer->get_player_key(); + if (key < 0) { + key = caller::call(global::vars::g_get_client_player_key, data->m_manager_ptr, peer->get_secondary_key(), (data->m_bitset & 1) ? data->m_flag2 : data->m_flag1); + } + + if (key > 0) { + Player player_id = get_player_from_key(key); + if (player_id == -1) continue; + + if (can_send_to_player(player_id)) { + for (int j = 0; j < count; j++) { + context->m_sender_chat_token = senders[j]; + rage::engine::send_global_chat_message(data->m_manager_ptr, key, context); + } + } + } else LOG_DEV("Bad key for peer %i", i); + } else LOG_DEV("Bad flags for peer %i", i); + } else LOG_DEV("Bad peer for %i", i); + } + + if (locally) { + for (int i = 0; i < count; i++) { + context->m_sender_chat_token = senders[i]; + + rage::network::chat_config* config = *(rage::network::chat_config**)global::vars::g_chat_config; + caller::call(global::vars::g_add_chat_message, config, config, &context->m_sender_chat_token, context->m_message, false); + } + } + } + + delete context; + } +} + +void network_global_chat_menu::load() { + set_name("Global Chat"); + set_parent(); + + // [s] Custom Messages + + add_option(submenu_option("Presets") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Modify Targets") + .add_translate().add_hotkey() + .add_submenu() + .add_tooltip("Global chat and messages sent from here will only be sent to these specific players")); + + /*add_option(submenu_option("Ozark Chat") + .add_translate().add_hotkey() + .add_submenu());*/ + + add_option(scroll_option(TOGGLE, "Spoof Sender") + .add_translate() + .add_toggle(m_vars.m_sender_toggle) + .add_click([] { + if (m_vars.m_sender_toggle) { + m_vars.m_randomize_sender = false; + m_vars.m_sender_id = m_vars.m_player_list[m_vars.m_sender].m_result; + } + }) + .add_scroll(m_vars.m_sender, 0, NUMOF(m_vars.m_player_list), m_vars.m_player_list) + .add_update([](scroll_option* option, int pos) { option->add_scroll(m_vars.m_sender, 0, m_vars.m_list_size, m_vars.m_player_list); }) + .add_requirement([] { return m_vars.m_list_size >= 1; })); + + add_option(toggle_option("Randomize Sender") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_randomize_sender) + .add_click([] { m_vars.m_sender_toggle = false; }) + .add_requirement([] { return m_vars.m_list_size >= 1; })); + + add_option(scroll_option(TOGGLE, "Mocking") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_mocking) + .add_scroll(m_vars.m_mocking_type, 0, NUMOF(mocking), mocking).add_savable(get_submenu_name_stack()) + .add_tooltip("Mock what everyone says in chat.\nExample: \"hey everyone\" becomes \"hEy EvERyOnE\"")); + + add_string("Global Chat Spoof"); + add_string("Spoof sender disabled, player is no longer valid"); +} + +void network_global_chat_menu::update() {} + +void network_global_chat_menu::update_once() {} + +void network_global_chat_menu::feature_update() { + m_vars.m_list_size = 0; + menu::player::for_each([&](menu::player::player_context& player) { + m_vars.m_player_list[m_vars.m_list_size].m_name.set(player.m_name); + m_vars.m_player_list[m_vars.m_list_size].m_result = player.m_id; + + if (m_vars.m_sender_toggle) { + if (m_vars.m_sender_id == player.m_id) { + m_vars.m_sender = m_vars.m_list_size; + } + } + + m_vars.m_list_size++; + }); + + if (m_vars.m_sender_toggle) { + if (!menu::player::get_player(m_vars.m_sender_id).m_connected) { + m_vars.m_sender_toggle = false; + m_vars.m_sender = 0; + menu::notify::stacked(get_string("Global Chat Spoof"), get_string("Spoof sender disabled, player is no longer valid"), global::ui::g_error); + } + } + + if (m_vars.m_list_size == 0) { + m_vars.m_sender_toggle = false; + m_vars.m_randomize_sender = false; + } +} + +network_global_chat_menu* g_instance; +network_global_chat_menu* network_global_chat_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_global_chat_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_global_chat.h b/GTAV/src/menu/base/submenus/main/network/network_global_chat.h new file mode 100644 index 0000000..4eb360c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_global_chat.h @@ -0,0 +1,36 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_global_chat_menu : public menu::submenu::submenu { +public: + static network_global_chat_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_global_chat_menu() + : menu::submenu::submenu() {} +}; + +namespace network::gchat::vars { + struct variables { + bool m_randomize_sender; + bool m_mocking; + bool m_sender_toggle; + + Player m_sender_id; + int m_sender; + int m_list_size; + int m_mocking_type; + scroll_struct m_player_list[32]; + }; + + void send_message(std::string str, int count = 1, bool locally = false); + uint64_t get_sender_chat_token(uint64_t _default); + Player get_player_from_key(int key); + int get_key_from_player(Player id); + bool can_send_to_player(Player id); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_host_toolkit.cpp b/GTAV/src/menu/base/submenus/main/network/network_host_toolkit.cpp new file mode 100644 index 0000000..875fafc --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_host_toolkit.cpp @@ -0,0 +1,156 @@ +#include "network_host_toolkit.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "menu/base/util/panels.h" +#include "menu/base/util/helpers.h" +#include "util/log.h" +#include "rage/engine.h" +#include "toolkit/network_blacklisted_players.h" +#include "toolkit/network_desync_kick.h" +#include "toolkit/network_join_blocking.h" + +using namespace network::htoolkit::vars; + +namespace network::htoolkit::vars { + variables m_vars; + + scroll_struct transitions[] = { + { localization("Public", true), 1 }, + { localization("Closed Crew", true), 2 }, + { localization("Crew", true), 3 }, + { localization("Closed Friend", true), 6 }, + { localization("Solo", true), 10 }, + { localization("Invite Only", true), 11 } + }; + + bool force_host_of_script(const char* script, bool notify) { + network_host_toolkit_menu* _this = network_host_toolkit_menu::get(); + + if (!menu::helpers::is_valid_net_player(menu::player::get_local_player().m_net_player)) { + LOG_WARN("Failed to force host of %s, player isn't valid", script); + return false; + } + + if (native::network_get_host_of_script(script, -1, 0) == menu::player::get_local_player().m_id) { + LOG_WARN("Failed to force host of %s, player is already host", script); + return true; + } + + if (notify) { + menu::notify::stacked(_this->get_string("Force Script Host"), util::va::va("%s %s...", _this->get_string("Attempting to migrate host of script").c_str(), script), color_rgba(255, 255, 0)); + } + + bool forced = false; + LOG_DEV("Checking %i threads for %s", *(uint16_t*)(global::vars::g_script_handlers.m_count), script); + for (uint16_t i = 0; i < *(uint16_t*)(global::vars::g_script_handlers.m_count); i++) { + rage::script::gta_thread* thread = *(rage::script::gta_thread**)(global::vars::g_script_handlers.m_list + (i * 8)); + if (is_valid_ptr(thread)) { + if (!strcmp(thread->m_name, script)) { + rage::script::game_script_handler_network_component* component = thread->m_net_component; + if (is_valid_ptr(component)) { + if (is_valid_vtable(component->m_vtable)) { + LOG_DEV("Component=%llx VTable=%llx State=%i", component, component->m_vtable, component->m_state); + rage::engine::migrate_script_host(component, menu::player::get_local_player().m_net_player); + forced = true; + } + } + } + } + } + + if (forced) { + if (notify) { + menu::notify::stacked(_this->get_string("Force Script Host"), util::va::va("%s %s", _this->get_string("Successfully migrated host of script").c_str(), script), global::ui::g_success); + } + + return true; + } else { + if (notify) { + menu::notify::stacked(_this->get_string("Force Script Host"), util::va::va("%s %s", _this->get_string("Failed migrating host of script").c_str(), script), global::ui::g_error); + } + } + + return false; + } +} + +void network_host_toolkit_menu::load() { + set_name(XOR("Host Toolkit")); + set_parent(); + + add_option(submenu_option(XOR("Blacklisted Players")) + .add_translate().add_hotkey() + .add_submenu() + .add_tooltip("View and modify players who have been host kicked and are blacklisted from joining back")); + + add_option(submenu_option(XOR("Desync Kicks")) + .add_translate().add_hotkey() + .add_submenu() + .add_tooltip("Block/redirect desync & net limiter kicks in your session")); + + add_option(submenu_option(XOR("Join Blocking")) + .add_translate().add_hotkey() + .add_submenu() + .add_tooltip("Prevent players joining your session")); + + // [s] Ozark Guard + + add_option(toggle_option(XOR("Open Extra Slot")) + .add_translate().add_hotkey() + .add_toggle(m_vars.m_extra_slot) + .add_click([] { native::_0x49EC8030F5015F8B(m_vars.m_extra_slot ? 4 : 0); }).add_savable(get_submenu_name_stack()) + .add_tooltip(XOR("Allows an extra player to join past the usual limit"))); + + add_option(toggle_option(XOR("Sync Real IP")) + .add_translate().add_hotkey() + .add_toggle(m_vars.m_sync_real_ip).add_savable(get_submenu_name_stack()) + .add_tooltip(XOR("Sync a joining players real IP with the session when they join, making their IP spoof useless to other modders using less fortunate cheats"))); + + add_option(toggle_option(XOR("Peer Token Correction")) + .add_translate().add_hotkey() + .add_toggle(m_vars.m_peer_token_correction).add_savable(get_submenu_name_stack()) + .add_tooltip(XOR("Ozark users joining with a matching peer as someone in your session can still join. WILL NOT WORK IF THEY HAVE A TOKEN MATCHING YOURS!"))); + + add_option(toggle_option(XOR("Peer Token Corruption")) + .add_translate().add_hotkey() + .add_toggle(m_vars.m_peer_token_corruption).add_savable(get_submenu_name_stack()) + .add_tooltip(XOR("Players joining with a spoofed peer will get kicked when they get host"))); + + add_option(toggle_option(XOR("Randomize Clients")) + .add_translate().add_hotkey() + .add_toggle(m_vars.m_randomize_clients).add_savable(get_submenu_name_stack()) + .add_tooltip(XOR("New players joining will receive a random name for current players in the session"))); + + add_option(button_option(XOR("Migrate Script Host")) + .add_translate().add_hotkey() + .add_click([] { force_host_of_script("freemode"); })); + + add_option(scroll_option(SCROLLSELECT, XOR("Host New Session")) + .add_translate().add_hotkey() + .add_scroll(m_vars.m_transition, 0, NUMOF(transitions), transitions) + .add_click([] { network::vars::find_new_session(transitions[m_vars.m_transition].m_result); })); + + add_string("Force Script Host"); + add_string("Attempting to migrate host of script"); + add_string("Successfully migrated host of script"); + add_string("Failed migrating host of script"); +} + +void network_host_toolkit_menu::update() {} + +void network_host_toolkit_menu::update_once() { + menu::panels::toggle_panel_render("PANEL_BLACKLISTED_PLAYERS", false); +} + +void network_host_toolkit_menu::feature_update() {} + +network_host_toolkit_menu* g_instance; +network_host_toolkit_menu* network_host_toolkit_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_host_toolkit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_host_toolkit.h b/GTAV/src/menu/base/submenus/main/network/network_host_toolkit.h new file mode 100644 index 0000000..73639a1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_host_toolkit.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_host_toolkit_menu : public menu::submenu::submenu { +public: + static network_host_toolkit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_host_toolkit_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::vars { + struct variables { + int m_transition; + bool m_extra_slot; + bool m_sync_real_ip; + bool m_peer_token_correction; + bool m_peer_token_corruption; + bool m_randomize_clients; + }; + + bool force_host_of_script(const char* script, bool notify = false); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_join_bypass.cpp b/GTAV/src/menu/base/submenus/main/network/network_join_bypass.cpp new file mode 100644 index 0000000..7dece28 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_join_bypass.cpp @@ -0,0 +1,43 @@ +#include "network_join_bypass.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" + +using namespace network::bypass::vars; + +namespace network::bypass::vars { + variables m_vars; +} + +void network_join_bypass_menu::load() { + set_name("Join Bypass"); + set_parent(); + + add_option(toggle_option("Invite Only") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_invite_only).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Friend Only") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_friend_only).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Crew Only") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_crew_only).add_savable(get_submenu_name_stack())); +} + +void network_join_bypass_menu::update() {} + +void network_join_bypass_menu::update_once() {} + +void network_join_bypass_menu::feature_update() {} + +network_join_bypass_menu* g_instance; +network_join_bypass_menu* network_join_bypass_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_join_bypass_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_join_bypass.h b/GTAV/src/menu/base/submenus/main/network/network_join_bypass.h new file mode 100644 index 0000000..001cbee --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_join_bypass.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_join_bypass_menu : public menu::submenu::submenu { +public: + static network_join_bypass_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_join_bypass_menu() + : menu::submenu::submenu() {} +}; + +namespace network::bypass::vars { + struct variables { + bool m_invite_only = true; + bool m_friend_only = true; + bool m_crew_only = true; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_player_search_join.cpp b/GTAV/src/menu/base/submenus/main/network/network_player_search_join.cpp new file mode 100644 index 0000000..4b72522 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_player_search_join.cpp @@ -0,0 +1,357 @@ +#include "network_player_search_join.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "rage/engine.h" +#include "search/network_player_search_selected.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/panels.h" +#include "menu/base/util/textures.h" +#include "util/threads.h" + + +using namespace network::player::search::vars; + +namespace network::player::search::vars { + variables m_vars; + + void input_player_rid_callback(button_option* option, const char* result) { + m_vars.m_current_offset = 0; + m_vars.m_current_page = 0; + m_vars.m_total_pages_requested = 0; + m_vars.m_accounts.clear(); + m_vars.m_name.clear(); + network_player_search_menu::get()->clear_options(5); + + std::string string_name(result); + if (std::find_if(string_name.begin(), string_name.end(), [](unsigned char c) { return !std::isdigit(c); }) == string_name.end()) { + if (atoll(string_name.c_str()) > 0x1000) { + m_vars.m_rockstar_id = atoll(string_name.c_str()); + + rage::api::get_profiles_from_rid(atoll(string_name.c_str()), [](bool success, std::vector accounts, void* data) { + if (success && !accounts.empty()) { + m_vars.m_accounts.clear(); + m_vars.m_accounts.push_back(accounts[0]); + m_vars.m_total = 1; + network_player_search_menu::get()->update_once(); + } else { + menu::notify::stacked(network_player_search_menu::get()->get_name().get(), network_player_search_menu::get()->get_string("Failed resolving profile"), global::ui::g_error); + } + }, nullptr); + } + } + } + + void input_player_name_callback(button_option* option, const char* result) { + m_vars.m_name = result; + m_vars.m_rockstar_id = 0; + m_vars.m_current_offset = 0; + m_vars.m_current_page = 0; + m_vars.m_total_pages_requested = 0; + m_vars.m_accounts.clear(); + network_player_search_menu::get()->clear_options(5); + + rage::api::get_profiles_from_name(result, [=](bool success, std::vector accounts, rage::api::result_info* out_info) { + if (success && !accounts.empty()) { + for (rage::api::rockstar_account& account : accounts) { + if (std::find_if(begin(m_vars.m_accounts), end(m_vars.m_accounts), [=](rage::api::rockstar_account& elem) { return elem.m_rockstar_id == account.m_rockstar_id; }) == end(m_vars.m_accounts)) { + m_vars.m_accounts.push_back(account); + } + } + + m_vars.m_total_pages_requested = 1; + m_vars.m_current_offset += (int)accounts.size() + 1; + m_vars.m_total = out_info->m_total; + network_player_search_menu::get()->update_once(); + } else { + menu::notify::stacked(network_player_search_menu::get()->get_name().get(), network_player_search_menu::get()->get_string("Failed resolving profiles"), global::ui::g_error); + } + + if (out_info) { + delete out_info; + } + }, nullptr); + } + + void add_player(network_player_search_menu* _this, rage::api::rockstar_account* account) { + uint8_t custom[0x10]; + *(uint64_t*)&custom[0] = account->m_rockstar_id; + *(uint64_t*)&custom[8] = (uint64_t)&account->m_name; + + _this->add_option(submenu_option(account->m_name) + .add_custom_data(custom) + .add_submenu() + .add_click([=] { network::player::search::selected::vars::m_vars.m_selected = account; }) + .add_update([](submenu_option* option, int pos) { + uint8_t* data = option->get_custom_data(); + uint64_t rid = *(uint64_t*)&data[0]; + std::string* name = (std::string*)*(uint64_t*)&data[8]; + + option->set_name(((global::vars::g_online_rockstar_ids[rid].first) ? "" : "~m~") + *name); + option->set_tooltip(util::va::va("Page %i of %i", m_vars.m_current_page + 1, (m_vars.m_total / 10) + 1)); + + menu::textures::texture_context context; + if (menu::textures::get_texture(std::string("playerimg_" + std::to_string(rid)), &context)) { + option->add_offset(0.016f); + + menu::renderer::draw_rect_unaligned({ global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, { 200, 200, 200, 255 }); + menu::renderer::draw_sprite({ "ozarkplayerimg", context.m_name }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, 0.f, { 255, 255, 255, 255 }); + } + }) + .add_hover([] (submenu_option* option) { + uint8_t* data = option->get_custom_data(); + uint64_t rid = *(uint64_t*)&data[0]; + std::string* name = (std::string*)*(uint64_t*)&data[8]; + + menu::panels::panel_custom_player_search search; + search.m_rockstar_id = rid; + search.m_online = global::vars::g_online_rockstar_ids[rid].first; + strcpy_s(search.m_name, name->c_str()); + + if (global::vars::g_read_stats_by_gamer_results.contains(rid)) { + search.m_has_stats = true; + memcpy(&search.m_stats, &global::vars::g_read_stats_by_gamer_results[rid], sizeof(search.m_stats)); + } else { + search.m_has_stats = false; + } + + menu::panels::panel_parent* parent = menu::panels::get_parent("PANEL_PLAYER_SEARCH"); + if (parent) { + menu::panels::set_structure(menu::panels::get_child(parent, "PANEL_PLAYER_SEARCH_INFO"), (void*)&search, sizeof(search)); + parent->m_render = true; + } + })); + + + m_vars.m_queue.push_back(account->m_rockstar_id); + } + + void get_next_page() { + if ((m_vars.m_current_page + 1) < m_vars.m_total_pages_requested) { + m_vars.m_current_page++; + network_player_search_menu::get()->update_once(); + return; + } + + if (!m_vars.m_processing_next_page) { + m_vars.m_processing_next_page = true; + + rage::api::get_profiles_from_name(m_vars.m_name, [=](bool success, std::vector accounts, rage::api::result_info* out_info) { + m_vars.m_processing_next_page = false; + + if (success && !accounts.empty()) { + for (rage::api::rockstar_account& account : accounts) { + if (std::find_if(begin(m_vars.m_accounts), end(m_vars.m_accounts), [=](rage::api::rockstar_account& elem) { return elem.m_rockstar_id == account.m_rockstar_id; }) == end(m_vars.m_accounts)) { + m_vars.m_accounts.push_back(account); + } + } + + m_vars.m_total_pages_requested++; + m_vars.m_current_offset += (int)accounts.size() + 1; + m_vars.m_current_page++; + network_player_search_menu::get()->update_once(); + } else { + menu::notify::stacked(network_player_search_menu::get()->get_name().get(), network_player_search_menu::get()->get_string("Failed resolving profiles"), global::ui::g_error); + } + + if (out_info) { + delete out_info; + } + }, nullptr, m_vars.m_current_offset); + } + } +} + +void network_player_search_menu::load() { + set_name("Player Search"); + set_parent(); + + add_option(button_option("Input Target Rockstar ID") + .add_translate() + .add_keyboard("Enter target players Rockstar ID", 30, input_player_rid_callback)); + + add_option(button_option("Input Target Name") + .add_translate() + .add_keyboard("Enter target players name", 30, input_player_name_callback)); + + add_option(button_option("Next Page") + .add_translate() + .add_click([this] { get_next_page(); }) + .add_update([](button_option* option) { option->set_tooltip(util::va::va("Page %i of %i", m_vars.m_current_page + 1, (m_vars.m_total / 10) + 1)); }) + .add_requirement([] { return (((m_vars.m_current_page + 1) * 10) < m_vars.m_total) && m_vars.m_rockstar_id == 0; })); + + add_option(button_option("Previous Page") + .add_translate() + .add_click([this] { m_vars.m_current_page--; update_once(); }) + .add_update([](button_option* option) { option->set_tooltip(util::va::va("Page %i of %i", m_vars.m_current_page + 1, (m_vars.m_total / 10) + 1)); }) + .add_requirement([] { return (m_vars.m_current_page > 0) && m_vars.m_rockstar_id == 0; })); + + add_option(break_option("Results") + .add_translate()); + + add_string("~m~None"); + add_string("Failed resolving profile"); + add_string("Failed resolving profiles"); +} + +void network_player_search_menu::update() { + if (menu::base::get_current_option() <= 6) { + menu::panels::toggle_panel_render("PANEL_PLAYER_SEARCH", false); + } + + static int timers[2] = { 0, 0 }; + static bool update_online = true; + + menu::timers::run_timed(&timers[1], 4000, [] { update_online = true; }); + + if (update_online) { + update_online = false; + + for (std::size_t i = 0; i < m_vars.m_queue.size(); i++) { + auto vit = std::find_if(begin(global::vars::g_online_rockstar_ids_queue), end(global::vars::g_online_rockstar_ids_queue), [=](uint64_t value) { + return value == m_vars.m_queue[i]; + }); + + if (vit == end(global::vars::g_online_rockstar_ids_queue)) { + global::vars::g_online_rockstar_ids_queue.push_back(m_vars.m_queue[i]); + } + } + + std::size_t process_size = m_vars.m_queue.size() > 32 ? 32 : m_vars.m_queue.size(); + if (process_size) { + rage::network::rockstar_identifier* identifiers = (rage::network::rockstar_identifier*)malloc(process_size * sizeof(rage::network::rockstar_identifier)); + memset(identifiers, 0, process_size * sizeof(rage::network::rockstar_identifier)); + + for (std::size_t i = 0; i < process_size; i++) { + identifiers[i].m_rockstar_id = m_vars.m_queue.back(); + identifiers[i].m_type = 3; + m_vars.m_queue.pop_back(); + } + + native::clear_gamer_task_data(); + rage::engine::send_session_info_request(identifiers, (int)process_size); + free(identifiers); + } + + // recreate the queue + if (m_vars.m_queue.size() == 0) { + for (std::size_t i = 0; i < m_vars.m_accounts.size(); i++) { + m_vars.m_queue.push_back(m_vars.m_accounts[i].m_rockstar_id); + } + } + } +} + +void add_request(std::vector players) { + if (players.empty()) return; + + uint32_t* rids = new uint32_t[players.size()]; + + for (std::size_t i = 0; i < players.size(); i++) { + rids[i] = (uint32_t)players[i]; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)players.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + util::threads::add_job([](void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + rage::ros::send_stat_requests(ridss, (int)count); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + + if (menu::submenu::handler::get_current() != network_player_search_menu::get()) { + if (std::find_if(begin(m_vars.m_image_queue), end(m_vars.m_image_queue), [=](uint64_t rid) { return (uint32_t)rid == ridss[i]; }) == end(m_vars.m_image_queue)) m_vars.m_image_queue.push_back(ridss[i]); + return; + } + + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); +} + +void network_player_search_menu::update_once() { + clear_options(5); + + if (!m_vars.m_image_queue.empty()) { + uint32_t* rids = new uint32_t[m_vars.m_image_queue.size()]; + + for (std::size_t i = 0; i < m_vars.m_image_queue.size(); i++) { + rids[i] = (uint32_t)m_vars.m_image_queue[i]; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)m_vars.m_image_queue.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + m_vars.m_image_queue.clear(); + + util::threads::add_job([](void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } + + std::vector players; + + if (m_vars.m_current_page == 0) { + if (m_vars.m_accounts.size() <= 10) { + for (rage::api::rockstar_account& account : m_vars.m_accounts) { + add_player(this, &account); + players.push_back(account.m_rockstar_id); + } + + add_request(players); + + if (m_vars.m_accounts.empty()) { + add_option(button_option(get_string("~m~None")).ref()); + } + } else { + for (std::size_t i = 0; i < 10; i++) { + add_player(this, &m_vars.m_accounts[i]); + players.push_back(m_vars.m_accounts[i].m_rockstar_id); + } + + add_request(players); + } + } else { + std::size_t max_size = m_vars.m_accounts.size() > (m_vars.m_current_page * 10) + 10 ? 10 : m_vars.m_accounts.size() - (m_vars.m_current_page * 10); + for (std::size_t i = 0; i < max_size; i++) { + add_player(this, &m_vars.m_accounts[i + (m_vars.m_current_page * 10)]); + players.push_back(m_vars.m_accounts[i + (m_vars.m_current_page * 10)].m_rockstar_id); + } + + add_request(players); + + if (max_size == 0) { + add_option(button_option(get_string("~m~None")).ref()); + } + } +} + +void network_player_search_menu::feature_update() {} + +network_player_search_menu* g_instance; +network_player_search_menu* network_player_search_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_player_search_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_player_search_join.h b/GTAV/src/menu/base/submenus/main/network/network_player_search_join.h new file mode 100644 index 0000000..79a2746 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_player_search_join.h @@ -0,0 +1,35 @@ +#pragma once +#include "menu/base/submenu.h" +#include "rage/api/api.h" + +class network_player_search_menu : public menu::submenu::submenu { +public: + static network_player_search_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_player_search_menu() + : menu::submenu::submenu() {} +}; + +namespace network::player::search::vars { + struct variables { + std::vector m_accounts; + int m_current_page = 0; + int m_current_offset = 0; + int m_total = 0; + int m_total_pages_requested = 0; + bool m_processing_next_page = false; + + std::string m_name = ""; + uint64_t m_rockstar_id = 0; + + std::vector m_queue; + std::vector m_image_queue; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_players.cpp b/GTAV/src/menu/base/submenus/main/network/network_players.cpp new file mode 100644 index 0000000..9c29631 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_players.cpp @@ -0,0 +1,404 @@ +#include "network_players.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "menu/base/util/panels.h" +#include "menu/base/util/timers.h" +#include "rage/engine.h" +#include "menu/base/util/helpers.h" +#include "menu/base/util/global.h" +#include "players/network_players_selected.h" +#include "menu/base/submenus/main/settings/hide_info.h" +#include "rage/types/global_types.h" + +using namespace network::players::vars; + +namespace network::players::vars { + variables m_vars; + + scroll_struct sort_types[] = { + { localization("Player ID", true), 0 }, + { localization("Distance", true), 0 }, + { localization("Alphabetical", true), 0 }, + { localization("Bank Balance", true), 0 }, + { localization("Wallet Balance", true), 0 }, + { localization("Rank", true), 0 }, + { localization("Modders", true), 0 }, + { localization("Next Session Hosts", true), 0 }, + }; + + std::string calculate_flags(menu::player::player_context& player) { + network_players_menu* _this = network_players_menu::get(); + std::string _return = ""; + + if (menu::helpers::is_valid_net_player(player.m_net_player)) { + if (player.m_net_player == rage::engine::get_host_net_game_player()) { + _return += "~HUD_COLOUR_BLUELIGHT~" + _this->get_string("[H]"); + } + } + + /*if (player.m_modder_flags[menu::player::REASON_MENU_CHERAX]) { + _return += _this->get_string("[CHERAX]"); + } + + if (player.m_modder_flags[menu::player::REASON_MENU_IMPULSE] + && !player.m_modder_flags[menu::player::REASON_MENU_IMPULSE_VIP]) { + _return += _this->get_string("[IMP]"); + } + + if (player.m_modder_flags[menu::player::REASON_MENU_IMPULSE_VIP]) { + _return += _this->get_string("[IMP-VIP]"); + } + + if (player.m_modder_flags[menu::player::REASON_MENU_IMPULSE_STAFF]) { + _return += _this->get_string("[IMP-STAFF]"); + } + + if (player.m_modder_flags[menu::player::REASON_MENU_IMPULSE_BLOCK]) { + _return += _this->get_string("[IMP-BLOCK]"); + }*/ + + if (player.m_modder_flags[menu::player::REASON_GHOST]) { + _return += _this->get_string("[GHOST]"); + } + + if (player.m_spectate) { + _return += "~HUD_COLOUR_GREYLIGHT~" + _this->get_string("[SPEC]"); + } + + if (player.m_is_friend) { + _return += "~HUD_COLOUR_BLUE~" + _this->get_string("[F]"); + } + + if (player.m_is_modder) { + _return += "~g~" + _this->get_string("[M]"); + } + + if (player.m_is_script_host) { + _return += "~o~" + _this->get_string("[SC-H]"); + } + + if (player.m_id > 31) { + _return += "~r~" + _this->get_string("[SCTV]"); + } + + if (player.m_id == menu::player::get_local_player().m_id) { + _return += "~HUD_COLOUR_PINK~" + _this->get_string("[ME]"); + } + + if (menu::helpers::is_valid_net_player(player.m_net_player)) { + if (strlen(player.m_net_player->get_crew_name()) > 0) { + std::string name = player.m_net_player->get_crew_tag(); + std::transform(name.begin(), name.end(), name.begin(), ::toupper); + _return += "~HUD_COLOUR_BRONZE~[" + name + "]"; + } + } + + return _return; + } + + void render_sprite(menu::player::player_context& player, int pos) { + auto render_base_icon = [](const char* name, int pos) { + menu::renderer::draw_sprite({ "mpinventory", name }, + { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.012f }, + { 0.017f * 0.8f, 0.027f * 0.8f }, 0.f, global::ui::g_option); + }; + + if (menu::helpers::is_valid_net_player(player.m_net_player)) { + if (player.m_net_player->m_is_rockstar_developer || player.m_net_player->m_is_rockstar_qa) { + return render_base_icon("custom_mission", pos); + } + } + + Blip blip_handle = menu::script_global(rage::global::_155_get_player_blip_handle + player.m_id + 1).as(); + if (blip_handle == 0) blip_handle = native::get_blip_from_entity(player.m_ped); + + if (blip_handle) { + int blip_id = native::get_blip_sprite(blip_handle); + + if (blip_id > 0 && blip_id != 164) { + char blip_name[32]; + sprintf(blip_name, "blip_%i", blip_id); + + static const rage::types::grc_texture_dx11* invalid_sprite = rage::engine::get_sprite_texture("yes", "yes"); + rage::types::grc_texture_dx11* ozark_blip_sprite = rage::engine::get_sprite_texture("OzarkBlips", blip_name); + + if (ozark_blip_sprite && ozark_blip_sprite != invalid_sprite) { + struct special { + math::vector3_ m_coords; + int m_sprite; + }; + + std::unordered_map special_blips; + float rotation = 0.f; + + for (int i = 0; i < 1500; i++) { + rage::types::blip* blip = global::vars::g_blip_list->m_blips[i]; + if (blip) { + if (blip->m_handle == blip_handle) { + if (blip_id == 422) { + blip->m_rotation += 5.f; + if (blip->m_rotation == 360.f) blip->m_rotation = 0.f; + } + + rotation = blip->m_rotation; + } + + if (blip->m_sprite == 72 + || blip->m_sprite == 71 + || blip->m_sprite == 73 + || blip->m_sprite == 75 + || blip->m_sprite == 110) { + special_blips[blip->m_handle] = { blip->m_coords, blip->m_sprite }; + } + } + } + + uint32_t blip_color_hex = (uint32_t)native::get_blip_colour(blip_handle); + color_rgba blip_color = color_rgba(blip_color_hex); + if (blip_color_hex < 500) { + blip_color = menu::helpers::get_color_from_blip(blip_color_hex); + } + + if (!native::is_player_control_on(player.m_id)) { + for (std::pair special_blip : special_blips) { + if (math::vector3_::to_padded(special_blip.second.m_coords).get_distance(native::get_blip_coords(blip_handle)) < 18.f) { + sprintf(blip_name, "blip_%i", special_blip.second.m_sprite); + blip_color = { 255, 255, 255 }; + rotation = 0.f; + break; + } + } + } + + menu::renderer::draw_sprite({ "OzarkBlips", blip_name }, + { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.012f }, + { 0.017f * 0.8f, 0.027f * 0.8f }, rotation, blip_color); + + return; + } + } + } + + if (!player.m_in_vehicle) { + menu::renderer::draw_sprite({ "OzarkBlips", "blip_1" }, + { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.012f }, + { 0.017f * 0.8f, 0.027f * 0.8f }, 0.f, { 255, 255, 255, 255 }); + + return; + } + + // menu::base::is_option_selected(pos) + + uint32_t vehicle_model = native::get_entity_model(player.m_vehicle); + if (native::is_this_model_a_bicycle(vehicle_model)) { + return render_base_icon(false ? "mp_specitem_bike_black" : "mp_specitem_bike", pos); + } + + if (native::is_this_model_a_bike(vehicle_model)) { + return render_base_icon(false ? "mp_specitem_bike_black" : "mp_specitem_bike", pos); + } + + if (native::is_this_model_a_boat(vehicle_model)) { + return render_base_icon(false ? "mp_specitem_boat_black" : "mp_specitem_boat", pos); + } + + if (native::is_this_model_a_heli(vehicle_model)) { + return render_base_icon(false ? "mp_specitem_heli_black" : "mp_specitem_heli", pos); + } + + if (native::is_this_model_a_plane(vehicle_model)) { + return render_base_icon(false ? "mp_specitem_plane_black" : "mp_specitem_plane", pos); + } + + return render_base_icon(false ? "mp_specitem_car_black" : "mp_specitem_car", pos); + } +} + +void network_players_menu::load() { + set_name("Players"); + set_parent(); + + add_option(scroll_option(SCROLL, "Sort Players") + .add_translate() + .add_scroll(m_vars.m_sort, 0, NUMOF(sort_types), sort_types)); + + add_option(break_option("Players") + .add_translate()); + + add_string("[H]"); + add_string("[CHERAX]"); + add_string("[IMP]"); + add_string("[IMP-VIP]"); + add_string("[IMP-STAFF]"); + add_string("[IMP-BLOCK]"); + add_string("[GHOST]"); + add_string("[SPEC]"); + add_string("[F]"); + add_string("[M]"); + add_string("[SC-H]"); + add_string("[SCTV]"); + add_string("[ME]"); + + network_players_selected_menu::get(); +} + +void network_players_menu::update() { + static int timer = 0; + menu::timers::run_timed(&timer, 250, [this] { + clear_options(2); + + std::vector players; + menu::player::for_each([&](menu::player::player_context& player) { + if (!player.m_name.empty()) { + players.push_back(&player); + } + }, true, true); + + if (m_vars.m_sort != 0) { + switch (m_vars.m_sort) { + case 1: + std::sort(begin(players), end(players), [](menu::player::player_context* left, menu::player::player_context* right) { + return left->m_coords.get_distance(menu::player::get_local_player().m_coords) < right->m_coords.get_distance(menu::player::get_local_player().m_coords); + }); + break; + + case 2: + std::sort(begin(players), end(players), [](menu::player::player_context* left, menu::player::player_context* right) { + int i = 0; + std::string name1 = left->m_name; + std::string name2 = right->m_name; + + while ((i < name1.length()) && (i < name2.length())) { + if (tolower(name1[i]) < tolower(name2[i])) return true; + if (tolower(name1[i]) > tolower(name2[i])) return false; + i++; + } + + return name1.length() < name2.length(); + }); + break; + + case 3: + std::sort(begin(players), end(players), [](menu::player::player_context* left, menu::player::player_context* right) { + int left_bank = menu::script_global(rage::global::_155_player_stats_struct).at(left->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(56).as() - menu::script_global(rage::global::_155_player_stats_struct).at(left->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(3).as(); + int right_bank = menu::script_global(rage::global::_155_player_stats_struct).at(right->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(56).as() - menu::script_global(rage::global::_155_player_stats_struct).at(right->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(3).as(); + return left_bank > right_bank; + }); + break; + + case 4: + std::sort(begin(players), end(players), [](menu::player::player_context* left, menu::player::player_context* right) { + int left_wallet = menu::script_global(rage::global::_155_player_stats_struct).at(left->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(3).as(); + int right_wallet = menu::script_global(rage::global::_155_player_stats_struct).at(right->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(3).as(); + return left_wallet > right_wallet; + }); + break; + + case 5: + std::sort(begin(players), end(players), [](menu::player::player_context* left, menu::player::player_context* right) { + int left_rank = menu::script_global(rage::global::_155_player_stats_struct).at(left->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(6).as(); + int right_rank = menu::script_global(rage::global::_155_player_stats_struct).at(right->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(6).as(); + return left_rank > right_rank; + }); + break; + + case 6: + std::sort(begin(players), end(players), [](menu::player::player_context* left, menu::player::player_context* right) { + return left->m_is_modder; + }); + break; + + case 7: + std::sort(begin(players), end(players), [](menu::player::player_context* left, menu::player::player_context* right) { + if (rage::engine::get_host_net_game_player() == left->m_net_player) return false; + + uint64_t left_token = 0; + uint64_t right_token = 0; + + if (is_valid_ptr(left->m_net_player)) { + if (is_valid_ptr(left->m_net_player->m_player_info)) { + left_token = left->m_net_player->m_player_info->m_host_token; + } + } + + if (is_valid_ptr(right->m_net_player)) { + if (is_valid_ptr(right->m_net_player->m_player_info)) { + right_token = right->m_net_player->m_player_info->m_host_token; + } + } + + return left_token < right_token; + }); + break; + } + } + + for (menu::player::player_context* player : players) { + std::string name = menu::helpers::clean_name(player->m_name); + if (player->m_id == menu::player::get_local_player().m_id) { + if (settings::hide::vars::m_vars.m_hide_names) { + name = util::va::va("Player_%i", player->m_id); + } + } + + switch (m_vars.m_sort) { + case 1: name = "[" + std::string(util::va::va("%.3f", player->m_coords.get_distance(menu::player::get_local_player().m_coords))) + "m] " + name; break; + case 3: name = "[$" + std::to_string(menu::script_global(rage::global::_155_player_stats_struct).at(player->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(56).as() - menu::script_global(rage::global::_155_player_stats_struct).at(player->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(3).as()) + "] " + name; break; + case 4: name = "[$" + std::to_string(menu::script_global(rage::global::_155_player_stats_struct).at(player->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(3).as()) + "] " + name; break; + case 5: name = "[" + std::to_string(menu::script_global(rage::global::_155_player_stats_struct).at(player->m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(6).as()) + "] " + name; break; + } + + add_option(submenu_option(name) + .add_submenu() + .add_update([=](submenu_option* option, int pos) { + option->add_offset(0.016f); + render_sprite(*player, pos); + }).add_hover([=](submenu_option* option) { + m_vars.m_selected_player = player->m_id; + + menu::panels::panel_custom_screen_ped_preview preview; + preview.m_screen_offset = { 0.00f, -2.00f, 0.40f }; + preview.m_is_player = true; + preview.m_player = player->m_id; + + menu::panels::set_structure(menu::panels::get_child(menu::panels::get_parent("PANEL_PLAYER_INFO"), "PANEL_PLAYER_INFO_OUTFIT_PREVIEW"), (void*)&preview, sizeof(preview)); + menu::panels::toggle_panel_render("PANEL_PLAYER_INFO", true); + }).add_click([=] { + if (player->m_modder_flags[menu::player::REASON_GHOST]) { + menu::submenu::handler::set_submenu(network_players_menu::get()); + } + }).add_side_text(calculate_flags(*player)).disable_icon()); + } + }); + + if (menu::base::get_current_option() >= (int)get_options().size()) { + menu::base::set_current_option((int)get_options().size() - 1); + } + + if (menu::base::get_current_option() <= 1) { + menu::panels::toggle_panel_render("PANEL_PLAYER_INFO", false); + } +} + +void network_players_menu::update_once() {} + +void network_players_menu::feature_update() { + menu::player::for_each([&] (menu::player::player_context& player) { + if (!menu::player::get_local_player().m_alive) { + if (player.m_spectate) { + native::network_set_in_spectator_mode(false, player.m_ped); + } + } + }, true, true); +} + +network_players_menu* g_instance; +network_players_menu* network_players_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_players.h b/GTAV/src/menu/base/submenus/main/network/network_players.h new file mode 100644 index 0000000..864d542 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_players.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_menu : public menu::submenu::submenu { +public: + static network_players_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::vars { + struct variables { + int m_selected_player = 0; + int m_sort = 0; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_recent_players.cpp b/GTAV/src/menu/base/submenus/main/network/network_recent_players.cpp new file mode 100644 index 0000000..edd2a2d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_recent_players.cpp @@ -0,0 +1,368 @@ +#include "network_recent_players.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "recent/network_recent_players_selected.h" +#include "recent/network_recent_players_permanent.h" +#include "util/dirs.h" +#include "util/log.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/panels.h" +#include "rage/engine.h" +#include "util/threads.h" + +#include "menu/base/util/textures.h" +#include +#include + +using namespace network::recents::vars; + +namespace network::recents::vars { + variables m_vars; + + std::string get_current_time() { + time_t raw_time; + time(&raw_time); + + tm time; + localtime_s(&time, &raw_time); + + char time_string[128]; + strftime(time_string, 128, "%a %d %b %Y %H:%M:%S", &time); + return std::string(time_string); + } + + void save(std::string name, std::string ip, uint64_t rockstar_id) { + nlohmann::json json; + std::vector players; + std::vector perm_players; + + try { + std::ifstream file(util::dirs::get_path(recent_players)); + if (file.good()) { + json = nlohmann::json::parse(file); + file.close(); + } + + if (!json["recent"].is_null()) { + for (nlohmann::json::iterator it = json["recent"].begin(); it != json["recent"].end(); ++it) { + recent_player o; + strcpy_s(o.m_name, it.value()["name"].get().c_str()); + strcpy_s(o.m_ip, it.value()["ip"].get().c_str()); + strcpy_s(o.m_first_encountered, it.value()["first encountered"].get().c_str()); + strcpy_s(o.m_last_encountered, it.value()["last encountered"].get().c_str()); + o.m_rockstar_id = std::stoull(it.key()); + o.m_internal_encountered = it.value()["internal"].get(); + + players.push_back(o); + } + } + + if (!json["perm"].is_null()) { + for (nlohmann::json::iterator it = json["perm"].begin(); it != json["perm"].end(); ++it) { + recent_player o; + strcpy_s(o.m_name, it.value()["name"].get().c_str()); + strcpy_s(o.m_ip, it.value()["ip"].get().c_str()); + strcpy_s(o.m_first_encountered, it.value()["first encountered"].get().c_str()); + strcpy_s(o.m_last_encountered, it.value()["last encountered"].get().c_str()); + + o.m_rockstar_id = std::stoull(it.key()); + o.m_internal_encountered = it.value()["internal"].get(); + + perm_players.push_back(o); + } + } + + bool exists = false; + for (recent_player& p : players) { + if (p.m_rockstar_id == rockstar_id && !strcmp(p.m_name, name.c_str())) { + exists = true; + strcpy_s(p.m_last_encountered, get_current_time().c_str()); + strcpy_s(p.m_ip, ip.c_str()); + p.m_internal_encountered = (int)time(0); + break; + } + } + + if (!exists) { + recent_player new_player; + strcpy_s(new_player.m_name, name.c_str()); + strcpy_s(new_player.m_ip, ip.c_str()); + strcpy_s(new_player.m_first_encountered, get_current_time().c_str()); + strcpy_s(new_player.m_last_encountered, get_current_time().c_str()); + new_player.m_internal_encountered = (int)time(0); + new_player.m_rockstar_id = rockstar_id; + players.push_back(new_player); + } + + std::sort(begin(players), end(players), [](recent_player& first, recent_player& second) { return first.m_internal_encountered > second.m_internal_encountered; }); + + std::ofstream output(util::dirs::get_path(recent_players)); + if (output.good()) { + nlohmann::json resp; + + for (recent_player& p : perm_players) { + resp["perm"][std::to_string(p.m_rockstar_id)]["name"] = p.m_name; + resp["perm"][std::to_string(p.m_rockstar_id)]["ip"] = p.m_ip; + resp["perm"][std::to_string(p.m_rockstar_id)]["first encountered"] = p.m_first_encountered; + resp["perm"][std::to_string(p.m_rockstar_id)]["last encountered"] = p.m_last_encountered; + resp["perm"][std::to_string(p.m_rockstar_id)]["internal"] = p.m_internal_encountered; + } + + int count = 0; + for (recent_player& p : players) { + if (count > 100) break; + resp["recent"][std::to_string(p.m_rockstar_id)]["name"] = p.m_name; + resp["recent"][std::to_string(p.m_rockstar_id)]["ip"] = p.m_ip; + resp["recent"][std::to_string(p.m_rockstar_id)]["first encountered"] = p.m_first_encountered; + resp["recent"][std::to_string(p.m_rockstar_id)]["last encountered"] = p.m_last_encountered; + resp["recent"][std::to_string(p.m_rockstar_id)]["internal"] = p.m_internal_encountered; + count++; + } + + output << resp.dump(4); + output.close(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + void load_players() { + try { + nlohmann::json json; + + std::ifstream file(util::dirs::get_path(recent_players)); + if (file.good()) { + json = nlohmann::json::parse(file); + file.close(); + } + + json = json["recent"]; + + m_vars.m_players.clear(); + for (nlohmann::json::iterator it = json.begin(); it != json.end(); ++it) { + recent_player o; + strcpy_s(o.m_name, it.value()["name"].get().c_str()); + if (strlen(o.m_name) == 0) strcpy_s(o.m_name, "Invalid Name"); + + strcpy_s(o.m_ip, it.value()["ip"].get().c_str()); + strcpy_s(o.m_first_encountered, it.value()["first encountered"].get().c_str()); + strcpy_s(o.m_last_encountered, it.value()["last encountered"].get().c_str()); + + o.m_internal_encountered = it.value()["internal"].get(); + o.m_rockstar_id = std::stoull(it.key()); + + if (m_vars.m_players.size() == 1000) break; + if (o.m_rockstar_id > 0x1000) m_vars.m_queue.push_back(o.m_rockstar_id); + m_vars.m_players.push_back({ it.key(), o }); + } + + if (!m_vars.m_players.empty()) { + uint32_t* rids = new uint32_t[m_vars.m_players.size()]; + + for (std::size_t i = 0; i < m_vars.m_players.size(); i++) { + rids[i] = (uint32_t)m_vars.m_players[i].second.m_rockstar_id; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)m_vars.m_players.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + util::threads::add_job([](void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + rage::ros::send_stat_requests(ridss, (int)count); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + + if (menu::submenu::handler::get_current() != network_recent_players_menu::get()) { + if (std::find_if(begin(m_vars.m_image_queue), end(m_vars.m_image_queue), [=](uint64_t rid) { return (uint32_t)rid == ridss[i]; }) == end(m_vars.m_image_queue)) m_vars.m_image_queue.push_back(ridss[i]); + return; + } + + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } + + std::sort(begin(m_vars.m_players), end(m_vars.m_players), [](std::pair& first, std::pair& second) { return first.second.m_internal_encountered > second.second.m_internal_encountered; }); + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } +} + +void network_recent_players_menu::load() { + set_name("Recent Players"); + set_parent(); + + add_option(submenu_option("Permanent") + .add_translate().add_hotkey() + .add_submenu() + .add_hover([](submenu_option*) { menu::panels::toggle_panel_render("PANEL_RECENT_PLAYER", false); })); + + add_option(break_option("Players") + .add_translate()); + + add_string("~m~None"); + + network_recent_players_selected_menu::get(); +} + +void network_recent_players_menu::update() { + static int timers[2] = { 0, 0 }; + + menu::timers::run_timed(&timers[1], 4000, [] { m_vars.m_update_online = true; m_vars.m_update_players = true; }); + + if (m_vars.m_update_players) { + m_vars.m_update_players = false; + + clear_options(2); + + if (m_vars.m_players.size()) { + for (std::size_t i = 0; i < m_vars.m_players.size(); i++) { + std::pair& player = m_vars.m_players[i]; + + bool in_session = false; + menu::player::for_each([&](menu::player::player_context& pl) { + if (pl.m_net_player) { + if (pl.m_net_player->m_player_info) { + if (pl.m_net_player->m_player_info->m_identifier.m_rockstar_id == player.second.m_rockstar_id) { + in_session = true; + } + } + } + }, true); + + add_option(submenu_option(util::va::va("%s%s", (global::vars::g_online_rockstar_ids[player.second.m_rockstar_id].first || in_session) ? "" : "~m~", player.second.m_name)) + .add_click([=] { + network::recents::selected::vars::m_vars.m_type = 1; + network::recents::selected::vars::m_vars.m_selected_player = i; + m_vars.m_selected_list = &m_vars.m_players; + }) + .add_submenu() + .add_hover([=](submenu_option*) { + menu::panels::panel_parent* parent = menu::panels::get_parent("PANEL_RECENT_PLAYER"); + if (parent) { + menu::panels::panel_custom_recent_player str; + str.m_in_session = in_session; + str.m_online = global::vars::g_online_rockstar_ids[player.second.m_rockstar_id].first || in_session; + str.m_rockstar_id = player.second.m_rockstar_id; + str.m_session_type = str.m_online ? global::vars::g_online_rockstar_ids[player.second.m_rockstar_id].second : -1; + strcpy(str.m_first_encountered, player.second.m_first_encountered); + strcpy(str.m_last_encountered, player.second.m_last_encountered); + strcpy(str.m_name, player.second.m_name); + strcpy(str.m_ip, player.second.m_ip); + + if (global::vars::g_read_stats_by_gamer_results.contains(player.second.m_rockstar_id)) { + str.m_has_stats = true; + memcpy(&str.m_stats, &global::vars::g_read_stats_by_gamer_results[player.second.m_rockstar_id], sizeof(str.m_stats)); + } else { + str.m_has_stats = false; + } + + menu::panels::set_structure(menu::panels::get_child(parent, "PANEL_RECENT_PLAYER_INFO"), (void*)&str, sizeof(str)); + parent->m_render = true; + } + }) + .add_update([=](submenu_option* option, int pos) { + menu::textures::texture_context context; + if (menu::textures::get_texture(std::string("playerimg_" + std::to_string(player.second.m_rockstar_id)), &context)) { + option->add_offset(0.016f); + + menu::renderer::draw_rect_unaligned({ global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, { 200, 200, 200, 255 }); + menu::renderer::draw_sprite({ "ozarkplayerimg", context.m_name }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, 0.f, { 255, 255, 255, 255 }); + } + })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } + } + + if (m_vars.m_update_online) { + m_vars.m_update_online = false; + + for (std::size_t i = 0; i < m_vars.m_queue.size(); i++) { + auto vit = std::find_if(begin(global::vars::g_online_rockstar_ids_queue), end(global::vars::g_online_rockstar_ids_queue), [=](uint64_t value) { + return value == m_vars.m_queue[i]; + }); + + if (vit == end(global::vars::g_online_rockstar_ids_queue)) { + global::vars::g_online_rockstar_ids_queue.push_back(m_vars.m_queue[i]); + } + } + + std::size_t process_size = m_vars.m_queue.size() > 32 ? 32 : m_vars.m_queue.size(); + + rage::network::rockstar_identifier* identifiers = (rage::network::rockstar_identifier*)malloc(process_size * sizeof(rage::network::rockstar_identifier)); + memset(identifiers, 0, process_size * sizeof(rage::network::rockstar_identifier)); + + for (std::size_t i = 0; i < process_size; i++) { + identifiers[i].m_rockstar_id = m_vars.m_queue.back(); + identifiers[i].m_type = 3; + m_vars.m_queue.pop_back(); + } + + native::clear_gamer_task_data(); + rage::engine::send_session_info_request(identifiers, (int)process_size); + free(identifiers); + + // recreate the queue + if (m_vars.m_queue.size() == 0) { + for (std::size_t i = 0; i < m_vars.m_players.size(); i++) { + m_vars.m_queue.push_back(m_vars.m_players[i].second.m_rockstar_id); + } + } + } +} + +void network_recent_players_menu::update_once() { + load_players(); + m_vars.m_update_players = true; + + if (!m_vars.m_image_queue.empty()) { + uint32_t* rids = new uint32_t[m_vars.m_image_queue.size()]; + + for (std::size_t i = 0; i < m_vars.m_image_queue.size(); i++) { + rids[i] = (uint32_t)m_vars.m_image_queue[i]; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)m_vars.m_image_queue.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + m_vars.m_image_queue.clear(); + + util::threads::add_job([](void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } +} + +void network_recent_players_menu::feature_update() {} + +network_recent_players_menu* g_instance; +network_recent_players_menu* network_recent_players_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_recent_players_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_recent_players.h b/GTAV/src/menu/base/submenus/main/network/network_recent_players.h new file mode 100644 index 0000000..76b74bb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_recent_players.h @@ -0,0 +1,40 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_recent_players_menu : public menu::submenu::submenu { +public: + static network_recent_players_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_recent_players_menu() + : menu::submenu::submenu() {} +}; + +namespace network::recents::vars { + struct recent_player { + char m_name[0x20]; + char m_ip[16]; + char m_first_encountered[0x50]; + char m_last_encountered[0x50]; + uint64_t m_rockstar_id; + int m_internal_encountered; + }; + + struct variables { + std::vector m_queue; + std::vector m_image_queue; + std::vector> m_players; + std::vector> m_permanent_players; + std::vector>* m_selected_list; + + bool m_update_players = true; + bool m_update_online = true; + }; + + void save(std::string name, std::string ip, uint64_t rockstar_id); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_session.cpp b/GTAV/src/menu/base/submenus/main/network/network_session.cpp new file mode 100644 index 0000000..76bb8f6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_session.cpp @@ -0,0 +1,128 @@ +#include "network_session.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "players/network_players_friendly.h" +#include "players/network_players_teleport.h" +#include "players/network_players_text.h" +#include "players/network_players_removals.h" +#include "players/network_players_commands.h" +#include "players/network_players_abusive.h" +#include "players/network_players_trolling.h" +#include "players/network_players_vehicle.h" +#include "players/network_players_selected.h" +#include "menu/base/submenus/main/spawner.h" +#include "spoofing/network_spoofing_profiles.h" +#include "menu/base/util/panels.h" +#include "session/network_session_excludes.h" +#include "session/network_session_overseer.h" + +using namespace network::session::vars; + +namespace network::session::vars { + variables m_vars; +} + +void network_session_menu::load() { + set_name("Session"); + set_parent(); + + add_option(submenu_option("Removals") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Friendly") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Teleport") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Abusive") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Trolling") + .add_translate() + .add_submenu()); + + add_option(submenu_option("ESP") + .add_translate() + .add_submenu() + .add_click([] { + helper_esp_menu::get()->set_parent(); + helper::esp::vars::m_vars.m_current = &network::players::selected::vars::m_vars.m_session_esp; + })); + + add_option(submenu_option("Chat Commands") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Text Message") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Vehicle") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Spawner") + .add_translate() + .add_submenu() + .add_click([] { spawner::vars::m_vars.m_flag = spawner::vars::SPAWNER_SESSION; })); + + add_option(submenu_option("Excludes") + .add_translate() + .add_submenu() + .add_tooltip("Exclude players from session options")); + + add_option(submenu_option("Overseer") + .add_translate() + .add_submenu()); + + add_option(button_option("Create Spoofing Profiles") + .add_translate() + .add_click([] { + menu::player::for_each([] (menu::player::player_context& player) { + if (!player.m_net_player || !player.m_net_player->m_player_info) return; + uint32_t ip = player.m_net_player->m_player_info->m_external_ip; + + char buffer[32]; + sprintf(buffer, "%i.%i.%i.%i", ((ip & 0xFF000000) >> 24), ((ip & 0xFF0000) >> 16), ((ip & 0xFF00) >> 8), (ip & 0xFF)); + + network::spoofing::profiles::vars::spoof_profile profile; + profile.m_name = player.m_name; + profile.m_ip = std::string(buffer); + profile.m_rockstar_id = (uint32_t)player.m_net_player->m_player_info->m_identifier.m_rockstar_id; + profile.m_file_name = profile.m_name; + + profile.m_crew_icon = player.m_net_player->get_crew_id(); + profile.m_crew_motto = player.m_net_player->get_crew_motto(); + profile.m_crew_name = player.m_net_player->get_crew_name(); + profile.m_crew_rank = player.m_net_player->get_crew_rank(); + profile.m_crew_tag = player.m_net_player->get_crew_tag(); + + network::spoofing::profiles::vars::save_profile(profile); + }); + })); +} + +void network_session_menu::update() {} + +void network_session_menu::update_once() { + menu::panels::toggle_panel_render("PANEL_OVERSEER", false); + menu::panels::toggle_panel_render("PANEL_SESSION", true); +} + +void network_session_menu::feature_update() {} + +network_session_menu* g_instance; +network_session_menu* network_session_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_session_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_session.h b/GTAV/src/menu/base/submenus/main/network/network_session.h new file mode 100644 index 0000000..5239429 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_session.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_session_menu : public menu::submenu::submenu { +public: + static network_session_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_session_menu() + : menu::submenu::submenu() {} +}; + +namespace network::session::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_session_finder.cpp b/GTAV/src/menu/base/submenus/main/network/network_session_finder.cpp new file mode 100644 index 0000000..9a1854b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_session_finder.cpp @@ -0,0 +1,173 @@ +#include "network_session_finder.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "menu/base/util/panels.h" +#include "menu/base/util/timers.h" +#include "finder/network_session_finder_edit.h" +#include "rage/api/api.h" + +#include "menu/base/util/textures.h" +#include "util/threads.h" + +using namespace network::sfinder::vars; + +namespace network::sfinder::vars { + variables m_vars; +} + +void network_session_finder_menu::load() { + set_name("Session Finder"); + set_parent(); + + add_option(toggle_option("Toggle Population") + .add_translate() + .add_toggle(m_vars.m_populate) + .add_tooltip("Does cause some stuttering so don't leave it enabled all the time")); + + add_option(number_option(SCROLL, "Minimum Slots Available") + .add_translate() + .add_number(m_vars.m_minimum_slots, "%i", 1).add_min(1).add_max(32) + .add_click([] { m_vars.m_sessions.clear(); }).add_savable(get_submenu_name_stack()) + .add_tooltip("NOTE: Changing this value will reset the cache!")); + + add_option(button_option("Clear Cache") + .add_translate() + .add_click([] { m_vars.m_sessions.clear(); })); + + add_option(break_option("Sessions") + .add_translate()); + + add_string("~m~None"); +} + +void network_session_finder_menu::update() { + static int timer = 0; + + menu::timers::run_timed(&timer, 1000, [this] { + clear_options(4); + + for (std::size_t i = 0; i < m_vars.m_sessions.size(); i++) { + session_browser& session = m_vars.m_sessions[i]; + if (!session.m_requested && global::vars::g_player_image_queue.empty()) { + session.m_requested = true; + + std::size_t* number = new std::size_t; + *number = i; + + rage::api::get_profiles_from_rid(session.m_rockstar_id, [](bool successful, std::vector accounts, void* data) { + if (data) { + std::size_t id = *(std::size_t*)data; + if (successful && !accounts.empty()) { + m_vars.m_sessions[id].m_name = accounts[0].m_name; + } + + delete data; + } + }, number); + } + + bool peer_modded = ((session.m_peer_token >> 32) & 0xFFFFFFFF) < 0x1000; + bool modder = peer_modded || session.m_rockstar_id < 0x1000; + + std::string color_modifier = ""; + if (global::vars::g_read_stats_by_gamer_results.contains(session.m_rockstar_id)) { + if (global::vars::g_read_stats_by_gamer_results[session.m_rockstar_id].m_wallet_balance > 1000000000 + || global::vars::g_read_stats_by_gamer_results[session.m_rockstar_id].m_bank_balance > 1000000000 + || global::vars::g_read_stats_by_gamer_results[session.m_rockstar_id].m_rank > 2500) { + color_modifier = "~y~"; + } + } + + char option[150]; + if (session.m_name.empty()) { + sprintf_s(option, "%s%s%i%s", color_modifier.c_str(), modder ? "~r~" : "", (uint32_t)session.m_rockstar_id, modder ? " - Modder" : ""); + } else { + sprintf_s(option, "%s%s%s%s", color_modifier.c_str(), modder ? "~r~" : "", session.m_name.c_str(), modder ? " - Modder" : ""); + } + + add_option(submenu_option(option) + .add_submenu() + .add_hover([=](submenu_option*) { + menu::panels::panel_custom_session_browser browser; + browser.m_local_ip = session.m_local_ip; + browser.m_peer_token = session.m_peer_token; + browser.m_rockstar_id = session.m_rockstar_id; + browser.m_name[0] = 0; + if (!session.m_name.empty()) strcpy_s(browser.m_name, session.m_name.c_str()); + + if (global::vars::g_read_stats_by_gamer_results.contains(session.m_rockstar_id)) { + browser.m_has_stats = true; + memcpy(&browser.m_stats, &global::vars::g_read_stats_by_gamer_results[session.m_rockstar_id], sizeof(browser.m_stats)); + } else { + browser.m_has_stats = false; + } + + menu::panels::panel_parent* parent = menu::panels::get_parent("PANEL_SESSION_BROWSER"); + if (parent) { + menu::panels::set_structure(menu::panels::get_child(parent, "PANEL_SESSION_BROWSER_INFO"), (void*)&browser, sizeof(browser)); + parent->m_render = true; + } + }) + .add_update([=](submenu_option* option, int pos) { + menu::textures::texture_context context; + if (menu::textures::get_texture(std::string("playerimg_" + std::to_string(session.m_rockstar_id)), &context)) { + option->add_offset(0.016f); + + menu::renderer::draw_rect_unaligned({ global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, { 200, 200, 200, 255 }); + menu::renderer::draw_sprite({ "ozarkplayerimg", context.m_name }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, 0.f, { 255, 255, 255, 255 }); + } + }) + .add_click([=] { network::sfinder::edit::vars::m_vars.m_selected = i; })); + } + + if (m_vars.m_sessions.size() == 0) { + add_option(button_option(get_string("~m~None")).ref()); + } + }); + + if (menu::base::get_current_option() < 4) { + menu::panels::toggle_panel_render("PANEL_SESSION_BROWSER", false); + } +} + +void network_session_finder_menu::update_once() { + if (!m_vars.m_image_queue.empty()) { + uint32_t* rids = new uint32_t[m_vars.m_image_queue.size()]; + + for (std::size_t i = 0; i < m_vars.m_image_queue.size(); i++) { + rids[i] = (uint32_t)m_vars.m_image_queue[i]; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)m_vars.m_image_queue.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + m_vars.m_image_queue.clear(); + + util::threads::add_job([](void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } +} + +void network_session_finder_menu::feature_update() {} + +network_session_finder_menu* g_instance; +network_session_finder_menu* network_session_finder_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_session_finder_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_session_finder.h b/GTAV/src/menu/base/submenus/main/network/network_session_finder.h new file mode 100644 index 0000000..9edbd4b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_session_finder.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_session_finder_menu : public menu::submenu::submenu { +public: + static network_session_finder_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_session_finder_menu() + : menu::submenu::submenu() {} +}; + +namespace network::sfinder::vars { + struct variables { + bool m_populate; + int m_minimum_slots = 1; + + std::vector m_image_queue; + std::vector m_sessions; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_spoofing.cpp b/GTAV/src/menu/base/submenus/main/network/network_spoofing.cpp new file mode 100644 index 0000000..7cdf697 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_spoofing.cpp @@ -0,0 +1,205 @@ +#include "network_spoofing.h" +#include "menu/base/submenu_handler.h" +#include "../network.h" +#include "rage/engine.h" +#include "spoofing/network_spoofing_player_rotation.h" +#include "spoofing/network_spoofing_vehicle_rotation.h" +#include "spoofing/network_spoofing_intervals.h" +#include "spoofing/network_spoofing_crew.h" +#include "spoofing/network_spoofing_name.h" +#include "spoofing/network_spoofing_ip.h" +#include "spoofing/network_spoofing_rid.h" +#include "spoofing/network_spoofing_profiles.h" +#include "util/log.h" + +using namespace network::spoofing::vars; + +namespace network::spoofing::vars { + variables m_vars; + + uint64_t offsets[][2] = { + { 0x2BFA020, 0x2C00030 }, + { 0x2945570, 0x29440D0 }, + { 0x293E980, 0x2936400 }, + { 0x1E16348, 0x1E1B7C8 }, + { 0x2C06530, 0x2C0C5E0 }, + { 0x2C09C20, 0x2C10508 }, + { 0x2C09C08, 0x2C104F0 }, + { 0x290CB20, 0x29117F0 }, + { 0x2943DA0 + 0x30, 0x2949550 + 0x30 }, + }; + + void do_peer_spoof(uint64_t peer, bool no_change) { + if (m_vars.m_original_peer == 0xFFFFFFFFFFFFFFFC) { + m_vars.m_original_peer = *(uint64_t*)(global::vars::g_game_address.first + offsets[0][global::vars::g_steam]); // updated + } + + m_vars.m_spoofed_peer = peer; + uint64_t check_peer = *(uint64_t*)(global::vars::g_game_address.first + offsets[0][global::vars::g_steam]); + bool same_spoof = peer == *(uint64_t*)(global::vars::g_game_address.first + offsets[0][global::vars::g_steam]); // updated + + for (int i = 0; i <= 8; i++) { + *(uint64_t*)(global::vars::g_game_address.first + offsets[i][global::vars::g_steam]) = peer; // updated + } + + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + if (is_valid_ptr(real_config)) { + if (real_config->m_unk_ptr) { + for (uint32_t i = 0; i < *(uint32_t*)(real_config->m_unk_ptr + 0x2388); i++) { + uint64_t config = *(uint64_t*)(real_config->m_unk_ptr + (i * 8) + 0x2288); + if (config) { + if (*(uint64_t*)(config + 0x60) == check_peer) { + *(uint64_t*)(config + 0x60) = peer; + } + } + } + + uint64_t unk_table = global::vars::g_game_address.first + offsets[8][global::vars::g_steam]; // updated + for (int i = 0; i < 32; i++) { + uint64_t ptr = *(uint64_t*)(unk_table + (i * 8) + 0x1808); + if (!is_valid_ptr(ptr)) break; + + if (*(uint64_t*)(ptr + 0x60) == check_peer) { + *(uint64_t*)(ptr + 0x60) = peer; + } + } + + *(uint64_t*)(real_config->m_unk_ptr + 0x9A0) = peer; + } + } + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_player_info) { + global::vars::g_ped_factory->m_local_ped->m_player_info->m_host_token = peer; + } + } + } + + if (!same_spoof && !no_change) { + if (*global::vars::g_game_state == GameStatePlaying) { + if (native::network_is_in_session()) { + network::vars::find_new_session(0); + } + } + } + } + + void handle_peer_change(button_option* option, const char* result) { + if (result[0] == '0' && (result[1] == 'x' || result[1] == 'X')) { + do_peer_spoof(_strtoui64(result, 0, 0)); + util::config::write_uint64(network_spoofing_menu::get()->get_submenu_name_stack(), "Peer", _strtoui64(result, 0, 0)); + } else { + std::string str(result); + if (std::find_if(str.begin(), str.end(), [](unsigned char c) { return !std::isdigit(c); }) == str.end()) { + do_peer_spoof(atoi(result)); + util::config::write_uint64(network_spoofing_menu::get()->get_submenu_name_stack(), "Peer", atoi(result)); + } + } + } + + void handle_peer_reset() { + do_peer_spoof(m_vars.m_original_peer); + m_vars.m_spoofed_peer = m_vars.m_original_peer; + util::config::write_uint64(network_spoofing_menu::get()->get_submenu_name_stack(), "Peer", 0); + } +} + +void network_spoofing_menu::load() { + set_name("Spoofing"); + set_parent(); + + if (m_vars.m_original_peer == 0xFFFFFFFFFFFFFFFC) { + m_vars.m_original_peer = *(uint64_t*)(global::vars::g_game_address.first + offsets[0][global::vars::g_steam]); // updated + m_vars.m_spoofed_peer = m_vars.m_original_peer; + } + + add_option(submenu_option("Profiles") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Rockstar ID") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("IP Address") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Name") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Crew") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Sync Intervals") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Player Rotation") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Vehicle Rotation") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Movement Animation") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_movement_animation) + .add_tooltip("Stops your player doing a walk/sprint animation")); + + add_option(toggle_option("Rockstar Developer") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rockstar_developer) + .add_tooltip("You NEED to be using Rockstar ID spoofing for this, otherwise you have a chance of getting banned")); + + add_option(button_option("Force Next Session Host") + .add_translate().add_hotkey() + .add_keyboard("Enter the peer to spoof to! (Hint: hash or numeric)", 30, handle_peer_change) + .add_tooltip("Saves to config automatically. NOTE: Changing peer mid session will cause an automatic session change. LOWER = BETTER")); + + add_option(button_option("Revert Next Session Host") + .add_translate().add_hotkey() + .add_click(handle_peer_reset) + .add_tooltip("Reset your peer token to the original, saves to config automatically. NOTE: Resetting peer mid session will cause an automatic session change") + .add_requirement([] { return m_vars.m_spoofed_peer != m_vars.m_original_peer; })); + + add_string("Spoofing"); + add_string("Peer spoof loaded from config, current peer set to"); + + uint64_t peer = util::config::read_uint64(get_submenu_name_stack(), "Peer", 0); + if (peer > 0) { + menu::notify::stacked(get_string("Spoofing"), util::va::va("Peer spoof loaded from config, current peer set to 0x%llx", peer)); + do_peer_spoof(peer); + } +} + +void network_spoofing_menu::update() {} + +void network_spoofing_menu::update_once() { + if (native::does_entity_exist(network::spoofing::rotation::vehicle::vars::m_vars.m_ghost_handle)) { + native::detach_entity(network::spoofing::rotation::vehicle::vars::m_vars.m_ghost_handle, true, false); + native::delete_entity(&network::spoofing::rotation::vehicle::vars::m_vars.m_ghost_handle); + network::spoofing::rotation::vehicle::vars::m_vars.m_ghost_handle = 0; + } +} + +void network_spoofing_menu::feature_update() {} + +network_spoofing_menu* g_instance; +network_spoofing_menu* network_spoofing_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/network_spoofing.h b/GTAV/src/menu/base/submenus/main/network/network_spoofing.h new file mode 100644 index 0000000..51d9fee --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/network_spoofing.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_menu : public menu::submenu::submenu { +public: + static network_spoofing_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::vars { + struct variables { + uint64_t m_original_peer = 0xFFFFFFFFFFFFFFFC; + uint64_t m_spoofed_peer = 0; + bool m_rockstar_developer; + bool m_movement_animation; + }; + + void do_peer_spoof(uint64_t peer, bool no_change = false); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_attackers.cpp b/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_attackers.cpp new file mode 100644 index 0000000..3d929a7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_attackers.cpp @@ -0,0 +1,167 @@ +#include "network_players_abusive_attackers.h" +#include "menu/base/submenu_handler.h" +#include "../network_players_abusive.h" +#include "menu/base/util/control.h" + +using namespace network::players::abusive::attackers::vars; + +namespace network::players::abusive::attackers::vars { + variables m_vars; + + scroll_struct type[] = { + { localization("Military Jets", true), 0 }, + { localization("Military Buzzards", true), 1 }, + }; + + void spawn_attackers(menu::player::player_context& player, bool session = false) { + std::vector entities; + + int type = session ? m_vars.m_attacker_type : player.m_attacker_type; + int count = session ? m_vars.m_attacker_count : player.m_attacker_count; + bool invincibility = session ? m_vars.m_attacker_invincibility : player.m_attacker_invincibility; + bool invisibility = session ? m_vars.m_attacker_invisibility : player.m_attacker_invisibility; + + if (type == 0) { // Military Jets + menu::control::simple_request_model(0xB39B0AE6); // lazer + + for (int i = 0; i < count; i++) { + math::vector3_ spawn_coords = { player.m_coords.x + native::get_random_float_in_range(0.f, 100.f), player.m_coords.y + native::get_random_float_in_range(0.f, 100.f), player.m_coords.z + 100.f + (i * 10.f) }; + + Vehicle vehicle = native::create_vehicle(0xB39B0AE6, spawn_coords.x, spawn_coords.y, spawn_coords.z, player.m_heading, true, true, 0); + if (native::does_entity_exist(vehicle)) { + native::apply_force_to_entity(vehicle, 1, 0.f, 0.f, 50.f, 0.f, 0.f, 0.f, 0, true, true, true, false, true); + + entities.push_back(vehicle); + + Ped ped = native::create_random_ped_as_driver(vehicle, true); + if (native::does_entity_exist(ped)) { + native::task_plane_chase(ped, player.m_ped, 0.f, 0.f, 50.f); + native::task_combat_ped(ped, player.m_ped, 0, 16); + native::set_ped_keep_task(ped, true); + entities.push_back(ped); + } + } + } + } + + if (type == 1) { // Military Buzzards + menu::control::simple_request_model(0x2f03547b); // buzzard + menu::control::simple_request_model(0x613E626C); // mw + + for (int i = 0; i < count; i++) { + math::vector3_ spawn_coords = { player.m_coords.x + native::get_random_float_in_range(0.f, 100.f), player.m_coords.y + native::get_random_float_in_range(0.f, 100.f), player.m_coords.z + 100.f + (i * 10.f) }; + + Vehicle vehicle = native::create_vehicle(0x2f03547b, spawn_coords.x, spawn_coords.y, spawn_coords.z, player.m_heading, true, true, 0); + if (native::does_entity_exist(vehicle)) { + native::apply_force_to_entity(vehicle, 1, 0.f, 0.f, 50.f, 0.f, 0.f, 0.f, 0, true, true, true, false, true); + + entities.push_back(vehicle); + + Ped ped = native::create_random_ped_as_driver(vehicle, true); + if (native::does_entity_exist(ped)) { + entities.push_back(ped); + + native::task_heli_chase(ped, player.m_ped, 0.f, 0.f, 50.f); + native::task_combat_ped(ped, player.m_ped, 0, 16); + native::set_ped_keep_task(ped, true); + + for (int j = 0; j < native::get_vehicle_max_number_of_passengers(vehicle); j++) { + ped = native::create_ped_inside_vehicle(vehicle, 29, 0x613E626C, i, true, false); + if (native::does_entity_exist(ped)) { + entities.push_back(ped); + + native::set_ped_combat_ability(ped, 100); + native::give_delayed_weapon_to_ped(ped, 0x394f415c, 9999, true); + native::task_combat_ped(ped, player.m_ped, 0, 16); + native::set_ped_keep_task(ped, true); + } + } + } + } + } + } + + for (Entity& e : entities) { + native::set_entity_invincible(e, invincibility); + native::set_entity_visible(e, !invisibility, true); + } + } +} + +void network_players_abusive_attackers_menu::load() { + set_name("Attackers"); + set_parent(); + + add_option(scroll_option(SCROLL, "Type") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_attacker_type, 0, NUMOF(type), type) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_attacker_type, 0, NUMOF(type), type); + } else { + option->add_scroll(m_vars.m_attacker_type, 0, NUMOF(type), type); + } + })); + + add_option(toggle_option("Invincibility") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_attacker_invincibility) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_attacker_invincibility); + } else { + option->add_toggle(m_vars.m_attacker_invincibility); + } + })); + + add_option(toggle_option("Invisibility") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_attacker_invisibility) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_attacker_invisibility); + } else { + option->add_toggle(m_vars.m_attacker_invisibility); + } + })); + + add_option(number_option(SCROLL, "Count") + .add_translate() + .add_number(menu::player::get_selected_player().m_attacker_count, "%i", 1).add_min(1).add_max(100) + .add_update([] (number_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_number(menu::player::get_selected_player().m_attacker_count, "%i", 1); + } else { + option->add_number(m_vars.m_attacker_count, "%i", 1); + } + })); + + add_option(button_option("Spawn Attackers") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + spawn_attackers(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + spawn_attackers(player, true); + }); + } + })); +} + +void network_players_abusive_attackers_menu::update() {} + +void network_players_abusive_attackers_menu::update_once() {} + +void network_players_abusive_attackers_menu::feature_update() {} + +network_players_abusive_attackers_menu* g_instance; +network_players_abusive_attackers_menu* network_players_abusive_attackers_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_abusive_attackers_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_attackers.h b/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_attackers.h new file mode 100644 index 0000000..949a9db --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_attackers.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_abusive_attackers_menu : public menu::submenu::submenu { +public: + static network_players_abusive_attackers_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_abusive_attackers_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::abusive::attackers::vars { + struct variables { + int m_attacker_type; + int m_attacker_count = 1; + + bool m_attacker_invincibility = false; + bool m_attacker_invisibility = false; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_explosions.cpp b/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_explosions.cpp new file mode 100644 index 0000000..88352fd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_explosions.cpp @@ -0,0 +1,145 @@ +#include "network_players_abusive_explosions.h" +#include "menu/base/submenu_handler.h" +#include "../network_players_abusive.h" +#include "global/lists.h" +#include "menu/base/util/control.h" + +using namespace network::players::abusive::explosions::vars; + +namespace network::players::abusive::explosions::vars { + variables m_vars; + + scroll_struct particles[21] = { + { localization("Default", true), { "", "", false } }, + }; + + void create_explosion(menu::player::player_context& player, bool session = false) { + int type = session ? m_vars.m_explosion_type : player.m_explosion_type; + int visual = session ? m_vars.m_explosion_visual : player.m_explosion_visual; + float radius = session ? m_vars.m_explosion_radius : player.m_explosion_radius; + float camera_shake = session ? m_vars.m_explosion_camera_shake : player.m_explosion_camera_shake; + bool sound = session ? m_vars.m_explosion_sound : player.m_explosion_sound; + + native::add_explosion(player.m_coords.x, player.m_coords.y, player.m_coords.z, global::lists::g_explosions[type].m_result, radius, sound, visual != 0, camera_shake, false); + + if (visual >= 1) { + scroll_struct particle = particles[visual]; + menu::control::request_particle({ particle.m_result.m_dict, particle.m_result.m_texture }, [=] (std::pair anim) { + native::use_particle_fx_asset_next_call(anim.first); + native::start_particle_fx_non_looped_at_coord2(anim.second, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0.f, 0.f, 0.f, radius, false, false, false); + }); + } + } +} + +void network_players_abusive_explosions_menu::load() { + set_name("Custom Explosions"); + set_parent(); + + for (int i = 1; i < 21; i++) { + particles[i] = global::lists::g_particles[i - 1]; + } + + add_option(scroll_option(SCROLL, "Type") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_explosion_type, 0, NUMOF(global::lists::g_explosions), global::lists::g_explosions) + .add_update([] (scroll_option* option, int type) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_explosion_type, 0, NUMOF(global::lists::g_explosions), global::lists::g_explosions); + } else { + option->add_scroll(m_vars.m_explosion_type, 0, NUMOF(global::lists::g_explosions), global::lists::g_explosions); + } + })); + + add_option(scroll_option(SCROLL, "Visual") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_explosion_visual, 0, NUMOF(particles), particles) + .add_update([] (scroll_option* option, int type) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_explosion_visual, 0, NUMOF(particles), particles); + } else { + option->add_scroll(m_vars.m_explosion_visual, 0, NUMOF(particles), particles); + } + })); + + add_option(number_option(SCROLL, "Radius") + .add_translate() + .add_number(menu::player::get_selected_player().m_explosion_radius, "%.0f", 1.f).add_min(1.f).add_max(20.f).set_scroll_speed(10) + .add_update([] (number_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_number(menu::player::get_selected_player().m_explosion_radius, "%.0f", 1.f); + } else { + option->add_number(m_vars.m_explosion_radius, "%.0f", 1.f); + } + })); + + add_option(number_option(SCROLL, "Camera Shake") + .add_translate() + .add_number(menu::player::get_selected_player().m_explosion_camera_shake, "%.0f", 1.f).add_min(1.f).add_max(100.f).set_scroll_speed(10) + .add_update([] (number_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_number(menu::player::get_selected_player().m_explosion_camera_shake, "%.0f", 1.f); + } else { + option->add_number(m_vars.m_explosion_camera_shake, "%.0f", 1.f); + } + })); + + add_option(toggle_option("Audible") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_explosion_sound) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_explosion_sound); + } else { + option->add_toggle(m_vars.m_explosion_sound); + } + })); + + add_option(button_option("Create Explosion") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + create_explosion(menu::player::get_selected_player(), false); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + create_explosion(player, true); + }); + } + })); + + add_option(toggle_option("Create Explosion Loop") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_explosion_loop) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_explosion_loop); + } else { + option->add_toggle(m_vars.m_explosion_loop); + } + })); +} + +void network_players_abusive_explosions_menu::update() {} + +void network_players_abusive_explosions_menu::update_once() {} + +void network_players_abusive_explosions_menu::feature_update() { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_explosion_loop || m_vars.m_explosion_loop) { + if (!(menu::player::is_excluded(player.m_id) && !player.m_explosion_loop)) { + create_explosion(player, !player.m_explosion_loop); + } + } + }, true); +} + +network_players_abusive_explosions_menu* g_instance; +network_players_abusive_explosions_menu* network_players_abusive_explosions_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_abusive_explosions_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_explosions.h b/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_explosions.h new file mode 100644 index 0000000..c0c8204 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/abusive/network_players_abusive_explosions.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_abusive_explosions_menu : public menu::submenu::submenu { +public: + static network_players_abusive_explosions_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_abusive_explosions_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::abusive::explosions::vars { + struct variables { + int m_explosion_type; + int m_explosion_visual; + + float m_explosion_radius = 2.f; + float m_explosion_camera_shake; + + bool m_explosion_sound = true; + bool m_explosion_loop = false; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/friendly/network_players_friendly_drops.cpp b/GTAV/src/menu/base/submenus/main/network/players/friendly/network_players_friendly_drops.cpp new file mode 100644 index 0000000..1a019ac --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/friendly/network_players_friendly_drops.cpp @@ -0,0 +1,207 @@ +#include "network_players_friendly_drops.h" +#include "menu/base/submenu_handler.h" +#include "../network_players_friendly.h" +#include "global/lists.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/control.h" + +using namespace network::players::friendly::drops::vars; + +namespace network::players::friendly::drops::vars { + variables m_vars; + + scroll_struct drop_type[] = { + { localization("Money", true), 0xE175C698 }, + { localization("RP", true), 0x2C014CA6 }, + }; + + scroll_struct drop_models[] = { + { localization("Money Bag", true), 0x113FD533 }, + { localization("Alien Egg", true), 0x6B795EBC }, + { localization("Weed", true), 0x1AFA6A0A }, + { localization("Beach Fire", true), 0xC079B265 }, + { localization("Xmas Tree", true), 0xE3BA450 }, + { localization("Bear", true), 0x772114C9 }, + { localization("Gold Bar", true), 0xF046EA37 }, + { localization("Guitar", true), 0xA4E7E0A7 }, + { localization("Dildo", true), 0xE6CB661E }, + { localization("Basketball", true), 0x6DB9599A }, + { localization("Bong", true), 0xF0A61994 }, + { localization("C4", true), 0xB4861EB7 }, + { localization("Ammo Box", true), 0x6DE6824F }, + { localization("Toilet", true), 0x6F9939C7 }, + { localization("Wheelchair", true), 0x4B3D240F } + }; + + scroll_struct drop_styles[] = { + { localization("Traditional", true), 0 }, + { localization("Rain", true), 0 }, + { localization("Shower", true), 0 }, + { localization("Bait", true), 0 } + }; + + scroll_struct drop_pickups[] = { + { localization("Armor", true), 0x4BFB42D1 }, + { localization("Health Pack", true), 0x8F707C18 }, + { localization("Repair Kit", true), 0x098D79EF } + }; + + scroll_struct drop_weapons[] = { + { localization("RPG", true), 0x4D36C349 }, + { localization("Minigun", true), 0x2F36B434 }, + { localization("Parachute", true), 0x6773257D }, + { localization("Fire Extinguisher", true), 0xCB13D282 }, + { localization("Flare", true), 0xE013E01C }, + { localization("Flare Gun", true), 0xBD4DE242 }, + { localization("Crowbar", true), 0x872DC888 }, + { localization("Firework", true), 0x22B15640 }, + }; + + void spawn_drop(menu::player::player_context& player, uint32_t model) { + native::create_ambient_pickup(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0, 1, 0, false, true); + } +} + +void network_players_friendly_drops_menu::load() { + set_name("Drops"); + set_parent(); + + add_option(scroll_option(TOGGLE, "Drop Type") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_drop_toggle) + .add_scroll(menu::player::get_selected_player().m_drop_type, 0, NUMOF(drop_type), drop_type) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_drop_toggle); + option->add_scroll(menu::player::get_selected_player().m_drop_type, 0, NUMOF(drop_type), drop_type); + } else { + option->add_toggle(m_vars.m_drop_toggle); + option->add_scroll(m_vars.m_drop_type, 0, NUMOF(drop_type), drop_type); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Drop Pickup") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_drop_pickup, 0, NUMOF(drop_pickups), drop_pickups) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_drop_pickup, 0, NUMOF(drop_pickups), drop_pickups); + } else { + option->add_scroll(m_vars.m_drop_pickup, 0, NUMOF(drop_pickups), drop_pickups); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + spawn_drop(menu::player::get_selected_player(), drop_pickups[menu::player::get_selected_player().m_drop_pickup].m_result); + } else { + spawn_drop(menu::player::get_selected_player(), drop_pickups[m_vars.m_drop_pickup].m_result); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Drop Weapon") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_drop_weapon, 0, NUMOF(drop_weapons), drop_weapons) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_drop_weapon, 0, NUMOF(drop_weapons), drop_weapons); + } else { + option->add_scroll(m_vars.m_drop_weapon, 0, NUMOF(drop_weapons), drop_weapons); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + spawn_drop(menu::player::get_selected_player(), drop_weapons[menu::player::get_selected_player().m_drop_weapon].m_result); + } else { + spawn_drop(menu::player::get_selected_player(), drop_weapons[m_vars.m_drop_weapon].m_result); + } + })); + + add_option(break_option("Settings") + .add_translate()); + + add_option(toggle_option("Stealth") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_drop_stealth) + .add_tooltip("The pickup will only be synced to this player") + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; })); + + add_option(scroll_option(SCROLL, "Style") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_drop_money_style, 0, NUMOF(drop_styles), drop_styles) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_drop_money_style, 0, NUMOF(drop_styles), drop_styles); + } else { + option->add_scroll(m_vars.m_drop_money_style, 0, NUMOF(drop_styles), drop_styles); + } + })); + + add_option(scroll_option(SCROLL, "Delay") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_drop_money_delay, 0, NUMOF(global::lists::g_timers), global::lists::g_timers) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_drop_money_delay, 0, NUMOF(global::lists::g_timers), global::lists::g_timers); + } else { + option->add_scroll(m_vars.m_drop_money_delay, 0, NUMOF(global::lists::g_timers), global::lists::g_timers); + } + }) + .add_tooltip("Leave on 2.5s delay for money drop to prevent error messages")); +} + +void network_players_friendly_drops_menu::update() {} + +void network_players_friendly_drops_menu::update_once() {} + +void network_players_friendly_drops_menu::feature_update() { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_drop_toggle) { + math::vector3 coords; + switch (player.m_drop_money_style) { + case 0: coords = player.m_coords; break; + case 1: coords = native::get_offset_from_entity_in_world_coords(player.m_ped, native::get_random_float_in_range(-3.f, 3.f), native::get_random_float_in_range(-3.f, 3.f), native::get_random_float_in_range(-3.f, 3.f)); break; + case 2: coords = native::get_offset_from_entity_in_world_coords(player.m_ped, 0.f, 0.f, 2.f); break; + case 3: coords = native::get_offset_from_entity_in_world_coords(player.m_ped, 0.f, 2.f, 0.f); break; + } + + menu::timers::run_timed(&player.m_drop_money_timer, global::lists::g_timers[player.m_drop_money_delay].m_result, [=] { + uint32_t model = player.m_drop_type == 0 ? drop_models[player.m_drop_money_model].m_result : joaat("vw_prop_vw_colle_alien"); + menu::control::request_model(model, [=] (uint32_t M) { + native::create_ambient_pickup(drop_type[player.m_drop_type].m_result, coords.x, coords.y, coords.z, 0, player.m_drop_type == 0 ? 2000 : 10, M, false, true); + }); + }); + } + }, true); + + if (m_vars.m_drop_toggle) { + menu::timers::run_timed(&m_vars.m_drop_money_timer, global::lists::g_timers[m_vars.m_drop_money_delay].m_result, [=] { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_drop_toggle) return; + + math::vector3 coords; + switch (m_vars.m_drop_money_style) { + case 0: coords = player.m_coords; break; + case 1: coords = native::get_offset_from_entity_in_world_coords(player.m_ped, native::get_random_float_in_range(-3.f, 3.f), native::get_random_float_in_range(-3.f, 3.f), native::get_random_float_in_range(-3.f, 3.f)); break; + case 2: coords = native::get_offset_from_entity_in_world_coords(player.m_ped, 0.f, 0.f, 2.f); break; + case 3: coords = native::get_offset_from_entity_in_world_coords(player.m_ped, 0.f, 2.f, 0.f); break; + } + + uint32_t model = m_vars.m_drop_type == 0 ? drop_models[m_vars.m_drop_money_model].m_result : joaat("vw_prop_vw_colle_alien"); + menu::control::request_model(model, [=] (uint32_t M) { + native::create_ambient_pickup(drop_type[m_vars.m_drop_type].m_result, coords.x, coords.y, coords.z, 0, m_vars.m_drop_type == 0 ? 2500 : 10, M, false, true); + }); + }); + }); + } +} + +network_players_friendly_drops_menu* g_instance; +network_players_friendly_drops_menu* network_players_friendly_drops_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_friendly_drops_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/friendly/network_players_friendly_drops.h b/GTAV/src/menu/base/submenus/main/network/players/friendly/network_players_friendly_drops.h new file mode 100644 index 0000000..0985501 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/friendly/network_players_friendly_drops.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_friendly_drops_menu : public menu::submenu::submenu { +public: + static network_players_friendly_drops_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_friendly_drops_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::friendly::drops::vars { + struct variables { + bool m_drop_toggle; + int m_drop_type; + int m_drop_pickup; + int m_drop_weapon; + int m_drop_money_model; + int m_drop_money_style; + int m_drop_money_delay = 6; + int m_drop_money_timer; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_abusive.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_abusive.cpp new file mode 100644 index 0000000..737829e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_abusive.cpp @@ -0,0 +1,715 @@ +#include "network_players_abusive.h" +#include "menu/base/submenu_handler.h" +#include "network_players_selected.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/control.h" +#include "menu/base/util/helpers.h" +#include "rage/engine.h" +#include "rage/types/global_types.h" +#include "abusive/network_players_abusive_attackers.h" +#include "abusive/network_players_abusive_explosions.h" +#include "menu/base/submenus/main/network/network_session.h" + +using namespace network::players::abusive::vars; + +namespace network::players::abusive::vars { + variables m_vars; + + scroll_struct cages[] = { + { localization("Trolly", true), 0 }, + { localization("Fence", true), 1 } + }; + + scroll_struct ceos[] = { + { localization("Kick", true), 0 }, + { localization("Ban", true), 1 } + }; + + scroll_struct clone[] = { + { localization("Ambient", true), 0 }, + { localization("Hostile", true), 1 } + }; + + scroll_struct messages[] = { + { localization("Spectating You", true), -649239378 }, // + { localization("Stopped Spectating You", true), -90374608 },// + { localization("Now Spectating", true), -148441291 },// + { localization("$ Banked", true), -989654618 },// + { localization("$ Stolen", true), 220852783 },// + { localization("$ Removed", true), -1857757712 },// + { localization("ATM Stolen", true), -859229584 },// + { localization("Equipped Minigun", true), 88766328 },// + { localization("Killed Gang Member", true), -1049002738 },// + { localization("Registered as President", true), 1149761915 },// + { localization("Registered as CEO", true), 1149761915 },// + { localization("Registered as VIP", true), 1149761915 },// + { localization("Going Psycho", true), 1163167720 },// + { localization("VIP Dismissed", true), -1578431846 }// + }; + + scroll_struct ram_vehicles[] = { + { localization("", false), 0x5A82F9AE }, + { localization("", false), 0x5BA0FF1E }, + { localization("", false), 0x18619B7E }, + { localization("", false), 0x322CF98F }, + { localization("", false), 0xB2E046FB }, + { localization("", false), 0xE83C17 }, + { localization("", false), 0xA29F78B0 }, + { localization("", false), 0x42BC5E19 }, + { localization("", false), 0x1FD824AF }, + { localization("", false), 0x8B213907 }, + { localization("", false), 0x2C1FEA99 }, + { localization("", false), 0xEA6A047F }, + { localization("", false), 0x432AA566 }, + { localization("", false), 0xEB298297 }, + { localization("", false), 0xB44F0582 }, + { localization("", false), 0x9472CD24 }, + { localization("", false), 0x23CA25F2 }, + { localization("", false), 0x619C1B82 }, + { localization("", false), 0xB472D2B5 }, + { localization("", false), 0xC2974024 }, + { localization("", false), 0xd577c962 }, + { localization("", false), 0x2ea68690 }, + { localization("", false), 0xb779a091 }, + }; + + void kick_from_vehicle(menu::player::player_context& player) { + if (player.m_in_vehicle) { + menu::control::request_control(player.m_vehicle, [] (Entity) {}, true); + } + } + + void taze(menu::player::player_context& player) { + menu::control::request_weapon(0x3656c8c1, [=] (uint32_t hash) { + native::shoot_single_bullet_between_coords_ignore_entity(player.m_coords.x, player.m_coords.y, player.m_coords.z + 1.f, player.m_coords.x, player.m_coords.y, player.m_coords.z, 10, 0, hash, menu::player::get_local_player().m_ped, true, false, 100.f, menu::player::get_local_player().m_ped, 0); + }); + } + + void ragdoll(menu::player::player_context& player) { + rage::engine::send_ragdoll_event(player.m_id); + } + + void glitch_physics(menu::player::player_context& player) { + menu::control::request_model(0xd5c0bc07, [=] (uint32_t model) { + Object guitar = native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, true, true, false); + if (native::does_entity_exist(guitar)) { + native::set_entity_visible(guitar, false, false); + native::attach_entity_to_entity(guitar, player.m_ped, native::get_ped_bone_index(player.m_ped, 23553), 0.5f, -0.2f, 0.f, 0.f, 75.0f, 0.f, true, true, false, true, 1, true); + native::set_entity_collision(guitar, true, true); + } + }); + } + + void rain_rockets(menu::player::player_context& player) { + menu::control::request_weapon(0x13579279, [=] (uint32_t model) { + math::vector3 start_position = player.m_coords; + start_position.x += native::get_random_float_in_range(-20.f, 20.f); + start_position.y += native::get_random_float_in_range(-20.f, 20.f); + native::shoot_single_bullet_between_coords_ignore_entity(start_position.x, start_position.y, start_position.z + native::get_random_float_in_range(50.f, 150.f), start_position.x, start_position.y, start_position.z, 250, 0, model, menu::player::get_local_player().m_ped, true, false, 1000.f, menu::player::get_local_player().m_entity, 0); + }); + } + + void give_wanted_level(menu::player::player_context& player, int level) { + native::report_crime(player.m_id, 8, native::get_wanted_level_threshold(level)); + } + + void cage_player(menu::player::player_context& player, int type) { + if (type == 1) { + menu::control::request_model(0x466EB7B8, [=] (uint32_t model) { + math::vector3 min_dimensions; + math::vector3 max_dimensions; + + native::get_model_dimensions(model, &min_dimensions, &max_dimensions); + math::vector3 diameter = max_dimensions - min_dimensions; + + math::vector3 spawn_coords = native::get_offset_from_entity_in_world_coords(player.m_ped, -1.5f, -1.5f, 0.f); + native::get_ground_z_for_3d_coord(spawn_coords.x, spawn_coords.y, spawn_coords.z, &spawn_coords.z, false); + + Object first_object = native::create_object(model, spawn_coords.x, spawn_coords.y, spawn_coords.z, true, true, false); + if (native::does_entity_exist(first_object)) { + float rotation = player.m_heading; + native::set_entity_rotation(first_object, 0.f, 0.f, rotation, 2, false); + native::freeze_entity_position(first_object, true); + + Object next_object = first_object; + for (int i = 0; i < 3; i++) { + rotation += 90.f; + + math::vector3 next = native::get_offset_from_entity_in_world_coords(next_object, diameter.x, 0.f, 0.f); + next_object = native::create_object(model, next.x, next.y, next.z, true, true, false); + if (native::does_entity_exist(next_object)) { + native::set_entity_rotation(next_object, 0.f, 0.f, rotation, 2, false); + native::freeze_entity_position(next_object, true); + } + } + } + }); + } else { + menu::control::request_model(0x7B059043, [=] (uint32_t model) { + Object cage = native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z - 1.f, true, true, false); + native::freeze_entity_position(cage, true); + + cage = native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z + 1.f, true, true, false); + native::freeze_entity_position(cage, true); + native::set_entity_rotation(cage, 0.f, 180.f, 90.f, 0, false); + }); + } + } + + void ceo_ban(menu::player::player_context& player) { + menu::helpers::trigger_script_event({ rage::global::ban_from_ceo, player.m_id, 1 }, 3, player.m_id); + } + + void ceo_kick(menu::player::player_context& player) { + menu::helpers::trigger_script_event({ rage::global::kick_from_ceo, player.m_id, 1, 5 }, 4, player.m_id); + } + + void set_on_fire(menu::player::player_context& player) { + if (!player.m_in_vehicle) { + if (native::get_entity_speed(player.m_ped) > 1.5f) { + math::vector3 fvector = native::get_entity_forward_vector(player.m_ped); + + for (int i = 1; i <= 3; i++) { + math::vector3 coords = player.m_coords + (fvector * (float)i); + native::start_script_fire(coords.x, coords.y, coords.z, 5, true); + } + } else { + native::start_script_fire(player.m_coords.x, player.m_coords.y, player.m_coords.z, 5, true); + } + } + } + + void blame(menu::player::player_context& player) { + menu::player::for_each([=] (menu::player::player_context& p) { + native::add_owned_explosion(player.m_ped, p.m_coords.x, p.m_coords.y, p.m_coords.z, 1, 10.f, true, false, 0.f); + }); + } + + void send_to_island(menu::player::player_context& player) { + menu::helpers::trigger_script_event({ rage::global::island_teleport, player.m_id, 0, 1, 1, }, 5, player.m_id); + } + + void ram(menu::player::player_context& player, int type) { + menu::control::request_model(ram_vehicles[type].m_result, [=] (uint32_t model) { + Vehicle vehicle = native::create_vehicle(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0.f, true, false, 1); + if (native::does_entity_exist(vehicle)) { + native::set_vehicle_out_of_control(vehicle, true, true); + native::set_entity_heading(vehicle, player.m_heading - 90.f); + native::set_vehicle_forward_speed(vehicle, 100.f); + native::set_model_as_no_longer_needed(model); + } + }); + } + + void clone_player(menu::player::player_context& player, int type) { + Ped cloned = native::clone_ped(player.m_ped, player.m_heading, true, true); + if (type == 1 && native::does_entity_exist(cloned)) { + native::give_weapon_to_ped(cloned, 0x7fd62962, 9999, true, true); + native::task_combat_ped(cloned, player.m_ped, 0, 16); + native::set_ped_keep_task(cloned, true); + } + } + + void send_message(menu::player::player_context& player, int type) { + std::vector args = { + rage::global::message_handler, + player.m_id, + messages[type].m_result, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + player.m_id + }; + + switch (type) { + case 9: + args[3] = 1; + break; + + case 10: + args[3] = 100; + break; + + case 11: + args[3] = std::numeric_limits::max(); + break; + } + + menu::helpers::trigger_script_event(args, 14, player.m_id); + } +} + +void network_players_abusive_menu::load() { + set_name("Abusive"); + set_parent(); + + for (scroll_struct& veh : ram_vehicles) { + veh.m_name.set(native::get_label_text(native::get_display_name_from_vehicle_model(veh.m_result))); + } + + add_option(submenu_option("Attackers") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Custom Explosions") + .add_translate() + .add_submenu()); + + add_option(toggle_option("Freeze") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_freeze) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_freeze); + } else { + option->add_toggle(m_vars.m_freeze); + } + })); + + add_option(toggle_option("Explode") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_simple_explode) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_simple_explode); + } else { + option->add_toggle(m_vars.m_simple_explode); + } + })); + + add_option(toggle_option("Kick From Vehicle") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_kick_from_vehicle) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_kick_from_vehicle); + } else { + option->add_toggle(m_vars.m_kick_from_vehicle); + } + }) + .add_tooltip("Interval: 1s")); + + add_option(scroll_option(TOGGLE, "Cage") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_cage_type, 0, NUMOF(cages), cages) + .add_toggle(menu::player::get_selected_player().m_cage) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_cage_type, 0, NUMOF(cages), cages); + option->add_toggle(menu::player::get_selected_player().m_cage); + } else { + option->add_scroll(m_vars.m_cage_type, 0, NUMOF(cages), cages); + option->add_toggle(m_vars.m_cage); + } + }) + .add_tooltip("Interval: 1s. Selected player has priority over session")); + + add_option(scroll_option(TOGGLE, "CEO") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_ceo_type, 0, NUMOF(ceos), ceos) + .add_toggle(menu::player::get_selected_player().m_ceo) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_ceo_type, 0, NUMOF(ceos), ceos); + option->add_toggle(menu::player::get_selected_player().m_ceo); + } else { + option->add_scroll(m_vars.m_ceo_type, 0, NUMOF(ceos), ceos); + option->add_toggle(m_vars.m_ceo); + } + }) + .add_tooltip("Interval: 1s. Selected player has priority over session")); + + add_option(toggle_option("Set On Fire") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_set_on_fire) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_set_on_fire); + } else { + option->add_toggle(m_vars.m_set_on_fire); + } + }) + .add_tooltip("Interval: 5s")); + + add_option(toggle_option("Taze") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_taze) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_taze); + } else { + option->add_toggle(m_vars.m_taze); + } + }) + .add_tooltip("Interval: 5s")); + + add_option(toggle_option("Ragdoll") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_ragdoll) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_ragdoll); + } else { + option->add_toggle(m_vars.m_ragdoll); + } + }) + .add_tooltip("Interval: 1s")); + + add_option(toggle_option("Glitch Physics") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_glitch_physics) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_glitch_physics); + } else { + option->add_toggle(m_vars.m_glitch_physics); + } + }) + .add_tooltip("Interval: 1s")); + + add_option(toggle_option("Forcefield") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_forcefield) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_forcefield); + } else { + option->add_toggle(m_vars.m_forcefield); + } + })); + + add_option(toggle_option("Blame") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_blame) + .add_update([] (toggle_option* option, int pos) { + option->add_toggle(menu::player::get_selected_player().m_blame); + }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; }) + .add_tooltip("Interval: 5s")); + + add_option(toggle_option("Rain Rockets") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_rain_rockets) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_rain_rockets); + } else { + option->add_toggle(m_vars.m_rain_rockets); + } + }) + .add_tooltip("Interval: 750ms")); + + add_option(toggle_option("Send to Island") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_send_to_island) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_send_to_island); + } else { + option->add_toggle(m_vars.m_send_to_island); + } + }) + .add_tooltip("Interval: 5s")); + + add_option(toggle_option("Always Wanted") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_always_wanted) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_always_wanted); + } else { + option->add_toggle(m_vars.m_always_wanted); + } + })); + + add_option(scroll_option(TOGGLE, "Vehicle Ram") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_vehicle_ram_type, 0, NUMOF(ram_vehicles), ram_vehicles) + .add_toggle(menu::player::get_selected_player().m_vehicle_ram) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_vehicle_ram_type, 0, NUMOF(ram_vehicles), ram_vehicles); + option->add_toggle(menu::player::get_selected_player().m_vehicle_ram); + } else { + option->add_scroll(m_vars.m_vehicle_ram_type, 0, NUMOF(ram_vehicles), ram_vehicles); + option->add_toggle(m_vars.m_vehicle_ram); + } + }) + .add_tooltip("Interval: 2.5s. Selected player has priority over session")); + + add_option(scroll_option(TOGGLE, "Clone") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_clone_type, 0, NUMOF(clone), clone) + .add_toggle(menu::player::get_selected_player().m_clone) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_clone_type, 0, NUMOF(clone), clone); + option->add_toggle(menu::player::get_selected_player().m_clone); + } else { + option->add_scroll(m_vars.m_clone_type, 0, NUMOF(clone), clone); + option->add_toggle(m_vars.m_clone); + } + }) + .add_tooltip("Interval: 1s. Selected player has priority over session")); + + add_option(toggle_option("Hostile Peds") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_hostile_peds) + .add_update([] (toggle_option* option, int pos) { + option->add_toggle(menu::player::get_selected_player().m_hostile_peds); + }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; }) + .add_tooltip("You have to be near them for it to take affect")); + + add_option(toggle_option("Hostile Traffic") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_hostile_vehicles) + .add_update([] (toggle_option* option, int pos) { + option->add_toggle(menu::player::get_selected_player().m_hostile_vehicles); + }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; }) + .add_tooltip("You have to be near them for it to take affect")); + + add_option(scroll_option(TOGGLE, "Show Message") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_show_message_type, 0, NUMOF(messages), messages) + .add_toggle(menu::player::get_selected_player().m_show_message) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_show_message_type, 0, NUMOF(messages), messages); + option->add_toggle(menu::player::get_selected_player().m_show_message); + } else { + option->add_scroll(m_vars.m_show_message_type, 0, NUMOF(messages), messages); + option->add_toggle(m_vars.m_show_message); + } + }) + .add_tooltip("Interval: 500ms. Selected player has priority over session")); + + /*add_option(toggle_option("Fake Money Drop") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_fake_money_drop) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_fake_money_drop); + } else { + option->add_toggle(m_vars.m_fake_money_drop); + } + }));*/ +} + +void network_players_abusive_menu::update() {} + +void network_players_abusive_menu::update_once() { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + set_parent(); + } else { + set_parent(); + } +} + +void network_players_abusive_menu::feature_update() { + menu::player::for_each([] (menu::player::player_context& player) { + bool excluded = menu::player::is_excluded(player.m_id); + + if (player.m_freeze || m_vars.m_freeze) { + if (!(excluded && !player.m_freeze)) { + native::clear_ped_tasks_immediately(player.m_ped); + } + } + + if (player.m_simple_explode || m_vars.m_simple_explode) { + if (!(excluded && !player.m_freeze)) { + native::add_explosion(player.m_coords.x, player.m_coords.y, player.m_coords.z, 0, 10.f, true, false, 0.f, false); + } + } + + if (player.m_kick_from_vehicle || m_vars.m_kick_from_vehicle) { + if (!(excluded && !player.m_kick_from_vehicle)) { + menu::timers::run_timed(&player.m_kick_from_vehicle_timer, 1000, [&] { + kick_from_vehicle(player); + }); + } + } + + if (player.m_taze || m_vars.m_taze) { + if (!(excluded && !player.m_taze)) { + menu::timers::run_timed(&player.m_taze_timer, 5000, [&] { + taze(player); + }); + } + } + + if (player.m_ragdoll || m_vars.m_ragdoll) { + if (!(excluded && !player.m_ragdoll)) { + menu::timers::run_timed(&player.m_ragdoll_timer, 1000, [&] { + ragdoll(player); + }); + } + } + + if (player.m_glitch_physics || m_vars.m_glitch_physics) { + if (!(excluded && !player.m_glitch_physics)) { + menu::timers::run_timed(&player.m_glitch_physics_timer, 1000, [&] { + Object guitar = native::get_closest_object_of_type(player.m_coords.x, player.m_coords.y, player.m_coords.z, 5.f, 0xd5c0bc07, false, false, false); + if (!guitar || !native::does_entity_exist(guitar) || !native::is_entity_attached_to_entity(guitar, player.m_ped)) { + glitch_physics(player); + } + }); + } + } + + if (player.m_forcefield || m_vars.m_forcefield) { + if (!(excluded && !player.m_forcefield)) { + native::add_explosion(player.m_coords.x, player.m_coords.y, player.m_coords.z, 29, 100.f, false, true, 0.f, true); + } + } + + if (player.m_rain_rockets || m_vars.m_rain_rockets) { + if (!(excluded && !player.m_rain_rockets)) { + menu::timers::run_timed(&player.m_rain_rockets_timer, 750, [&] { + rain_rockets(player); + }); + } + } + + if (player.m_always_wanted || m_vars.m_always_wanted) { + if (!(excluded && !player.m_always_wanted)) { + give_wanted_level(player, 5); + } + } + + if (player.m_cage || m_vars.m_cage) { + if (!(excluded && !player.m_cage)) { + menu::timers::run_timed(&player.m_glitch_physics_timer, 1000, [&] { + int type = player.m_cage ? player.m_cage_type : m_vars.m_cage_type; + if (type == 1) { + Object fence = native::get_closest_object_of_type(player.m_coords.x, player.m_coords.y, player.m_coords.z, 5.f, 0x466EB7B8, false, false, false); + if (!fence || !native::does_entity_exist(fence)) { + cage_player(player, type); + } + } else { + Object fence = native::get_closest_object_of_type(player.m_coords.x, player.m_coords.y, player.m_coords.z, 5.f, 0x7B059043, false, false, false); + if (!fence || !native::does_entity_exist(fence)) { + cage_player(player, type); + } + } + }); + } + } + + if (player.m_ceo || m_vars.m_ceo) { + if (!(excluded && !player.m_ceo)) { + menu::timers::run_timed(&player.m_ceo_timer, 1000, [&] { + int type = player.m_ceo ? player.m_ceo_type : m_vars.m_ceo_type; + + if (type == 0) { + ceo_kick(player); + } else ceo_ban(player); + }); + } + } + + if (player.m_set_on_fire || m_vars.m_set_on_fire) { + if (!(excluded && !player.m_set_on_fire)) { + menu::timers::run_timed(&player.m_set_on_fire_timer, 5000, [&] { + set_on_fire(player); + }); + } + } + + if (player.m_send_to_island || m_vars.m_send_to_island) { + if (!(excluded && !player.m_send_to_island)) { + menu::timers::run_timed(&player.m_send_to_island_timer, 5000, [&] { + send_to_island(player); + }); + } + } + + if (player.m_vehicle_ram || m_vars.m_vehicle_ram) { + if (!(excluded && !player.m_vehicle_ram)) { + menu::timers::run_timed(&player.m_vehicle_ram_timer, 2500, [&] { + int type = player.m_vehicle_ram ? player.m_vehicle_ram_type : m_vars.m_vehicle_ram_type; + ram(player, type); + }); + } + } + + if (player.m_clone || m_vars.m_clone) { + if (!(excluded && !player.m_clone)) { + menu::timers::run_timed(&player.m_clone_timer, 2500, [&] { + int type = player.m_clone ? player.m_clone_type : m_vars.m_clone_type; + clone_player(player, type); + }); + } + } + + if (player.m_show_message || m_vars.m_show_message) { + if (!(excluded && !player.m_show_message)) { + menu::timers::run_timed(&player.m_show_message_timer, 500, [&] { + int type = player.m_show_message ? player.m_show_message_type : m_vars.m_show_message_type; + send_message(player, type); + }); + } + } + + if (player.m_fake_money_drop || m_vars.m_fake_money_drop) { + if (!(excluded && !player.m_fake_money_drop)) { + menu::timers::run_timed(&player.m_fake_money_drop_timer, 500, [&] { + native::create_ambient_pickup(0x1e9a99f8, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0, 0, 0x113fd533, 0, 1); + }); + } + } + + if (player.m_blame) { + if (!(excluded && !player.m_blame)) { + menu::timers::run_timed(&player.m_blame_timer, 5000, [&] { + blame(player); + }); + } + } + + if (player.m_hostile_peds) { + menu::timers::run_timed(&player.m_hostile_peds_timer, 1000, [=] { + global::vars::g_ped_pool->for_each([=] (Entity ped, void* p) { + if (!native::is_ped_a_player(ped)) { + if (native::get_entity_coords(ped, true).get_distance(player.m_coords) < 100.f) { + native::give_weapon_to_ped(ped, 0x7FD62962, 9999, true, true); + native::task_combat_ped(ped, player.m_ped, 0, 16); + native::set_ped_keep_task(ped, true); + } + } + }); + }); + } + + if (player.m_hostile_vehicles) { + menu::timers::run_timed(&player.m_hostile_vehicles_timer, 1000, [=] { + global::vars::g_vehicle_pool->for_each([=] (Entity veh, void* v) { + if (native::get_entity_coords(veh, true).get_distance(player.m_coords) < 200.f) { + if (!native::is_this_model_a_train(native::get_entity_model(veh))) { + Ped ped = native::get_ped_in_vehicle_seat(veh, -1, 1); + if (native::does_entity_exist(ped)) { + native::task_vehicle_drive_to_coord(ped, veh, player.m_coords.x, player.m_coords.y, player.m_coords.z, 100, 1, native::get_entity_model(veh), 16777216, 4, -1); + } + } + } + }); + }); + } + }, true); +} + +network_players_abusive_menu* g_instance; +network_players_abusive_menu* network_players_abusive_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_abusive_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_abusive.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_abusive.h new file mode 100644 index 0000000..d9ea026 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_abusive.h @@ -0,0 +1,68 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/player_manager.h" + +class network_players_abusive_menu : public menu::submenu::submenu { +public: + static network_players_abusive_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_abusive_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::abusive::vars { + struct variables { + bool m_freeze = false; + bool m_simple_explode = false; + bool m_kick_from_vehicle = false; + bool m_taze = false; + bool m_ragdoll = false; + bool m_glitch_physics = false; + bool m_forcefield = false; + bool m_rain_rockets = false; + bool m_always_wanted = false; + bool m_block_passive = false; + bool m_cage = false; + bool m_ceo = false; + bool m_set_on_fire = false; + bool m_send_to_island = false; + bool m_vehicle_ram = false; + bool m_clone = false; + bool m_show_message = false; + bool m_fake_money_drop = false; + + int m_ceo_type = 0; + int m_cage_type = 0; + int m_vehicle_ram_type = 0; + int m_clone_type = 0; + int m_show_message_type = 0; + }; + + void taze(menu::player::player_context& player); + void kick_from_vehicle(menu::player::player_context& player); + void ragdoll(menu::player::player_context& player); + void glitch_physics(menu::player::player_context& player); + void rain_rockets(menu::player::player_context& player); + void give_wanted_level(menu::player::player_context& player, int level); + void cage_player(menu::player::player_context& player, int type); + void ceo_ban(menu::player::player_context& player); + void ceo_kick(menu::player::player_context& player); + void set_on_fire(menu::player::player_context& player); + void blame(menu::player::player_context& player); + void send_to_island(menu::player::player_context& player); + void ram(menu::player::player_context& player, int type); + void clone_player(menu::player::player_context& player, int type); + void send_message(menu::player::player_context& player, int type); + + extern scroll_struct cages[2]; + extern scroll_struct ceos[2]; + extern scroll_struct clone[2]; + extern scroll_struct messages[14]; + extern scroll_struct ram_vehicles[23]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_commands.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_commands.cpp new file mode 100644 index 0000000..99031a7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_commands.cpp @@ -0,0 +1,485 @@ +#include "network_players_commands.h" +#include "menu/base/submenu_handler.h" +#include "network_players_selected.h" +#include "util/fiber_pool.h" +#include "network_players_text.h" +#include "network_players_friendly.h" +#include "menu/base/util/control.h" +#include "menu/base/submenus/main/vehicle.h" +#include "menu/base/submenus/main/network/network_session.h" +#include "menu/base/submenus/main/network/players/network_players_abusive.h" +#include "menu/base/submenus/main/network/players/network_players_trolling.h" +#include "menu/base/submenus/main/network/players/network_players_vehicle.h" +#include "menu/base/submenus/main/network/players/network_players_removals.h" +#include "rage/engine.h" +#include "global/lists.h" + +using namespace network::players::commands::vars; + +static localization t_processed_command("Processed command", true, true); +static localization t_from("from", true, true); + +namespace network::players::commands::vars { + variables m_vars; + + struct command_context { + const char* m_command; + const char* m_tooltip; + std::function)> m_callback; + }; + + auto default_callback = [] (menu::player::player_context&, std::vector) {}; + + scroll_struct commands[] = { + { localization("Give Weapons", true), { "weapons", "Gives them all weapons", default_callback } }, + { localization("Vehicle Kick", true), { "vkick", "Kicks a player from their vehicle", default_callback } }, + { localization("Fix Vehicle", true), { "vfix", "Fixes their vehicle", default_callback } }, + { localization("Upgrade Vehicle", true), { "vupgrade", "Upgrades their vehicle", default_callback } }, + { localization("Clone Vehicle", true), { "vclone", "Clones their vehicle", default_callback } }, + { localization("Boost Vehicle", true), { "vboost", "Boosts their vehicle", default_callback } }, + { localization("Spawn Entity", true), { "spawn", "Spawns an entity (check the sites list)", default_callback } }, + { localization("Spawn Bodyguard", true), { "guard", "Spawns a bodyguard", default_callback } }, + { localization("Off the Radar", true), { "otr", "Gives them off the radar", default_callback } }, + { localization("Remove Wanted Level", true), { "nocops", "Removes their wanted level", default_callback } }, + { localization("Kick Player", true), { "kick", "Kicks a player", default_callback } }, + { localization("Explode Player", true), { "explode", "Explodes a player", default_callback } }, + { localization("Ban Player from CEO", true), { "ceoban", "Bans a player from their CEO", default_callback } }, + { localization("Kick Player from CEO", true), { "ceokick", "Kicks a player from their CEO", default_callback } }, + { localization("Cage Player", true), { "cage", "Cages a player", default_callback } }, + { localization("Taze Player", true), { "taze", "Tazes a player", default_callback } }, + { localization("Ragdoll Player", true), { "ragdoll", "Ragdolls a player", default_callback } }, + { localization("Glitch Player Physics", true), { "glitch", "Glitches a players physics", default_callback } }, + { localization("Clone Player", true), { "clone", "Clones a player", default_callback } }, + { localization("Blackscreen Player", true), { "blackscreen", "Blackscreens a player", default_callback } }, + { localization("Crash Player", true), { "crash", "Crashes a player", default_callback } }, + { localization("Teleport Vehicle", true), { "tp", "Teleports their vehicle somewhere", default_callback } }, + { localization("Give Weapon Attachments", true), { "attachments", "Gives them all weapon attachments", default_callback } } + }; + + Player get_player(std::string name) { + Player id = -1; + + if (!menu::player::get_local_player().m_name.compare(name)) { + return id; + } + + menu::player::for_each([&] (menu::player::player_context& player) { + if (!player.m_name.compare(name)) { + id = player.m_id; + } + }, true, true); + + return id; + } + + void call_command(const char* command_name, rage::network::net_game_player* player, std::vector tokens) { + menu::player::player_context& player_var = menu::player::get_player(player->m_id); + + if (player_var.m_chat_commands || m_vars.m_chat_commands) { + for (int i = 0; i < NUMOF(commands); i++) { + scroll_struct command = commands[i]; + + if (!strcmp(command.m_result.m_command, command_name)) { + if (player_var.m_chat_command[i] || (m_vars.m_chat_commands && m_vars.m_chat_command[i])) { + util::fiber::pool::add([=] { + command.m_result.m_callback(menu::player::get_player(player->m_id), tokens); + }); + + menu::notify::stacked(network_players_commands_menu::get()->get_name().get(), util::va::va("%s \"%s\" %s %s", TRANSLATE(t_processed_command), command_name, TRANSLATE(t_from), player_var.m_name.c_str())); + } + + break; + } + } + } + } +} + +void network_players_commands_menu::load() { + set_name("Chat commands"); + set_parent(); + + for (scroll_struct& command : commands) { + add_string(command.m_result.m_tooltip); + } + + // Give Weapons + commands[0].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + network::players::friendly::vars::give_all_weapons(player); + }; + + // Vehicle Kick + commands[1].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + if (p.m_in_vehicle) { + network::players::abusive::vars::kick_from_vehicle(p); + } + } + } + }; + + // Fix Vehicle + commands[2].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (player.m_in_vehicle) { + menu::control::request_control(player.m_vehicle, [] (Entity vehicle) { + native::set_vehicle_fixed(vehicle); + }); + } + }; + + // Upgrade Vehicle + commands[3].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (player.m_in_vehicle) { + menu::control::request_control(player.m_vehicle, [] (Entity vehicle) { + vehicle::vars::max_upgrades(vehicle); + }); + } + }; + + // Vehicle Clone + commands[4].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + if (p.m_in_vehicle) { + vehicle::vars::run_task(p.m_vehicle, [] (Vehicle veh) { + vehicle::vars::clone_vehicle(veh); + }); + } + } + } + }; + + // Vehicle Boost + commands[5].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [=] (Vehicle veh) { + int speed = std::atoi(tokens[1].c_str()); + native::set_vehicle_forward_speed(veh, speed > 0 ? speed + native::get_entity_speed(veh) : speed); + }); + } + } + }; + + // Spawn Entity + commands[6].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 3) { + auto spawn_vehicle = [=] (uint32_t hash) { + menu::control::request_model(hash, [=] (uint32_t model) { + Vehicle veh = native::create_vehicle(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, player.m_heading, true, true, 0); + if (native::does_entity_exist(veh)) { + native::decor_set_int(veh, "MPBitset", (1 << 10)); + native::set_vehicle_is_stolen(veh, false); + } + }); + }; + + auto spawn_object = [=] (uint32_t hash) { + menu::control::request_model(hash, [=] (uint32_t model) { + native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, true, true, false); + }); + }; + + auto spawn_ped = [=] (uint32_t hash) { + switch (hash) { + case 0x3F039CBA: + case 0x856CFB02: + case 0x2D7030F3: + case 0x0703F106: + case 0x431d501c: + case 0x1CFC0E72: + case 0x1E15B3EC: + case 0x1CB5C0C3: + return; + } + + menu::control::request_model(hash, [=] (uint32_t model) { + native::create_ped(13, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, player.m_heading, true, false); + }); + }; + + std::string string_name = tokens.at(2); + switch (native::get_hash_key(tokens.at(1).c_str())) { + case 0xdd245b9c: // vehicle + if (string_name[0] == '0' && (string_name[1] == 'x' || string_name[1] == 'X')) { + // hash + spawn_vehicle((uint32_t)_strtoui64(string_name.c_str(), 0, 0)); + } else { + if (std::find_if(string_name.begin(), string_name.end(), [] (unsigned char c) { return !std::isdigit(c); }) == string_name.end()) { + // numeric + spawn_vehicle((uint32_t)atoi(string_name.c_str())); + } else { + // name + spawn_vehicle(native::get_hash_key(string_name.c_str())); + } + } + + break; + + case 0x34d90761: // ped + if (string_name[0] == '0' && (string_name[1] == 'x' || string_name[1] == 'X')) { + // hash + spawn_ped((uint32_t)_strtoui64(string_name.c_str(), 0, 0)); + } else { + if (std::find_if(string_name.begin(), string_name.end(), [] (unsigned char c) { return !std::isdigit(c); }) == string_name.end()) { + // numeric + spawn_ped((uint32_t)atoi(string_name.c_str())); + } else { + // name + spawn_ped(native::get_hash_key(string_name.c_str())); + } + } + + break; + + case 0x39958261: // object + if (string_name[0] == '0' && (string_name[1] == 'x' || string_name[1] == 'X')) { + // hash + spawn_object((uint32_t)_strtoui64(string_name.c_str(), 0, 0)); + } else { + if (std::find_if(string_name.begin(), string_name.end(), [] (unsigned char c) { return !std::isdigit(c); }) == string_name.end()) { + // numeric + spawn_object((uint32_t)atoi(string_name.c_str())); + } else { + // name + spawn_object(native::get_hash_key(string_name.c_str())); + } + } + + break; + } + } + }; + + // Spawn Bodyguard + commands[7].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + network::players::friendly::vars::spawn_bodyguards(player, 1); + }; + + // Off the Radar + commands[8].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + network::players::friendly::vars::off_the_radar(player); + }; + + // Remove Wanted Level + commands[9].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + network::players::friendly::vars::disable_police(player); + }; + + // Kick Player + commands[10].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + if (p.m_in_vehicle) { + if (menu::player::get_local_player().m_is_script_host) { + network::players::removals::vars::script_host_kick(p); + } + + if (rage::engine::get_host_net_game_player() == menu::player::get_local_player().m_net_player) { + network::players::removals::vars::session_host_kick(p); + } else { + if (rage::engine::get_host_net_game_player() != p.m_net_player) { + network::players::removals::vars::break_freemode_kick(p); + } + } + } + } + } + }; + + // Explode Player + commands[11].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + native::add_explosion(p.m_coords.x, p.m_coords.y, p.m_coords.z, 0, 100.f, false, true, 0.f, false); + } + } + }; + + // Ban Player from CEO + commands[12].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + network::players::abusive::vars::ceo_ban(p); + } + } + }; + + // Kick Player from CEO + commands[13].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + network::players::abusive::vars::ceo_kick(p); + } + } + }; + + // Cage Player + commands[14].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + network::players::abusive::vars::cage_player(p, 0); + } + } + }; + + // Taze Player + commands[15].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + network::players::abusive::vars::taze(p); + } + } + }; + + // Ragdoll Player + commands[16].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + network::players::abusive::vars::ragdoll(p); + } + } + }; + + // Glitch Player Physics + commands[17].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + network::players::abusive::vars::glitch_physics(p); + } + } + }; + + // Clone Player + commands[18].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + network::players::abusive::vars::clone_player(p, 1); + } + } + }; + + // Blackscreen Player + commands[19].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + network::players::trolling::vars::black_screen(p); + } + } + }; + + // Crash Player + commands[20].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + Player target = get_player(tokens[1]); + if (target != -1) { + menu::player::player_context& p = menu::player::get_player(target); + network::players::removals::vars::crash(p); + } + } + }; + + // Teleport Vehicle + commands[21].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + if (tokens.size() == 2) { + int id = std::atoi(tokens[1].c_str()); + if (id < 0 || id >= NUMOF(global::lists::g_popular_locations)) return; + + if (player.m_in_vehicle) { + math::vector3 coords = global::lists::g_popular_locations[id].m_result; + vehicle::vars::run_task(player.m_vehicle, [=] (Vehicle veh) { + native::set_entity_coords(veh, coords.x, coords.y, coords.z, false, false, false, false); + }); + } + } + }; + + // Give Weapon Attachments + commands[22].m_result.m_callback = [] (menu::player::player_context& player, std::vector tokens) { + network::players::friendly::vars::give_all_attachments(player); + }; + + add_option(toggle_option("Toggle Chat Commands") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_chat_commands) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_chat_commands); + } else { + option->add_toggle(m_vars.m_chat_commands); + } + })); + + add_option(button_option("Send Command List") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::text::vars::send_text_message(menu::player::get_selected_player(), menu::player::random(menu::player::get_selected_player().m_id), "Go to ozark.gg/chat to view the commands given to you!"); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::text::vars::send_text_message(player, menu::player::random(player.m_id), "Go to ozark.gg/chat to view the commands given to you!"); + }); + } + })); + + add_option(break_option("Commands") + .add_translate()); +} + +void network_players_commands_menu::update() {} + +void network_players_commands_menu::update_once() { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + set_parent(); + } else { + set_parent(); + } + + clear_options(3); + + for (int i = 0; i < NUMOF(commands); i++) { + scroll_struct command = commands[i]; + + add_option(toggle_option(command.m_name.get()) + .add_toggle(global::vars::g_network_menu_type == SELECTED_PLAYER ? menu::player::get_selected_player().m_chat_command[i] : m_vars.m_chat_command[i]) + .add_tooltip(std::string("?") + command.m_result.m_command + std::string(" - ") + get_string(command.m_result.m_tooltip))); + } +} + +void network_players_commands_menu::feature_update() {} + +network_players_commands_menu* g_instance; +network_players_commands_menu* network_players_commands_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_commands_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_commands.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_commands.h new file mode 100644 index 0000000..e91033a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_commands.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" +#include "rage/types/network_types.h" +#include +#include + +class network_players_commands_menu : public menu::submenu::submenu { +public: + static network_players_commands_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_commands_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::commands::vars { + struct variables { + bool m_chat_commands; + std::unordered_map m_chat_command; + }; + + void call_command(const char* command_name, rage::network::net_game_player* player, std::vector tokens); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_friendly.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_friendly.cpp new file mode 100644 index 0000000..5cb208b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_friendly.cpp @@ -0,0 +1,340 @@ +#include "network_players_friendly.h" +#include "menu/base/submenu_handler.h" +#include "network_players_selected.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/helpers.h" +#include "rage/types/global_types.h" +#include "menu/base/util/global.h" +#include "rage/engine.h" +#include "menu/base/submenus/main/player/wardrobe_save_load.h" +#include "menu/base/submenus/main/player/wardrobe.h" +#include "global/lists.h" +#include "menu/base/submenus/main/weapon/give/give_weapon.h" +#include "util/fiber_pool.h" +#include "util/fiber.h" +#include "friendly/network_players_friendly_drops.h" +#include "menu/base/submenus/main/network/network_session.h" + +using namespace network::players::friendly::vars; + +namespace network::players::friendly::vars { + variables m_vars; + + scroll_struct commends[] = { + { localization("Friendly", true), 0xDAFB10F9 }, + { localization("Helpful", true), 0x893E1390 } + }; + + scroll_struct outfit[] = { + { localization("Copy Outfit", true), 0 }, + { localization("Save Outfit", true), 0 } + }; + + void off_the_radar(menu::player::player_context& player) { + std::vector list = { + rage::global::give_off_the_radar, + player.m_id, + native::get_network_time(), + native::get_network_time() + 60000, + 1, // has start + 1, // has end + menu::script_global(rage::global::_155_give_off_the_radar_global).at(player.m_id, rage::global::_155_give_off_the_radar_global_size).at(rage::global::_155_give_off_the_radar_global_index).as() + }; + + menu::helpers::trigger_script_event(list, 7, player.m_id); + } + + void disable_police(menu::player::player_context& player) { + std::vector list = { + rage::global::remove_wanted_level, + player.m_id, + menu::script_global(rage::global::_155_give_off_the_radar_global).at(player.m_id, rage::global::_155_give_off_the_radar_global_size).at(rage::global::_155_give_off_the_radar_global_index).as() + }; + + menu::helpers::trigger_script_event(list, 3, player.m_id); + } + + void spawn_bodyguards(menu::player::player_context& player, int count) { + for (int i = 0; i < count; i++) { + Ped ped = native::clone_ped(player.m_ped, player.m_heading, true, false); + if (native::does_entity_exist(ped)) { + native::give_weapon_to_ped(ped, 0x1b06d571, -1, false, true); + native::set_ped_as_group_member(ped, native::get_player_group(player.m_id)); + } + } + } + + void commend(menu::player::player_context& player, int id) { + if (!player.m_net_player) return; + rage::engine::send_increment_stat_event(commends[id].m_result, 16, player.m_net_player); + } + + void parachute(menu::player::player_context& player) { + math::vector3 rotation = native::get_entity_rotation(player.m_ped, 0); + math::vector3 coords = player.m_coords; + + native::set_entity_coords(menu::player::get_local_player().m_ped, coords.x + 10.0f, coords.y + 10.0f, coords.z + 24.0f, true, false, false, false); + native::set_entity_rotation(menu::player::get_local_player().m_ped, rotation.x, rotation.y, rotation.z, 0, true); + native::task_parachute_to_target(menu::player::get_local_player().m_ped, coords.x, coords.y, coords.z); + } + + void give_all_weapons(menu::player::player_context& player) { + util::fiber::pool::add([=] { + for (scroll_struct weapon : global::lists::g_weapons) { + weapon::give::vars::give_weapon(player.m_ped, weapon.m_result, false, false); + util::fiber::sleep(10); + } + }); + } + + void give_all_attachments(menu::player::player_context& player) { + util::fiber::pool::add([=] { + for (scroll_struct weapon : global::lists::g_weapons) { + weapon::give::vars::upgrade_weapon_components(player.m_ped, weapon.m_result); + util::fiber::sleep(10); + } + }); + } +} + +void network_players_friendly_menu::load() { + set_name("Friendly"); + set_parent(); + + add_option(submenu_option("Drops") + .add_translate() + .add_submenu()); + + add_option(toggle_option("Demi Godmode") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_demi_godmode) + .add_update([](toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_demi_godmode); + } else { + option->add_toggle(m_vars.m_demi_godmode); + } + })); + + add_option(toggle_option("Off the Radar") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_off_the_radar) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_off_the_radar); + } else { + option->add_toggle(m_vars.m_off_the_radar); + } + })); + + add_option(toggle_option("Disable Police") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_disable_police) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_disable_police); + } else { + option->add_toggle(m_vars.m_disable_police); + } + })); + + add_option(toggle_option("Kill Killers") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_kill_killers) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_kill_killers); + } else { + option->add_toggle(m_vars.m_kill_killers); + } + })); + + add_option(toggle_option("Force Visible") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_force_visible) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_force_visible); + } else { + option->add_toggle(m_vars.m_force_visible); + } + })); + + add_option(number_option(SCROLLSELECT, "Spawn Bodyguard(s)") + .add_translate() + .add_number(menu::player::get_selected_player().m_bodyguard_count, "%i", 1).add_min(1).add_max(20) + .add_update([] (number_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_number(menu::player::get_selected_player().m_bodyguard_count, "%i", 1); + } else { + option->add_number(m_vars.m_bodyguard_count, "%i", 1); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + spawn_bodyguards(menu::player::get_selected_player(), menu::player::get_selected_player().m_bodyguard_count); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + spawn_bodyguards(player, m_vars.m_bodyguard_count); + }); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Commend") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_commend, 0, NUMOF(commends), commends) + .add_update([](scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_commend, 0, NUMOF(commends), commends); + } else { + option->add_scroll(m_vars.m_commend, 0, NUMOF(commends), commends); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + commend(menu::player::get_selected_player(), menu::player::get_selected_player().m_commend); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + commend(player, m_vars.m_commend); + }); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Outfit") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_outfit, 0, NUMOF(outfit), outfit) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_outfit, 0, NUMOF(outfit), outfit); + } else { + option->add_scroll(m_vars.m_outfit, 1, NUMOF(outfit), outfit); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_outfit == 0) { + native::clear_all_ped_props(menu::player::get_local_player().m_ped); + + for (scroll_struct>>& component : player::wardrobe::vars::components) { + native::set_ped_component_variation(menu::player::get_local_player().m_ped, component.m_result.first, native::get_ped_drawable_variation(menu::player::get_selected_player().m_ped, component.m_result.first), native::get_ped_texture_variation(menu::player::get_selected_player().m_ped, component.m_result.first), 0); + } + + for (scroll_struct>>& prop : player::wardrobe::vars::accessories) { + native::set_ped_prop_index(menu::player::get_local_player().m_ped, prop.m_result.first, native::get_ped_prop_index(menu::player::get_selected_player().m_ped, prop.m_result.first), native::get_ped_prop_texture_index(menu::player::get_selected_player().m_ped, prop.m_result.first), true); + } + } else { + player::wardrobe::saveload::vars::save_outfit(menu::player::get_selected_player().m_name.c_str(), menu::player::get_selected_player()); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + player::wardrobe::saveload::vars::save_outfit(player.m_name.c_str(), player); + }); + } + })); + + add_option(button_option("Parachute to Player") + .add_translate() + .add_click([] { parachute(menu::player::get_selected_player()); }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; })); + + add_option(button_option("Give All Weapons") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + give_all_weapons(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + give_all_weapons(player); + }); + } + })); + + add_option(button_option("Give All Attachments") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + give_all_attachments(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + give_all_attachments(player); + }); + } + })); +} + +void network_players_friendly_menu::update() {} + +void network_players_friendly_menu::update_once() { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + set_parent(); + } else { + set_parent(); + } +} + +void network_players_friendly_menu::feature_update() { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_demi_godmode || m_vars.m_demi_godmode) { + if (!player.m_in_vehicle && player.m_alive) { + menu::timers::run_timed(&player.m_demi_godmode_timer, 250, [=] { + int armor = native::get_ped_armour(player.m_ped); + int armor_max = native::get_player_max_armour(player.m_id); + int health = native::get_entity_health(player.m_ped); + int health_max = native::get_entity_max_health(player.m_ped); + + if (armor < armor_max) { + native::create_ambient_pickup(0x4bfb42d1, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0, armor_max - armor, 0xe6cb661e, false, true); + } + + if (health < health_max) { + native::create_ambient_pickup(0x8f707c18, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0, health_max - health, 0xe6cb661e, false, true); + } + }); + } + } + + if (player.m_off_the_radar || m_vars.m_off_the_radar) { + menu::timers::run_timed(&player.m_off_the_radar_timer, 1000, [&] { + off_the_radar(player); + }); + } + + if (player.m_disable_police || m_vars.m_disable_police) { + menu::timers::run_timed(&player.m_disable_police_timer, 500, [&] { + disable_police(player); + }); + } + + if (player.m_kill_killers || m_vars.m_kill_killers) { + if (!player.m_alive) { + Entity killer = native::get_ped_source_of_death(player.m_ped); + if (killer) { + if (native::is_ped_a_player(killer)) { + if (!native::is_entity_dead(killer, 1)) { + math::vector3 coords = native::get_entity_coords(killer, true); + native::add_explosion(coords.x, coords.y, coords.z, 1, 100.f, true, false, 0.f, false); + } + } + } + } + } + + if (player.m_force_visible) { + if (!native::is_entity_visible(player.m_entity)) { + native::set_entity_locally_visible(player.m_entity); + native::set_entity_visible(player.m_entity, true, true); + } + } + }); +} + +network_players_friendly_menu* g_instance; +network_players_friendly_menu* network_players_friendly_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_friendly_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_friendly.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_friendly.h new file mode 100644 index 0000000..5d3fa05 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_friendly.h @@ -0,0 +1,40 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/player_manager.h" + +class network_players_friendly_menu : public menu::submenu::submenu { +public: + static network_players_friendly_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_friendly_menu() + : menu::submenu::submenu() + {} +}; + +namespace network::players::friendly::vars { + struct variables { + bool m_demi_godmode; + bool m_off_the_radar; + bool m_disable_police; + bool m_kill_killers; + bool m_force_visible; + + int m_bodyguard_count = 1; + int m_commend; + int m_outfit; + }; + + void off_the_radar(menu::player::player_context& player); + void disable_police(menu::player::player_context& player); + void spawn_bodyguards(menu::player::player_context& player, int count); + void commend(menu::player::player_context& player, int id); + void parachute(menu::player::player_context& player); + void give_all_weapons(menu::player::player_context& player); + void give_all_attachments(menu::player::player_context& player); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_removals.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_removals.cpp new file mode 100644 index 0000000..5926885 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_removals.cpp @@ -0,0 +1,281 @@ +#include "network_players_removals.h" +#include "menu/base/submenu_handler.h" +#include "network_players_selected.h" +#include "util/fiber_pool.h" +#include "util/fiber.h" +#include "util/log.h" +#include "menu/base/submenus/main/network/network_host_toolkit.h" +#include "menu/base/util/global.h" +#include "menu/base/util/control.h" +#include "menu/base/util/helpers.h" +#include "rage/types/global_types.h" +#include "rage/engine.h" +#include "menu/base/submenus/main/network/network_session.h" +#include "global/lists.h" + +using namespace network::players::removals::vars; + +namespace network::players::removals::vars { + variables m_vars; + + void script_host_kick(menu::player::player_context& player, bool everyone) { + if (network::htoolkit::vars::force_host_of_script("freemode")) { + if (everyone) { + menu::player::for_each([] (menu::player::player_context& p) { + menu::script_global(rage::global::host_drop_kick + p.m_id + 1).as() = 1; + }); + } else { + menu::script_global(rage::global::host_drop_kick + player.m_id + 1).as() = 1; + } + } + } + + void session_host_kick(menu::player::player_context& player, bool everyone) { + if (rage::engine::get_host_net_game_player() == menu::player::get_local_player().m_net_player) { + if (everyone) { + menu::player::for_each([] (menu::player::player_context& p) { + native::network_session_kick_player(p.m_id); + }); + } else { + if (player.m_net_player != menu::player::get_local_player().m_net_player) { + native::network_session_kick_player(player.m_id); + } + } + } else { + menu::notify::stacked(network_players_removals_menu::get()->get_name().get(), network_players_removals_menu::get()->get_string("You need to be host to use this kick")); + } + } + + void break_freemode_kick(menu::player::player_context& player, bool everyone) { + if (everyone) { + menu::player::for_each([] (menu::player::player_context& p) { + if (rage::engine::get_host_net_game_player() != p.m_net_player) { + menu::helpers::trigger_script_event({ -966559987, 18707275, 55963135, 20806885, 56512451, -21520996 }, 6, p.m_id); + menu::helpers::trigger_script_event({ -1054826273, -33111572, -28521729, -7891846 }, 4, p.m_id); + menu::helpers::trigger_script_event({ -1729804184, 31689453, 91436768, 9588623, -50805664, -10510254 }, 6, p.m_id); + } + }); + } else { + if (rage::engine::get_host_net_game_player() == player.m_net_player) { + menu::notify::stacked(network_players_removals_menu::get()->get_name().get(), network_players_removals_menu::get()->get_string("You can't use this kick on the host")); + } else { + menu::helpers::trigger_script_event({ -966559987, 18707275, 55963135, 20806885, 56512451, -21520996 }, 6, player.m_id); + menu::helpers::trigger_script_event({ -1054826273, -33111572, -28521729, -7891846 }, 4, player.m_id); + menu::helpers::trigger_script_event({ -1729804184, 31689453, 91436768, 9588623, -50805664, -10510254 }, 6, player.m_id); + } + } + } + + void spawn_entities(menu::player::player_context& player, bool everyone) { + menu::control::request_model(global::lists::g_ped_model_popular[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_ped_model_popular) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_ped(21, model, every.m_coords.x, every.m_coords.y, every.m_coords.z, 0.f, true, false); + }); + + return; + } + + native::create_ped(21, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0.f, true, false); + }); + + menu::control::request_model(global::lists::g_ped_model_story[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_ped_model_story) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_ped(21, model, every.m_coords.x, every.m_coords.y, every.m_coords.z, 0.f, true, false); + }); + + return; + } + + native::create_ped(21, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0.f, true, false); + }); + + menu::control::request_model(global::lists::g_ped_model_animal[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_ped_model_animal) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_ped(21, model, every.m_coords.x, every.m_coords.y, every.m_coords.z, 0.f, true, false); + }); + + return; + } + + native::create_ped(21, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0.f, true, false); + }); + + menu::control::request_model(global::lists::g_ped_model_emergency[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_ped_model_emergency) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_ped(21, model, every.m_coords.x, every.m_coords.y, every.m_coords.z, 0.f, true, false); + }); + + return; + } + + native::create_ped(21, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0.f, true, false); + }); + + menu::control::request_model(global::lists::g_ped_model_role[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_ped_model_role) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_ped(21, model, every.m_coords.x, every.m_coords.y, every.m_coords.z, 0.f, true, false); + }); + + return; + } + + native::create_ped(21, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0.f, true, false); + }); + + menu::control::request_model(global::lists::g_ped_model_ambient[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_ped_model_ambient) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_ped(21, model, every.m_coords.x, every.m_coords.y, every.m_coords.z, 0.f, true, false); + }); + + return; + } + + native::create_ped(21, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0.f, true, false); + }); + + menu::control::request_model(global::lists::g_ped_model_misc[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_ped_model_misc) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_ped(21, model, every.m_coords.x, every.m_coords.y, every.m_coords.z, 0.f, true, false); + }); + + return; + } + + native::create_ped(21, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, 0.f, true, false); + }); + + menu::control::request_model(global::lists::g_object_model_small[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_object_model_small) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_object(model, every.m_coords.x, every.m_coords.y, every.m_coords.z, true, true, false); + }); + + return; + } + + native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, true, true, false); + }); + + menu::control::request_model(global::lists::g_object_model_medium[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_object_model_medium) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_object(model, every.m_coords.x, every.m_coords.y, every.m_coords.z, true, true, false); + }); + + return; + } + + native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, true, true, false); + }); + + menu::control::request_model(global::lists::g_object_model_large[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_object_model_large) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_object(model, every.m_coords.x, every.m_coords.y, every.m_coords.z, true, true, false); + }); + + return; + } + + native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, true, true, false); + }); + + menu::control::request_model(global::lists::g_object_model_flags[native::network_get_random_int_in_range(0, NUMOF(global::lists::g_object_model_flags) - 1)].m_result, [=] (uint32_t model) { + if (everyone) { + menu::player::for_each([=] (menu::player::player_context& every) { + native::create_object(model, every.m_coords.x, every.m_coords.y, every.m_coords.z, true, true, false); + }); + + return; + } + + native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, true, true, false); + }); + } + + void crash(menu::player::player_context& player, bool everyone) { + m_vars.m_crash_type = 2; + + if (is_valid_ptr(player.m_net_player) && is_valid_ptr(player.m_net_player->m_player_info)) { + if (everyone) { + m_vars.m_session_crash = true; + m_vars.m_session_crash_timeout = GetTickCount() + 5000; + } else { + m_vars.m_targeted_crash = true; + m_vars.m_targeted_crash_target_id = player.m_id; + m_vars.m_targeted_crash_target = player.m_net_player->m_player_info->m_identifier.m_rockstar_id; + m_vars.m_targeted_crash_timeout = GetTickCount() + 10000; + } + + spawn_entities(player, everyone); + } + } +} + +void network_players_removals_menu::load() { + set_name("Removals"); + set_parent(); + + add_string("You need to be host to use this kick"); + add_string("You can't use this kick on the host"); + + add_option(button_option("Script Host Kick") + .add_translate() + .add_click([] { script_host_kick(menu::player::get_selected_player(), global::vars::g_network_menu_type != SELECTED_PLAYER); })); + + add_option(button_option("Session Host Kick") + .add_translate() + .add_click([] { session_host_kick(menu::player::get_selected_player(), global::vars::g_network_menu_type != SELECTED_PLAYER); })); + + add_option(button_option("Break Freemode Kick") + .add_translate() + .add_click([] { break_freemode_kick(menu::player::get_selected_player(), global::vars::g_network_menu_type != SELECTED_PLAYER); })); + + add_option(button_option("Crash") + .add_translate() + .add_click([] { crash(menu::player::get_selected_player(), global::vars::g_network_menu_type != SELECTED_PLAYER); })); +} + +void network_players_removals_menu::update() {} + +void network_players_removals_menu::update_once() { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + set_parent(); + } else { + set_parent(); + } +} + +void network_players_removals_menu::feature_update() { + if (m_vars.m_session_crash) { + if (GetTickCount() > m_vars.m_session_crash_timeout) { + m_vars.m_session_crash = false; + } + } + + if (m_vars.m_targeted_crash) { + if (GetTickCount() > m_vars.m_targeted_crash_timeout || !menu::player::get_player(m_vars.m_targeted_crash_target_id).m_connected) { + m_vars.m_targeted_crash = false; + m_vars.m_broken_entities.clear(); + LOG("Disabling crash for player"); + } + } +} + +network_players_removals_menu* g_instance; +network_players_removals_menu* network_players_removals_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_removals_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_removals.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_removals.h new file mode 100644 index 0000000..0979f6b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_removals.h @@ -0,0 +1,40 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/player_manager.h" +#include + +class network_players_removals_menu : public menu::submenu::submenu { +public: + static network_players_removals_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_removals_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::removals::vars { + struct variables { + bool m_break_nodes = false; + bool m_session_crash = false; + bool m_targeted_crash = false; + + int m_crash_type; + uint32_t m_break_node_threads[2] = { 0, 0 }; + uint32_t m_session_crash_timeout = 0; + uint32_t m_targeted_crash_timeout = 0; + uint64_t m_targeted_crash_target = 0; + int m_targeted_crash_target_id = 0; + + std::unordered_map m_broken_entities; + }; + + void session_host_kick(menu::player::player_context& player, bool everyone = false); + void script_host_kick(menu::player::player_context& player, bool everyone = false); + void break_freemode_kick(menu::player::player_context& player, bool everyone = false); + void crash(menu::player::player_context& player, bool everyone = false); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_selected.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_selected.cpp new file mode 100644 index 0000000..4df08e7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_selected.cpp @@ -0,0 +1,220 @@ +#include "network_players_selected.h" +#include "menu/base/submenu_handler.h" +#include "../network_players.h" +#include "../../network.h" +#include "menu/base/util/timers.h" +#include "util/caller.h" +#include "menu/base/util/helpers.h" +#include "../spoofing/network_spoofing_profiles.h" +#include "network_players_spawn_blocking.h" +#include "network_players_friendly.h" +#include "network_players_teleport.h" +#include "network_players_text.h" +#include "network_players_removals.h" +#include "network_players_commands.h" +#include "network_players_abusive.h" +#include "network_players_trolling.h" +#include "network_players_vehicle.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" +#include "menu/base/submenus/main/spawner.h" +#include "menu/base/submenus/main/network/session/network_session_overseer.h" + +using namespace network::players::selected::vars; + +namespace network::players::selected::vars { + variables m_vars; +} + +void network_players_selected_menu::load() { + set_parent(); + + add_option(submenu_option("Removals") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Friendly") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Teleport") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Abusive") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Trolling") + .add_translate() + .add_submenu()); + + add_option(submenu_option("ESP") + .add_translate() + .add_submenu() + .add_click([] { + helper_esp_menu::get()->set_parent(); + helper::esp::vars::m_vars.m_current = &menu::player::get_selected_player().m_esp; + })); + + add_option(submenu_option("Chat Commands") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Text Message") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Vehicle") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Spawner") + .add_translate() + .add_submenu() + .add_click([] { spawner::vars::m_vars.m_flag = spawner::vars::SPAWNER_PLAYER; })); + + add_option(submenu_option("Spawn Blocking") + .add_translate() + .add_submenu() + .add_tooltip("Block entities being spawned and synced from this player")); + + add_option(button_option("Create Spoofing Profile") + .add_translate() + .add_click([] { + if (!menu::player::get_selected_player().m_net_player || !menu::player::get_selected_player().m_net_player->m_player_info) return; + uint32_t ip = menu::player::get_selected_player().m_net_player->m_player_info->m_external_ip; + + char buffer[32]; + sprintf(buffer, "%i.%i.%i.%i", ((ip & 0xFF000000) >> 24), ((ip & 0xFF0000) >> 16), ((ip & 0xFF00) >> 8), (ip & 0xFF)); + + network::spoofing::profiles::vars::spoof_profile profile; + profile.m_name = menu::player::get_selected_player().m_name; + profile.m_ip = std::string(buffer); + profile.m_rockstar_id = (uint32_t)menu::player::get_selected_player().m_net_player->m_player_info->m_identifier.m_rockstar_id; + profile.m_file_name = profile.m_name; + + profile.m_crew_icon = menu::player::get_selected_player().m_net_player->get_crew_id(); + profile.m_crew_motto = menu::player::get_selected_player().m_net_player->get_crew_motto(); + profile.m_crew_name = menu::player::get_selected_player().m_net_player->get_crew_name(); + profile.m_crew_rank = menu::player::get_selected_player().m_net_player->get_crew_rank(); + profile.m_crew_tag = menu::player::get_selected_player().m_net_player->get_crew_tag(); + + network::spoofing::profiles::vars::save_profile(profile); + })); + + add_option(button_option("Add to Overseer") + .add_translate() + .add_click([] { + if (menu::player::get_selected_player().m_net_player) { + if (menu::player::get_selected_player().m_net_player->m_player_info) { + network::session::overseer::vars::save(menu::player::get_selected_player().m_name, menu::player::get_selected_player().m_net_player->m_player_info->m_identifier.m_rockstar_id, "Manual Add"); + } + } + })); + + add_option(toggle_option("Spectate") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_spectate) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_spectate); }) + .add_click([] { + if (menu::player::get_selected_player().m_spectate) { + if (native::network_is_in_spectator_mode()) { + menu::player::for_each([](menu::player::player_context& player) { + player.m_spectate = false; + native::network_set_in_spectator_mode(false, player.m_ped); + }); + + menu::player::get_selected_player().m_spectate = true; + } + + native::network_set_in_spectator_mode(true, menu::player::get_selected_player().m_ped); + } else { + native::network_set_in_spectator_mode(false, menu::player::get_selected_player().m_ped); + } + })); +} + +void network_players_selected_menu::update() {} + +void network_players_selected_menu::update_once() { + global::vars::g_network_menu_type = SELECTED_PLAYER; + if (!menu::player::get_selected_player().m_connected || menu::player::get_selected_player().m_name.empty()) return; + set_name(menu::player::get_selected_player().m_name.c_str(), false, false); +} + +void network_players_selected_menu::feature_update() { + menu::submenu::submenu* current_submenu = menu::submenu::handler::get_current(); + for (; current_submenu; current_submenu = current_submenu->get_parent()) { + if (current_submenu == this) { + if (!menu::player::get_selected_player().m_connected) { + if (menu::submenu::handler::get_current() != network_players_menu::get()) { + menu::submenu::handler::set_submenu(network_players_menu::get()); + menu::submenu::handler::set_previous(network_menu::get()); + } + } + + break; + } + } + + menu::player::for_each([](menu::player::player_context& player) { + if (player.m_esp.m_name || m_vars.m_session_esp.m_name) { + helper::esp::vars::name_esp(player.m_esp.m_name ? player.m_esp : m_vars.m_session_esp, player.m_ped, player.m_name); + } + + if (player.m_esp.m_snapline || m_vars.m_session_esp.m_snapline) { + helper::esp::vars::snapline_esp(player.m_esp.m_snapline ? player.m_esp : m_vars.m_session_esp, player.m_ped); + } + + if (player.m_esp.m_2d_box || m_vars.m_session_esp.m_2d_box) { + helper::esp::vars::_2d_esp(player.m_esp.m_2d_box ? player.m_esp : m_vars.m_session_esp, player.m_ped, 0); + } + + if (player.m_esp.m_2d_corners || m_vars.m_session_esp.m_2d_corners) { + helper::esp::vars::_2d_esp(player.m_esp.m_2d_corners ? player.m_esp : m_vars.m_session_esp, player.m_ped, 1); + } + + if (player.m_esp.m_3d_box || m_vars.m_session_esp.m_3d_box) { + helper::esp::vars::_3d_esp(player.m_esp.m_3d_box ? player.m_esp : m_vars.m_session_esp, player.m_ped, 0); + } + + if (player.m_esp.m_3d_axis || m_vars.m_session_esp.m_3d_axis) { + helper::esp::vars::_3d_esp(player.m_esp.m_3d_axis ? player.m_esp : m_vars.m_session_esp, player.m_ped, 1); + } + + if (player.m_esp.m_skeleton_bones || m_vars.m_session_esp.m_skeleton_bones) { + helper::esp::vars::skeleton_esp(player.m_esp.m_skeleton_bones ? player.m_esp : m_vars.m_session_esp, player.m_ped, 0); + } + + if (player.m_esp.m_skeleton_joints || m_vars.m_session_esp.m_skeleton_joints) { + helper::esp::vars::skeleton_esp(player.m_esp.m_skeleton_joints ? player.m_esp : m_vars.m_session_esp, player.m_ped, 1); + } + + if (!m_vars.m_session_esp.m_2d_box_rainbow.m_rainbow_toggle && player.m_esp.m_2d_box_rainbow.m_rainbow_toggle) player.m_esp.m_2d_box_rainbow.m_rainbow.run(); + if (!m_vars.m_session_esp.m_2d_corners_rainbow.m_rainbow_toggle && player.m_esp.m_2d_corners_rainbow.m_rainbow_toggle) player.m_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (!m_vars.m_session_esp.m_3d_box_rainbow.m_rainbow_toggle && player.m_esp.m_3d_box_rainbow.m_rainbow_toggle) player.m_esp.m_3d_box_rainbow.m_rainbow.run(); + if (!m_vars.m_session_esp.m_name_bg_rainbow.m_rainbow_toggle && player.m_esp.m_name_bg_rainbow.m_rainbow_toggle) player.m_esp.m_name_bg_rainbow.m_rainbow.run(); + if (!m_vars.m_session_esp.m_name_text_rainbow.m_rainbow_toggle && player.m_esp.m_name_text_rainbow.m_rainbow_toggle) player.m_esp.m_name_text_rainbow.m_rainbow.run(); + if (!m_vars.m_session_esp.m_skeleton_bones_rainbow.m_rainbow_toggle && player.m_esp.m_skeleton_bones_rainbow.m_rainbow_toggle) player.m_esp.m_skeleton_bones_rainbow.m_rainbow.run(); + if (!m_vars.m_session_esp.m_skeleton_joints_rainbow.m_rainbow_toggle && player.m_esp.m_skeleton_joints_rainbow.m_rainbow_toggle) player.m_esp.m_skeleton_joints_rainbow.m_rainbow.run(); + }, true); + + if (m_vars.m_session_esp.m_2d_box_rainbow.m_rainbow_toggle) m_vars.m_session_esp.m_2d_box_rainbow.m_rainbow.run(); + if (m_vars.m_session_esp.m_2d_corners_rainbow.m_rainbow_toggle) m_vars.m_session_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (m_vars.m_session_esp.m_3d_box_rainbow.m_rainbow_toggle) m_vars.m_session_esp.m_3d_box_rainbow.m_rainbow.run(); + if (m_vars.m_session_esp.m_name_bg_rainbow.m_rainbow_toggle) m_vars.m_session_esp.m_name_bg_rainbow.m_rainbow.run(); + if (m_vars.m_session_esp.m_name_text_rainbow.m_rainbow_toggle) m_vars.m_session_esp.m_name_text_rainbow.m_rainbow.run(); + if (m_vars.m_session_esp.m_skeleton_bones_rainbow.m_rainbow_toggle) m_vars.m_session_esp.m_skeleton_bones_rainbow.m_rainbow.run(); + if (m_vars.m_session_esp.m_skeleton_joints_rainbow.m_rainbow_toggle) m_vars.m_session_esp.m_skeleton_joints_rainbow.m_rainbow.run(); +} + +network_players_selected_menu* g_instance; +network_players_selected_menu* network_players_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_selected.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_selected.h new file mode 100644 index 0000000..4d72947 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_selected.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/submenus/main/helper/helper_esp.h" + +class network_players_selected_menu : public menu::submenu::submenu { +public: + static network_players_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::selected::vars { + struct variables { + helper::esp::vars::esp_context m_session_esp = { true }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_spawn_blocking.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_spawn_blocking.cpp new file mode 100644 index 0000000..1f46653 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_spawn_blocking.cpp @@ -0,0 +1,118 @@ +#include "network_players_spawn_blocking.h" +#include "menu/base/submenu_handler.h" +#include "network_players_selected.h" + +using namespace network::players::blocking::vars; + +namespace network::players::blocking::vars { + variables m_vars; + + scroll_struct types[] = { + { localization("Entity Creation", true), 0 }, + { localization("Entity Sync", true), 0 }, + }; + + void block_all() { + memset(menu::player::get_selected_player().m_block_entities[m_vars.m_type], 1, 14); + } +} + +void network_players_spawn_blocking_menu::load() { + set_name("Spawn Blocking"); + set_parent(); + + add_option(scroll_option(SCROLL, "Network Type") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(types), types)); + + add_option(button_option("Block All") + .add_translate() + .add_click(block_all)); + + add_option(toggle_option("Automobile") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][0]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][0]); })); + + add_option(toggle_option("Bike") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][1]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][1]); })); + + add_option(toggle_option("Boat") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][2]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][2]); })); + + add_option(toggle_option("Door") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][3]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][3]); })); + + add_option(toggle_option("Helicopter") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][4]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][4]); })); + + add_option(toggle_option("Object") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][5]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][5]); })); + + add_option(toggle_option("Ped") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][6]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][6]); })); + + add_option(toggle_option("Pickup") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][7]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][7]); })); + + add_option(toggle_option("Pickup Placement") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][8]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][8]); })); + + add_option(toggle_option("Plane") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][9]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][9]); })); + + add_option(toggle_option("Submarine") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][10]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][10]); })); + + add_option(toggle_option("Player") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][11]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][11]); })); + + add_option(toggle_option("Trailer") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][12]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][12]); })); + + add_option(toggle_option("Train") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][13]) + .add_update([](toggle_option* option, int pos) { option->add_toggle(menu::player::get_selected_player().m_block_entities[m_vars.m_type][13]); })); +} + +void network_players_spawn_blocking_menu::update() {} + +void network_players_spawn_blocking_menu::update_once() {} + +void network_players_spawn_blocking_menu::feature_update() {} + +network_players_spawn_blocking_menu* g_instance; +network_players_spawn_blocking_menu* network_players_spawn_blocking_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_spawn_blocking_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_spawn_blocking.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_spawn_blocking.h new file mode 100644 index 0000000..f781c86 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_spawn_blocking.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_spawn_blocking_menu : public menu::submenu::submenu { +public: + static network_players_spawn_blocking_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_spawn_blocking_menu() + : menu::submenu::submenu() + {} +}; + +namespace network::players::blocking::vars { + struct variables { + int m_type = 0; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_teleport.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_teleport.cpp new file mode 100644 index 0000000..1d0e20d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_teleport.cpp @@ -0,0 +1,129 @@ +#include "network_players_teleport.h" +#include "menu/base/submenu_handler.h" +#include "network_players_selected.h" +#include "menu/base/util/control.h" +#include "teleport/network_players_teleport_apartments.h" +#include "menu/base/submenus/main/network/network_session.h" + +using namespace network::players::teleport::vars; + +namespace network::players::teleport::vars { + variables m_vars; + + void teleport_all_players_to_me() { + menu::player::for_each([&] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + menu::control::request_control(player.m_entity, [=] (Entity veh) { + math::vector3 forward = native::get_entity_forward_vector(menu::player::get_local_player().m_entity); + math::vector3 coords = menu::player::get_local_player().m_coords + (forward * (2.f + (player.m_id * 2.f))); + native::set_entity_coords(veh, coords.x, coords.y, coords.z, true, true, true, false); + }); + } + }); + } + + void teleport_to_player(menu::player::player_context& player) { + native::set_entity_coords(menu::player::get_local_player().m_entity, player.m_coords.x, player.m_coords.y, player.m_coords.z, true, true, true, false); + } + + void teleport_to_vehicle(menu::player::player_context& player) { + if (player.m_in_vehicle) { + menu::control::request_control(player.m_entity, [] (Entity veh) { + math::vector3 forward = native::get_entity_forward_vector(veh); + math::vector3 coords = native::get_entity_coords(veh, true) + (forward * 5.f); + native::set_entity_coords(menu::player::get_local_player().m_entity, coords.x, coords.y, coords.z, true, true, true, false); + }); + } else { + menu::notify::stacked(network_players_teleport_menu::get()->get_name().get(), util::va::va("%s %s", network_players_teleport_menu::get()->get_string("Failed to get a vehicle handle for").c_str(), player.m_name.c_str())); + } + } + + void teleport_to_me(menu::player::player_context& player) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (player.m_in_vehicle) { + menu::control::request_control(player.m_vehicle, [] (Entity veh) { + math::vector3 forward = native::get_entity_forward_vector(menu::player::get_local_player().m_vehicle); + math::vector3 coords = menu::player::get_local_player().m_coords + (forward * 5.f); + native::set_entity_coords(veh, coords.x, coords.y, coords.z, true, true, true, false); + }); + } else { + menu::notify::stacked(network_players_teleport_menu::get()->get_name().get(), util::va::va("%s %s", network_players_teleport_menu::get()->get_string("Failed to get a vehicle handle for").c_str(), player.m_name.c_str())); + } + } else { + teleport_all_players_to_me(); + } + } + + void teleport_into_vehicle(menu::player::player_context& player) { + if (player.m_in_vehicle) { + bool inside = false; + for (int i = -1; i < native::get_vehicle_max_number_of_passengers(player.m_vehicle); i++) { + if (native::is_vehicle_seat_free(player.m_vehicle, i, 1)) { + native::set_ped_into_vehicle(menu::player::get_local_player().m_ped, player.m_vehicle, i); + inside = true; + break; + } + } + + if (!inside) { + menu::notify::stacked(network_players_teleport_menu::get()->get_name().get(), network_players_teleport_menu::get()->get_string("No free seats, or they're too far away").c_str()); + } + } else { + menu::notify::stacked(network_players_teleport_menu::get()->get_name().get(), util::va::va("%s %s", network_players_teleport_menu::get()->get_string("Failed to get a vehicle handle for").c_str(), player.m_name.c_str())); + } + } +} + +void network_players_teleport_menu::load() { + set_name("Teleport"); + set_parent(); + + add_string("Failed to get a vehicle handle for"); + add_string("No free seats, or they're too far away"); + + add_option(submenu_option("Apartments") + .add_translate() + .add_submenu()); + + add_option(button_option("Teleport to Player") + .add_translate() + .add_click([] { teleport_to_player(menu::player::get_selected_player()); }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; })); + + add_option(button_option("Teleport to Vehicle") + .add_translate() + .add_click([] { teleport_to_vehicle(menu::player::get_selected_player()); }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; })); + + add_option(button_option("Teleport Vehicle to Me") + .add_translate() + .add_click([] { teleport_to_me(menu::player::get_selected_player()); })); + + add_option(button_option("Teleport Into Vehicle") + .add_translate() + .add_click([] { teleport_into_vehicle(menu::player::get_selected_player()); }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; })); +} + +void network_players_teleport_menu::update() {} + +void network_players_teleport_menu::update_once() { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + set_parent(); + } else { + set_parent(); + } +} + +void network_players_teleport_menu::feature_update() {} + +network_players_teleport_menu* g_instance; +network_players_teleport_menu* network_players_teleport_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_teleport_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_teleport.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_teleport.h new file mode 100644 index 0000000..84fadcd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_teleport.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_teleport_menu : public menu::submenu::submenu { +public: + static network_players_teleport_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_teleport_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::teleport::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_text.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_text.cpp new file mode 100644 index 0000000..8cfcc35 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_text.cpp @@ -0,0 +1,196 @@ +#include "network_players_text.h" +#include "menu/base/submenu_handler.h" +#include "network_players_selected.h" +#include "menu/base/util/helpers.h" +#include "rage/engine.h" +#include "menu/base/submenus/main/network/spoofing/network_spoofing_name.h" +#include "text/network_players_text_presets.h" +#include "text/network_players_text_save.h" +#include "menu/base/submenus/main/network/network_session.h" + +using namespace network::players::text::vars; + +namespace network::players::text::vars { + variables m_vars; + + scroll_struct text_fonts[] = { + { localization("Default", true), "" }, + { localization("Chalet Comprime 60", true), "$Font2_cond" }, + { localization("Sign Painter", true), "$Font5" }, + { localization("Rockstar Tag", true), "$RockstarTAG" }, + { localization("Pricedown", true), "$gtaCash" }, + { localization("Blocky", true), "$WebFont3_Times" }, + }; + + scroll_struct text_sizes[] = { + { localization("Default", true), "" }, + { localization("Small", true), "10" }, + { localization("Large", true), "30" }, + { localization("Larger", true), "40" }, + { localization("Big", true), "50" }, + { localization("Massive", true), "70" } + }; + + void send_text_message(menu::player::player_context& player, menu::player::player_context& sender, const char* message) { + if (!menu::helpers::is_valid_net_player(player.m_net_player)) return; + if (!menu::helpers::is_valid_net_player(sender.m_net_player)) return; + + rage::network::net_msg_text_message identifier; + memset(&identifier.m_sender, 0, sizeof(identifier.m_sender)); + + identifier.m_sender.m_rockstar_id = sender.m_net_player->m_player_info->m_identifier.m_rockstar_id; // spoofed sender + identifier.m_sender.m_type = 3; + + rage::network::net_msg_identifier target; + memset(&target, 0, sizeof(target)); + + target.m_rockstar_id = player.m_net_player->m_player_info->m_identifier.m_rockstar_id; // recipient + target.m_type = 3; + + strncpy_s(identifier.m_message, message, 0x100); + rage::engine::send_text_message_net_msg(&target, &identifier); + } +} + +void network_players_text_menu::load() { + set_name("Text Message"); + set_parent(); + + add_option(submenu_option("Save and Load") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Presets") + .add_translate() + .add_submenu()); + + add_option(button_option("Input Message") + .add_translate() + .add_keyboard("Enter the message to send", 100, [] (button_option* option, const char* msg) { + menu::player::get_selected_player().m_text_message_msg = msg; + })); + + add_option(scroll_option(SCROLL, "Color") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_text_message_color, 0, NUMOF(network::spoofing::name::vars::text_colors), network::spoofing::name::vars::text_colors) + .add_update([] (scroll_option* option, int pos) { option->add_scroll(menu::player::get_selected_player().m_text_message_color, 0, NUMOF(network::spoofing::name::vars::text_colors), network::spoofing::name::vars::text_colors); })); + + add_option(scroll_option(SCROLL, "Font") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_text_message_font, 0, NUMOF(text_fonts), text_fonts) + .add_update([] (scroll_option* option, int pos) { option->add_scroll(menu::player::get_selected_player().m_text_message_font, 0, NUMOF(text_fonts), text_fonts); })); + + add_option(scroll_option(SCROLL, "Size") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_text_message_size, 0, NUMOF(text_sizes), text_sizes) + .add_update([] (scroll_option* option, int pos) { option->add_scroll(menu::player::get_selected_player().m_text_message_size, 0, NUMOF(text_sizes), text_sizes); })); + + add_option(scroll_option(TOGGLE, "Spoof Sender") + .add_translate() + .add_toggle(m_vars.m_sender_toggle) + .add_click([] { + m_vars.m_randomize_sender = false; + m_vars.m_sender_id = m_vars.m_player_list[m_vars.m_sender].m_result; + }) + .add_scroll(m_vars.m_sender, 0, NUMOF(m_vars.m_player_list), m_vars.m_player_list) + .add_update([] (scroll_option* option, int pos) { option->add_scroll(m_vars.m_sender, 0, m_vars.m_list_size, m_vars.m_player_list); }) + .add_requirement([] { return m_vars.m_list_size >= 1; })); + + add_option(toggle_option("Randomize Sender") + .add_translate() + .add_toggle(m_vars.m_randomize_sender) + .add_click([] { m_vars.m_sender_toggle = false; }) + .add_requirement([] { return m_vars.m_list_size >= 1; })); + + add_option(number_option(SCROLLSELECT, "Send Message") + .add_translate() + .add_number(menu::player::get_selected_player().m_text_message_count, "%i", 1).add_min(1).add_max(100) + .add_update([] (number_option* option, int pos) { option->add_number(menu::player::get_selected_player().m_text_message_count, "%i", 1); }) + .add_click([] { + for (int i = 0; i < menu::player::get_selected_player().m_text_message_count; i++) { + menu::player::player_context& sender = m_vars.m_sender_toggle ? menu::player::get_player(m_vars.m_player_list[m_vars.m_sender].m_result) : menu::player::get_local_player(); + if (m_vars.m_randomize_sender) { + int max_range = 0; + menu::player::for_each([&] (menu::player::player_context& player) { + max_range = player.m_id; + }); + + sender = menu::player::get_player(native::get_random_int_in_range(0, max_range)); + } + + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + send_text_message(menu::player::get_selected_player(), sender, menu::player::get_selected_player().m_text_message_final); + } else { + menu::player::for_each([&] (menu::player::player_context& player) { + send_text_message(player, sender, menu::player::get_selected_player().m_text_message_final); + }); + } + } + })); + + add_string("Spoof sender disabled, player is no longer valid"); +} + +void network_players_text_menu::update() { + const char* font_face = menu::player::get_selected_player().m_text_message_font > 0 ? text_fonts[menu::player::get_selected_player().m_text_message_font].m_result : "$Font2"; + const char* font_size = menu::player::get_selected_player().m_text_message_size > 0 ? text_sizes[menu::player::get_selected_player().m_text_message_size].m_result : "20"; + + if (menu::player::get_selected_player().m_text_message_font == 0 && menu::player::get_selected_player().m_text_message_size == 0) { + snprintf(menu::player::get_selected_player().m_text_message_final, 100, "%s%s", + network::spoofing::name::vars::text_colors[menu::player::get_selected_player().m_text_message_color].m_result, + menu::player::get_selected_player().m_text_message_msg.c_str()); + } else { + snprintf(menu::player::get_selected_player().m_text_message_final, 100, "%s%s", + font_face, + font_size, + network::spoofing::name::vars::text_colors[menu::player::get_selected_player().m_text_message_color].m_result, + menu::player::get_selected_player().m_text_message_msg.c_str()); + } + + if (menu::player::get_selected_player().m_text_message_msg.length()) { + menu::notify::subtitle(menu::player::get_selected_player().m_text_message_final); + } + + m_vars.m_list_size = 0; + menu::player::for_each([&] (menu::player::player_context& player) { + m_vars.m_player_list[m_vars.m_list_size].m_name.set(player.m_name); + m_vars.m_player_list[m_vars.m_list_size].m_result = player.m_id; + + if (m_vars.m_sender_toggle) { + if (m_vars.m_sender_id == player.m_id) { + m_vars.m_sender = m_vars.m_list_size; + } + } + + m_vars.m_list_size++; + }); + + if (m_vars.m_sender_toggle) { + if (!menu::player::get_player(m_vars.m_sender_id).m_connected) { + m_vars.m_sender_toggle = false; + m_vars.m_sender = 0; + menu::notify::stacked(get_name().get(), get_string("Spoof sender disabled, player is no longer valid"), global::ui::g_error); + } + } +} + +void network_players_text_menu::update_once() { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + set_parent(); + } else { + set_parent(); + } +} + +void network_players_text_menu::feature_update() {} + +network_players_text_menu* g_instance; +network_players_text_menu* network_players_text_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_text_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_text.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_text.h new file mode 100644 index 0000000..de366cc --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_text.h @@ -0,0 +1,31 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/player_manager.h" + +class network_players_text_menu : public menu::submenu::submenu { +public: + static network_players_text_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_text_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::text::vars { + struct variables { + bool m_sender_toggle; + bool m_randomize_sender; + + Player m_sender_id; + int m_sender; + int m_list_size; + scroll_struct m_player_list[34]; + }; + + void send_text_message(menu::player::player_context& player, menu::player::player_context& sender, const char* message); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_trolling.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_trolling.cpp new file mode 100644 index 0000000..36328fc --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_trolling.cpp @@ -0,0 +1,375 @@ +#include "network_players_trolling.h" +#include "menu/base/submenu_handler.h" +#include "network_players_selected.h" +#include "network_players_abusive.h" +#include "menu/base/util/helpers.h" +#include "rage/types/global_types.h" +#include "trolling/network_players_trolling_sounds.h" +#include "trolling/network_players_trolling_attachments.h" +#include "menu/base/submenus/main/network/network_session.h" + +using namespace network::players::trolling::vars; + +namespace network::players::trolling::vars { + variables m_vars; + + scroll_struct weapon_groups[] = { + { localization("Melee", true), 0xD49321D4 }, + { localization("Pistol", true), 0x18D5FA97 }, + { localization("SMG", true), 0xC6E9A5C5 }, + { localization("Assault Rifle", true), 0x39D5C192 }, + { localization("MG", true), 0x451B04BC }, + { localization("Shotgun", true), 0x33431399 }, + { localization("Sniper", true), 0xB7BBD827 }, + { localization("Heavy", true), 0xA27A4F9F }, + { localization("Throwables", true), 0x5C4C5883 }, + { localization("Spillable", true), 0x5F1BE07C }, + { localization("Stun", true), 0x29268262 }, + { localization("Extinguisher", true), 0xFDBF656C } + }; + + void black_screen(menu::player::player_context& player) { + menu::helpers::trigger_script_event({ rage::global::apartment_teleport, player.m_id, 0, 0 }, 4, player.m_id); + } + + void remove_weapon_group(menu::player::player_context& player, uint32_t group) { + std::vector hashes; + + uint64_t table = *(uint64_t*)global::vars::g_weapon_info.m_list; + if (table) { + for (int16_t i = 0; i < (*(int16_t*)global::vars::g_weapon_info.m_count) - 1; i++) { + rage::types::weapon_info* ptr = (rage::types::weapon_info*) * (uint64_t*)(table + (i * 8)); + if (ptr) { + if (ptr->m_group_hash == group) { + hashes.push_back(ptr->m_name_hash); + } + } + } + } + + for (uint32_t& hash : hashes) { + native::remove_weapon_from_ped(player.m_ped, hash); + } + + network_players_trolling_menu* _this = network_players_trolling_menu::get(); + menu::notify::stacked(_this->get_name().get(), util::va::va("%s %i %s %s", _this->get_string("Removed").c_str(), hashes.size(), _this->get_string("weapons from").c_str(), player.m_name.c_str())); + } +} + +void network_players_trolling_menu::load() { + set_name("Trolling"); + set_parent(); + + add_string("Removed"); + add_string("weapons from"); + + add_option(submenu_option("Sounds") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Attachments") + .add_translate() + .add_submenu()); + + add_option(button_option("Explode") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + native::add_explosion(menu::player::get_selected_player().m_coords.x, menu::player::get_selected_player().m_coords.y, menu::player::get_selected_player().m_coords.z, 0, 10.f, true, false, 0.f, false); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + native::add_explosion(player.m_coords.x, player.m_coords.y, player.m_coords.z, 0, 10.f, true, false, 0.f, false); + }); + } + })); + + add_option(button_option("Kick From Vehicle") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::kick_from_vehicle(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::kick_from_vehicle(player); + }); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Cage") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_cage_type, 0, NUMOF(network::players::abusive::vars::cages), network::players::abusive::vars::cages) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_cage_type, 0, NUMOF(network::players::abusive::vars::cages), network::players::abusive::vars::cages); + } else { + option->add_scroll(network::players::abusive::vars::m_vars.m_cage_type, 0, NUMOF(network::players::abusive::vars::cages), network::players::abusive::vars::cages); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::cage_player(menu::player::get_selected_player(), menu::player::get_selected_player().m_cage_type); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::cage_player(player, network::players::abusive::vars::m_vars.m_cage_type); + }); + } + })); + + add_option(scroll_option(SCROLLSELECT, "CEO") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_ceo_type, 0, NUMOF(network::players::abusive::vars::ceos), network::players::abusive::vars::ceos) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_ceo_type, 0, NUMOF(network::players::abusive::vars::ceos), network::players::abusive::vars::ceos); + } else { + option->add_scroll(network::players::abusive::vars::m_vars.m_ceo_type, 0, NUMOF(network::players::abusive::vars::ceos), network::players::abusive::vars::ceos); + } + }) + .add_click([] { + int type = global::vars::g_network_menu_type == SELECTED_PLAYER ? menu::player::get_selected_player().m_ceo_type : network::players::abusive::vars::m_vars.m_ceo_type; + + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (type == 0) { + network::players::abusive::vars::ceo_kick(menu::player::get_selected_player()); + } else network::players::abusive::vars::ceo_ban(menu::player::get_selected_player()); + } else { + menu::player::for_each([=] (menu::player::player_context& player) { + if (type == 0) { + network::players::abusive::vars::ceo_kick(player); + } else network::players::abusive::vars::ceo_ban(player); + }); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Remove Weapon Group") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_remove_weapon_group_type, 0, NUMOF(weapon_groups), weapon_groups) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_remove_weapon_group_type, 0, NUMOF(weapon_groups), weapon_groups); + } else { + option->add_scroll(m_vars.m_remove_weapon_group_type, 0, NUMOF(weapon_groups), weapon_groups); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + remove_weapon_group(menu::player::get_selected_player(), weapon_groups[menu::player::get_selected_player().m_remove_weapon_group_type].m_result); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + remove_weapon_group(player, weapon_groups[m_vars.m_remove_weapon_group_type].m_result); + }); + } + })); + + add_option(button_option("Set On Fire") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::set_on_fire(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::set_on_fire(player); + }); + } + })); + + add_option(button_option("Taze") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::taze(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::taze(player); + }); + } + })); + + add_option(button_option("Ragdoll") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::ragdoll(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::ragdoll(player); + }); + } + })); + + add_option(button_option("Glitch Physics") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::glitch_physics(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::glitch_physics(player); + }); + } + })); + + add_option(button_option("Forcefield") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + native::add_explosion(menu::player::get_selected_player().m_coords.x, menu::player::get_selected_player().m_coords.y, menu::player::get_selected_player().m_coords.z, 29, 100.f, false, true, 0.f, true); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + native::add_explosion(player.m_coords.x, player.m_coords.y, player.m_coords.z, 29, 100.f, false, true, 0.f, true); + }); + } + })); + + add_option(button_option("Blame") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::blame(menu::player::get_selected_player()); + } + }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; })); + + add_option(button_option("Rain Rockets") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::rain_rockets(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::rain_rockets(player); + }); + } + })); + + add_option(button_option("Send to Island") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::send_to_island(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::send_to_island(player); + }); + } + })); + + add_option(button_option("Black Screen") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + black_screen(menu::player::get_selected_player()); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + black_screen(player); + }); + } + })); + + add_option(button_option("Give Wanted Level") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::give_wanted_level(menu::player::get_selected_player(), 5); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::give_wanted_level(player, 5); + }); + } + })); + + add_option(button_option("Block Passive") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + menu::helpers::trigger_script_event({ rage::global::block_passive, 1, 1 }, 3, menu::player::get_selected_player().m_id); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + menu::helpers::trigger_script_event({ rage::global::block_passive, 1, 1 }, 3, player.m_id); + }); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Vehicle Ram") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_vehicle_ram_type, 0, NUMOF(network::players::abusive::vars::ram_vehicles), network::players::abusive::vars::ram_vehicles) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_vehicle_ram_type, 0, NUMOF(network::players::abusive::vars::ram_vehicles), network::players::abusive::vars::ram_vehicles); + } else { + option->add_scroll(network::players::abusive::vars::m_vars.m_vehicle_ram_type, 0, NUMOF(network::players::abusive::vars::ram_vehicles), network::players::abusive::vars::ram_vehicles); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::ram(menu::player::get_selected_player(), menu::player::get_selected_player().m_vehicle_ram_type); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::ram(player, network::players::abusive::vars::m_vars.m_vehicle_ram_type); + }); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Clone") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_clone_type, 0, NUMOF(network::players::abusive::vars::clone), network::players::abusive::vars::clone) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_clone_type, 0, NUMOF(network::players::abusive::vars::clone), network::players::abusive::vars::clone); + } else { + option->add_scroll(network::players::abusive::vars::m_vars.m_clone_type, 0, NUMOF(network::players::abusive::vars::clone), network::players::abusive::vars::clone); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::clone_player(menu::player::get_selected_player(), menu::player::get_selected_player().m_clone_type); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::clone_player(player, network::players::abusive::vars::m_vars.m_clone_type); + }); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Show Message") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_show_message_type, 0, NUMOF(network::players::abusive::vars::messages), network::players::abusive::vars::messages) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_show_message_type, 0, NUMOF(network::players::abusive::vars::messages), network::players::abusive::vars::messages); + } else { + option->add_scroll(network::players::abusive::vars::m_vars.m_show_message_type, 0, NUMOF(network::players::abusive::vars::messages), network::players::abusive::vars::messages); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + network::players::abusive::vars::send_message(menu::player::get_selected_player(), menu::player::get_selected_player().m_show_message_type); + } else { + menu::player::for_each([] (menu::player::player_context& player) { + network::players::abusive::vars::send_message(player, network::players::abusive::vars::m_vars.m_show_message_type); + }); + } + })); +} + +void network_players_trolling_menu::update() {} + +void network_players_trolling_menu::update_once() { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + set_parent(); + } else { + set_parent(); + } +} + +void network_players_trolling_menu::feature_update() {} + +network_players_trolling_menu* g_instance; +network_players_trolling_menu* network_players_trolling_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_trolling_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_trolling.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_trolling.h new file mode 100644 index 0000000..8f75867 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_trolling.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/player_manager.h" + +class network_players_trolling_menu : public menu::submenu::submenu { +public: + static network_players_trolling_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_trolling_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::trolling::vars { + struct variables { + int m_remove_weapon_group_type; + }; + + void black_screen(menu::player::player_context& player); + extern variables m_vars; +} diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_vehicle.cpp b/GTAV/src/menu/base/submenus/main/network/players/network_players_vehicle.cpp new file mode 100644 index 0000000..a619195 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_vehicle.cpp @@ -0,0 +1,537 @@ +#include "network_players_vehicle.h" +#include "menu/base/submenu_handler.h" +#include "network_players_selected.h" +#include "menu/base/submenus/main/vehicle.h" +#include "menu/base/submenus/main/vehicle/vehicle_movement.h" +#include "global/lists.h" +#include "menu/base/submenus/main/network/network_session.h" + +using namespace network::players::vehicle::vars; + +namespace network::players::vehicle::vars { + variables m_vars; +} + +void network_players_vehicle_menu::load() { + set_name("Vehicle"); + set_parent(); + + add_option(toggle_option("Godmode") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_vehicle_godmode) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_vehicle_godmode); + } else { + option->add_toggle(m_vars.m_vehicle_godmode); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Upgrades") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_vehicle_upgrades, 0, NUMOF(vehicle::vars::upgrades), vehicle::vars::upgrades) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_vehicle_upgrades, 0, NUMOF(vehicle::vars::upgrades), vehicle::vars::upgrades); + } else { + option->add_scroll(m_vars.m_vehicle_upgrades, 0, NUMOF(vehicle::vars::upgrades), vehicle::vars::upgrades); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::max_upgrades(menu::player::get_selected_player().m_vehicle, menu::player::get_selected_player().m_vehicle_upgrades); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::max_upgrades(player.m_vehicle, player.m_vehicle_upgrades); + } + }); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Downgrades") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_vehicle_downgrades, 0, NUMOF(vehicle::vars::upgrades), vehicle::vars::upgrades) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_vehicle_downgrades, 0, NUMOF(vehicle::vars::upgrades), vehicle::vars::upgrades); + } else { + option->add_scroll(m_vars.m_vehicle_downgrades, 0, NUMOF(vehicle::vars::upgrades), vehicle::vars::upgrades); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::low_upgrades(menu::player::get_selected_player().m_vehicle, menu::player::get_selected_player().m_vehicle_downgrades); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::low_upgrades(player.m_vehicle, player.m_vehicle_downgrades); + } + }); + } + })); + + add_option(scroll_option, math::vector3_>>(SCROLLSELECT, "Acrobatics") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_vehicle_acrobatics, 0, NUMOF(global::lists::g_acrobatics), global::lists::g_acrobatics) + .add_update([] (scroll_option, math::vector3_>>* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_vehicle_acrobatics, 0, NUMOF(global::lists::g_acrobatics), global::lists::g_acrobatics); + } else { + option->add_scroll(m_vars.m_vehicle_acrobatics, 0, NUMOF(global::lists::g_acrobatics), global::lists::g_acrobatics); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::movement::vars::run_acrobatic(menu::player::get_selected_player().m_vehicle, global::lists::g_acrobatics[menu::player::get_selected_player().m_vehicle_acrobatics].m_result); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::movement::vars::run_acrobatic(player.m_vehicle, global::lists::g_acrobatics[m_vars.m_vehicle_acrobatics].m_result); + } + }); + } + })); + + add_option(button_option("Repair Vehicle") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { native::set_vehicle_fixed(veh); }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { native::set_vehicle_fixed(veh); }); + } + }); + } + })); + + add_option(number_option(SCROLLSELECT, "Boost Forwards") + .add_translate() + .add_number(menu::player::get_selected_player().m_vehicle_boost_forwards, "%i", 1).add_min(0).add_max(5000).set_scroll_speed(10).show_max() + .add_update([] (number_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_number(menu::player::get_selected_player().m_vehicle_boost_forwards, "%i", 1); + } else { + option->add_number(m_vars.m_vehicle_boost_forwards, "%i", 1); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + native::set_vehicle_forward_speed(veh, menu::player::get_selected_player().m_vehicle_boost_forwards + native::get_entity_speed(veh)); + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + native::set_vehicle_forward_speed(veh, m_vars.m_vehicle_boost_forwards + native::get_entity_speed(veh)); + }); + } + }); + } + })); + + add_option(number_option(SCROLLSELECT, "Boost Backwards") + .add_translate() + .add_number(menu::player::get_selected_player().m_vehicle_boost_backwards, "%i", 1).add_min(0).add_max(5000).set_scroll_speed(10).show_max() + .add_update([] (number_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_number(menu::player::get_selected_player().m_vehicle_boost_backwards, "%i", 1); + } else { + option->add_number(m_vars.m_vehicle_boost_backwards, "%i", 1); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + native::set_vehicle_forward_speed(veh, (float)-menu::player::get_selected_player().m_vehicle_boost_backwards); + }); + + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + native::set_vehicle_forward_speed(veh, (float)-m_vars.m_vehicle_boost_backwards); + }); + } + }); + } + })); + + add_option(button_option("Kill Engine") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + native::set_vehicle_engine_health(veh, -4000.f); + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + native::set_vehicle_engine_health(veh, -4000.f); + }); + } + }); + } + })); + + add_option(button_option("Burst Tires") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + native::set_vehicle_tyres_can_burst(veh, true); + for (int id = 0; id < 8; id++) { + native::set_vehicle_tyre_burst(veh, id, true, 1000.f); + } + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + native::set_vehicle_tyres_can_burst(veh, true); + for (int id = 0; id < 8; id++) { + native::set_vehicle_tyre_burst(veh, id, true, 1000.f); + } + }); + } + }); + } + })); + + add_option(button_option("Break Windows") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + for (int id = 0; id < 8; id++) { + native::smash_vehicle_window(veh, id); + } + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + for (int id = 0; id < 8; id++) { + native::smash_vehicle_window(veh, id); + } + }); + } + }); + } + })); + + add_option(toggle_option("Disable Full Collision") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_vehicle_disable_collision) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_vehicle_disable_collision); + } else { + option->add_toggle(m_vars.m_vehicle_disable_collision); + } + })); + + add_option(toggle_option("Slippy Wheels") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_vehicle_slippy_wheels) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_vehicle_slippy_wheels); + } else { + option->add_toggle(m_vars.m_vehicle_slippy_wheels); + } + })); + + add_option(button_option("Stop") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + native::set_vehicle_forward_speed(veh, 0.f); + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + native::set_vehicle_forward_speed(veh, 0.f); + }); + } + }); + } + })); + + add_option(button_option("Place on Ground") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + native::set_vehicle_on_ground_properly(veh, 0); + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + native::set_vehicle_on_ground_properly(veh, 0); + }); + } + }); + } + })); + + add_option(button_option("Kick All Seats") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + for (int i = -1; i < native::get_vehicle_max_number_of_passengers(veh); i++) { + if (!native::is_vehicle_seat_free(veh, i, 0)) { + native::clear_ped_tasks_immediately(native::get_ped_in_vehicle_seat(veh, i, 0)); + } + } + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + for (int i = -1; i < native::get_vehicle_max_number_of_passengers(veh); i++) { + if (!native::is_vehicle_seat_free(veh, i, 0)) { + native::clear_ped_tasks_immediately(native::get_ped_in_vehicle_seat(veh, i, 0)); + } + } + }); + } + }); + } + })); + + add_option(button_option("Kick Driver") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + if (!native::is_vehicle_seat_free(veh, -1, 0)) { + native::clear_ped_tasks_immediately(native::get_ped_in_vehicle_seat(veh, -1, 0)); + } + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + if (!native::is_vehicle_seat_free(veh, -1, 0)) { + native::clear_ped_tasks_immediately(native::get_ped_in_vehicle_seat(veh, -1, 0)); + } + }); + } + }); + } + })); + + add_option(button_option("Lock Doors") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + native::set_vehicle_doors_locked(veh, 4); + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + native::set_vehicle_doors_locked(veh, 4); + }); + } + }); + } + })); + + add_option(button_option("Unlock Doors") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + native::set_vehicle_doors_locked(veh, 0); + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + native::set_vehicle_doors_locked(veh, 0); + }); + } + }); + } + })); + + add_option(number_option(SCROLLSELECT, "Rotate") + .add_translate() + .add_number(menu::player::get_selected_player().m_vehicle_rotate, "%i", 10).add_min(10).add_max(360) + .add_update([] (number_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_number(menu::player::get_selected_player().m_vehicle_rotate, "%i", 10); + } else { + option->add_number(m_vars.m_vehicle_rotate, "%i", 10); + } + }) + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + math::vector3 rotation = native::get_entity_rotation(veh, 2); + native::set_entity_rotation(veh, rotation.x, rotation.y, rotation.z + (float)menu::player::get_selected_player().m_vehicle_rotate, 2, true); + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + math::vector3 rotation = native::get_entity_rotation(veh, 2); + native::set_entity_rotation(veh, rotation.x, rotation.y, rotation.z + (float)m_vars.m_vehicle_rotate, 2, true); + }); + } + }); + } + })); + + add_option(button_option("Clone") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + vehicle::vars::clone_vehicle(veh); + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + vehicle::vars::clone_vehicle(veh); + }); + } + }); + } + })); + + add_option(button_option("Delete") + .add_translate() + .add_click([] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + if (menu::player::get_selected_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_selected_player().m_vehicle, [] (Vehicle veh) { + native::set_entity_as_mission_entity(veh, true, true); + native::delete_entity(&veh); + }); + } + } else { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Vehicle veh) { + native::set_entity_as_mission_entity(veh, true, true); + native::delete_entity(&veh); + }); + } + }); + } + })); +} + +void network_players_vehicle_menu::update() {} + +void network_players_vehicle_menu::update_once() { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + set_parent(); + } else { + set_parent(); + } +} + +void network_players_vehicle_menu::feature_update() { + menu::player::for_each([] (menu::player::player_context& player) { + bool excluded = menu::player::is_excluded(player.m_id); + + if (player.m_vehicle_godmode || m_vars.m_vehicle_godmode) { + if (!(excluded && !player.m_vehicle_godmode)) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Entity veh) { + native::set_entity_invincible(veh, false); + }); + } + } + } + + if (player.m_vehicle_disable_collision || m_vars.m_vehicle_disable_collision) { + if (!(excluded && !player.m_vehicle_disable_collision)) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Entity veh) { + native::set_entity_collision(veh, false, true); + }); + } + } + } + + if (player.m_vehicle_slippy_wheels || m_vars.m_vehicle_slippy_wheels) { + if (!(excluded && !player.m_vehicle_slippy_wheels)) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Entity veh) { + native::set_vehicle_reduce_grip(veh, true); + }); + } + } + } + + if (player.m_vehicle_freeze || m_vars.m_vehicle_freeze) { + if (!(excluded && !player.m_vehicle_freeze)) { + if (player.m_in_vehicle) { + vehicle::vars::run_task(player.m_vehicle, [] (Entity veh) { + native::freeze_entity_position(veh, true); + }); + } + } + } + }, true); +} + +network_players_vehicle_menu* g_instance; +network_players_vehicle_menu* network_players_vehicle_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_vehicle_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/network_players_vehicle.h b/GTAV/src/menu/base/submenus/main/network/players/network_players_vehicle.h new file mode 100644 index 0000000..e7f3447 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/network_players_vehicle.h @@ -0,0 +1,33 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_vehicle_menu : public menu::submenu::submenu { +public: + static network_players_vehicle_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_vehicle_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::vehicle::vars { + struct variables { + bool m_vehicle_godmode = false; + bool m_vehicle_disable_collision = false; + bool m_vehicle_slippy_wheels = false; + bool m_vehicle_freeze = false; + + int m_vehicle_upgrades; + int m_vehicle_downgrades; + int m_vehicle_acrobatics; + int m_vehicle_boost_forwards; + int m_vehicle_boost_backwards; + int m_vehicle_rotate; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/teleport/network_players_teleport_apartments.cpp b/GTAV/src/menu/base/submenus/main/network/players/teleport/network_players_teleport_apartments.cpp new file mode 100644 index 0000000..f264a4e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/teleport/network_players_teleport_apartments.cpp @@ -0,0 +1,53 @@ +#include "network_players_teleport_apartments.h" +#include "menu/base/submenu_handler.h" +#include "../network_players_teleport.h" +#include "menu/base/util/helpers.h" +#include "rage/types/global_types.h" + +using namespace network::players::teleport::apartments::vars; + +namespace network::players::teleport::apartments::vars { + variables m_vars; + + void teleport_player_to_apartment(menu::player::player_context& player, int id) { + if (global::vars::g_network_menu_type == ALL_PLAYERS) { + menu::player::for_each([=] (menu::player::player_context& p) { + menu::helpers::trigger_script_event({ rage::global::apartment_teleport, p.m_id, 0, 0, id, id }, 6, p.m_id); + }); + } else { + menu::helpers::trigger_script_event({ rage::global::apartment_teleport, player.m_id, 0, 0, id, id }, 6, player.m_id); + } + } +} + +void network_players_teleport_apartments_menu::load() { + set_name("Apartments"); + set_parent(); +} + +void network_players_teleport_apartments_menu::update() {} + +void network_players_teleport_apartments_menu::update_once() { + clear_options(0); + + for (int i = 1; i < 116; i++) { + std::string location = menu::helpers::get_location_from_id(i); + if (location.empty() || !location.compare("NULL")) continue; + + add_option(button_option(location) + .add_click([=] { teleport_player_to_apartment(menu::player::get_selected_player(), i); })); + } +} + +void network_players_teleport_apartments_menu::feature_update() {} + +network_players_teleport_apartments_menu* g_instance; +network_players_teleport_apartments_menu* network_players_teleport_apartments_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_teleport_apartments_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/teleport/network_players_teleport_apartments.h b/GTAV/src/menu/base/submenus/main/network/players/teleport/network_players_teleport_apartments.h new file mode 100644 index 0000000..bb208cb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/teleport/network_players_teleport_apartments.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_teleport_apartments_menu : public menu::submenu::submenu { +public: + static network_players_teleport_apartments_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_teleport_apartments_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::teleport::apartments::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_presets.cpp b/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_presets.cpp new file mode 100644 index 0000000..c35bfc6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_presets.cpp @@ -0,0 +1,91 @@ +#include "network_players_text_presets.h" +#include "menu/base/submenu_handler.h" +#include "../network_players_text.h" +#include "menu/base/util/helpers.h" + +using namespace network::players::text::presets::vars; + +namespace network::players::text::presets::vars { + variables m_vars; + + std::string presets[] = { + "buy Ozark at ozark.gg", "money drop at the airport", "i love penis", + "i'm actually retarded", "i don't get any action in bed", "fuck you", + "you suck", "crash me if you can loser", "spare some coochie?", + "i need love and attention", "i have no fwends :(", "PLEASE send me feet pics", + "Ozark #1", "enjoy the crash lmao" + }; +} + +void network_players_text_presets_menu::load() { + set_name("Presets"); + set_parent(); + + for (std::string& preset : presets) { + add_string(preset); + } + + add_option(toggle_option("Send Translated Preset") + .add_translate() + .add_hotkey() + .add_toggle(m_vars.m_send_tanslated) + .add_tooltip("Send the translated version of the presets")); + + add_option(button_option("IP Address") + .add_translate() + .add_click([] { + if (menu::helpers::is_valid_net_player(menu::player::get_selected_player().m_net_player)) { + uint32_t ip = menu::player::get_selected_player().m_net_player->m_player_info->m_external_ip; + + char buffer[32]; + sprintf(buffer, "%i.%i.%i.%i", ((ip & 0xFF000000) >> 24), ((ip & 0xFF0000) >> 16), ((ip & 0xFF00) >> 8), (ip & 0xFF)); + menu::player::get_selected_player().m_text_message_msg = std::string(buffer); + } + + menu::submenu::handler::set_submenu_previous(); + }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; })); + + add_option(button_option("Geo Location") + .add_translate() + .add_click([] { + if (menu::helpers::is_valid_net_player(menu::player::get_selected_player().m_net_player)) { + uint32_t ip = menu::player::get_selected_player().m_net_player->m_player_info->m_external_ip; + + auto vit = global::vars::g_geo.find(ip); + if (vit != global::vars::g_geo.end()) { + menu::player::get_selected_player().m_text_message_msg = vit->second.m_city + ", " + vit->second.m_region_name; + } + } + + menu::submenu::handler::set_submenu_previous(); + }) + .add_requirement([] { return global::vars::g_network_menu_type == SELECTED_PLAYER; })); +} + +void network_players_text_presets_menu::update() {} + +void network_players_text_presets_menu::update_once() { + clear_options(3); + + for (std::string& preset : presets) { + add_option(button_option(get_string(preset)) + .add_click([=] { + menu::player::get_selected_player().m_text_message_msg = m_vars.m_send_tanslated ? get_string(preset) : preset; + menu::submenu::handler::set_submenu_previous(); + })); + } +} + +void network_players_text_presets_menu::feature_update() {} + +network_players_text_presets_menu* g_instance; +network_players_text_presets_menu* network_players_text_presets_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_text_presets_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_presets.h b/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_presets.h new file mode 100644 index 0000000..ca4ed53 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_presets.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_text_presets_menu : public menu::submenu::submenu { +public: + static network_players_text_presets_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_text_presets_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::text::presets::vars { + struct variables { + bool m_send_tanslated; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_save.cpp b/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_save.cpp new file mode 100644 index 0000000..17c0563 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_save.cpp @@ -0,0 +1,114 @@ +#include "network_players_text_save.h" +#include "menu/base/submenu_handler.h" +#include "../network_players_text.h" +#include "util/log.h" +#include "util/dirs.h" +#include + +using namespace network::players::text::save::vars; + +namespace network::players::text::save::vars { + variables m_vars; + + void load_messages(network_players_text_save_menu* _this) { + try { + std::ifstream file(util::dirs::get_path(text_messages)); + if (file.good()) { + nlohmann::json json = nlohmann::json::parse(file); + file.close(); + + nlohmann::json& data = json["messages"]; + if (data.size()) { + m_vars.m_messages.clear(); + + for (nlohmann::json::iterator it = data.begin(); it != data.end(); ++it) { + m_vars.m_messages.push_back(std::make_pair(it.key(), it.value().get())); + } + } + } else { + std::ofstream output(util::dirs::get_path(text_messages)); + if (output.good()) { + nlohmann::json json; + json["messages"]["Hello, Friend!"] = "Hello, Friend!"; + + output << json.dump(4); + output.close(); + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + + _this->clear_options(2); + + for (std::pair message : m_vars.m_messages) { + _this->add_option(button_option(message.first) + .add_click([=] { + menu::player::get_selected_player().m_text_message_msg = message.second; + menu::submenu::handler::set_submenu_previous(); + })); + } + } + + void save(std::string name, std::string message) { + try { + std::ifstream file(util::dirs::get_path(text_messages)); + if (file.good()) { + nlohmann::json json = nlohmann::json::parse(file); + file.close(); + + json["messages"][name] = message; + + std::ofstream output(util::dirs::get_path(text_messages)); + if (output.good()) { + output << json.dump(4); + output.close(); + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } +} + +void network_players_text_save_menu::load() { + set_name("save and Load"); + set_parent(); + + add_option(button_option("Add Message") + .add_translate() + .add_keyboard("Enter your message", 100, [this] (button_option* option, const char* msg) { + std::string message = msg; + std::string temp = message; + + if (temp.size() > 32) { + temp.erase(temp.begin() + 32, temp.end()); + temp += std::string("..."); + } + + save(temp, message); + load_messages(this); + })); + + add_option(break_option("Messages") + .add_translate()); +} + +void network_players_text_save_menu::update() {} + +void network_players_text_save_menu::update_once() { + load_messages(this); +} + +void network_players_text_save_menu::feature_update() {} + +network_players_text_save_menu* g_instance; +network_players_text_save_menu* network_players_text_save_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_text_save_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_save.h b/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_save.h new file mode 100644 index 0000000..7d69a2e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/text/network_players_text_save.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_text_save_menu : public menu::submenu::submenu { +public: + static network_players_text_save_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_text_save_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::text::save::vars { + struct variables { + std::vector> m_messages; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/trolling/attachments/network_players_trolling_attachments_presets.cpp b/GTAV/src/menu/base/submenus/main/network/players/trolling/attachments/network_players_trolling_attachments_presets.cpp new file mode 100644 index 0000000..b2efa13 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/trolling/attachments/network_players_trolling_attachments_presets.cpp @@ -0,0 +1,71 @@ +#include "network_players_trolling_attachments_presets.h" +#include "menu/base/submenu_handler.h" +#include "../network_players_trolling_attachments.h" +#include "menu/base/util/control.h" + +using namespace network::players::trolling::attachments::presets::vars; + +namespace network::players::trolling::attachments::presets::vars { + variables m_vars; + + void attach(uint32_t model, menu::player::player_context& player, int bone, math::vector3 pos, math::vector3 rot) { + Entity object = native::create_object(model, pos.x, pos.y, pos.z, true, true, false); + if (native::does_entity_exist(object)) { + native::attach_entity_to_entity(object, player.m_ped, bone, pos.x, pos.y, pos.z, rot.x, rot.y, rot.z, true, true, false, true, 1, true); + } + } + + void rocket_cock() { + menu::control::request_model(joaat("prop_ld_bomb_01"), [=] (uint32_t model) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + attach(model, menu::player::get_selected_player(), 0, { 0.0f, 0.5f, -0.17f }, { 180.0f, 0.0f, 0.0f }); + } else { + menu::player::for_each([=] (menu::player::player_context& player) { + attach(model, player, 0, { 0.0f, 0.5f, -0.17f }, { 180.0f, 0.0f, 0.0f }); + }); + } + }); + } + + void snowman() { + menu::control::request_model(joaat("prop_prlg_snowpile"), [=] (uint32_t model) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + attach(model, menu::player::get_selected_player(), native::get_ped_bone_index(menu::player::get_selected_player().m_ped, 0xE0FD), { -0.2f, 0.0f, 0.05f }, { 0.0f, 90.0f, -90.0f }); + } else { + menu::player::for_each([=] (menu::player::player_context& player) { + attach(model, player, native::get_ped_bone_index(player.m_ped, 0xE0FD), { -0.2f, 0.0f, 0.05f }, { 0.0f, 90.0f, -90.0f }); + }); + } + }); + } +} + +void network_players_trolling_attachments_presets_menu::load() { + set_name("Presets"); + set_parent(); + + add_option(button_option("Rocket Cock") + .add_translate() + .add_click(rocket_cock)); + + add_option(button_option("Snowman") + .add_translate() + .add_click(snowman)); +} + +void network_players_trolling_attachments_presets_menu::update() {} + +void network_players_trolling_attachments_presets_menu::update_once() {} + +void network_players_trolling_attachments_presets_menu::feature_update() {} + +network_players_trolling_attachments_presets_menu* g_instance; +network_players_trolling_attachments_presets_menu* network_players_trolling_attachments_presets_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_trolling_attachments_presets_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/trolling/attachments/network_players_trolling_attachments_presets.h b/GTAV/src/menu/base/submenus/main/network/players/trolling/attachments/network_players_trolling_attachments_presets.h new file mode 100644 index 0000000..40d85b0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/trolling/attachments/network_players_trolling_attachments_presets.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_trolling_attachments_presets_menu : public menu::submenu::submenu { +public: + static network_players_trolling_attachments_presets_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_trolling_attachments_presets_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::trolling::attachments::presets::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_attachments.cpp b/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_attachments.cpp new file mode 100644 index 0000000..aae005f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_attachments.cpp @@ -0,0 +1,345 @@ +#include "network_players_trolling_attachments.h" +#include "menu/base/submenu_handler.h" +#include "../network_players_trolling.h" +#include "global/lists.h" +#include "util/memory/memory.h" +#include "menu/base/submenus/main/weapon/entity_gun.h" +#include "menu/base/util/control.h" +#include "attachments/network_players_trolling_attachments_presets.h" + +using namespace network::players::trolling::attachments::vars; + +namespace network::players::trolling::attachments::vars { + variables m_vars; + + scroll_struct> custom_models[100]; + + int get_model_type(uint32_t model) { + struct hash_node { + uint32_t m_model_hash; + uint16_t m_data; + uint16_t m_padding; + hash_node* m_next; + }; + + uint16_t hash_table_count = *(uint16_t*)memory::read_instruction(global::vars::g_get_model_info); + uint64_t hash_table = *(uint64_t*)memory::read_instruction(global::vars::g_get_model_info + 0x7E); + hash_node** hash_map = *(hash_node***)memory::read_instruction(global::vars::g_get_model_info + 0x21); + + for (uint16_t i = 0; i < hash_table_count; i++) { + for (hash_node* current = hash_map[i]; current; current = current->m_next) { + uint64_t element = *(uint64_t*)(hash_table + (current->m_data * 8)); + if (element) { + if (current->m_model_hash == model) { + return (int)*(uint8_t*)(element + 0x9D) & 0x1F; + } + } + } + } + + return 0; + } + + int get_custom_size() { + for (int i = 0; i < 100; i++) { + if (custom_models[i].m_result.first == 0) { + return i; + } + } + + return 0; + } + + void attach(uint32_t model, int model_type) { + menu::control::request_model(model, [=] (uint32_t m) { + std::vector> handles; + + switch (model_type) { + case 0: // ped + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + menu::player::player_context& player = menu::player::get_selected_player(); + handles.push_back({ native::create_ped(21, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, player.m_heading, true, false), player.m_id }); + } else { + menu::player::for_each([&] (menu::player::player_context& player) { + handles.push_back({ native::create_ped(21, model, player.m_coords.x, player.m_coords.y, player.m_coords.z, player.m_heading, true, false), player.m_id}); + }); + } + + break; + + case 1: // object + case 3: // flag + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + menu::player::player_context& player = menu::player::get_selected_player(); + handles.push_back({ native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, true, true, false), player.m_id}); + } else { + menu::player::for_each([&] (menu::player::player_context& player) { + handles.push_back({ native::create_object(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, true, true, false), player.m_id }); + }); + } + + break; + + case 2: // vehicle + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + menu::player::player_context& player = menu::player::get_selected_player(); + handles.push_back({ native::create_vehicle(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, player.m_heading, true, true, false), player.m_id }); + } else { + menu::player::for_each([&] (menu::player::player_context& player) { + handles.push_back({ native::create_vehicle(model, player.m_coords.x, player.m_coords.y, player.m_coords.z, player.m_heading, true, true, false), player.m_id }); + }); + } + + break; + } + + if (!handles.empty()) { + for (auto& [handle, id] : handles) { + if (!native::does_entity_exist(handle)) continue; + + math::vector3 rotation = { 0.f, 0.f, 0.f }; + if ((global::vars::g_network_menu_type == SELECTED_PLAYER && menu::player::get_selected_player().m_attachment_randomize_rotation) + || (global::vars::g_network_menu_type == ALL_PLAYERS && m_vars.m_attachment_randomize_rotation)) { + rotation = { + native::get_random_float_in_range(0.f, 360.f), + native::get_random_float_in_range(0.f, 360.f), + native::get_random_float_in_range(0.f, 360.f) + }; + } + + int bone = global::lists::g_ped_bones[global::vars::g_network_menu_type == SELECTED_PLAYER ? menu::player::get_selected_player().m_attachment_bone : m_vars.m_attachment_bone].m_result; + if ((global::vars::g_network_menu_type == SELECTED_PLAYER && menu::player::get_selected_player().m_attachment_randomize_bone) + || (global::vars::g_network_menu_type == ALL_PLAYERS && m_vars.m_attachment_randomize_bone)) { + bone = global::lists::g_ped_bones[native::get_random_int_in_range(0, 12)].m_result; + } + + native::attach_entity_to_entity(handle, menu::player::get_player(id).m_ped, native::get_ped_bone_index(menu::player::get_player(id).m_ped, bone), 0.f, 0.f, 0.f, rotation.x, rotation.y, rotation.z, true, true, false, true, 1, true); + } + } + }); + } + + void attach_random() { + uint32_t model = 0; + int type = native::get_random_int_in_range(0, 3); + + switch (type) { + case 0: + model = weapon::entity::gun::vars::peds[native::get_random_int_in_range(0, 12)].m_result; + break; + + case 1: + default: + model = weapon::entity::gun::vars::objects[native::get_random_int_in_range(0, 14)].m_result; + break; + + case 2: + model = weapon::entity::gun::vars::vehicles[native::get_random_int_in_range(0, 21)].m_result; + break; + + case 3: + model = global::lists::g_object_model_flags[native::get_random_int_in_range(0, 17)].m_result; + break; + + } + + attach(model, type); + } +} + +void network_players_trolling_attachments_menu::load() { + set_name("Attachments"); + set_parent(); + + for (int i = 0; i < 100; i++) { + custom_models[i].m_name.set(""); + custom_models[i].m_result.first = 0; + custom_models[i].m_result.second = 0; + } + + add_option(submenu_option("Presets") + .add_translate() + .add_submenu()); + + add_option(scroll_option(SCROLL, "Bone") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_attachment_bone, 0, NUMOF(global::lists::g_ped_bones), global::lists::g_ped_bones) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_attachment_bone, 0, NUMOF(global::lists::g_ped_bones), global::lists::g_ped_bones); + } else { + option->add_scroll(m_vars.m_attachment_bone, 0, NUMOF(global::lists::g_ped_bones), global::lists::g_ped_bones); + } + })); + + add_option(toggle_option("Randomize Bone") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_attachment_randomize_bone) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_attachment_randomize_bone); + } else { + option->add_toggle(m_vars.m_attachment_randomize_bone); + } + })); + + add_option(toggle_option("Randomize Rotation") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_attachment_randomize_rotation) + .add_update([] (toggle_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_toggle(menu::player::get_selected_player().m_attachment_randomize_rotation); + } else { + option->add_toggle(m_vars.m_attachment_randomize_rotation); + } + })); + + add_option(button_option("Input Custom Model") + .add_translate() + .add_keyboard("Input the model! (Hint: name, hash or numeric)", 30, [=] (button_option* option, const char* text) { + if (text) { + uint32_t hash = 0; + if (text[0] == '0' && (text[1] == 'x' || text[1] == 'X')) { + // hash + hash = (uint32_t)_strtoui64(text, 0, 0); + } else { + std::string str_name(text); + if (std::find_if(str_name.begin(), str_name.end(), [] (unsigned char c) { return !std::isdigit(c); }) == str_name.end()) { + // numeric + hash = (uint32_t)atoi(text); + } else { + // name + hash = native::get_hash_key(text); + } + } + + if (hash) { + int type = get_model_type(hash); + if (type == 1 || type == 5 || type == 6) { + for (int i = 0; i < 100; i++) { + if (custom_models[i].m_result.first == 0x0) { + custom_models[i].m_name = localization(text, false); + custom_models[i].m_result.first = hash; + custom_models[i].m_result.second = 0; + + switch (type) { + case 1: // object + custom_models[i].m_result.second = 1; + break; + + case 5: // vehicle + custom_models[i].m_result.second = 2; + break; + + case 6: // ped + custom_models[i].m_result.second = 0; + break; + } + + // vehicle + if (type == 5) { + const char* label = native::get_display_name_from_vehicle_model(hash); + if (label) { + label = native::get_label_text(label); + if (strcmp(label, "NULL")) { + custom_models[i].m_name = localization(label, false); + + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + menu::player::get_selected_player().m_attachment_custom = i; + } else { + m_vars.m_attachment_custom = i; + } + } + } + } + + break; + } + } + } + } + } + })); + + add_option(scroll_option(SCROLLSELECT, "Peds") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_attachment_peds, 0, 12, weapon::entity::gun::vars::peds) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_attachment_peds, 0, 12, weapon::entity::gun::vars::peds); + } else { + option->add_scroll(m_vars.m_attachment_peds, 0, 12, weapon::entity::gun::vars::peds); + } + }) + .add_click([] { attach(weapon::entity::gun::vars::peds[global::vars::g_network_menu_type == SELECTED_PLAYER ? menu::player::get_selected_player().m_attachment_peds : m_vars.m_attachment_peds].m_result, 0); })); + + add_option(scroll_option(SCROLLSELECT, "Objects") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_attachment_objects, 0, 14, weapon::entity::gun::vars::objects) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_attachment_objects, 0, 14, weapon::entity::gun::vars::objects); + } else { + option->add_scroll(m_vars.m_attachment_objects, 0, 14, weapon::entity::gun::vars::objects); + } + }) + .add_click([] { attach(weapon::entity::gun::vars::objects[global::vars::g_network_menu_type == SELECTED_PLAYER ? menu::player::get_selected_player().m_attachment_objects : m_vars.m_attachment_objects].m_result, 1); })); + + add_option(scroll_option(SCROLLSELECT, "Vehicles") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_attachment_vehicles, 0, 21, weapon::entity::gun::vars::vehicles) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_attachment_vehicles, 0, 21, weapon::entity::gun::vars::vehicles); + } else { + option->add_scroll(m_vars.m_attachment_vehicles, 0, 21, weapon::entity::gun::vars::vehicles); + } + }) + .add_click([] { attach(weapon::entity::gun::vars::vehicles[global::vars::g_network_menu_type == SELECTED_PLAYER ? menu::player::get_selected_player().m_attachment_vehicles : m_vars.m_attachment_vehicles].m_result, 2); })); + + add_option(scroll_option(SCROLLSELECT, "Flags") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_attachment_flags, 0, NUMOF(global::lists::g_object_model_flags), global::lists::g_object_model_flags) + .add_update([] (scroll_option* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_attachment_flags, 0, NUMOF(global::lists::g_object_model_flags), global::lists::g_object_model_flags); + } else { + option->add_scroll(m_vars.m_attachment_flags, 0, NUMOF(global::lists::g_object_model_flags), global::lists::g_object_model_flags); + } + }) + .add_click([] { attach(global::lists::g_object_model_flags[global::vars::g_network_menu_type == SELECTED_PLAYER ? menu::player::get_selected_player().m_attachment_flags : m_vars.m_attachment_flags].m_result, 3); })); + + add_option(scroll_option>(SCROLLSELECT, "Custom") + .add_translate() + .add_scroll(menu::player::get_selected_player().m_attachment_custom, 0, 1, custom_models) + .add_update([] (scroll_option>* option, int pos) { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + option->add_scroll(menu::player::get_selected_player().m_attachment_custom, 0, get_custom_size(), custom_models); + } else { + option->add_scroll(m_vars.m_attachment_custom, 0, get_custom_size(), custom_models); + } + }) + .add_click([] { attach(custom_models[global::vars::g_network_menu_type == SELECTED_PLAYER ? menu::player::get_selected_player().m_attachment_custom : m_vars.m_attachment_custom].m_result.second, custom_models[global::vars::g_network_menu_type == SELECTED_PLAYER ? menu::player::get_selected_player().m_attachment_custom : m_vars.m_attachment_custom].m_result.first); }) + .add_requirement([] { return get_custom_size() > 0; })); + + add_option(button_option("Attach Random Entity") + .add_translate() + .add_click(attach_random)); +} + +void network_players_trolling_attachments_menu::update() {} + +void network_players_trolling_attachments_menu::update_once() {} + +void network_players_trolling_attachments_menu::feature_update() {} + +network_players_trolling_attachments_menu* g_instance; +network_players_trolling_attachments_menu* network_players_trolling_attachments_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_trolling_attachments_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_attachments.h b/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_attachments.h new file mode 100644 index 0000000..c82138b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_attachments.h @@ -0,0 +1,31 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_players_trolling_attachments_menu : public menu::submenu::submenu { +public: + static network_players_trolling_attachments_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_trolling_attachments_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::trolling::attachments::vars { + struct variables { + int m_attachment_bone; + int m_attachment_custom; + int m_attachment_peds; + int m_attachment_vehicles; + int m_attachment_objects; + int m_attachment_flags; + + bool m_attachment_randomize_bone; + bool m_attachment_randomize_rotation; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_sounds.cpp b/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_sounds.cpp new file mode 100644 index 0000000..933e2e9 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_sounds.cpp @@ -0,0 +1,77 @@ +#include "network_players_trolling_sounds.h" +#include "menu/base/submenu_handler.h" +#include "../network_players_trolling.h" +#include "global/lists.h" + +using namespace network::players::trolling::sounds::vars; + +namespace network::players::trolling::sounds::vars { + variables m_vars; + + void start_sound(menu::player::player_context& player, std::pair sound, bool add, int optionid) { + int sound_id = native::get_sound_id(); + native::play_sound_from_coord(sound_id, sound.first, player.m_coords.x, player.m_coords.y, player.m_coords.z, sound.second, true, 0, true); + + if (add) { + m_vars.m_sounds[optionid] = sound_id; + } + } +} + +void network_players_trolling_sounds_menu::load() { + set_name("Sounds"); + set_parent(); + + add_option(button_option("Stop All") + .add_translate() + .add_click([] { + for (auto& sound : m_vars.m_sounds) { + native::stop_sound(sound.second); + } + })); + + add_option(break_option("Sounds") + .add_translate()); + + for (int i = 0; i < NUMOF(global::lists::g_sounds); i++) { + scroll_struct>& arr = global::lists::g_sounds[i]; + + m_vars.m_option_cache.push_back(add_option(button_option(arr.m_name.get()) + .add_translate() + .add_update([=] (button_option* option) { option->set_name(global::lists::g_sounds[i].m_name.get()); }) + .add_click([=] { + if (global::vars::g_network_menu_type == SELECTED_PLAYER) { + start_sound(menu::player::get_selected_player(), arr.m_result, true, i); + } else { + menu::player::for_each([=] (menu::player::player_context& player) { + start_sound(player, arr.m_result, true, i); + }); + } + }))); + } +} + +void network_players_trolling_sounds_menu::update() { + for (auto& sound : m_vars.m_sounds) { + if (native::has_sound_finished(sound.second)) { + m_vars.m_option_cache[sound.first]->remove_sprite(); + } else { + m_vars.m_option_cache[sound.first]->add_sprite({ "commonmenu", "shop_tick_icon" }).add_sprite_scale({ 0.022f, 0.039f }); + } + } +} + +void network_players_trolling_sounds_menu::update_once() {} + +void network_players_trolling_sounds_menu::feature_update() {} + +network_players_trolling_sounds_menu* g_instance; +network_players_trolling_sounds_menu* network_players_trolling_sounds_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_players_trolling_sounds_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_sounds.h b/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_sounds.h new file mode 100644 index 0000000..61691c7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/players/trolling/network_players_trolling_sounds.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/player_manager.h" + +class network_players_trolling_sounds_menu : public menu::submenu::submenu { +public: + static network_players_trolling_sounds_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_players_trolling_sounds_menu() + : menu::submenu::submenu() {} +}; + +namespace network::players::trolling::sounds::vars { + struct variables { + std::unordered_map m_sounds; + std::vector> m_option_cache; + }; + + void start_sound(menu::player::player_context& player, std::pair sound, bool add = true, int optionid = 0); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_permanent.cpp b/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_permanent.cpp new file mode 100644 index 0000000..c08c5d3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_permanent.cpp @@ -0,0 +1,250 @@ +#include "network_recent_players_permanent.h" +#include "menu/base/submenu_handler.h" +#include "../network_recent_players.h" +#include "network_recent_players_selected.h" +#include "rage/engine.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/panels.h" +#include "util/dirs.h" +#include "util/log.h" +#include "util/threads.h" + +#include "menu/base/util/textures.h" +#include + +using namespace network::recents::permanent::vars; + +namespace network::recents::permanent::vars { + variables m_vars; + + void load_players() { + try { + nlohmann::json json; + + std::ifstream file(util::dirs::get_path(recent_players)); + if (file.good()) { + json = nlohmann::json::parse(file); + file.close(); + } + + json = json["perm"]; + + network::recents::vars::m_vars.m_permanent_players.clear(); + for (nlohmann::json::iterator it = json.begin(); it != json.end(); ++it) { + network::recents::vars::recent_player o; + strcpy_s(o.m_name, it.value()["name"].get().c_str()); + if (strlen(o.m_name) == 0) strcpy_s(o.m_name, "Invalid Name"); + + strcpy_s(o.m_ip, it.value()["ip"].get().c_str()); + strcpy_s(o.m_first_encountered, it.value()["first encountered"].get().c_str()); + strcpy_s(o.m_last_encountered, it.value()["last encountered"].get().c_str()); + + o.m_internal_encountered = it.value()["internal"].get(); + o.m_rockstar_id = std::stoull(it.key()); + + if (network::recents::vars::m_vars.m_permanent_players.size() == 100) break; + if (o.m_rockstar_id > 0x1000) m_vars.m_queue.push_back(o.m_rockstar_id); + network::recents::vars::m_vars.m_permanent_players.push_back({ it.key(), o }); + } + + if (!network::recents::vars::m_vars.m_permanent_players.empty()) { + uint32_t* rids = new uint32_t[network::recents::vars::m_vars.m_permanent_players.size()]; + + for (std::size_t i = 0; i < network::recents::vars::m_vars.m_permanent_players.size(); i++) { + rids[i] = (uint32_t)network::recents::vars::m_vars.m_permanent_players[i].second.m_rockstar_id; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)network::recents::vars::m_vars.m_permanent_players.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + util::threads::add_job([](void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + rage::ros::send_stat_requests(ridss, (int)count); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + + if (menu::submenu::handler::get_current() != network_recent_players_permanent_menu::get()) { + if (std::find_if(begin(m_vars.m_image_queue), end(m_vars.m_image_queue), [=](uint64_t rid) { return (uint32_t)rid == ridss[i]; }) == end(m_vars.m_image_queue)) m_vars.m_image_queue.push_back(ridss[i]); + return; + } + + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } + + std::sort(begin(network::recents::vars::m_vars.m_permanent_players), end(network::recents::vars::m_vars.m_permanent_players), [](std::pair& first, std::pair& second) { return first.second.m_internal_encountered > second.second.m_internal_encountered; }); + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } +} + +void network_recent_players_permanent_menu::load() { + set_name("Permanent"); + set_parent(); + + add_string("~m~None"); +} + +void network_recent_players_permanent_menu::update() { + static int timers[2] = { 0, 0 }; + static bool update_players = true; + static bool update_online = true; + + menu::timers::run_timed(&timers[0], 1000, [] { update_players = true; }); + menu::timers::run_timed(&timers[1], 4000, [] { update_online = true; }); + + if (update_players) { + update_players = false; + + clear_options(0); + + if (network::recents::vars::m_vars.m_permanent_players.size()) { + for (std::size_t i = 0; i < network::recents::vars::m_vars.m_permanent_players.size(); i++) { + std::pair& player = network::recents::vars::m_vars.m_permanent_players[i]; + + bool in_session = false; + menu::player::for_each([&](menu::player::player_context& pl) { + if (pl.m_net_player) { + if (pl.m_net_player->m_player_info) { + if (pl.m_net_player->m_player_info->m_identifier.m_rockstar_id == player.second.m_rockstar_id) { + in_session = true; + } + } + } + }, true); + + add_option(submenu_option(util::va::va("%s%s", (global::vars::g_online_rockstar_ids[player.second.m_rockstar_id].first || in_session) ? "" : "~m~", player.second.m_name)) + .add_click([=] { + network::recents::selected::vars::m_vars.m_type = 2; + network::recents::selected::vars::m_vars.m_selected_player = i; + network::recents::vars::m_vars.m_selected_list = &network::recents::vars::m_vars.m_permanent_players; + }) + .add_submenu() + .add_hover([=](submenu_option*) { + menu::panels::panel_parent* parent = menu::panels::get_parent("PANEL_RECENT_PLAYER"); + if (parent) { + menu::panels::panel_custom_recent_player str; + str.m_in_session = in_session; + str.m_online = global::vars::g_online_rockstar_ids[player.second.m_rockstar_id].first || in_session; + str.m_rockstar_id = player.second.m_rockstar_id; + str.m_session_type = str.m_online ? global::vars::g_online_rockstar_ids[player.second.m_rockstar_id].second : -1; + strcpy(str.m_first_encountered, player.second.m_first_encountered); + strcpy(str.m_last_encountered, player.second.m_last_encountered); + strcpy(str.m_name, player.second.m_name); + strcpy(str.m_ip, player.second.m_ip); + + if (global::vars::g_read_stats_by_gamer_results.contains(player.second.m_rockstar_id)) { + str.m_has_stats = true; + memcpy(&str.m_stats, &global::vars::g_read_stats_by_gamer_results[player.second.m_rockstar_id], sizeof(str.m_stats)); + } else { + str.m_has_stats = false; + } + + menu::panels::set_structure(menu::panels::get_child(parent, "PANEL_RECENT_PLAYER_INFO"), (void*)&str, sizeof(str)); + parent->m_render = true; + } + }) + .add_update([=](submenu_option* option, int pos) { + menu::textures::texture_context context; + if (menu::textures::get_texture(std::string("playerimg_" + std::to_string(player.second.m_rockstar_id)), &context)) { + option->add_offset(0.016f); + + menu::renderer::draw_rect_unaligned({ global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, { 200, 200, 200, 255 }); + menu::renderer::draw_sprite({ "ozarkplayerimg", context.m_name }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, 0.f, { 255, 255, 255, 255 }); + } + })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } + } + + if (update_online) { + update_online = false; + + for (std::size_t i = 0; i < m_vars.m_queue.size(); i++) { + auto vit = std::find_if(begin(global::vars::g_online_rockstar_ids_queue), end(global::vars::g_online_rockstar_ids_queue), [=](uint64_t value) { + return value == m_vars.m_queue[i]; + }); + + if (vit == end(global::vars::g_online_rockstar_ids_queue)) { + global::vars::g_online_rockstar_ids_queue.push_back(m_vars.m_queue[i]); + } + } + + std::size_t process_size = m_vars.m_queue.size() > 32 ? 32 : m_vars.m_queue.size(); + + rage::network::rockstar_identifier* identifiers = (rage::network::rockstar_identifier*)malloc(process_size * sizeof(rage::network::rockstar_identifier)); + memset(identifiers, 0, process_size * sizeof(rage::network::rockstar_identifier)); + + for (std::size_t i = 0; i < process_size; i++) { + identifiers[i].m_rockstar_id = m_vars.m_queue.back(); + identifiers[i].m_type = 3; + m_vars.m_queue.pop_back(); + } + + native::clear_gamer_task_data(); + rage::engine::send_session_info_request(identifiers, (int)process_size); + free(identifiers); + + // recreate the queue + if (m_vars.m_queue.size() == 0) { + for (std::size_t i = 0; i < network::recents::vars::m_vars.m_permanent_players.size(); i++) { + m_vars.m_queue.push_back(network::recents::vars::m_vars.m_permanent_players[i].second.m_rockstar_id); + } + } + } +} + +void network_recent_players_permanent_menu::update_once() { + load_players(); + + if (!m_vars.m_image_queue.empty()) { + uint32_t* rids = new uint32_t[m_vars.m_image_queue.size()]; + + for (std::size_t i = 0; i < m_vars.m_image_queue.size(); i++) { + rids[i] = (uint32_t)m_vars.m_image_queue[i]; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)m_vars.m_image_queue.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + m_vars.m_image_queue.clear(); + + util::threads::add_job([](void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } +} + +void network_recent_players_permanent_menu::feature_update() {} + +network_recent_players_permanent_menu* g_instance; +network_recent_players_permanent_menu* network_recent_players_permanent_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_recent_players_permanent_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_permanent.h b/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_permanent.h new file mode 100644 index 0000000..33aea5a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_permanent.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_recent_players_permanent_menu : public menu::submenu::submenu { +public: + static network_recent_players_permanent_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_recent_players_permanent_menu() + : menu::submenu::submenu() {} +}; + +namespace network::recents::permanent::vars { + struct variables { + std::vector m_image_queue; + std::vector m_queue; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_selected.cpp b/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_selected.cpp new file mode 100644 index 0000000..051c5b0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_selected.cpp @@ -0,0 +1,164 @@ +#include "network_recent_players_selected.h" +#include "menu/base/submenu_handler.h" +#include "../network_recent_players.h" +#include "network_recent_players_permanent.h" +#include "util/log.h" +#include "util/dirs.h" +#include "rage/engine.h" +#include "menu/base/util/panels.h" +#include "menu/base/submenus/main/network/search/network_player_search_selected.h" +#include "menu/base/submenus/main/network/session/network_session_overseer.h" +#include + +using namespace network::recents::selected::vars; + +namespace network::recents::selected::vars { + variables m_vars; + + void add_to_permanent() { + try { + nlohmann::json json; + + std::ifstream file(util::dirs::get_path(recent_players)); + if (file.good()) { + json = nlohmann::json::parse(file); + file.close(); + + std::ofstream output(util::dirs::get_path(recent_players)); + if (output.good()) { + network::recents::vars::recent_player p = network::recents::vars::m_vars.m_selected_list->at(m_vars.m_selected_player).second; + json["perm"][std::to_string(p.m_rockstar_id)]["name"] = p.m_name; + json["perm"][std::to_string(p.m_rockstar_id)]["ip"] = p.m_ip; + json["perm"][std::to_string(p.m_rockstar_id)]["first encountered"] = p.m_first_encountered; + json["perm"][std::to_string(p.m_rockstar_id)]["last encountered"] = p.m_last_encountered; + json["perm"][std::to_string(p.m_rockstar_id)]["internal"] = p.m_internal_encountered; + output << json.dump(4); + output.close(); + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + void remove_from_permanent() { + try { + nlohmann::json json; + + std::ifstream file(util::dirs::get_path(recent_players)); + if (file.good()) { + json = nlohmann::json::parse(file); + file.close(); + + std::ofstream output(util::dirs::get_path(recent_players)); + if (output.good()) { + network::recents::vars::recent_player p = network::recents::vars::m_vars.m_selected_list->at(m_vars.m_selected_player).second; + json["perm"][std::to_string(p.m_rockstar_id)].clear(); + output << json.dump(4); + output.close(); + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + void add_to_overseer() { + network::recents::vars::recent_player p = network::recents::vars::m_vars.m_selected_list->at(m_vars.m_selected_player).second; + network::session::overseer::vars::save(p.m_name, p.m_rockstar_id, "Recent Player"); + } +} + +void network_recent_players_selected_menu::load() { + set_name("Recent Player"); + set_parent(); + + add_option(button_option("Add to Permanent List") + .add_translate() + .add_click(add_to_permanent) + .add_requirement([] { return m_vars.m_type == 1; })); + + add_option(button_option("Add to Overseer") + .add_translate() + .add_click(add_to_overseer)); + + add_option(button_option("Show Profile") + .add_translate() + .add_click([] { + rage::network::network_handle handle; + native::network_handle_from_user_id(std::to_string(network::recents::vars::m_vars.m_selected_list->at(m_vars.m_selected_player).second.m_rockstar_id).c_str(), &handle.m_handle, sizeof(handle) / 4); + native::network_show_profile_ui(&handle.m_handle); + })); + + add_option(button_option("Send Friend Request") + .add_translate() + .add_click([] { rage::engine::send_friend_request(network::recents::vars::m_vars.m_selected_list->at(m_vars.m_selected_player).second.m_rockstar_id); })); + + add_option(button_option("Invite to Session") + .add_translate() + .add_click([] { rage::engine::invite_player(network::recents::vars::m_vars.m_selected_list->at(m_vars.m_selected_player).second.m_rockstar_id); })); + + add_option(button_option("Join Player") + .add_translate() + .add_click([] { network::player::search::selected::vars::join_player(network::recents::vars::m_vars.m_selected_list->at(m_vars.m_selected_player).second.m_rockstar_id); })); + + add_option(button_option("Remove from Permanent") + .add_translate() + .add_click(remove_from_permanent) + .add_requirement([] { return m_vars.m_type != 1; })); +} + +void network_recent_players_selected_menu::update() {} + +void network_recent_players_selected_menu::update_once() { + if (m_vars.m_type == 1) { + set_parent(); + } else { + set_parent(); + } + + auto& [strr, rec] = network::recents::vars::m_vars.m_selected_list->at(m_vars.m_selected_player); + + bool in_session = false; + menu::player::for_each([&](menu::player::player_context& pl) { + if (pl.m_net_player) { + if (pl.m_net_player->m_player_info) { + if (pl.m_net_player->m_player_info->m_identifier.m_rockstar_id == rec.m_rockstar_id) { + in_session = true; + } + } + } + }, true); + + menu::panels::panel_custom_recent_player str; + str.m_in_session = in_session; + str.m_online = global::vars::g_online_rockstar_ids[rec.m_rockstar_id].first || in_session; + str.m_rockstar_id = rec.m_rockstar_id; + str.m_session_type = str.m_online ? global::vars::g_online_rockstar_ids[rec.m_rockstar_id].second : -1; + strcpy(str.m_first_encountered, rec.m_first_encountered); + strcpy(str.m_last_encountered, rec.m_last_encountered); + strcpy(str.m_name, rec.m_name); + strcpy(str.m_ip, rec.m_ip); + + if (global::vars::g_read_stats_by_gamer_results.contains(rec.m_rockstar_id)) { + str.m_has_stats = true; + memcpy(&str.m_stats, &global::vars::g_read_stats_by_gamer_results[rec.m_rockstar_id], sizeof(str.m_stats)); + } else { + str.m_has_stats = false; + } + + menu::panels::set_structure(menu::panels::get_child(menu::panels::get_parent("PANEL_RECENT_PLAYER"), "PANEL_RECENT_PLAYER_INFO"), (void*)&str, sizeof(str)); +} + +void network_recent_players_selected_menu::feature_update() {} + +network_recent_players_selected_menu* g_instance; +network_recent_players_selected_menu* network_recent_players_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_recent_players_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_selected.h b/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_selected.h new file mode 100644 index 0000000..8d1293b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/recent/network_recent_players_selected.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_recent_players_selected_menu : public menu::submenu::submenu { +public: + static network_recent_players_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_recent_players_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace network::recents::selected::vars { + struct variables { + int m_type; + std::size_t m_selected_player; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/search/network_player_search_selected.cpp b/GTAV/src/menu/base/submenus/main/network/search/network_player_search_selected.cpp new file mode 100644 index 0000000..5f096c2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/search/network_player_search_selected.cpp @@ -0,0 +1,135 @@ +#include "network_player_search_selected.h" +#include "menu/base/submenu_handler.h" +#include "../network_player_search_join.h" +#include "rage/engine.h" +#include "util/memory/memory.h" +#include "util/caller.h" +#include "util/util.h" +#include "util/log.h" +#include "menu/base/submenus/main/network/spoofing/network_spoofing_rid.h" + +using namespace network::player::search::selected::vars; + +namespace network::player::search::selected::vars { + variables m_vars; + + void join_player(uint64_t rockstar_id) { + rage::network::rockstar_identifier* identifier = new rage::network::rockstar_identifier(); + identifier->m_rockstar_id = rockstar_id; + identifier->m_type = 3; + + global::vars::g_gs_info_requests.push_back({ false, 2, rockstar_id, GetTickCount() + 10000, [=](std::string gs, uint64_t rid) { + rage::network::gs_session session; + if (rage::engine::get_session_info_from_gs(&session, gs.c_str())) { + rage::network::game_invite* invite = new rage::network::game_invite(); + invite->h = network::spoofing::rid::vars::m_vars.m_spoofing_rid; + invite->h2 = 3; + invite->if_ = -1; + invite->it = -1; + invite->f = 0xA000; + invite->gm = 0; + invite->cc = network::spoofing::rid::vars::m_vars.m_spoofing_rid; + invite->cc2 = 3; + invite->l = 0; // 0 + invite->p = 0; + invite->cr = 0; + invite->u = 0; + invite->d = 889455970; + invite->jq = 0; + strcpy(invite->s, gs.c_str()); + strcpy(invite->c, ""); + strcpy(invite->mid, ""); + strcpy(invite->n, util::create_random_string(10).c_str()); + + memcpy(&invite->gssession_start, &session, sizeof(session)); + + memory::write_vector(global::vars::g_hack_patches["JOINP"].m_address, global::vars::g_hack_patches["JOINP"].m_patch); + + char* x2 = new char[500]; + memset(x2, 0, 500); + + if (global::vars::g_network_base_config) { + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + real_config->set_network_session_was_invited(false); + } + + caller::call(global::vars::g_create_game_invite_presence, x2, global::vars::g_send_game_invite_presence_table); + caller::call(global::vars::g_send_game_invite_presence, invite, x2); + + memory::write_vector(global::vars::g_hack_patches["JOINP"].m_address, global::vars::g_hack_patches["JOINP"].m_bytes); + + delete invite; + delete[] x2; + } + } }); + + native::clear_gamer_task_data(); + rage::engine::send_session_info_request(identifier, 1); + delete identifier; + } +} + +void network_player_search_selected_menu::load() { + set_parent(); + + add_option(button_option("Show Profile") + .add_translate() + .add_click([] { + rage::network::network_handle handle; + native::network_handle_from_user_id(std::to_string(m_vars.m_selected->m_rockstar_id).c_str(), &handle.m_handle, sizeof(handle) / 4); + native::network_show_profile_ui(&handle.m_handle); + })); + + add_option(button_option("Send Friend Request") + .add_translate() + .add_click([] { rage::engine::send_friend_request(m_vars.m_selected->m_rockstar_id); })); + + add_option(button_option("Invite to Session") + .add_translate() + .add_click([] { rage::engine::invite_player(m_vars.m_selected->m_rockstar_id); })); + + add_option(button_option("Join Player") + .add_translate() + .add_click([] { join_player(m_vars.m_selected->m_rockstar_id); })); + + add_string("Failed to find a session for that player, they may be offline"); +} + +void network_player_search_selected_menu::update() {} + +void network_player_search_selected_menu::update_once() { + set_name(m_vars.m_selected->m_name, false, false); +} + +void network_player_search_selected_menu::feature_update() { + if (!global::vars::g_gs_info_requests.empty()) { + for (std::size_t i = 0; i < global::vars::g_gs_info_requests.size(); i++) { + if (global::vars::g_gs_info_requests[i].m_type == 2) { + if (global::vars::g_gs_info_requests[i].m_finished) { + global::vars::g_gs_info_requests.erase(global::vars::g_gs_info_requests.begin() + i); + continue; + } + + if (global::vars::g_gs_info_requests[i].m_expiry < GetTickCount()) { + menu::notify::stacked(get_name().get(), get_string("Failed to find a session for that player, they may be offline"), global::ui::g_error); + global::vars::g_gs_info_requests.erase(global::vars::g_gs_info_requests.begin() + i); + } + } + } + } +} + +network_player_search_selected_menu* g_instance; +network_player_search_selected_menu* network_player_search_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_player_search_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/search/network_player_search_selected.h b/GTAV/src/menu/base/submenus/main/network/search/network_player_search_selected.h new file mode 100644 index 0000000..6097279 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/search/network_player_search_selected.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" +#include "rage/api/api.h" + +class network_player_search_selected_menu : public menu::submenu::submenu { +public: + static network_player_search_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_player_search_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace network::player::search::selected::vars { + struct variables { + rage::api::rockstar_account* m_selected; + }; + + void join_player(uint64_t rockstar_id); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/session/network_session_excludes.cpp b/GTAV/src/menu/base/submenus/main/network/session/network_session_excludes.cpp new file mode 100644 index 0000000..2d203ab --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/session/network_session_excludes.cpp @@ -0,0 +1,55 @@ +#include "network_session_excludes.h" +#include "menu/base/submenu_handler.h" +#include "../network_session.h" + +using namespace network::session::excludes::vars; + +namespace network::session::excludes::vars { + variables m_vars; +} + +void network_session_excludes_menu::load() { + set_name("Excludes"); + set_parent(); + + add_option(toggle_option("Exclude Self") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_self)); + + add_option(toggle_option("Exclude Friends") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_friends)); + + add_option(toggle_option("Exclude Modders") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_modders)); + + add_option(toggle_option("Exclude Host") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_host)); + + add_option(toggle_option("Exclude Script host") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_script_host)); + + add_option(toggle_option("Exclude Rockstar Developers") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rockstar_developers)); +} + +void network_session_excludes_menu::update() {} + +void network_session_excludes_menu::update_once() {} + +void network_session_excludes_menu::feature_update() {} + +network_session_excludes_menu* g_instance; +network_session_excludes_menu* network_session_excludes_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_session_excludes_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/session/network_session_excludes.h b/GTAV/src/menu/base/submenus/main/network/session/network_session_excludes.h new file mode 100644 index 0000000..b0e1770 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/session/network_session_excludes.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_session_excludes_menu : public menu::submenu::submenu { +public: + static network_session_excludes_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_session_excludes_menu() + : menu::submenu::submenu() {} +}; + +namespace network::session::excludes::vars { + struct variables { + bool m_self = true; + bool m_friends; + bool m_modders; + bool m_host; + bool m_script_host; + bool m_rockstar_developers; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/session/network_session_overseer.cpp b/GTAV/src/menu/base/submenus/main/network/session/network_session_overseer.cpp new file mode 100644 index 0000000..a0614e3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/session/network_session_overseer.cpp @@ -0,0 +1,441 @@ +#include "network_session_overseer.h" +#include "menu/base/submenu_handler.h" +#include "../network_session.h" +#include "util/log.h" +#include "util/dirs.h" +#include "menu/base/util/timers.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "menu/base/submenus/main/network/players/network_players_abusive.h" +#include "menu/base/submenus/main/network/players/network_players_trolling.h" +#include "menu/base/submenus/main/network/players/network_players_removals.h" +#include "rage/engine.h" +#include "overseer/network_session_overseer_selected.h" +#include "util/threads.h" + +#include "menu/base/util/panels.h" +#include "menu/base/util/textures.h" +#include + +using namespace network::session::overseer::vars; + +namespace network::session::overseer::vars { + variables m_vars; + + void load_players(bool ros = false) { + network_session_overseer_menu* _this = network_session_overseer_menu::get(); + _this->clear_options(2); + m_vars.m_players.clear(); + + try { + std::ifstream input(util::dirs::get_path(overseer)); + if (input.good()) { + nlohmann::json json = nlohmann::json::parse(input); + input.close(); + + for (auto it = json.begin(); it != json.end(); ++it) { + overseer player; + player.m_flags = it.value()["flags"].get(); + player.m_name = it.value()["name"].get(); + player.m_reason = it.value()["reason added"].get(); + player.m_rockstar_id = std::stoi(it.key()); + m_vars.m_players.push_back(player); + + if (player.m_rockstar_id > 0x1000) m_vars.m_queue.push_back(player.m_rockstar_id); + } + + if (!m_vars.m_players.empty() && ros) { + uint32_t* rids = new uint32_t[m_vars.m_players.size()]; + + for (std::size_t i = 0; i < m_vars.m_players.size(); i++) { + rids[i] = (uint32_t)m_vars.m_players[i].m_rockstar_id; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)m_vars.m_players.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + util::threads::add_job([] (void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + rage::ros::send_stat_requests(ridss, (int)count); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + + if (menu::submenu::handler::get_current() != network_session_overseer_menu::get()) { + if (std::find_if(begin(m_vars.m_image_queue), end(m_vars.m_image_queue), [=] (uint64_t rid) { return (uint32_t)rid == ridss[i]; }) == end(m_vars.m_image_queue)) m_vars.m_image_queue.push_back(ridss[i]); + return; + } + + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + + if (m_vars.m_players.empty()) { + _this->add_option(button_option(_this->get_string("~m~None"))); + } + } + + void save(std::string name, uint64_t rid, std::string reason) { + auto vit = std::find_if(begin(m_vars.m_players), end(m_vars.m_players), [=] (overseer& element) { return element.m_rockstar_id == rid; }); + if (vit == end(m_vars.m_players)) { + try { + nlohmann::json json; + + std::ifstream input(util::dirs::get_path(overseer)); + if (input.good()) { + json = nlohmann::json::parse(input); + input.close(); + } + + json[std::to_string(rid)]["name"] = name; + json[std::to_string(rid)]["reason added"] = reason; + json[std::to_string(rid)]["flags"] = OVERSEER_ENABLED | OVERSEER_NOTIFY; + + std::ofstream output(util::dirs::get_path(overseer)); + if (output.good()) { + output << json.dump(4); + output.close(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + + load_players(); + } + } + + bool process_join_request(uint64_t rid, std::string name) { + auto vit = std::find_if(begin(m_vars.m_players), end(m_vars.m_players), [=] (overseer& o) { + return o.m_rockstar_id == rid; + }); + + if (vit != end(m_vars.m_players)) { + if ((vit->m_flags & OVERSEER_ENABLED) > 0 && (vit->m_flags & OVERSEER_BLOCK_JOIN) > 0) { + if ((vit->m_flags & OVERSEER_NOTIFY) > 0) { + network_session_overseer_menu* _this = network_session_overseer_menu::get(); + menu::notify::stacked(_this->get_name().get(), util::va::va("%s %s %s", _this->get_string("Prevented").c_str(), name.c_str(), _this->get_string("joining (enabled in your Overseer configuration)").c_str())); + } + + return true; + } + } + + return false; + } + + void process_join_notify(uint64_t rid, std::string name) { + auto vit = std::find_if(begin(m_vars.m_players), end(m_vars.m_players), [=] (overseer& o) { + return o.m_rockstar_id == rid; + }); + + if (vit != end(m_vars.m_players)) { + if ((vit->m_flags & OVERSEER_ENABLED) > 0 && (vit->m_flags & OVERSEER_NOTIFY) > 0) { + network_session_overseer_menu* _this = network_session_overseer_menu::get(); + menu::notify::stacked(_this->get_name().get(), util::va::va("%s %s", name.c_str(), _this->get_string("(enabled in your Overseer configuration) is joining").c_str())); + } + } + } + + void process_event(Player id, int flag) { + util::fiber::pool::add([=] { + menu::player::player_context& player = menu::player::get_player(id); + if (!player.m_connected) return; + + if (flag & OVERSEER_EXPLODE) { + native::add_explosion(player.m_coords.x, player.m_coords.y, player.m_coords.z, 0, 10.f, true, false, 0.f, false); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_CRASH) { + network::players::removals::vars::crash(player); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_KICK) { + if (menu::player::get_local_player().m_is_script_host) { + network::players::removals::vars::script_host_kick(player); + util::fiber::sleep(250); + } + + if (rage::engine::get_host_net_game_player() == menu::player::get_local_player().m_net_player) { + network::players::removals::vars::session_host_kick(player); + util::fiber::sleep(250); + } else { + if (rage::engine::get_host_net_game_player() != player.m_net_player) { + network::players::removals::vars::break_freemode_kick(player); + util::fiber::sleep(250); + } + } + } + + if (flag & OVERSEER_CAGE) { + network::players::abusive::vars::cage_player(player, 2); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_KICK_FROM_VEHICLE) { + network::players::abusive::vars::kick_from_vehicle(player); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_SET_ON_FIRE) { + network::players::abusive::vars::set_on_fire(player); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_RAGDOLL) { + network::players::abusive::vars::ragdoll(player); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_GLITCH_PHYSICS) { + network::players::abusive::vars::glitch_physics(player); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_BLACK_SCREEN) { + network::players::trolling::vars::black_screen(player); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_BLAME) { + network::players::abusive::vars::blame(player); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_GIVE_WANTED_LEVEL) { + network::players::abusive::vars::give_wanted_level(player, 1); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_SEND_TO_ISLAND) { + network::players::abusive::vars::send_to_island(player); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_REMOVE_WEAPONS) { + native::remove_all_ped_weapons(player.m_ped, true); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_HOSTILE_CLONE) { + player.m_clone_type = 1; + network::players::abusive::vars::clone_player(player, player.m_clone_type); + util::fiber::sleep(250); + } + + if (flag & OVERSEER_BAIL) { + if (is_valid_ptr(*(uint64_t*)(global::vars::g_network_player_manager))) { + native::network_bail(0, 0, 0); + } + } + }); + } +} + +void network_session_overseer_menu::load() { + set_name("Overseer"); + set_parent(); + + add_string("Prevented"); + add_string("joining (enabled in your Overseer configuration)"); + add_string("(enabled in your Overseer configuration) is joining"); + add_string("~m~None"); + + add_option(toggle_option("Toggle Overseer") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_enabled)); + + add_option(break_option("Players") + .add_translate()); + + load_players(); +} + +void network_session_overseer_menu::update() { + if (menu::base::get_current_option() < 2) { + menu::panels::toggle_panel_render("PANEL_OVERSEER", false); + menu::panels::toggle_panel_render("PANEL_SESSION", true); + } + + static int timer = 0; + + menu::timers::run_timed(&timer, 4000, [] { m_vars.m_update_online = true; m_vars.m_update_players = true; }); + + if (m_vars.m_update_players) { + m_vars.m_update_players = false; + + clear_options(2); + + if (m_vars.m_players.size()) { + for (std::size_t i = 0; i < m_vars.m_players.size(); i++) { + overseer& player = m_vars.m_players[i]; + + bool in_session = false; + menu::player::for_each([&] (menu::player::player_context& pl) { + if (pl.m_net_player) { + if (pl.m_net_player->m_player_info) { + if (pl.m_net_player->m_player_info->m_identifier.m_rockstar_id == player.m_rockstar_id) { + in_session = true; + } + } + } + }, true); + + add_option(submenu_option(util::va::va("%s%s", (player.m_flags & OVERSEER_ENABLED) ? "" : "~m~", player.m_name.c_str())) + .add_click([=] { + network::session::overseer::selected::vars::m_vars.m_selected = i; + }) + .add_submenu() + .add_hover([=] (submenu_option*) { + menu::panels::panel_parent* parent = menu::panels::get_parent("PANEL_OVERSEER"); + if (parent) { + menu::panels::panel_custom_overseer str; + str.m_in_session = in_session; + str.m_flags = player.m_flags; + str.m_online = global::vars::g_online_rockstar_ids[player.m_rockstar_id].first || in_session; + str.m_rockstar_id = player.m_rockstar_id; + str.m_session_type = str.m_online ? global::vars::g_online_rockstar_ids[player.m_rockstar_id].second : -1; + strcpy(str.m_name, player.m_name.c_str()); + + if (global::vars::g_read_stats_by_gamer_results.contains(player.m_rockstar_id)) { + str.m_has_stats = true; + memcpy(&str.m_stats, &global::vars::g_read_stats_by_gamer_results[player.m_rockstar_id], sizeof(str.m_stats)); + } else { + str.m_has_stats = false; + } + + menu::panels::set_structure(menu::panels::get_child(parent, "PANEL_OVERSEER_INFO"), (void*)&str, sizeof(str)); + parent->m_render = true; + + menu::panels::toggle_panel_render("PANEL_SESSION", false); + } + }) + .add_update([=] (submenu_option* option, int pos) { + menu::textures::texture_context context; + if (menu::textures::get_texture(std::string("playerimg_" + std::to_string(player.m_rockstar_id)), &context)) { + option->add_offset(0.016f); + + menu::renderer::draw_rect_unaligned({ global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, { 200, 200, 200, 255 }); + menu::renderer::draw_sprite({ "ozarkplayerimg", context.m_name }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (pos * global::ui::g_option_scale) + 0.005f + 0.011f }, { 0.0136f, 0.0216f }, 0.f, { 255, 255, 255, 255 }); + } + })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } + } + + if (m_vars.m_update_online) { + m_vars.m_update_online = false; + + for (std::size_t i = 0; i < m_vars.m_queue.size(); i++) { + auto vit = std::find_if(begin(global::vars::g_online_rockstar_ids_queue), end(global::vars::g_online_rockstar_ids_queue), [=] (uint64_t value) { + return value == m_vars.m_queue[i]; + }); + + if (vit == end(global::vars::g_online_rockstar_ids_queue)) { + global::vars::g_online_rockstar_ids_queue.push_back(m_vars.m_queue[i]); + } + } + + std::size_t process_size = m_vars.m_queue.size() > 32 ? 32 : m_vars.m_queue.size(); + + rage::network::rockstar_identifier* identifiers = (rage::network::rockstar_identifier*)malloc(process_size * sizeof(rage::network::rockstar_identifier)); + memset(identifiers, 0, process_size * sizeof(rage::network::rockstar_identifier)); + + for (std::size_t i = 0; i < process_size; i++) { + identifiers[i].m_rockstar_id = m_vars.m_queue.back(); + identifiers[i].m_type = 3; + m_vars.m_queue.pop_back(); + } + + native::clear_gamer_task_data(); + rage::engine::send_session_info_request(identifiers, (int)process_size); + free(identifiers); + + // recreate the queue + if (m_vars.m_queue.size() == 0) { + for (std::size_t i = 0; i < m_vars.m_players.size(); i++) { + m_vars.m_queue.push_back(m_vars.m_players[i].m_rockstar_id); + } + } + } +} + +void network_session_overseer_menu::update_once() { + load_players(true); + + m_vars.m_update_players = true; + + if (!m_vars.m_image_queue.empty()) { + uint32_t* rids = new uint32_t[m_vars.m_image_queue.size()]; + + for (std::size_t i = 0; i < m_vars.m_image_queue.size(); i++) { + rids[i] = (uint32_t)m_vars.m_image_queue[i]; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)m_vars.m_image_queue.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + m_vars.m_image_queue.clear(); + + util::threads::add_job([] (void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } +} + +void network_session_overseer_menu::feature_update() { + static int timer = 0; + + menu::timers::run_timed(&timer, 2000, [=] { + menu::player::for_each([] (menu::player::player_context& player) { + if (player.m_net_player) { + if (player.m_net_player->m_player_info) { + auto vit = std::find_if(begin(m_vars.m_players), end(m_vars.m_players), [=] (overseer& o) { + return o.m_rockstar_id == player.m_net_player->m_player_info->m_identifier.m_rockstar_id; + }); + + if (vit != end(m_vars.m_players)) { + if ((vit->m_flags & OVERSEER_ENABLED) > 0) { + process_event(player.m_id, vit->m_flags); + } + } + } + } + }, true); + }); +} + +network_session_overseer_menu* g_instance; +network_session_overseer_menu* network_session_overseer_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_session_overseer_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/session/network_session_overseer.h b/GTAV/src/menu/base/submenus/main/network/session/network_session_overseer.h new file mode 100644 index 0000000..37da6ff --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/session/network_session_overseer.h @@ -0,0 +1,61 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_session_overseer_menu : public menu::submenu::submenu { +public: + static network_session_overseer_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_session_overseer_menu() + : menu::submenu::submenu() {} +}; + +namespace network::session::overseer::vars { +#define OVERSEER_ENABLED (1 << 0) +#define OVERSEER_NOTIFY (1 << 1) +#define OVERSEER_BLOCK_JOIN (1 << 2) +#define OVERSEER_CRASH (1 << 3) +#define OVERSEER_KICK (1 << 4) +#define OVERSEER_CAGE (1 << 5) +#define OVERSEER_KICK_FROM_VEHICLE (1 << 6) +#define OVERSEER_SET_ON_FIRE (1 << 7) +#define OVERSEER_RAGDOLL (1 << 8) +#define OVERSEER_GLITCH_PHYSICS (1 << 9) +#define OVERSEER_BLACK_SCREEN (1 << 10) +#define OVERSEER_BLAME (1 << 11) +#define OVERSEER_GIVE_WANTED_LEVEL (1 << 12) +#define OVERSEER_SEND_TO_ISLAND (1 << 13) +#define OVERSEER_REMOVE_WEAPONS (1 << 14) +#define OVERSEER_HOSTILE_CLONE (1 << 15) +#define OVERSEER_BAIL (1 << 16) +#define OVERSEER_EXPLODE (1 << 17) + + struct overseer { + std::string m_name; + std::string m_reason; + uint64_t m_rockstar_id; + int m_flags; + }; + + struct variables { + bool m_enabled; + std::vector m_players; + + std::vector m_queue; + std::vector m_image_queue; + + + bool m_update_players = true; + bool m_update_online = true; + }; + + void save(std::string name, uint64_t rid, std::string reason); + bool process_join_request(uint64_t rid, std::string name); + void process_join_notify(uint64_t rid, std::string name); + void process_event(Player id, int flag); + extern variables m_vars; +} diff --git a/GTAV/src/menu/base/submenus/main/network/session/overseer/network_session_overseer_selected.cpp b/GTAV/src/menu/base/submenus/main/network/session/overseer/network_session_overseer_selected.cpp new file mode 100644 index 0000000..d2526e0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/session/overseer/network_session_overseer_selected.cpp @@ -0,0 +1,216 @@ +#include "network_session_overseer_selected.h" +#include "menu/base/submenu_handler.h" +#include "../network_session_overseer.h" +#include "util/dirs.h" +#include "util/log.h" +#include + +using namespace network::session::overseer::selected::vars; + +namespace network::session::overseer::selected::vars { + variables m_vars; + + void save() { + int flag = network::session::overseer::vars::m_vars.m_players[m_vars.m_selected].m_flags; + + if (m_vars.m_enabled) flag |= OVERSEER_ENABLED; + else flag &= ~OVERSEER_ENABLED; + + if (m_vars.m_black_screen) flag |= OVERSEER_BLACK_SCREEN; + else flag &= ~OVERSEER_BLACK_SCREEN; + + if (m_vars.m_blame) flag |= OVERSEER_BLAME; + else flag &= ~OVERSEER_BLAME; + + if (m_vars.m_block_join) flag |= OVERSEER_BLOCK_JOIN; + else flag &= ~OVERSEER_BLOCK_JOIN; + + if (m_vars.m_cage) flag |= OVERSEER_CAGE; + else flag &= ~OVERSEER_CAGE; + + if (m_vars.m_crash) flag |= OVERSEER_CRASH; + else flag &= ~OVERSEER_CRASH; + + if (m_vars.m_explode) flag |= OVERSEER_EXPLODE; + else flag &= ~OVERSEER_EXPLODE; + + if (m_vars.m_give_wanted_level) flag |= OVERSEER_GIVE_WANTED_LEVEL; + else flag &= ~OVERSEER_GIVE_WANTED_LEVEL; + + if (m_vars.m_glitch_physics) flag |= OVERSEER_GLITCH_PHYSICS; + else flag &= ~OVERSEER_GLITCH_PHYSICS; + + if (m_vars.m_hostile_clone) flag |= OVERSEER_HOSTILE_CLONE; + else flag &= ~OVERSEER_HOSTILE_CLONE; + + if (m_vars.m_kick) flag |= OVERSEER_KICK; + else flag &= ~OVERSEER_KICK; + + if (m_vars.m_kick_from_vehicle) flag |= OVERSEER_KICK_FROM_VEHICLE; + else flag &= ~OVERSEER_KICK_FROM_VEHICLE; + + if (m_vars.m_notify) flag |= OVERSEER_NOTIFY; + else flag &= ~OVERSEER_NOTIFY; + + if (m_vars.m_ragdoll) flag |= OVERSEER_RAGDOLL; + else flag &= ~OVERSEER_RAGDOLL; + + if (m_vars.m_remove_weapons) flag |= OVERSEER_REMOVE_WEAPONS; + else flag &= ~OVERSEER_REMOVE_WEAPONS; + + if (m_vars.m_send_to_island) flag |= OVERSEER_SEND_TO_ISLAND; + else flag &= ~OVERSEER_SEND_TO_ISLAND; + + if (m_vars.m_set_on_fire) flag |= OVERSEER_SET_ON_FIRE; + else flag &= ~OVERSEER_SET_ON_FIRE; + + network::session::overseer::vars::m_vars.m_players[m_vars.m_selected].m_flags = flag; + + try { + nlohmann::json json; + + std::ifstream input(util::dirs::get_path(overseer)); + if (input.good()) { + json = nlohmann::json::parse(input); + input.close(); + } + + json[std::to_string(network::session::overseer::vars::m_vars.m_players[m_vars.m_selected].m_rockstar_id)]["flags"] = flag; + + std::ofstream output(util::dirs::get_path(overseer)); + if (output.good()) { + output << json.dump(4); + output.close(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } +} + +void network_session_overseer_selected_menu::load() { + set_name("Overseer"); + set_parent(); + + add_option(toggle_option("Enabled") + .add_translate() + .add_toggle(m_vars.m_enabled) + .add_click(save)); + + add_option(toggle_option("Notify") + .add_translate() + .add_toggle(m_vars.m_notify) + .add_click(save)); + + add_option(toggle_option("Black Screen") + .add_translate() + .add_toggle(m_vars.m_black_screen) + .add_click(save)); + + add_option(toggle_option("Blame") + .add_translate() + .add_toggle(m_vars.m_blame) + .add_click(save)); + + add_option(toggle_option("Block Join (Host)") + .add_translate() + .add_toggle(m_vars.m_block_join) + .add_click(save)); + + add_option(toggle_option("Cage") + .add_translate() + .add_toggle(m_vars.m_cage) + .add_click(save)); + + add_option(toggle_option("Crash") + .add_translate() + .add_toggle(m_vars.m_crash) + .add_click(save)); + + add_option(toggle_option("Explode") + .add_translate() + .add_toggle(m_vars.m_explode) + .add_click(save)); + + add_option(toggle_option("Give Wanted Level") + .add_translate() + .add_toggle(m_vars.m_give_wanted_level) + .add_click(save)); + + add_option(toggle_option("Glitch Physics") + .add_translate() + .add_toggle(m_vars.m_glitch_physics) + .add_click(save)); + + add_option(toggle_option("Hostile Clone") + .add_translate() + .add_toggle(m_vars.m_hostile_clone) + .add_click(save)); + + add_option(toggle_option("Kick") + .add_translate() + .add_toggle(m_vars.m_kick) + .add_click(save)); + + add_option(toggle_option("Kick from Vehicle") + .add_translate() + .add_toggle(m_vars.m_kick_from_vehicle) + .add_click(save)); + + add_option(toggle_option("Ragdoll") + .add_translate() + .add_toggle(m_vars.m_ragdoll) + .add_click(save)); + + add_option(toggle_option("Remove Weapons") + .add_translate() + .add_toggle(m_vars.m_remove_weapons) + .add_click(save)); + + add_option(toggle_option("Send to Island") + .add_translate() + .add_toggle(m_vars.m_send_to_island) + .add_click(save)); + + add_option(toggle_option("Set on Fire") + .add_translate() + .add_toggle(m_vars.m_set_on_fire) + .add_click(save)); +} + +void network_session_overseer_selected_menu::update() {} + +void network_session_overseer_selected_menu::update_once() { + int flag = network::session::overseer::vars::m_vars.m_players[m_vars.m_selected].m_flags; + + m_vars.m_black_screen = flag & OVERSEER_BLACK_SCREEN; + m_vars.m_blame = flag & OVERSEER_BLAME; + m_vars.m_block_join = flag & OVERSEER_BLOCK_JOIN; + m_vars.m_cage = flag & OVERSEER_CAGE; + m_vars.m_crash = flag & OVERSEER_CRASH; + m_vars.m_enabled = flag & OVERSEER_ENABLED; + m_vars.m_explode = flag & OVERSEER_EXPLODE; + m_vars.m_give_wanted_level = flag & OVERSEER_GIVE_WANTED_LEVEL; + m_vars.m_glitch_physics = flag & OVERSEER_GLITCH_PHYSICS; + m_vars.m_hostile_clone = flag & OVERSEER_HOSTILE_CLONE; + m_vars.m_kick = flag & OVERSEER_KICK; + m_vars.m_kick_from_vehicle = flag & OVERSEER_KICK_FROM_VEHICLE; + m_vars.m_notify = flag & OVERSEER_NOTIFY; + m_vars.m_ragdoll = flag & OVERSEER_RAGDOLL; + m_vars.m_remove_weapons = flag & OVERSEER_REMOVE_WEAPONS; + m_vars.m_send_to_island = flag & OVERSEER_SEND_TO_ISLAND; + m_vars.m_set_on_fire = flag & OVERSEER_SET_ON_FIRE; +} + +void network_session_overseer_selected_menu::feature_update() {} + +network_session_overseer_selected_menu* g_instance; +network_session_overseer_selected_menu* network_session_overseer_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_session_overseer_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/session/overseer/network_session_overseer_selected.h b/GTAV/src/menu/base/submenus/main/network/session/overseer/network_session_overseer_selected.h new file mode 100644 index 0000000..5bea68a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/session/overseer/network_session_overseer_selected.h @@ -0,0 +1,42 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_session_overseer_selected_menu : public menu::submenu::submenu { +public: + static network_session_overseer_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_session_overseer_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace network::session::overseer::selected::vars { + struct variables { + std::size_t m_selected; + + bool m_enabled; + bool m_notify; + bool m_block_join; + bool m_crash; + bool m_kick; + bool m_cage; + bool m_kick_from_vehicle; + bool m_set_on_fire; + bool m_ragdoll; + bool m_glitch_physics; + bool m_black_screen; + bool m_blame; + bool m_give_wanted_level; + bool m_send_to_island; + bool m_remove_weapons; + bool m_hostile_clone; + bool m_bail; + bool m_explode; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_icon.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_icon.cpp new file mode 100644 index 0000000..92d4542 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_icon.cpp @@ -0,0 +1,95 @@ +#include "network_spoofing_crew_icon.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing_crew.h" +#include "network_spoofing_crew_presets.h" + +using namespace network::spoofing::crew::icon::vars; + +namespace network::spoofing::crew::icon::vars { + variables m_vars; + + void spoof(bool reset, int icon) { + network_spoofing_crew_icon_menu* _this = network_spoofing_crew_icon_menu::get(); + + if (reset) { + m_vars.m_spoofed_icon = -1; + m_vars.m_temp_name.clear(); + + if (m_vars.m_save_to_config) { + util::config::write_int(_this->get_submenu_name_stack(), "Icon", -1); + } + + return; + } + + m_vars.m_spoofed_icon = icon; + + if (m_vars.m_save_to_config) { + util::config::write_int(_this->get_submenu_name_stack(), "Icon", icon); + } + + menu::notify::stacked(_this->get_name().get(), _this->get_string("Spoofing crew icon to") + " " + std::to_string(icon)); + } +} + +void network_spoofing_crew_icon_menu::load() { + set_name("Crew Icon"); + set_parent(); + + add_option(submenu_option("Presets") + .add_translate() + .add_submenu() + .add_click([] { + network_spoofing_crew_presets_menu::get()->set_parent(); + network::spoofing::crew::presets::vars::m_vars.m_editing = &m_vars.m_temp_name; + })); + + add_option(button_option("Input Crew ID") + .add_translate() + .add_keyboard("Enter crew ID", 20, [](button_option* _this, const char* result) { m_vars.m_temp_name = std::string(result); })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { spoof(true); })); + + add_option(toggle_option("Save to Config") + .add_translate() + .add_toggle(m_vars.m_save_to_config).add_savable(get_submenu_name_stack()) + .add_tooltip("Saves to the config when applied")); + + m_vars.m_preview_button = add_option(button_option("") + .add_click([] { spoof(false, std::stoi(m_vars.m_temp_name.c_str())); })); + + if (m_vars.m_save_to_config) { + m_vars.m_spoofed_icon = util::config::read_int(get_submenu_name_stack(), "Icon", m_vars.m_spoofed_icon); + if (m_vars.m_spoofed_icon != -1) { + m_vars.m_temp_name = std::to_string(m_vars.m_spoofed_icon); + spoof(false, std::stoi(m_vars.m_temp_name.c_str())); + } + } + + add_string("Spoofing crew icon to"); +} + +void network_spoofing_crew_icon_menu::update() { + snprintf(m_vars.m_preview_name, 50, "Apply: %s", m_vars.m_temp_name.c_str()); + m_vars.m_preview_button->set_name(m_vars.m_preview_name); +} + +void network_spoofing_crew_icon_menu::update_once() {} + +void network_spoofing_crew_icon_menu::feature_update() {} + +network_spoofing_crew_icon_menu* g_instance; +network_spoofing_crew_icon_menu* network_spoofing_crew_icon_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_crew_icon_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_icon.h b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_icon.h new file mode 100644 index 0000000..f3c9717 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_icon.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_crew_icon_menu : public menu::submenu::submenu { +public: + static network_spoofing_crew_icon_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_crew_icon_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::crew::icon::vars { + struct variables { + int m_spoofed_icon = -1; + std::string m_temp_name; + bool m_save_to_config = true; + char m_preview_name[50]; + std::shared_ptr m_preview_button; + }; + + void spoof(bool reset, int icon = -1); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_motto.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_motto.cpp new file mode 100644 index 0000000..92cbe11 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_motto.cpp @@ -0,0 +1,93 @@ +#include "network_spoofing_crew_motto.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing_crew.h" +#include "network_spoofing_crew_presets.h" + +using namespace network::spoofing::crew::motto::vars; + +namespace network::spoofing::crew::motto::vars { + variables m_vars; + + void spoof(bool reset, const char* name) { + network_spoofing_crew_motto_menu* _this = network_spoofing_crew_motto_menu::get(); + + if (reset) { + m_vars.m_spoofed_name.clear(); + m_vars.m_temp_name.clear(); + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "Motto", ""); + } + + return; + } + + m_vars.m_spoofed_name = name; + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "Motto", name); + } + + menu::notify::stacked(_this->get_name().get(), _this->get_string("Spoofing crew motto to") + " " + name); + } +} + +void network_spoofing_crew_motto_menu::load() { + set_name("Crew Motto"); + set_parent(); + + add_option(submenu_option("Presets") + .add_translate() + .add_submenu() + .add_click([] { + network_spoofing_crew_presets_menu::get()->set_parent(); + network::spoofing::crew::presets::vars::m_vars.m_editing = &m_vars.m_temp_name; + })); + + add_option(button_option("Input Crew Rank") + .add_translate() + .add_keyboard("Enter crew rank", 24, [](button_option* _this, const char* result) { m_vars.m_temp_name = std::string(result); })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { spoof(true); })); + + add_option(toggle_option("Save to Config") + .add_translate() + .add_toggle(m_vars.m_save_to_config).add_savable(get_submenu_name_stack()) + .add_tooltip("Saves to the config when applied")); + + m_vars.m_preview_button = add_option(button_option("") + .add_click([] { spoof(false, m_vars.m_temp_name.c_str()); })); + + if (m_vars.m_save_to_config) { + m_vars.m_spoofed_name = util::config::read_string(get_submenu_name_stack(), "Motto", m_vars.m_spoofed_name); + m_vars.m_temp_name = m_vars.m_spoofed_name; + spoof(false, m_vars.m_temp_name.c_str()); + } + + add_string("Spoofing crew motto to"); +} + +void network_spoofing_crew_motto_menu::update() { + snprintf(m_vars.m_preview_name, 50, "Apply: %s", m_vars.m_temp_name.c_str()); + m_vars.m_preview_button->set_name(m_vars.m_preview_name); +} + +void network_spoofing_crew_motto_menu::update_once() {} + +void network_spoofing_crew_motto_menu::feature_update() {} + +network_spoofing_crew_motto_menu* g_instance; +network_spoofing_crew_motto_menu* network_spoofing_crew_motto_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_crew_motto_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_motto.h b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_motto.h new file mode 100644 index 0000000..6d43a92 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_motto.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_crew_motto_menu : public menu::submenu::submenu { +public: + static network_spoofing_crew_motto_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_crew_motto_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::crew::motto::vars { + struct variables { + std::string m_temp_name; + std::string m_spoofed_name; + bool m_save_to_config; + char m_preview_name[50]; + std::shared_ptr m_preview_button; + }; + + void spoof(bool reset, const char* name = nullptr); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_name.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_name.cpp new file mode 100644 index 0000000..c9286e0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_name.cpp @@ -0,0 +1,93 @@ +#include "network_spoofing_crew_name.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing_crew.h" +#include "network_spoofing_crew_presets.h" + +using namespace network::spoofing::crew::name::vars; + +namespace network::spoofing::crew::name::vars { + variables m_vars; + + void spoof(bool reset, const char* name) { + network_spoofing_crew_name_menu* _this = network_spoofing_crew_name_menu::get(); + + if (reset) { + m_vars.m_spoofed_name.clear(); + m_vars.m_temp_name.clear(); + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "Name", ""); + } + + return; + } + + m_vars.m_spoofed_name = name; + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "Name", name); + } + + menu::notify::stacked(_this->get_name().get(), _this->get_string("Spoofing crew name to") + " " + name); + } +} + +void network_spoofing_crew_name_menu::load() { + set_name("Crew Name"); + set_parent(); + + add_option(submenu_option("Presets") + .add_translate() + .add_submenu() + .add_click([] { + network_spoofing_crew_presets_menu::get()->set_parent(); + network::spoofing::crew::presets::vars::m_vars.m_editing = &m_vars.m_temp_name; + })); + + add_option(button_option("Input Crew Name") + .add_translate() + .add_keyboard("Enter crew name", 24, [](button_option* _this, const char* result) { m_vars.m_temp_name = std::string(result); })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { spoof(true); })); + + add_option(toggle_option("Save to Config") + .add_translate() + .add_toggle(m_vars.m_save_to_config).add_savable(get_submenu_name_stack()) + .add_tooltip("Saves to the config when applied")); + + m_vars.m_preview_button = add_option(button_option("") + .add_click([] { spoof(false, m_vars.m_temp_name.c_str()); })); + + if (m_vars.m_save_to_config) { + m_vars.m_spoofed_name = util::config::read_string(get_submenu_name_stack(), "Name", m_vars.m_spoofed_name); + m_vars.m_temp_name = m_vars.m_spoofed_name; + spoof(false, m_vars.m_temp_name.c_str()); + } + + add_string("Spoofing crew name to"); +} + +void network_spoofing_crew_name_menu::update() { + snprintf(m_vars.m_preview_name, 50, "Apply: %s", m_vars.m_temp_name.c_str()); + m_vars.m_preview_button->set_name(m_vars.m_preview_name); +} + +void network_spoofing_crew_name_menu::update_once() {} + +void network_spoofing_crew_name_menu::feature_update() {} + +network_spoofing_crew_name_menu* g_instance; +network_spoofing_crew_name_menu* network_spoofing_crew_name_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_crew_name_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_name.h b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_name.h new file mode 100644 index 0000000..74a270d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_name.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_crew_name_menu : public menu::submenu::submenu { +public: + static network_spoofing_crew_name_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_crew_name_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::crew::name::vars { + struct variables { + std::string m_temp_name; + std::string m_spoofed_name; + bool m_save_to_config; + char m_preview_name[50]; + std::shared_ptr m_preview_button; + }; + + void spoof(bool reset, const char* name = nullptr); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_presets.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_presets.cpp new file mode 100644 index 0000000..d8fa33e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_presets.cpp @@ -0,0 +1,150 @@ +#include "network_spoofing_crew_presets.h" +#include "menu/base/submenu_handler.h" +#include "network_spoofing_crew_name.h" +#include "network_spoofing_crew_tag.h" +#include "network_spoofing_crew_motto.h" +#include "network_spoofing_crew_rank.h" +#include "network_spoofing_crew_icon.h" + +using namespace network::spoofing::crew::presets::vars; + +namespace network::spoofing::crew::presets::vars { + variables m_vars; + + std::string crew_names[] = { + "Barry McKochner", "Ben Dover", "Chris P Bacon", "Micheal Hunt", + "Hugh Jarse", "Hugh Mungus", "Heywood Jablome", "Mike Oxblack", + "Mike Oxlonger", "Jack Kanoff", "Anass Rhammar", "Drew Peacock", + "Mike Hunt", "Nick Gurh", "Jenna Tolls", "Gabe Itch", + "Jenny Talia", "Rae Piste", "Hue G. Rection", "Moe Lester" + }; + + std::string crew_tags[] = { + "RSTR", "OZRK", "HIKE", "IGN", + "CUNT", "SKID", "FUCK", "COCK", + "POG", "NIGR", "TXIC", "MODS" + }; + + std::string crew_mottos[] = { + "Rockstar Developers", "White Lives Matter", "Yes", "Pog", + "Your Cheat Sucks", "Ozark #1" + }; + + std::string crew_ranks[] = { + "Leader", "Member", "Commissioner", "Lieutenant", + "Muscle", "Thug", "Hustler", "Soldier", + "Trigger", "Enforcer", "Facilitator", "Public Enemy", + "Shot Caller", "Street Boss", "Kingpin" + }; + + std::pair crew_icons[] = { + { "Rockstar", 17506743 }, + { "Kappa", 58800 }, + { "Doge", 8983550 }, + { "Troll Face", 1232493 }, + { "Anonymous", 19365671 }, + { "Spoderman", 5511527 }, + { "Skull", 7259919 }, + { "UMAD", 18989208 }, + { "Anime Tits", 7523962 }, + { "Redtube", 6207630 }, + { "Transformers", 29269474 }, + { "Joker", 185524 }, + { "Deadpool", 1328145 }, + { "Rolling Blunt", 18822398 }, + { "Blunt Man", 18470608 }, + { "Micky", 34186928 }, + { "iFruit", 40030447 }, + { "Monkey", 15232130 }, // yeet + { "Razer", 23320514 }, + { "Batman", 16821415 }, + { "Weed", 36439940 }, + { "Pika", 24676577 }, + { "Clown", 512255 }, + { "Jesus", 8375850 } + }; + + void callback(std::string str) { + *m_vars.m_editing = str; + menu::submenu::handler::set_submenu_previous(); + } +} + +void network_spoofing_crew_presets_menu::load() { + set_name("Presets"); + + for (std::string name : crew_names) add_string(name); + for (std::string name : crew_tags) add_string(name); + for (std::string name : crew_mottos) add_string(name); + for (std::string name : crew_ranks) add_string(name); + for (std::pair name : crew_icons) add_string(name.first); +} + +void network_spoofing_crew_presets_menu::update() {} + +void network_spoofing_crew_presets_menu::update_once() { + clear_options(0); + + // Crew Name presets + if (get_parent() == network_spoofing_crew_name_menu::get()) { + for (std::string name : crew_names) { + add_option(button_option(get_string(name)) + .add_click([=] { callback(name); })); + } + + return; + } + + // Crew Tag presets + if (get_parent() == network_spoofing_crew_tag_menu::get()) { + for (std::string name : crew_tags) { + add_option(button_option(get_string(name)) + .add_click([=] { callback(name); })); + } + + return; + } + + // Crew Motto presets + if (get_parent() == network_spoofing_crew_motto_menu::get()) { + for (std::string name : crew_mottos) { + add_option(button_option(get_string(name)) + .add_click([=] { callback(name); })); + } + + return; + } + + // Crew Rank presets + if (get_parent() == network_spoofing_crew_rank_menu::get()) { + for (std::string name : crew_ranks) { + add_option(button_option(get_string(name)) + .add_click([=] { callback(name); })); + } + + return; + } + + // Crew Icon presets + if (get_parent() == network_spoofing_crew_icon_menu::get()) { + for (std::pair name : crew_icons) { + add_option(button_option(get_string(name.first)) + .add_click([=] { callback(std::to_string(name.second)); })); + } + + return; + } +} + +void network_spoofing_crew_presets_menu::feature_update() {} + +network_spoofing_crew_presets_menu* g_instance; +network_spoofing_crew_presets_menu* network_spoofing_crew_presets_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_crew_presets_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_presets.h b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_presets.h new file mode 100644 index 0000000..e2965f1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_presets.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_crew_presets_menu : public menu::submenu::submenu { +public: + static network_spoofing_crew_presets_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_crew_presets_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::crew::presets::vars { + struct variables { + std::string* m_editing; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_rank.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_rank.cpp new file mode 100644 index 0000000..b81298a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_rank.cpp @@ -0,0 +1,93 @@ +#include "network_spoofing_crew_rank.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing_crew.h" +#include "network_spoofing_crew_presets.h" + +using namespace network::spoofing::crew::rank::vars; + +namespace network::spoofing::crew::rank::vars { + variables m_vars; + + void spoof(bool reset, const char* name) { + network_spoofing_crew_rank_menu* _this = network_spoofing_crew_rank_menu::get(); + + if (reset) { + m_vars.m_spoofed_name.clear(); + m_vars.m_temp_name.clear(); + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "Rank", ""); + } + + return; + } + + m_vars.m_spoofed_name = name; + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "Rank", name); + } + + menu::notify::stacked(_this->get_name().get(), _this->get_string("Spoofing crew rank to") + " " + name); + } +} + +void network_spoofing_crew_rank_menu::load() { + set_name("Crew Rank"); + set_parent(); + + add_option(submenu_option("Presets") + .add_translate() + .add_submenu() + .add_click([] { + network_spoofing_crew_presets_menu::get()->set_parent(); + network::spoofing::crew::presets::vars::m_vars.m_editing = &m_vars.m_temp_name; + })); + + add_option(button_option("Input Crew Rank") + .add_translate() + .add_keyboard("Enter crew rank", 24, [](button_option* _this, const char* result) { m_vars.m_temp_name = std::string(result); })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { spoof(true); })); + + add_option(toggle_option("Save to Config") + .add_translate() + .add_toggle(m_vars.m_save_to_config).add_savable(get_submenu_name_stack()) + .add_tooltip("Saves to the config when applied")); + + m_vars.m_preview_button = add_option(button_option("") + .add_click([] { spoof(false, m_vars.m_temp_name.c_str()); })); + + if (m_vars.m_save_to_config) { + m_vars.m_spoofed_name = util::config::read_string(get_submenu_name_stack(), "Rank", m_vars.m_spoofed_name); + m_vars.m_temp_name = m_vars.m_spoofed_name; + spoof(false, m_vars.m_temp_name.c_str()); + } + + add_string("Spoofing crew rank to"); +} + +void network_spoofing_crew_rank_menu::update() { + snprintf(m_vars.m_preview_name, 50, "Apply: %s", m_vars.m_temp_name.c_str()); + m_vars.m_preview_button->set_name(m_vars.m_preview_name); +} + +void network_spoofing_crew_rank_menu::update_once() {} + +void network_spoofing_crew_rank_menu::feature_update() {} + +network_spoofing_crew_rank_menu* g_instance; +network_spoofing_crew_rank_menu* network_spoofing_crew_rank_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_crew_rank_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_rank.h b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_rank.h new file mode 100644 index 0000000..a8e04ae --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_rank.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_crew_rank_menu : public menu::submenu::submenu { +public: + static network_spoofing_crew_rank_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_crew_rank_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::crew::rank::vars { + struct variables { + std::string m_temp_name; + std::string m_spoofed_name; + bool m_save_to_config; + char m_preview_name[50]; + std::shared_ptr m_preview_button; + }; + + void spoof(bool reset, const char* name = nullptr); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_tag.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_tag.cpp new file mode 100644 index 0000000..feac318 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_tag.cpp @@ -0,0 +1,93 @@ +#include "network_spoofing_crew_tag.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing_crew.h" +#include "network_spoofing_crew_presets.h" + +using namespace network::spoofing::crew::tag::vars; + +namespace network::spoofing::crew::tag::vars { + variables m_vars; + + void spoof(bool reset, const char* name) { + network_spoofing_crew_tag_menu* _this = network_spoofing_crew_tag_menu::get(); + + if (reset) { + m_vars.m_spoofed_name.clear(); + m_vars.m_temp_name.clear(); + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "Tag", ""); + } + + return; + } + + m_vars.m_spoofed_name = name; + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "Tag", name); + } + + menu::notify::stacked(_this->get_name().get(), _this->get_string("Spoofing crew tag to") + " " + name); + } +} + +void network_spoofing_crew_tag_menu::load() { + set_name("Crew Tag"); + set_parent(); + + add_option(submenu_option("Presets") + .add_translate() + .add_submenu() + .add_click([] { + network_spoofing_crew_presets_menu::get()->set_parent(); + network::spoofing::crew::presets::vars::m_vars.m_editing = &m_vars.m_temp_name; + })); + + add_option(button_option("Input Crew Tag") + .add_translate() + .add_keyboard("Enter crew tag", 24, [](button_option* _this, const char* result) { m_vars.m_temp_name = std::string(result); })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { spoof(true); })); + + add_option(toggle_option("Save to Config") + .add_translate() + .add_toggle(m_vars.m_save_to_config).add_savable(get_submenu_name_stack()) + .add_tooltip("Saves to the config when applied")); + + m_vars.m_preview_button = add_option(button_option("") + .add_click([] { spoof(false, m_vars.m_temp_name.c_str()); })); + + if (m_vars.m_save_to_config) { + m_vars.m_spoofed_name = util::config::read_string(get_submenu_name_stack(), "Tag", m_vars.m_spoofed_name); + m_vars.m_temp_name = m_vars.m_spoofed_name; + spoof(false, m_vars.m_temp_name.c_str()); + } + + add_string("Spoofing crew tag to"); +} + +void network_spoofing_crew_tag_menu::update() { + snprintf(m_vars.m_preview_name, 50, "Apply: %s", m_vars.m_temp_name.c_str()); + m_vars.m_preview_button->set_name(m_vars.m_preview_name); +} + +void network_spoofing_crew_tag_menu::update_once() {} + +void network_spoofing_crew_tag_menu::feature_update() {} + +network_spoofing_crew_tag_menu* g_instance; +network_spoofing_crew_tag_menu* network_spoofing_crew_tag_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_crew_tag_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_tag.h b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_tag.h new file mode 100644 index 0000000..b286d7c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_tag.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_crew_tag_menu : public menu::submenu::submenu { +public: + static network_spoofing_crew_tag_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_crew_tag_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::crew::tag::vars { + struct variables { + std::string m_temp_name; + std::string m_spoofed_name; + bool m_save_to_config; + char m_preview_name[50]; + std::shared_ptr m_preview_button; + }; + + void spoof(bool reset, const char* name = nullptr); + extern variables m_vars; +} diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_crew.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_crew.cpp new file mode 100644 index 0000000..6d8d619 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_crew.cpp @@ -0,0 +1,56 @@ +#include "network_spoofing_crew.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing.h" +#include "crew/network_spoofing_crew_icon.h" +#include "crew/network_spoofing_crew_rank.h" +#include "crew/network_spoofing_crew_motto.h" +#include "crew/network_spoofing_crew_tag.h" +#include "crew/network_spoofing_crew_name.h" + +using namespace network::spoofing::crew::vars; + +namespace network::spoofing::crew::vars { + variables m_vars; +} + +void network_spoofing_crew_menu::load() { + set_name("Crew"); + set_parent(); + + add_option(submenu_option("Crew Name") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Crew Tag") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Crew Motto") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Crew Rank") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Crew Icon") + .add_translate().add_hotkey() + .add_submenu()); +} + +void network_spoofing_crew_menu::update() {} + +void network_spoofing_crew_menu::update_once() {} + +void network_spoofing_crew_menu::feature_update() {} + +network_spoofing_crew_menu* g_instance; +network_spoofing_crew_menu* network_spoofing_crew_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_crew_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_crew.h b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_crew.h new file mode 100644 index 0000000..ccc7222 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_crew.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_crew_menu : public menu::submenu::submenu { +public: + static network_spoofing_crew_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_crew_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::crew::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_intervals.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_intervals.cpp new file mode 100644 index 0000000..1d2b44b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_intervals.cpp @@ -0,0 +1,76 @@ +#include "network_spoofing_intervals.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing.h" +#include "menu/base/util/timers.h" + +using namespace network::spoofing::intervals::vars; + +namespace network::spoofing::intervals::vars { + variables m_vars; + + scroll_struct intervals[] = { + { localization("Very Low", true), 0, }, + { localization("Low", true), 1, }, + { localization("Medium", true), 2, }, + { localization("High", true), 3, }, + { localization("Very High", true), 4, }, + }; +} + +void network_spoofing_intervals_menu::load() { + set_name("Sync Intervals"); + set_parent(); +} + +void network_spoofing_intervals_menu::update() { + static int timer = 0; + + menu::timers::run_timed(&timer, 250, [this] { + clear_options(0); + + menu::player::for_each([this](menu::player::player_context& player) { + if (player.m_name.empty()) return; + + if (!player.m_sync_interval_toggle) { + if (menu::player::get_local_player().m_ped_ptr && menu::player::get_local_player().m_ped_ptr->get_net_obj()) { + player.m_sync_interval = menu::player::get_local_player().m_ped_ptr->get_net_obj()->m_player_sync_intervals[player.m_id]; + } else { + player.m_sync_interval = 0; + } + } + + if (player.m_sync_interval > 4 || player.m_sync_interval < 0) player.m_sync_interval = 0; + + add_option(scroll_option(TOGGLE, player.m_name) + .add_toggle(player.m_sync_interval_toggle) + .add_scroll(player.m_sync_interval, 0, NUMOF(intervals), intervals)); + }, false, true); + }); + + if (menu::base::get_current_option() >= get_options().size()) { + menu::base::set_current_option((int)get_options().size() - 1); + } +} + +void network_spoofing_intervals_menu::update_once() {} + +void network_spoofing_intervals_menu::feature_update() { + menu::player::for_each([this](menu::player::player_context& player) { + if (player.m_sync_interval_toggle) { + if (menu::player::get_local_player().m_ped_ptr && menu::player::get_local_player().m_ped_ptr->get_net_obj()) { + menu::player::get_local_player().m_ped_ptr->get_net_obj()->m_player_sync_intervals[player.m_id] = player.m_sync_interval; + } + } + }, false, true); +} + +network_spoofing_intervals_menu* g_instance; +network_spoofing_intervals_menu* network_spoofing_intervals_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_intervals_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_intervals.h b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_intervals.h new file mode 100644 index 0000000..9f7ab15 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_intervals.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_intervals_menu : public menu::submenu::submenu { +public: + static network_spoofing_intervals_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_intervals_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::intervals::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_ip.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_ip.cpp new file mode 100644 index 0000000..9d3fd39 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_ip.cpp @@ -0,0 +1,116 @@ +#include "network_spoofing_ip.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing.h" +#include "util/util.h" + +using namespace network::spoofing::ip::vars; + +namespace network::spoofing::ip::vars { + variables m_vars; + + void spoof(bool reset, std::string ip) { + network_spoofing_ip_menu* _this = network_spoofing_ip_menu::get(); + + if (reset) { + std::vector split = util::split_string(m_vars.m_default_ip, "."); + if (split.size() == 4) { + util::config::write_string(_this->get_submenu_name_stack(), "IP", m_vars.m_default_ip.c_str()); + + m_vars.m_spoofing_ip = m_vars.m_default_ip; + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "IP", m_vars.m_default_ip.c_str()); + } + } else { + menu::notify::stacked(_this->get_name().get(), _this->get_string("Invalid default IP"), global::ui::g_error); + } + + return; + } + + std::vector split = util::split_string(ip, "."); + if (split.size() == 4) { + m_vars.m_spoofing_ip = ip; + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "IP", m_vars.m_spoofing_ip.c_str()); + } + + menu::notify::stacked(_this->get_name().get(), _this->get_string("Spoofing IP to") + " " + ip); + } else { + menu::notify::stacked(_this->get_name().get(), _this->get_string("Invalid IP format (has to be xxx.xxx.xxx.xxx)"), global::ui::g_error); + } + } +} + +void network_spoofing_ip_menu::load() { + set_name("IP Address"); + set_parent(); + + add_option(button_option("Input IP") + .add_translate() + .add_keyboard("Enter IP", 15, [this](button_option* _this, const char* Name) { + std::vector split = util::split_string(Name, "."); + if (split.size() == 4) { + m_vars.m_temp_spoofing_ip = Name; + } else { + menu::notify::stacked(get_name().get(), get_string("Invalid IP format (has to be xxx.xxx.xxx.xxx)"), global::ui::g_error); + } + })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { spoof(true); })); + + add_option(toggle_option("Save to Config") + .add_translate() + .add_toggle(m_vars.m_save_to_config).add_savable(get_submenu_name_stack()) + .add_tooltip("Saves to the config when applied")); + + m_vars.m_preview_button = add_option(button_option("") + .add_click([this] { spoof(false, m_vars.m_temp_spoofing_ip); })); + + if (m_vars.m_save_to_config) { + m_vars.m_spoofing_ip = m_vars.m_temp_spoofing_ip = util::config::read_string(get_submenu_name_stack(), "IP", m_vars.m_spoofing_ip.c_str()); + spoof(false, m_vars.m_spoofing_ip); + } + + add_string("Invalid IP format (has to be xxx.xxx.xxx.xxx)"); + add_string("Invalid default IP"); + add_string("Spoofing IP to"); +} + +void network_spoofing_ip_menu::update() { + snprintf(m_vars.m_preview_name, 50, "Apply: %s", m_vars.m_temp_spoofing_ip.c_str()); + m_vars.m_preview_button->set_name(m_vars.m_preview_name); +} + +void network_spoofing_ip_menu::update_once() {} + +void network_spoofing_ip_menu::feature_update() { + if (m_vars.m_default_ip.empty()) { + if (menu::player::get_local_player().m_net_player) { + if (menu::player::get_local_player().m_net_player->m_player_info) { + uint8_t* ip = (uint8_t*)&menu::player::get_local_player().m_net_player->m_player_info->m_external_ip; + m_vars.m_default_ip = util::va::va("%i.%i.%i.%i", ip[3], ip[2], ip[1], ip[0]); + + if (m_vars.m_temp_spoofing_ip.empty()) { + m_vars.m_temp_spoofing_ip = m_vars.m_default_ip; + } + } + } + } +} + +network_spoofing_ip_menu* g_instance; +network_spoofing_ip_menu* network_spoofing_ip_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_ip_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_ip.h b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_ip.h new file mode 100644 index 0000000..1a4c9fd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_ip.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_ip_menu : public menu::submenu::submenu { +public: + static network_spoofing_ip_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_ip_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::ip::vars { + struct variables { + bool m_save_to_config; + + std::string m_spoofing_ip; + std::string m_temp_spoofing_ip; + std::string m_default_ip; + char m_preview_name[50]; + std::shared_ptr m_preview_button; + }; + + void spoof(bool reset, std::string ip = ""); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_name.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_name.cpp new file mode 100644 index 0000000..4a06c3e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_name.cpp @@ -0,0 +1,178 @@ +#include "network_spoofing_name.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing.h" +#include "rage/engine.h" +#include "util/util.h" + +using namespace network::spoofing::name::vars; + +namespace network::spoofing::name::vars { + variables m_vars; + + scroll_struct text_settings[] = { + { localization("Normal", true), "" }, + { localization("Bold", true), "~h~" }, + { localization("Italic", true), "~italic~" }, + }; + + scroll_struct text_colors[] = { + { localization("Default", true), "" }, + { localization("~v~Black", true), "~v~" }, + { localization("~b~Blue", true), "~b~" }, + { localization("~y~Gold", true), "~y~" }, + { localization("~g~Green", true), "~g~" }, + { localization("~c~Grey", true), "~c~" }, + { localization("~f~Light Blue", true), "~f~" }, + { localization("~o~Orange", true), "~o~" }, + { localization("~p~Purple", true), "~p~" }, + { localization("~r~Red", true), "~r~" } + }; + + scroll_struct text_icons[] = { + { localization("None", true), "" }, + { localization("Wanted Star", true), "~ws~" }, + { localization("Rockstar Verified", true), "~¦~" }, + { localization("Rockstar", true), "~÷~" }, + }; + + void spoof(bool reset, const char* name) { + network_spoofing_name_menu* _this = network_spoofing_name_menu::get(); + + if (reset) { + m_vars.m_spoofed_name = std::string(m_vars.m_original_name); + } else { + if (!name) return; + + char tmp[0x14]; + snprintf(tmp, 0x14, "%s%s%s%s", text_settings[m_vars.m_style].m_result, text_colors[m_vars.m_color].m_result, text_icons[m_vars.m_icon].m_result, name); + m_vars.m_spoofed_name = std::string(tmp); + } + + if (menu::player::get_local_player().m_ped_ptr) { + if (menu::player::get_local_player().m_ped_ptr->m_player_info) { + strncpy(menu::player::get_local_player().m_ped_ptr->m_player_info->m_name, m_vars.m_spoofed_name.c_str(), 0x14); + } + } + + if (menu::player::get_local_player().m_net_player) { + if (menu::player::get_local_player().m_net_player->m_player_info) { + strncpy(menu::player::get_local_player().m_net_player->m_player_info->m_name, m_vars.m_spoofed_name.c_str(), 0x14); + } + } + + if (m_vars.m_save_to_config) { + util::config::write_string(_this->get_submenu_name_stack(), "Name", m_vars.m_spoofed_name); + } + + uint64_t chat_info = *(uint64_t*)global::vars::g_chat_info; + if (chat_info) { + strcpy((char*)(chat_info + 0x84), m_vars.m_spoofed_name.c_str()); + } + + if (!reset) { + menu::notify::stacked(_this->get_name().get(), _this->get_string("Spoofing name to") + " " + m_vars.m_spoofed_name); + } + } +} + +void network_spoofing_name_menu::load() { + set_name("Name"); + set_parent(); + + // TODO: Presets, Save and Load + + const char* name = rage::engine::sc_get_string("gtag"); + if (name) { + strncpy(m_vars.m_original_name, name, 20); + m_vars.m_spoofed_name = m_vars.m_original_name; + m_vars.m_temp_name = m_vars.m_original_name; + } + + add_option(button_option("Input Name") + .add_translate() + .add_keyboard("Enter name to spoof to", 20, [](button_option* _this, const char* name) { m_vars.m_temp_name = std::string(name); })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { spoof(true); })); + + add_option(toggle_option("Save to Config") + .add_translate() + .add_toggle(m_vars.m_save_to_config).add_savable(get_submenu_name_stack()) + .add_tooltip("Saves to the config when applied")); + + add_option(break_option("Text Settings") + .add_translate()); + + add_option(scroll_option(SCROLL, "Color") + .add_translate() + .add_scroll(m_vars.m_color, 0, NUMOF(text_colors), text_colors)); + + add_option(scroll_option(SCROLL, "Style") + .add_translate() + .add_scroll(m_vars.m_style, 0, NUMOF(text_settings), text_settings)); + + add_option(scroll_option(SCROLL, "Icon") + .add_translate() + .add_scroll(m_vars.m_icon, 0, NUMOF(text_icons), text_icons) + .add_tooltip("Added to the start of the spoofed name")); + + m_vars.m_preview_button = add_option(button_option("") + .add_click([] { spoof(false, m_vars.m_temp_name.c_str()); })); + + if (m_vars.m_save_to_config) { + m_vars.m_spoofed_name = util::config::read_string(get_submenu_name_stack(), "Name", m_vars.m_spoofed_name); + + for (int i = 1; i < NUMOF(text_settings); i++) { + if (strstr(m_vars.m_spoofed_name.c_str(), text_settings[i].m_result)) { + m_vars.m_style = i; + util::replace_string(m_vars.m_spoofed_name, text_settings[i].m_result, ""); + break; + } + } + + for (int i = 1; i < NUMOF(text_colors); i++) { + if (strstr(m_vars.m_spoofed_name.c_str(), text_colors[i].m_result)) { + m_vars.m_color = i; + util::replace_string(m_vars.m_spoofed_name, text_colors[i].m_result, ""); + break; + } + } + + for (int i = 1; i < NUMOF(text_icons); i++) { + if (strstr(m_vars.m_spoofed_name.c_str(), text_icons[i].m_result)) { + m_vars.m_icon = i; + util::replace_string(m_vars.m_spoofed_name, text_icons[i].m_result, ""); + break; + } + } + + m_vars.m_temp_name = m_vars.m_spoofed_name; + spoof(false, m_vars.m_temp_name.c_str()); + } + + add_string("Spoofing name to"); +} + +void network_spoofing_name_menu::update() { + snprintf(m_vars.m_preview_name, 50, "Apply: %s%s%s%s", text_settings[m_vars.m_style].m_result, text_colors[m_vars.m_color].m_result, text_icons[m_vars.m_icon].m_result, m_vars.m_temp_name.c_str()); + m_vars.m_preview_button->set_name(m_vars.m_preview_name); +} + +void network_spoofing_name_menu::update_once() {} + +void network_spoofing_name_menu::feature_update() {} + +network_spoofing_name_menu* g_instance; +network_spoofing_name_menu* network_spoofing_name_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_name_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_name.h b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_name.h new file mode 100644 index 0000000..2e205bb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_name.h @@ -0,0 +1,38 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_name_menu : public menu::submenu::submenu { +public: + static network_spoofing_name_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_name_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::name::vars { + struct variables { + std::string m_spoofed_name; + std::string m_temp_name; + + int m_color; + int m_style; + int m_icon; + bool m_save_to_config; + + char m_original_name[20]; + char m_preview_name[50]; + std::shared_ptr m_preview_button; + }; + + extern scroll_struct text_colors[10]; + extern scroll_struct text_settings[3]; + extern scroll_struct text_icons[4]; + + void spoof(bool reset, const char* name = nullptr); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_player_rotation.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_player_rotation.cpp new file mode 100644 index 0000000..b266968 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_player_rotation.cpp @@ -0,0 +1,81 @@ +#include "network_spoofing_player_rotation.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing.h" + +using namespace network::spoofing::rotation::player::vars; + +namespace network::spoofing::rotation::player::vars { + variables m_vars; + + scroll_struct face_direction[] = { + { localization("Left", true), 0 }, + { localization("Right", true), 1 }, + { localization("Back", true), 2 } + }; + + scroll_struct static_type[] = { + { localization("Relative", true), 0 }, + { localization("Static", true), 1 } + }; +} + +void network_spoofing_player_rotation_menu::load() { + set_name("Player Rotation"); + set_parent(); + + add_option(number_option(TOGGLE, "Spinbot") + .add_translate() + .add_toggle(m_vars.m_spinbot) + .add_number(m_vars.m_spinbot_speed, "%.0f", 1.f).add_min(0.f).add_max(14.f).set_scroll_speed(10) + .add_click([] { m_vars.m_face_direction = false; m_vars.m_jitter = false; })); + + add_option(scroll_option(TOGGLE, "Face Direction") + .add_translate() + .add_toggle(m_vars.m_face_direction) + .add_scroll(m_vars.m_face_direction_val, 0, NUMOF(face_direction), face_direction) + .add_click([] { m_vars.m_spinbot = false; m_vars.m_jitter = false; })); + + add_option(toggle_option("Jitter") + .add_translate() + .add_toggle(m_vars.m_jitter) + .add_click([] { m_vars.m_spinbot = false; m_vars.m_face_direction = false; })); + + add_option(toggle_option("Relative") + .add_translate() + .add_toggle(m_vars.m_relative) + .add_tooltip("Current rotation will be added to new rotation")); +} + +void network_spoofing_player_rotation_menu::update() {} + +void network_spoofing_player_rotation_menu::update_once() {} + +void network_spoofing_player_rotation_menu::feature_update() { + if (m_vars.m_spinbot) { + static float value = 0.f; + value += m_vars.m_spinbot_speed; + + if (value > 180.f) value = -180.f + (value - 180.f); + m_vars.m_hook_value = { value * 0.0174532924f, value * 0.0174532924f }; + return; + } + + if (m_vars.m_jitter) { + static float value = 0.f; + value += 40.f; + if (value > 180.f) value = -180.f + (value - 180.f); + + m_vars.m_hook_value = { value * 0.0174532924f, value * 0.0174532924f }; + } +} + +network_spoofing_player_rotation_menu* g_instance; +network_spoofing_player_rotation_menu* network_spoofing_player_rotation_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_player_rotation_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_player_rotation.h b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_player_rotation.h new file mode 100644 index 0000000..bd2ccff --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_player_rotation.h @@ -0,0 +1,31 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_player_rotation_menu : public menu::submenu::submenu { +public: + static network_spoofing_player_rotation_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_player_rotation_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::rotation::player::vars { + struct variables { + bool m_spinbot; + bool m_jitter; + bool m_face_direction; + bool m_relative; + + int m_face_direction_val; + float m_spinbot_speed = 10.f; + + math::vector2 m_hook_value; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_profiles.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_profiles.cpp new file mode 100644 index 0000000..ff6b4a1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_profiles.cpp @@ -0,0 +1,147 @@ +#include "network_spoofing_profiles.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing.h" +#include "util/dirs.h" +#include "util/log.h" +#include "network_spoofing_ip.h" +#include "network_spoofing_name.h" +#include "network_spoofing_rid.h" +#include "crew/network_spoofing_crew_icon.h" +#include "crew/network_spoofing_crew_motto.h" +#include "crew/network_spoofing_crew_name.h" +#include "crew/network_spoofing_crew_rank.h" +#include "crew/network_spoofing_crew_tag.h" +#include "profiles/network_spoofing_profiles_edit.h" +#include + +using namespace network::spoofing::profiles::vars; + +namespace network::spoofing::profiles::vars { + variables m_vars; + + void disable_active_profile() { + m_vars.m_active.m_active = false; + + if (m_vars.m_active.m_spoof_ip) { + network::spoofing::ip::vars::spoof(true); + } + + if (m_vars.m_active.m_spoof_rockstar_id) { + network::spoofing::rid::vars::spoof(true); + } + + if (m_vars.m_active.m_spoof_name) { + network::spoofing::name::vars::spoof(true); + } + + if (m_vars.m_active.m_spoof_crew) { + network::spoofing::crew::icon::vars::spoof(true); + network::spoofing::crew::motto::vars::spoof(true); + network::spoofing::crew::name::vars::spoof(true); + network::spoofing::crew::rank::vars::spoof(true); + network::spoofing::crew::tag::vars::spoof(true); + } + } + + void save_profile(spoof_profile profile) { + if (profile.m_file_name.empty()) { + profile.m_file_name = profile.m_name; + } + + profile.m_file_name += ".json"; + + nlohmann::json json; + json["rid"] = profile.m_rockstar_id; + json["name"] = profile.m_name; + json["ip"] = profile.m_ip; + json["crew"]["icon"] = profile.m_crew_icon; + json["crew"]["motto"] = profile.m_crew_motto; + json["crew"]["name"] = profile.m_crew_name; + json["crew"]["rank"] = profile.m_crew_rank; + json["crew"]["tag"] = profile.m_crew_tag; + + std::ofstream output(util::dirs::get_path(spoofing_profiles) + profile.m_file_name); + if (output.good()) { + output << json.dump(4); + output.close(); + } + } +} + +void network_spoofing_profiles_menu::load() { + set_name("Profiles"); + set_parent(); + + add_option(button_option("Disable Active Profile") + .add_translate() + .add_click(disable_active_profile) + .add_requirement([] { return m_vars.m_active.m_active; })); + + add_option(break_option("Profiles") + .add_translate() + .add_requirement([] { return m_vars.m_active.m_active; })); + + add_string("~m~None"); +} + +void network_spoofing_profiles_menu::update() {} + +void network_spoofing_profiles_menu::update_once() { + clear_options(2); + + m_vars.m_profiles.clear(); + + std::vector profiles = util::dirs::get_files_in_directory(util::dirs::get_path(spoofing_profiles), ".json"); + if (!profiles.empty()) { + for (std::string profile : profiles) { + std::ifstream input(util::dirs::get_path(spoofing_profiles) + profile + ".json"); + if (input.good()) { + try { + nlohmann::json json = nlohmann::json::parse(input); + input.close(); + + if (!json.empty()) { + spoof_profile p; + p.m_file_name = profile; + p.m_rockstar_id = json["rid"].get(); + p.m_ip = json["ip"]; + p.m_name = json["name"]; + p.m_crew_icon = json["crew"]["icon"].get(); + p.m_crew_motto = json["crew"]["motto"]; + p.m_crew_name = json["crew"]["name"]; + p.m_crew_rank = json["crew"]["rank"]; + p.m_crew_tag = json["crew"]["tag"]; + + std::size_t index = m_vars.m_profiles.size(); + if (index < 0) index = 0; + m_vars.m_profiles.push_back(p); + + add_option(submenu_option(profile) + .add_submenu() + .add_click([=] { + network_spoofing_profiles_edit_menu::get()->set_name(profile, false, false); + network::spoofing::profiles::edit::vars::m_vars.m_selected = index; + })); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void network_spoofing_profiles_menu::feature_update() {} + +network_spoofing_profiles_menu* g_instance; +network_spoofing_profiles_menu* network_spoofing_profiles_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_profiles_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_profiles.h b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_profiles.h new file mode 100644 index 0000000..1b897de --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_profiles.h @@ -0,0 +1,48 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_profiles_menu : public menu::submenu::submenu { +public: + static network_spoofing_profiles_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_profiles_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::profiles::vars { + struct spoof_profile { + std::string m_file_name; + + uint32_t m_rockstar_id; + int m_crew_icon; + std::string m_crew_motto; + std::string m_crew_name; + std::string m_crew_rank; + std::string m_crew_tag; + std::string m_ip; + std::string m_name; + }; + + struct spoof_active { + bool m_active; + bool m_spoof_name; + bool m_spoof_rockstar_id; + bool m_spoof_ip; + bool m_spoof_crew; + spoof_profile m_profile; + }; + + struct variables { + std::vector m_profiles; + spoof_active m_active; + }; + + void save_profile(spoof_profile profile); + void disable_active_profile(); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_rid.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_rid.cpp new file mode 100644 index 0000000..3a0326d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_rid.cpp @@ -0,0 +1,104 @@ +#include "network_spoofing_rid.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing.h" +#include "util/log.h" + +using namespace network::spoofing::rid::vars; + +namespace network::spoofing::rid::vars { + variables m_vars; + + void spoof(bool reset, uint64_t rockstar_id) { + network_spoofing_rid_menu* _this = network_spoofing_rid_menu::get(); + + if (reset) { + m_vars.m_spoofing_rid = global::vars::g_rs_info->m_rockstar_id; + + if (m_vars.m_save_to_config) { + util::config::write_uint64(_this->get_submenu_name_stack(), "Rockstar ID", global::vars::g_rs_info->m_rockstar_id); + } + + if (is_valid_ptr(menu::player::get_local_player().m_net_player)) { + if (is_valid_ptr(menu::player::get_local_player().m_net_player->m_player_info)) { + menu::player::get_local_player().m_net_player->m_player_info->m_identifier.m_rockstar_id = global::vars::g_rs_info->m_rockstar_id; + } + } + + return; + } + + m_vars.m_spoofing_rid = rockstar_id; + menu::notify::stacked(_this->get_name().get(), _this->get_string("Spoofing rockstar id to") + " " + std::to_string(rockstar_id)); + + if (m_vars.m_save_to_config) { + util::config::write_uint64(_this->get_submenu_name_stack(), "Rockstar ID", rockstar_id); + } + + if (is_valid_ptr(menu::player::get_local_player().m_net_player)) { + if (is_valid_ptr(menu::player::get_local_player().m_net_player->m_player_info)) { + menu::player::get_local_player().m_net_player->m_player_info->m_identifier.m_rockstar_id = rockstar_id; + } + } + } +} + +void network_spoofing_rid_menu::load() { + set_name("Rockstar ID"); + set_parent(); + + m_vars.m_spoofing_rid = global::vars::g_rs_info->m_rockstar_id; + m_vars.m_loaded = true; + LOG_DEV("RID: %i", m_vars.m_spoofing_rid); + + add_option(button_option("Input Rockstar ID") + .add_translate() + .add_keyboard("Enter Rockstar ID", 16, [this](button_option* _this, const char* name) { + m_vars.m_temp_spoofing_rid = atoll(name); + if (m_vars.m_temp_spoofing_rid == 0) { + menu::notify::stacked(get_name().get(), get_string("Setting to 0 crashes others when they leave the session, that's naughty!")); + } + })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { spoof(true); })); + + add_option(toggle_option("Save to Config") + .add_translate() + .add_toggle(m_vars.m_save_to_config).add_savable(get_submenu_name_stack()) + .add_tooltip("Saves to the config when applied")); + + m_vars.m_preview_button = add_option(button_option("") + .add_click([this] { spoof(false, m_vars.m_temp_spoofing_rid); })); + + if (m_vars.m_save_to_config) { + m_vars.m_spoofing_rid = m_vars.m_temp_spoofing_rid = util::config::read_uint64(get_submenu_name_stack(), "Rockstar ID", m_vars.m_spoofing_rid); + spoof(false, m_vars.m_spoofing_rid); + } + + add_string("Spoofing rockstar id to"); + add_string("Setting to 0 crashes others when they leave the session, that's naughty!"); +} + +void network_spoofing_rid_menu::update() { + snprintf(m_vars.m_preview_name, 50, "Apply: %I64d", m_vars.m_temp_spoofing_rid); + m_vars.m_preview_button->set_name(m_vars.m_preview_name); +} + +void network_spoofing_rid_menu::update_once() {} + +void network_spoofing_rid_menu::feature_update() {} + +network_spoofing_rid_menu* g_instance; +network_spoofing_rid_menu* network_spoofing_rid_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_rid_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_rid.h b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_rid.h new file mode 100644 index 0000000..eb8ffef --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_rid.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_rid_menu : public menu::submenu::submenu { +public: + static network_spoofing_rid_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_rid_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::rid::vars { + struct variables { + uint64_t m_spoofing_rid; + uint64_t m_temp_spoofing_rid; + bool m_save_to_config; + char m_preview_name[50]; + std::shared_ptr m_preview_button; + bool m_loaded; + }; + + void spoof(bool reset, uint64_t rockstar_id = 0); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_vehicle_rotation.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_vehicle_rotation.cpp new file mode 100644 index 0000000..94af60c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_vehicle_rotation.cpp @@ -0,0 +1,168 @@ +#include "network_spoofing_vehicle_rotation.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing.h" +#include "menu/base/submenus/main/vehicle.h" + +using namespace network::spoofing::rotation::vehicle::vars; + +namespace network::spoofing::rotation::vehicle::vars { + variables m_vars; + + scroll_struct axis[] = { + { localization("Pitch (X)", true), 0 }, + { localization("Roll (Y)", true), 1 }, + { localization("Yaw (Z)", true), 2 } + }; +} + +void network_spoofing_vehicle_rotation_menu::load() { + set_name("Vehicle Rotation"); + set_parent(); + + add_option(toggle_option("Toggle Preview Ghost") + .add_translate() + .add_toggle(m_vars.m_ghost) + .add_tooltip("Spawns a ghost to show you what your changes look like to other players")); + + add_option(number_option(TOGGLE, "Spinbot") + .add_translate() + .add_toggle(m_vars.m_spinbot) + .add_number(m_vars.m_spinbot_speed, "%.0f", 1.f).add_min(0.f).add_max(100.f).set_scroll_speed(10)); + + add_option(scroll_option(SCROLL, "Spinbot Axis") + .add_translate() + .add_scroll(m_vars.m_spinbot_axis, 0, NUMOF(axis), axis)); + + add_option(scroll_option(TOGGLE, "Jitter") + .add_translate() + .add_toggle(m_vars.m_jitter) + .add_scroll(m_vars.m_jitter_axis, 0, NUMOF(axis), axis)); + + add_option(toggle_option("Static") + .add_translate() + .add_toggle(m_vars.m_static)); + + add_option(toggle_option("Relative") + .add_translate() + .add_toggle(m_vars.m_relative)); + + add_option(break_option("Static") + .add_translate() + .add_requirement([] { return m_vars.m_static; })); + + add_option(number_option(TOGGLE, "Pitch (X)") + .add_translate() + .add_toggle(m_vars.m_static_toggle.x) + .add_number(m_vars.m_static_value.x, "%.0f", 1.f).add_min(0.f).add_max(360.f).set_scroll_speed(10) + .add_requirement([] { return m_vars.m_static; })); + + add_option(number_option(TOGGLE, "Roll (Y)") + .add_translate() + .add_toggle(m_vars.m_static_toggle.y) + .add_number(m_vars.m_static_value.y, "%.0f", 1.f).add_min(0.f).add_max(360.f).set_scroll_speed(10) + .add_requirement([] { return m_vars.m_static; })); + + add_option(number_option(TOGGLE, "Yaw (Z)") + .add_translate() + .add_toggle(m_vars.m_static_toggle.z) + .add_number(m_vars.m_static_value.z, "%.0f", 1.f).add_min(0.f).add_max(360.f).set_scroll_speed(10) + .add_requirement([] { return m_vars.m_static; })); +} + +void network_spoofing_vehicle_rotation_menu::update() {} + +void network_spoofing_vehicle_rotation_menu::update_once() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_ghost) { + // TODO: pack_clone_create blocker for handle + if (!native::does_entity_exist(m_vars.m_ghost_handle)) { + m_vars.m_ghost_handle = vehicle::vars::clone_vehicle(menu::player::get_local_player().m_vehicle); + + if (native::does_entity_exist(m_vars.m_ghost_handle)) { + native::set_entity_alpha(m_vars.m_ghost_handle, 100, false); + native::set_entity_collision(m_vars.m_ghost_handle, false, false); + native::attach_entity_to_entity(m_vars.m_ghost_handle, menu::player::get_local_player().m_vehicle, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 1, 1, 1); + } + } + } else { + if (native::does_entity_exist(m_vars.m_ghost_handle)) { + native::detach_entity(m_vars.m_ghost_handle, true, false); + native::delete_entity(&m_vars.m_ghost_handle); + m_vars.m_ghost_handle = 0; + } + } + } +} + +void network_spoofing_vehicle_rotation_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + m_vars.m_hook_value.x = menu::player::get_local_player().m_rotation.x; + m_vars.m_hook_value.y = menu::player::get_local_player().m_rotation.y; + m_vars.m_hook_value.z = menu::player::get_local_player().m_rotation.z; + + if (m_vars.m_static) { + if (m_vars.m_static_toggle.x) m_vars.m_hook_value.x = m_vars.m_static_value.x + (m_vars.m_relative ? menu::player::get_local_player().m_rotation.x : 0.f); + if (m_vars.m_static_toggle.y) m_vars.m_hook_value.y = m_vars.m_static_value.y + (m_vars.m_relative ? menu::player::get_local_player().m_rotation.y : 0.f); + if (m_vars.m_static_toggle.z) m_vars.m_hook_value.z = m_vars.m_static_value.z + (m_vars.m_relative ? menu::player::get_local_player().m_rotation.z : 0.f); + } + + if (m_vars.m_spinbot) { + static float value = 0.f; + value += m_vars.m_spinbot_speed; + if (value > 360.f) value = (value - 360.f); + + switch (m_vars.m_spinbot_axis) { + case 0: + m_vars.m_hook_value.x = value; + break; + + case 1: + m_vars.m_hook_value.y = value; + break; + + case 2: + m_vars.m_hook_value.z = value; + break; + } + } + + if (m_vars.m_jitter) { + static float value = 0.f; + value += native::get_random_float_in_range(5.f, 100.f); + if (value > 360.f) value = (value - 360.f); + + switch (m_vars.m_jitter_axis) { + case 0: + m_vars.m_hook_value.x = value; + break; + + case 1: + m_vars.m_hook_value.y = value; + break; + + case 2: + m_vars.m_hook_value.z = value; + break; + } + } + + if (m_vars.m_ghost_handle && native::does_entity_exist(m_vars.m_ghost_handle)) { + native::attach_entity_to_entity(m_vars.m_ghost_handle, menu::player::get_local_player().m_vehicle, 0, 0.0f, 0.0f, 0.0f, m_vars.m_hook_value.x - menu::player::get_local_player().m_rotation.x, m_vars.m_hook_value.y - menu::player::get_local_player().m_rotation.y, m_vars.m_hook_value.z - menu::player::get_local_player().m_rotation.z, 0, 0, 0, 1, 1, 1); + } + + m_vars.m_hook_value.x *= 0.0174532924f; + m_vars.m_hook_value.y *= 0.0174532924f; + m_vars.m_hook_value.z *= 0.0174532924f; + } +} + +network_spoofing_vehicle_rotation_menu* g_instance; +network_spoofing_vehicle_rotation_menu* network_spoofing_vehicle_rotation_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_vehicle_rotation_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_vehicle_rotation.h b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_vehicle_rotation.h new file mode 100644 index 0000000..292a3b0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/network_spoofing_vehicle_rotation.h @@ -0,0 +1,38 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_vehicle_rotation_menu : public menu::submenu::submenu { +public: + static network_spoofing_vehicle_rotation_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_vehicle_rotation_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::rotation::vehicle::vars { + struct variables { + bool m_ghost; + bool m_spinbot; + bool m_jitter; + bool m_static; + bool m_relative; + + float m_spinbot_speed = 10.f; + + int m_spinbot_axis; + int m_jitter_axis; + + math::vector3_ m_static_value; + math::vector3_ m_static_toggle; + math::vector3_ m_hook_value; + + Vehicle m_ghost_handle; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/profiles/network_spoofing_profiles_edit.cpp b/GTAV/src/menu/base/submenus/main/network/spoofing/profiles/network_spoofing_profiles_edit.cpp new file mode 100644 index 0000000..7ec0c9a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/profiles/network_spoofing_profiles_edit.cpp @@ -0,0 +1,97 @@ +#include "network_spoofing_profiles_edit.h" +#include "menu/base/submenu_handler.h" +#include "../network_spoofing_profiles.h" +#include "../network_spoofing_ip.h" +#include "../network_spoofing_name.h" +#include "../network_spoofing_rid.h" +#include "../crew/network_spoofing_crew_icon.h" +#include "../crew/network_spoofing_crew_motto.h" +#include "../crew/network_spoofing_crew_name.h" +#include "../crew/network_spoofing_crew_rank.h" +#include "../crew/network_spoofing_crew_tag.h" + +using namespace network::spoofing::profiles::edit::vars; + +namespace network::spoofing::profiles::edit::vars { + variables m_vars; + + void load_profile() { + network::spoofing::profiles::vars::spoof_profile& profile = network::spoofing::profiles::vars::m_vars.m_profiles[m_vars.m_selected]; + network::spoofing::profiles::vars::spoof_profile& active = network::spoofing::profiles::vars::m_vars.m_active.m_profile; + + active.m_rockstar_id = profile.m_rockstar_id; + active.m_ip = profile.m_ip; + active.m_name = profile.m_name; + active.m_file_name = profile.m_file_name; + active.m_crew_icon = profile.m_crew_icon; + active.m_crew_motto = profile.m_crew_motto; + active.m_crew_name = profile.m_crew_name; + active.m_crew_rank = profile.m_crew_rank; + active.m_crew_tag = profile.m_crew_tag; + + if (network::spoofing::profiles::vars::m_vars.m_active.m_active) { + network::spoofing::profiles::vars::disable_active_profile(); + } + + network::spoofing::profiles::vars::m_vars.m_active.m_active = true; + network::spoofing::profiles::vars::m_vars.m_active.m_spoof_name = m_vars.m_spoof_name; + network::spoofing::profiles::vars::m_vars.m_active.m_spoof_rockstar_id = m_vars.m_spoof_rockstar_id; + network::spoofing::profiles::vars::m_vars.m_active.m_spoof_ip = m_vars.m_spoof_ip; + network::spoofing::profiles::vars::m_vars.m_active.m_spoof_crew = m_vars.m_spoof_crew; + + if (m_vars.m_spoof_ip) network::spoofing::ip::vars::spoof(false, profile.m_ip); + if (m_vars.m_spoof_name) network::spoofing::name::vars::spoof(false, profile.m_name.c_str()); + if (m_vars.m_spoof_rockstar_id) network::spoofing::rid::vars::spoof(false, profile.m_rockstar_id); + + if (m_vars.m_spoof_crew) { + network::spoofing::crew::icon::vars::spoof(false, active.m_crew_icon); + network::spoofing::crew::motto::vars::spoof(false, active.m_crew_motto.c_str()); + network::spoofing::crew::name::vars::spoof(false, active.m_crew_name.c_str()); + network::spoofing::crew::rank::vars::spoof(false, active.m_crew_rank.c_str()); + network::spoofing::crew::tag::vars::spoof(false, active.m_crew_tag.c_str()); + } + + menu::submenu::handler::set_submenu_previous(); + } +} + +void network_spoofing_profiles_edit_menu::load() { + set_parent(); + + add_option(toggle_option("Spoof Name") + .add_translate() + .add_toggle(m_vars.m_spoof_name)); + + add_option(toggle_option("Spoof Rockstar ID") + .add_translate() + .add_toggle(m_vars.m_spoof_rockstar_id)); + + add_option(toggle_option("Spoof IP") + .add_translate() + .add_toggle(m_vars.m_spoof_ip)); + + add_option(toggle_option("Spoof Crew") + .add_translate() + .add_toggle(m_vars.m_spoof_crew)); + + add_option(button_option("Load Profile") + .add_translate() + .add_click(load_profile)); +} + +void network_spoofing_profiles_edit_menu::update() {} + +void network_spoofing_profiles_edit_menu::update_once() {} + +void network_spoofing_profiles_edit_menu::feature_update() {} + +network_spoofing_profiles_edit_menu* g_instance; +network_spoofing_profiles_edit_menu* network_spoofing_profiles_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_spoofing_profiles_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/spoofing/profiles/network_spoofing_profiles_edit.h b/GTAV/src/menu/base/submenus/main/network/spoofing/profiles/network_spoofing_profiles_edit.h new file mode 100644 index 0000000..a2433ab --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/spoofing/profiles/network_spoofing_profiles_edit.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_spoofing_profiles_edit_menu : public menu::submenu::submenu { +public: + static network_spoofing_profiles_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_spoofing_profiles_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace network::spoofing::profiles::edit::vars { + struct variables { + std::size_t m_selected; + bool m_spoof_name = true; + bool m_spoof_rockstar_id = true; + bool m_spoof_ip = false; + bool m_spoof_crew = true; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_add.cpp b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_add.cpp new file mode 100644 index 0000000..49e3cb4 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_add.cpp @@ -0,0 +1,134 @@ +#include "network_join_blocking_add.h" +#include "menu/base/submenu_handler.h" +#include "../network_join_blocking.h" +#include "network_join_blocking_manual.h" +#include "network_join_blocking_edit.h" +#include "util/util.h" + +using namespace network::htoolkit::blocking::add::vars; + +namespace network::htoolkit::blocking::add::vars { + variables m_vars; + + scroll_struct types[] = { + { localization("Rockstar ID", true), 0 }, + { localization("Name", true), 0 }, + { localization("IP", true), 0 } + }; + + void add_block() { + network::htoolkit::blocking::vars::user_block user; + user.m_type = m_vars.m_type + 1; + user.m_rockstar_id = m_vars.m_rockstar_id; + user.m_ip = m_vars.m_ip; + user.m_response = network::htoolkit::blocking::edit::vars::responses[m_vars.m_response].m_result.second; + user.m_enabled = m_vars.m_enabled; + strcpy_s(user.m_name, m_vars.m_name); + network::htoolkit::blocking::vars::m_vars.m_blocked_users.push_back(user); + + menu::submenu::handler::set_submenu_previous(false); + } + + std::string get_tooltip_str() { + char option_name[128]; + + switch (m_vars.m_type) { + case 0: // rid + sprintf_s(option_name, "[Rockstar ID] %lli", m_vars.m_rockstar_id); + break; + + case 1: // name + sprintf_s(option_name, "[NAME] %s", m_vars.m_name); + break; + + case 2: // IP + sprintf_s(option_name, "[IP] %i.%i.%i.%i", ((m_vars.m_ip & 0xFF000000) >> 24), ((m_vars.m_ip & 0xFF0000) >> 16), ((m_vars.m_ip & 0xFF00) >> 8), (m_vars.m_ip & 0xFF)); + break; + } + + return option_name; + } +} + +void network_join_blocking_add_menu::load() { + set_name("Add User Block"); + set_parent(); + + add_string("Type"); + add_string("Input Name"); + add_string("Input Rockstar ID"); + add_string("Input IP"); + add_string("Enabled"); + add_string("Add Block"); + add_string("Message"); +} + +void network_join_blocking_add_menu::update() {} + +void network_join_blocking_add_menu::update_once() { + clear_options(0); + + add_option(scroll_option(SCROLL, get_string("Type")) + .add_scroll(m_vars.m_type, 0, NUMOF(types), types) + .add_click([this] { update_once(); }) + .add_update([](scroll_option* option, int pos) { option->set_tooltip(get_tooltip_str()); })); + + switch (m_vars.m_type) { + case 0: + add_option(button_option(get_string("Input Rockstar ID")) + .add_keyboard("Input Rockstar ID of the users account", 30, [](button_option* _this, const char* result) { char* endptr = nullptr; m_vars.m_rockstar_id = strtoull(result, &endptr, 10); }) + .add_update([](button_option* option) { option->set_tooltip(get_tooltip_str()); })); + + break; + + case 1: + add_option(button_option(get_string("Input Name")) + .add_keyboard("Input name of the users account", 30, [](button_option* _this, const char* result) { strcpy_s(m_vars.m_name, result); }) + .add_update([](button_option* option) { option->set_tooltip(get_tooltip_str()); })); + + break; + + case 2: + add_option(button_option(get_string("Input IP")) + .add_keyboard("Input IP of the users account (format: 1.1.1.1)", 30, [](button_option* _this, const char* result) { + std::vector val = util::split_string(result, "."); + if (val.size() == 4) { + uint8_t buffer[4]; + buffer[0] = atoi(val[3].c_str()); + buffer[1] = atoi(val[2].c_str()); + buffer[2] = atoi(val[1].c_str()); + buffer[3] = atoi(val[0].c_str()); + + m_vars.m_ip = *(uint32_t*)&buffer[0]; + } + }) + .add_update([](button_option* option) { option->set_tooltip(get_tooltip_str()); })); + + break; + } + + add_option(scroll_option>(SCROLL, get_string("Message")) + .add_scroll(m_vars.m_response, 0, NUMOF(network::htoolkit::blocking::edit::vars::responses), network::htoolkit::blocking::edit::vars::responses) + .add_update([](scroll_option>* option, int pos) { option->set_tooltip(network::htoolkit::blocking::edit::vars::responses[m_vars.m_response].m_result.first); })); + + add_option(toggle_option(get_string("Enabled")) + .add_toggle(m_vars.m_enabled) + .add_update([](toggle_option* option, int pos) { option->set_tooltip(get_tooltip_str()); })); + + add_option(button_option(get_string("Add Block")) + .add_click(add_block) + .add_update([](button_option* option) { option->set_tooltip(get_tooltip_str()); })); +} + +void network_join_blocking_add_menu::feature_update() {} + +network_join_blocking_add_menu* g_instance; +network_join_blocking_add_menu* network_join_blocking_add_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_join_blocking_add_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_add.h b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_add.h new file mode 100644 index 0000000..8a3d7b6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_add.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_join_blocking_add_menu : public menu::submenu::submenu { +public: + static network_join_blocking_add_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_join_blocking_add_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::blocking::add::vars { + struct variables { + int m_type; + uint64_t m_rockstar_id; + char m_name[32]; + uint32_t m_ip; + int m_response; + bool m_enabled; + }; + + extern scroll_struct types[3]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_edit.cpp b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_edit.cpp new file mode 100644 index 0000000..277ee94 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_edit.cpp @@ -0,0 +1,90 @@ +#include "network_join_blocking_edit.h" +#include "menu/base/submenu_handler.h" +#include "network_join_blocking_manual.h" + +using namespace network::htoolkit::blocking::edit::vars; + +namespace network::htoolkit::blocking::edit::vars { + variables m_vars; + + scroll_struct> responses[] = { + { localization("Failed Intended Session", true), { "Failed to join intended session", FAILED_TO_JOIN_INTENDED_SESSION } }, + { localization("Failed Intended GTA Session", true), { "Failed to join intended GTA Online session", FAILED_TO_JOIN_INTENDED_GTA_ONLINE_SESSION } }, + { localization("Incompatible Assets", true), { "Failed to join session due to incompatible assets", FAILED_TO_JOIN_DUE_TO_INCOMPATIBLE_ASSETS } }, + { localization("Incompatible Downloadable Content", true), { "Incompatible downloadable content. All players must have the latest compatibility pack", INCOMPATILBLE_DOWNLOADABLE_CONTENT } }, + { localization("Currently Full", true), { "The session you're trying to join is currently full", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_CURRENTLY_FULL } }, + { localization("Currently Full - Queue", true), { "The session you're trying to join is currently full of players", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_CURRENTLY_FULL_OF_PLAYERS_DO_YOU_WANT_TO_JOIN_QUEUE } }, + { localization("Wrong Version (Title Update)", true), { "Please make sure all players have the latest Title Update", PLEASE_MAKE_SURE_ALL_PLAYERS_HAVE_THE_LATEST_TITLE_UPDATE } }, + { localization("Voted Out", true), { "You have already been voted out of this game session", YOU_HAVE_BEEN_VOTED_OUT } }, + { localization("Invites are Disabled", true), { "Invites are currently disabled in the session", INVITES_ARE_CURRENTLY_DISABLED_IN_THIS_SESSION } }, + { localization("Active Crew Limit", true), { "The session you are trying to join has an active Crew limit and cannot accommodate your Crew", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_HAS_AN_ACTIVE_CREW_LIMIT } }, + { localization("You are Bad Sport", true), { "The session you are trying to join is for people who are not Bad Sports or cheaters - you are a Bad Sport", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_FOR_PEOPLE_WHO_ARE_NOT_BADSPORT_OR_CHEATERS_YOU_ARE_BADSPORT } }, + { localization("Cheat", true), { "You are classed as a cheat and can only play with other cheats until you are forgiven", YOU_ARE_CLASSED_AS_A_CHEAT_AND_CAN_ONLY_PLAY_WITH_OTHER_CHEATS_UNTIL_YOU_ARE_FORGIVEN } }, + { localization("Cheaters Only", true), { "The session you are trying to join is for cheaters only", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_FOR_CHEATERS_ONLY } }, + { localization("Bad Sport Only", true), { "The session you are trying to join is for Bad Sports only", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_FOR_BADSPORTS_ONLY } }, + { localization("Session No Longer Exists", true), { "The session you are trying to join no longer exists", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_NO_LONGER_EXISTS } }, + { localization("Invite Only", true), { "The session you are trying to join is private. You will need to be invited to join this session", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_PRIVATE } }, + { localization("Friends Only", true), { "The session you are trying to join is friends only", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_FRIENDS_ONLY } }, + { localization("Different Targeting Preference", true), { "The session you are trying to join is using a different targeting preference. You can change your preference in the Settings tab of the Pause Menu in Grand Theft Auto V. Joining a new GTA Online Session", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_USING_A_DIFFERENT_TARGETING_PREFERENCE } }, + { localization("Different Build Type", true), { "The session you are trying to join is a different build type", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_A_DIFFERENT_BUILD_TYPE } }, + { localization("Different Content", true), { "The session you are trying to join is not using the same content", THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_NOT_USING_THE_SAME_CONTENT } }, + { localization("Bad Reputation", true), { "Unable to join this session, your account has a bad reputation", UNABLE_TO_JOIN_THIS_SESSION_YOUR_ACCOUNT_HAS_A_BAD_REPUTATION } }, + { localization("Unable To Connect", true), { "Unable to connect to session. The session may no longer exist", UNABLE_TO_CONNECT_TO_SESSION } }, + { localization("Premium Race", true), { "Unable to Join. The session you are trying to join is a Premium Race. Joining and accepting invites is disabled for this mode", UNABLE_TO_JOIN_THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_A_PREMIUM_RACE } }, + }; +} + +void network_join_blocking_edit_menu::load() { + set_parent(); + + add_string("Block"); + add_string("Notify"); + add_string("Response Message"); + + for (scroll_struct>& response : responses) { + add_string(response.m_result.first); + } +} + +void network_join_blocking_edit_menu::update() {} + +void network_join_blocking_edit_menu::update_once() { + clear_options(0); + + add_option(toggle_option(get_string("Block")) + .add_toggle(m_vars.m_selected->m_enabled)); + + add_option(toggle_option(get_string("Notify")) + .add_toggle(m_vars.m_selected->m_notify)); + + add_option(break_option(get_string("Response Message"))); + + int last_index = m_vars.m_selected->m_context.m_selected; + m_vars.m_selected->m_context.reset(); + m_vars.m_selected->m_context.m_selected = 0; + + std::vector> temp_options; + + for (scroll_struct>& response : responses) { + temp_options.push_back(add_option(radio_option(response.m_name.get()) + .add_radio(m_vars.m_selected->m_context) + .add_tooltip(get_string(response.m_result.first)))); + } + + if (last_index > 0) { + temp_options[last_index]->update_selected(); + } +} + +void network_join_blocking_edit_menu::feature_update() {} + +network_join_blocking_edit_menu* g_instance; +network_join_blocking_edit_menu* network_join_blocking_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_join_blocking_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_edit.h b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_edit.h new file mode 100644 index 0000000..20af853 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_edit.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" +#include "../network_join_blocking.h" + +class network_join_blocking_edit_menu : public menu::submenu::submenu { +public: + static network_join_blocking_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_join_blocking_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::blocking::edit::vars { + struct variables { + network::htoolkit::blocking::vars::toolkit_block* m_selected; + }; + + extern scroll_struct> responses[23]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual.cpp b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual.cpp new file mode 100644 index 0000000..9a67977 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual.cpp @@ -0,0 +1,86 @@ +#include "network_join_blocking_manual.h" +#include "menu/base/submenu_handler.h" +#include "../network_join_blocking.h" +#include "network_join_blocking_add.h" +#include "network_join_blocking_manual_edit.h" +#include "network_join_blocking_manual_load.h" + +using namespace network::htoolkit::blocking::manual::vars; + +namespace network::htoolkit::blocking::manual::vars { + variables m_vars; +} + +void network_join_blocking_manual_menu::load() { + set_name("Manual User Block"); + set_parent(); + + add_option(submenu_option("Save and Load") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Add User Block") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + network::htoolkit::blocking::add::vars::m_vars.m_type = 0; + network::htoolkit::blocking::add::vars::m_vars.m_rockstar_id = 0; + network::htoolkit::blocking::add::vars::m_vars.m_ip = 0; + network::htoolkit::blocking::add::vars::m_vars.m_name[0] = '\0'; + network::htoolkit::blocking::add::vars::m_vars.m_enabled = true; + network::htoolkit::blocking::add::vars::m_vars.m_response = 0; + })); + + add_option(break_option("Users") + .add_translate()); + + network_join_blocking_manual_edit_menu::get(); + + add_string("~m~None"); +} + +void network_join_blocking_manual_menu::update() {} + +void network_join_blocking_manual_menu::update_once() { + clear_options(3); + + for (network::htoolkit::blocking::vars::user_block& user : network::htoolkit::blocking::vars::m_vars.m_blocked_users) { + char option_name[128]; + + switch (user.m_type) { + case 1: // rid + sprintf_s(option_name, "%s[Rockstar ID] %lli", user.m_enabled ? "" : "~m~", user.m_rockstar_id); + break; + + case 2: // name + sprintf_s(option_name, "%s[NAME] %s", user.m_enabled ? "" : "~m~", user.m_name); + break; + + case 3: // IP + sprintf_s(option_name, "%s[IP] %i.%i.%i.%i", user.m_enabled ? "" : "~m~", ((user.m_ip & 0xFF000000) >> 24), ((user.m_ip & 0xFF0000) >> 16), ((user.m_ip & 0xFF00) >> 8), (user.m_ip & 0xFF)); + break; + } + + add_option(submenu_option(option_name) + .add_hotkey() + .add_click([&] { network::htoolkit::blocking::manual::edit::vars::m_vars.m_selected = &user; }) + .add_submenu()); + } + + if (network::htoolkit::blocking::vars::m_vars.m_blocked_users.empty()) { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void network_join_blocking_manual_menu::feature_update() {} + +network_join_blocking_manual_menu* g_instance; +network_join_blocking_manual_menu* network_join_blocking_manual_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_join_blocking_manual_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual.h b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual.h new file mode 100644 index 0000000..c7c60c3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_join_blocking_manual_menu : public menu::submenu::submenu { +public: + static network_join_blocking_manual_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_join_blocking_manual_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::blocking::manual::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_edit.cpp b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_edit.cpp new file mode 100644 index 0000000..8e3cbee --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_edit.cpp @@ -0,0 +1,94 @@ +#include "network_join_blocking_manual_edit.h" +#include "menu/base/submenu_handler.h" +#include "network_join_blocking_manual.h" +#include "network_join_blocking_edit.h" +#include "network_join_blocking_add.h" +#include "util/util.h" + +using namespace network::htoolkit::blocking::manual::edit::vars; + +namespace network::htoolkit::blocking::manual::edit::vars { + variables m_vars; +} + +void network_join_blocking_manual_edit_menu::load() { + set_name("Manual User Block"); + set_parent(); + + add_string("Type"); + add_string("Input Name"); + add_string("Input Rockstar ID"); + add_string("Input IP"); + add_string("Enabled"); +} + +void network_join_blocking_manual_edit_menu::update() {} + +void network_join_blocking_manual_edit_menu::update_once() { + clear_options(0); + + for (int i = 0; i < NUMOF(network::htoolkit::blocking::edit::vars::responses); i++) { + if (network::htoolkit::blocking::edit::vars::responses[i].m_result.second == m_vars.m_selected->m_response) { + m_vars.m_response = i; + break; + } + } + + m_vars.m_type = m_vars.m_selected->m_type - 1; + + add_option(scroll_option(SCROLL, get_string("Type")) + .add_scroll(m_vars.m_type, 0, NUMOF(network::htoolkit::blocking::add::vars::types), network::htoolkit::blocking::add::vars::types) + .add_click([this] { update_once(); m_vars.m_selected->m_type = m_vars.m_type + 1; })); + + switch (m_vars.m_type) { + case 0: + add_option(button_option(get_string("Input Rockstar ID")) + .add_keyboard("Input Rockstar ID of the users account", 30, [](button_option* _this, const char* result) { char* endptr = nullptr; m_vars.m_selected->m_rockstar_id = strtoull(result, &endptr, 10); })); + + break; + + case 1: + add_option(button_option(get_string("Input Name")) + .add_keyboard("Input name of the users account", 30, [](button_option* _this, const char* result) { strcpy_s(m_vars.m_selected->m_name, result); })); + + break; + + case 2: + add_option(button_option(get_string("Input IP")) + .add_keyboard("Input IP of the users account (format: 1.1.1.1)", 30, [](button_option* _this, const char* result) { + std::vector val = util::split_string(result, "."); + if (val.size() == 4) { + uint8_t buffer[4]; + buffer[0] = atoi(val[3].c_str()); + buffer[1] = atoi(val[2].c_str()); + buffer[2] = atoi(val[1].c_str()); + buffer[3] = atoi(val[0].c_str()); + + m_vars.m_selected->m_ip = *(uint32_t*)&buffer[0]; + } + })); + + break; + } + + add_option(scroll_option>(SCROLL, "Message") + .add_scroll(m_vars.m_response, 0, NUMOF(network::htoolkit::blocking::edit::vars::responses), network::htoolkit::blocking::edit::vars::responses) + .add_click([] { m_vars.m_selected->m_response = network::htoolkit::blocking::edit::vars::responses[m_vars.m_response].m_result.second; }) + .add_update([](scroll_option>* option, int pos) { option->set_tooltip(network::htoolkit::blocking::edit::vars::responses[m_vars.m_response].m_result.first); })); + + add_option(toggle_option(get_string("Enabled")) + .add_toggle(m_vars.m_selected->m_enabled)); +} + +void network_join_blocking_manual_edit_menu::feature_update() {} + +network_join_blocking_manual_edit_menu* g_instance; +network_join_blocking_manual_edit_menu* network_join_blocking_manual_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_join_blocking_manual_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_edit.h b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_edit.h new file mode 100644 index 0000000..3d3ac25 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_edit.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" +#include "../network_join_blocking.h" + +class network_join_blocking_manual_edit_menu : public menu::submenu::submenu { +public: + static network_join_blocking_manual_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_join_blocking_manual_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::blocking::manual::edit::vars { + struct variables { + int m_response; + int m_type; + network::htoolkit::blocking::vars::user_block* m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_load.cpp b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_load.cpp new file mode 100644 index 0000000..6ca95ae --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_load.cpp @@ -0,0 +1,184 @@ +#include "network_join_blocking_manual_load.h" +#include "menu/base/submenu_handler.h" +#include "network_join_blocking_manual.h" +#include "network_join_blocking_manual_save.h" +#include "util/dirs.h" +#include "util/log.h" +#include + +using namespace network::htoolkit::blocking::load::vars; + +namespace network::htoolkit::blocking::load::vars { + variables m_vars; + + void load_blocks(std::string file) { + const char* location = util::va::va("%s%s.json", util::dirs::get_path(join_blocking), file.c_str()); + + try { + std::ifstream input(location); + if (input.good()) { + nlohmann::json json = nlohmann::json::parse(input); + input.close(); + + if (!json.empty()) { + for (auto& it = json["blocks"].begin(); it != json["blocks"].end(); ++it) { + nlohmann::json& elements = *it; + + network::htoolkit::blocking::vars::user_block user; + user.m_type = elements[0]; + user.m_enabled = elements[1]; + user.m_response = elements[2]; + + bool add = true; + + switch (user.m_type) { + case 1: { // rid + user.m_rockstar_id = elements[3]; + + auto vit = std::find_if(begin(network::htoolkit::blocking::vars::m_vars.m_blocked_users), + end(network::htoolkit::blocking::vars::m_vars.m_blocked_users), + [=](network::htoolkit::blocking::vars::user_block& e) { return e.m_type == 1 && e.m_rockstar_id == user.m_rockstar_id; }); + + if (vit != end(network::htoolkit::blocking::vars::m_vars.m_blocked_users)) { + vit->m_enabled = user.m_enabled; + vit->m_response = user.m_response; + add = false; + } + + break; + } + + case 2: { // name + strcpy_s(user.m_name, elements[3].get().c_str()); + + auto vit = std::find_if(begin(network::htoolkit::blocking::vars::m_vars.m_blocked_users), + end(network::htoolkit::blocking::vars::m_vars.m_blocked_users), + [=](network::htoolkit::blocking::vars::user_block& e) { return e.m_type == 2 && !strcmp(e.m_name, elements[3].get().c_str()); }); + + if (vit != end(network::htoolkit::blocking::vars::m_vars.m_blocked_users)) { + vit->m_enabled = user.m_enabled; + vit->m_response = user.m_response; + add = false; + } + + break; + } + + case 3: { // IP + user.m_ip = elements[3]; + + auto vit = std::find_if(begin(network::htoolkit::blocking::vars::m_vars.m_blocked_users), + end(network::htoolkit::blocking::vars::m_vars.m_blocked_users), + [=](network::htoolkit::blocking::vars::user_block& e) { return e.m_type == 3 && e.m_ip == user.m_ip; }); + + if (vit != end(network::htoolkit::blocking::vars::m_vars.m_blocked_users)) { + vit->m_enabled = user.m_enabled; + vit->m_response = user.m_response; + add = false; + } + + break; + } + } + + if (add) { + network::htoolkit::blocking::vars::m_vars.m_blocked_users.push_back(user); + } + } + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + void save_blocks(std::string file, std::vector users) { + const char* location = util::va::va("%s%s.json", util::dirs::get_path(join_blocking), file.c_str()); + + try { + nlohmann::json json; + + std::ifstream input(location); + if (input.good()) { + json = nlohmann::json::parse(input); + input.close(); + } + + std::ofstream output(location); + if (output.good()) { + if (json["blocks"].empty()) { + json["blocks"] = nlohmann::json::array(); + } + + for (network::htoolkit::blocking::vars::user_block& user : users) { + nlohmann::json arr = nlohmann::json::array(); + arr[0] = user.m_type; + arr[1] = user.m_enabled; + arr[2] = user.m_response; + + switch (user.m_type) { + case 1: // rid + arr[3] = user.m_rockstar_id; + break; + + case 2: // name + arr[3] = user.m_name; + break; + + case 3: // IP + arr[3] = user.m_ip; + break; + } + + json["blocks"].push_back(arr); + } + + output << json.dump(4); + output.close(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } +} + +void network_join_blocking_manual_load_menu::load() { + set_name("Save and Load"); + set_parent(); + + add_option(submenu_option("Save User Blocks") + .add_translate() + .add_submenu()); + + add_option(break_option("Blocks") + .add_translate()); +} + +void network_join_blocking_manual_load_menu::update() {} + +void network_join_blocking_manual_load_menu::update_once() { + clear_options(2); + + std::vector files = util::dirs::get_files_in_directory(util::dirs::get_path(join_blocking), ".json"); + if (files.size()) { + for (std::string file : files) { + add_option(button_option(file) + .add_click([=] { load_blocks(file.c_str()); })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void network_join_blocking_manual_load_menu::feature_update() {} + +network_join_blocking_manual_load_menu* g_instance; +network_join_blocking_manual_load_menu* network_join_blocking_manual_load_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_join_blocking_manual_load_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_load.h b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_load.h new file mode 100644 index 0000000..893b5c2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_load.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" +#include "../network_join_blocking.h" + +class network_join_blocking_manual_load_menu : public menu::submenu::submenu { +public: + static network_join_blocking_manual_load_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_join_blocking_manual_load_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::blocking::load::vars { + struct variables { + + }; + + void save_blocks(std::string file, std::vector users); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_save.cpp b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_save.cpp new file mode 100644 index 0000000..b6e8db6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_save.cpp @@ -0,0 +1,74 @@ +#include "network_join_blocking_manual_save.h" +#include "menu/base/submenu_handler.h" +#include "network_join_blocking_manual_load.h" + +using namespace network::htoolkit::blocking::save::vars; + +namespace network::htoolkit::blocking::save::vars { + variables m_vars; + + std::vector get_selected() { + std::vector users; + + for (std::size_t i = 0; i < network::htoolkit::blocking::vars::m_vars.m_blocked_users.size(); i++) { + if (m_vars.m_toggles[i]) { + users.push_back(network::htoolkit::blocking::vars::m_vars.m_blocked_users[i]); + } + } + + return users; + } +} + +void network_join_blocking_manual_save_menu::load() { + set_name("Save User Blocks"); + set_parent(); + + add_option(button_option("Save Selected Users") + .add_translate() + .add_keyboard("Enter file name", 100, [](button_option* option, const char* result) { network::htoolkit::blocking::load::vars::save_blocks(result, get_selected()); })); + + add_option(break_option("Current Users")); +} + +void network_join_blocking_manual_save_menu::update() {} + +void network_join_blocking_manual_save_menu::update_once() { + clear_options(2); + + memset(m_vars.m_toggles, 0, sizeof(m_vars.m_toggles)); + + int increment = 0; + for (network::htoolkit::blocking::vars::user_block& user : network::htoolkit::blocking::vars::m_vars.m_blocked_users) { + char option_name[128]; + switch (user.m_type) { + case 1: // rid + sprintf_s(option_name, "%s[Rockstar ID] %lli", user.m_enabled ? "" : "~m~", user.m_rockstar_id); + break; + + case 2: // name + sprintf_s(option_name, "%s[NAME] %s", user.m_enabled ? "" : "~m~", user.m_name); + break; + + case 3: // IP + sprintf_s(option_name, "%s[IP] %i.%i.%i.%i", user.m_enabled ? "" : "~m~", ((user.m_ip & 0xFF000000) >> 24), ((user.m_ip & 0xFF0000) >> 16), ((user.m_ip & 0xFF00) >> 8), (user.m_ip & 0xFF)); + break; + } + + add_option(toggle_option(option_name) + .add_toggle(m_vars.m_toggles[increment++])); + } +} + +void network_join_blocking_manual_save_menu::feature_update() {} + +network_join_blocking_manual_save_menu* g_instance; +network_join_blocking_manual_save_menu* network_join_blocking_manual_save_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_join_blocking_manual_save_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_save.h b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_save.h new file mode 100644 index 0000000..329844a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/blocking/network_join_blocking_manual_save.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_join_blocking_manual_save_menu : public menu::submenu::submenu { +public: + static network_join_blocking_manual_save_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_join_blocking_manual_save_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::blocking::save::vars { + struct variables { + bool m_toggles[1024]; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/network_blacklisted_players.cpp b/GTAV/src/menu/base/submenus/main/network/toolkit/network_blacklisted_players.cpp new file mode 100644 index 0000000..a40ed03 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/network_blacklisted_players.cpp @@ -0,0 +1,198 @@ +#include "network_blacklisted_players.h" +#include "menu/base/submenu_handler.h" +#include "../network_host_toolkit.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/panels.h" +#include "rage/api/api.h" + +using namespace network::htoolkit::blacklist::vars; + +namespace network::htoolkit::blacklist::vars { + variables m_vars; + + void remove_player(uint64_t rockstar_id) { + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + if (is_valid_ptr(real_config)) { + if (real_config->m_last_blacklisted.m_rockstar_id == rockstar_id) { + real_config->m_last_blacklisted.m_rockstar_id = 0; + real_config->m_last_blacklisted_timestamp = 0; + } + + // If they're the only one in the list + if (real_config->m_first_blacklisted_player) { + if (real_config->m_first_blacklisted_player->m_player.m_rockstar_id == rockstar_id) { + if (real_config->m_first_blacklisted_player->m_next == nullptr) { + real_config->m_first_blacklisted_player = nullptr; + real_config->m_last_blacklisted_player = nullptr; + } else { + // Replace it with the next + real_config->m_first_blacklisted_player = real_config->m_first_blacklisted_player->m_next; + real_config->m_first_blacklisted_player->m_last = nullptr; + } + + return; + } + } + + // If they're not the first + rage::network::blacklisted_player* current_player = real_config->m_first_blacklisted_player; + rage::network::blacklisted_player* last_player = nullptr; + + while (current_player) { + if (current_player->m_player.m_rockstar_id == rockstar_id) { + if (!is_valid_ptr(current_player->m_next)) { + last_player->m_next = nullptr; + return; + } + + last_player->m_next = current_player->m_next; + current_player->m_last = last_player; + return; + } + + last_player = current_player; + current_player = current_player->m_next; + } + } + } +} + +void network_blacklisted_players_menu::load() { + set_name("Blacklisted players"); + set_parent(); + + add_option(button_option("Clear All") + .add_translate().add_hotkey() + .add_click([] { + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + if (is_valid_ptr(real_config)) { + real_config->m_last_blacklisted.m_rockstar_id = 0; + real_config->m_last_blacklisted_timestamp = 0; + real_config->m_first_blacklisted_player = nullptr; + real_config->m_last_blacklisted_player = nullptr; + } + + m_vars.m_players.clear(); + })); + + add_option(break_option("Players") + .add_translate()); + + add_string("~m~None"); + add_string("Click on this player to remove them from the blacklist"); +} + +void network_blacklisted_players_menu::update() { + static int timer = 0; + + menu::timers::run_timed(&timer, 1000, [this] { + clear_options(2); + + std::vector players; + + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + rage::network::blacklisted_player* blacklisted_players = real_config->m_first_blacklisted_player; + if (is_valid_ptr(blacklisted_players)) { + for (; blacklisted_players; blacklisted_players = blacklisted_players->m_next) { + players.push_back(*blacklisted_players); + } + } + + for (rage::network::blacklisted_player& player : players) { + auto vit = std::find_if(m_vars.m_players.begin(), m_vars.m_players.end(), [=](blacklisted_player& element) { return element.m_player.m_player.m_rockstar_id == player.m_player.m_rockstar_id; }); + if (vit == m_vars.m_players.end()) { + m_vars.m_players.push_back({ player, false, "" }); + } + } + + std::vector _delete; + + for (blacklisted_player& player : m_vars.m_players) { + auto vit = std::find_if(players.begin(), players.end(), [=](rage::network::blacklisted_player& element) { return element.m_player.m_rockstar_id == player.m_player.m_player.m_rockstar_id; }); + if (vit == players.end()) { + _delete.push_back(player.m_player.m_player.m_rockstar_id); // Deleted + continue; + } + + if (!player.m_api) { + player.m_api = true; + + if (player.m_player.m_player.m_rockstar_id > 0x1000) { + rage::api::get_profiles_from_rid(player.m_player.m_player.m_rockstar_id, [](bool successful, std::vector accounts, void* data) { + if (successful && !accounts.empty()) { + auto vit = std::find_if(m_vars.m_players.begin(), m_vars.m_players.end(), [=](blacklisted_player& element) { return element.m_player.m_player.m_rockstar_id == accounts[0].m_rockstar_id; }); + if (vit != m_vars.m_players.end()) { + vit->m_resolved_name = accounts[0].m_name; + } + } + }, nullptr); + } + } + + std::string name = std::to_string(player.m_player.m_player.m_rockstar_id); + if (!player.m_resolved_name.empty()) name = player.m_resolved_name; + + add_option(button_option(name) + .add_click([=] { remove_player(player.m_player.m_player.m_rockstar_id); }) + .add_hover([=] { + menu::panels::panel_custom_blacklisted_player p; + p.m_rockstar_id = player.m_player.m_player.m_rockstar_id; + p.m_blacklisted_time = player.m_player.m_timestamp; + if (!player.m_resolved_name.empty()) strcpy_s(p.m_name, player.m_resolved_name.c_str()); + else strcpy_s(p.m_name, "Querying..."); + + menu::panels::panel_parent* parent = menu::panels::get_parent("PANEL_BLACKLISTED_PLAYERS"); + if (parent) { + menu::panels::set_structure(menu::panels::get_child(parent, "PANEL_BLACKLISTED_PLAYERS_INFO"), (void*)&p, sizeof(p)); + parent->m_render = true; + } + }) + .add_tooltip(get_string("Click on this player to remove them from the blacklist"))); + } + + for (uint64_t D : _delete) { + m_vars.m_players.erase(std::remove_if(m_vars.m_players.begin(), m_vars.m_players.end(), [=](blacklisted_player& element) { return element.m_player.m_player.m_rockstar_id == D; }), m_vars.m_players.end()); + } + + if (m_vars.m_players.size() == 0) { + menu::panels::panel_parent* parent = menu::panels::get_parent("PANEL_BLACKLISTED_PLAYERS"); + if (parent) { + menu::panels::null_structure(menu::panels::get_child(parent, "PANEL_BLACKLISTED_PLAYERS_INFO")); + } + + add_option(button_option(get_string("~m~None")).ref()); + } + }); + + if (menu::base::get_current_option() == 0) menu::panels::toggle_panel_render("PANEL_BLACKLISTED_PLAYERS", false); +} + +void network_blacklisted_players_menu::update_once() {} + +void network_blacklisted_players_menu::feature_update() {} + +network_blacklisted_players_menu* g_instance; +network_blacklisted_players_menu* network_blacklisted_players_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_blacklisted_players_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/network_blacklisted_players.h b/GTAV/src/menu/base/submenus/main/network/toolkit/network_blacklisted_players.h new file mode 100644 index 0000000..6a4bac0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/network_blacklisted_players.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_blacklisted_players_menu : public menu::submenu::submenu { +public: + static network_blacklisted_players_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_blacklisted_players_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::blacklist::vars { + struct blacklisted_player { + rage::network::blacklisted_player m_player; + bool m_api; + std::string m_resolved_name; + }; + + struct variables { + std::vector m_players; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/network_desync_kick.cpp b/GTAV/src/menu/base/submenus/main/network/toolkit/network_desync_kick.cpp new file mode 100644 index 0000000..8e40a75 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/network_desync_kick.cpp @@ -0,0 +1,43 @@ +#include "network_desync_kick.h" +#include "menu/base/submenu_handler.h" +#include "../network_host_toolkit.h" + +using namespace network::htoolkit::desync::vars; + +namespace network::htoolkit::desync::vars { + variables m_vars; +} + +void network_desync_kick_menu::load() { + set_name("Desync Kicks"); + set_parent(); + + add_option(toggle_option("Block") + .add_translate() + .add_toggle(m_vars.m_block).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Redirect") + .add_translate() + .add_toggle(m_vars.m_redirect).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Notify") + .add_translate() + .add_toggle(m_vars.m_notify).add_savable(get_submenu_name_stack())); +} + +void network_desync_kick_menu::update() {} + +void network_desync_kick_menu::update_once() {} + +void network_desync_kick_menu::feature_update() {} + +network_desync_kick_menu* g_instance; +network_desync_kick_menu* network_desync_kick_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_desync_kick_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/network_desync_kick.h b/GTAV/src/menu/base/submenus/main/network/toolkit/network_desync_kick.h new file mode 100644 index 0000000..a00faaa --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/network_desync_kick.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_desync_kick_menu : public menu::submenu::submenu { +public: + static network_desync_kick_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_desync_kick_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::desync::vars { + struct variables { + bool m_block = true; + bool m_redirect = true; + bool m_notify = true; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/network_join_blocking.cpp b/GTAV/src/menu/base/submenus/main/network/toolkit/network_join_blocking.cpp new file mode 100644 index 0000000..326519b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/network_join_blocking.cpp @@ -0,0 +1,118 @@ +#include "network_join_blocking.h" +#include "menu/base/submenu_handler.h" +#include "../network_host_toolkit.h" +#include "blocking/network_join_blocking_edit.h" +#include "blocking/network_join_blocking_add.h" +#include "blocking/network_join_blocking_manual.h" + +using namespace network::htoolkit::blocking::vars; + +namespace network::htoolkit::blocking::vars { + variables m_vars; + + scroll_struct who_can_join[] = { + { localization("Anybody", true), 0 }, + { localization("Nobody", true), 1 }, + { localization("Friends Only", true), 2 }, + }; + + const char* strings[] = { + "Spoofed - Host Token", + "Spoofed - Rockstar ID", + "Spoofed - Name", + "Spoofed - IP", + "Rockstar Developer" + }; +} + +void network_join_blocking_menu::load() { + set_name("Join Blocking"); + set_parent(); + + for (int i = 0; i < NUMOF(strings); i++) { + m_vars.m_responses[i].m_enabled = util::config::read_bool(get_submenu_name_stack(), "Toggled", false, { strings[i] }); + m_vars.m_responses[i].m_notify = util::config::read_bool(get_submenu_name_stack(), "Notify", true, { strings[i] }); + m_vars.m_responses[i].m_context.m_selected = util::config::read_int(get_submenu_name_stack(), "Selected", 1, { strings[i] }); + } + + add_option(submenu_option("Manual User Block") + .add_translate().add_hotkey() + .add_submenu() + .add_tooltip("Manually add a user to be blocked from joining")); + + add_option(scroll_option(SCROLL, "Who Can Join?") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_who_can_join, 0, NUMOF(who_can_join), who_can_join).add_savable(get_submenu_name_stack()) + .add_tooltip("Who can join your session?")); + + add_option(break_option("Block Spoofed Joiners") + .add_translate()); + + add_option(submenu_option("Spoofed - Host Token") + .add_translate().add_hotkey() + .add_click_this([] (submenu_option* option) { + network_join_blocking_edit_menu::get()->set_name(option->get_name().get(), false, false); + network::htoolkit::blocking::edit::vars::m_vars.m_selected = &m_vars.m_responses[TOOLKIT_NEXT_SESSION_HOST]; + }) + .add_submenu() + .add_tooltip("Blocks most force host spoofs from joining the session. You have to be host!")); + + add_option(submenu_option("Spoofed - Rockstar ID") + .add_translate().add_hotkey() + .add_click_this([](submenu_option* option) { + network_join_blocking_edit_menu::get()->set_name(option->get_name().get(), false, false); + network::htoolkit::blocking::edit::vars::m_vars.m_selected = &m_vars.m_responses[TOOLKIT_RID]; + }) + .add_submenu() + .add_tooltip("Blocks most Rockstar ID spoofs from joining the session. You have to be host!")); + + add_option(submenu_option("Spoofed - Name") + .add_translate().add_hotkey() + .add_click_this([](submenu_option* option) { + network_join_blocking_edit_menu::get()->set_name(option->get_name().get(), false, false); + network::htoolkit::blocking::edit::vars::m_vars.m_selected = &m_vars.m_responses[TOOLKIT_NAME]; + }) + .add_submenu() + .add_tooltip("Blocks obvious name spoofs from joining the session. You have to be host!")); + + add_option(submenu_option("Spoofed - IP") + .add_translate().add_hotkey() + .add_click_this([](submenu_option* option) { + network_join_blocking_edit_menu::get()->set_name(option->get_name().get(), false, false); + network::htoolkit::blocking::edit::vars::m_vars.m_selected = &m_vars.m_responses[TOOLKIT_IP]; + }) + .add_submenu() + .add_tooltip("Blocks IP spoofs from joining the session. You have to be host!")); + + add_option(submenu_option("Rockstar Developer") + .add_translate().add_hotkey() + .add_click_this([] (submenu_option* option) { + network_join_blocking_edit_menu::get()->set_name(option->get_name().get(), false, false); + network::htoolkit::blocking::edit::vars::m_vars.m_selected = &m_vars.m_responses[TOOLKIT_DEV]; + }) + .add_submenu() + .add_tooltip("Blocks players joining with developer flag set (and potentially real rockstar staff, be careful!). You have to be host!")); +} + +void network_join_blocking_menu::update() {} + +void network_join_blocking_menu::update_once() { + for (int i = 0; i < NUMOF(strings); i++) { + util::config::write_bool(get_submenu_name_stack(), "Toggled", m_vars.m_responses[i].m_enabled, { strings[i] }); + util::config::write_bool(get_submenu_name_stack(), "Notify", m_vars.m_responses[i].m_notify, { strings[i] }); + util::config::write_int(get_submenu_name_stack(), "Selected", m_vars.m_responses[i].m_context.m_selected, { strings[i] }); + } +} + +void network_join_blocking_menu::feature_update() {} + +network_join_blocking_menu* g_instance; +network_join_blocking_menu* network_join_blocking_menu::get() { + if (g_instance == nullptr) { + g_instance = new network_join_blocking_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/network/toolkit/network_join_blocking.h b/GTAV/src/menu/base/submenus/main/network/toolkit/network_join_blocking.h new file mode 100644 index 0000000..93642cd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/network/toolkit/network_join_blocking.h @@ -0,0 +1,48 @@ +#pragma once +#include "menu/base/submenu.h" + +class network_join_blocking_menu : public menu::submenu::submenu { +public: + static network_join_blocking_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + network_join_blocking_menu() + : menu::submenu::submenu() {} +}; + +namespace network::htoolkit::blocking::vars { + enum eHostToolkit { + TOOLKIT_NEXT_SESSION_HOST, + TOOLKIT_RID, + TOOLKIT_NAME, + TOOLKIT_IP, + TOOLKIT_DEV + }; + + struct toolkit_block { + bool m_enabled; + bool m_notify = true; + radio_context m_context = { "commonmenu", "shop_tick_icon" }; + }; + + struct user_block { + int m_type; // 1 = rid, 2 = name, 3 = IP + uint64_t m_rockstar_id; + char m_name[32]; + uint32_t m_ip; + eJoinResponses m_response; + bool m_enabled; + }; + + struct variables { + int m_who_can_join; + toolkit_block m_responses[8]; + std::vector m_blocked_users; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player.cpp b/GTAV/src/menu/base/submenus/main/player.cpp new file mode 100644 index 0000000..52a4409 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player.cpp @@ -0,0 +1,365 @@ +#include "player.h" +#include "../main.h" +#include "menu/base/submenu_handler.h" +#include "menu/base/util/global.h" +#include "menu/base/util/input.h" +#include "player/appearance.h" +#include "player/movement.h" +#include "player/animation.h" +#include "player/particles.h" +#include "rage/types/global_types.h" + +using namespace player::vars; + +namespace player::vars { + variables m_vars; + + scroll_struct invisibility[] = { + { localization("Local", true), 0 }, + { localization("Network", true), 0 }, + { localization("Network + Local", true), 0 }, + }; + + scroll_struct request[] = { + { localization("Ballistic Armor and Minigun", true), 0 }, + { localization("Airstrike", true), 0 }, + { localization("Backup Helicopter", true), 0 }, + { localization("Helicopter Pickup", true), 0 } + }; + + void cops_turn_blind_eye() { + if (m_vars.m_cops_turn_blind_eye) { + menu::script_global(rage::global::_155_customs_base).at(4622).as() = 5; // 1.55 done + menu::script_global(rage::global::_155_customs_base).at(4625).as() = native::get_network_time() + 637000; // 1.55 done + } else { + menu::script_global(rage::global::_155_customs_base).at(4622).as() = 0;// 1.55 done + menu::script_global(rage::global::_155_customs_base).at(4625).as() = native::get_network_time(); // 1.55 done + } + } + + void off_the_radar() { + if (m_vars.m_off_the_radar) { + menu::script_global(rage::global::_155_property_base2).at(menu::player::get_local_player().m_id, rage::global::_155_property_base2_size).at(209).as() = 1;// 1.55 done + menu::script_global(rage::global::_155_time_base).at(70).as() = native::get_network_time() + 757000;// 1.55 done + } else { + menu::script_global(rage::global::_155_property_base2).at(menu::player::get_local_player().m_id, rage::global::_155_property_base2_size).at(209).as() = 0;// 1.55 done + menu::script_global(rage::global::_155_time_base).at(70).as() = native::get_network_time();// 1.55 done + } + } + + void reveal_hidden_players() { + if (m_vars.m_reveal_hidden_players) { + menu::script_global(rage::global::_155_property_base2).at(menu::player::get_local_player().m_id, rage::global::_155_property_base2_size).at(212).as() = 1; // 1.55 done + menu::script_global(rage::global::_155_time_base).at(71).as() = native::get_network_time() + 757000;// 1.55 done + } else { + menu::script_global(rage::global::_155_property_base2).at(menu::player::get_local_player().m_id, rage::global::_155_property_base2_size).at(212).as() = 0;// 1.55 done + menu::script_global(rage::global::_155_time_base).at(71).as() = native::get_network_time();// 1.55 done + } + } + + void no_ragdoll() { + native::set_ped_can_ragdoll(menu::player::get_local_player().m_ped, !m_vars.m_disable_ragdoll); + native::set_ped_can_ragdoll_from_player_impact(menu::player::get_local_player().m_ped, !m_vars.m_disable_ragdoll); + native::set_ped_can_be_knocked_off_vehicle(menu::player::get_local_player().m_ped, !m_vars.m_disable_ragdoll); + } + + void badsport(bool toggle) { + if (!toggle) native::stat_set_bool(0x8C1C0FAF, false, true); + native::stat_set_float(0xBE89A9D2, toggle ? 300.f : 0.f, true); + } +} + +void player_menu::load() { + set_name("Player"); + set_parent(); + + add_option(submenu_option("Appearance") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Movement") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Animation") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Particle FX") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Godmode") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_godmode).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_godmode) + native::set_entity_invincible(menu::player::get_local_player().m_ped, false); + })); + + add_option(toggle_option("Disable Police") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_police).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_disable_police) { + native::set_max_wanted_level(5); + } + })); + + add_option(toggle_option("Disable Ragdoll") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_ragdoll).add_savable(get_submenu_name_stack()) + .add_click(no_ragdoll)); + + add_option(toggle_option("Off the Radar") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_off_the_radar).add_savable(get_submenu_name_stack()) + .add_click(off_the_radar)); + + add_option(toggle_option("Cops Turn Blind Eye") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_cops_turn_blind_eye).add_savable(get_submenu_name_stack()) + .add_click(cops_turn_blind_eye)); + + add_option(toggle_option("Reveal Hidden Players") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_reveal_hidden_players).add_savable(get_submenu_name_stack()) + .add_click(reveal_hidden_players)); + + add_option(toggle_option("Peds Ignore") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_peds_ingore_player).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_peds_ingore_player) { + native::set_police_ignore_player(menu::player::get_local_player().m_ped, true); + native::set_everyone_ignore_player(menu::player::get_local_player().m_ped, true); + native::set_player_can_be_hassled_by_gangs(menu::player::get_local_player().m_ped, false); + native::set_ignore_low_priority_shocking_events(menu::player::get_local_player().m_ped, true); + } + })); + + add_option(button_option("Bullshark Testosterone") + .add_translate().add_hotkey() + .add_click([] { menu::script_global(rage::global::_155_time_base).at(4013).as() = true; })); // 1.55 done + + add_option(scroll_option(SCROLLSELECT, "Merryweather Request") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_merryweather, 0, NUMOF(request), request) + .add_click([] { + switch (m_vars.m_merryweather) { + case 0: menu::script_global(rage::global::_155_customs_base).at(884).as() = true; break; // 1.55 done + case 1: menu::script_global(rage::global::_155_customs_base).at(4454).as() = true; break; // 1.55 done + case 2: menu::script_global(rage::global::_155_customs_base).at(4453).as() = true; break; // 1.55 done + case 3: menu::script_global(rage::global::_155_customs_base).at(876).as() = true; break; // 1.55 done + } + })); + + add_option(button_option("Suicide") + .add_translate().add_hotkey() + .add_click([] { native::apply_damage_to_ped(menu::player::get_local_player().m_ped, 30000, true); })); + + add_option(button_option("Clone") + .add_translate().add_hotkey() + .add_click([] { native::clone_ped(menu::player::get_local_player().m_ped, menu::player::get_local_player().m_heading, true, false); })); + + add_option(button_option("Health & Armor Regeneration") + .add_translate().add_hotkey() + .add_click([] { + native::set_ped_armour(menu::player::get_local_player().m_ped, 100); + native::set_entity_health(menu::player::get_local_player().m_ped, native::get_entity_max_health(menu::player::get_local_player().m_ped)); + })); + + add_option(button_option("Sky Dive") + .add_translate().add_hotkey() + .add_click([] { + if (native::get_entity_height_above_ground(menu::player::get_local_player().m_ped) < 50.f) { + native::set_entity_coords(menu::player::get_local_player().m_ped, menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z + 1000.f, true, true, true, false); + native::task_sky_dive(menu::player::get_local_player().m_ped, TRUE); + } + })); + + add_option(toggle_option("Reduced Collision") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_reduced_collision).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(TOGGLE, "Invisibility") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_invisibility) + .add_scroll(m_vars.m_invisibility_var, 0, NUMOF(invisibility), invisibility).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_invisibility) { + native::set_entity_visible(menu::player::get_local_player().m_ped, true, true); + native::network_set_entity_invisible_to_network(menu::player::get_local_player().m_ped, false); + native::set_local_player_invisible_locally(false); + } + })); + + add_option(toggle_option("Superman") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_superman)); + + add_option(toggle_option("Badsport") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_badsport) + .add_click([] { + badsport(m_vars.m_badsport); + }) + .add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Breathe Fire") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_breathe_fire) + .add_click([] { if (!m_vars.m_breathe_fire) native::remove_particle_fx(m_vars.m_breathe_fire_handle, false); }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Swim Anywhere") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_swim_anywhere).add_savable(get_submenu_name_stack()) + .add_tooltip("~y~Notice: ~w~Local only")); + + add_option(toggle_option("Kill Killers") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_kill_killers).add_savable(get_submenu_name_stack()) + .add_tooltip("Kill peds/players that kill you")); +} + +void player_menu::update() {} + +void player_menu::update_once() {} + +void player_menu::feature_update() { + if (m_vars.m_kill_killers) { + if (!menu::player::get_local_player().m_alive) { + Entity killer = native::get_ped_source_of_death(menu::player::get_local_player().m_ped); + if (native::does_entity_exist(killer)) { + if (!native::is_entity_dead(killer, 0)) { + math::vector3 position = native::get_entity_coords(killer, true); + if (!position.is_null()) { + native::add_explosion(position.x, position.y, position.z, 0, 50.f, false, true, 0.f, false); + } + } + } + } + } + + if (m_vars.m_peds_ingore_player) { + native::set_police_ignore_player(menu::player::get_local_player().m_ped, false); + native::set_everyone_ignore_player(menu::player::get_local_player().m_ped, false); + native::set_player_can_be_hassled_by_gangs(menu::player::get_local_player().m_ped, true); + native::set_ignore_low_priority_shocking_events(menu::player::get_local_player().m_ped, false); + } + + if (m_vars.m_invisibility) { + switch (m_vars.m_invisibility_var) { + case 0: + native::set_local_player_invisible_locally(true); + break; + + case 1: + native::network_set_entity_invisible_to_network(menu::player::get_local_player().m_ped, true); + native::set_entity_locally_visible(menu::player::get_local_player().m_ped); + break; + + case 2: + native::network_set_entity_invisible_to_network(menu::player::get_local_player().m_ped, true); + native::set_local_player_invisible_locally(true); + break; + } + } + + if (m_vars.m_godmode) { + native::set_entity_invincible(menu::player::get_local_player().m_ped, true); + } + + if (m_vars.m_disable_ragdoll) { + no_ragdoll(); + } + + if (m_vars.m_disable_police) { + native::set_max_wanted_level(0); + native::clear_player_wanted_level(menu::player::get_local_player().m_id); + } + + if (m_vars.m_reduced_collision) { + native::set_ped_capsule(menu::player::get_local_player().m_ped, 0.001f); + } + + if (m_vars.m_invisibility) { + native::set_entity_visible(menu::player::get_local_player().m_ped, false, false); + } + + if (m_vars.m_superman) { + int left_right = native::get_control_value(2, 188); + int up_down = native::get_control_value(2, 189); + + if (native::get_entity_height_above_ground(menu::player::get_local_player().m_ped) < 3.f) { + native::give_weapon_to_ped(menu::player::get_local_player().m_ped, 0xFBAB5776, -1, true, true); + + math::vector3 coords = menu::player::get_local_player().m_coords; + coords.z += 100.f; + native::set_entity_coords(menu::player::get_local_player().m_ped, coords.x, coords.y, coords.z, false, false, false, false); + } else { + if (up_down == 254 || menu::input::is_pressed(true, 'S')) { + native::apply_force_to_entity(menu::player::get_local_player().m_ped, 1, 0.f, 3.f, 10.f, 0.f, 0.f, 0.f, false, true, true, true, false, true); + } + + if (up_down == 0 || menu::input::is_pressed(true, 'W')) { + native::apply_force_to_entity(menu::player::get_local_player().m_ped, 1, 0.f, 3.f, 0.f, 0.f, 0.f, 0.f, false, true, true, true, false, true); + } + + if (menu::input::is_pressed(true, VK_SHIFT) || menu::input::is_pressed(false, ControlFrontendRt)) { + native::apply_force_to_entity(menu::player::get_local_player().m_ped, 1, 0.f, 15.f, .3f, 0.f, 0.f, 0.f, false, true, true, true, false, true); + } + + if (left_right == 254 || menu::input::is_pressed(true, 'D')) { + native::apply_force_to_entity(menu::player::get_local_player().m_ped, 1, 1.20f, 0.f, 0.f, 0.f, 0.1f, 0.f, false, true, true, true, false, true); + } + + if (left_right == 0 || menu::input::is_pressed(true, 'A')) { + native::apply_force_to_entity(menu::player::get_local_player().m_ped, 1, -1.20f, 0.f, 0.f, 0.f, 0.1f, 0.f, false, true, true, true, false, true); + } + } + } + + if (m_vars.m_off_the_radar) { + off_the_radar(); + } + + if (m_vars.m_reveal_hidden_players) { + reveal_hidden_players(); + } + + if (m_vars.m_cops_turn_blind_eye) { + cops_turn_blind_eye(); + } + + if (m_vars.m_swim_anywhere) { + if (global::vars::g_ped_factory) { + auto Ped = global::vars::g_ped_factory->m_local_ped; + if (Ped) { + Ped->set_flag((1 << 1)); // IS_PED_SWIMMING + } + } + } + + if (m_vars.m_breathe_fire) { + if (native::has_named_ptfx_asset_loaded("core")) { + native::use_particle_fx_asset_next_call("core"); + if (!native::does_particle_fx_looped_exist(m_vars.m_breathe_fire_handle)) { + m_vars.m_breathe_fire_handle = native::start_particle_fx_looped_on_entity_bone("ent_sht_flame", menu::player::get_local_player().m_ped, -0.02f, 0.2f, 0.0f, 90.0f, 100.0f, 90.0f, native::get_ped_bone_index(menu::player::get_local_player().m_ped, 31086), 1.0f, false, false, false); + } + } else { + native::request_named_ptfx_asset("core"); + } + } +} + +player_menu* g_instance; +player_menu* player_menu::get() { + if (g_instance == nullptr) { + g_instance = new player_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player.h b/GTAV/src/menu/base/submenus/main/player.h new file mode 100644 index 0000000..32f143c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player.h @@ -0,0 +1,40 @@ +#pragma once +#include "menu/base/submenu.h" + +class player_menu : public menu::submenu::submenu { +public: + static player_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + player_menu() + : menu::submenu::submenu() {} +}; + +namespace player::vars { + struct variables { + bool m_godmode; + bool m_disable_police; + bool m_disable_ragdoll; + bool m_cops_turn_blind_eye; + bool m_off_the_radar; + bool m_reveal_hidden_players; + bool m_reduced_collision; + bool m_invisibility; + bool m_superman; + bool m_badsport; + bool m_swim_anywhere; + bool m_breathe_fire; + bool m_peds_ingore_player; + bool m_kill_killers; + + int m_breathe_fire_handle; + int m_invisibility_var; + int m_merryweather; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/animation.cpp b/GTAV/src/menu/base/submenus/main/player/animation.cpp new file mode 100644 index 0000000..63fe516 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/animation.cpp @@ -0,0 +1,40 @@ +#include "animation.h" +#include "menu/base/submenu_handler.h" +#include "../player.h" +#include "animation/animations.h" +#include "animation/clipsets.h" +#include "animation/scenario.h" + +void animation_menu::load() { + set_name("Animation"); + set_parent(); + + add_option(submenu_option("Animations") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Scenarios") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Clipsets") + .add_translate().add_hotkey() + .add_submenu()); +} + +void animation_menu::update() {} + +void animation_menu::update_once() {} + +void animation_menu::feature_update() {} + +animation_menu* g_instance; +animation_menu* animation_menu::get() { + if (g_instance == nullptr) { + g_instance = new animation_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/animation.h b/GTAV/src/menu/base/submenus/main/player/animation.h new file mode 100644 index 0000000..643cf2d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/animation.h @@ -0,0 +1,15 @@ +#pragma once +#include "menu/base/submenu.h" + +class animation_menu : public menu::submenu::submenu { +public: + static animation_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + animation_menu() + : menu::submenu::submenu() {} +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/animation/animations.cpp b/GTAV/src/menu/base/submenus/main/player/animation/animations.cpp new file mode 100644 index 0000000..dba2020 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/animation/animations.cpp @@ -0,0 +1,192 @@ +#include "animations.h" +#include "menu/base/submenu_handler.h" +#include "../animation.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" + +using namespace player::animations::vars; + +namespace player::animations::vars { + variables m_vars; + + scroll_struct> sexual[] = { + { localization("Doggystyle 1", true), { "rcmpaparazzo_2", "shag_loop_poppy" } }, + { localization("Doggystyle 2", true), { "rcmpaparazzo_2", "shag_loop_a" } }, + { localization("Shaking Ass", true), { "switch@trevor@mocks_lapdance", "001443_01_trvs_28_idle_stripper" } }, + { localization("Slow Humping", true), { "misscarsteal2pimpsex", "shagloop_pimp" } } + }; + + scroll_struct> animals[] = { + { localization("Monkey", true), { "missfbi5ig_30monkeys", "monkey_b_freakout_loop" } }, + { localization("Chop Hump", true), { "missfra0_chop_find", "hump_loop_chop" } }, + { localization("Chop Swim", true), { "creatures@rottweiler@swim@", "swim" } } + }; + + scroll_struct> actions[] = { + { localization("Air Guitar", true), { "anim@mp_player_intcelebrationfemale@air_guitar", "air_guitar" } }, + { localization("Blow Kiss", true), { "anim@mp_player_intcelebrationfemale@blow_kiss", "blow_kiss" } }, + { localization("Bro Hug", true), { "anim@mp_player_intcelebrationpaired@f_m_bro_hug", "bro_hug_right" } }, + { localization("Challenge", true), { "misscommon@response", "face_palm" } }, + { localization("Face Palm", true), { "anim@mp_player_intcelebrationmale@face_palm", "" } }, + { localization("Finger", true), { "anim@mp_player_intcelebrationmale@finger", "finger" } }, + { localization("Hands Up", true), { "mp_pol_bust_out", "guard_handsup_loop" } }, + { localization("Hump Air", true), { "anim@mp_player_intcelebrationfemale@air_shagging", "air_shagging" } }, + { localization("Jazz Hands", true), { "anim@mp_player_intcelebrationmale@jazz_hands", "jazz_hands" } }, + { localization("Nose Pick", true), { "anim@mp_player_intcelebrationmale@nose_pick", "nose_pick" } }, + { localization("Photographer", true), { "anim@mp_player_intcelebrationmale@photography", "photography" } }, + { localization("Salute", true), { "anim@mp_player_intcelebrationmale@salute", "salute" } }, + { localization("Shush", true), { "anim@mp_player_intcelebrationmale@shush", "shush" } }, + { localization("Slow Clap", true), { "anim@mp_player_intcelebrationmale@slow_clap", "slow_clap" } }, + { localization("Smoke", true), { "anim@mp_player_intcelebrationmale@smoke_flick", "smoke_flick" } }, + { localization("Surrender", true), { "anim@mp_player_intcelebrationmale@surrender", "surrender" } }, + { localization("Synth", true), { "anim@mp_player_intcelebrationfemale@air_synth", "air_synth" } }, + { localization("Thumbs Up", true), { "anim@mp_player_intcelebrationmale@thumbs_up", "thumbs_up" } }, + { localization("Wank", true), { "mp_player_intwank", "mp_player_int_wank" } } + }; + + scroll_struct> dance[] = { + { localization("Casual", true), { "rcmnigel1bnmt_1b", "dance_loop_tyler" } }, + { localization("Clown", true), { "rcm_barry2", "clown_idle_6" } }, + { localization("Pole", true), { "mini@strip_club@pole_dance@pole_dance3", "pd_dance_03" } }, + { localization("Private", true), { "mini@strip_club@private_dance@part2", "priv_dance_p2" } }, + { localization("Receive", true), { "mp_am_stripper", "lap_dance_player" } }, + { localization("Sexual", true), { "mini@strip_club@pole_dance@pole_a_2_stage", "pole_a_2_stage" } }, + { localization("Yacht", true), { "oddjobs@assassinate@multi@yachttarget@lapdance", "yacht_ld_f" } } + }; + + scroll_struct> misc[] = { + { localization("Electrocute", true), { "ragdoll@human", "electrocute" } }, + { localization("Hover", true), { "swimming@base", "dive_idle" } }, + { localization("Jump", true), { "move_jump", "jump_launch_l_to_skydive" } }, + { localization("Meditate", true), { "rcmcollect_paperleadinout@", "meditiate_idle" } }, + { localization("Party", true), { "rcmfanatic1celebrate", "celebrate" } }, + { localization("Pissing", true), { "misscarsteal2peeing", "peeing_loop" } }, + { localization("Push Ups", true), { "rcmfanatic3", "ef_3_rcm_loop_maryann" } }, + { localization("Run", true), { "move_m@alien", "alien_run" } }, + { localization("Shitting", true), { "missfbi3ig_0", "shit_loop_trev" } }, + { localization("Showering", true), { "mp_safehouseshower@male@", "male_shower_idle_b" } }, + { localization("Swim", true), { "swimming@scuba", "dive_idle" } }, + { localization("Vomit", true), { "missfam5_blackout", "vomit" } }, + { localization("Wave Forward", true), { "friends@frj@ig_1", "wave_d" } }, + { localization("Wave Hands High", true), { "random@prisoner_lift", "arms_waving" } }, + { localization("Wave One Arm", true), { "random@shop_gunstore", "_greeting" } } + }; + + void start_animation(std::pair anim) { + util::fiber::pool::add([=] { + int flag = AnimationRepeat; + if (m_vars.m_controllable) flag |= AnimationEnablePlayerControl | AnimationUpperBody; + if (m_vars.m_contort) flag |= AnimationCreature; + + while (!native::has_anim_dict_loaded(anim.first)) { + native::request_anim_dict(anim.first); + util::fiber::sleep(100); + } + + native::clear_ped_tasks_immediately(menu::player::get_local_player().m_ped); + native::task_play_anim(menu::player::get_local_player().m_ped, anim.first, anim.second, 8.f, 8.f, -1, flag, 0.f, false, false, false); + }); + } +} + +void animations_menu::load() { + set_name("Animations"); + set_parent(); + + add_option(button_option("Stop Animation") + .add_translate().add_hotkey() + .add_click([] { native::clear_ped_tasks_immediately(menu::player::get_local_player().m_ped); })); + + add_option(toggle_option("Controllable") + .add_translate() + .add_toggle(m_vars.m_controllable).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Contort") + .add_translate() + .add_toggle(m_vars.m_contort).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Speed") + .add_translate() + .add_number(m_vars.m_speed, "%.0f", 1.f).add_min(0.f).add_max(100.f).add_savable(get_submenu_name_stack())); + + add_option(break_option("Animations") + .add_translate()); + + add_option(scroll_option>(SCROLLSELECT, "Sexual") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_sexual, 0, NUMOF(sexual), sexual) + .add_click([] { start_animation(sexual[m_vars.m_sexual].m_result); })); + + add_option(scroll_option>(SCROLLSELECT, "Dance") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_dance, 0, NUMOF(dance), dance) + .add_click([] { start_animation(dance[m_vars.m_dance].m_result); })); + + add_option(scroll_option>(SCROLLSELECT, "Actions") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_actions, 0, NUMOF(actions), actions) + .add_click([] { start_animation(actions[m_vars.m_actions].m_result); })); + + add_option(scroll_option>(SCROLLSELECT, "Animals") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_animals, 0, NUMOF(animals), animals) + .add_click([] { start_animation(animals[m_vars.m_animals].m_result); })); + + add_option(scroll_option>(SCROLLSELECT, "Misc") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_misc, 0, NUMOF(misc), misc) + .add_click([] { start_animation(misc[m_vars.m_misc].m_result); })); +} + +void animations_menu::update() { + bool playing = false; + + for (scroll_struct> anim : sexual) { + if (native::is_entity_playing_anim(menu::player::get_local_player().m_ped, anim.m_result.first, anim.m_result.second, 3)) { + playing = true; + } + } + + for (scroll_struct> anim : dance) { + if (native::is_entity_playing_anim(menu::player::get_local_player().m_ped, anim.m_result.first, anim.m_result.second, 3)) { + playing = true; + } + } + + for (scroll_struct> anim : actions) { + if (native::is_entity_playing_anim(menu::player::get_local_player().m_ped, anim.m_result.first, anim.m_result.second, 3)) { + playing = true; + } + } + + for (scroll_struct> anim : animals) { + if (native::is_entity_playing_anim(menu::player::get_local_player().m_ped, anim.m_result.first, anim.m_result.second, 3)) { + playing = true; + } + } + + for (scroll_struct> anim : misc) { + if (native::is_entity_playing_anim(menu::player::get_local_player().m_ped, anim.m_result.first, anim.m_result.second, 3)) { + playing = true; + } + } + + if (playing) { + native::set_anim_rate(menu::player::get_local_player().m_ped, m_vars.m_speed, 0.f, 0.f); + } +} + +void animations_menu::update_once() {} + +void animations_menu::feature_update() {} + +animations_menu* g_instance; +animations_menu* animations_menu::get() { + if (g_instance == nullptr) { + g_instance = new animations_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/animation/animations.h b/GTAV/src/menu/base/submenus/main/player/animation/animations.h new file mode 100644 index 0000000..d8f422c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/animation/animations.h @@ -0,0 +1,32 @@ +#pragma once +#include "menu/base/submenu.h" + +class animations_menu : public menu::submenu::submenu { +public: + static animations_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + animations_menu() + : menu::submenu::submenu() {} +}; + +namespace player::animations::vars { + struct variables { + bool m_controllable; + bool m_contort; + + int m_sexual; + int m_animals; + int m_actions; + int m_dance; + int m_misc; + + float m_speed = 1.f; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/animation/clipsets.cpp b/GTAV/src/menu/base/submenus/main/player/animation/clipsets.cpp new file mode 100644 index 0000000..327929d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/animation/clipsets.cpp @@ -0,0 +1,90 @@ +#include "clipsets.h" +#include "menu/base/submenu_handler.h" +#include "../animation.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" + +using namespace player::clipset::vars; + +namespace player::clipset::vars { + variables m_vars; + + scroll_struct motion[] = { + { localization("Businessman", true), "move_m@business@a" }, + { localization("Gangster", true), "move_m@gangster@generic" }, + { localization("Hero", true), "move_m@brave@a" }, + { localization("Hiker", true), "move_m@hiking" }, + { localization("Hobo", true), "move_m@hobo@a" }, + { localization("Injured", true), "move_m@injured" }, + { localization("Quick", true), "move_m@quick" }, + { localization("Wasted", true), "move_m@drunk@slightlydrunk" }, + { localization("Very Wasted", true), "move_m@drunk@verydrunk" } + }; + + scroll_struct weapon[] = { + { localization("Bag", true), "missfbi4prepp1_garbageman" }, + { localization("Bucket", true), "move_ped_wpn_bucket" }, + { localization("Cane", true), "move_lester_CaneUp" }, + { localization("Jerry Can", true), "move_ped_wpn_jerrycan_generic" }, + { localization("Mop", true), "move_ped_wpn_mop" }, + { localization("Rifle", true), "Wpn_AssaultRifle_WeaponHoldingCrouched" }, + { localization("Sack", true), "MOVE_P_M_ZERO_RUCKSACK" } + }; + + void start_clipset(bool weapon, const char* clipset) { + util::fiber::pool::add([=] { + while (!native::has_clipset_loaded(clipset)) { + native::request_clipset(clipset); + util::fiber::sleep(100); + } + + if (weapon) { + native::reset_ped_weapon_movement_clipset(menu::player::get_local_player().m_ped); + native::set_ped_weapon_movement_clipset(menu::player::get_local_player().m_ped, clipset); + } else { + native::reset_ped_movement_clipset(menu::player::get_local_player().m_ped, 0.f); + native::set_ped_movement_clipset(menu::player::get_local_player().m_ped, clipset, 1.f); + } + }); + } +} + +void clipset_menu::load() { + set_name("Clipset"); + set_parent(); + + add_option(button_option("Default Motion Clipset") + .add_translate().add_hotkey() + .add_click([] { native::reset_ped_movement_clipset(menu::player::get_local_player().m_ped, 0.f); })); + + add_option(scroll_option(SCROLLSELECT, "Motion") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_motion, 0, NUMOF(motion), motion) + .add_click([] { start_clipset(false, motion[m_vars.m_motion].m_result); })); + + add_option(button_option("Default Weapon Clipset") + .add_translate().add_hotkey() + .add_click([] { native::reset_ped_weapon_movement_clipset(menu::player::get_local_player().m_ped); })); + + add_option(scroll_option(SCROLLSELECT, "Weapon") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_weapon, 0, NUMOF(weapon), weapon) + .add_click([] { start_clipset(true, weapon[m_vars.m_weapon].m_result); })); +} + +void clipset_menu::update() {} + +void clipset_menu::update_once() {} + +void clipset_menu::feature_update() {} + +clipset_menu* g_instance; +clipset_menu* clipset_menu::get() { + if (g_instance == nullptr) { + g_instance = new clipset_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/player/animation/clipsets.h b/GTAV/src/menu/base/submenus/main/player/animation/clipsets.h new file mode 100644 index 0000000..277a2ab --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/animation/clipsets.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class clipset_menu : public menu::submenu::submenu { +public: + static clipset_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + clipset_menu() + : menu::submenu::submenu() {} +}; + +namespace player::clipset::vars { + struct variables { + int m_motion; + int m_weapon; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/animation/scenario.cpp b/GTAV/src/menu/base/submenus/main/player/animation/scenario.cpp new file mode 100644 index 0000000..634b1eb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/animation/scenario.cpp @@ -0,0 +1,109 @@ +#include "scenario.h" +#include "menu/base/submenu_handler.h" +#include "../animation.h" + +using namespace player::scenario::vars; + +namespace player::scenario::vars { + variables m_vars; + + scroll_struct ambient[] = { + { localization("Coffee", true), "WORLD_HUMAN_AA_COFFEE" }, + { localization("Smoking", true), "WORLD_HUMAN_AA_SMOKE" }, + { localization("Freeway Bum", true), "WORLD_HUMAN_BUM_FREEWAY" }, + { localization("Sleeping Bum", true), "WORLD_HUMAN_BUM_SLUMPED" }, + { localization("Cheer", true), "WORLD_HUMAN_CHEERING" }, + { localization("Partying", true), "WORLD_HUMAN_PARTYING" }, + { localization("Shine Flashlight", true), "WORLD_HUMAN_SECURITY_SHINE_TORCH" }, + { localization("Tourist Map", true), "WORLD_HUMAN_TOURIST_MAP" } + }; + + scroll_struct activities[] = { + { localization("Binoculars", true), "WORLD_HUMAN_BINOCULARS" }, + { localization("Drunk", true), "WORLD_HUMAN_DRINKING" }, + { localization("Human Statue", true), "WORLD_HUMAN_HUMAN_STATUE" }, + { localization("Musician", true), "WORLD_HUMAN_MUSICIAN" }, + { localization("Fishing", true), "WORLD_HUMAN_STAND_FISHING" }, + { localization("BBQ", true), "PROP_HUMAN_BBQ" }, + { localization("Yoga", true), "WORLD_HUMAN_YOGA" } + }; + + scroll_struct animals[] = { + { localization("Grazing Boar", true), "WORLD_BOAR_GRAZING" }, + { localization("Grazing Cow", true), "WORLD_COW_GRAZING" }, + { localization("Coyote Howl", true), "WORLD_COYOTE_HOWL" }, + { localization("Coyote Rest", true), "WORLD_COYOTE_REST" }, + { localization("Coyote Wander", true), "WORLD_COYOTE_WANDER" }, + { localization("Rottweiler Bark", true), "WORLD_DOG_BARKING_ROTTWEILER" } + }; + + scroll_struct fitness[] = { + { localization("Idle Jogger", true), "WORLD_HUMAN_JOG_STANDING" }, + { localization("Golf", true), "WORLD_HUMAN_GOLF_PLAYER" }, + { localization("Muscle Flex", true), "WORLD_HUMAN_MUSCLE_FLEX" }, + { localization("Free Weights", true), "WORLD_HUMAN_MUSCLE_FREE_WEIGHTS" }, + { localization("Tennis", true), "WORLD_HUMAN_TENNIS_PLAYER" }, + { localization("Bench Press", true), "PROP_HUMAN_SEAT_MUSCLE_BENCH_PRESS" } + }; + + scroll_struct industrial[] = { + { localization("Parking Attendant", true), "WORLD_HUMAN_CAR_PARK_ATTENDANT" }, + { localization("Drill", true), "WORLD_HUMAN_CONST_DRILL" }, + { localization("Leaf Blower", true), "WORLD_HUMAN_GARDENER_LEAF_BLOWER" }, + { localization("Hammering", true), "WORLD_HUMAN_HAMMERING" }, + { localization("Janitor", true), "WORLD_HUMAN_JANITOR" }, + { localization("Maid", true), "WORLD_HUMAN_MAID_CLEAN" }, + { localization("Welding", true), "WORLD_HUMAN_WELDING" } + }; +} + +void scenario_menu::load() { + set_name("Scenarios"); + set_parent(); + + add_option(button_option("Stop Scenario") + .add_translate().add_hotkey() + .add_click([] { native::clear_ped_tasks_immediately(menu::player::get_local_player().m_ped); })); + + add_option(scroll_option(SCROLLSELECT, "Ambient") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_ambient, 0, NUMOF(ambient), ambient) + .add_click([] { native::task_start_scenario_in_place(menu::player::get_local_player().m_ped, ambient[m_vars.m_ambient].m_result, 0, true); })); + + add_option(scroll_option(SCROLLSELECT, "Activities") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_activities, 0, NUMOF(activities), activities) + .add_click([] { native::task_start_scenario_in_place(menu::player::get_local_player().m_ped, activities[m_vars.m_activities].m_result, 0, true); })); + + add_option(scroll_option(SCROLLSELECT, "Animals") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_animals, 0, NUMOF(animals), animals) + .add_click([] { native::task_start_scenario_in_place(menu::player::get_local_player().m_ped, animals[m_vars.m_animals].m_result, 0, true); })); + + add_option(scroll_option(SCROLLSELECT, "Fitness") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_fitness, 0, NUMOF(fitness), fitness) + .add_click([] { native::task_start_scenario_in_place(menu::player::get_local_player().m_ped, fitness[m_vars.m_fitness].m_result, 0, true); })); + + add_option(scroll_option(SCROLLSELECT, "Industrial") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_industrial, 0, NUMOF(industrial), industrial) + .add_click([] { native::task_start_scenario_in_place(menu::player::get_local_player().m_ped, industrial[m_vars.m_industrial].m_result, 0, true); })); +} + +void scenario_menu::update() {} + +void scenario_menu::update_once() {} + +void scenario_menu::feature_update() {} + +scenario_menu* g_instance; +scenario_menu* scenario_menu::get() { + if (g_instance == nullptr) { + g_instance = new scenario_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/player/animation/scenario.h b/GTAV/src/menu/base/submenus/main/player/animation/scenario.h new file mode 100644 index 0000000..db52c97 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/animation/scenario.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class scenario_menu : public menu::submenu::submenu { +public: + static scenario_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + scenario_menu() + : menu::submenu::submenu() {} +}; + +namespace player::scenario::vars { + struct variables { + int m_ambient; + int m_activities; + int m_animals; + int m_fitness; + int m_industrial; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/appearance.cpp b/GTAV/src/menu/base/submenus/main/player/appearance.cpp new file mode 100644 index 0000000..2d8a1c7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/appearance.cpp @@ -0,0 +1,39 @@ +#include "appearance.h" +#include "menu/base/submenu_handler.h" +#include "../player.h" +#include "model.h" +#include "wardrobe.h" +#include "menu/base/util/panels.h" + +void appearance_menu::load() { + set_name("Appearance"); + set_parent(); + + add_option(submenu_option("Model") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Wardrobe") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { wardrobe_menu::get()->set_parent(); })); +} + +void appearance_menu::update() {} + +void appearance_menu::update_once() { + menu::panels::toggle_panel_render("PANEL_OUTFIT", false); +} + +void appearance_menu::feature_update() {} + +appearance_menu* g_instance; +appearance_menu* appearance_menu::get() { + if (g_instance == nullptr) { + g_instance = new appearance_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/player/appearance.h b/GTAV/src/menu/base/submenus/main/player/appearance.h new file mode 100644 index 0000000..12dd0ac --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/appearance.h @@ -0,0 +1,15 @@ +#pragma once +#include "menu/base/submenu.h" + +class appearance_menu : public menu::submenu::submenu { +public: + static appearance_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + appearance_menu() + : menu::submenu::submenu() {} +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/model.cpp b/GTAV/src/menu/base/submenus/main/player/model.cpp new file mode 100644 index 0000000..3cd7e58 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/model.cpp @@ -0,0 +1,132 @@ +#include "model.h" +#include "menu/base/submenu_handler.h" +#include "appearance.h" +#include "global/lists.h" +#include "menu/base/util/control.h" +#include "util/fiber.h" + +using namespace player::model::vars; + +namespace player::model::vars { + variables m_vars; + + void change_model(uint32_t hash) { + if (native::is_model_in_cdimage(hash)) { + if (native::is_model_valid(hash)) { + menu::control::request_model(hash, [](uint32_t ModelHash) { + native::set_player_model(menu::player::get_local_player().m_id, ModelHash); + m_vars.m_last_model = ModelHash; + + util::fiber::sleep(2000); + global::vars::g_reload_weapons = true; + }); + } + } + } +} + +void model_menu::load() { + set_name("Model"); + set_parent(); + + add_option(button_option("Refresh Model") + .add_translate() + .add_click([] { + native::reset_ped_visible_damage(menu::player::get_local_player().m_ped); + native::clear_ped_blood_damage(menu::player::get_local_player().m_ped); + native::clear_ped_decorations(menu::player::get_local_player().m_ped); + })); + + add_option(button_option("Refresh Model Cache") + .add_translate() + .add_click([] { + m_vars.m_last_model = 0; + }) + .add_tooltip("Refresh the cache that re-applies your model when you die")); + + add_option(button_option("Input Custom Model") + .add_translate() + .add_keyboard("Input the model! (Hint: name, hash or numeric)", 30, [](button_option*, const char* name) { + if (name) { + if (name[0] == '0' && (name[1] == 'x' || name[1] == 'X')) { + // hash + change_model((uint32_t)_strtoui64(name, 0, 0)); + } else { + std::string str(name); + if (std::find_if(str.begin(), str.end(), [](unsigned char c) { return !std::isdigit(c); }) == str.end()) { + // numeric + change_model((uint32_t)atoi(name)); + } else { + // name + change_model(native::get_hash_key(name)); + } + } + } + })); + + add_option(scroll_option(SCROLLSELECT, "Popular") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_popular, 0, NUMOF(global::lists::g_ped_model_popular), global::lists::g_ped_model_popular).loop() + .add_click([] { change_model(global::lists::g_ped_model_popular[m_vars.m_popular].m_result); })); + + add_option(scroll_option(SCROLLSELECT, "Story") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_story, 0, NUMOF(global::lists::g_ped_model_story), global::lists::g_ped_model_story).loop() + .add_click([] { change_model(global::lists::g_ped_model_story[m_vars.m_story].m_result); })); + + add_option(scroll_option(SCROLLSELECT, "Animals") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_animals, 0, NUMOF(global::lists::g_ped_model_animal), global::lists::g_ped_model_animal).loop() + .add_click([] { change_model(global::lists::g_ped_model_animal[m_vars.m_animals].m_result); })); + + add_option(scroll_option(SCROLLSELECT, "Emergency") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_emergency, 0, NUMOF(global::lists::g_ped_model_emergency), global::lists::g_ped_model_emergency).loop() + .add_click([] { change_model(global::lists::g_ped_model_emergency[m_vars.m_emergency].m_result); })); + + add_option(scroll_option(SCROLLSELECT, "Role") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_role, 0, NUMOF(global::lists::g_ped_model_role), global::lists::g_ped_model_role).loop() + .add_click([] { change_model(global::lists::g_ped_model_role[m_vars.m_role].m_result); })); + + add_option(scroll_option(SCROLLSELECT, "Ambient") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_ambient, 0, NUMOF(global::lists::g_ped_model_ambient), global::lists::g_ped_model_ambient).loop() + .add_click([] { change_model(global::lists::g_ped_model_ambient[m_vars.m_ambient].m_result); })); + + add_option(scroll_option(SCROLLSELECT, "Misc") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_misc, 0, NUMOF(global::lists::g_ped_model_misc), global::lists::g_ped_model_misc).loop() + .add_click([] { change_model(global::lists::g_ped_model_misc[m_vars.m_misc].m_result); })); +} + +void model_menu::update() {} + +void model_menu::update_once() {} + +void model_menu::feature_update() { + if (!menu::player::get_local_player().m_alive) { + if (m_vars.m_last_model) { + m_vars.m_reapply = true; + } + } else { + if (m_vars.m_reapply) { + m_vars.m_reapply = false; + + if (m_vars.m_last_model) { + change_model(m_vars.m_last_model); + } + } + } +} + +model_menu* g_instance; +model_menu* model_menu::get() { + if (g_instance == nullptr) { + g_instance = new model_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/player/model.h b/GTAV/src/menu/base/submenus/main/player/model.h new file mode 100644 index 0000000..cea0575 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/model.h @@ -0,0 +1,31 @@ +#pragma once +#include "menu/base/submenu.h" + +class model_menu : public menu::submenu::submenu { +public: + static model_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + model_menu() + : menu::submenu::submenu() {} +}; + +namespace player::model::vars { + struct variables { + uint32_t m_last_model; + bool m_reapply; + int m_popular; + int m_story; + int m_animals; + int m_emergency; + int m_role; + int m_ambient; + int m_misc; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/movement.cpp b/GTAV/src/menu/base/submenus/main/player/movement.cpp new file mode 100644 index 0000000..e596af7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/movement.cpp @@ -0,0 +1,184 @@ +#include "movement.h" +#include "menu/base/submenu_handler.h" +#include "../player.h" +#include "menu/base/util/input.h" +#include "menu/base/submenu_handler.h" +#include "menu/base/util/notify.h" +#include "menu/base/util/control.h" + +using namespace player::movement::vars; + +namespace player::movement::vars { + variables m_vars; + + float get_analog_range(int stick) { + return (((float)native::get_control_value(0, stick)) - 127) / 127; + } + + void no_clip() { + if (menu::input::is_just_pressed(true, VK_F8)) { + m_vars.m_no_clip_bind ^= true; + if (!m_vars.m_no_clip_bind) { + native::set_entity_collision(menu::player::get_local_player().m_entity, true, true); + native::freeze_entity_position(menu::player::get_local_player().m_entity, false); + native::enable_all_control_actions(0); + } + } + + if (m_vars.m_no_clip && m_vars.m_no_clip_bind) { + math::vector3 pos; + pos.x = get_analog_range(ControlFrontendAxisX) * m_vars.m_no_clip_speed; + pos.y = get_analog_range(ControlFrontendAxisY) * m_vars.m_no_clip_speed * -1.f; + + math::vector3 apos = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_entity, pos.x, pos.y, pos.z); + float input = native::get_control_normal(0, ControlAttack) - native::get_control_normal(0, ControlAim); + + if (menu::input::is_pressed(false, ControlFrontendRt) || input > 0.f) { + apos.z += m_vars.m_no_clip_speed; + } + + if (menu::input::is_pressed(false, ControlFrontendLt) || input < 0.f) { + apos.z -= m_vars.m_no_clip_speed; + } + + native::set_entity_coords_no_offset(menu::player::get_local_player().m_entity, apos.x, apos.y, apos.z, false, false, false); + + math::vector3 rot = native::get_gameplay_cam_rot(2); + native::set_entity_rotation(menu::player::get_local_player().m_entity, 0.f, rot.y, rot.z, 2, true); + + native::freeze_entity_position(menu::player::get_local_player().m_entity, true); + native::set_entity_collision(menu::player::get_local_player().m_entity, false, false); + + native::disable_control_action(0, ControlFrontendLt, true); + native::disable_control_action(0, ControlFrontendRt, true); + native::disable_control_action(0, ControlFrontendCancel, true); + } + } +} + +void movement_menu::load() { + set_name("Movement"); + set_parent(); + + add_string("No Clip"); + add_string("Press F8 to enable/disable"); + + add_option(number_option(TOGGLE, "No Clip") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_no_clip) + .add_number(m_vars.m_no_clip_speed, "%.1f", 0.1f).add_min(0.0f).add_max(10.f).show_max().add_savable(get_submenu_name_stack()) + .add_click([this] { + if (m_vars.m_no_clip) { + if (m_vars.m_no_clip_notify) { + m_vars.m_no_clip_notify = false; + + if (menu::submenu::handler::get_current() == this) { + menu::notify::stacked(get_string("No Clip"), get_string("Press F8 to enable/disable")); + } + } + } else { + m_vars.m_no_clip_notify = true; + native::set_entity_collision(menu::player::get_local_player().m_entity, true, true); + native::freeze_entity_position(menu::player::get_local_player().m_entity, false); + native::enable_all_control_actions(0); + } + }).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Run Multiplier") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_super_run) + .add_number(m_vars.m_super_run_speed, "%.2f", 0.01f).add_min(0.0f).add_max(100.f).show_max().can_loop().set_scroll_speed(20) + .add_click([] { + if (global::vars::g_ped_factory && global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_player_info) { + global::vars::g_ped_factory->m_local_ped->m_player_info->set_run_speed(m_vars.m_super_run ? m_vars.m_super_run_speed : 1.0f); + } + } + }).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Swim Multiplier") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_super_swim) + .add_number(m_vars.m_super_swim_speed, "%.2f", 0.01f).add_min(0.0f).add_max(100.f).show_max().can_loop().set_scroll_speed(20) + .add_click([] { + if (global::vars::g_ped_factory && global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_player_info) { + global::vars::g_ped_factory->m_local_ped->m_player_info->m_swim_speed = 1.f; + } + } + }).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Super Run") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_super_run_alternative) + .add_number(m_vars.m_super_run_alternative_speed, "%.1f", 0.1f).add_min(0.0f).add_max(100.f).show_max().can_loop().set_scroll_speed(20).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Super Jump") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_super_jump).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Walk on Air") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_walk_on_air) + .add_click([] { + if (!m_vars.m_walk_on_air) { + if (m_vars.m_walk_on_air_entity) { + menu::control::request_control(m_vars.m_walk_on_air_entity, [](Entity ent) { + native::set_entity_as_mission_entity(ent, true, true); + native::delete_entity(&ent); + }); + } + } + }) + .add_tooltip("Disable mid air and re-enable when at desired altitude to go down")); +} + +void movement_menu::update() {} + +void movement_menu::update_once() {} + +void movement_menu::feature_update() { + no_clip(); + + if (m_vars.m_super_jump) { + native::set_super_jump_this_frame(menu::player::get_local_player().m_id); + } + + if (m_vars.m_super_run_alternative) { + if (native::is_disabled_control_pressed(0, ControlSprint)) { + native::apply_force_to_entity(menu::player::get_local_player().m_ped, 1, 0.f, m_vars.m_super_run_alternative_speed, 0.f, 0.f, 0.f, 0.f, 0, 1, 1, 1, 0, 1); + } + } + + if (m_vars.m_walk_on_air) { + if (!native::does_entity_exist(m_vars.m_walk_on_air_entity)) { + math::vector3 spawn_coords = menu::player::get_local_player().m_coords; + spawn_coords.z -= 1.7f; + m_vars.m_walk_on_air_entity = native::create_object(joaat("prop_pooltable_02"), spawn_coords.x, spawn_coords.y, spawn_coords.z, true, true, false); + } else { + native::set_entity_visible(m_vars.m_walk_on_air_entity, FALSE, FALSE); + if (!menu::player::get_local_player().m_in_vehicle) { + math::vector3 obj_pos = native::get_entity_coords(m_vars.m_walk_on_air_entity, FALSE); + if (sqrtf(powf(menu::player::get_local_player().m_coords.x - obj_pos.x, 2.0f) + powf(menu::player::get_local_player().m_coords.y - obj_pos.y, 2.0f) + powf(menu::player::get_local_player().m_coords.z - obj_pos.z, 2.0f)) > 1.7f) { + native::set_entity_heading(m_vars.m_walk_on_air_entity, menu::player::get_local_player().m_heading); + if (native::is_ped_jumping(menu::player::get_local_player().m_ped)) { + native::set_entity_coords_no_offset(m_vars.m_walk_on_air_entity, menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z - 1.7f, FALSE, FALSE, FALSE); + } else { + native::set_entity_coords_no_offset(m_vars.m_walk_on_air_entity, menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, obj_pos.z, FALSE, FALSE, FALSE); + } + } + } + } + } +} + +movement_menu* g_instance; +movement_menu* movement_menu::get() { + if (g_instance == nullptr) { + g_instance = new movement_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/player/movement.h b/GTAV/src/menu/base/submenus/main/player/movement.h new file mode 100644 index 0000000..6fd6dd8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/movement.h @@ -0,0 +1,38 @@ +#pragma once +#include "menu/base/submenu.h" + +class movement_menu : public menu::submenu::submenu { +public: + static movement_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + movement_menu() + : menu::submenu::submenu() {} +}; + +namespace player::movement::vars { + struct variables { + bool m_no_clip; + bool m_no_clip_notify = true; + bool m_no_clip_bind; + + bool m_super_jump; + bool m_super_run; + bool m_super_run_alternative; + bool m_super_swim; + + float m_super_run_speed = 1.49f; + float m_super_run_alternative_speed = 5.f; + float m_super_swim_speed = 1.49f; + float m_no_clip_speed = 1.f; + + Entity m_walk_on_air_entity; + bool m_walk_on_air; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/particles.cpp b/GTAV/src/menu/base/submenus/main/player/particles.cpp new file mode 100644 index 0000000..36210bb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/particles.cpp @@ -0,0 +1,35 @@ +#include "particles.h" +#include "menu/base/submenu_handler.h" +#include "../player.h" +#include "ptfx/particle_manager.h" +#include "ptfx/hand_trails.h" + +void particle_menu::load() { + set_name("Particle FX"); + set_parent(); + + add_option(submenu_option("Particle Manager") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Hand Trails") + .add_translate().add_hotkey() + .add_submenu()); +} + +void particle_menu::update() {} + +void particle_menu::update_once() {} + +void particle_menu::feature_update() {} + +particle_menu* g_instance; +particle_menu* particle_menu::get() { + if (g_instance == nullptr) { + g_instance = new particle_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/particles.h b/GTAV/src/menu/base/submenus/main/player/particles.h new file mode 100644 index 0000000..3deb9c4 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/particles.h @@ -0,0 +1,15 @@ +#pragma once +#include "menu/base/submenu.h" + +class particle_menu : public menu::submenu::submenu { +public: + static particle_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + particle_menu() + : menu::submenu::submenu() {} +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/ptfx/hand_trails.cpp b/GTAV/src/menu/base/submenus/main/player/ptfx/hand_trails.cpp new file mode 100644 index 0000000..388677c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/ptfx/hand_trails.cpp @@ -0,0 +1,75 @@ +#include "hand_trails.h" +#include "menu/base/submenu_handler.h" +#include "../particles.h" +#include "menu/base/util/control.h" +#include "../../helper/helper_color.h" + +using namespace player::trails::vars; + +namespace player::trails::vars { + variables m_vars; + + void update_color() { + if (m_vars.m_trail_bone_left && m_vars.m_trail_bone_right) { + native::set_particle_fx_looped_colour(m_vars.m_trail_bone_left, (float)m_vars.m_trail_color.r, (float)m_vars.m_trail_color.g, (float)m_vars.m_trail_color.b, true); + native::set_particle_fx_looped_colour(m_vars.m_trail_bone_right, (float)m_vars.m_trail_color.r, (float)m_vars.m_trail_color.g, (float)m_vars.m_trail_color.b, true); + } + } + + void start_trails() { + menu::control::request_particle({ "scr_minigametennis", "scr_tennis_ball_trail" }, [](std::pair anim) { + native::use_particle_fx_asset_next_call(anim.first); + m_vars.m_trail_bone_left = native::start_particle_fx_looped_on_entity_bone2(anim.second, menu::player::get_local_player().m_ped, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, native::get_ped_bone_index(menu::player::get_local_player().m_ped, 0x8cbd), 1.f, true, true, true, 0, 0, 0); + + native::use_particle_fx_asset_next_call(anim.first); + m_vars.m_trail_bone_right = native::start_particle_fx_looped_on_entity_bone2(anim.second, menu::player::get_local_player().m_ped, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, native::get_ped_bone_index(menu::player::get_local_player().m_ped, 0x188e), 1.f, true, true, true, 0, 0, 0); + + update_color(); + }); + } +} + +void hand_trails_menu::load() { + set_name("Hand Trails"); + set_parent(); + + add_option(toggle_option("Toggle Hand Trails") + .add_translate() + .add_toggle(m_vars.m_trails) + .add_click([] { + if (!m_vars.m_trails) { + native::remove_particle_fx(m_vars.m_trail_bone_left, true); + native::remove_particle_fx(m_vars.m_trail_bone_right, true); + } else { + start_trails(); + } + })); + + add_option(submenu_option("Edit Color") + .add_translate() + .add_submenu() + .add_click([this] { + helper_color_menu::get()->set_name(get_name().get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = &m_vars.m_trail_color; + helper::color::vars::m_vars.m_callback = update_color; + }) + .add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, &m_vars.m_trail_color)); +} + +void hand_trails_menu::update() {} + +void hand_trails_menu::update_once() {} + +void hand_trails_menu::feature_update() {} + +hand_trails_menu* g_instance; +hand_trails_menu* hand_trails_menu::get() { + if (g_instance == nullptr) { + g_instance = new hand_trails_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/player/ptfx/hand_trails.h b/GTAV/src/menu/base/submenus/main/player/ptfx/hand_trails.h new file mode 100644 index 0000000..5bc8e75 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/ptfx/hand_trails.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class hand_trails_menu : public menu::submenu::submenu { +public: + static hand_trails_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + hand_trails_menu() + : menu::submenu::submenu() {} +}; + +namespace player::trails::vars { + struct variables { + bool m_trails; + int m_trail_bone_left; + int m_trail_bone_right; + + color_rgba m_trail_color = { 255, 0, 0, 255 }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/ptfx/particle_manager.cpp b/GTAV/src/menu/base/submenus/main/player/ptfx/particle_manager.cpp new file mode 100644 index 0000000..ede9608 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/ptfx/particle_manager.cpp @@ -0,0 +1,140 @@ +#include "particle_manager.h" +#include "menu/base/submenu_handler.h" +#include "../particles.h" +#include "global/lists.h" +#include "menu/base/util/control.h" +#include "menu/base/util/timers.h" + +using namespace player::ptfx::vars; + +namespace player::ptfx::vars { + variables m_vars; + + scroll_struct type[] = { + { localization("Attach to Socket", true), 0 }, + { localization("Current Position", true), 1 } + }; + + void start_particle(const char* dict, const char* texture, bool looped = false) { + menu::control::request_particle({ dict, texture }, [=](std::pair anim) { + native::use_particle_fx_asset_next_call(anim.first); + + int handle = 0; + if (m_vars.m_type == 0) { + // stop current if exists + auto vit = std::find_if(m_vars.m_looped_particles.begin(), m_vars.m_looped_particles.end(), [](looped_particle& element) { + return element.m_bone == global::lists::g_ped_bones[m_vars.m_socket].m_result && element.m_loop_required; + }); + + if (vit != m_vars.m_looped_particles.end()) { + native::remove_particle_fx(vit->m_handle, true); + } + + handle = looped ? native::start_particle_fx_looped_on_entity_bone2(anim.second, menu::player::get_local_player().m_ped, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, native::get_ped_bone_index(menu::player::get_local_player().m_ped, global::lists::g_ped_bones[m_vars.m_socket].m_result), m_vars.m_scale, false, false, false, 0, 0, 0) + : native::start_particle_fx_non_looped_on_ped_bone2(anim.second, menu::player::get_local_player().m_ped, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, global::lists::g_ped_bones[m_vars.m_socket].m_result, m_vars.m_scale, false, false, false); + } else { + // current position + math::vector3 position = menu::player::get_local_player().m_coords; + native::start_particle_fx_non_looped_at_coord2(anim.second, position.x, position.y, position.z, 0.f, 0.f, 0.f, m_vars.m_scale, false, false, false); + } + + if ((m_vars.m_looped && m_vars.m_type == 0) || looped) { + m_vars.m_looped_particles.push_back({ {anim.first, anim.second}, global::lists::g_ped_bones[m_vars.m_socket].m_result, m_vars.m_scale, global::lists::g_timers[m_vars.m_wait].m_result, handle, looped, 0 }); + } + }); + } + + void update_particle_list(particle_manager_menu* this_) { + this_->clear_options(7); + + if (m_vars.m_type == 0) { + int max = m_vars.m_looped ? NUMOF(global::lists::g_particles) : 20; + m_vars.m_radio.reset(); + m_vars.m_radio.m_selected = 0; + + for (int i = 0; i < max; i++) { + scroll_struct particle = global::lists::g_particles[i]; + this_->add_option(radio_option(particle.m_name.get()) + .add_radio(m_vars.m_radio) + .add_click([=] { start_particle(particle.m_result.m_dict, particle.m_result.m_texture, particle.m_result.m_looped); })); + } + } else { + for (scroll_struct particle : global::lists::g_particles) { + this_->add_option(button_option(particle.m_name.get()) + .add_click([=] { start_particle(particle.m_result.m_dict, particle.m_result.m_texture, particle.m_result.m_looped); })); + } + } + } +} + +void particle_manager_menu::load() { + set_name("Particle Manager"); + set_parent(); + + add_option(button_option("Stop Particles") + .add_translate().add_hotkey() + .add_click([] { + for (looped_particle& particle : m_vars.m_looped_particles) { + native::remove_particle_fx(particle.m_handle, true); + } + + m_vars.m_looped_particles.clear(); + }) + .add_tooltip("Stops running looped particles")); + + add_option(scroll_option(SCROLL, "Type") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(type), type) + .add_click([this] { update_particle_list(this); })); + + add_option(scroll_option(SCROLL, "Selected Socket") + .add_translate() + .add_scroll(m_vars.m_socket, 0, NUMOF(global::lists::g_ped_bones), global::lists::g_ped_bones) + .add_requirement([] { return m_vars.m_type == 0; })); + + add_option(scroll_option(SCROLL, "Wait") + .add_translate() + .add_scroll(m_vars.m_wait, 0, NUMOF(global::lists::g_timers), global::lists::g_timers) + .add_requirement([] { return m_vars.m_type == 0 && m_vars.m_looped; })); + + add_option(toggle_option("Looped") + .add_translate() + .add_toggle(m_vars.m_looped) + .add_click([this] { update_particle_list(this); }) + .add_requirement([] { return m_vars.m_type == 0; })); + + add_option(number_option(SCROLL, "Scale") + .add_translate() + .add_number(m_vars.m_scale, "%.2f", 0.01f).add_min(0.f).set_scroll_speed(10)); + + add_option(break_option("Particles") + .add_translate()); +} + +void particle_manager_menu::update() {} + +void particle_manager_menu::update_once() { + update_particle_list(this); +} + +void particle_manager_menu::feature_update() { + for (looped_particle& particle : m_vars.m_looped_particles) { + if (!particle.m_loop_required) { + menu::timers::run_timed(&particle.m_timer, particle.m_wait, [=] { + native::use_particle_fx_asset_next_call(particle.m_asset.first); + native::start_particle_fx_non_looped_on_ped_bone2(particle.m_asset.second, menu::player::get_local_player().m_ped, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, particle.m_bone, particle.m_scale, false, false, false); + }); + } + } +} + +particle_manager_menu* g_instance; +particle_manager_menu* particle_manager_menu::get() { + if (g_instance == nullptr) { + g_instance = new particle_manager_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/player/ptfx/particle_manager.h b/GTAV/src/menu/base/submenus/main/player/ptfx/particle_manager.h new file mode 100644 index 0000000..8f2bc56 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/ptfx/particle_manager.h @@ -0,0 +1,41 @@ +#pragma once +#include "menu/base/submenu.h" + +class particle_manager_menu : public menu::submenu::submenu { +public: + static particle_manager_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + particle_manager_menu() + : menu::submenu::submenu() {} +}; + +namespace player::ptfx::vars { + struct looped_particle { + std::pair m_asset = { "", "" }; + int m_bone = 0; + float m_scale = 1.f; + uint32_t m_wait = 0; + int m_handle = 0; + bool m_loop_required = false; + int m_timer = 0; + }; + + struct variables { + int m_type; + int m_wait; + int m_socket; + bool m_looped; + float m_scale = 1.f; + + std::vector m_looped_particles; + + radio_context m_radio = { "commonmenu", "shop_makeup_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/wardrobe.cpp b/GTAV/src/menu/base/submenus/main/player/wardrobe.cpp new file mode 100644 index 0000000..643b4ad --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/wardrobe.cpp @@ -0,0 +1,213 @@ +#include "wardrobe.h" +#include "menu/base/submenu_handler.h" +#include "appearance.h" +#include "wardrobe_save_load.h" +#include "menu/base/util/panels.h" + +using namespace player::wardrobe::vars; + +namespace player::wardrobe::vars { + variables m_vars; + + scroll_struct>> components[] = { + { localization("Face", true), { 0, { 0.000f, 0.300f, -0.300f } } }, + { localization("Mask", true), { 1, { 0.000f, 0.300f, -0.300f } } }, + { localization("Hair", true), { 2, { 0.000f, 0.300f, -0.300f } } }, + { localization("Torso", true), { 3, { 0.000f, -0.400f, 0.100f } } }, + { localization("Leg", true), { 4, { 0.000f, -0.400f, 0.800f } } }, + { localization("Misc", true), { 5, { 0.00f, -2.00f, 0.40f } } }, + { localization("Shoes", true), { 6, { 0.000f, 0.000f, 1.200f } } }, + { localization("Accessories", true), { 7, { 0.00f, -2.00f, 0.40f } } }, + { localization("Undershirt", true), { 8, { 0.000f, -0.400f, 0.100f } } }, + { localization("Kevlar", true), { 9, { 0.000f, -0.400f, 0.100f } } }, + { localization("Badge", true), { 10, { 0.000f, -0.400f, 0.100f } } }, + { localization("Torso 2", true), { 11, { 0.000f, -0.400f, 0.100f } } } + }; + + scroll_struct>> accessories[] = { + { localization("Hats", true), { 0, { 0.000f, 0.300f, -0.300f } } }, + { localization("Glasses", true), { 1, { 0.000f, 0.300f, -0.300f } } }, + { localization("Ears", true), { 2, { 0.000f, 0.300f, -0.300f } } }, + { localization("Watches", true), { 6, { 0.300f, 0.750f, 0.400f /*RIGHT*/ } } }, + { localization("Bracelets", true), { 7, { 0.300f, 0.750f, 0.400f /*RIGHT*/ } } }, + }; + + void remove_camera() { + if (native::does_cam_exist(m_vars.m_preview_cam)) { + native::set_cam_active(m_vars.m_preview_cam, false); + native::render_script_cams(false, true, 1000, true, false, 0); + native::destroy_cam(m_vars.m_preview_cam, false); + } + } + + void change_zoom(int type) { + if (!m_vars.m_zoom_to_body_part || menu::player::get_local_player().m_in_vehicle) { + menu::panels::panel_custom_screen_ped_preview preview; + preview.m_is_player = false; + preview.m_ped = global::vars::g_ped_factory->m_local_ped; + preview.m_screen_offset = { 0.00f, -2.00f, 0.40f }; + menu::panels::set_structure(menu::panels::get_child(menu::panels::get_parent("PANEL_OUTFIT"), "PANEL_OUTFIT_INFO"), (void*)&preview, sizeof(preview)); + return; + } + + math::vector3_ to_lerp; + if (type == 1) to_lerp = components[m_vars.m_clothing].m_result.second; + else if(type == 2) to_lerp = accessories[m_vars.m_accessory].m_result.second; + else to_lerp = accessories[m_vars.m_accessory_clear].m_result.second; + + if (type == 1337) { + to_lerp = { 0.00f, -2.00f, 0.40f }; + } + + m_vars.m_current_offset.x = math::lerp(m_vars.m_current_offset.x, to_lerp.x, 5.f * global::ui::g_delta); + m_vars.m_current_offset.y = math::lerp(m_vars.m_current_offset.y, to_lerp.y, 5.f * global::ui::g_delta); + m_vars.m_current_offset.z = math::lerp(m_vars.m_current_offset.z, to_lerp.z, 5.f * global::ui::g_delta); + + menu::panels::panel_custom_screen_ped_preview preview; + preview.m_is_player = false; + preview.m_ped = global::vars::g_ped_factory->m_local_ped; + preview.m_screen_offset.x = m_vars.m_current_offset.x; + preview.m_screen_offset.y = m_vars.m_current_offset.y; + preview.m_screen_offset.z = m_vars.m_current_offset.z; + + menu::panels::set_structure(menu::panels::get_child(menu::panels::get_parent("PANEL_OUTFIT"), "PANEL_OUTFIT_INFO"), (void*)&preview, sizeof(preview)); + } +} + +void wardrobe_menu::load() { + set_name("Wardrobe"); + set_parent(); + + add_option(submenu_option("Save and Load") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Zoom to Body Part") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_zoom_to_body_part).add_savable(get_submenu_name_stack()) + .add_tooltip("Zooms the player preview to the body part being edited")); + + add_option(break_option("Customization") + .add_translate()); + + add_option(scroll_option>>(SCROLL, "Clothing") + .add_translate() + .add_scroll(m_vars.m_clothing, 0, NUMOF(components), components) + .add_click([] { + m_vars.m_clothing_model = native::get_ped_drawable_variation(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first); + m_vars.m_clothing_variation = native::get_ped_texture_variation(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first); + }) + .add_hover([] { change_zoom(1); })); + + add_option(number_option(SCROLL, "Clothing Model") + .add_translate() + .add_number(m_vars.m_clothing_model, "%i", 1).add_min(-1).add_max(0).show_max() + .add_click([] { + native::set_ped_component_variation(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first, m_vars.m_clothing_model, native::get_ped_texture_variation(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first), 0); + m_vars.m_clothing_variation = native::get_ped_texture_variation(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first); + }) + .add_update([](number_option* option, int position) { + option->add_max(native::get_number_of_ped_drawable_variations(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first) - 1); + })); + + add_option(number_option(SCROLL, "Clothing Variation") + .add_translate() + .add_number(m_vars.m_clothing_variation, "%i", 1).add_min(-1).add_max(0).show_max() + .add_click([] { + native::set_ped_component_variation(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first, m_vars.m_clothing_model, m_vars.m_clothing_variation, 0); + }) + .add_update([](number_option* option, int position) { + option->add_max(native::get_number_of_ped_texture_variations(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first, m_vars.m_clothing_model)); + + if (m_vars.m_clothing_variation > native::get_number_of_ped_texture_variations(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first, m_vars.m_clothing_model)) { + m_vars.m_clothing_variation = 0; + } + }) + .add_requirement([] { return native::get_number_of_ped_drawable_variations(menu::player::get_local_player().m_ped, components[m_vars.m_clothing].m_result.first) > 0; })); + + add_option(scroll_option>>(SCROLL, "Accessory") + .add_translate() + .add_scroll(m_vars.m_accessory, 0, NUMOF(accessories), accessories) + .add_click([] { + m_vars.m_accessory_model = native::get_ped_prop_index(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first); + m_vars.m_accessory_variation = native::get_ped_prop_texture_index(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first); + }) + .add_hover([] { change_zoom(2); })); + + add_option(number_option(SCROLL, "Accessory Model") + .add_translate() + .add_number(m_vars.m_accessory_model, "%i", 1).add_min(-1).add_max(0).show_max() + .add_click([] { + native::set_ped_prop_index(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first, m_vars.m_accessory_model, 0, true); + m_vars.m_accessory_variation = native::get_ped_prop_texture_index(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first); + }) + .add_update([](number_option* option, int position) { + option->add_max(native::get_number_of_ped_prop_drawable_variations(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first)); + })); + + add_option(number_option(SCROLL, "Accessory Variation") + .add_translate() + .add_number(m_vars.m_accessory_variation, "%i", 1).add_min(-1).add_max(0).show_max() + .add_click([] { + native::set_ped_prop_index(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first, m_vars.m_accessory_model, m_vars.m_accessory_variation, true); + }) + .add_update([](number_option* option, int position) { + option->add_max(native::get_number_of_ped_prop_texture_variations(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first, m_vars.m_accessory_variation)); + + if (m_vars.m_accessory_variation > native::get_number_of_ped_prop_texture_variations(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first, m_vars.m_accessory_variation)) { + m_vars.m_clothing_variation = 0; + } + }) + .add_requirement([] { return native::get_number_of_ped_prop_texture_variations(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first, m_vars.m_accessory) > 0; })); + + add_option(scroll_option>>(SCROLLSELECT, "Clear Accessory") + .add_translate() + .add_scroll(m_vars.m_accessory_clear, 0, NUMOF(accessories), accessories) + .add_click([] { + native::clear_ped_prop(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first); + m_vars.m_accessory_model = native::get_ped_prop_index(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first); + m_vars.m_accessory_variation = native::get_ped_prop_texture_index(menu::player::get_local_player().m_ped, accessories[m_vars.m_accessory].m_result.first); + }) + .add_hover([] { change_zoom(3); })); +} + +void wardrobe_menu::update() { + if (menu::base::get_current_option() <= 1) { + change_zoom(1337); + } +} + +void wardrobe_menu::update_once() { + menu::panels::panel_custom_screen_ped_preview preview; + preview.m_is_player = false; + preview.m_ped = global::vars::g_ped_factory->m_local_ped; + preview.m_screen_offset = { 0.00f, -2.00f, 0.40f }; + menu::panels::set_structure(menu::panels::get_child(menu::panels::get_parent("PANEL_OUTFIT"), "PANEL_OUTFIT_INFO"), (void*)&preview, sizeof(preview)); + menu::panels::toggle_panel_render("PANEL_OUTFIT", true); +} + +void wardrobe_menu::feature_update() { + if (m_vars.m_preview_camera && (menu::submenu::handler::get_current() == this + || menu::submenu::handler::get_current() == wardrobe_save_load_menu::get())) { + if (!native::does_cam_exist(m_vars.m_preview_cam)) { + m_vars.m_preview_cam = native::create_cam("DEFAULT_SCRIPTED_CAMERA", false); + } + + native::set_cam_active(m_vars.m_preview_cam, true); + native::render_script_cams(true, true, 1000, true, 0, 0); + native::attach_cam_to_ped_bone(m_vars.m_preview_cam, menu::player::get_local_player().m_ped, 0, 0.f, 1.5f, 0.f, true); + native::point_cam_at_ped_bone(m_vars.m_preview_cam, menu::player::get_local_player().m_ped, 0, 0.f, 0.f, 0.3f, true); + native::task_stand_still(menu::player::get_local_player().m_ped, 1); + } +} + +wardrobe_menu* g_instance; +wardrobe_menu* wardrobe_menu::get() { + if (g_instance == nullptr) { + g_instance = new wardrobe_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/wardrobe.h b/GTAV/src/menu/base/submenus/main/player/wardrobe.h new file mode 100644 index 0000000..719731b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/wardrobe.h @@ -0,0 +1,39 @@ +#pragma once +#include "menu/base/submenu.h" + +class wardrobe_menu : public menu::submenu::submenu { +public: + static wardrobe_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + wardrobe_menu() + : menu::submenu::submenu() {} +}; + +namespace player::wardrobe::vars { + struct variables { + int m_clothing; + int m_clothing_model; + int m_clothing_variation; + int m_accessory; + int m_accessory_model; + int m_accessory_variation; + int m_accessory_clear; + + bool m_preview_camera; + Cam m_preview_cam; + + bool m_zoom_to_body_part; + math::vector3_ m_current_offset = { 0.00f, -2.00f, 0.40f }; + }; + + void remove_camera(); + + extern scroll_struct>> components[12]; + extern scroll_struct>> accessories[5]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/wardrobe_save_load.cpp b/GTAV/src/menu/base/submenus/main/player/wardrobe_save_load.cpp new file mode 100644 index 0000000..515f937 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/wardrobe_save_load.cpp @@ -0,0 +1,108 @@ +#include "wardrobe_save_load.h" +#include "menu/base/submenu_handler.h" +#include "wardrobe.h" +#include "util/va.h" +#include "util/dirs.h" +#include "util/log.h" +#include + +using namespace player::wardrobe::saveload::vars; + +namespace player::wardrobe::saveload::vars { + void save_outfit(const char* name, menu::player::player_context player) { + const char* location = util::va::va("%s%s.json", util::dirs::get_path(outfit), name); + + try { + std::ofstream output(location); + if (output.good()) { + nlohmann::json json; + + for (scroll_struct>> component : wardrobe::vars::components) { + json["Clothing"][component.m_name.get_original() + " Drawable"] = native::get_ped_drawable_variation(player.m_ped, component.m_result.first); + json["Clothing"][component.m_name.get_original() + " texture_context"] = native::get_ped_texture_variation(player.m_ped, component.m_result.first); + } + + for (scroll_struct>> prop : wardrobe::vars::accessories) { + json["Accessories"][prop.m_name.get_original() + " Drawable"] = native::get_ped_prop_index(player.m_ped, prop.m_result.first); + json["Accessories"][prop.m_name.get_original() + " texture_context"] = native::get_ped_prop_texture_index(player.m_ped, prop.m_result.first); + } + + output << json.dump(4); + output.close(); + + wardrobe_save_load_menu::get()->update_once(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + void load_outfit(const char* name) { + const char* location = util::va::va("%s%s.json", util::dirs::get_path(outfit), name); + + try { + std::ifstream input(location); + if (input.good()) { + nlohmann::json json; + input >> json; + + native::clear_all_ped_props(menu::player::get_local_player().m_ped); + + for (scroll_struct>> component : wardrobe::vars::components) { + native::set_ped_component_variation(menu::player::get_local_player().m_ped, component.m_result.first, json["Clothing"][component.m_name.get_original() + " Drawable"].get(), json["Clothing"][component.m_name.get_original() + " texture_context"].get(), 0); + } + + for (scroll_struct>> prop : wardrobe::vars::accessories) { + native::set_ped_prop_index(menu::player::get_local_player().m_ped, prop.m_result.first, json["Accessories"][prop.m_name.get_original() + " Drawable"].get(), json["Accessories"][prop.m_name.get_original() + " texture_context"].get(), true); + } + + input.close(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } +} + +void wardrobe_save_load_menu::load() { + set_name("Save and Load"); + set_parent(); + + add_option(button_option("Save Outfit") + .add_translate().add_hotkey() + .add_keyboard("Enter the outfit name!", 30, [=](button_option* _this, const char* name) { save_outfit(name, menu::player::get_local_player()); })); + + add_option(break_option("Outfits") + .add_translate()); + + add_string("~m~None"); +} + +void wardrobe_save_load_menu::update() {} + +void wardrobe_save_load_menu::update_once() { + clear_options(2); + + std::vector files = util::dirs::get_files_in_directory(util::dirs::get_path(outfit), ".json"); + if (files.size()) { + for (std::string file : files) { + add_option(button_option(file) + .add_click([=] { load_outfit(file.c_str()); })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void wardrobe_save_load_menu::feature_update() {} + +wardrobe_save_load_menu* g_instance; +wardrobe_save_load_menu* wardrobe_save_load_menu::get() { + if (g_instance == nullptr) { + g_instance = new wardrobe_save_load_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/player/wardrobe_save_load.h b/GTAV/src/menu/base/submenus/main/player/wardrobe_save_load.h new file mode 100644 index 0000000..55e1b39 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/player/wardrobe_save_load.h @@ -0,0 +1,20 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/player_manager.h" + +class wardrobe_save_load_menu : public menu::submenu::submenu { +public: + static wardrobe_save_load_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + wardrobe_save_load_menu() + : menu::submenu::submenu() {} +}; + +namespace player::wardrobe::saveload::vars { + void save_outfit(const char* name, menu::player::player_context player); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_blocking.cpp b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_blocking.cpp new file mode 100644 index 0000000..b53d5c7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_blocking.cpp @@ -0,0 +1,87 @@ +#include "protection_entity_blocking.h" +#include "menu/base/submenu_handler.h" +#include "../protection_entity_events.h" + +using namespace protection::entity::blocking::vars; + +namespace protection::entity::blocking::vars { + variables m_vars; +} + +void protection_entity_blocking_menu::load() { + set_name("Spawn Blocking"); + set_parent(); + + add_option(toggle_option("Automobile") + .add_translate() + .add_toggle(m_vars.m_toggled[0]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Bike") + .add_translate() + .add_toggle(m_vars.m_toggled[1]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Boat") + .add_translate() + .add_toggle(m_vars.m_toggled[2]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Door") + .add_translate() + .add_toggle(m_vars.m_toggled[3]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Helicopter") + .add_translate() + .add_toggle(m_vars.m_toggled[4]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Object") + .add_translate() + .add_toggle(m_vars.m_toggled[5]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Ped") + .add_translate() + .add_toggle(m_vars.m_toggled[6]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Pickup") + .add_translate() + .add_toggle(m_vars.m_toggled[7]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Pickup Placement") + .add_translate() + .add_toggle(m_vars.m_toggled[8]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Plane") + .add_translate() + .add_toggle(m_vars.m_toggled[9]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Submarine") + .add_translate() + .add_toggle(m_vars.m_toggled[10]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Player") + .add_translate() + .add_toggle(m_vars.m_toggled[11]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Trailer") + .add_translate() + .add_toggle(m_vars.m_toggled[12]).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Train") + .add_translate() + .add_toggle(m_vars.m_toggled[13]).add_savable(get_submenu_name_stack())); +} + +void protection_entity_blocking_menu::update() {} + +void protection_entity_blocking_menu::update_once() {} + +void protection_entity_blocking_menu::feature_update() {} + +protection_entity_blocking_menu* g_instance; +protection_entity_blocking_menu* protection_entity_blocking_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_entity_blocking_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_blocking.h b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_blocking.h new file mode 100644 index 0000000..8357400 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_blocking.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_entity_blocking_menu : public menu::submenu::submenu { +public: + static protection_entity_blocking_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_entity_blocking_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::entity::blocking::vars { + struct variables { + bool m_toggled[14]; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting.cpp b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting.cpp new file mode 100644 index 0000000..bced067 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting.cpp @@ -0,0 +1,116 @@ +#include "protection_entity_ghosting.h" +#include "menu/base/submenu_handler.h" +#include "../protection_entity_events.h" +#include "protection_entity_ghosting_edit.h" + +using namespace protection::entity::ghosting::vars; + +namespace protection::entity::ghosting::vars { + variables m_vars; + + std::pair types[] = { + { "Automobile", NetObjectAutomobile }, + { "Bike", NetObjectBike }, + { "Boat", NetObjectBoat }, + { "Helicopter", NetObjectHeli }, + { "Object", NetObjectObject }, + { "Ped", NetObjectPed }, + { "Pickup", NetObjectPickup }, + { "Plane", NetObjectPlane }, + { "Submarine", NetObjectSubmarine }, + { "Player", NetObjectPlayer }, + { "Trailer", NetObjectTrailer }, + { "Train", NetObjectTrain } + }; +} + +void protection_entity_ghosting_menu::load() { + set_name("Spawn Ghosting"); + set_parent(); + + for (auto& [name, type] : types) { + m_vars.m_ghosts[type].m_type = type; + m_vars.m_ghosts[type].m_name = name; + + m_vars.m_ghosts[type].m_enabled_for_session = util::config::read_bool(get_submenu_name_stack(), "Ghost for Session", false, { name }); + } + + add_option(submenu_option("Player") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectPlayer]; })); + + add_option(submenu_option("Automobile") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectAutomobile]; })); + + add_option(submenu_option("Bike") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectBike]; })); + + add_option(submenu_option("Boat") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectBoat]; })); + + add_option(submenu_option("Helicopter") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectHeli]; })); + + add_option(submenu_option("Object") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectObject]; })); + + add_option(submenu_option("Ped") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectPed]; })); + + add_option(submenu_option("Pickup") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectPickup]; })); + + add_option(submenu_option("Plane") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectPlane]; })); + + add_option(submenu_option("Submarine") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectSubmarine]; })); + + add_option(submenu_option("Trailer") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectTrailer]; })); + + add_option(submenu_option("Train") + .add_translate() + .add_submenu() + .add_click([] { protection::entity::ghosting::edit::vars::m_vars.m_selected = &m_vars.m_ghosts[NetObjectTrain]; })); +} + +void protection_entity_ghosting_menu::update() {} + +void protection_entity_ghosting_menu::update_once() { + protection::entity::ghosting::edit::vars::m_vars.m_ready = false; +} + +void protection_entity_ghosting_menu::feature_update() {} + +protection_entity_ghosting_menu* g_instance; +protection_entity_ghosting_menu* protection_entity_ghosting_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_entity_ghosting_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting.h b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting.h new file mode 100644 index 0000000..69e592e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_entity_ghosting_menu : public menu::submenu::submenu { +public: + static protection_entity_ghosting_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_entity_ghosting_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::entity::ghosting::vars { + struct ghost { + bool m_enabled_for_session = false; + eNetObjectTypes m_type; + std::string m_name; + }; + + struct variables { + ghost m_ghosts[14]; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting_edit.cpp b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting_edit.cpp new file mode 100644 index 0000000..57fa247 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting_edit.cpp @@ -0,0 +1,60 @@ +#include "protection_entity_ghosting_edit.h" +#include "menu/base/submenu_handler.h" +#include "menu/base/util/timers.h" + +using namespace protection::entity::ghosting::edit::vars; + +namespace protection::entity::ghosting::edit::vars { + variables m_vars; + + void update_config() { + + } +} + +void protection_entity_ghosting_edit_menu::load() { + set_name("Spawn Ghosting"); + set_parent(); + + add_string("Ghost for Session"); + add_string("Ghost for Player"); +} + +void protection_entity_ghosting_edit_menu::update() { + if (!m_vars.m_ready) return; + + static int timer = 0; + menu::timers::run_timed(&timer, 250, [this] { + clear_options(2); + + menu::player::for_each([this](menu::player::player_context& player) { + add_option(toggle_option(player.m_name) + .add_toggle(player.m_ghost[m_vars.m_selected->m_type])); + }, true, true); + }); +} + +void protection_entity_ghosting_edit_menu::update_once() { + clear_options(0); + + add_option(toggle_option(get_string("Ghost for Session")) + .add_toggle(m_vars.m_selected->m_enabled_for_session) + .add_click(update_config)); + + add_option(break_option(get_string("Ghost for Player"))); + + m_vars.m_ready = true; +} + +void protection_entity_ghosting_edit_menu::feature_update() {} + +protection_entity_ghosting_edit_menu* g_instance; +protection_entity_ghosting_edit_menu* protection_entity_ghosting_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_entity_ghosting_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting_edit.h b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting_edit.h new file mode 100644 index 0000000..8531577 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/entity/protection_entity_ghosting_edit.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" +#include "protection_entity_ghosting.h" + +class protection_entity_ghosting_edit_menu : public menu::submenu::submenu { +public: + static protection_entity_ghosting_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_entity_ghosting_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::entity::ghosting::edit::vars { + struct variables { + bool m_ready = false; + protection::entity::ghosting::vars::ghost* m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_add.cpp b/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_add.cpp new file mode 100644 index 0000000..6aaf8d3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_add.cpp @@ -0,0 +1,99 @@ +#include "protection_spawn_rate_limit_add.h" +#include "menu/base/submenu_handler.h" +#include "../protection_spawn_rate_limit.h" +#include "global/lists.h" + +using namespace protection::limits::spawn::add::vars; + +namespace protection::limits::spawn::add::vars { + variables m_vars; + + void add_rate_limit() { + if (m_vars.m_model == 0) return; + + protection::limits::spawn::vars::entity_rate_limit limit; + limit.m_model = m_vars.m_model; + limit.m_delay = m_vars.m_delay; + limit.m_enabled = true; + strcpy_s(limit.m_comment, m_vars.m_comment.c_str()); + protection::limits::spawn::vars::m_vars.m_limits.push_back(limit); + + menu::submenu::handler::set_submenu_previous(true); + } +} + +void protection_spawn_rate_limit_add_menu::load() { + set_name("Add Rate Limit"); + set_parent(); + + m_vars.m_options.push_back(add_option(button_option("Input Model") + .add_translate() + .add_keyboard("Input the model! (Hint: name, hash or numeric)", 30, [](button_option* option, const char* result) { + if (result) { + m_vars.m_comment = result; + + if (result[0] == '0' && (result[1] == 'x' || result[1] == 'X')) { + // hash + m_vars.m_model = (uint32_t)_strtoui64(result, 0, 0); + } else { + std::string string_name(result); + if (std::find_if(string_name.begin(), string_name.end(), [](unsigned char c) { return !std::isdigit(c); }) == string_name.end()) { + // numeric + m_vars.m_model = (uint32_t)atoi(result); + } else { + // name + m_vars.m_model = native::get_hash_key(result); + } + } + } + }))); + + m_vars.m_options.push_back(add_option(button_option("Input Comment") + .add_translate() + .add_keyboard("Input custom comment", 0x100, [](button_option* option, const char* result) { + m_vars.m_comment = result; + }))); + + m_vars.m_options.push_back(add_option(scroll_option(SCROLL, "Delay Per Spawn") + .add_translate() + .add_scroll(m_vars.m_delay, 0, NUMOF(global::lists::g_timers), global::lists::g_timers))); + + m_vars.m_options.push_back(add_option(button_option("Add Rate Limit") + .add_translate() + .add_click(add_rate_limit))); + + add_string("Model"); + add_string("Comment"); +} + +void protection_spawn_rate_limit_add_menu::update() { + char tooltip[0x150]; + sprintf_s(tooltip, "%s=%X %s=%s", + get_string("Model").c_str(), + m_vars.m_model, + get_string("Comment").c_str(), + m_vars.m_comment.c_str()); + + for (std::shared_ptr& option : m_vars.m_options) { + option->set_tooltip(tooltip); + } +} + +void protection_spawn_rate_limit_add_menu::update_once() { + m_vars.m_comment.clear(); + m_vars.m_model = 0; + m_vars.m_delay = 0; +} + +void protection_spawn_rate_limit_add_menu::feature_update() {} + +protection_spawn_rate_limit_add_menu* g_instance; +protection_spawn_rate_limit_add_menu* protection_spawn_rate_limit_add_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_spawn_rate_limit_add_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_add.h b/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_add.h new file mode 100644 index 0000000..f836d62 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_add.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_spawn_rate_limit_add_menu : public menu::submenu::submenu { +public: + static protection_spawn_rate_limit_add_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_spawn_rate_limit_add_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::limits::spawn::add::vars { + struct variables { + uint32_t m_model = 0; + int m_delay = 0; + std::string m_comment = ""; + + std::vector> m_options; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_edit.cpp b/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_edit.cpp new file mode 100644 index 0000000..63b180d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_edit.cpp @@ -0,0 +1,48 @@ +#include "protection_spawn_rate_limit_edit.h" +#include "menu/base/submenu_handler.h" +#include "../protection_spawn_rate_limit.h" +#include "global/lists.h" + +using namespace protection::limits::spawn::edit::vars; + +namespace protection::limits::spawn::edit::vars { + variables m_vars; +} + +void protection_spawn_rate_limit_edit_menu::load() { + set_name("Spawn Rate"); + set_parent(); + + add_string("Model"); + add_string("Comment"); + add_string("Delay Per Spawn"); + add_string("Enabled"); +} + +void protection_spawn_rate_limit_edit_menu::update() {} + +void protection_spawn_rate_limit_edit_menu::update_once() { + clear_options(0); + + add_option(button_option(util::va::va("%s: 0x%X", get_string("Model").c_str(), protection::limits::spawn::vars::m_vars.m_limits[m_vars.m_selected].m_model))); + add_option(button_option(util::va::va("%s: %s", get_string("Comment").c_str(), protection::limits::spawn::vars::m_vars.m_limits[m_vars.m_selected].m_comment))); + + add_option(scroll_option(SCROLL, get_string("Delay Per Spawn")) + .add_scroll(protection::limits::spawn::vars::m_vars.m_limits[m_vars.m_selected].m_delay, 0, NUMOF(global::lists::g_timers), global::lists::g_timers)); + + add_option(toggle_option(get_string("Enabled")) + .add_toggle(protection::limits::spawn::vars::m_vars.m_limits[m_vars.m_selected].m_enabled)); +} + +void protection_spawn_rate_limit_edit_menu::feature_update() {} + +protection_spawn_rate_limit_edit_menu* g_instance; +protection_spawn_rate_limit_edit_menu* protection_spawn_rate_limit_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_spawn_rate_limit_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_edit.h b/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_edit.h new file mode 100644 index 0000000..ef50613 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/limits/entity/protection_spawn_rate_limit_edit.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_spawn_rate_limit_edit_menu : public menu::submenu::submenu { +public: + static protection_spawn_rate_limit_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_spawn_rate_limit_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::limits::spawn::edit::vars { + struct variables { + std::size_t m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/limits/protection_message_limit.cpp b/GTAV/src/menu/base/submenus/main/protection/limits/protection_message_limit.cpp new file mode 100644 index 0000000..eafd848 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/limits/protection_message_limit.cpp @@ -0,0 +1,45 @@ +#include "protection_message_limit.h" +#include "menu/base/submenu_handler.h" +#include "global/lists.h" + +using namespace protection::limits::messages::vars; + +namespace protection::limits::messages::vars { + variables m_vars; +} + +void protection_message_limit_menu::load() { + set_parent(); + + add_string("Block Everything"); + add_string("Block Spoofed"); + add_string("Rate Limit"); +} + +void protection_message_limit_menu::update() {} + +void protection_message_limit_menu::update_once() { + clear_options(0); + + add_option(toggle_option(get_string("Block Everything")) + .add_toggle(m_vars.m_limit->m_block_all)); + + add_option(toggle_option(get_string("Block Spoofed")) + .add_toggle(m_vars.m_limit->m_block_spoofed)); + + add_option(scroll_option(SCROLL, get_string("Rate Limit")) + .add_scroll(m_vars.m_limit->m_delay, 0, NUMOF(global::lists::g_timers), global::lists::g_timers)); +} + +void protection_message_limit_menu::feature_update() {} + +protection_message_limit_menu* g_instance; +protection_message_limit_menu* protection_message_limit_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_message_limit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/limits/protection_message_limit.h b/GTAV/src/menu/base/submenus/main/protection/limits/protection_message_limit.h new file mode 100644 index 0000000..cb3e554 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/limits/protection_message_limit.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" +#include "../protection_limits.h" + +class protection_message_limit_menu : public menu::submenu::submenu { +public: + static protection_message_limit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_message_limit_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::limits::messages::vars { + struct variables { + protection::limits::vars::message_limit* m_limit; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/limits/protection_spawn_rate_limit.cpp b/GTAV/src/menu/base/submenus/main/protection/limits/protection_spawn_rate_limit.cpp new file mode 100644 index 0000000..2b2d2dd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/limits/protection_spawn_rate_limit.cpp @@ -0,0 +1,125 @@ +#include "protection_spawn_rate_limit.h" +#include "menu/base/submenu_handler.h" +#include "../protection_limits.h" +#include "entity/protection_spawn_rate_limit_add.h" +#include "entity/protection_spawn_rate_limit_edit.h" +#include "util/log.h" +#include "util/dirs.h" +#include + +using namespace protection::limits::spawn::vars; + +namespace protection::limits::spawn::vars { + variables m_vars; + + bool cache_limits() { + try { + std::ifstream input(util::dirs::get_path(entity_limits)); + if (input.good()) { + nlohmann::json json = nlohmann::json::parse(input); + input.close(); + + if (!json.empty()) { + m_vars.m_limits.clear(); + + for (auto& it = json.begin(); it != json.end(); ++it) { + nlohmann::json& elements = *it; + + entity_rate_limit limit; + limit.m_model = elements[0]; + limit.m_delay = elements[1]; + limit.m_enabled = elements[2]; + strcpy_s(limit.m_comment, it.key().c_str()); + m_vars.m_limits.push_back(limit); + } + + return true; + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + + return false; + } +} + +void protection_spawn_rate_limit_menu::load() { + set_name("Spawn Rate"); + set_parent(); + + add_option(submenu_option("Add Rate Limit") + .add_translate() + .add_submenu()); + + add_option(break_option("Limits") + .add_translate()); + + add_string("~m~None"); + cache_limits(); + + if (!cache_limits()) { + try { + std::ofstream output(util::dirs::get_path(entity_limits)); + if (output.good()) { + nlohmann::json json; + json["Jet"] = { 0x3f119114, 6, true }; + json["Another Jet"] = { 0x15F27762, 6, true }; + + output << json.dump(4); + output.close(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + protection_spawn_rate_limit_edit_menu::get(); +} + +void protection_spawn_rate_limit_menu::update() {} + +void protection_spawn_rate_limit_menu::update_once() { + if (menu::submenu::handler::get_previous() == protection_spawn_rate_limit_add_menu::get()) { + if (!m_vars.m_limits.empty()) { + try { + std::ofstream output(util::dirs::get_path(entity_limits)); + if (output.good()) { + nlohmann::json json; + + for (entity_rate_limit& limit : m_vars.m_limits) { + json[limit.m_comment] = { limit.m_model, limit.m_delay, limit.m_enabled }; + } + + output << json.dump(4); + output.close(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + } + + clear_options(2); + + for (std::size_t i = 0; i < m_vars.m_limits.size(); i++) { + entity_rate_limit& limit = m_vars.m_limits[i]; + + add_option(submenu_option(util::va::va("%X - %s", limit.m_model, limit.m_comment)) + .add_click([=] { protection::limits::spawn::edit::vars::m_vars.m_selected = i; }) + .add_submenu()); + } +} + +void protection_spawn_rate_limit_menu::feature_update() {} + +protection_spawn_rate_limit_menu* g_instance; +protection_spawn_rate_limit_menu* protection_spawn_rate_limit_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_spawn_rate_limit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/limits/protection_spawn_rate_limit.h b/GTAV/src/menu/base/submenus/main/protection/limits/protection_spawn_rate_limit.h new file mode 100644 index 0000000..a27b1e4 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/limits/protection_spawn_rate_limit.h @@ -0,0 +1,35 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_spawn_rate_limit_menu : public menu::submenu::submenu { +public: + static protection_spawn_rate_limit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_spawn_rate_limit_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::limits::spawn::vars { + struct entity_rate_limit { + uint32_t m_model; + int m_delay = 0; + bool m_enabled = true; + uint32_t m_last_spawned[0x20]; + char m_comment[0x100]; + + entity_rate_limit() { + memset(m_last_spawned, 0, sizeof(m_last_spawned)); + } + }; + + struct variables { + std::vector m_limits; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_anti_detection.cpp b/GTAV/src/menu/base/submenus/main/protection/protection_anti_detection.cpp new file mode 100644 index 0000000..7942e82 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_anti_detection.cpp @@ -0,0 +1,56 @@ +#include "protection_anti_detection.h" +#include "menu/base/submenu_handler.h" +#include "../protections.h" + +using namespace protection::detection::vars; + +namespace protection::detection::vars { + variables m_vars; +} + +void protection_anti_detection_menu::load() { + set_name("Anti Detection"); + set_parent(); + + add_option(toggle_option("Godmode") + .add_translate() + .add_toggle(m_vars.m_godmode).add_savable(get_submenu_name_stack()) + .add_tooltip("Disables modders seeing you're in godmode")); + + add_option(toggle_option("Super Jump") + .add_translate() + .add_toggle(m_vars.m_super_jump).add_savable(get_submenu_name_stack()) + .add_tooltip("Disables modders seeing you're using super jump")); + + add_option(toggle_option("Health") + .add_translate() + .add_toggle(m_vars.m_health).add_savable(get_submenu_name_stack()) + .add_tooltip("Disables modders seeing you have abnormal health")); + + add_option(toggle_option("Armor") + .add_translate() + .add_toggle(m_vars.m_armor).add_savable(get_submenu_name_stack()) + .add_tooltip("Disables modders seeing you have abnormal armor")); + + add_option(toggle_option("Spectate") + .add_translate() + .add_toggle(m_vars.m_spectate).add_savable(get_submenu_name_stack()) + .add_tooltip("Disables modders seeing you're spectating someone")); +} + +void protection_anti_detection_menu::update() {} + +void protection_anti_detection_menu::update_once() {} + +void protection_anti_detection_menu::feature_update() {} + +protection_anti_detection_menu* g_instance; +protection_anti_detection_menu* protection_anti_detection_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_anti_detection_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_anti_detection.h b/GTAV/src/menu/base/submenus/main/protection/protection_anti_detection.h new file mode 100644 index 0000000..260886d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_anti_detection.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_anti_detection_menu : public menu::submenu::submenu { +public: + static protection_anti_detection_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_anti_detection_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::detection::vars { + struct variables { + bool m_godmode = true; + bool m_super_jump = true; + bool m_health = true; + bool m_armor = true; + bool m_spectate = true; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_entity_events.cpp b/GTAV/src/menu/base/submenus/main/protection/protection_entity_events.cpp new file mode 100644 index 0000000..9381792 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_entity_events.cpp @@ -0,0 +1,53 @@ +#include "protection_entity_events.h" +#include "menu/base/submenu_handler.h" +#include "../protections.h" +#include "entity/protection_entity_blocking.h" +#include "entity/protection_entity_ghosting.h" + +using namespace protection::entity::vars; + +namespace protection::entity::vars { + variables m_vars; +} + +void protection_entity_events_menu::load() { + set_name("Entity"); + set_parent(); + + add_option(submenu_option("Spawn Blocking") + .add_translate() + .add_submenu() + .add_tooltip("Block these entity types from being spawned for other players")); + + add_option(submenu_option("Spawn Ghosting") + .add_translate() + .add_submenu() + .add_tooltip("Block these entity types from specific players")); + + add_option(toggle_option("Block Modder Create") + .add_translate() + .add_toggle(m_vars.m_block_modder_create).add_savable(get_submenu_name_stack()) + .add_tooltip("Blocks entities being created from modders")); + + add_option(toggle_option("Block Modder Sync") + .add_translate() + .add_toggle(m_vars.m_block_modder_sync).add_savable(get_submenu_name_stack()) + .add_tooltip("Blocks entities being synced from modders")); +} + +void protection_entity_events_menu::update() {} + +void protection_entity_events_menu::update_once() {} + +void protection_entity_events_menu::feature_update() {} + +protection_entity_events_menu* g_instance; +protection_entity_events_menu* protection_entity_events_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_entity_events_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_entity_events.h b/GTAV/src/menu/base/submenus/main/protection/protection_entity_events.h new file mode 100644 index 0000000..f13226d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_entity_events.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_entity_events_menu : public menu::submenu::submenu { +public: + static protection_entity_events_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_entity_events_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::entity::vars { + struct variables { + bool m_block_modder_create; + bool m_block_modder_sync; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_events.cpp b/GTAV/src/menu/base/submenus/main/protection/protection_events.cpp new file mode 100644 index 0000000..eec99cf --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_events.cpp @@ -0,0 +1,129 @@ +#include "protection_events.h" +#include "menu/base/submenu_handler.h" +#include "../protections.h" +#include "rage/engine.h" +#include "menu/base/util/helpers.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" + +using namespace protection::events::vars; + +namespace protection::events::vars { + variables m_vars; + + struct context { + std::string m_name; + protection_context* m_context; + int m_size; + }; + + scroll_struct types[] = { + { localization("Off", true), 0 }, + { localization("Notify", true), 0 }, + { localization("Block", true), 0 }, + { localization("Block + Notify", true), 0 }, + { localization("Redirect", true), 0 }, + { localization("Redirect + Block", true), 0 }, + { localization("Redirect + Notify", true), 0 }, + { localization("All", true), 0 }, + }; + + context items[] = { + { "Player Spawns", &m_vars.m_player_spawns, 2 }, + { "Player Model Update", &m_vars.m_player_model_update, 2 }, + { "Spectating", &m_vars.m_spectating, 2 }, + { "Desync Kicks", &m_vars.m_desync_kicks, 2 }, + { "Host Kicks", &m_vars.m_host_kicks, 2 }, + { "Script Host Kicks", &m_vars.m_sh_kick, 4 }, + { "Script Host Migration", &m_vars.m_sh_migration, 2 }, + { "Entity Owner Migration", &m_vars.m_entity_owner_migration, 4 }, + { "Pickup Spawning", &m_vars.m_pickup_spawning, 2 }, + { "Pickup Processing", &m_vars.m_pickup_processing, 4 }, + { "Crashing", &m_vars.m_crashing, 2 }, + { "Cloning", &m_vars.m_clone, 8 }, + { "Cages", &m_vars.m_cages, 4 }, + { "Attachments", &m_vars.m_attachments, 4 }, + { "Rockstar Staff", &m_vars.m_rockstar_staff, 2 }, + { "Join Timeout", &m_vars.m_join_timeout, 2 }, + { "Ghost", &m_vars.m_ghost, 4 }, + { "Spoofed Messages", &m_vars.m_spoofed_messages, 2 }, + }; +} + +void protection_events_menu::load() { + set_name("Generic Events"); + set_parent(); + + for (context& c : items) { + add_string(c.m_name); + c.m_context->m_var = util::config::read_int(get_submenu_name_stack(), c.m_name, c.m_context->m_var); + } + + add_string("is spectating"); + add_string("you"); + add_string("Spectating"); + add_string("Replace Spoofed Message Sender"); + add_string("If someone sends a spoofed message it'll force it to show as the real sender"); +} + +void protection_events_menu::update() {} + +void protection_events_menu::update_once() { + clear_options(0); + + for (context& c : items) { + add_option(scroll_option(SCROLL, get_string(c.m_name)) + .add_scroll(c.m_context->m_var, 0, c.m_size, types) + .add_tooltip(c.m_context->m_tooltip.get()) + .add_click([=] { util::config::write_int(get_submenu_name_stack(), c.m_name, c.m_context->m_var); })); + } + + add_option(toggle_option(get_string("Replace Spoofed Message Sender")) + .add_toggle(m_vars.m_show_real_chat_sender) + .add_update([this](toggle_option* option, int pos) { option->set_tooltip(get_string("If someone sends a spoofed message it'll force it to show as the real sender")); })); +} + +void protection_events_menu::feature_update() { + if (m_vars.m_spectating.notify()) { + menu::player::for_each([this](menu::player::player_context& player) { + if (player.m_id != menu::player::get_local_player().m_id) { + if (!native::is_entity_dead(player.m_ped, 0)) { + if (is_valid_ptr(player.m_ped_ptr)) { + if (is_valid_ptr(player.m_ped_ptr->get_net_obj())) { + if (player.m_ped_ptr->get_net_obj()->m_spectating_network_id) { + rage::network::net_object* object = rage::engine::get_network_object_from_network_id(*(uint64_t*)(global::vars::g_network_object_manager), player.m_ped_ptr->get_net_obj()->m_spectating_network_id, true); + if (is_valid_ptr(object)) { + if (object->m_owner >= 0 && object->m_owner < 32) { + if ((GetTickCount() - m_vars.m_spectate_map[player.m_id][object->m_owner]) > 5000) { + m_vars.m_spectate_map[player.m_id][object->m_owner] = GetTickCount(); + + std::string target = menu::player::get_player(object->m_owner).m_name; + if (!target.compare(menu::player::get_local_player().m_name)) { + target = get_string("you"); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_SPECTATING_YOU, player.m_id); + } + + menu::notify::stacked(get_string("Spectating"), menu::helpers::clean_name(player.m_name) + " " + get_string("is spectating") + " " + target); + } + + menu::helpers::flag_modder(player.m_id, menu::player::REASON_SPECTATING, false); + } + } + } + } + } + } + } + }, true, true); + } +} + +protection_events_menu* g_instance; +protection_events_menu* protection_events_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_events_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_events.h b/GTAV/src/menu/base/submenus/main/protection/protection_events.h new file mode 100644 index 0000000..c838ebf --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_events.h @@ -0,0 +1,45 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_events_menu : public menu::submenu::submenu { +public: + static protection_events_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_events_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::events::vars { + struct variables { + protection_context m_spoofed_messages = { 1, localization("Notifies when a player is sending spoofed chat messages", true, true) }; + protection_context m_clone = { 3, localization("Prevents players cloning you", true, true) }; + protection_context m_cages = { 3, localization("Prevents players spawning cages on you", true, true) }; + protection_context m_attachments = { 3, localization("Prevents players attaching things to you", true, true) }; + protection_context m_crashing = { 1, localization("Prevents players crashing you. NOTE: \"Off\" in this case only disables the notification", true, true) }; + protection_context m_sh_kick = { 3, localization("Prevents players SH kicking you, also notifies when another player is being SH kicked", true, true) }; + protection_context m_ghost = { 3, localization("Prevents a player ghosting themselves", true, true) }; + protection_context m_player_spawns = { 1, localization("Notifies when a player spawns", true, true) }; + protection_context m_pickup_processing = { 3, localization("Prevents pickups being processed", true, true) }; + protection_context m_pickup_spawning = { 1, localization("Notifies when a player gets reported for spawning a pickup", true, true) }; + protection_context m_spectating = { 1, localization("Notifies when a player spectates another player", true, true) }; + protection_context m_desync_kicks = { 1, localization("Notifies when a player uses a menu that pasted quantum and desync kicks another player", true, true) }; + protection_context m_entity_owner_migration = { 3, localization("Prevents modders taking ownership of your spawned entities. NOTE: This will desync the entity for the modder", true, true) }; + protection_context m_host_kicks = { 1, localization("Notifies when a player is being host kicked", true, true) }; + protection_context m_sh_migration = { 1, localization("Notifies when a player is taking SH", true, true) }; + protection_context m_join_timeout = { 1, localization("Notifies when a player is trying to time you out of joining the session", true, true) }; + protection_context m_rockstar_staff = { 1, localization("Notifies when a players real IP address is that of R*'s range", true, true) }; + protection_context m_player_model_update = { 1, localization("Prevents players changing their models. NOTE: THE BLOCK IS USED AS A CRASH PROTECTION, KEEP IT ENABLED TO PREVENT MODEL SWAP CRASHES", true, true) }; + + std::unordered_map> m_spectate_map; + std::unordered_map m_money_drop_map; + + bool m_show_real_chat_sender = true; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_join_blocking.cpp b/GTAV/src/menu/base/submenus/main/protection/protection_join_blocking.cpp new file mode 100644 index 0000000..62daade --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_join_blocking.cpp @@ -0,0 +1,174 @@ +#include "protection_join_blocking.h" +#include "menu/base/submenu_handler.h" +#include "../protections.h" +#include "util/caller.h" +#include "rage/engine.h" +#include "rage/api/api.h" + +using namespace protection::joining::vars; + +namespace protection::joining::vars { + variables m_vars; + + void block_resolves() { + m_vars.m_spoof = false; + + if (m_vars.m_block) { + rage::network::gs_session session; + memset(&session, 0, sizeof(session)); + rage::engine::set_gsinfo(&session); + } else { + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + rage::engine::set_gsinfo(real_config->get_gs_session()); + } + } + + void resolve_player() { + memset(&m_vars.m_spoof_info, 0, sizeof(m_vars.m_spoof_info)); + + rage::network::rockstar_identifier* identifier = new rage::network::rockstar_identifier(); + identifier->m_rockstar_id = m_vars.m_target; + identifier->m_type = 3; + + global::vars::g_gs_info_requests.push_back({ false, 1, m_vars.m_target, GetTickCount() + 10000, [](std::string gs, uint64_t rockstar_id) { + if (rage::engine::get_session_info_from_gs(&m_vars.m_spoof_info, gs.c_str())) { + menu::notify::stacked(protection_join_blocking_menu::get()->get_name().get(), util::va::va("%s %i!", protection_join_blocking_menu::get()->get_string("Successfully spoofed resolve to host of target players session. The hosts Rockstar ID is").c_str(), m_vars.m_spoof_info.m_rockstar_id), global::ui::g_success); + } + } }); + + native::clear_gamer_task_data(); + rage::engine::send_session_info_request(identifier, 1); + delete identifier; + } + + void input_player_rid_callback(button_option* option, const char* result) { + if (std::find_if(begin(global::vars::g_gs_info_requests), end(global::vars::g_gs_info_requests), [](gs_info_request& elem) { return elem.m_type == 1; }) != end(global::vars::g_gs_info_requests)) { + menu::notify::stacked(protection_join_blocking_menu::get()->get_name().get(), protection_join_blocking_menu::get()->get_string("There's already a pending query running, please wait for it to finish"), global::ui::g_error); + return; + } + + std::string string_name(result); + if (std::find_if(string_name.begin(), string_name.end(), [](unsigned char c) { return !std::isdigit(c); }) == string_name.end()) { + if (atoll(string_name.c_str()) > 0x1000) { + m_vars.m_target = atoll(string_name.c_str()); + resolve_player(); + } + } + } + + void input_player_name_callback(button_option* option, const char* result) { + if (std::find_if(begin(global::vars::g_gs_info_requests), end(global::vars::g_gs_info_requests), [](gs_info_request& elem) { return elem.m_type == 1; }) != end(global::vars::g_gs_info_requests)) { + menu::notify::stacked(protection_join_blocking_menu::get()->get_name().get(), protection_join_blocking_menu::get()->get_string("There's already a pending query running, please wait for it to finish"), global::ui::g_error); + return; + } + + rage::api::get_profiles_from_name(result, [=](bool success, std::vector accounts, rage::api::result_info* out_info) { + if (success && !accounts.empty()) { + m_vars.m_target = accounts[0].m_rockstar_id; + resolve_player(); + } else { + menu::notify::stacked(protection_join_blocking_menu::get()->get_name().get(), protection_join_blocking_menu::get()->get_string("Failed to resolve Rockstar ID"), global::ui::g_error); + } + + if (out_info) { + delete out_info; + } + }, nullptr); + } +} + +void protection_join_blocking_menu::load() { + set_name("Join Blocking"); + set_parent(); + + add_option(toggle_option("Block Resolves") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_block) + .add_click(block_resolves).add_savable(get_submenu_name_stack()) + .add_tooltip("Block players from joining you via Social Club and Rockstar ID joiners")); + + add_option(toggle_option("Spoof Resolves") + .add_translate() + .add_toggle(m_vars.m_spoof) + .add_click([] { m_vars.m_block = true; if (!m_vars.m_spoof) m_vars.m_spoof_info.m_peer_token = 0; }) + .add_tooltip("Spoof to another player so that other players attempting to join your session join someone else's instead")); + + add_option(button_option("Input Target Rockstar ID") + .add_translate() + .add_keyboard("Enter target players Rockstar ID", 30, input_player_rid_callback) + .add_requirement([] { return m_vars.m_spoof; })); + + add_option(button_option("Input Target Name") + .add_translate() + .add_keyboard("Enter target players name", 30, input_player_name_callback) + .add_requirement([] { return m_vars.m_spoof; })); + + m_vars.m_preview_button = add_option(button_option("") + .add_requirement([] { return m_vars.m_spoof && m_vars.m_target > 0 && m_vars.m_spoof_info.m_peer_token > 0; })); + + add_string("Failed to find a session for that player, block has been enabled"); + add_string("Failed to find a session for that player, they may be offline"); + add_string("Failed to resolve Rockstar ID"); + add_string("There's already a pending query running, please wait for it to finish"); + add_string("Successfully spoofed resolve to host of target players session. The hosts Rockstar ID is"); + add_string("Spoofed to"); +} + +void protection_join_blocking_menu::update() { + m_vars.m_preview_button->set_name(get_string("Spoofed to") + " " + std::to_string(m_vars.m_target)); +} + +void protection_join_blocking_menu::update_once() {} + +void protection_join_blocking_menu::feature_update() { + if (!global::vars::g_gs_info_requests.empty()) { + for (std::size_t i = 0; i < global::vars::g_gs_info_requests.size(); i++) { + if (global::vars::g_gs_info_requests[i].m_type == 1) { + if (global::vars::g_gs_info_requests[i].m_finished) { + global::vars::g_gs_info_requests.erase(global::vars::g_gs_info_requests.begin() + i); + continue; + } + + if (global::vars::g_gs_info_requests[i].m_expiry < GetTickCount()) { + if (m_vars.m_spoof) { + if (menu::base::get_current_option() >= 2) menu::base::set_current_option(1); + m_vars.m_spoof = false; + m_vars.m_block = true; + block_resolves(); + menu::notify::stacked(get_name().get(), get_string("Failed to find a session for that player, block has been enabled"), global::ui::g_error); + } else { + menu::notify::stacked(get_name().get(), get_string("Failed to find a session for that player, they may be offline"), global::ui::g_error); + } + + global::vars::g_gs_info_requests.erase(global::vars::g_gs_info_requests.begin() + i); + } + } + + if (global::vars::g_gs_info_requests[i].m_type == 69) { + if (global::vars::g_gs_info_requests[i].m_finished) { + global::vars::g_gs_info_requests.erase(global::vars::g_gs_info_requests.begin() + i); + continue; + } + + if (global::vars::g_gs_info_requests[i].m_expiry < GetTickCount()) { + global::vars::g_gs_info_requests.erase(global::vars::g_gs_info_requests.begin() + i); + } + } + } + } +} + +protection_join_blocking_menu* g_instance; +protection_join_blocking_menu* protection_join_blocking_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_join_blocking_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_join_blocking.h b/GTAV/src/menu/base/submenus/main/protection/protection_join_blocking.h new file mode 100644 index 0000000..4428fe7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_join_blocking.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" +#include "rage/types/network_types.h" + +class protection_join_blocking_menu : public menu::submenu::submenu { +public: + static protection_join_blocking_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_join_blocking_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::joining::vars { + struct variables { + bool m_block; + bool m_spoof; + uint64_t m_target; + + std::shared_ptr m_preview_button; + rage::network::gs_session m_spoof_info; + }; + + void block_resolves(); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_limits.cpp b/GTAV/src/menu/base/submenus/main/protection/protection_limits.cpp new file mode 100644 index 0000000..36320f7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_limits.cpp @@ -0,0 +1,69 @@ +#include "protection_limits.h" +#include "menu/base/submenu_handler.h" +#include "../protections.h" +#include "limits/protection_message_limit.h" +#include "limits/protection_spawn_rate_limit.h" + +using namespace protection::limits::vars; + +namespace protection::limits::vars { + variables m_vars; +} + +void protection_limits_menu::load() { + set_name("Limits"); + set_parent(); + + add_option(submenu_option("Spawn Rate") + .add_translate() + .add_submenu()); + + m_vars.m_text_message_option = add_option(submenu_option("Text Messages") + .add_translate() + .add_click([] { + protection_message_limit_menu::get()->set_name(m_vars.m_text_message_option->get_name().get(), false, false); + protection::limits::messages::vars::m_vars.m_limit = &m_vars.m_text_message; + }) + .add_submenu()); + + m_vars.m_chat_message_option = add_option(submenu_option("Chat Messages") + .add_translate() + .add_click([] { + protection_message_limit_menu::get()->set_name(m_vars.m_chat_message_option->get_name().get(), false, false); + protection::limits::messages::vars::m_vars.m_limit = &m_vars.m_chat_message; + }) + .add_submenu()); + + m_vars.m_text_message.m_block_all = util::config::read_bool(get_submenu_name_stack(), "Text", false, { "Block All" }); + m_vars.m_text_message.m_block_spoofed = util::config::read_bool(get_submenu_name_stack(), "Text", false, { "Block Spoofed" }); + m_vars.m_text_message.m_delay = util::config::read_int(get_submenu_name_stack(), "Text", 0, { "Delay" }); + + m_vars.m_chat_message.m_block_all = util::config::read_bool(get_submenu_name_stack(), "Chat", false, { "Block All" }); + m_vars.m_chat_message.m_block_spoofed = util::config::read_bool(get_submenu_name_stack(), "Chat", false, { "Block Spoofed" }); + m_vars.m_chat_message.m_delay = util::config::read_int(get_submenu_name_stack(), "Chat", 0, { "Delay" }); +} + +void protection_limits_menu::update() {} + +void protection_limits_menu::update_once() { + util::config::write_bool(get_submenu_name_stack(), "Text", m_vars.m_text_message.m_block_all, { "Block All" }); + util::config::write_bool(get_submenu_name_stack(), "Text", m_vars.m_text_message.m_block_spoofed, { "Block Spoofed" }); + util::config::write_int(get_submenu_name_stack(), "Text", m_vars.m_text_message.m_delay, { "Delay" }); + + util::config::write_bool(get_submenu_name_stack(), "Chat", m_vars.m_chat_message.m_block_all, { "Block All" }); + util::config::write_bool(get_submenu_name_stack(), "Chat", m_vars.m_chat_message.m_block_spoofed, { "Block Spoofed" }); + util::config::write_int(get_submenu_name_stack(), "Chat", m_vars.m_chat_message.m_delay, { "Delay" }); +} + +void protection_limits_menu::feature_update() {} + +protection_limits_menu* g_instance; +protection_limits_menu* protection_limits_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_limits_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_limits.h b/GTAV/src/menu/base/submenus/main/protection/protection_limits.h new file mode 100644 index 0000000..3e120ef --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_limits.h @@ -0,0 +1,33 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_limits_menu : public menu::submenu::submenu { +public: + static protection_limits_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_limits_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::limits::vars { + struct message_limit { + bool m_block_all; + bool m_block_spoofed; + int m_delay; + }; + + struct variables { + message_limit m_text_message; + message_limit m_chat_message; + + std::shared_ptr m_text_message_option; + std::shared_ptr m_chat_message_option; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_net_events.cpp b/GTAV/src/menu/base/submenus/main/protection/protection_net_events.cpp new file mode 100644 index 0000000..2f85cfd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_net_events.cpp @@ -0,0 +1,79 @@ +#include "protection_net_events.h" +#include "menu/base/submenu_handler.h" +#include "../protections.h" + +using namespace protection::events::net::vars; + +namespace protection::events::net::vars { + variables m_vars; + + struct context { + std::string m_name; + protection_context* m_context; + int m_size; + }; + + scroll_struct types[] = { + { localization("Off", true), 0 }, + { localization("Notify", true), 0 }, + { localization("Block", true), 0 }, + { localization("Block + Notify", true), 0 }, + { localization("Redirect", true), 0 }, + { localization("Redirect + Block", true), 0 }, + { localization("Redirect + Notify", true), 0 }, + { localization("All", true), 0 }, + }; + + context items[] = { + { "Give Weapon", &m_vars.m_give_weapon, 8 }, + { "Remove Weapon", &m_vars.m_remove_weapon, 8 }, + { "Remove All Weapons", &m_vars.m_remove_all_weapons, 8 }, + { "Freeze", &m_vars.m_freeze, 8 }, + { "Explosion", &m_vars.m_explosion, 8 }, + { "Fire", &m_vars.m_fire, 4 }, + { "Particle FX", &m_vars.m_particle_fx, 4 }, + { "Script Events", &m_vars.m_script_events, 8 }, + { "Increment Stat", &m_vars.m_increment_stat, 8 }, + { "Weather", &m_vars.m_weather, 4 }, + { "Clock", &m_vars.m_clock, 4 }, + { "Sound", &m_vars.m_sound, 4 }, + { "Vehicle Control", &m_vars.m_vehicle_control, 4 }, + { "Blame Explosion", &m_vars.m_blame_explosion, 2 }, + }; +} + +void protection_net_events_menu::load() { + set_name("Network Events"); + set_parent(); + + for (context& c : items) { + add_string(c.m_name); + c.m_context->m_var = util::config::read_int(get_submenu_name_stack(), c.m_name, c.m_context->m_var); + } +} + +void protection_net_events_menu::update() {} + +void protection_net_events_menu::update_once() { + clear_options(0); + + for (context& c : items) { + add_option(scroll_option(SCROLL, get_string(c.m_name)) + .add_scroll(c.m_context->m_var, 0, c.m_size, types) + .add_tooltip(c.m_context->m_tooltip.get()) + .add_click([=] { util::config::write_int(get_submenu_name_stack(), c.m_name, c.m_context->m_var); })); + } +} + +void protection_net_events_menu::feature_update() {} + +protection_net_events_menu* g_instance; +protection_net_events_menu* protection_net_events_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_net_events_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_net_events.h b/GTAV/src/menu/base/submenus/main/protection/protection_net_events.h new file mode 100644 index 0000000..f86e078 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_net_events.h @@ -0,0 +1,37 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_net_events_menu : public menu::submenu::submenu { +public: + static protection_net_events_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_net_events_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::events::net::vars { + struct variables { + protection_context m_give_weapon = { 3, localization("Blocks players giving you weapons", true) }; + protection_context m_remove_weapon = { 3, localization("Blocks players removing a weapon", true) }; + protection_context m_remove_all_weapons = { 3, localization("Blocks players removing all weapons", true) }; + protection_context m_freeze = { 3, localization("Blocks players freezing you in place", true) }; + protection_context m_explosion = { 3, localization("Blocks players exploding you", true) }; + protection_context m_fire = { 3, localization("Blocks players starting fires on you", true) }; + protection_context m_particle_fx = { 3, localization("Blocks players using PTFX on you", true) }; + protection_context m_script_events = { 3, localization("Blocks players using malicious script events on you", true) }; + protection_context m_increment_stat = { 3, localization("Blocks players modifying your stats", true) }; + protection_context m_weather = { 3, localization("Blocks players changing the weather", true) }; + protection_context m_clock = { 3, localization("Blocks players changing the time", true) }; + protection_context m_sound = { 3, localization("Blocks players playing sounds on you", true) }; + protection_context m_vehicle_control = { 3, localization("Blocks players modifying your vehicle", true) }; + protection_context m_blame_explosion = { 1, localization("Notifies when a player is blaming another player", true) }; + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_presence_events.cpp b/GTAV/src/menu/base/submenus/main/protection/protection_presence_events.cpp new file mode 100644 index 0000000..3bc7ecd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_presence_events.cpp @@ -0,0 +1,65 @@ +#include "protection_presence_events.h" +#include "menu/base/submenu_handler.h" +#include "../protections.h" + +using namespace protection::events::presence::vars; + +namespace protection::events::presence::vars { + variables m_vars; + + struct context { + std::string m_name; + protection_context* m_context; + }; + + scroll_struct types[] = { + { localization("Off", true), 0 }, + { localization("Notify", true), 0 }, + { localization("Block", true), 0 }, + { localization("Block + Notify", true), 0 } + }; + + context items[] = { + { "Text Message", &m_vars.m_text_message }, + { "Crew Message", &m_vars.m_crew_message }, + { "Game Invite", &m_vars.m_game_invite }, + { "Game Server Rewards", &m_vars.m_game_server_awards }, + { "Admin Invite", &m_vars.m_admin_invite }, + { "Stat Update", & m_vars.m_stat_update } + }; +} + +void protection_presence_events_menu::load() { + set_name("Presence Events"); + set_parent(); + + for (context& c : items) { + add_string(c.m_name); + c.m_context->m_var = util::config::read_int(get_submenu_name_stack(), c.m_name, c.m_context->m_var); + } +} + +void protection_presence_events_menu::update() {} + +void protection_presence_events_menu::update_once() { + clear_options(0); + + for (context& c : items) { + add_option(scroll_option(SCROLL, get_string(c.m_name)) + .add_scroll(c.m_context->m_var, 0, NUMOF(types), types) + .add_click([=] { util::config::write_int(get_submenu_name_stack(), c.m_name, c.m_context->m_var); })); + } +} + +void protection_presence_events_menu::feature_update() {} + +protection_presence_events_menu* g_instance; +protection_presence_events_menu* protection_presence_events_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_presence_events_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_presence_events.h b/GTAV/src/menu/base/submenus/main/protection/protection_presence_events.h new file mode 100644 index 0000000..89cf88f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_presence_events.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_presence_events_menu : public menu::submenu::submenu { +public: + static protection_presence_events_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_presence_events_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::events::presence::vars { + struct variables { + protection_context m_text_message = { 3, localization("") }; + protection_context m_crew_message = { 3, localization("") }; + protection_context m_game_invite = { 3, localization("") }; + protection_context m_game_server_awards = { 3, localization("") }; + protection_context m_admin_invite = { 3, localization("") }; + protection_context m_stat_update = { 3, localization("") }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_reactions.cpp b/GTAV/src/menu/base/submenus/main/protection/protection_reactions.cpp new file mode 100644 index 0000000..b572906 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_reactions.cpp @@ -0,0 +1,251 @@ +#include "protection_reactions.h" +#include "menu/base/submenu_handler.h" +#include "../protections.h" +#include "reactions/protection_reactions_selected.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "rage/engine.h" +#include "menu/base/submenus/main/network/players/network_players_abusive.h" +#include "menu/base/submenus/main/network/players/network_players_trolling.h" +#include "menu/base/submenus/main/network/players/network_players_removals.h" +#include "menu/base/submenus/main/network/session/network_session_overseer.h" + +using namespace protection::reactions::vars; + +namespace protection::reactions::vars { + variables m_vars; + + std::string reasons[] = { + "Death", // + "Aim", // + "Report", // + "Spoofed Host Token", // + "Spoofed Rockstar ID", // + "Spoofed Name", // + "Spoofed IP", // + "Spoofed Chat", // + "Spoofed Text", // + "Arxan", // + "Crash Attempt", // + "Spectating You", // + "Money Drop", // + "Quantum Kick", // + "Script Migration", // + "Super Jump", // + "Join Timeout", // + "Invalid Model", // + "Info Change" // + }; + + void process_event(eEventReactions _event, Player id) { + util::fiber::pool::add([=] { + menu::player::player_context& player = menu::player::get_player(id); + if (!player.m_connected) return; + + if (m_vars.m_reactions[_event].m_explode) { + native::add_explosion(player.m_coords.x, player.m_coords.y, player.m_coords.z, 0, 10.f, true, false, 0.f, false); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_crash) { + network::players::removals::vars::crash(player); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_kick) { + if (menu::player::get_local_player().m_is_script_host) { + network::players::removals::vars::script_host_kick(player); + util::fiber::sleep(250); + } + + if (rage::engine::get_host_net_game_player() == menu::player::get_local_player().m_net_player) { + network::players::removals::vars::session_host_kick(player); + util::fiber::sleep(250); + } else { + if (rage::engine::get_host_net_game_player() != player.m_net_player) { + network::players::removals::vars::break_freemode_kick(player); + util::fiber::sleep(250); + } + } + } + + if (m_vars.m_reactions[_event].m_add_to_overseer) { + if (is_valid_ptr(player.m_net_player)) { + if (is_valid_ptr(player.m_net_player->m_player_info)) { + network::session::overseer::vars::save(player.m_name, player.m_net_player->m_player_info->m_identifier.m_rockstar_id, "Event Reaction for " + reasons[_event]); + } + } + + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_cage) { + network::players::abusive::vars::cage_player(player, 2); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_kick_from_vehicle) { + network::players::abusive::vars::kick_from_vehicle(player); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_set_on_fire) { + network::players::abusive::vars::set_on_fire(player); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_ragdoll) { + network::players::abusive::vars::ragdoll(player); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_glitch_physics) { + network::players::abusive::vars::glitch_physics(player); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_black_screen) { + network::players::trolling::vars::black_screen(player); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_blame) { + network::players::abusive::vars::blame(player); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_give_wanted_level) { + network::players::abusive::vars::give_wanted_level(player, 1); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_send_to_island) { + network::players::abusive::vars::send_to_island(player); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_remove_weapons) { + native::remove_all_ped_weapons(player.m_ped, true); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_hostile_clone) { + player.m_clone_type = 1; + network::players::abusive::vars::clone_player(player, player.m_clone_type); + util::fiber::sleep(250); + } + + if (m_vars.m_reactions[_event].m_bail) { + if (is_valid_ptr(*(uint64_t*)(global::vars::g_network_player_manager))) { + native::network_bail(0, 0, 0); + } + } + }); + } +} + +void protection_reactions_menu::load() { + set_name("Reactions"); + set_parent(); + + int index = 0; + for (std::string s : reasons) { + add_string(s); + + m_vars.m_reactions[index].m_explode = util::config::read_bool(get_submenu_name_stack(), "Explode", false, { s }); + m_vars.m_reactions[index].m_crash = util::config::read_bool(get_submenu_name_stack(), "Crash", false, { s }); + m_vars.m_reactions[index].m_kick = util::config::read_bool(get_submenu_name_stack(), "Kick", false, { s }); + m_vars.m_reactions[index].m_add_to_overseer = util::config::read_bool(get_submenu_name_stack(), "Add to Overseer", false, { s }); + m_vars.m_reactions[index].m_cage = util::config::read_bool(get_submenu_name_stack(), "Cage", false, { s }); + m_vars.m_reactions[index].m_kick_from_vehicle = util::config::read_bool(get_submenu_name_stack(), "Kick from Vehicle", false, { s }); + m_vars.m_reactions[index].m_set_on_fire = util::config::read_bool(get_submenu_name_stack(), "Set on Fire", false, { s }); + m_vars.m_reactions[index].m_ragdoll = util::config::read_bool(get_submenu_name_stack(), "Ragdoll", false, { s }); + m_vars.m_reactions[index].m_glitch_physics = util::config::read_bool(get_submenu_name_stack(), "Glitch Physics", false, { s }); + m_vars.m_reactions[index].m_black_screen = util::config::read_bool(get_submenu_name_stack(), "Black Screen", false, { s }); + m_vars.m_reactions[index].m_blame = util::config::read_bool(get_submenu_name_stack(), "Blame", false, { s }); + m_vars.m_reactions[index].m_give_wanted_level = util::config::read_bool(get_submenu_name_stack(), "Give Wanted Level", false, { s }); + m_vars.m_reactions[index].m_send_to_island = util::config::read_bool(get_submenu_name_stack(), "Send to Island", false, { s }); + m_vars.m_reactions[index].m_remove_weapons = util::config::read_bool(get_submenu_name_stack(), "Remove Weapons", false, { s }); + m_vars.m_reactions[index].m_hostile_clone = util::config::read_bool(get_submenu_name_stack(), "Hostile Clone", false, { s }); + m_vars.m_reactions[index].m_bail = util::config::read_bool(get_submenu_name_stack(), "Bail", false, { s }); + index++; + } +} + +void protection_reactions_menu::update() {} + +void protection_reactions_menu::update_once() { // save config + clear_options(0); + + int index = 0; + for (std::string s : reasons) { + add_option(submenu_option(get_string(s)) + .add_submenu() + .add_click([=] { + protection_reactions_selected_menu::get()->set_name(s, false, false); + protection::reactions::selected::vars::m_vars.m_selected = index; + })); + + index++; + } + + if (menu::submenu::handler::get_previous() == protection_reactions_selected_menu::get()) { + util::config::write_bool(get_submenu_name_stack(), "Explode", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_explode, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Crash", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_crash, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Kick", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_kick, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Add to Overseer", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_add_to_overseer, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Cage", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_cage, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Kick from Vehicle", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_kick_from_vehicle, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Set on Fire", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_set_on_fire, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Ragdoll", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_ragdoll, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Glitch Physics", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_glitch_physics, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Black Screen", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_black_screen, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Blame", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_blame, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Give Wanted Level", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_give_wanted_level, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Send to Island", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_send_to_island, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Remove Weapons", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_remove_weapons, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + util::config::write_bool(get_submenu_name_stack(), "Hostile Clone", m_vars.m_reactions[protection::reactions::selected::vars::m_vars.m_selected].m_hostile_clone, { reasons[protection::reactions::selected::vars::m_vars.m_selected] }); + } +} + +void protection_reactions_menu::feature_update() { + static uint32_t last_death = 0; + static uint32_t last_aim[32]; + + if (m_vars.m_reactions[EVENT_DEATH].is_active()) { + if (!menu::player::get_local_player().m_alive) { + if (GetTickCount() - last_death > 2000) { + Ped killer = native::get_ped_source_of_death(menu::player::get_local_player().m_ped); + if (killer && killer != menu::player::get_local_player().m_ped && native::is_ped_a_player(killer)) { + Player player_killer = native::network_get_player_index_from_ped(killer); + if (player_killer != menu::player::get_local_player().m_id && menu::player::get_player(player_killer).m_connected) { + last_death = GetTickCount(); + process_event(EVENT_DEATH, player_killer); + } + } + } + } + } + + if (m_vars.m_reactions[EVENT_AIM].is_active()) { + menu::player::for_each([] (menu::player::player_context& player) { + if (GetTickCount() - last_aim[player.m_id] > 2000) { + if (native::is_player_targetting_entity(player.m_id, menu::player::get_local_player().m_entity)) { + last_aim[player.m_id] = GetTickCount(); + process_event(EVENT_AIM, player.m_id); + } + } + }); + } +} + +protection_reactions_menu* g_instance; +protection_reactions_menu* protection_reactions_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_reactions_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/protection_reactions.h b/GTAV/src/menu/base/submenus/main/protection/protection_reactions.h new file mode 100644 index 0000000..c20b16b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/protection_reactions.h @@ -0,0 +1,73 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_reactions_menu : public menu::submenu::submenu { +public: + static protection_reactions_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_reactions_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::reactions::vars { + enum eEventReactions { + EVENT_DEATH, + EVENT_AIM, + EVENT_REPORT, + EVENT_SPOOFED_HOST_TOKEN, + EVENT_SPOOFED_RID, + EVENT_SPOOFED_NAME, + EVENT_SPOOFED_IP, + EVENT_SPOOFED_CHAT, + EVENT_SPOOFED_TEXT, + EVENT_ARXAN, + EVENT_CRASH_ATTEMPT, + EVENT_SPECTATING_YOU, + EVENT_MONEY_DROP, + EVENT_QUANTUM_KICK, + EVENT_SCRIPT_MIGRATION, + EVENT_SUPER_JUMP, + EVENT_JOIN_TIMEOUT, + EVENT_INVALID_MODEL, + EVENT_INFO_CHANGE + }; + + struct event_reaction { + bool m_explode; + bool m_crash; + bool m_kick; + bool m_add_to_overseer; + bool m_cage; + bool m_kick_from_vehicle; + bool m_set_on_fire; + bool m_ragdoll; + bool m_glitch_physics; + bool m_black_screen; + bool m_blame; + bool m_give_wanted_level; + bool m_send_to_island; + bool m_remove_weapons; + bool m_hostile_clone; + bool m_bail; + + bool is_active() { + for (int i = 0; i < sizeof(event_reaction); i++) { + if (*(bool*)((uint64_t)this + i)) return true; + } + + return false; + } + }; + + struct variables { + event_reaction m_reactions[19]; + }; + + void process_event(eEventReactions _event, Player id); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/reactions/protection_reactions_selected.cpp b/GTAV/src/menu/base/submenus/main/protection/reactions/protection_reactions_selected.cpp new file mode 100644 index 0000000..f57393f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/reactions/protection_reactions_selected.cpp @@ -0,0 +1,106 @@ +#include "protection_reactions_selected.h" +#include "menu/base/submenu_handler.h" +#include "../protection_reactions.h" + +using namespace protection::reactions::selected::vars; + +namespace protection::reactions::selected::vars { + variables m_vars; +} + +void protection_reactions_selected_menu::load() { + set_name("Reactions"); + set_parent(); + + add_option(toggle_option("Explode") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_explode) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_explode); })); + + add_option(toggle_option("Crash") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_crash) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_crash); })); + + add_option(toggle_option("Kick") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_kick) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_kick); })); + + add_option(toggle_option("Add to Overseer") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_add_to_overseer) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_add_to_overseer); })); + + add_option(toggle_option("Cage") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_cage) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_cage); })); + + add_option(toggle_option("Kick from Vehicle") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_kick_from_vehicle) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_kick_from_vehicle); })); + + add_option(toggle_option("Set on Fire") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_set_on_fire) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_set_on_fire); })); + + add_option(toggle_option("Ragdoll") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_ragdoll) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_ragdoll); })); + + add_option(toggle_option("Glitch Physics") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_glitch_physics) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_glitch_physics); })); + + add_option(toggle_option("Black Screen") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_black_screen) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_black_screen); })); + + add_option(toggle_option("Blame") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_blame) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_blame); })); + + add_option(toggle_option("Give Wanted Level") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_give_wanted_level) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_give_wanted_level); })); + + add_option(toggle_option("Send to Island") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_send_to_island) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_send_to_island); })); + + add_option(toggle_option("Remove Weapons") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_remove_weapons) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_remove_weapons); })); + + add_option(toggle_option("Hostile Clone") + .add_translate() + .add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_hostile_clone) + .add_update([] (toggle_option* option, int pos) { option->add_toggle(protection::reactions::vars::m_vars.m_reactions[m_vars.m_selected].m_hostile_clone); })); +} + +void protection_reactions_selected_menu::update() {} + +void protection_reactions_selected_menu::update_once() {} + +void protection_reactions_selected_menu::feature_update() {} + +protection_reactions_selected_menu* g_instance; +protection_reactions_selected_menu* protection_reactions_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_reactions_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protection/reactions/protection_reactions_selected.h b/GTAV/src/menu/base/submenus/main/protection/reactions/protection_reactions_selected.h new file mode 100644 index 0000000..6351aba --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protection/reactions/protection_reactions_selected.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_reactions_selected_menu : public menu::submenu::submenu { +public: + static protection_reactions_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_reactions_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::reactions::selected::vars { + struct variables { + int m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protections.cpp b/GTAV/src/menu/base/submenus/main/protections.cpp new file mode 100644 index 0000000..82ead0d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protections.cpp @@ -0,0 +1,176 @@ +#include "protections.h" +#include "menu/base/submenu_handler.h" +#include "../main.h" +#include "protection/protection_events.h" +#include "protection/protection_net_events.h" +#include "protection/protection_anti_detection.h" +#include "protection/protection_join_blocking.h" +#include "protection/protection_presence_events.h" +#include "protection/protection_limits.h" +#include "protection/protection_entity_events.h" +#include "protection/protection_reactions.h" +#include "protection/entity/protection_entity_blocking.h" + +using namespace protection::vars; + +namespace protection::vars { + variables m_vars; + + void enable_all() { + protection::events::vars::m_vars.m_player_spawns.m_var = 1; + protection::events::vars::m_vars.m_player_model_update.m_var = 1; + protection::events::vars::m_vars.m_spectating.m_var = 1; + protection::events::vars::m_vars.m_desync_kicks.m_var = 1; + protection::events::vars::m_vars.m_host_kicks.m_var = 1; + protection::events::vars::m_vars.m_sh_kick.m_var = 3; + protection::events::vars::m_vars.m_sh_migration.m_var = 1; + protection::events::vars::m_vars.m_entity_owner_migration.m_var = 3; + protection::events::vars::m_vars.m_pickup_spawning.m_var = 1; + protection::events::vars::m_vars.m_pickup_processing.m_var = 3; + protection::events::vars::m_vars.m_crashing.m_var = 1; + protection::events::vars::m_vars.m_clone.m_var = 3; + protection::events::vars::m_vars.m_cages.m_var = 3; + protection::events::vars::m_vars.m_attachments.m_var = 3; + protection::events::vars::m_vars.m_rockstar_staff.m_var = 1; + protection::events::vars::m_vars.m_join_timeout.m_var = 1; + protection::events::vars::m_vars.m_ghost.m_var = 3; + protection::events::vars::m_vars.m_spoofed_messages.m_var = 1; + + protection::events::net::vars::m_vars.m_give_weapon.m_var = 3; + protection::events::net::vars::m_vars.m_remove_weapon.m_var = 3; + protection::events::net::vars::m_vars.m_remove_all_weapons.m_var = 3; + protection::events::net::vars::m_vars.m_freeze.m_var = 3; + protection::events::net::vars::m_vars.m_explosion.m_var = 3; + protection::events::net::vars::m_vars.m_fire.m_var = 3; + protection::events::net::vars::m_vars.m_particle_fx.m_var = 3; + protection::events::net::vars::m_vars.m_script_events.m_var = 3; + protection::events::net::vars::m_vars.m_increment_stat.m_var = 3; + protection::events::net::vars::m_vars.m_weather.m_var = 3; + protection::events::net::vars::m_vars.m_clock.m_var = 3; + protection::events::net::vars::m_vars.m_sound.m_var = 3; + protection::events::net::vars::m_vars.m_vehicle_control.m_var = 3; + protection::events::net::vars::m_vars.m_blame_explosion.m_var = 1; + + protection::joining::vars::m_vars.m_block = true; + protection::joining::vars::block_resolves(); + + protection::detection::vars::m_vars.m_godmode = true; + protection::detection::vars::m_vars.m_super_jump = true; + protection::detection::vars::m_vars.m_health = true; + protection::detection::vars::m_vars.m_armor = true; + protection::detection::vars::m_vars.m_spectate = true; + + protection::entity::vars::m_vars.m_block_modder_create = true; + protection::entity::vars::m_vars.m_block_modder_sync = true; + + protection::events::presence::vars::m_vars.m_text_message.m_var = 1; + protection::events::presence::vars::m_vars.m_crew_message.m_var = 1; + protection::events::presence::vars::m_vars.m_game_invite.m_var = 1; + protection::events::presence::vars::m_vars.m_game_server_awards.m_var = 1; + protection::events::presence::vars::m_vars.m_admin_invite.m_var = 1; + protection::events::presence::vars::m_vars.m_stat_update.m_var = 1; + + m_vars.m_force_visible = true; + m_vars.m_disable_bullets = true; + m_vars.m_disable_projectiles = true; + + // memset(protection::entity::blocking::vars::m_vars.m_toggled, 1, 14); + } +} + +void protection_menu::load() { + set_name("Protections"); + set_parent(); + + add_option(submenu_option("Generic Events") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Network Events") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Join Blocking") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Anti Detection") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Reactions") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Entity") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Presence Events") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Limits") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Fake Lag") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_fake_lag).add_savable(get_submenu_name_stack()) + .add_tooltip("Jitters your player for other players")); + + add_option(toggle_option("Force Creation Visibility") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_force_visible).add_savable(get_submenu_name_stack()) + .add_tooltip("Forces all entities being created to be visible")); + + add_option(toggle_option("Disable Bullets") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_bullets).add_savable(get_submenu_name_stack()) + .add_tooltip("Disables bullets from other entities")); + + add_option(toggle_option("Disable Projectiles") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_projectiles).add_savable(get_submenu_name_stack()) + .add_tooltip("Disables projectiles from other entities")); + + add_option(button_option("Enable All Protections") + .add_translate().add_hotkey() + .add_click(enable_all) + .add_tooltip("Sets all protections to max level of protection")); +} + +void protection_menu::update() {} + +void protection_menu::update_once() {} + +void protection_menu::feature_update() { + if (m_vars.m_fake_lag) { + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + rage::network::net_object* object = global::vars::g_ped_factory->m_local_ped->get_net_obj(); + if (object) { + memset(object->m_player_sync_intervals, 0, sizeof(object->m_player_sync_intervals)); + } + + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + object = global::vars::g_ped_factory->m_local_ped->m_vehicle->get_net_obj(); + if (object) { + memset(object->m_player_sync_intervals, 0, sizeof(object->m_player_sync_intervals)); + } + } + } + } + } +} + +protection_menu* g_instance; +protection_menu* protection_menu::get() { + if (g_instance == nullptr) { + g_instance = new protection_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/protections.h b/GTAV/src/menu/base/submenus/main/protections.h new file mode 100644 index 0000000..5b9a548 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/protections.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class protection_menu : public menu::submenu::submenu { +public: + static protection_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + protection_menu() + : menu::submenu::submenu() {} +}; + +namespace protection::vars { + struct variables { + bool m_fake_lag; + bool m_force_visible; + bool m_disable_bullets; + bool m_disable_projectiles; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings.cpp b/GTAV/src/menu/base/submenus/main/settings.cpp new file mode 100644 index 0000000..dda6a7f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings.cpp @@ -0,0 +1,105 @@ +#include "settings.h" +#include "menu/base/submenu_handler.h" +#include "../main.h" +#include "settings/settings_textures.h" +#include "settings/settings_fonts.h" +#include "settings/settings_hotkey.h" +#include "settings/settings_color.h" +#include "settings/translation.h" +#include "settings/position_scale.h" +#include "settings/themes.h" +#include "settings/themes/themes_selected.h" +#include "settings/hide_info.h" + +namespace settings::vars { + std::shared_ptr bitch; +} + +void settings_menu::load() { + set_name("Settings"); + set_parent(); + + add_option(submenu_option("Translations") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Themes") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Hotkeys") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Fonts") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Textures") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Position and Scale") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Colors") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Streamer Mode") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Open Tooltip") + .add_translate().add_hotkey() + .add_toggle(global::ui::g_render_tooltip).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Globe") + .add_translate().add_hotkey() + .add_toggle(global::ui::g_render_globe).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Title") + .add_translate().add_hotkey() + .add_toggle(global::ui::g_disable_title).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Smooth Scrolling") + .add_translate().add_hotkey() + .add_toggle(global::ui::g_scroll_lerp) + .add_number(global::ui::g_scroll_lerp_speed, "%.0f", 1.f).add_savable(get_submenu_name_stack())); + + add_option(button_option("Unload") + .add_translate().add_hotkey() + .add_click([] { global::vars::g_unloading_queue = true; })); + + settings::vars::bitch = add_option(button_option("Edit Open Key") + .add_translate().add_hotkey() + .add_click([this] { + menu::input::push([this] { + menu::base::set_open_key(menu::input::get_key(settings::vars::bitch.get()->get_name().get(), menu::base::get_open_key())); + util::config::write_int(get_submenu_name_stack(), "Open key", menu::base::get_open_key()); + }); + }) + .add_update([] (button_option* option) { option->add_side_text(menu::input::g_key_names[menu::base::get_open_key()]); })); + + themes_selected_menu::get(); + + menu::base::set_open_key(util::config::read_int(get_submenu_name_stack(), "Open key", menu::base::get_open_key())); +} + +void settings_menu::update() {} + +void settings_menu::update_once() {} + +void settings_menu::feature_update() {} + +settings_menu* g_instance; +settings_menu* settings_menu::get() { + if (g_instance == nullptr) { + g_instance = new settings_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings.h b/GTAV/src/menu/base/submenus/main/settings.h new file mode 100644 index 0000000..0022131 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings.h @@ -0,0 +1,15 @@ +#pragma once +#include "menu/base/submenu.h" + +class settings_menu : public menu::submenu::submenu { +public: + static settings_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + settings_menu() + : menu::submenu::submenu() {} +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/color/color_sync.cpp b/GTAV/src/menu/base/submenus/main/settings/color/color_sync.cpp new file mode 100644 index 0000000..539a431 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/color/color_sync.cpp @@ -0,0 +1,44 @@ +#include "color_sync.h" +#include "menu/base/submenu_handler.h" +#include "../settings_color.h" +#include "../../helper/helper_color.h" + +using namespace settings::color::sync::vars; + +namespace settings::color::sync::vars { + variables m_vars; +} + +void color_selected_sync_menu::load() { + set_name("Sync With..."); + set_parent(); +} + +void color_selected_sync_menu::update() {} + +void color_selected_sync_menu::update_once() { + clear_options(0); + + for (int i = 0; i < NUMOF(settings::color::vars::colors); i++) { + add_option(button_option(settings::color::vars::colors[i].m_name.get()) + .add_click([=] { + *m_vars.m_color = *settings::color::vars::colors[i].m_result; + helper::color::vars::m_vars.m_callback(); + menu::submenu::handler::set_submenu_previous(false); + }) + .add_hover([=] { menu::renderer::render_color_preview(*settings::color::vars::colors[i].m_result); })); + } +} + +void color_selected_sync_menu::feature_update() {} + +color_selected_sync_menu* g_instance; +color_selected_sync_menu* color_selected_sync_menu::get() { + if (g_instance == nullptr) { + g_instance = new color_selected_sync_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/color/color_sync.h b/GTAV/src/menu/base/submenus/main/settings/color/color_sync.h new file mode 100644 index 0000000..9d1d48b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/color/color_sync.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class color_selected_sync_menu : public menu::submenu::submenu { +public: + static color_selected_sync_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + color_selected_sync_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::color::sync::vars { + struct variables { + color_rgba* m_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/hide_info.cpp b/GTAV/src/menu/base/submenus/main/settings/hide_info.cpp new file mode 100644 index 0000000..b2c0a00 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/hide_info.cpp @@ -0,0 +1,77 @@ +#include "hide_info.h" +#include "menu/base/submenu_handler.h" +#include "../settings.h" + +using namespace settings::hide::vars; + +namespace settings::hide::vars { + variables m_vars; + + void hide_names() { + menu::player::for_each([=] (menu::player::player_context& player) { + if (player.m_id != menu::player::get_local_player().m_id) { + if (player.m_net_player) { + if (player.m_net_player->m_player_info) { + m_vars.m_cached[player.m_net_player->m_player_info->m_identifier.m_rockstar_id] = player.m_net_player->m_player_info->m_name; + strcpy(player.m_net_player->m_player_info->m_name, util::va::va("Player_%i", player.m_net_player->m_id)); + } + } + } + }, true); + } + + void restore_names() { + menu::player::for_each([=] (menu::player::player_context& player) { + if (player.m_id != menu::player::get_local_player().m_id) { + if (player.m_net_player) { + if (player.m_net_player->m_player_info) { + strcpy(player.m_net_player->m_player_info->m_name, m_vars.m_cached[player.m_net_player->m_player_info->m_identifier.m_rockstar_id].c_str()); + } + } + } + }, true); + + m_vars.m_cached.clear(); + } +} + +void hide_info_menu::load() { + set_name("Streamer Mode"); + set_parent(); + + add_option(toggle_option("Hide Player IPs") + .add_translate() + .add_toggle(m_vars.m_hide_ips)); + + add_option(toggle_option("Hide Player Rockstar IDs") + .add_translate() + .add_toggle(m_vars.m_hide_rockstar_ids)); + + add_option(toggle_option("Hide Player Names") + .add_translate() + .add_toggle(m_vars.m_hide_names) + .add_click([] { + if (m_vars.m_hide_names) { + hide_names(); + } else { + restore_names(); + } + })); +} + +void hide_info_menu::update() {} + +void hide_info_menu::update_once() {} + +void hide_info_menu::feature_update() {} + +hide_info_menu* g_instance; +hide_info_menu* hide_info_menu::get() { + if (g_instance == nullptr) { + g_instance = new hide_info_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/hide_info.h b/GTAV/src/menu/base/submenus/main/settings/hide_info.h new file mode 100644 index 0000000..95db062 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/hide_info.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class hide_info_menu : public menu::submenu::submenu { +public: + static hide_info_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + hide_info_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::hide::vars { + struct variables { + bool m_hide_names; + bool m_hide_ips; + bool m_hide_rockstar_ids; + + std::unordered_map m_cached; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/hk/hotkey_selected.cpp b/GTAV/src/menu/base/submenus/main/settings/hk/hotkey_selected.cpp new file mode 100644 index 0000000..68b338b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/hk/hotkey_selected.cpp @@ -0,0 +1,61 @@ +#include "hotkey_selected.h" +#include "menu/base/submenu_handler.h" +#include "../settings_hotkey.h" +#include "menu/base/util/menu_input.h" +#include "menu/base/util/hotkeys.h" + +using namespace settings::hotkey::vars; + +namespace settings::hotkey::vars { + variables m_vars; + + scroll_struct types[] = { + { localization("Release", true), 0 }, + { localization("Press", true), 0 }, + { localization("Hold", true), 0 } + }; +} + +void hotkey_selected_menu::load() { + set_name("Hotkey"); + set_parent(); + + add_string("Rebind"); + add_string("Delete"); +} + +void hotkey_selected_menu::update() {} + +void hotkey_selected_menu::update_once() { + clear_options(0); + + add_option(button_option(get_string("Rebind")) + .add_click([=] { + menu::input::push([] { + menu::input::hotkey(((menu::hotkey::hotkey_context*)m_vars.m_hotkey)->m_parent->get_name().get(), ((menu::hotkey::hotkey_context*)m_vars.m_hotkey)->m_parent); + }); + })); + + add_option(button_option(get_string("Delete")) + .add_click([] { + menu::hotkey::unregister_hotkey(((menu::hotkey::hotkey_context*)m_vars.m_hotkey)->m_parent); + menu::submenu::handler::set_submenu_previous(true); + })); + + add_option(scroll_option(SCROLL, "Event") + .add_scroll(m_vars.m_event, 0, NUMOF(types), types) + .add_click([=] { menu::hotkey::change_type(m_vars.m_event, ((menu::hotkey::hotkey_context*)m_vars.m_hotkey)->m_parent); })); +} + +void hotkey_selected_menu::feature_update() {} + +hotkey_selected_menu* g_instance; +hotkey_selected_menu* hotkey_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new hotkey_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/hk/hotkey_selected.h b/GTAV/src/menu/base/submenus/main/settings/hk/hotkey_selected.h new file mode 100644 index 0000000..9830cc6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/hk/hotkey_selected.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class hotkey_selected_menu : public menu::submenu::submenu { +public: + static hotkey_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + hotkey_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::hotkey::vars { + struct variables { + void* m_hotkey; + int m_event = 0; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/pos/position_scale_selected.cpp b/GTAV/src/menu/base/submenus/main/settings/pos/position_scale_selected.cpp new file mode 100644 index 0000000..3035769 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/pos/position_scale_selected.cpp @@ -0,0 +1,41 @@ +#include "position_scale_selected.h" +#include "menu/base/submenu_handler.h" +#include "../position_scale.h" + +using namespace settings::pos::selected::vars; + +namespace settings::pos::selected::vars { + variables m_vars; +} + +void position_scale_selected_menu::load() { + set_name("Position and Scale", false, false); + set_parent(); + + add_option(number_option(SCROLL, "X (Horizontal)") + .add_translate() + .add_number(m_vars.m_selected->x, "%.3f", 0.001f).set_scroll_speed(5) + .add_update([](number_option* option, int position) { option->add_number(m_vars.m_selected->x, "%.3f", 0.001f); })); + + add_option(number_option(SCROLL, "Y (Vertical)") + .add_translate() + .add_number(m_vars.m_selected->y, "%.3f", 0.001f).set_scroll_speed(5) + .add_update([](number_option* option, int position) { option->add_number(m_vars.m_selected->y, "%.3f", 0.001f); })); +} + +void position_scale_selected_menu::update() {} + +void position_scale_selected_menu::update_once() {} + +void position_scale_selected_menu::feature_update() {} + +position_scale_selected_menu* g_instance; +position_scale_selected_menu* position_scale_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new position_scale_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/pos/position_scale_selected.h b/GTAV/src/menu/base/submenus/main/settings/pos/position_scale_selected.h new file mode 100644 index 0000000..cfb8d23 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/pos/position_scale_selected.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class position_scale_selected_menu : public menu::submenu::submenu { +public: + static position_scale_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + position_scale_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::pos::selected::vars { + struct variables { + math::vector2* m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/position_scale.cpp b/GTAV/src/menu/base/submenus/main/settings/position_scale.cpp new file mode 100644 index 0000000..31ab2e0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/position_scale.cpp @@ -0,0 +1,56 @@ +#include "position_scale.h" +#include "menu/base/submenu_handler.h" +#include "../settings.h" +#include "pos/position_scale_selected.h" + +using namespace settings::pos::vars; + +namespace settings::pos::vars { + scroll_struct*> scales[] = { + { localization("Menu Position", true), &global::ui::g_position }, + { localization("Menu Scale", true), &global::ui::g_scale }, + { localization("Submenu Arrow Position", true), &global::ui::g_submenu_arrow_position }, + { localization("Submenu Scale", true), &global::ui::g_submenu_arrow_scale }, + { localization("Toggle Position", true), &global::ui::g_toggle_position }, + { localization("Toggle Scale", true), &global::ui::g_toggle_scale }, + { localization("Globe Position", true), &global::ui::g_globe_position }, + { localization("Globe Scale", true), &global::ui::g_globe_scale }, + { localization("Stacked Display Scale", true), &global::ui::g_stacked_display_scale }, + { localization("Stacked Display Position", true), &global::ui::g_stacked_display_position }, + }; +} + +void position_scale_menu::load() { + set_name("Position and Scale"); + set_parent(); + + settings::pos::selected::vars::m_vars.m_selected = &global::ui::g_position; // init + position_scale_selected_menu::get(); +} + +void position_scale_menu::update() {} + +void position_scale_menu::update_once() { + clear_options(0); + + for (scroll_struct*> scale : scales) { + add_option(submenu_option(scale.m_name.get()) + .add_submenu() + .add_click([=] { + settings::pos::selected::vars::m_vars.m_selected = scale.m_result; + })); + } +} + +void position_scale_menu::feature_update() {} + +position_scale_menu* g_instance; +position_scale_menu* position_scale_menu::get() { + if (g_instance == nullptr) { + g_instance = new position_scale_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/position_scale.h b/GTAV/src/menu/base/submenus/main/settings/position_scale.h new file mode 100644 index 0000000..020ca22 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/position_scale.h @@ -0,0 +1,19 @@ +#pragma once +#include "menu/base/submenu.h" + +class position_scale_menu : public menu::submenu::submenu { +public: + static position_scale_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + position_scale_menu() + : position_scale_menu::submenu::submenu() {} +}; + +namespace settings::pos::vars { + extern scroll_struct*> scales[10]; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_color.cpp b/GTAV/src/menu/base/submenus/main/settings/settings_color.cpp new file mode 100644 index 0000000..e9b5981 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_color.cpp @@ -0,0 +1,75 @@ +#include "settings_color.h" +#include "menu/base/submenu_handler.h" +#include "../settings.h" +#include "../helper/helper_color.h" + +namespace settings::color::vars { + scroll_struct colors[] = { + { localization("Header", true), &global::ui::g_main_header }, + { localization("Header Text", true), &global::ui::g_title }, + { localization("Background", true), &global::ui::g_background }, + { localization("Scroller", true), &global::ui::g_scroller }, + { localization("Footer", true), &global::ui::g_footer }, + { localization("Footer Text", true), &global::ui::g_sub_header_text }, + { localization("Open Tooltip", true), &global::ui::g_open_tooltip }, + { localization("Tooltip Background", true), &global::ui::g_tooltip }, + { localization("Option", true), &global::ui::g_option }, + { localization("Option Selected", true), &global::ui::g_option_selected }, + { localization("Toggle On", true), &global::ui::g_toggle_on }, + { localization("Toggle Off", true), &global::ui::g_toggle_off }, + { localization("Breaker", true), &global::ui::g_break }, + { localization("Notify Success", true), &global::ui::g_success }, + { localization("Notify Error", true), &global::ui::g_error }, + { localization("Notify Bar", true), &global::ui::g_notify_bar }, + { localization("Notify Background", true), &global::ui::g_notify_background }, + { localization("Submenu Arrow", true), &global::ui::g_submenu_bar }, + { localization("Clear Area Range", true), &global::ui::g_clear_area_range }, + { localization("Hotkey Bar", true), &global::ui::g_hotkey_bar }, + { localization("Hotkey Background", true), &global::ui::g_hotkey_background }, + { localization("Hotkey Input", true), &global::ui::g_hotkey_input }, + { localization("Panel Bar", true), &global::ui::g_panel_bar }, + { localization("Panel Background", true), &global::ui::g_panel_background }, + { localization("Stacked Display Bar", true), &global::ui::g_stacked_display_bar }, + { localization("Stacked Display Background", true), &global::ui::g_stacked_display_background }, + { localization("Instructional Background", true), &global::ui::g_instructional_background }, + { localization("Globe", true), &global::ui::g_globe }, + { localization("Color Grid Bar", true), &global::ui::g_color_grid_bar }, + { localization("Color Grid Background", true), &global::ui::g_color_grid_background }, + }; +} + +void color_menu::load() { + set_name("Colors"); + set_parent(); +} + +void color_menu::update() {} + +void color_menu::update_once() { + clear_options(0); + + for (int i = 0; i < NUMOF(settings::color::vars::colors); i++) { + add_option(submenu_option(settings::color::vars::colors[i].m_name.get()) + .add_submenu() + .add_click([=] { + helper_color_menu::get()->set_name(settings::color::vars::colors[i].m_name.get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = settings::color::vars::colors[i].m_result; + helper::color::vars::m_vars.m_callback = [] {}; + }) + .add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, settings::color::vars::colors[i].m_result)); + } +} + +void color_menu::feature_update() {} + +color_menu* g_instance; +color_menu* color_menu::get() { + if (g_instance == nullptr) { + g_instance = new color_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_color.h b/GTAV/src/menu/base/submenus/main/settings/settings_color.h new file mode 100644 index 0000000..a48f9e5 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_color.h @@ -0,0 +1,19 @@ +#pragma once +#include "menu/base/submenu.h" + +class color_menu : public menu::submenu::submenu { +public: + static color_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + color_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::color::vars { + extern scroll_struct colors[30]; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_fonts.cpp b/GTAV/src/menu/base/submenus/main/settings/settings_fonts.cpp new file mode 100644 index 0000000..32ab8d1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_fonts.cpp @@ -0,0 +1,243 @@ +#include "settings_fonts.h" +#include "menu/base/submenu_handler.h" +#include "../settings.h" +#include "menu/base/util/fonts.h" +#include "menu/base/util/notify.h" + +using namespace settings::font::vars; + +namespace settings::font::vars { + variables m_vars; + + scroll_struct fonts[] = { + { localization("Chalet London", true), 0, }, + { localization("House", true), 1, }, + { localization("Mono Space", true), 2, }, + { localization("Chalet Comprime", true), 4, }, + { localization("Pricedown", true), 7 } + }; +} + +void fonts_menu::load() { + set_name("Fonts"); + set_parent(); + + menu::fonts::update(); + + add_option(scroll_option(SCROLL, "Header") + .add_translate() + .add_scroll(m_vars.m_header.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_header.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts); + }) + .add_click([] { + if (m_vars.m_header.m_var > 4) { + m_vars.m_header.m_selected = fonts[m_vars.m_header.m_var].m_name.get_original(); + } else { + m_vars.m_header.m_selected.clear(); + } + + global::ui::g_header_font = fonts[m_vars.m_header.m_var].m_result; + })); + + add_option(scroll_option(SCROLL, "Footer") + .add_translate() + .add_scroll(m_vars.m_sub_header.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_sub_header.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts); + }) + .add_click([] { + if (m_vars.m_sub_header.m_var > 4) { + m_vars.m_sub_header.m_selected = fonts[m_vars.m_sub_header.m_var].m_name.get_original(); + } else { + m_vars.m_sub_header.m_selected.clear(); + } + + global::ui::g_sub_header_font = fonts[m_vars.m_sub_header.m_var].m_result; + })); + + add_option(scroll_option(SCROLL, "Option") + .add_translate() + .add_scroll(m_vars.m_option.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_option.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts); + }) + .add_click([] { + if (m_vars.m_option.m_var > 4) { + m_vars.m_option.m_selected = fonts[m_vars.m_option.m_var].m_name.get_original(); + } else { + m_vars.m_option.m_selected.clear(); + } + + global::ui::g_option_font = fonts[m_vars.m_option.m_var].m_result; + })); + + add_option(scroll_option(SCROLL, "Open Tooltip") + .add_translate() + .add_scroll(m_vars.m_open_tooltip.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_open_tooltip.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts); + }) + .add_click([] { + if (m_vars.m_open_tooltip.m_var > 4) { + m_vars.m_open_tooltip.m_selected = fonts[m_vars.m_open_tooltip.m_var].m_name.get_original(); + } else { + m_vars.m_open_tooltip.m_selected.clear(); + } + + global::ui::g_open_tooltip_font = fonts[m_vars.m_open_tooltip.m_var].m_result; + })); + + add_option(scroll_option(SCROLL, "Tooltip") + .add_translate() + .add_scroll(m_vars.m_tooltip.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_tooltip.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts); + }) + .add_click([] { + if (m_vars.m_tooltip.m_var > 4) { + m_vars.m_tooltip.m_selected = fonts[m_vars.m_tooltip.m_var].m_name.get_original(); + } else { + m_vars.m_tooltip.m_selected.clear(); + } + + global::ui::g_tooltip_font = fonts[m_vars.m_tooltip.m_var].m_result; + })); + + add_option(scroll_option(SCROLL, "Stacked Display") + .add_translate() + .add_scroll(m_vars.m_stacked_display.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_stacked_display.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts); + }) + .add_click([] { + if (m_vars.m_stacked_display.m_var > 4) { + m_vars.m_stacked_display.m_selected = fonts[m_vars.m_stacked_display.m_var].m_name.get_original(); + } else { + m_vars.m_stacked_display.m_selected.clear(); + } + + global::ui::g_stacked_display_font = fonts[m_vars.m_stacked_display.m_var].m_result; + })); + + add_option(scroll_option(SCROLL, "Notify Title") + .add_translate() + .add_scroll(m_vars.m_notify_title.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_notify_title.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts); + }) + .add_click([] { + if (m_vars.m_notify_title.m_var > 4) { + m_vars.m_notify_title.m_selected = fonts[m_vars.m_notify_title.m_var].m_name.get_original(); + } else { + m_vars.m_notify_title.m_selected.clear(); + } + + global::ui::g_notify_title_font = fonts[m_vars.m_notify_title.m_var].m_result; + })); + + add_option(scroll_option(SCROLL, "Notify Body") + .add_translate() + .add_scroll(m_vars.m_notify_body.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_notify_body.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts); + }) + .add_click([] { + if (m_vars.m_notify_body.m_var > 4) { + m_vars.m_notify_body.m_selected = fonts[m_vars.m_notify_body.m_var].m_name.get_original(); + } else { + m_vars.m_notify_body.m_selected.clear(); + } + + global::ui::g_notify_body_font = fonts[m_vars.m_notify_body.m_var].m_result; + })); + + add_option(scroll_option(SCROLL, "Panel") + .add_translate() + .add_scroll(m_vars.m_panel.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts) + .add_update([](scroll_option* option, int position) { + option->add_scroll(m_vars.m_panel.m_var, 0, (int)menu::fonts::get_list().size() + 5, fonts); + }) + .add_click([] { + if (m_vars.m_panel.m_var > 4) { + m_vars.m_panel.m_selected = fonts[m_vars.m_panel.m_var].m_name.get_original(); + } else { + m_vars.m_panel.m_selected.clear(); + } + + global::ui::g_panel_font = fonts[m_vars.m_panel.m_var].m_result; + })); + + add_string("Fonts"); + add_string("Convert fonts with the Ozark Launcher, or download our favourite fonts in the Resources on the Launcher"); + + for (std::size_t i = 5; i < 200; i++) { + fonts[i].m_result = -1; + } + + menu::fonts::update(); + + for (std::size_t i = 0; i < menu::fonts::get_list().size(); i++) { + if (i == 200) break; + fonts[i + 5].m_name = menu::fonts::get_list()[i].m_font_name; + fonts[i + 5].m_result = menu::fonts::get_list()[i].m_font_id; + } + + for (int i = 0; i < NUMOF(fonts); i++) { + scroll_struct font = fonts[i]; + + if (global::ui::g_header_font == font.m_result) m_vars.m_header.m_var = i; + if (global::ui::g_sub_header_font == font.m_result) m_vars.m_sub_header.m_var = i; + if (global::ui::g_option_font == font.m_result) m_vars.m_option.m_var = i; + if (global::ui::g_open_tooltip_font == font.m_result) m_vars.m_open_tooltip.m_var = i; + if (global::ui::g_stacked_display_font == font.m_result) m_vars.m_stacked_display.m_var = i; + if (global::ui::g_notify_title_font == font.m_result) m_vars.m_notify_title.m_var = i; + if (global::ui::g_notify_body_font == font.m_result) m_vars.m_notify_body.m_var = i; + if (global::ui::g_panel_font == font.m_result) m_vars.m_panel.m_var = i; + if (global::ui::g_tooltip_font == font.m_result) m_vars.m_tooltip.m_var = i; + } +} + +void fonts_menu::update() {} + +void fonts_menu::update_once() { + menu::fonts::update(); + // menu::notify::stacked(get_string("Fonts"), get_string("Convert fonts with the Ozark Launcher, or download our favourite fonts in the Resources on the Launcher")); + + for (std::size_t i = 5; i < 200; i++) { + fonts[i].m_result = -1; + } + + for (std::size_t i = 0; i < menu::fonts::get_list().size(); i++) { + if (i == 200) break; + fonts[i + 5].m_name = menu::fonts::get_list()[i].m_font_name; + fonts[i + 5].m_result = menu::fonts::get_list()[i].m_font_id; + } + + for (int i = 0; i < NUMOF(fonts); i++) { + scroll_struct font = fonts[i]; + + if (global::ui::g_header_font == font.m_result) m_vars.m_header.m_var = i; + if (global::ui::g_sub_header_font == font.m_result) m_vars.m_sub_header.m_var = i; + if (global::ui::g_option_font == font.m_result) m_vars.m_option.m_var = i; + if (global::ui::g_open_tooltip_font == font.m_result) m_vars.m_open_tooltip.m_var = i; + if (global::ui::g_stacked_display_font == font.m_result) m_vars.m_stacked_display.m_var = i; + if (global::ui::g_notify_title_font == font.m_result) m_vars.m_notify_title.m_var = i; + if (global::ui::g_notify_body_font == font.m_result) m_vars.m_notify_body.m_var = i; + if (global::ui::g_panel_font == font.m_result) m_vars.m_panel.m_var = i; + if (global::ui::g_tooltip_font == font.m_result) m_vars.m_tooltip.m_var = i; + } +} + +void fonts_menu::feature_update() {} + +fonts_menu* g_instance; +fonts_menu* fonts_menu::get() { + if (g_instance == nullptr) { + g_instance = new fonts_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_fonts.h b/GTAV/src/menu/base/submenus/main/settings/settings_fonts.h new file mode 100644 index 0000000..c6c93c1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_fonts.h @@ -0,0 +1,37 @@ +#pragma once +#include "menu/base/submenu.h" + +class fonts_menu : public menu::submenu::submenu { +public: + static fonts_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fonts_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::font::vars { + struct font_edit { + int m_var; + std::string m_selected; + }; + + struct variables { + font_edit m_header; + font_edit m_sub_header; + font_edit m_option; + font_edit m_open_tooltip; + font_edit m_tooltip; + font_edit m_stacked_display; + font_edit m_notify_title; + font_edit m_notify_body; + font_edit m_panel; + }; + + extern scroll_struct fonts[200]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_hotkey.cpp b/GTAV/src/menu/base/submenus/main/settings/settings_hotkey.cpp new file mode 100644 index 0000000..e8c9c26 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_hotkey.cpp @@ -0,0 +1,45 @@ +#include "settings_hotkey.h" +#include "menu/base/submenu_handler.h" +#include "../settings.h" +#include "menu/base/util/hotkeys.h" +#include "hk/hotkey_selected.h" + +void hotkey_menu::load() { + set_name("Hotkeys"); + set_parent(); + + hotkey_selected_menu::get(); + add_string("~m~None"); +} + +void hotkey_menu::update() {} + +void hotkey_menu::update_once() { + clear_options(0); + + if (menu::hotkey::get_hotkeys().size()) { + for (menu::hotkey::hotkey_context& hotkey : menu::hotkey::get_hotkeys()) { + add_option(submenu_option(util::va::va("[%s] %s", menu::input::g_key_names[hotkey.m_key], hotkey.m_parent->get_name().get().c_str())) + .add_submenu() + .add_click([=] { + settings::hotkey::vars::m_vars.m_hotkey = (void*)&hotkey; + settings::hotkey::vars::m_vars.m_event = hotkey.m_type; + })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void hotkey_menu::feature_update() {} + +hotkey_menu* g_instance; +hotkey_menu* hotkey_menu::get() { + if (g_instance == nullptr) { + g_instance = new hotkey_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_hotkey.h b/GTAV/src/menu/base/submenus/main/settings/settings_hotkey.h new file mode 100644 index 0000000..70361b1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_hotkey.h @@ -0,0 +1,15 @@ +#pragma once +#include "menu/base/submenu.h" + +class hotkey_menu : public menu::submenu::submenu { +public: + static hotkey_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + hotkey_menu() + : menu::submenu::submenu() {} +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_texture.cpp b/GTAV/src/menu/base/submenus/main/settings/settings_texture.cpp new file mode 100644 index 0000000..f604e87 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_texture.cpp @@ -0,0 +1,93 @@ +#include "settings_texture.h" +#include "menu/base/submenu_handler.h" +#include "settings_textures.h" +#include "util/dirs.h" +#include "menu/base/util/textures.h" + +using namespace settings::texture::vars; + +namespace settings::texture::vars { + variables m_vars; +} + +void texture_menu::load() { + set_name("Header"); + set_parent(); + + m_vars.m_toggle_button = add_option(toggle_option("Toggle Texture") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_texture->m_enabled) + .add_update([](toggle_option* option, int position) { + option->add_toggle(m_vars.m_texture->m_enabled); + }) + .add_click([this] { + if (m_vars.m_texture->m_enabled) { + menu::notify::stacked(get_string("Textures"), get_string("You might need to change the color of this texture to see it, generally this means setting it to white")); + } + })); + + add_option(break_option("Textures") + .add_translate()); + + add_string("~m~None"); + add_string("For your resolution, optimal size for this menu texture is"); + add_string("Please note: this texutre resizes on the"); + add_string("axis, keep this in mind to avoid stretching."); + add_string("pixels"); + add_string("Textures"); + add_string("You might need to change the color of this texture to see it, generally this means setting it to white"); +} + +void texture_menu::update() {} + +void texture_menu::update_once() { + menu::textures::update(); + set_name(m_vars.m_texture->m_submenu_name.get()); + + if (m_vars.m_pixel_info.m_pixel_size.x) { + int pixel_x = (int)((float)global::vars::g_resolution.x * m_vars.m_pixel_info.m_pixel_size.x); + int pixel_y = (int)((float)global::vars::g_resolution.y * m_vars.m_pixel_info.m_pixel_size.y); + m_vars.m_toggle_button->set_tooltip(util::va::va("%s %ix%i %s. %s", + get_string("For your resolution, optimal size for this menu texture is").c_str(), + pixel_x, pixel_y, + get_string("pixels").c_str(), + m_vars.m_pixel_info.m_can_resize ? (get_string("Please note: this texutre resizes on the") + " " + m_vars.m_pixel_info.m_resize_type + " " + get_string("axis, keep this in mind to avoid stretching.")).c_str() : "")); + } else m_vars.m_toggle_button->set_tooltip(""); + + int previously_selected = m_vars.m_texture->m_context.m_selected; + m_vars.m_texture->m_context.m_selected = 0; + m_vars.m_texture->m_context.reset(); + + clear_options(2); + + std::vector> temp; + + for (menu::textures::texture_context texture : menu::textures::get_list()) { + if (!strstr(texture.m_name.c_str(), "playerimg_")) { + temp.push_back(add_option(radio_option(texture.m_name) + .add_radio(m_vars.m_texture->m_context) + .add_click([] { m_vars.m_texture->m_texture = menu::textures::get_list()[m_vars.m_texture->m_context.m_selected].m_name; }))); + } + } + + if (previously_selected != 0) { + if (previously_selected < temp.size()) { + temp[previously_selected]->update_selected(); + } + } else { + m_vars.m_texture->m_texture = "sa7anisafaggot"; + } +} + +void texture_menu::feature_update() {} + +texture_menu* g_instance; +texture_menu* texture_menu::get() { + if (g_instance == nullptr) { + g_instance = new texture_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_texture.h b/GTAV/src/menu/base/submenus/main/settings/settings_texture.h new file mode 100644 index 0000000..c77b96f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_texture.h @@ -0,0 +1,32 @@ +#pragma once +#include "menu/base/submenu.h" + +class texture_menu : public menu::submenu::submenu { +public: + static texture_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + texture_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::texture::vars { + struct pixel_info { + math::vector2 m_pixel_size; + bool m_can_resize = false; + std::string m_resize_type = ""; + }; + + struct variables { + std::shared_ptr m_toggle_button; + menu_texture* m_texture; + + pixel_info m_pixel_info; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_textures.cpp b/GTAV/src/menu/base/submenus/main/settings/settings_textures.cpp new file mode 100644 index 0000000..955e9cf --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_textures.cpp @@ -0,0 +1,152 @@ +#include "settings_textures.h" +#include "menu/base/submenu_handler.h" +#include "../settings.h" +#include "settings_texture.h" + +using namespace settings::textures::vars; + +namespace settings::textures::vars { + variables m_vars; +} + +void textures_menu::load() { + set_name("Textures"); + set_parent(); + + settings::texture::vars::m_vars.m_texture = &global::ui::m_header; + + m_vars.m_header_option = add_option(submenu_option("Header") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_header; + settings::texture::vars::m_vars.m_pixel_info = { { global::ui::g_scale.x, 0.09f } }; + })); + + m_vars.m_background_option = add_option(submenu_option("Background") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_background; + settings::texture::vars::m_vars.m_pixel_info = { { global::ui::g_scale.x, global::ui::g_option_scale * menu::base::get_max_options() }, true, "Y" }; + })); + + m_vars.m_scroller_option = add_option(submenu_option("Scroller") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_scroller; + settings::texture::vars::m_vars.m_pixel_info = { { global::ui::g_scale.x, global::ui::g_option_scale } }; + })); + + m_vars.m_footer_option = add_option(submenu_option("Footer") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_footer; + settings::texture::vars::m_vars.m_pixel_info = { { global::ui::g_scale.x, global::ui::g_option_scale } }; + })); + + m_vars.m_tooltip_background_option = add_option(submenu_option("Tooltip Background") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_tooltip_background; + settings::texture::vars::m_vars.m_pixel_info = { { global::ui::g_scale.x, global::ui::g_option_scale * menu::base::get_max_options() }, true, "Y" }; + })); + + m_vars.m_stacked_display_background_option = add_option(submenu_option("Stacked Display Background") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_stacked_display_background; + settings::texture::vars::m_vars.m_pixel_info = { { 0.15f, 0.0815f }, true, "Y" }; + })); + + m_vars.m_stacked_display_bar_option = add_option(submenu_option("Stacked Display Bar") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_stacked_display_bar; + settings::texture::vars::m_vars.m_pixel_info = { { 0.15f, 0.0039375f } }; + })); + + m_vars.m_panel_background_option = add_option(submenu_option("Panel Background") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_panel_background; + settings::texture::vars::m_vars.m_pixel_info.m_pixel_size.x = 0.f; + })); + + m_vars.m_panel_bar_option = add_option(submenu_option("Panel Bar") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_panel_bar; + settings::texture::vars::m_vars.m_pixel_info = { { 0.f, 0.0039375f } }; + })); + + m_vars.m_notify_background_option = add_option(submenu_option("Notify Background") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_notify_background; + settings::texture::vars::m_vars.m_pixel_info = { { 0.15f, 0.042f }, true, "X/Y" }; + })); + + m_vars.m_notify_bar_option = add_option(submenu_option("Notify Bar") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_notify_bar; + settings::texture::vars::m_vars.m_pixel_info = { { 0.002f, 0.042f }, true, "Y" }; + })); + + m_vars.m_vehicle_stats_background_option = add_option(submenu_option("Vehicle Stats Background") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_vehicle_stats_background; + settings::texture::vars::m_vars.m_pixel_info = { { global::ui::g_scale.x, 0.15f } }; + })); + + m_vars.m_vehicle_stats_bar_option = add_option(submenu_option("Vehicle Stats Bar") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + settings::texture::vars::m_vars.m_texture = &global::ui::m_vehicle_stats_bar; + settings::texture::vars::m_vars.m_pixel_info = { { 0.09140625f, 0.00833328f }, true, "X" }; + })); + + global::ui::m_header.m_submenu_name = m_vars.m_header_option->get_name(); + global::ui::m_notify_bar.m_submenu_name = m_vars.m_notify_bar_option->get_name(); + global::ui::m_notify_background.m_submenu_name = m_vars.m_notify_background_option->get_name(); + global::ui::m_panel_bar.m_submenu_name = m_vars.m_panel_bar_option->get_name(); + global::ui::m_panel_background.m_submenu_name = m_vars.m_panel_background_option->get_name(); + global::ui::m_stacked_display_bar.m_submenu_name = m_vars.m_stacked_display_bar_option->get_name(); + global::ui::m_stacked_display_background.m_submenu_name = m_vars.m_stacked_display_background_option->get_name(); + global::ui::m_tooltip_background.m_submenu_name = m_vars.m_tooltip_background_option->get_name(); + global::ui::m_footer.m_submenu_name = m_vars.m_footer_option->get_name(); + global::ui::m_scroller.m_submenu_name = m_vars.m_scroller_option->get_name(); + global::ui::m_background.m_submenu_name = m_vars.m_background_option->get_name(); + global::ui::m_vehicle_stats_background.m_submenu_name = m_vars.m_vehicle_stats_background_option->get_name(); + global::ui::m_vehicle_stats_bar.m_submenu_name = m_vars.m_vehicle_stats_bar_option->get_name(); +} + +void textures_menu::update() {} + +void textures_menu::update_once() {} + +void textures_menu::feature_update() {} + +textures_menu* g_instance; +textures_menu* textures_menu::get() { + if (g_instance == nullptr) { + g_instance = new textures_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/settings_textures.h b/GTAV/src/menu/base/submenus/main/settings/settings_textures.h new file mode 100644 index 0000000..4e28855 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/settings_textures.h @@ -0,0 +1,36 @@ +#pragma once +#include "menu/base/submenu.h" + +class textures_menu : public menu::submenu::submenu { +public: + static textures_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + textures_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::textures::vars { + struct variables { + std::shared_ptr m_header_option; + std::shared_ptr m_sub_header_option; + std::shared_ptr m_background_option; + std::shared_ptr m_scroller_option; + std::shared_ptr m_footer_option; + std::shared_ptr m_tooltip_background_option; + std::shared_ptr m_stacked_display_background_option; + std::shared_ptr m_stacked_display_bar_option; + std::shared_ptr m_panel_background_option; + std::shared_ptr m_panel_bar_option; + std::shared_ptr m_notify_background_option; + std::shared_ptr m_notify_bar_option; + std::shared_ptr m_vehicle_stats_background_option; + std::shared_ptr m_vehicle_stats_bar_option; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/themes.cpp b/GTAV/src/menu/base/submenus/main/settings/themes.cpp new file mode 100644 index 0000000..7e47c1d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/themes.cpp @@ -0,0 +1,262 @@ +#include "themes.h" +#include "menu/base/submenu_handler.h" +#include "../settings.h" +#include "util/dirs.h" +#include "themes/themes_selected.h" +#include "settings_textures.h" +#include "util/log.h" +#include "settings_color.h" +#include "settings_fonts.h" +#include "position_scale.h" +#include "menu/base/util/fonts.h" +#include +#include + +using namespace settings::theme::vars; + +namespace settings::theme::vars { + variables m_vars; + + std::initializer_list create_color(color_rgba color) { + return { color.r, color.g, color.b, color.a }; + } + + void create_font(nlohmann::json& json, const char* name, int var) { + int array_id = -1; + for (int i = 0; i < NUMOF(settings::font::vars::fonts); i++) { + if (settings::font::vars::fonts[i].m_result == var) { + array_id = i; + break; + } + } + + json["fonts"][name]["custom"] = array_id > 4 ? true : false; + + if (array_id > 4) { + json["fonts"][name]["id"] = settings::font::vars::fonts[array_id].m_name.get_original(); + } else { + json["fonts"][name]["id"] = array_id; + } + } + + void create_texture(nlohmann::json& json, menu_texture texture) { + std::pair text = menu::renderer::get_texture(texture); + if (text.first == "randomha") { + json["textures"][texture.m_submenu_name.get_original()] = "null"; + } else json["textures"][texture.m_submenu_name.get_original()] = text.second; + } + + void save_theme(const char* name) { + bool dupe = false; + int new_dupe = 1; + + if (std::filesystem::exists(util::va::va("%s%s.json", util::dirs::get_path(theme), name))) { + for (int i = 1; i < 100; i++) { + if (std::filesystem::exists(util::va::va("%s%s (%i).json", util::dirs::get_path(theme), name, i))) { + new_dupe = i + 1; + } else { + if (i != 1) { + dupe = true; + break; + } + } + } + } + + try { + std::ofstream output; + if (dupe) output = std::ofstream(util::va::va("%s%s (%i).json", util::dirs::get_path(theme), name, new_dupe)); + else output = std::ofstream(util::va::va("%s%s.json", util::dirs::get_path(theme), name)); + + nlohmann::json json; + + // colors + for (scroll_struct color : settings::color::vars::colors) { + json["colors"][color.m_name.get_original()] = create_color(*color.m_result); + } + + // positions/scales + for (scroll_struct*> scale : settings::pos::vars::scales) { + json["pos/scale"][scale.m_name.get_original()]["x"] = scale.m_result->x; + json["pos/scale"][scale.m_name.get_original()]["y"] = scale.m_result->y; + } + + // fonts + create_font(json, "Header", global::ui::g_header_font); + create_font(json, "Footer", global::ui::g_sub_header_font); + create_font(json, "Option", global::ui::g_option_font); + create_font(json, "Open Tooltip", global::ui::g_open_tooltip_font); + create_font(json, "Tooltip", global::ui::g_tooltip_font); + create_font(json, "Stacked Display", global::ui::g_stacked_display_font); + create_font(json, "Notify Title", global::ui::g_notify_title_font); + create_font(json, "Notify Body", global::ui::g_notify_body_font); + create_font(json, "Panel", global::ui::g_panel_font); + + // textures + create_texture(json, global::ui::m_header); + create_texture(json, global::ui::m_background); + create_texture(json, global::ui::m_scroller); + create_texture(json, global::ui::m_footer); + create_texture(json, global::ui::m_tooltip_background); + create_texture(json, global::ui::m_stacked_display_background); + create_texture(json, global::ui::m_stacked_display_bar); + create_texture(json, global::ui::m_panel_background); + create_texture(json, global::ui::m_panel_bar); + create_texture(json, global::ui::m_notify_background); + create_texture(json, global::ui::m_notify_bar); + create_texture(json, global::ui::m_vehicle_stats_background); + create_texture(json, global::ui::m_vehicle_stats_bar); + + // misc + json["globe"] = global::ui::g_render_globe; + json["smooth"]["enabled"] = global::ui::g_scroll_lerp; + json["smooth"]["speed"] = global::ui::g_scroll_lerp_speed; + + output << json.dump(4); + output.close(); + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + + themes_menu::get()->update_once(); + } + + void reset() { + global::ui::g_render_tooltip = true; + global::ui::g_render_globe = true; + global::ui::g_scroll_lerp = true; + + global::ui::g_wrap = 0.068f; + global::ui::g_delta = 0.f; + global::ui::g_scroll_lerp_speed = 25.f; + + global::ui::g_header_font = menu::fonts::get_font_id("RDR"); + global::ui::g_sub_header_font = 4; + global::ui::g_option_font = 4; + global::ui::g_open_tooltip_font = 4; + global::ui::g_tooltip_font = 4; + global::ui::g_stacked_display_font = 4; + global::ui::g_notify_title_font = 4; + global::ui::g_notify_body_font = 4; + global::ui::g_panel_font = 4; + + global::ui::g_position = { 0.70f, 0.3f }; + global::ui::g_scale = { 0.22f, 0.f }; + global::ui::g_submenu_arrow_position = { 0.218f, 0.010f }; + global::ui::g_submenu_arrow_scale = { 0.007f, 0.013f }; + global::ui::g_toggle_position = { 0.221f, 0.016f }; + global::ui::g_toggle_scale = { 0.007f, 0.011f }; + global::ui::g_globe_position = { 0.4405f, 0.328f }; + global::ui::g_globe_scale = { 0.978f, 0.906f }; + + global::ui::g_success = color_rgba(70, 219, 37, 255); + global::ui::g_error = color_rgba(219, 37, 37, 255); + global::ui::g_main_header = color_rgba(76, 37, 219, 255); + global::ui::g_sub_header = color_rgba(0, 0, 0, 220); + global::ui::g_sub_header_text = color_rgba(255, 255, 255, 255); + global::ui::g_background = color_rgba(0, 0, 0, 255); + global::ui::g_scroller = color_rgba(61, 30, 176, 255); // 255, 255, 255, 255 + global::ui::g_footer = color_rgba(76, 37, 219, 220); + global::ui::g_title = color_rgba(255, 255, 255, 255); + global::ui::g_open_tooltip = color_rgba(76, 37, 219, 255); + global::ui::g_option = color_rgba(255, 255, 255, 255); + global::ui::g_option_selected = color_rgba(255, 255, 255, 255); // 0, 0, 0, 255 + global::ui::g_toggle_on = color_rgba(130, 214, 157, 255); + global::ui::g_toggle_off = color_rgba(200, 55, 80, 255); + global::ui::g_break = color_rgba(255, 255, 255, 255); + global::ui::g_submenu_bar = color_rgba(255, 255, 255, 255); // 76, 37, 219, 255 + global::ui::g_clear_area_range = color_rgba(76, 37, 219, 255); + global::ui::g_hotkey_bar = color_rgba(76, 37, 219, 255); + global::ui::g_notify_bar = color_rgba(76, 37, 219, 255); + global::ui::g_notify_background = color_rgba(40, 40, 40, 255); + global::ui::g_panel_bar = color_rgba(76, 37, 219, 255); + global::ui::g_stacked_display_bar = color_rgba(76, 37, 219, 255); + global::ui::g_stacked_display_background = color_rgba(0, 0, 0, 180); + global::ui::g_panel_background = color_rgba(0, 0, 0, 180); + global::ui::g_hotkey_background = color_rgba(0, 0, 0, 180); + global::ui::g_hotkey_input = color_rgba(40, 40, 40, 200); + global::ui::g_instructional_background = color_rgba(0, 0, 0, 255); + global::ui::g_globe = color_rgba(255, 255, 255, 255); + + global::ui::m_header = menu_texture(&global::ui::g_main_header); + global::ui::m_background = menu_texture(&global::ui::g_background); + global::ui::m_scroller = menu_texture(&global::ui::g_scroller); + global::ui::m_footer = menu_texture(&global::ui::g_footer); + global::ui::m_tooltip_background = menu_texture(); + global::ui::m_stacked_display_background = menu_texture(); + global::ui::m_stacked_display_bar = menu_texture(); + global::ui::m_panel_background = menu_texture(); + global::ui::m_panel_bar = menu_texture(); + global::ui::m_notify_background = menu_texture(); + global::ui::m_notify_bar = menu_texture(); + + global::ui::m_header.m_submenu_name = settings::textures::vars::m_vars.m_header_option->get_name(); + global::ui::m_notify_bar.m_submenu_name = settings::textures::vars::m_vars.m_notify_bar_option->get_name(); + global::ui::m_notify_background.m_submenu_name = settings::textures::vars::m_vars.m_notify_background_option->get_name(); + global::ui::m_panel_bar.m_submenu_name = settings::textures::vars::m_vars.m_panel_bar_option->get_name(); + global::ui::m_panel_background.m_submenu_name = settings::textures::vars::m_vars.m_panel_background_option->get_name(); + global::ui::m_stacked_display_bar.m_submenu_name = settings::textures::vars::m_vars.m_stacked_display_bar_option->get_name(); + global::ui::m_stacked_display_background.m_submenu_name = settings::textures::vars::m_vars.m_stacked_display_background_option->get_name(); + global::ui::m_tooltip_background.m_submenu_name = settings::textures::vars::m_vars.m_tooltip_background_option->get_name(); + global::ui::m_footer.m_submenu_name = settings::textures::vars::m_vars.m_footer_option->get_name(); + global::ui::m_scroller.m_submenu_name = settings::textures::vars::m_vars.m_scroller_option->get_name(); + global::ui::m_background.m_submenu_name = settings::textures::vars::m_vars.m_background_option->get_name(); + } +} + +void themes_menu::load() { + set_name("Themes"); + set_parent(); + + add_option(button_option("Save Theme") + .add_translate().add_hotkey() + .add_keyboard("Enter theme name", 50, [](button_option* option, const char* text) { save_theme(text); })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click(reset)); + + add_option(break_option("Themes") + .add_translate()); + + add_string("~m~None"); +} + +void themes_menu::update() {} + +void themes_menu::update_once() { + clear_options(3); + + m_vars.m_cached_themes.clear(); + + std::vector themes = util::dirs::get_files_in_directory(util::dirs::get_path(theme), ".json"); + if (themes.size()) { + for (std::string theme : themes) { + std::size_t index = m_vars.m_cached_themes.size(); + if (index < 0) index = 0; + m_vars.m_cached_themes.push_back(theme); + + add_option(submenu_option(theme) + .add_submenu() + .add_click([=] { settings::theme::selected::vars::m_vars.m_selected = index; })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void themes_menu::feature_update() {} + +themes_menu* g_instance; +themes_menu* themes_menu::get() { + if (g_instance == nullptr) { + g_instance = new themes_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/themes.h b/GTAV/src/menu/base/submenus/main/settings/themes.h new file mode 100644 index 0000000..2fdfb74 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/themes.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class themes_menu : public menu::submenu::submenu { +public: + static themes_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + themes_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::theme::vars { + struct variables { + std::vector m_cached_themes; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/themes/themes_selected.cpp b/GTAV/src/menu/base/submenus/main/settings/themes/themes_selected.cpp new file mode 100644 index 0000000..392265a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/themes/themes_selected.cpp @@ -0,0 +1,154 @@ +#include "themes_selected.h" +#include "menu/base/submenu_handler.h" +#include "../themes.h" +#include "util/config.h" +#include "util/dirs.h" +#include "util/log.h" +#include "../settings_color.h" +#include "../settings_fonts.h" +#include "../position_scale.h" +#include "menu/base/util/textures.h" +#include + +using namespace settings::theme::selected::vars; + +namespace settings::theme::selected::vars { + variables m_vars; + + void load_font(nlohmann::json json, const char* name, int* var) { + if (!json["fonts"][name].is_null()) { + if (json["fonts"][name]["custom"].get()) { + for (scroll_struct font : settings::font::vars::fonts) { + if (font.m_name.get_original() == json["fonts"][name]["id"].get()) { + *var = font.m_result; + break; + } + } + } else { + *var = settings::font::vars::fonts[json["fonts"][name]["id"].get()].m_result; + } + } + } + + void load_texture(nlohmann::json& json, menu_texture& texture) { + if (!json["textures"][texture.m_submenu_name.get_original()].is_null()) { + if (json["textures"][texture.m_submenu_name.get_original()].get() != "null") { + texture.m_texture = json["textures"][texture.m_submenu_name.get_original()].get(); + + for (std::size_t i = 0; i < menu::textures::get_list().size(); i++) { + if (!menu::textures::get_list()[i].m_name.compare(texture.m_texture)) { + texture.m_context.m_selected = (int)i; + texture.m_enabled = true; + break; + } + } + } else { + texture.m_enabled = false; + } + } + } + + void load_theme(const char* name) { + try { + std::ifstream input(util::va::va("%s%s.json", util::dirs::get_path(theme), name)); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + // colors + for (scroll_struct color : settings::color::vars::colors) { + if (!json["colors"][color.m_name.get_original()].is_null()) { + color.m_result->r = json["colors"][color.m_name.get_original()][0].get(); + color.m_result->g = json["colors"][color.m_name.get_original()][1].get(); + color.m_result->b = json["colors"][color.m_name.get_original()][2].get(); + color.m_result->a = json["colors"][color.m_name.get_original()][3].get(); + } + } + + // positions/scales + for (scroll_struct*> scale : settings::pos::vars::scales) { + if (!json["pos/scale"][scale.m_name.get_original()].is_null()) { + scale.m_result->x = json["pos/scale"][scale.m_name.get_original()]["x"].get(); + scale.m_result->y = json["pos/scale"][scale.m_name.get_original()]["y"].get(); + } + } + + // fonts + load_font(json, "Header", &global::ui::g_header_font); + load_font(json, "Footer", &global::ui::g_sub_header_font); + load_font(json, "Option", &global::ui::g_option_font); + load_font(json, "Open Tooltip", &global::ui::g_open_tooltip_font); + load_font(json, "Tooltip", &global::ui::g_tooltip_font); + load_font(json, "Stacked Display", &global::ui::g_stacked_display_font); + load_font(json, "Notify Title", &global::ui::g_notify_title_font); + load_font(json, "Notify Body", &global::ui::g_notify_body_font); + load_font(json, "Panel", &global::ui::g_panel_font); + + // textures + load_texture(json, global::ui::m_header); + load_texture(json, global::ui::m_background); + load_texture(json, global::ui::m_scroller); + load_texture(json, global::ui::m_footer); + load_texture(json, global::ui::m_tooltip_background); + load_texture(json, global::ui::m_stacked_display_background); + load_texture(json, global::ui::m_stacked_display_bar); + load_texture(json, global::ui::m_panel_background); + load_texture(json, global::ui::m_panel_bar); + load_texture(json, global::ui::m_notify_background); + load_texture(json, global::ui::m_notify_bar); + load_texture(json, global::ui::m_vehicle_stats_background); + load_texture(json, global::ui::m_vehicle_stats_bar); + + // misc + global::ui::g_render_globe = json["globe"].get(); + global::ui::g_scroll_lerp = json["smooth"]["enabled"].get(); + global::ui::g_scroll_lerp_speed = json["smooth"]["speed"].get(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } +} + +void themes_selected_menu::load() { + set_name("Theme"); + set_parent(); + + add_option(button_option("Load") + .add_translate() + .add_click([] { load_theme(settings::theme::vars::m_vars.m_cached_themes[m_vars.m_selected].c_str()); })); + + add_option(button_option("Delete") + .add_translate() + .add_click([] { + remove(util::va::va("%s%s.json", util::dirs::get_path(theme), settings::theme::vars::m_vars.m_cached_themes[m_vars.m_selected].c_str())); + menu::submenu::handler::set_submenu_previous(true); + })); + + add_option(button_option("Set as Load Default") + .add_translate() + .add_click([this] { util::config::write_string(get_submenu_name_stack(), "Launch", settings::theme::vars::m_vars.m_cached_themes[m_vars.m_selected]); })); + + std::string launch = util::config::read_string(get_submenu_name_stack(), "Launch", "-none-"); + if (launch.compare("-none-")) { + load_theme(launch.c_str()); + } +} + +void themes_selected_menu::update() {} + +void themes_selected_menu::update_once() {} + +void themes_selected_menu::feature_update() {} + +themes_selected_menu* g_instance; +themes_selected_menu* themes_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new themes_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/themes/themes_selected.h b/GTAV/src/menu/base/submenus/main/settings/themes/themes_selected.h new file mode 100644 index 0000000..03e56d0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/themes/themes_selected.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class themes_selected_menu : public menu::submenu::submenu { +public: + static themes_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + themes_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::theme::selected::vars { + struct variables { + std::size_t m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/translation.cpp b/GTAV/src/menu/base/submenus/main/settings/translation.cpp new file mode 100644 index 0000000..3739263 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/translation.cpp @@ -0,0 +1,290 @@ +#include "translation.h" +#include "menu/base/submenu_handler.h" +#include "../settings.h" +#include "translation/translation_selected.h" +#include "menu/base/util/notify.h" +#include "util/fiber_pool.h" +#include "util/dirs.h" +#include "util/log.h" +#include + +using namespace settings::translation::vars; + +namespace settings::translation::vars { + variables m_vars; + + void create_template_translation() { + try { + std::ofstream output(util::va::va("%sTemplate.json", util::dirs::get_path(translation))); + if (output.good()) { + nlohmann::json json; + + for (menu::submenu::submenu* submenu : menu::submenu::handler::get_submenus()) { + if (submenu) { + std::string submenu_name = submenu->get_name().get_original(); + for (std::shared_ptr option : submenu->get_options()) { + if (option->get_name().has_translation() && !option->get_name().get_original().empty()) { + json["options"][option->get_name().get_original()] = option->get_name().get_original(); + } + + if (option->get_tooltip().has_translation() && !option->get_tooltip().get_original().empty()) { + json["options"][option->get_tooltip().get_original()] = option->get_tooltip().get_original(); + } + + option->write_translation(json["options"]); + } + + if (submenu->get_name().has_translation() && !submenu->get_name().get_original().empty()) { + json["options"][submenu->get_name().get_original()] = submenu->get_name().get_original(); + } + + for (localization string : submenu->get_strings()) { + if (string.has_translation() && !string.get_original().empty()) { + json["options"][string.get_original()] = string.get_original(); + } + } + } + + for (localization* string : global::vars::g_localization_table) { + json["global"][string->get_original()] = string->get_original(); + } + } + + output << json.dump(4); + output.close(); + } + } catch (std::exception& e) { + LOG_WARN("[json] %s", e.what()); + } + + // recache list to include template + translation_menu::get()->update_once(); + } + + void reset() { + for (menu::submenu::submenu* submenu : menu::submenu::handler::get_submenus()) { + for (std::shared_ptr option : submenu->get_options()) { + if (option->get_name().has_translation()) option->get_name().reset(); + if (option->get_tooltip().has_translation()) option->get_tooltip().reset(); + } + + if (submenu->get_name().has_translation()) { + submenu->get_name().reset(); + } + + for (auto& string : submenu->get_strings()) { + if (string.has_translation()) string.reset(); + } + } + + for (localization* string : global::vars::g_localization_table) { + string->reset(); + } + } + + void load_translation(std::string file) { + try { + std::ifstream input(util::va::va("%s%s.json", util::dirs::get_path(translation), file.c_str())); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + for (menu::submenu::submenu* submenu : menu::submenu::handler::get_submenus()) { + std::string submenu_name = submenu->get_name().get_original(); + for (std::shared_ptr option : submenu->get_options()) { + if (option->get_name().has_translation() && !option->get_name().get_original().empty()) { + option->get_name().set_mapped(JsonGet(json["options"], option->get_name().get_original(), option->get_name().get_original()).c_str()); + } + + if (option->get_tooltip().has_translation() && !option->get_tooltip().get_original().empty()) { + option->get_tooltip().set_mapped(JsonGet(json["options"], option->get_tooltip().get_original(), option->get_tooltip().get_original()).c_str()); + } + + option->read_translation(json["options"]); + } + + if (submenu->get_name().has_translation() && !submenu->get_name().get_original().empty()) { + if (!json["options"][submenu_name].is_null()) { + if (strcmp(json["options"][submenu_name].get().c_str(), "Ozark")) { + submenu->get_name().set_mapped(json["options"][submenu_name].get().c_str()); + } + } + } + + for (localization& string : submenu->get_strings()) { + if (string.has_translation() && !string.get_original().empty()) { + string.set_mapped(JsonGet(json["options"], string.get_original(), string.get_original()).c_str()); + } + } + } + + for (localization* string : global::vars::g_localization_table) { + string->set_mapped(JsonGet(json["global"], string->get_original(), string->get_original()).c_str()); + } + } else { + menu::notify::stacked(translation_menu::get()->get_string("Translation"), translation_menu::get()->get_string("Failed to open translation file!"), global::ui::g_error); + } + } catch (nlohmann::json::parse_error& error) { + if (error.id == 101) { + // encoding is wack + menu::notify::stacked(translation_menu::get()->get_string("Translation"), translation_menu::get()->get_string("Failed to verify translation encoding. Ensure encoding is UTF-8!"), global::ui::g_error); + } else { + // failed + menu::notify::stacked(translation_menu::get()->get_string("Translation"), util::va::va("%s: %i", translation_menu::get()->get_string("Failed to load translation").c_str(), error.id), global::ui::g_error); + } + } catch (std::exception& exception) { + // error + menu::notify::stacked(translation_menu::get()->get_string("Translation"), util::va::va("%s: %s", translation_menu::get()->get_string("Failed to load translation. exception").c_str(), exception.what()), global::ui::g_error); + } + } + + void update_existing_translation(std::string file) { + try { + std::ifstream input(util::va::va("%s%s.json", util::dirs::get_path(translation), file.c_str())); + if (input.good()) { + nlohmann::json json = nlohmann::json::parse(input); + input.close(); + + for (menu::submenu::submenu* submenu : menu::submenu::handler::get_submenus()) { + std::string submenu_name = submenu->get_name().get_original(); + for (std::shared_ptr option : submenu->get_options()) { + if (option->get_name().has_translation() && !option->get_name().get_original().empty()) { + if (json["options"][option->get_name().get_original()].is_null()) { + json["options"][option->get_name().get_original()] = option->get_name().get_original(); + } + } + + if (option->get_tooltip().has_translation() && !option->get_tooltip().get_original().empty()) { + if (json["options"][option->get_tooltip().get_original()].is_null()) { + json["options"][option->get_tooltip().get_original()] = option->get_tooltip().get_original(); + } + } + + option->write_translation(json["options"]); + } + + if (submenu->get_name().has_translation() && !submenu->get_name().get_original().empty()) { + if (json["options"][submenu_name].is_null()) { + json["options"][submenu_name] = submenu_name; + } + } + + for (localization& string : submenu->get_strings()) { + if (string.has_translation() && !string.get_original().empty()) { + if (json["options"][string.get_original()].is_null()) { + json["options"][string.get_original()] = string.get_original(); + } + } + } + } + + for (localization* string : global::vars::g_localization_table) { + if (json["global"][string->get_original()].is_null()) { + json["global"][string->get_original()] = string->get_original(); + } + } + + std::ofstream output(util::va::va("%s%s.json", util::dirs::get_path(translation), file.c_str())); + if (output.good()) { + output << json.dump(4); + output.close(); + } + } else { + menu::notify::stacked(translation_menu::get()->get_string("Translation"), translation_menu::get()->get_string("Failed to open translation file!"), global::ui::g_error); + } + } catch (nlohmann::json::parse_error& error) { + if (error.id == 101) { + // encoding is wack + menu::notify::stacked(translation_menu::get()->get_string("Translation"), translation_menu::get()->get_string("Failed to verify translation encoding. Ensure encoding is UTF-8!"), global::ui::g_error); + } else { + // failed + menu::notify::stacked(translation_menu::get()->get_string("Translation"), util::va::va("%s: %i", translation_menu::get()->get_string("Failed to load translation").c_str(), error.id), global::ui::g_error); + } + } catch (std::exception& exception) { + // error + menu::notify::stacked(translation_menu::get()->get_string("Translation"), util::va::va("%s: %s", translation_menu::get()->get_string("Failed to load translation. exception").c_str(), exception.what()), global::ui::g_error); + } + + translation_menu::get()->update_once(); + } +} + +void translation_menu::load() { + set_name("Translation"); + set_parent(); + + add_option(button_option("Create Template") + .add_translate() + .add_click([] { util::fiber::pool::add(create_template_translation); })); + + add_option(scroll_option(SCROLLSELECT, "Update Existing") + .add_translate() + .add_scroll(m_vars.m_update_translation, 0, NUMOF(m_vars.m_translation_list), m_vars.m_translation_list) + .add_update([](scroll_option* option, int position) { option->add_scroll(m_vars.m_update_translation, 0, m_vars.m_list_size, m_vars.m_translation_list); }) + .add_click([] { update_existing_translation(m_vars.m_translation_list[m_vars.m_update_translation].m_name.get_original()); }) + .add_requirement([] { return m_vars.m_list_size > 0; })); + + add_option(button_option("Reset to English") + .add_translate().add_hotkey() + .add_click([] { util::fiber::pool::add(reset); })); + + add_option(break_option("Translations") + .add_translate()); + + add_string("~m~None"); + add_string("Translation"); + add_string("Failed to open translation file"); + add_string("Failed to verify translation encoding. Ensure encoding is UTF-8"); + add_string("Failed to load translation"); + add_string("Failed to load translation. exception"); + + translation_selected_menu::get(); +} + +void translation_menu::update() {} + +void translation_menu::update_once() { + clear_options(4); + + m_vars.m_cached_translations.clear(); + int size = 0; + + std::vector translations = util::dirs::get_files_in_directory(util::dirs::get_path(translation), ".json"); + if (translations.size()) { + for (std::string translation : translations) { + m_vars.m_translation_list[size].m_name = translation; + m_vars.m_translation_list[size].m_result = size++; + + std::pair Info; + Info.first = translation; + + if (stat(util::va::va("%s%s.json", util::dirs::get_path(translation), translation.c_str()), &Info.second) == 0) { + std::size_t index = m_vars.m_cached_translations.size(); + if (index < 0) index = 0; + m_vars.m_cached_translations.push_back(Info); + + add_option(submenu_option(translation) + .add_submenu() + .add_click([=] { settings::translation::selected::vars::m_vars.m_selected = index; })); + } + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } + + m_vars.m_list_size = size; +} + +void translation_menu::feature_update() {} + +translation_menu* g_instance; +translation_menu* translation_menu::get() { + if (g_instance == nullptr) { + g_instance = new translation_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/translation.h b/GTAV/src/menu/base/submenus/main/settings/translation.h new file mode 100644 index 0000000..968f1f2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/translation.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class translation_menu : public menu::submenu::submenu { +public: + static translation_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + translation_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::translation::vars { + struct variables { + std::vector> m_cached_translations; + int m_list_size; + int m_update_translation; + scroll_struct m_translation_list[100]; + }; + + void load_translation(std::string file); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/translation/translation_selected.cpp b/GTAV/src/menu/base/submenus/main/settings/translation/translation_selected.cpp new file mode 100644 index 0000000..5be1644 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/translation/translation_selected.cpp @@ -0,0 +1,53 @@ +#include "translation_selected.h" +#include "menu/base/submenu_handler.h" +#include "../translation.h" +#include "util/dirs.h" +#include "util/config.h" + +using namespace settings::translation::selected::vars; + +namespace settings::translation::selected::vars { + variables m_vars; +} + +void translation_selected_menu::load() { + set_name("Translation"); + set_parent(); + + add_option(button_option("Load") + .add_translate() + .add_click([] { settings::translation::vars::load_translation(settings::translation::vars::m_vars.m_cached_translations[m_vars.m_selected].first); })); + + add_option(button_option("Delete") + .add_translate() + .add_click([] { + remove(util::va::va("%s%s.json", util::dirs::get_path(translation), settings::translation::vars::m_vars.m_cached_translations[m_vars.m_selected].first.c_str())); + menu::submenu::handler::set_submenu_previous(true); + })); + + add_option(button_option("Set as Load Default") + .add_translate() + .add_click([this] { util::config::write_string(get_submenu_name_stack(), "Launch", settings::translation::vars::m_vars.m_cached_translations[m_vars.m_selected].first); })); + + std::string launch = util::config::read_string(get_submenu_name_stack(), "Launch", "-none-"); + if (launch.compare("-none-")) { + settings::translation::vars::load_translation(launch); + } +} + +void translation_selected_menu::update() {} + +void translation_selected_menu::update_once() {} + +void translation_selected_menu::feature_update() {} + +translation_selected_menu* g_instance; +translation_selected_menu* translation_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new translation_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/settings/translation/translation_selected.h b/GTAV/src/menu/base/submenus/main/settings/translation/translation_selected.h new file mode 100644 index 0000000..8491762 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/settings/translation/translation_selected.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class translation_selected_menu : public menu::submenu::submenu { +public: + static translation_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + translation_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace settings::translation::selected::vars { + struct variables { + std::size_t m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner.cpp b/GTAV/src/menu/base/submenus/main/spawner.cpp new file mode 100644 index 0000000..a79c60e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner.cpp @@ -0,0 +1,1031 @@ +#include "spawner.h" +#include "menu/base/submenu_handler.h" +#include "../main.h" +#include "util/memory/memory.h" +#include "menu/base/util/control.h" +#include "menu/base/util/global.h" +#include "rage/engine.h" +#include "util/fiber_pool.h" +#include "global/lists.h" +#include "menu/base/submenus/main/vehicle.h" +#include "spawner/vehicle/spawner_vehicle_settings.h" +#include "spawner/vehicle/spawner_vehicle_selected.h" +#include "spawner/vehicle/spawner_vehicle_modded.h" +#include "spawner/vehicle/spawner_vehicle_garage.h" +#include "spawner/vehicle/spawner_vehicle_manage.h" +#include "spawner/object/spawner_object_settings.h" +#include "spawner/object/spawner_object_select.h" +#include "spawner/object/spawner_object_manage.h" +#include "spawner/object/spawner_object_building.h" +#include "spawner/ped/spawner_ped_settings.h" +#include "spawner/ped/spawner_ped_manage.h" +#include "menu/base/util/panels.h" +#include "menu/base/submenus/main/network/players/network_players_selected.h" +#include "menu/base/submenus/main/network/network_session.h" +#include "rage/types/global_types.h" +#include "spawner/vehicle/spawner_vehicle_save.h" + +using namespace spawner::vars; + +namespace spawner::vars { + variables m_vars; + + scroll_struct type[] = { + { localization("Vehicle", true), 0 }, + { localization("Object", true), 0 }, + { localization("Ped", true), 0 }, + }; + + namespace script { + // Freemode, search for "case joaat("TECHNICAL"):" + bool func_1081(int iParam0) { + return iParam0 == 49; + } + + bool func_1080(int iParam0) { + return iParam0 == 50; + } + + int func_8789(int iParam0) { + switch (iParam0) { + case 0x3af76f4a: + return 533; + + case 0x381e10bd: + return 530; + + case 0xceb28249: + return 531; + + case 0xed62bfa9: + return 531; + + case 0x9dae1398: + return 528; + + case 0x4662bcbb: + return 534; + + case 0x50d4d19f: + return 534; + + case 0x28ad20e1: + return 529; + + case 0x8e08ec82: + return 532; + + case 0xa1355f67: + return 512; + + case 0x2189d250: + return 558; + + case 0x34b82784: + return 559; + + case 0xfe141da6: + return 560; + + case 0x711d4738: + return 561; + + case 0xb7d9f7f1: + return 562; + + case 0x8fd54ebb: + return 563; + + case 0xa52f6866: + return 572; + + case 0xfe0a508c: + return 573; + + case 0x89ba59f5: + return 574; + + case 0xc3f25753: + return 575; + + case 0xfd707ede: + return 576; + + case 0x96e24857: + return 577; + + case 0xd35698ef: + return 578; + + case 0x5d56f01b: + return 579; + + case 0x3dc92356: + return 580; + + case 0xad6065c0: + return 581; + + case 0xc5dd6967: + return 582; + + case 0x9a9eb7de: + return 583; + + case 0xe8983f9f: + return 584; + + case 0x3e2e4f8a: + return 585; + + case 0x19dd9ed1: + if (func_1081(menu::script_global(4456448).at(133963).as()) || func_1080(menu::script_global(4456448).at(133963).as())) { // 1.55 done + return 225; + } + break; + + case 0x83051506: + if (func_1081(menu::script_global(4456448).at(133963).as())) {// 1.55 done + return 534; + } + break; + + case 0x34dba661: + return 595; + + case 0x586765fb: + return 596; + + case 0x58cdaf30: + return 597; + + case 0xaa6f980a: + return 598; + + case 0x9b16a3b4: + return 599; + + case 0x1aad0ded: + return 600; + + case 0xf34dfb25: + return 601; + + case 0x46699f47: + return 602; + + case 0xd6bc7523: + return 603; + + case 0x81bd2ed0: + return 589; + + case 0x64de07a1: + return 640; + + case 0xd17099d: + return 637; + + case 0x73f4110e: + return 636; + + case 0x6290f15b: + return 635; + + case 0x7b54a9d3: + return 639; + + case 0xd4ae63d9: + return 612; + + case 0x4abebf23: + return 613; + + case 0x36a167e0: + return 348; + } + return -1; + } + + int func_8783(int iParam0) { + switch (iParam0) { + case 0x711d4738: + return 0; + + case 0xfe141da6: + return 1; + + case 0x8fd54ebb: + return 2; + + case 0x2189d250: + return 3; + + case 0xb7d9f7f1: + return 4; + + case 0x34b82784: + return 5; + } + + return -1; + } + + int func_8782(uint32_t iParam0) { + switch (iParam0) { // good + case 0x96e24857: + return menu::script_global(rage::global::_155_tunables).at(22394).as(); // 1.55 done + + case 0xc5dd6967: + return menu::script_global(rage::global::_155_tunables).at(22395).as();// 1.55 done + + case 0xa52f6866: + return menu::script_global(rage::global::_155_tunables).at(22396).as();// 1.55 done + + case 0x89ba59f5: + return menu::script_global(rage::global::_155_tunables).at(22397).as();// 1.55 done + + case 0x9a9eb7de: + return menu::script_global(rage::global::_155_tunables).at(22398).as();// 1.55 done + + case 0x5d56f01b: + return menu::script_global(rage::global::_155_tunables).at(22399).as();// 1.55 done + + case 0x3e2e4f8a: + return menu::script_global(rage::global::_155_tunables).at(22400).as();// 1.55 done + + case 0xfe0a508c: + return menu::script_global(rage::global::_155_tunables).at(22401).as();// 1.55 done + + case 0xc3f25753: + return menu::script_global(rage::global::_155_tunables).at(22402).as();// 1.55 done + + case 0xd35698ef: + return menu::script_global(rage::global::_155_tunables).at(22403).as();// 1.55 done + + case 0xad6065c0: + return menu::script_global(rage::global::_155_tunables).at(22404).as();// 1.55 done + + case 0xe8983f9f: + return menu::script_global(rage::global::_155_tunables).at(22405).as();// 1.55 done + + case 0x3dc92356: + return menu::script_global(rage::global::_155_tunables).at(22406).as();// 1.55 done + + case 0xfd707ede: + return menu::script_global(rage::global::_155_tunables).at(22407).as();// 1.55 done + } + + return 0; + } + + int func_8788(int iParam0) { + switch (iParam0) { + case 0x586765fb: + return 0; + break; + + case 0x46699f47: + return 1; + break; + + case 0x9b16a3b4: + return 2; + break; + + case 0x34dba661: + return 3; + break; + + case 0xd6bc7523: + return 4; + break; + + case 0xf34dfb25: + return 5; + break; + + case 0xaa6f980a: + return 6; + break; + + case 0x1aad0ded: + return 7; + break; + + case 0x58cdaf30: + return 8; + break; + } + return -1; + } + + int func_8785(int iParam0) { + if ((iParam0 == joaat("LAZER") || iParam0 == joaat("BESRA")) || iParam0 == joaat("HYDRA")) { + return 1; + } + return 0; + } + + int func_8787(int iParam0) { + if ((((((((((iParam0 == joaat("TECHNICAL") || iParam0 == joaat("INSURGENT")) || iParam0 == joaat("INSURGENT2")) || iParam0 == joaat("LIMO2")) || iParam0 == joaat("TECHNICAL2")) || iParam0 == joaat("BOXVILLE5")) || iParam0 == joaat("INSURGENT3")) || iParam0 == joaat("TECHNICAL3")) || iParam0 == joaat("barrage")) || iParam0 == joaat("caracara")) || iParam0 == joaat("HALFTRACK")) { + return 1; + } + return 0; + } + + int func_1079(int iParam0, bool bParam1) { + switch (iParam0) { + case 0x3af76f4a: + case 0x381e10bd: + case 0xceb28249: + case 0xed62bfa9: + case 0x9dae1398: + case 0x4662bcbb: + case 0x28ad20e1: + case 0x8e08ec82: + case 0xa1355f67: + case 0xd17099d: + case 0x73f4110e: + case 0x6290f15b: + case 0x8fd54ebb: + return 1; + + case 0x19dd9ed1: + if (func_1081(menu::script_global(4456448).at(133963).as()) || func_1080(menu::script_global(4456448).at(133963).as())) {// 1.55 done + if (!bParam1) { + return 1; + } + } + break; + + case 0x50d4d19f: + case 0x83051506: + if (func_1081(menu::script_global(4456448).at(133963).as())) {// 1.55 done + return 1; + } + break; + } + + return 0; + } + + int get_blip_sprite_for_vehicle(uint32_t iParam0) { + if (func_1079(iParam0, 0)) { + return func_8789(iParam0); + } + if (func_8783(iParam0) != -1) { + return func_8789(iParam0); + } + if (func_8782(iParam0) > 0) { + return func_8789(iParam0); + } + if (func_8788(iParam0) != -1) { + return func_8789(iParam0); + } + if (iParam0 == joaat("avenger")) { + return 589; + } + if (iParam0 == joaat("seasparrow")) { + return 612; + } + if (iParam0 == joaat("blimp3")) { + return 638; + } else if (iParam0 == joaat("pbus2")) { + return 631; + } else if (iParam0 == joaat("terbyte")) { + return 632; + } else if (iParam0 == joaat("strikeforce")) { + return 640; + } else if (iParam0 == joaat("menacer")) { + return 633; + } else if (iParam0 == joaat("scramjet")) { + return 634; + } else if (iParam0 == joaat("oppressor2")) { + return 639; + } + if ((iParam0 == joaat("bruiser") || iParam0 == joaat("bruiser2")) || iParam0 == joaat("bruiser3")) { + return 658; + } else if ((iParam0 == joaat("brutus") || iParam0 == joaat("brutus2")) || iParam0 == joaat("brutus3")) { + return 659; + } else if ((iParam0 == joaat("cerberus") || iParam0 == joaat("cerberus2")) || iParam0 == joaat("cerberus3")) { + return 660; + } else if ((iParam0 == joaat("deathbike") || iParam0 == joaat("deathbike2")) || iParam0 == joaat("deathbike3")) { + return 661; + } else if ((iParam0 == joaat("dominator4") || iParam0 == joaat("dominator5")) || iParam0 == joaat("dominator6")) { + return 662; + } else if ((iParam0 == joaat("impaler2") || iParam0 == joaat("impaler3")) || iParam0 == joaat("impaler4")) { + return 663; + } else if ((iParam0 == joaat("imperator") || iParam0 == joaat("imperator2")) || iParam0 == joaat("imperator3")) { + return 664; + } else if ((iParam0 == joaat("issi4") || iParam0 == joaat("issi5")) || iParam0 == joaat("issi6")) { + return 665; + } else if ((iParam0 == joaat("monster3") || iParam0 == joaat("monster4")) || iParam0 == joaat("monster5")) { + return 666; + } else if ((iParam0 == joaat("scarab") || iParam0 == joaat("scarab2")) || iParam0 == joaat("scarab3")) { + return 667; + } else if ((iParam0 == joaat("slamvan4") || iParam0 == joaat("slamvan5")) || iParam0 == joaat("slamvan6")) { + return 668; + } else if ((iParam0 == joaat("zr380") || iParam0 == joaat("zr3802")) || iParam0 == joaat("zr3803")) { + return 669; + } else if (iParam0 == joaat("rrocket")) { + return 226; + } + if (native::is_this_model_a_bike(iParam0)) { + return 226; + } else if (native::is_this_model_a_heli(iParam0)) { + return 64; + } else if (native::is_this_model_a_boat(iParam0)) { + return 410; + } else if (func_8785(iParam0)) { + return 424; + } else if (native::is_this_model_a_plane(iParam0)) { + return 423; + } else if (native::is_this_model_a_quadbike(iParam0)) { + return 512; + } else if (iParam0 == joaat("RHINO")) { + return 421; + } else if (iParam0 == joaat("submersible") || iParam0 == joaat("submersible2")) { + return 308; + } else if (func_8787(iParam0)) { + return 426; + } else { + return 225; + } + return 225; + } + } + + void populate_vehicle_list() { + util::fiber::pool::add([] { + struct hash_node { + uint32_t m_model_hash; + uint16_t m_data; + uint16_t m_padding; + hash_node* m_next; + }; + + for (std::vector& hashes : m_vars.m_vehicle_hashes) { + hashes.clear(); + } + + uint16_t hash_table_count = *(uint16_t*)memory::read_instruction(global::vars::g_get_model_info); + uint64_t hash_table = *(uint64_t*)memory::read_instruction(global::vars::g_get_model_info + 0x7E); + hash_node** hash_map = *(hash_node***)memory::read_instruction(global::vars::g_get_model_info + 0x21); + + for (uint16_t i = 0; i < hash_table_count; i++) { + for (hash_node* current = hash_map[i]; current; current = current->m_next) { + uint64_t element = *(uint64_t*)(hash_table + (current->m_data * 8)); + if (element) { + uint8_t ModelType = *(uint8_t*)(element + 0x9D) & 0x1F; + if (ModelType == 5) { + if (current->m_model_hash) { + uint8_t type = *(uint8_t*)(element + 0x548) & 0x1F; + m_vars.m_vehicle_hashes[type].push_back(current->m_model_hash); + } + } + } + } + } + }); + } + + const char* get_class_name(int class_id) { + char buffer[32]; + sprintf_s(buffer, "VEH_CLASS_%d", class_id); + return !strcmp(native::get_label_text(buffer), "NULL") ? "" : native::get_label_text(buffer); + } + + void do_spawn_vehicle(uint32_t model, std::function callback, bool garage, Player player_id) { + if (native::is_model_in_cdimage(model) && native::is_model_a_vehicle(model)) { + util::fiber::pool::add([=] { + menu::control::simple_request_model(model); + + menu::player::player_context& target = menu::player::get_player(player_id); + + bool network = target.m_id != menu::player::get_local_player().m_id; + bool spawn_vectored = false; + float old_speed = 0.f; + + if (spawner::vehicle::settings::vars::m_vars.m_delete_current + && !network) { + if (target.m_in_vehicle) { + if (native::get_ped_in_vehicle_seat(target.m_vehicle, -1, 0) == target.m_ped) { + old_speed = native::get_entity_speed(target.m_vehicle); + native::set_entity_as_mission_entity(target.m_vehicle, true, true); + native::delete_entity(&target.m_vehicle); + } else { + spawn_vectored = true; + } + } + } + + math::vector3 coords; + + Entity vehicle = 0; + if (!network && spawner::vehicle::settings::vars::m_vars.m_teleport_inside && !spawn_vectored) { + vehicle = native::create_vehicle(model, target.m_coords.x, target.m_coords.y, target.m_coords.z, target.m_heading, true, false, false); + coords = target.m_coords; + } else { + coords = target.m_coords + (native::get_entity_forward_vector(target.m_entity) * 5.f); + vehicle = native::create_vehicle(model, coords.x, coords.y, coords.z, target.m_heading, true, false, false); + } + + if (native::does_entity_exist(vehicle)) { + native::set_entity_as_mission_entity(vehicle, true, true); + native::set_vehicle_on_ground_properly(vehicle, 1); + + native::set_vehicle_dirt_level(vehicle, 0); + native::set_vehicle_radio_station(vehicle, "OFF"); + + if (spawner::vehicle::settings::vars::m_vars.m_air_vehicles_in_air) { + if (native::is_this_model_a_plane(model) || native::is_this_model_a_heli(model)) { + math::vector3 coords = native::get_entity_coords(vehicle, true); + native::set_entity_coords(vehicle, coords.x, coords.y, coords.z + spawner::vehicle::settings::vars::m_vars.m_spawn_height, 0, 0, 0, 0); + native::set_vehicle_engine_on(vehicle, true, true, false); + native::set_heli_blades_full_speed(vehicle); + native::set_vehicle_forward_speed(vehicle, 100); + } + } + + if (spawner::vehicle::settings::vars::m_vars.m_fade) { + native::network_fade_in_entity(vehicle, true, false); + } + + if (spawner::vehicle::settings::vars::m_vars.m_blip) { + Blip blip = native::add_blip_for_entity(vehicle); + native::set_blip_sprite(blip, script::get_blip_sprite_for_vehicle(model)); + native::set_blip_display(blip, 8); + native::set_blip_category(blip, 4); + } + + native::decor_set_int(vehicle, "MPBitset", 0); + native::set_vehicle_is_stolen(vehicle, false); + + if (network) { + if (target.m_gift_vehicle || spawner::vehicle::settings::vars::m_vars.m_session_gift) { + uint32_t player_hash = native::network_hash_from_player_handle(target.m_id); + native::decor_set_int(vehicle, "Player_Vehicle", player_hash); + native::decor_set_int(vehicle, "Previous_Owner", player_hash); + native::decor_set_int(vehicle, "Veh_Modded_By_Player", player_hash); + native::decor_set_int(vehicle, "Not_Allow_As_Saved_Veh", 0); + native::decor_set_int(vehicle, "PV_Slot", 2); + } + } + + if (spawner::vehicle::settings::vars::m_vars.m_teleport_inside && !network) { + native::set_ped_into_vehicle(target.m_ped, vehicle, -1); + native::set_vehicle_engine_on(vehicle, true, true, false); + native::set_vehicle_forward_speed(vehicle, old_speed); + } + + if (spawner::vehicle::settings::vars::m_vars.m_godmode) { + native::set_entity_invincible(vehicle, true); + native::set_entity_proofs(vehicle, true, true, true, true, true, true, true, true); + native::set_vehicle_can_be_visibly_damaged(vehicle, false); + native::set_vehicle_engine_on(vehicle, true, true, true); + } + + if (spawner::vehicle::settings::vars::m_vars.m_particle_fx) { + menu::control::request_particle({ "proj_indep_firework_v2", "scr_firework_indep_repeat_burst_rwb" }, [=] (std::pair asset) { + native::start_particle_fx_non_looped_at_coord2("scr_firework_indep_repeat_burst_rwb", coords.x, coords.y, coords.z, 0, 0, 0, 1.2f, true, true, true); + }); + } + + if (spawner::vehicle::settings::vars::m_vars.m_upgrades && !garage) { + ::vehicle::vars::max_upgrades(vehicle, spawner::vehicle::settings::vars::m_vars.m_upgrades_var); + } + + if (spawner::vehicle::settings::vars::m_vars.m_notification) { + menu::notify::stacked("Spawner", util::va::va("%s %s!", native::get_label_text(native::get_display_name_from_vehicle_model(model)), spawner_menu::get()->get_string("spawned").c_str())); + } + + callback(vehicle); + vehicle::manage::vars::m_vars.m_vehicles.push_back({ vehicle, model, native::get_game_timer() }); + } + }); + } + } + + void spawn_vehicle(uint32_t model, std::function callback, bool garage) { + switch (m_vars.m_flag) { + case SPAWNER_SELF: + do_spawn_vehicle(model, callback, garage, menu::player::get_local_player().m_id); + break; + + case SPAWNER_PLAYER: + do_spawn_vehicle(model, callback, garage, menu::player::get_selected_player().m_id); + break; + + case SPAWNER_SESSION: + menu::player::for_each([=] (menu::player::player_context& player) { + do_spawn_vehicle(model, callback, garage, player.m_id); + }); + + break; + } + } + + void do_spawn_object(uint32_t model, std::string esp_name, std::function callback, Player player_id) { + if (native::is_model_in_cdimage(model)) { + util::fiber::pool::add([=] { + menu::control::simple_request_model(model); + + menu::player::player_context& target = menu::player::get_player(player_id); + + bool network = target.m_id != menu::player::get_local_player().m_id; + math::vector3 coords = target.m_coords; + Entity object = 0; + + if (!network) { + object = native::create_object(model, target.m_coords.x, target.m_coords.y, target.m_coords.z, true, true, false); + } else { + coords = target.m_coords + (native::get_entity_forward_vector(target.m_entity) * 5.f); + object = native::create_object(model, coords.x, coords.y, coords.z, true, true, false); + } + + if (native::does_entity_exist(object)) { + std::string name = ""; + if (esp_name.empty()) { + name = util::va::va("%X", model); + } else name = esp_name; + + if (spawner::object::settings::vars::m_vars.m_fade) { + native::network_fade_in_entity(object, true, false); + } + + if (spawner::object::settings::vars::m_vars.m_blip) { + Blip blip = native::add_blip_for_entity(object); + native::set_blip_sprite(blip, 408); + native::set_blip_colour(blip, 17); + native::set_blip_display(blip, 8); + native::set_blip_category(blip, 4); + } + + if (spawner::object::settings::vars::m_vars.m_particle_fx) { + menu::control::request_particle({ "proj_indep_firework_v2", "scr_firework_indep_repeat_burst_rwb" }, [=] (std::pair asset) { + native::start_particle_fx_non_looped_at_coord2("scr_firework_indep_repeat_burst_rwb", coords.x, coords.y, coords.z, 0, 0, 0, 1.2f, true, true, true); + }); + } + + if (spawner::object::settings::vars::m_vars.m_notification) { + menu::notify::stacked("Spawner", util::va::va("%s %s!", name.c_str(), spawner_menu::get()->get_string("spawned").c_str())); + } + + callback(object); + spawner::object::manage::vars::m_vars.m_objects.push_back({ object, model, name, native::get_game_timer() }); + } + }); + } + } + + void spawn_object(uint32_t model, std::string esp_name, std::function callback) { + switch (m_vars.m_flag) { + case SPAWNER_SELF: + do_spawn_object(model, esp_name, callback, menu::player::get_local_player().m_id); + break; + + case SPAWNER_PLAYER: + do_spawn_object(model, esp_name, callback, menu::player::get_selected_player().m_id); + break; + + case SPAWNER_SESSION: + menu::player::for_each([=] (menu::player::player_context& player) { + do_spawn_object(model, esp_name, callback, player.m_id); + }); + + break; + } + } + + void do_spawn_ped(uint32_t model, std::string esp_name, std::function callback, Player player_id) { + if (native::is_model_in_cdimage(model)) { + util::fiber::pool::add([=] { + menu::control::simple_request_model(model); + + menu::player::player_context& target = menu::player::get_player(player_id); + + bool network = target.m_id != menu::player::get_local_player().m_id; + math::vector3 coords = target.m_coords; + Entity ped = 0; + + if (!network) { + ped = native::create_ped(21, model, target.m_coords.x, target.m_coords.y, target.m_coords.z, 0.f, true, false); + } else { + coords = target.m_coords + (native::get_entity_forward_vector(target.m_entity) * 5.f); + ped = native::create_ped(21, model, coords.x, coords.y, coords.z, 0.f, true, false); + } + + if (native::does_entity_exist(ped)) { + std::string name = ""; + if (esp_name.empty()) { + name = std::string(util::va::va("%X", model)); + } else name = esp_name; + + if (spawner::ped::settings::vars::m_vars.m_fade) { + native::network_fade_in_entity(ped, true, false); + } + + if (spawner::ped::settings::vars::m_vars.m_blip) { + Blip blip = native::add_blip_for_entity(ped); + native::set_blip_sprite(blip, 408); + native::set_blip_colour(blip, 17); + native::set_blip_display(blip, 8); + native::set_blip_category(blip, 4); + } + + if (spawner::ped::settings::vars::m_vars.m_particle_fx) { + menu::control::request_particle({ "proj_indep_firework_v2", "scr_firework_indep_repeat_burst_rwb" }, [=] (std::pair asset) { + native::start_particle_fx_non_looped_at_coord2("scr_firework_indep_repeat_burst_rwb", coords.x, coords.y, coords.z, 0, 0, 0, 1.2f, true, true, true); + }); + } + + if (spawner::ped::settings::vars::m_vars.m_notification) { + menu::notify::stacked("Spawner", util::va::va("%s %s!", name.c_str(), spawner_menu::get()->get_string("spawned").c_str())); + } + + callback(ped); + spawner::ped::manage::vars::m_vars.m_peds.push_back({ ped, model, name, native::get_game_timer() }); + } + }); + } + } + + void spawn_ped(uint32_t model, std::string esp_name, std::function callback) { + switch (m_vars.m_flag) { + case SPAWNER_SELF: + do_spawn_ped(model, esp_name, callback, menu::player::get_local_player().m_id); + break; + + case SPAWNER_PLAYER: + do_spawn_ped(model, esp_name, callback, menu::player::get_selected_player().m_id); + break; + + case SPAWNER_SESSION: + menu::player::for_each([=] (menu::player::player_context& player) { + do_spawn_ped(model, esp_name, callback, player.m_id); + }); + + break; + } + } +} + +void spawner_menu::load() { + set_name("Spawner"); + set_parent(); + + add_option(scroll_option(SCROLL, "Spawn Type") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(type), type) + .add_click([this] { update_once(); })); + + for (int i = 0; i < 23; i++) { + add_string(get_class_name(i)); + } + + add_string("Input the model! (Hint: name, hash or numeric)"); + add_string("Spawn Settings"); + add_string("Manage Spawned Vehicles"); + add_string("Manage Spawned Objects"); + add_string("Input Custom Vehicle"); + add_string("Input Custom Object"); + add_string("Modded Vehicles"); + add_string("Garage Vehicles"); + add_string("Categories"); + add_string("spawned"); + add_string("Small"); + add_string("Medium"); + add_string("Large"); + add_string("Save and Load"); + + populate_vehicle_list(); + + spawner_vehicle_selected_menu::get(); + spawner_vehicle_settings_menu::get(); + spawner_vehicle_manage_menu::get(); + spawner_vehicle_modded_menu::get(); + spawner_vehicle_garage_menu::get(); + + spawner_object_settings_menu::get(); + spawner_object_manage_menu::get(); + spawner_object_building_menu::get(); + spawner_object_select_menu::get(); + + spawner_ped_settings_menu::get(); + spawner_ped_manage_menu::get(); +} + +void spawner_menu::update() {} + +void spawner_menu::update_once() { + clear_options(1); + + switch (m_vars.m_flag) { + case SPAWNER_SELF: + set_parent(); + break; + + case SPAWNER_PLAYER: + set_parent(); + break; + + case SPAWNER_SESSION: + set_parent(); + break; + } + + menu::panels::toggle_panel_render("PANEL_VEHICLE_PREVIEW", false); + + // Vehicle + if (m_vars.m_type == 0) { + add_option(submenu_option(get_string("Spawn Settings")) + .add_submenu()); + + add_option(submenu_option(get_string("Save and Load")) + .add_submenu()); + + add_option(submenu_option(get_string("Manage Spawned Vehicles")) + .add_submenu() + .add_requirement([] { return m_vars.m_flag == SPAWNER_SELF; })); + + add_option(submenu_option(get_string("Modded Vehicles")) + .add_submenu() + .add_requirement([] { return m_vars.m_flag == SPAWNER_SELF; })); + + add_option(submenu_option(get_string("Garage Vehicles")) + .add_submenu()); + + add_option(button_option(get_string("Input Custom Vehicle")) + .add_keyboard(get_string("Input the model! (Hint: name, hash or numeric)"), 30, [](button_option* option, const char* text) { + if (text) { + if (text[0] == '0' && (text[1] == 'x' || text[1] == 'X')) { + // hash + spawn_vehicle((uint32_t)_strtoui64(text, 0, 0)); + } else { + std::string str_name(text); + if (std::find_if(str_name.begin(), str_name.end(), [](unsigned char c) { return !std::isdigit(c); }) == str_name.end()) { + // numeric + spawn_vehicle((uint32_t)atoi(text)); + } else { + // name + spawn_vehicle(native::get_hash_key(text)); + } + } + } + })); + + add_option(break_option(get_string("Categories"))); + + for (int i = 0; i < 23; i++) { + add_option(submenu_option(get_string(get_class_name(i))) + .add_submenu() + .add_click([=] { spawner::vehicle::selected::vars::m_vars.m_selected = i; })); + } + + return; + } + + // Object + if (m_vars.m_type == 1) { + add_option(submenu_option(get_string("Spawn Settings")) + .add_submenu()); + + add_option(submenu_option(get_string("Manage Spawned Objects")) + .add_submenu() + .add_requirement([] { return m_vars.m_flag == SPAWNER_SELF; })); + + add_option(submenu_option(get_string("Buildings")) + .add_submenu()); + + add_option(button_option(get_string("Input Custom Object")) + .add_keyboard(get_string("Input the model! (Hint: name, hash or numeric)"), 30, [](button_option* option, const char* text) { + if (text) { + if (text[0] == '0' && (text[1] == 'x' || text[1] == 'X')) { + // hash + spawn_object((uint32_t)_strtoui64(text, 0, 0), text); + } else { + std::string str_name(text); + if (std::find_if(str_name.begin(), str_name.end(), [](unsigned char c) { return !std::isdigit(c); }) == str_name.end()) { + // numeric + spawn_object((uint32_t)atoi(text), text); + } else { + // name + spawn_object(native::get_hash_key(text), text); + } + } + } + })); + + add_option(break_option(get_string("Categories"))); + + add_option(submenu_option(get_string("Small")) + .add_submenu() + .add_click([] { + spawner::object::select::vars::m_vars.m_list = global::lists::g_object_model_small; + spawner::object::select::vars::m_vars.m_size = NUMOF(global::lists::g_object_model_small); + })); + + add_option(submenu_option(get_string("Medium")) + .add_submenu() + .add_click([] { + spawner::object::select::vars::m_vars.m_list = global::lists::g_object_model_medium; + spawner::object::select::vars::m_vars.m_size = NUMOF(global::lists::g_object_model_medium); + })); + + add_option(submenu_option(get_string("Large")) + .add_submenu() + .add_click([] { + spawner::object::select::vars::m_vars.m_list = global::lists::g_object_model_large; + spawner::object::select::vars::m_vars.m_size = NUMOF(global::lists::g_object_model_large); + })); + + add_option(submenu_option(get_string("Flags")) + .add_submenu() + .add_click([] { + spawner::object::select::vars::m_vars.m_list = global::lists::g_object_model_flags; + spawner::object::select::vars::m_vars.m_size = NUMOF(global::lists::g_object_model_flags); + })); + + return; + } + + // Ped + if (m_vars.m_type == 2) { + add_option(submenu_option(get_string("Spawn Settings")) + .add_submenu()); + + add_option(submenu_option(get_string("Manage Spawned Peds")) + .add_submenu() + .add_requirement([] { return m_vars.m_flag == SPAWNER_SELF; })); + + add_option(button_option(get_string("Input Custom Ped")) + .add_keyboard(get_string("Input the model! (Hint: name, hash or numeric)"), 30, [](button_option* option, const char* text) { + if (text) { + if (text[0] == '0' && (text[1] == 'x' || text[1] == 'X')) { + // hash + spawn_ped((uint32_t)_strtoui64(text, 0, 0), text); + } else { + std::string str_name(text); + if (std::find_if(str_name.begin(), str_name.end(), [](unsigned char c) { return !std::isdigit(c); }) == str_name.end()) { + // numeric + spawn_ped((uint32_t)atoi(text), text); + } else { + // name + spawn_ped(native::get_hash_key(text), text); + } + } + } + })); + + add_option(break_option(get_string("Categories"))); + + add_option(scroll_option(SCROLLSELECT, "Popular") + .add_translate() + .add_scroll(m_vars.m_popular, 0, NUMOF(global::lists::g_ped_model_popular), global::lists::g_ped_model_popular).loop() + .add_click([] { spawn_ped(global::lists::g_ped_model_popular[m_vars.m_popular].m_result, global::lists::g_ped_model_popular[m_vars.m_popular].m_name.get()); })); + + add_option(scroll_option(SCROLLSELECT, "Story") + .add_translate() + .add_scroll(m_vars.m_story, 0, NUMOF(global::lists::g_ped_model_story), global::lists::g_ped_model_story).loop() + .add_click([] { spawn_ped(global::lists::g_ped_model_story[m_vars.m_story].m_result, global::lists::g_ped_model_story[m_vars.m_story].m_name.get()); })); + + add_option(scroll_option(SCROLLSELECT, "Animals") + .add_translate() + .add_scroll(m_vars.m_animals, 0, NUMOF(global::lists::g_ped_model_animal), global::lists::g_ped_model_animal).loop() + .add_click([] { spawn_ped(global::lists::g_ped_model_animal[m_vars.m_animals].m_result, global::lists::g_ped_model_animal[m_vars.m_animals].m_name.get()); })); + + add_option(scroll_option(SCROLLSELECT, "Emergency") + .add_translate() + .add_scroll(m_vars.m_emergency, 0, NUMOF(global::lists::g_ped_model_emergency), global::lists::g_ped_model_emergency).loop() + .add_click([] { spawn_ped(global::lists::g_ped_model_emergency[m_vars.m_emergency].m_result, global::lists::g_ped_model_emergency[m_vars.m_emergency].m_name.get()); })); + + add_option(scroll_option(SCROLLSELECT, "Role") + .add_translate() + .add_scroll(m_vars.m_role, 0, NUMOF(global::lists::g_ped_model_role), global::lists::g_ped_model_role).loop() + .add_click([] { spawn_ped(global::lists::g_ped_model_role[m_vars.m_role].m_result, global::lists::g_ped_model_role[m_vars.m_role].m_name.get()); })); + + add_option(scroll_option(SCROLLSELECT, "Ambient") + .add_translate() + .add_scroll(m_vars.m_ambient, 0, NUMOF(global::lists::g_ped_model_ambient), global::lists::g_ped_model_ambient).loop() + .add_click([] { spawn_ped(global::lists::g_ped_model_ambient[m_vars.m_ambient].m_result, global::lists::g_ped_model_ambient[m_vars.m_ambient].m_name.get()); })); + + add_option(scroll_option(SCROLLSELECT, "Misc") + .add_translate() + .add_scroll(m_vars.m_misc, 0, NUMOF(global::lists::g_ped_model_misc), global::lists::g_ped_model_misc).loop() + .add_click([] { spawn_ped(global::lists::g_ped_model_misc[m_vars.m_misc].m_result, global::lists::g_ped_model_misc[m_vars.m_misc].m_name.get()); })); + } +} + +void spawner_menu::feature_update() {} + +spawner_menu* g_instance; +spawner_menu* spawner_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner.h b/GTAV/src/menu/base/submenus/main/spawner.h new file mode 100644 index 0000000..19c6e36 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner.h @@ -0,0 +1,45 @@ +#pragma once +#include "menu/base/submenu.h" +#include + +class spawner_menu : public menu::submenu::submenu { +public: + static spawner_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::vars { + enum eSpawnerFlag { + SPAWNER_SELF, + SPAWNER_PLAYER, + SPAWNER_SESSION + }; + + struct variables { + int m_type; + std::array, 23> m_vehicle_hashes; + + int m_popular; + int m_story; + int m_animals; + int m_emergency; + int m_role; + int m_ambient; + int m_misc; + + eSpawnerFlag m_flag; + }; + + void spawn_vehicle(uint32_t hash, std::function callback = [](Entity) {}, bool garage = false); + void spawn_object(uint32_t model, std::string esp_name, std::function callback = [](Entity) {}); + void spawn_ped(uint32_t model, std::string esp_name, std::function callback = [](Entity) {}); + const char* get_class_name(int class_id); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/edit/spawner_object_manage_edit.cpp b/GTAV/src/menu/base/submenus/main/spawner/object/edit/spawner_object_manage_edit.cpp new file mode 100644 index 0000000..86aa41d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/edit/spawner_object_manage_edit.cpp @@ -0,0 +1,113 @@ +#include "spawner_object_manage_edit.h" +#include "menu/base/submenu_handler.h" +#include "../spawner_object_manage.h" +#include "util/fiber_pool.h" +#include "menu/base/util/control.h" + +using namespace spawner::object::manage::edit::vars; + +namespace spawner::object::manage::edit::vars { + variables m_vars; + + scroll_struct teleport[] = { + { localization("To Me", true), 0 }, + { localization("To Object", true), 1 } + }; + + void run_entity(int index, int* var, Entity ent) { + switch (index) { + case 0: { // Teleport + if (*var == 0) { + math::vector3 forward = menu::player::get_local_player().m_coords + (native::get_entity_forward_vector(menu::player::get_local_player().m_entity) * 5.f); + native::set_entity_coords(ent, forward.x, forward.y, forward.z, false, false, false, false); + } else { + math::vector3 coords = native::get_entity_coords(ent, false); + native::set_entity_coords(menu::player::get_local_player().m_entity, coords.x, coords.y, coords.z, false, false, false, false); + } + + break; + } + + case 1: // Freeze Position + native::freeze_entity_position(ent, true); + break; + + case 2: // Delete + native::set_entity_as_mission_entity(ent, true, true); + native::delete_entity(&ent); + break; + } + } + + void run(int index, bool editing_all, bool editing_pool, int* var, Entity entity) { + if (editing_all || editing_pool) { + std::vector entities; + if (editing_all) { + for (spawner::object::manage::vars::spawned_object object : spawner::object::manage::vars::m_vars.m_objects) { + entities.push_back(object.m_handle); + } + } else { + global::vars::g_object_pool->for_each([&](Entity ent, void* ped) { + entities.push_back(ent); + }); + } + + util::fiber::pool::add([=] { + for (Entity ent : entities) { + menu::control::simple_request_control(ent); + run_entity(index, var, ent); + } + }); + } else { + menu::control::request_control(entity, [=](Entity ent) { + run_entity(index, var, ent); + }); + } + } +} + +void spawner_object_manage_edit_menu::load() { + set_name("Manage"); + set_parent(); + + add_option(submenu_option("ESP") + .add_translate() + .add_submenu() + .add_click([] { + helper_esp_menu::get()->set_parent(); + helper::esp::vars::m_vars.m_current = m_vars.m_esp; + })); + + add_option(scroll_option(SCROLLSELECT, "Teleport") + .add_translate() + .add_click([] { run(0, m_vars.m_editing_all, false, &m_vars.m_teleport, spawner::object::manage::vars::m_vars.m_objects[m_vars.m_selected].m_handle); }) + .add_scroll(m_vars.m_teleport, 0, NUMOF(teleport), teleport)); + + add_option(button_option("Freeze Position") + .add_translate() + .add_click([] { run(1, m_vars.m_editing_all, false, 0, spawner::object::manage::vars::m_vars.m_objects[m_vars.m_selected].m_handle); })); + + add_option(button_option("Delete") + .add_translate() + .add_click([] { + run(2, m_vars.m_editing_all, false, nullptr, spawner::object::manage::vars::m_vars.m_objects[m_vars.m_selected].m_handle); + menu::submenu::handler::set_submenu_previous(true); + })); +} + +void spawner_object_manage_edit_menu::update() {} + +void spawner_object_manage_edit_menu::update_once() {} + +void spawner_object_manage_edit_menu::feature_update() {} + +spawner_object_manage_edit_menu* g_instance; +spawner_object_manage_edit_menu* spawner_object_manage_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_object_manage_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/edit/spawner_object_manage_edit.h b/GTAV/src/menu/base/submenus/main/spawner/object/edit/spawner_object_manage_edit.h new file mode 100644 index 0000000..9d496f5 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/edit/spawner_object_manage_edit.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" +#include "../../../helper/helper_esp.h" + +class spawner_object_manage_edit_menu : public menu::submenu::submenu { +public: + static spawner_object_manage_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_object_manage_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::object::manage::edit::vars { + struct variables { + bool m_editing_all = false; + int m_teleport = 0; + std::size_t m_selected; + + helper::esp::vars::esp_context* m_esp; + }; + + extern variables m_vars; + void run(int index, bool editing_all = m_vars.m_editing_all, bool editing_pool = false, int* var = nullptr, Entity entity = 0); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_building.cpp b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_building.cpp new file mode 100644 index 0000000..5fa17b9 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_building.cpp @@ -0,0 +1,186 @@ +#include "spawner_object_building.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" +#include "menu/base/util/control.h" + +using namespace spawner::object::building::vars; + +namespace spawner::object::building::vars { + variables m_vars; + + scroll_struct types[] = { + { localization("Half Pipe - Straight", true), 0 }, + { localization("Half Pipe - Curved Wide", true), 1 }, + { localization("Half Pipe - Curved Small", true), 2 }, + { localization("Forest", true), 3 }, + }; + + void build_straight_half_pipe() { + menu::control::request_model(0xF66F582F, [](uint32_t model) { + math::vector3 min_dimensions; + math::vector3 max_dimensions; + + native::get_model_dimensions(model, &min_dimensions, &max_dimensions); + math::vector3 diameter = max_dimensions - min_dimensions; + + math::vector3 spawn_coords = menu::player::get_local_player().m_coords + (native::get_entity_forward_vector(menu::player::get_local_player().m_ped) * 10.f); + native::get_ground_z_for_3d_coord(spawn_coords.x, spawn_coords.y, spawn_coords.z, &spawn_coords.z, false); + + Object first_object = native::create_object(model, spawn_coords.x, spawn_coords.y, spawn_coords.z, true, true, false); + if (native::does_entity_exist(first_object)) { + native::set_entity_rotation(first_object, -m_vars.m_vertical_angle, 0.f, menu::player::get_local_player().m_heading, 2, true); + native::freeze_entity_position(first_object, true); + + Object next_object = first_object; + for (int i = 0; i < m_vars.m_count[0]; i++) { + math::vector3 next = native::get_offset_from_entity_in_world_coords(next_object, 0.f, diameter.y - 0.15f, 0.f); + next_object = native::create_object(model, next.x, next.y, next.z, true, true, false); + if (native::does_entity_exist(next_object)) { + native::set_entity_rotation(next_object, -m_vars.m_vertical_angle, 0.f, menu::player::get_local_player().m_heading, 2, true); + native::freeze_entity_position(next_object, true); + } + } + } + }); + } + + void build_curved_half_pipe_wide() { + menu::control::request_model(0xF66F582F, [](uint32_t model) { + math::vector3 min_dimensions; + math::vector3 max_dimensions; + + native::get_model_dimensions(model, &min_dimensions, &max_dimensions); + math::vector3 diameter = max_dimensions - min_dimensions; + + math::vector3 spawn_coords = menu::player::get_local_player().m_coords + (native::get_entity_forward_vector(menu::player::get_local_player().m_ped) * 10.f); + native::get_ground_z_for_3d_coord(spawn_coords.x, spawn_coords.y, spawn_coords.z, &spawn_coords.z, false); + + Object first_object = native::create_object(model, spawn_coords.x, spawn_coords.y, spawn_coords.z, true, true, false); + if (native::does_entity_exist(first_object)) { + native::set_entity_heading(first_object, menu::player::get_local_player().m_heading); + native::freeze_entity_position(first_object, true); + + Object next_object = first_object; + for (int i = 0; i < m_vars.m_count[1]; i++) { + math::vector3 next = native::get_offset_from_entity_in_world_coords(next_object, 0.4f, diameter.y - 0.15f - 0.7f, 0.f); + next_object = native::create_object(model, next.x, next.y, next.z, true, true, false); + if (native::does_entity_exist(next_object)) { + native::set_entity_heading(next_object, menu::player::get_local_player().m_heading - ((i + 1) * 5.f)); + native::freeze_entity_position(next_object, true); + } + } + } + }); + } + + void build_curved_half_pipe_small() { + menu::control::request_model(0xF66F582F, [](uint32_t model) { + math::vector3 min_dimensions; + math::vector3 max_dimensions; + + native::get_model_dimensions(model, &min_dimensions, &max_dimensions); + math::vector3 diameter = max_dimensions - min_dimensions; + + math::vector3 spawn_coords = menu::player::get_local_player().m_coords + (native::get_entity_forward_vector(menu::player::get_local_player().m_ped) * 10.f); + native::get_ground_z_for_3d_coord(spawn_coords.x, spawn_coords.y, spawn_coords.z, &spawn_coords.z, false); + + Object first_object = native::create_object(model, spawn_coords.x, spawn_coords.y, spawn_coords.z, true, true, false); + if (native::does_entity_exist(first_object)) { + native::set_entity_heading(first_object, menu::player::get_local_player().m_heading); + native::freeze_entity_position(first_object, true); + + Object next_object = first_object; + for (int i = 0; i < m_vars.m_count[2]; i++) { + math::vector3 next = native::get_offset_from_entity_in_world_coords(next_object, 0.7f, diameter.y - 0.15f - 1.4f, 0.f); + next_object = native::create_object(model, next.x, next.y, next.z, true, true, false); + if (native::does_entity_exist(next_object)) { + native::set_entity_heading(next_object, menu::player::get_local_player().m_heading - ((i + 1) * 10.5f)); + native::freeze_entity_position(next_object, true); + } + } + } + }); + } + + void build_forest() { + uint32_t trees[] = { + 0xE43D331B, + 0x16770e68, + 0xb355b730, + 0xEDF5CD3C, + 0x4D11F2B, + 0x49e472aa + }; + + menu::control::request_model(0xEDF5CD3C, [=](uint32_t model) {math::vector3 min_dimensions; + math::vector3 spawn_coords = menu::player::get_local_player().m_coords; + native::get_ground_z_for_3d_coord(spawn_coords.x, spawn_coords.y, spawn_coords.z, &spawn_coords.z, false); + + Object first_object = native::create_object(model, spawn_coords.x, spawn_coords.y, spawn_coords.z, true, true, false); + if (native::does_entity_exist(first_object)) { + native::freeze_entity_position(first_object, true); + + Object next_object = first_object; + for (int i = 0; i < m_vars.m_count[3]; i++) { + math::vector3 next = native::get_offset_from_entity_in_world_coords(next_object, native::get_random_float_in_range(-10.f, 10.f), native::get_random_float_in_range(-10.f, 10.f), 0.f); + uint32_t ModelHash = trees[native::get_random_int_in_range(0, 5)]; + + next_object = native::create_object(ModelHash, next.x, next.y, spawn_coords.z - (ModelHash == 0xb355b730 ? 0.f : 3.f), true, true, false); + if (native::does_entity_exist(next_object)) { + native::freeze_entity_position(next_object, true); + } + } + } + }); + } + + void create() { + switch (m_vars.m_type) { + case 0: build_straight_half_pipe(); break; + case 1: build_curved_half_pipe_wide(); break; + case 2: build_curved_half_pipe_small(); break; + case 3: build_forest(); break; + } + } +} + +void spawner_object_building_menu::load() { + set_name("Buildings"); + set_parent(); + + add_option(scroll_option(SCROLL, "Type") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(types), types)); + + add_option(number_option(SCROLL, "Count") + .add_translate() + .add_number(m_vars.m_count[0], "%i", 1).add_min(1).add_max(50) + .add_update([](number_option* option, int pos) { option->add_number(m_vars.m_count[m_vars.m_type], "%i", 1); })); + + add_option(number_option(SCROLL, "Vertical Angle") + .add_translate() + .add_number(m_vars.m_vertical_angle, "%.0f", 1.f).add_min(-90.f).add_max(90.f) + .add_hover([] { menu::renderer::draw_sprite({ "ozarktextures", "half_pipe_side.png" }, { 0.5f, 0.5f }, { 0.1f, 0.1f }, -m_vars.m_vertical_angle, { 255, 255, 255, 255 }); }) + .add_requirement([] { return m_vars.m_type == 0; })); + + add_option(button_option("Create Building") + .add_translate().add_hotkey() + .add_click(create)); +} + +void spawner_object_building_menu::update() {} + +void spawner_object_building_menu::update_once() {} + +void spawner_object_building_menu::feature_update() {} + +spawner_object_building_menu* g_instance; +spawner_object_building_menu* spawner_object_building_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_object_building_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_building.h b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_building.h new file mode 100644 index 0000000..905835f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_building.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class spawner_object_building_menu : public menu::submenu::submenu { +public: + static spawner_object_building_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_object_building_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::object::building::vars { + struct variables { + int m_type; + int m_count[4] = { 30, 33, 15, 20 }; + float m_vertical_angle; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_manage.cpp b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_manage.cpp new file mode 100644 index 0000000..70caa12 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_manage.cpp @@ -0,0 +1,122 @@ +#include "spawner_object_manage.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" +#include "edit/spawner_object_manage_edit.h" + +using namespace spawner::object::manage::vars; + +namespace spawner::object::manage::vars { + variables m_vars; +} + +void spawner_object_manage_menu::load() { + set_name("Manage Spawned Objects"); + set_parent(); + + add_option(submenu_option("All Objects") + .add_translate().add_hotkey() + .add_click([] { + spawner::object::manage::edit::vars::m_vars.m_editing_all = true; + spawner::object::manage::edit::vars::m_vars.m_esp = &m_vars.m_esp; + }) + .add_submenu()); + + add_option(button_option("Clear Manager") + .add_translate().add_hotkey() + .add_click([this] { m_vars.m_objects.clear(); update_once(); }) + .add_tooltip("Does NOT delete the objects from the world, only from the manager")); + + add_option(break_option("Objects") + .add_translate()); + + add_string("~m~None"); +} + +void spawner_object_manage_menu::update() {} + +void spawner_object_manage_menu::update_once() { + clear_options(3); + + for (std::size_t i = 0; i < m_vars.m_objects.size(); i++) { + if (!native::does_entity_exist(m_vars.m_objects[i].m_handle)) { + m_vars.m_objects.erase(m_vars.m_objects.begin() + i); + } + } + + if (!m_vars.m_objects.empty()) { + for (std::size_t i = 0; i < m_vars.m_objects.size(); i++) { + add_option(submenu_option(util::va::va("[%i] %s", i + 1, m_vars.m_objects[i].m_name.c_str())) + .add_click([=] { + spawner::object::manage::edit::vars::m_vars.m_editing_all = false; + spawner::object::manage::edit::vars::m_vars.m_esp = &m_vars.m_objects[i].m_esp; + spawner::object::manage::edit::vars::m_vars.m_selected = i; + }) + .add_submenu()); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void spawner_object_manage_menu::feature_update() { + for (spawned_object& object : m_vars.m_objects) { + if (object.m_esp.m_name || m_vars.m_esp.m_name) { + helper::esp::vars::name_esp(object.m_esp.m_name ? object.m_esp : m_vars.m_esp, object.m_handle, object.m_name); + } + + if (object.m_esp.m_snapline || m_vars.m_esp.m_snapline) { + helper::esp::vars::snapline_esp(object.m_esp.m_snapline ? object.m_esp : m_vars.m_esp, object.m_handle); + } + + if (object.m_esp.m_2d_box || m_vars.m_esp.m_2d_box) { + helper::esp::vars::_2d_esp(object.m_esp.m_2d_box ? object.m_esp : m_vars.m_esp, object.m_handle, 0); + } + + if (object.m_esp.m_2d_corners || m_vars.m_esp.m_2d_corners) { + helper::esp::vars::_2d_esp(object.m_esp.m_2d_corners ? object.m_esp : m_vars.m_esp, object.m_handle, 1); + } + + if (object.m_esp.m_3d_box || m_vars.m_esp.m_3d_box) { + helper::esp::vars::_3d_esp(object.m_esp.m_3d_box ? object.m_esp : m_vars.m_esp, object.m_handle, 0); + } + + if (object.m_esp.m_3d_axis || m_vars.m_esp.m_3d_axis) { + helper::esp::vars::_3d_esp(object.m_esp.m_3d_axis ? object.m_esp : m_vars.m_esp, object.m_handle, 1); + } + + if (object.m_esp.m_skeleton_bones || m_vars.m_esp.m_skeleton_bones) { + helper::esp::vars::skeleton_esp(object.m_esp.m_skeleton_bones ? object.m_esp : m_vars.m_esp, object.m_handle, 0); + } + + if (object.m_esp.m_skeleton_joints || m_vars.m_esp.m_skeleton_joints) { + helper::esp::vars::skeleton_esp(object.m_esp.m_skeleton_joints ? object.m_esp : m_vars.m_esp, object.m_handle, 1); + } + + if (!m_vars.m_esp.m_2d_box_rainbow.m_rainbow_toggle && object.m_esp.m_2d_box_rainbow.m_rainbow_toggle) object.m_esp.m_2d_box_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_2d_corners_rainbow.m_rainbow_toggle && object.m_esp.m_2d_corners_rainbow.m_rainbow_toggle) object.m_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_3d_box_rainbow.m_rainbow_toggle && object.m_esp.m_3d_box_rainbow.m_rainbow_toggle) object.m_esp.m_3d_box_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_name_bg_rainbow.m_rainbow_toggle && object.m_esp.m_name_bg_rainbow.m_rainbow_toggle) object.m_esp.m_name_bg_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_name_text_rainbow.m_rainbow_toggle && object.m_esp.m_name_text_rainbow.m_rainbow_toggle) object.m_esp.m_name_text_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_skeleton_bones_rainbow.m_rainbow_toggle && object.m_esp.m_skeleton_bones_rainbow.m_rainbow_toggle) object.m_esp.m_skeleton_bones_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_skeleton_joints_rainbow.m_rainbow_toggle && object.m_esp.m_skeleton_joints_rainbow.m_rainbow_toggle) object.m_esp.m_skeleton_joints_rainbow.m_rainbow.run(); + } + + if (m_vars.m_esp.m_2d_box_rainbow.m_rainbow_toggle) m_vars.m_esp.m_2d_box_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_2d_corners_rainbow.m_rainbow_toggle) m_vars.m_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_3d_box_rainbow.m_rainbow_toggle) m_vars.m_esp.m_3d_box_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_name_bg_rainbow.m_rainbow_toggle) m_vars.m_esp.m_name_bg_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_name_text_rainbow.m_rainbow_toggle) m_vars.m_esp.m_name_text_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_skeleton_bones_rainbow.m_rainbow_toggle) m_vars.m_esp.m_skeleton_bones_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_skeleton_joints_rainbow.m_rainbow_toggle) m_vars.m_esp.m_skeleton_joints_rainbow.m_rainbow.run(); +} + +spawner_object_manage_menu* g_instance; +spawner_object_manage_menu* spawner_object_manage_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_object_manage_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_manage.h b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_manage.h new file mode 100644 index 0000000..2b0547c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_manage.h @@ -0,0 +1,33 @@ +#pragma once +#include "menu/base/submenu.h" +#include "../../helper/helper_esp.h" + +class spawner_object_manage_menu : public menu::submenu::submenu { +public: + static spawner_object_manage_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_object_manage_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::object::manage::vars { + struct spawned_object { + Object m_handle = 0; + uint32_t m_model_hash = 0; + std::string m_name = ""; + int m_creation_time = 0; + helper::esp::vars::esp_context m_esp; + }; + + struct variables { + helper::esp::vars::esp_context m_esp; + std::vector m_objects; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_select.cpp b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_select.cpp new file mode 100644 index 0000000..62e8714 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_select.cpp @@ -0,0 +1,40 @@ +#include "spawner_object_select.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" + +using namespace spawner::object::select::vars; + +namespace spawner::object::select::vars { + variables m_vars; +} + +void spawner_object_select_menu::load() { + set_name("Object Spawner"); + set_parent(); +} + +void spawner_object_select_menu::update() {} + +void spawner_object_select_menu::update_once() { + clear_options(0); + + for (int i = 0; i < m_vars.m_size; i++) { + add_option(button_option(m_vars.m_list[i].m_name.get()) + .add_click([=] { + spawner::vars::spawn_object(m_vars.m_list[i].m_result, m_vars.m_list[i].m_name.get()); + })); + } +} + +void spawner_object_select_menu::feature_update() {} + +spawner_object_select_menu* g_instance; +spawner_object_select_menu* spawner_object_select_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_object_select_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_select.h b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_select.h new file mode 100644 index 0000000..9ac045d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_select.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class spawner_object_select_menu: public menu::submenu::submenu { +public: + static spawner_object_select_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_object_select_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::object::select::vars { + struct variables { + scroll_struct* m_list; + int m_size; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_settings.cpp b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_settings.cpp new file mode 100644 index 0000000..d1b3e9c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_settings.cpp @@ -0,0 +1,47 @@ +#include "spawner_object_settings.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" + +using namespace spawner::object::settings::vars; + +namespace spawner::object::settings::vars { + variables m_vars; +} + +void spawner_object_settings_menu::load() { + set_name("Spawn Settings", true, false); + set_parent(); + + add_option(toggle_option("Notification") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_notification).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Blip") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_blip).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Particle FX") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_particle_fx).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Fade") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_fade).add_savable(get_submenu_name_stack())); +} + +void spawner_object_settings_menu::update() {} + +void spawner_object_settings_menu::update_once() {} + +void spawner_object_settings_menu::feature_update() {} + +spawner_object_settings_menu* g_instance; +spawner_object_settings_menu* spawner_object_settings_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_object_settings_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_settings.h b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_settings.h new file mode 100644 index 0000000..eeb5f40 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/object/spawner_object_settings.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class spawner_object_settings_menu : public menu::submenu::submenu { +public: + static spawner_object_settings_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_object_settings_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::object::settings::vars { + struct variables { + bool m_notification; + bool m_blip; + bool m_particle_fx; + bool m_fade; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/ped/edit/spawner_ped_manage_edit.cpp b/GTAV/src/menu/base/submenus/main/spawner/ped/edit/spawner_ped_manage_edit.cpp new file mode 100644 index 0000000..6711dd8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/ped/edit/spawner_ped_manage_edit.cpp @@ -0,0 +1,146 @@ +#include "spawner_ped_manage_edit.h" +#include "menu/base/submenu_handler.h" +#include "../spawner_ped_manage.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "menu/base/util/control.h" + +using namespace spawner::ped::manage::edit::vars; + +namespace spawner::ped::manage::edit::vars { + variables m_vars; + + scroll_struct teleport[] = { + { localization("To Me", true), 0 }, + { localization("To Object", true), 1 } + }; + + void run_entity(int index, int* var, Entity ent) { + if (ent == menu::player::get_local_player().m_ped || native::is_ped_a_player(ent)) return; + + switch (index) { + case 0: { // Teleport + if (*var == 0) { + math::vector3 forward = menu::player::get_local_player().m_coords + (native::get_entity_forward_vector(menu::player::get_local_player().m_entity) * 5.f); + native::set_entity_coords(ent, forward.x, forward.y, forward.z, false, false, false, false); + } else { + math::vector3 coords = native::get_entity_coords(ent, false); + native::set_entity_coords(menu::player::get_local_player().m_entity, coords.x, coords.y, coords.z, false, false, false, false); + } + + break; + } + + case 1: // Delete + native::set_entity_as_mission_entity(ent, true, true); + native::delete_entity(&ent); + break; + + case 2: + native::resurrect_ped(ent); + native::revive_injured_ped(ent); + native::set_entity_health(ent, 100); + native::clear_ped_tasks_immediately(ent); + break; + + case 3: + native::apply_damage_to_ped(ent, 30000, true); + break; + + case 4: { + math::vector3 coords = native::get_entity_coords(ent, true); + native::add_explosion(coords.x, coords.y, coords.z, 0, 10.f, true, false, 0.f, false); + break; + } + + case 5: + native::clone_ped(ent, 0.f, true, true); + break; + } + } + + void run(int index, bool editing_all, bool editing_pool, int* var, Entity entity) { + if (editing_all || editing_pool) { + std::vector entities; + if (editing_all) { + for (spawner::ped::manage::vars::spawned_ped ped : spawner::ped::manage::vars::m_vars.m_peds) { + entities.push_back(ped.m_handle); + } + } else { + global::vars::g_ped_pool->for_each([&](Entity ent, void* ped) { + entities.push_back(ent); + }); + } + + util::fiber::pool::add([=] { + for (Entity ent : entities) { + menu::control::simple_request_control(ent); + run_entity(index, var, ent); + } + }); + } else { + menu::control::request_control(entity, [=](Entity ent) { + run_entity(index, var, ent); + }); + } + } +} + +void spawner_ped_manage_edit_menu::load() { + set_name("Manage"); + set_parent(); + + add_option(submenu_option("ESP") + .add_translate() + .add_submenu() + .add_click([] { + helper_esp_menu::get()->set_parent(); + helper::esp::vars::m_vars.m_current = m_vars.m_esp; + m_vars.m_esp->m_ped = true; + })); + + add_option(scroll_option(SCROLLSELECT, "Teleport") + .add_translate() + .add_click([] { run(0, m_vars.m_editing_all, false, &m_vars.m_teleport, spawner::ped::manage::vars::m_vars.m_peds[m_vars.m_selected].m_handle); }) + .add_scroll(m_vars.m_teleport, 0, NUMOF(teleport), teleport)); + + add_option(button_option("Revive") + .add_translate() + .add_click([] { run(2, m_vars.m_editing_all, false, nullptr, spawner::ped::manage::vars::m_vars.m_peds[m_vars.m_selected].m_handle); })); + + add_option(button_option("Kill") + .add_translate() + .add_click([] { run(3, m_vars.m_editing_all, false, nullptr, spawner::ped::manage::vars::m_vars.m_peds[m_vars.m_selected].m_handle); })); + + add_option(button_option("Explode") + .add_translate() + .add_click([] { run(4, m_vars.m_editing_all, false, nullptr, spawner::ped::manage::vars::m_vars.m_peds[m_vars.m_selected].m_handle); })); + + add_option(button_option("Clone") + .add_translate() + .add_click([] { run(5, m_vars.m_editing_all, false, nullptr, spawner::ped::manage::vars::m_vars.m_peds[m_vars.m_selected].m_handle); })); + + add_option(button_option("Delete") + .add_translate() + .add_click([] { + run(1, m_vars.m_editing_all, false, nullptr, spawner::ped::manage::vars::m_vars.m_peds[m_vars.m_selected].m_handle); + menu::submenu::handler::set_submenu_previous(true); + })); +} + +void spawner_ped_manage_edit_menu::update() {} + +void spawner_ped_manage_edit_menu::update_once() {} + +void spawner_ped_manage_edit_menu::feature_update() {} + +spawner_ped_manage_edit_menu* g_instance; +spawner_ped_manage_edit_menu* spawner_ped_manage_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_ped_manage_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/ped/edit/spawner_ped_manage_edit.h b/GTAV/src/menu/base/submenus/main/spawner/ped/edit/spawner_ped_manage_edit.h new file mode 100644 index 0000000..976a1af --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/ped/edit/spawner_ped_manage_edit.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/submenus/main/helper/helper_esp.h" + +class spawner_ped_manage_edit_menu : public menu::submenu::submenu { +public: + static spawner_ped_manage_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_ped_manage_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::ped::manage::edit::vars { + struct variables { + bool m_editing_all = false; + int m_teleport = 0; + std::size_t m_selected; + + helper::esp::vars::esp_context* m_esp; + }; + + extern variables m_vars; + void run(int index, bool editing_all = m_vars.m_editing_all, bool editing_pool = false, int* var = nullptr, Entity entity = 0); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_manage.cpp b/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_manage.cpp new file mode 100644 index 0000000..823e7be --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_manage.cpp @@ -0,0 +1,123 @@ +#include "spawner_ped_manage.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" +#include "edit/spawner_ped_manage_edit.h" + +using namespace spawner::ped::manage::vars; + +namespace spawner::ped::manage::vars { + variables m_vars; +} + +void spawner_ped_manage_menu::load() { + set_name("Manage Spawned Peds"); + set_parent(); + + add_option(submenu_option("All Peds") + .add_translate().add_hotkey() + .add_click([] { + spawner::ped::manage::edit::vars::m_vars.m_editing_all = true; + spawner::ped::manage::edit::vars::m_vars.m_esp = &m_vars.m_esp; + m_vars.m_esp.m_ped = true; + }) + .add_submenu()); + + add_option(button_option("Clear Manager") + .add_translate().add_hotkey() + .add_click([this] { m_vars.m_peds.clear(); update_once(); }) + .add_tooltip("Does NOT delete the peds from the world, only from the manager")); + + add_option(break_option("Peds") + .add_translate()); + + add_string("~m~None"); +} + +void spawner_ped_manage_menu::update() {} + +void spawner_ped_manage_menu::update_once() { + clear_options(3); + + for (std::size_t i = 0; i < m_vars.m_peds.size(); i++) { + if (!native::does_entity_exist(m_vars.m_peds[i].m_handle)) { + m_vars.m_peds.erase(m_vars.m_peds.begin() + i); + } + } + + if (!m_vars.m_peds.empty()) { + for (std::size_t i = 0; i < m_vars.m_peds.size(); i++) { + add_option(submenu_option(util::va::va("[%i] %s", i + 1, m_vars.m_peds[i].m_name.c_str())) + .add_click([=] { + spawner::ped::manage::edit::vars::m_vars.m_editing_all = false; + spawner::ped::manage::edit::vars::m_vars.m_esp = &m_vars.m_peds[i].m_esp; + spawner::ped::manage::edit::vars::m_vars.m_selected = i; + }) + .add_submenu()); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void spawner_ped_manage_menu::feature_update() { + for (spawned_ped& ped : m_vars.m_peds) { + if (ped.m_esp.m_name || m_vars.m_esp.m_name) { + helper::esp::vars::name_esp(ped.m_esp.m_name ? ped.m_esp : m_vars.m_esp, ped.m_handle, ped.m_name); + } + + if (ped.m_esp.m_snapline || m_vars.m_esp.m_snapline) { + helper::esp::vars::snapline_esp(ped.m_esp.m_snapline ? ped.m_esp : m_vars.m_esp, ped.m_handle); + } + + if (ped.m_esp.m_2d_box || m_vars.m_esp.m_2d_box) { + helper::esp::vars::_2d_esp(ped.m_esp.m_2d_box ? ped.m_esp : m_vars.m_esp, ped.m_handle, 0); + } + + if (ped.m_esp.m_2d_corners || m_vars.m_esp.m_2d_corners) { + helper::esp::vars::_2d_esp(ped.m_esp.m_2d_corners ? ped.m_esp : m_vars.m_esp, ped.m_handle, 1); + } + + if (ped.m_esp.m_3d_box || m_vars.m_esp.m_3d_box) { + helper::esp::vars::_3d_esp(ped.m_esp.m_3d_box ? ped.m_esp : m_vars.m_esp, ped.m_handle, 0); + } + + if (ped.m_esp.m_3d_axis || m_vars.m_esp.m_3d_axis) { + helper::esp::vars::_3d_esp(ped.m_esp.m_3d_axis ? ped.m_esp : m_vars.m_esp, ped.m_handle, 1); + } + + if (ped.m_esp.m_skeleton_bones || m_vars.m_esp.m_skeleton_bones) { + helper::esp::vars::skeleton_esp(ped.m_esp.m_skeleton_bones ? ped.m_esp : m_vars.m_esp, ped.m_handle, 0); + } + + if (ped.m_esp.m_skeleton_joints || m_vars.m_esp.m_skeleton_joints) { + helper::esp::vars::skeleton_esp(ped.m_esp.m_skeleton_joints ? ped.m_esp : m_vars.m_esp, ped.m_handle, 1); + } + + if (!m_vars.m_esp.m_2d_box_rainbow.m_rainbow_toggle && ped.m_esp.m_2d_box_rainbow.m_rainbow_toggle) ped.m_esp.m_2d_box_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_2d_corners_rainbow.m_rainbow_toggle && ped.m_esp.m_2d_corners_rainbow.m_rainbow_toggle) ped.m_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_3d_box_rainbow.m_rainbow_toggle && ped.m_esp.m_3d_box_rainbow.m_rainbow_toggle) ped.m_esp.m_3d_box_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_name_bg_rainbow.m_rainbow_toggle && ped.m_esp.m_name_bg_rainbow.m_rainbow_toggle) ped.m_esp.m_name_bg_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_name_text_rainbow.m_rainbow_toggle && ped.m_esp.m_name_text_rainbow.m_rainbow_toggle) ped.m_esp.m_name_text_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_skeleton_bones_rainbow.m_rainbow_toggle && ped.m_esp.m_skeleton_bones_rainbow.m_rainbow_toggle) ped.m_esp.m_skeleton_bones_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_skeleton_joints_rainbow.m_rainbow_toggle && ped.m_esp.m_skeleton_joints_rainbow.m_rainbow_toggle) ped.m_esp.m_skeleton_joints_rainbow.m_rainbow.run(); + } + + if (m_vars.m_esp.m_2d_box_rainbow.m_rainbow_toggle) m_vars.m_esp.m_2d_box_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_2d_corners_rainbow.m_rainbow_toggle) m_vars.m_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_3d_box_rainbow.m_rainbow_toggle) m_vars.m_esp.m_3d_box_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_name_bg_rainbow.m_rainbow_toggle) m_vars.m_esp.m_name_bg_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_name_text_rainbow.m_rainbow_toggle) m_vars.m_esp.m_name_text_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_skeleton_bones_rainbow.m_rainbow_toggle) m_vars.m_esp.m_skeleton_bones_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_skeleton_joints_rainbow.m_rainbow_toggle) m_vars.m_esp.m_skeleton_joints_rainbow.m_rainbow.run(); +} + +spawner_ped_manage_menu* g_instance; +spawner_ped_manage_menu* spawner_ped_manage_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_ped_manage_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_manage.h b/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_manage.h new file mode 100644 index 0000000..93d2ab9 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_manage.h @@ -0,0 +1,33 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/submenus/main/helper/helper_esp.h" + +class spawner_ped_manage_menu : public menu::submenu::submenu { +public: + static spawner_ped_manage_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_ped_manage_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::ped::manage::vars { + struct spawned_ped { + Ped m_handle = 0; + uint32_t m_model_hash = 0; + std::string m_name = ""; + int m_creation_time = 0; + helper::esp::vars::esp_context m_esp; + }; + + struct variables { + helper::esp::vars::esp_context m_esp; + std::vector m_peds; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_settings.cpp b/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_settings.cpp new file mode 100644 index 0000000..12d961c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_settings.cpp @@ -0,0 +1,47 @@ +#include "spawner_ped_settings.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" + +using namespace spawner::ped::settings::vars; + +namespace spawner::ped::settings::vars { + variables m_vars; +} + +void spawner_ped_settings_menu::load() { + set_name("Spawn Settings", true, false); + set_parent(); + + add_option(toggle_option("Notification") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_notification).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Blip") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_blip).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Particle FX") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_particle_fx).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Fade") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_fade).add_savable(get_submenu_name_stack())); +} + +void spawner_ped_settings_menu::update() {} + +void spawner_ped_settings_menu::update_once() {} + +void spawner_ped_settings_menu::feature_update() {} + +spawner_ped_settings_menu* g_instance; +spawner_ped_settings_menu* spawner_ped_settings_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_ped_settings_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_settings.h b/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_settings.h new file mode 100644 index 0000000..855c77d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/ped/spawner_ped_settings.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class spawner_ped_settings_menu : public menu::submenu::submenu { +public: + static spawner_ped_settings_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_ped_settings_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::ped::settings::vars { + struct variables { + bool m_notification; + bool m_blip; + bool m_particle_fx; + bool m_fade; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/edit/spawner_vehicle_manage_edit.cpp b/GTAV/src/menu/base/submenus/main/spawner/vehicle/edit/spawner_vehicle_manage_edit.cpp new file mode 100644 index 0000000..4612369 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/edit/spawner_vehicle_manage_edit.cpp @@ -0,0 +1,233 @@ +#include "spawner_vehicle_manage_edit.h" +#include "menu/base/submenu_handler.h" +#include "../spawner_vehicle_manage.h" +#include "menu/base/util/control.h" +#include "util/fiber_pool.h" +#include "global/lists.h" +#include "rage/engine.h" + +using namespace spawner::vehicle::manage::edit::vars; + +namespace spawner::vehicle::manage::edit::vars { + variables m_vars; + + scroll_struct driver[] = { + { localization("Kick", true), 0 }, + { localization("Kill", true), 1 } + }; + + scroll_struct boost[] = { + { localization("Forwards", true), 100.f }, + { localization("Backwards", true), -100.f } + }; + + scroll_struct teleport[] = { + { localization("To Me", true), 0 }, + { localization("To Vehicle", true), 1 } + }; + + void run_entity(int index, int* var, Entity ent) { + switch (index) { + case 0: + if (*var == 0) { + Ped driver = native::get_ped_in_vehicle_seat(ent, -1, 0); + if (driver) { + if (native::is_ped_a_player(driver) && driver != menu::player::get_local_player().m_ped) { + menu::control::request_control(ent, [](Entity, int) {}, true); + } else { + native::clear_ped_tasks_immediately(driver); + } + } + } else { + native::set_vehicle_out_of_control(ent, true, true); + } + + break; + + case 1: + native::set_vehicle_forward_speed(ent, boost[*var].m_result); + break; + + case 2: { + std::pair, math::vector3_> n = global::lists::g_acrobatics[*var].m_result; + native::apply_force_to_entity(ent, 1, n.first.x, n.first.y, n.first.z, n.second.x, n.second.y, n.second.z, 0, true, true, true, false, true); + break; + } + + case 3: { + uint64_t address = rage::engine::get_entity_address(ent); + if (address) { + rage::engine::set_vehicle_gravity(address, global::lists::g_gravity[*var].m_result); + } + + break; + } + + case 4: { + if (*var == 0) { + math::vector3 forward = menu::player::get_local_player().m_coords + (native::get_entity_forward_vector(menu::player::get_local_player().m_entity) * 5.f); + native::set_entity_coords(ent, forward.x, forward.y, forward.z, false, false, false, false); + } else { + math::vector3 coords = native::get_entity_coords(ent, false); + native::set_entity_coords(menu::player::get_local_player().m_entity, coords.x, coords.y, coords.z, false, false, false, false); + } + + break; + } + + case 5: + native::set_vehicle_fixed(ent); + break; + + case 6: + native::task_everyone_leave_vehicle(ent); + for (int i = -1; i < native::get_vehicle_number_of_passengers(ent); i++) { + Ped ped = native::get_ped_in_vehicle_seat(ent, i, 0); + if (ped) { + native::clear_ped_tasks_immediately(ped); + } + } + + break; + + case 7: + native::set_vehicle_custom_primary_colour(ent, native::get_random_int_in_range(0, 255), native::get_random_int_in_range(0, 255), native::get_random_int_in_range(0, 255)); + native::set_vehicle_custom_secondary_colour(ent, native::get_random_int_in_range(0, 255), native::get_random_int_in_range(0, 255), native::get_random_int_in_range(0, 255)); + break; + + case 8: + native::start_vehicle_horn(ent, 2000, 0, false); + break; + + case 9: { + Ped ped = native::get_ped_in_vehicle_seat(ent, -1, 0); + if (ped) { + native::task_vehicle_drive_to_coord(ped, ent, menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, 100, 1, native::get_entity_model(ent), 16777216, 4, -1); + } + + break; + } + + case 10: + native::network_explode_vehicle(ent, true, false, false); + break; + + case 11: + native::set_entity_as_mission_entity(ent, true, true); + native::delete_entity(&ent); + break; + } + } + + void run(int index, bool editing_all, bool editing_pool, int* var, Entity entity) { + if (editing_all || editing_pool) { + std::vector entities; + if (editing_all) { + for (spawner::vehicle::manage::vars::spawned_vehicle vehicle : spawner::vehicle::manage::vars::m_vars.m_vehicles) { + entities.push_back(vehicle.m_handle); + } + } else { + global::vars::g_vehicle_pool->for_each([&](Entity ent, void* veh) { + entities.push_back(ent); + }); + } + + util::fiber::pool::add([=] { + for (Entity ent : entities) { + menu::control::simple_request_control(ent); + run_entity(index, var, ent); + } + }); + } else { + menu::control::request_control(entity, [=](Entity ent) { + run_entity(index, var, ent); + }); + } + } +} + +void spawner_vehicle_manage_edit_menu::load() { + set_name("Manage"); + set_parent(); + + add_option(submenu_option("ESP") + .add_translate() + .add_submenu() + .add_click([] { + helper_esp_menu::get()->set_parent(); + helper::esp::vars::m_vars.m_current = m_vars.m_esp; + })); + + add_option(scroll_option(SCROLLSELECT, "Driver") + .add_translate() + .add_scroll(m_vars.m_driver, 0, NUMOF(driver), driver) + .add_click([] { run(0, m_vars.m_editing_all, false, &m_vars.m_driver, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(scroll_option(SCROLLSELECT, "Boost") + .add_translate() + .add_scroll(m_vars.m_boost, 0, NUMOF(boost), boost) + .add_click([] { run(1, m_vars.m_editing_all, false, &m_vars.m_boost, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(scroll_option, math::vector3_>>(SCROLLSELECT, "Acrobatics") + .add_translate() + .add_scroll(m_vars.m_acrobatics, 0, NUMOF(global::lists::g_acrobatics), global::lists::g_acrobatics) + .add_click([] { run(2, m_vars.m_editing_all, false, &m_vars.m_acrobatics, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(scroll_option(SCROLLSELECT, "Gravity") + .add_translate() + .add_scroll(m_vars.m_gravity, 0, NUMOF(global::lists::g_gravity), global::lists::g_gravity) + .add_click([] { run(3, m_vars.m_editing_all, false, &m_vars.m_gravity, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(scroll_option(SCROLLSELECT, "Teleport") + .add_translate() + .add_scroll(m_vars.m_teleport, 0, NUMOF(teleport), teleport) + .add_click([] { run(4, m_vars.m_editing_all, false, &m_vars.m_teleport, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(button_option("Fix") + .add_translate() + .add_click([] { run(5, m_vars.m_editing_all, false, nullptr, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(button_option("Empty Vehicle Seats") + .add_translate() + .add_click([] { run(6, m_vars.m_editing_all, false, nullptr, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(button_option("Random Paint") + .add_translate() + .add_click([] { run(7, m_vars.m_editing_all, false, nullptr, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(button_option("Honk Horn") + .add_translate() + .add_click([] { run(8, m_vars.m_editing_all, false, nullptr, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(button_option("Drive to Me") + .add_translate() + .add_click([] { run(9, m_vars.m_editing_all, false, nullptr, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(button_option("Explode") + .add_translate() + .add_click([] { run(10, m_vars.m_editing_all, false, nullptr, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); })); + + add_option(button_option("Delete") + .add_translate() + .add_click([] { + run(11, m_vars.m_editing_all, false, nullptr, spawner::vehicle::manage::vars::m_vars.m_vehicles[m_vars.m_selected].m_handle); + menu::submenu::handler::set_submenu_previous(true); + })); +} + +void spawner_vehicle_manage_edit_menu::update() {} + +void spawner_vehicle_manage_edit_menu::update_once() {} + +void spawner_vehicle_manage_edit_menu::feature_update() {} + +spawner_vehicle_manage_edit_menu* g_instance; +spawner_vehicle_manage_edit_menu* spawner_vehicle_manage_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_vehicle_manage_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/edit/spawner_vehicle_manage_edit.h b/GTAV/src/menu/base/submenus/main/spawner/vehicle/edit/spawner_vehicle_manage_edit.h new file mode 100644 index 0000000..46d763f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/edit/spawner_vehicle_manage_edit.h @@ -0,0 +1,34 @@ +#pragma once +#include "menu/base/submenu.h" +#include "../../../helper/helper_esp.h" + +class spawner_vehicle_manage_edit_menu : public menu::submenu::submenu { +public: + static spawner_vehicle_manage_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_vehicle_manage_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::vehicle::manage::edit::vars { + struct variables { + bool m_editing_all = false; + std::size_t m_selected; + + int m_driver; + int m_boost; + int m_acrobatics; + int m_gravity; + int m_teleport; + + helper::esp::vars::esp_context* m_esp; + }; + + extern variables m_vars; + void run(int index, bool editing_all = m_vars.m_editing_all, bool editing_pool = false, int* var = nullptr, Entity entity = 0); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/garage/spawner_vehicle_garage_selected.cpp b/GTAV/src/menu/base/submenus/main/spawner/vehicle/garage/spawner_vehicle_garage_selected.cpp new file mode 100644 index 0000000..0abb276 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/garage/spawner_vehicle_garage_selected.cpp @@ -0,0 +1,550 @@ +#include "spawner_vehicle_garage_selected.h" +#include "menu/base/submenu_handler.h" +#include "../spawner_vehicle_garage.h" +#include "menu/base/util/global.h" +#include "../../../spawner.h" +#include "rage/types/global_types.h" + +using namespace spawner::vehicle::garage::selected::vars; + +namespace spawner::vehicle::garage::selected::vars { + variables m_vars; + + enum GlobalGarageIndices { // void func_355(bool bParam0, var uParam1) + Garage_PlateType = 0, + Garage_PlateText = 1, + Garage_PaintPrimary = 5, + Garage_PaintSecondary = 6, + Garage_PaintPearlescant = 7, + Garage_PaintRim = 8, + Garage_ModCount = 9, + Garage_Spoiler = 10, + Garage_FrontBumper = 11, + Garage_RearBumper = 12, + Garage_Skirts = 13, + Garage_Exhaust = 14, + Garage_Frame = 15, + Garage_Grille = 16, + Garage_Hood = 17, + Garage_LeftFender = 18, + Garage_RightFender = 19, + Garage_Roof = 20, + Garage_Engine = 21, + Garage_Brakes = 22, + Garage_Transmission = 23, + Garage_Horn = 24, + Garage_Suspension = 25, + Garage_Armor = 26, + Garage_UNK_17 = 27, + Garage_Turbo = 28, + Garage_UNK_19 = 29, + Garage_TireSmoke = 30, + Garage_UNK_21 = 31, + Garage_Xenon = 32, + Garage_FrontRims = 33, + Garage_RearRims = 34, + + // Bennys + Garage_PlateHolder, + Garage_VanityPlates, + Garage_TrimDesign, + Garage_Ornaments, + Garage_Dashboard, + Garage_Dial, + Garage_DoorSpeaker, + Garage_Seats, + Garage_SteeringWheel, + Garage_ShifterLeavers, + Garage_Plaques, + Garage_Speakers, + Garage_Trunk, + Garage_Hydrulics, + Garage_EngineBlock, + Garage_AirFilter, + Garage_Struts, + Garage_ArchCovers, + Garage_Aerials, + Garage_Trim, + Garage_Tank, + Garage_Windows, + Garage_UNK47, + Garage_Livery, + Garage_FrontWheelCustom, + Garage_RearWheelCustom, + + Garage_SmokeR = 62, + Garage_SmokeG = 63, + Garage_SmokeB = 64, + + Garage_WindowTint = 65, + Garage_Model = 66, + Garage_ConvertibleRoofState = 68, + Garage_WheelType = 69, + Garage_CustomR = 71, + Garage_CustomG = 72, + Garage_CustomB = 73, + Garage_NeonR = 74, + Garage_NeonG = 75, + Garage_NeonB = 76, + Garage_AppearanceBitset = 77, // Custom Paints + /**/Garage_AppearanceBitset_SecondaryCustom = 12, + Garage_GeneralBitset = 103, // Insurance + Garage_DefaultRadioStation = 120, + }; + + template + T get_slot_trait(int Slot, int Trait) { + return *menu::script_global(rage::global::_155_garage_base).at(Slot, rage::global::_155_garage_size).at(Trait).get(); + } + + template + void set_slot_trait(int Slot, int Trait, T Value) { + menu::script_global(rage::global::_155_garage_base).at(Slot, rage::global::_155_garage_size).at(Trait).as() = Value; + native::set_bit(menu::script_global(rage::global::_155_garage_base).at(Slot, rage::global::_155_garage_size).at(Garage_GeneralBitset).get(), 12); + } + + namespace scripts { + int func_1086(int iParam0, int iParam1) { + switch (iParam0) { + case joaat("faction2"): + case joaat("buccaneer2"): + case joaat("chino2"): + case joaat("moonbeam2"): + case joaat("primo2"): + case joaat("voodoo"): + return 1; + break; + + case joaat("sabregt2"): + if (!menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset1).as()) { + return 0; + } else { + return 1; + } + break; + + case joaat("tornado5"): + if (!menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset2).as()) { + return 0; + } else { + return 1; + } + break; + + case joaat("virgo2"): + if (!menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset3).as()) { + return 0; + } else { + return 1; + } + break; + + case joaat("minivan2"): + if (!menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset4).as()) { + return 0; + } else { + return 1; + } + break; + + case joaat("slamvan3"): + if (!menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset5).as()) { + return 0; + } else { + return 1; + } + break; + + case joaat("faction3"): + if (!menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset6).as()) { + return 0; + } else { + return 1; + } + break; + + case joaat("sultanrs"): + case joaat("banshee2"): + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + break; + + case joaat("comet3"): + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset7).as()) { + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + } + return 0; + break; + + case joaat("diablous2"): + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset8).as()) { + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + } + return 0; + break; + + case joaat("fcr2"): + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset9).as()) { + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + } + return 0; + break; + + case joaat("elegy"): + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset10).as()) { + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + } + return 0; + break; + + case joaat("nero2"): + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset11).as()) { + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + } + return 0; + break; + + case joaat("italigtb2"): + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset12).as()) { + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + } + return 0; + break; + + case joaat("specter2"): + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset13).as()) { + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + } + return 0; + break; + + case joaat("technical3"): + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset14).as()) { + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + } + return 0; + break; + + case joaat("insurgent3"): + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset15).as()) { + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + } + return 0; + break; + + case joaat("slamvan4"): + case joaat("slamvan5"): + case joaat("slamvan6"): + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + break; + + case joaat("issi4"): + case joaat("issi5"): + case joaat("issi6"): + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + break; + + case joaat("impaler2"): + case joaat("impaler3"): + case joaat("impaler4"): + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + break; + + case joaat("deathbike"): + case joaat("deathbike2"): + case joaat("deathbike3"): + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + break; + + case joaat("monster3"): + case joaat("monster4"): + case joaat("monster5"): + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + break; + + case joaat("dominator4"): + case joaat("dominator5"): + case joaat("dominator6"): + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + break; + + case joaat("bruiser"): + case joaat("bruiser2"): + case joaat("bruiser3"): + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + break; + + case joaat("youga3"): + case joaat("gauntlet5"): + case joaat("yosemite3"): + if ((iParam1 & 1) != 0) { + return 0; + } + return 1; + break; + + case joaat("manana2"): + case joaat("peyote3"): + case joaat("glendale2"): + return 1; + break; + } + return 0; + } + + int func_1085(int iParam0, int iParam1) { + int iVar0; + int iVar1; + float fVar2; + int iVar3; + + if (native::does_entity_exist(iParam0) && native::is_vehicle_driveable(iParam0, 0)) { + switch (native::get_entity_model(iParam0)) { + case joaat("tornado5"): + switch (iParam1) { + case 0: + return 0; + break; + + case 1: + return 1; + break; + + case 2: + return 2; + break; + + case 3: + return 3; + break; + + case 4: + return 4; + break; + + case 5: + return 4; + break; + } + break; + + case joaat("faction3"): + return 3; + break; + } + + iVar0 = native::get_num_vehicle_mods(iParam0, 38); + iVar1 = native::get_num_vehicle_mods(iParam0, 24); + fVar2 = (float(iParam1 + 1) / float(iVar0)); + iVar3 = (int)(floor((float(iVar1) * fVar2)) - 1); + if (iVar3 < 0) { + iVar3 = 0; + } + if (iVar3 >= iVar0) { + iVar3 = (iVar0 - 1); + } + return iVar3; + } + return 0; + } + + bool script_apply_mods(Vehicle* iParam0, int Slot) { + int iVar0; + + if (!native::is_vehicle_driveable(*iParam0, 0)) { + return 0; + } + + if (native::get_num_mod_kits(*iParam0) == 0) { + return 0; + } + + native::set_vehicle_mod_kit(*iParam0, 0); + + iVar0 = 0; + while (iVar0 < get_slot_trait(Slot, 9)) { + if ((((iVar0 == 17 || iVar0 == 18) || iVar0 == 19) || iVar0 == 20) || iVar0 == 21) { + native::toggle_vehicle_mod(*iParam0, iVar0, get_slot_trait(Slot, 10 + iVar0) > 0); + } else if (iVar0 == 22) { + if (get_slot_trait(Slot, 10 + iVar0) > 0) { + native::toggle_vehicle_mod(*iParam0, iVar0, true); + if (get_slot_trait(Slot, 10 + iVar0) == 1) { + native::set_vehicle_xenon_lights_colour(*iParam0, 255); + } else { + native::set_vehicle_xenon_lights_colour(*iParam0, (get_slot_trait(Slot, 10 + iVar0) - 2)); + } + } else { + native::toggle_vehicle_mod(*iParam0, iVar0, false); + } + } else if (native::get_vehicle_mod(*iParam0, iVar0) != (get_slot_trait(Slot, 10 + iVar0) - 1)) { + native::remove_vehicle_mod(*iParam0, iVar0); + if (get_slot_trait(Slot, 10 + iVar0) > 0) { + if (iVar0 == 23) { + native::set_vehicle_mod(*iParam0, iVar0, (get_slot_trait(Slot, 10 + iVar0) - 1), get_slot_trait(Slot, Garage_FrontWheelCustom) > 0); + } else if (iVar0 == 24) { + native::set_vehicle_mod(*iParam0, iVar0, (get_slot_trait(Slot, 10 + iVar0) - 1), get_slot_trait(Slot, Garage_RearWheelCustom) > 0); + } else { + native::set_vehicle_mod(*iParam0, iVar0, (get_slot_trait(Slot, 10 + iVar0) - 1), false); + } + } + } + + iVar0++; + } + + if (func_1086(native::get_entity_model(*iParam0), 1) && native::get_vehicle_mod(*iParam0, 24) != func_1085(*iParam0, (get_slot_trait(Slot, 39) - 1))) { + native::set_vehicle_mod(*iParam0, 24, func_1085(*iParam0, (get_slot_trait(Slot, 39) - 1)), false); + } + + native::set_vehicle_strong(*iParam0, true); + native::set_vehicle_has_strong_axles(*iParam0, true); + return 1; + } + } + + void apply_mods(Vehicle veh, int slot) { + native::set_vehicle_number_plate_text_index(veh, get_slot_trait(slot, Garage_PlateType)); + native::set_vehicle_number_plate_text(veh, (const char*)menu::script_global(rage::global::_155_garage_base).at(slot, rage::global::_155_garage_size).at(Garage_PlateText).get()); + + native::set_vehicle_wheel_type(veh, get_slot_trait(slot, Garage_WheelType)); + + scripts::script_apply_mods(&veh, slot); + native::set_vehicle_window_tint(veh, get_slot_trait(slot, Garage_WindowTint)); + + int convertible_roof_state = get_slot_trait(slot, Garage_ConvertibleRoofState); + if ((convertible_roof_state == 0 || convertible_roof_state == 3) || convertible_roof_state == 5) { + native::raise_convertible_roof(veh, true); + } else { + native::lower_convertible_roof(veh, true); + } + + native::set_vehicle_neon_light_enabled(veh, 0, native::is_bit_set(get_slot_trait(slot, Garage_AppearanceBitset), 30)); + native::set_vehicle_neon_light_enabled(veh, 1, native::is_bit_set(get_slot_trait(slot, Garage_AppearanceBitset), 31)); + native::set_vehicle_neon_light_enabled(veh, 2, native::is_bit_set(get_slot_trait(slot, Garage_AppearanceBitset), 28)); + native::set_vehicle_neon_light_enabled(veh, 3, native::is_bit_set(get_slot_trait(slot, Garage_AppearanceBitset), 29)); + + int pearlescant = get_slot_trait(slot, Garage_PaintPearlescant); + if (pearlescant < 0) { pearlescant = 0; } + + int rim = get_slot_trait(slot, Garage_PaintRim); + if (rim < 0) { rim = 0; } + + native::set_vehicle_extra_colours(veh, pearlescant, rim); + + if (get_slot_trait(slot, Garage_PaintPrimary) != -1 && get_slot_trait(slot, Garage_PaintSecondary) != -1) { + native::set_vehicle_colours(veh, get_slot_trait(slot, Garage_PaintPrimary), get_slot_trait(slot, Garage_PaintSecondary)); + } + + color_rgba smoke_color; + smoke_color.r = get_slot_trait(slot, Garage_SmokeR); + smoke_color.g = get_slot_trait(slot, Garage_SmokeG); + smoke_color.b = get_slot_trait(slot, Garage_SmokeB); + + native::set_vehicle_tyre_smoke_color(veh, smoke_color.r, smoke_color.g, smoke_color.b); + + color_rgba neon_color; + neon_color.r = get_slot_trait(slot, Garage_NeonR); + neon_color.g = get_slot_trait(slot, Garage_NeonG); + neon_color.b = get_slot_trait(slot, Garage_NeonB); + + native::set_vehicle_neon_lights_colour(veh, neon_color.r, neon_color.g, neon_color.b); + + color_rgba custom_color; + custom_color.r = get_slot_trait(slot, Garage_CustomR); + custom_color.g = get_slot_trait(slot, Garage_CustomG); + custom_color.b = get_slot_trait(slot, Garage_CustomB); + + if (native::is_bit_set(get_slot_trait(slot, Garage_AppearanceBitset), 13)) { + native::set_vehicle_custom_primary_colour(veh, custom_color.r, custom_color.g, custom_color.b); + } + + if (native::is_bit_set(get_slot_trait(slot, Garage_AppearanceBitset), 12)) { + native::set_vehicle_custom_secondary_colour(veh, custom_color.r, custom_color.g, custom_color.b); + } + } + + void spawn_vehicle(int slot) { + spawner::vars::spawn_vehicle(get_slot_trait(slot, Garage_Model), [=](Entity vehicle) { + apply_mods(vehicle, slot); + }, true); + } +} + +void spawner_vehicle_garage_selected_menu::load() { + set_name("Garage Vehicles"); + set_parent(); +} + +void spawner_vehicle_garage_selected_menu::update() {} + +void spawner_vehicle_garage_selected_menu::update_once() { + clear_options(0); + + for (int slot : spawner::vehicle::garage::vars::m_vars.m_valid_slots[m_vars.m_slot]) { + add_option(button_option(native::get_label_text(native::get_display_name_from_vehicle_model(get_slot_trait(slot, Garage_Model)))) + .add_click([=] { spawn_vehicle(slot); })); + } +} + +void spawner_vehicle_garage_selected_menu::feature_update() {} + +spawner_vehicle_garage_selected_menu* g_instance; +spawner_vehicle_garage_selected_menu* spawner_vehicle_garage_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_vehicle_garage_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/garage/spawner_vehicle_garage_selected.h b/GTAV/src/menu/base/submenus/main/spawner/vehicle/garage/spawner_vehicle_garage_selected.h new file mode 100644 index 0000000..14afaf3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/garage/spawner_vehicle_garage_selected.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class spawner_vehicle_garage_selected_menu : public menu::submenu::submenu { +public: + static spawner_vehicle_garage_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_vehicle_garage_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::vehicle::garage::selected::vars { + struct variables { + int m_slot; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_garage.cpp b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_garage.cpp new file mode 100644 index 0000000..b70a5d5 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_garage.cpp @@ -0,0 +1,641 @@ +#include "spawner_vehicle_garage.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" +#include "menu/base/util/global.h" +#include "menu/base/util/helpers.h" +#include "menu/base/util/stats.h" +#include "garage/spawner_vehicle_garage_selected.h" +#include "rage/types/global_types.h" + +using namespace spawner::vehicle::garage::vars; + +namespace spawner::vehicle::garage::vars { + variables m_vars; + + const char* garage_labels[] = { + "PROPERTY_HOUSE", + "MULTI_PROPERTY_1", + "MULTI_PROPERTY_2", + "MULTI_PROPERTY_3", + "MULTI_PROPERTY_4", + "PROP_OFFICE", + "PROP_CLUBHOUSE", + "MULTI_PROPERTY_5", + "PROP_OFFICE_GAR1", + "PROP_OFFICE_GAR2", + "PROP_OFFICE_GAR3", + "PROP_IE_WAREHOUSE", + "PROP_HANGAR", + "PROP_DEFUNCBASE", + "PROP_NIGHTCLUB", + "PROP_MEGAWARE_GAR1", + "PROP_MEGAWARE_GAR2", + "PROP_MEGAWARE_GAR3", + "PROP_ARENAWARS_GAR1", + "PROP_ARENAWARS_GAR2", + "PROP_ARENAWARS_GAR3", + "PROP_CASINO_GAR1", + "PROP_ARCADE_GAR1", + "MULTI_PROPERTY_6", + "MULTI_PROPERTY_7" + }; + + namespace scripts { + int func_603(int iParam0, int iParam1) { + if (iParam1 == -1) { + switch (iParam0) { + case 91: + case 92: + case 93: + case 94: + case 95: + case 96: + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + return 1; + break; + } + } else if (iParam1 == 91) { + switch (iParam0) { + case 91: + case 92: + case 93: + case 94: + case 95: + case 96: + return 1; + break; + } + } else if (iParam1 == 97) { + switch (iParam0) { + case 97: + case 98: + case 99: + case 100: + case 101: + case 102: + return 1; + break; + } + } + return 0; + } + + int func_604(int iParam0) { + switch (iParam0) { + case 87: + case 88: + case 89: + case 90: + return 1; + break; + } + return 0; + } + + int func_607(int iParam0) { + if (iParam0 != -1) { + return native::is_bit_set(menu::script_global(rage::global::_155_player_stats_struct).at(iParam0, rage::global::_155_player_stats_size).at(rage::global::_155_property_int_offset_16).at(rage::global::_155_property_int_offset_16_1).as(), 2); + } + + return 0; + } + + int func_285(int iParam0) { + if (iParam0 != -1) { + return native::is_bit_set(menu::script_global(rage::global::_155_property_base2).at(iParam0, rage::global::_155_property_base2_size).at(rage::global::_155_property_base2_flag).as(), 9); + } + return 0; + } + + // updated + bool func_606(int iParam0, bool bParam1) { + if (menu::script_global(rage::global::_155_property_base3).as() != -1) { + if (!func_607(menu::script_global(rage::global::_155_property_base3).as())) { + return 0; + } + + if (bParam1) { + if (menu::player::get_local_player().m_id != menu::script_global(rage::global::_155_property_base3).as()) { + if (native::is_bit_set(menu::script_global(rage::global::_155_property_base2).at(menu::script_global(rage::global::_155_property_base3).as(), rage::global::_155_property_base2_size).at(rage::global::_155_property_base2_flag).as(), 24) || func_285(menu::script_global(rage::global::_155_property_base3).as())) { + return 1; + } + } + } + } + + return native::is_bit_set(menu::script_global(rage::global::_155_property_base2).at(iParam0, rage::global::_155_property_base2_size).at(rage::global::_155_property_base2_flag).as(), 24); + } + + // updated + int func_605(int iParam0, bool bParam1, bool bParam2) { + if (bParam2) { + return func_606(menu::player::get_local_player().m_id, 0); + } + if (bParam1) { + if (func_606(menu::player::get_local_player().m_id, 0)) { + return 0; + } + switch (iParam0) { + case 103: + case 106: + case 109: + case 112: + case 104: + case 107: + case 110: + case 113: + case 105: + case 108: + case 111: + case 114: + return 1; + break; + } + } + switch (iParam0) { + case 103: + case 106: + case 109: + case 112: + case 104: + case 107: + case 110: + case 113: + case 105: + case 108: + case 111: + case 114: + return 1; + break; + } + return 0; + } + + // updated + int func_609(int iParam0) { + iParam0 = (iParam0 - 1000); + if (iParam0 >= 0 && iParam0 <= 4) { + return iParam0; + } + return -1; + } + + // updated + int func_1452(int iParam0) { + switch (iParam0) { + case 0: + return 156; + + case 2: + return 223; + + case 1: + return 224; + + case 3: + return 278; + } + return -1; + } + + // updated + int get_garage_vehicle_max_count(int iParam0, int iParam1 = -1, bool bParam2 = true) { + if (iParam0 == -1) { + if (iParam1 >= 1) { + if (func_605(iParam1, 0, 0)) { + return 20; + } else if (func_604(iParam1)) { + return 0; + } else if (func_603(iParam1, -1)) { + return 10; + } else if (iParam1 == 115) { + return 8; + } else if (iParam1 == 116) { + return 20; + } else if (iParam1 == 117) { + return 7; + } else if (iParam1 == 118) { + return 1; + } else if ((iParam1 == 119 || iParam1 == 120) || iParam1 == 121) { + return 10; + } else if (iParam1 == 122) { + return 9; + } else if (iParam1 == 123 || iParam1 == 124) { + return 10; + } else if (iParam1 == 125) { + return 10; + } else if (iParam1 == 126) { + return 10; + } else if (iParam1 == 127) { + return 10; + } else if (iParam1 <= 127 && iParam1 > 0) { + if (menu::script_global(rage::global::_155_property_base4).at(iParam1, rage::global::_155_property_base4_size).at(rage::global::_155_property_base4_flag).as() == 2) { + if (bParam2) { + return 3; + } else { + return 2; + } + } else if (menu::script_global(rage::global::_155_property_base4).at(iParam1, rage::global::_155_property_base4_size).at(rage::global::_155_property_base4_flag).as() == 6) { + if (bParam2) { + return 8; + } else { + return 6; + } + } else if (menu::script_global(rage::global::_155_property_base4).at(iParam1, rage::global::_155_property_base4_size).at(rage::global::_155_property_base4_flag).as() == 10) { + if (bParam2) { + return 13; + } else { + return 10; + } + } + } + } + } + switch (iParam0) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 7: + case 23: + case 24: + return 13; + break; + + case 5: + return 0; + break; + + case 6: + return 10; + break; + + case 8: + case 9: + case 10: + return 20; + break; + + case 11: + return 8; + break; + + case 12: + return 20; + break; + + case 13: + return 7; + break; + + case 14: + return 1; + break; + + case 15: + case 16: + case 17: + return 10; + break; + + case 18: + case 19: + case 20: + return 10; + break; + + case 21: + return 10; + break; + + case 22: + return 10; + break; + + case 25: + return 10; + break; + } + return 0; + } + + // updated + int func_1451(int iParam0) { + int iVar0; + + switch (iParam0) { + case 8: + return 88; + break; + + case 9: + return 108; + break; + + case 10: + return 128; + break; + + case 11: + return 148; + break; + + case 6: + return 65; + break; + + case 7: + return 75; + break; + + case 5: + return -1; + break; + + case 12: + return 159; + break; + + case 13: + return 179; + break; + + case 14: + return 191; + break; + + case 15: + return 192; + break; + + case 16: + return 202; + break; + + case 17: + return 212; + break; + + case 18: + return 227; + break; + + case 19: + return 237; + break; + + case 20: + return 247; + break; + + case 21: + return 258; + break; + + case 22: + return 268; + break; + + case 23: + return 281; + break; + + case 24: + return 294; + break; + + case 25: + return 307; + break; + } + if (iParam0 >= 1000) { + iVar0 = func_609(iParam0); + return func_1452(iVar0); + } + return (get_garage_vehicle_max_count(iParam0, -1, 1) * iParam0); + } + + void func_1149(int iParam0, int* iParam1, bool bParam2) { + if (menu::script_global(rage::global::_155_tunables).at(rage::global::_155_property_int_offset_17).as()) { + *iParam1 = iParam0; + } + + if (iParam0 >= 0) { + *iParam1 = (menu::script_global(rage::global::_155_property_base5).at(iParam0).as() - 1); + } else { + *iParam1 = -1; + } + } + + // updated + char* func_2031(int iParam0) { + switch (iParam0) { + case 1: + return "MP_HANGAR_1"; + break; + + case 2: + return "MP_HANGAR_2"; + break; + + case 3: + return "MP_HANGAR_3"; + break; + + case 4: + return "MP_HANGAR_4"; + break; + + case 5: + return "MP_HANGAR_5"; + break; + } + return ""; + } + + int func_981(int iParam0) { + if (iParam0 != -1) { + return menu::script_global(rage::global::_155_player_stats_struct).at(iParam0, rage::global::_155_player_stats_size).at(rage::global::_155_property_int_offset_16).at(rage::global::_155_property_int_offset_16_2).as(); + } + return 0; + } + + int func_979(int iParam0) { + if (iParam0 != -1) { + return menu::script_global(rage::global::_155_player_stats_struct).at(iParam0, rage::global::_155_player_stats_size).at(rage::global::_155_property_int_offset_16).at(rage::global::_155_property_int_offset_16_3).as(); + } + return 0; + } + + // updated + char* func_2030(int iParam0) { + switch (iParam0) { + case 1: + return "MP_DBASE_1"; + break; + + case 2: + return "MP_DBASE_2"; + break; + + case 3: + return "MP_DBASE_3"; + break; + + case 4: + return "MP_DBASE_4"; + break; + + case 5: + return "MP_DBASE_6"; + break; + + case 6: + return "MP_DBASE_7"; + break; + + case 7: + return "MP_DBASE_8"; + break; + + case 8: + return "MP_DBASE_9"; + break; + + case 9: + return "MP_DBASE_10"; + break; + } + return ""; + } + } + + template + T get_slot_trait(int slot, int trait) { + return *menu::script_global(rage::global::_155_garage_base).at(slot, rage::global::_155_garage_size).at(trait).get(); + } + + template + void set_slot_trait(int slot, int trait, T value) { + *menu::script_global(rage::global::_155_garage_base).at(slot, rage::global::_155_garage_size).at(trait).get() = value; + native::set_bit(menu::script_global(rage::global::_155_garage_base).at(slot, rage::global::_155_garage_size).at(103).get(), 12); + } + + const char* get_garage_name(int id) { + const char* label = "Garage"; + + int index = stats::get(garage_labels[id]); + if (index > 0) { + if (index > 115) { + if (index == 116) { + label = (scripts::func_2031(scripts::func_981(menu::player::get_local_player().m_id))); + } + + if (index == 117) { + label = (scripts::func_2030(scripts::func_979(menu::player::get_local_player().m_id))); + } + + if (index == 118) { + label = ("MP_BHUB_CLUBG"); + } + + if (index == 119) { + label = "MP_BHUB_GAR1"; + } + + if (index == 120) { + label = "MP_BHUB_GAR2"; + } + + if (index == 121) { + label = "MP_BHUB_GAR3"; + } + + if (index == 122) { + label = "ARENA_GAR_F0"; + } + + if (index == 123) { + label = "ARENA_GAR_F1"; + } + + if (index == 124) { + label = "ARENA_GAR_F2"; + } + + if (index == 125) { + label = "CASINO_GARNAME"; + } + + if (index == 126) { + label = "ARCADE_GARNAME"; + } + + label = native::get_label_text(label); + } else { + label = menu::helpers::get_location_from_id(index).c_str(); + } + } + + return label; + } +} + +void spawner_vehicle_garage_menu::load() { + set_name("Garage Vehicles"); + set_parent(); + + add_string("~m~No Garages"); +} + +void spawner_vehicle_garage_menu::update() {} + +void spawner_vehicle_garage_menu::update_once() { + clear_options(0); + + for (std::vector& vec : m_vars.m_valid_slots) vec.clear(); + + for (int i = 0; i < NUMOF(garage_labels); i++) { + int ivar4 = scripts::func_1451(i); + for (int j = 0; j < scripts::get_garage_vehicle_max_count(i, -1, 1); j++) { + int slot = 0; + scripts::func_1149((j + ivar4), &slot, 1); + + if (slot >= 0 && get_slot_trait(slot, 66) != 0 && native::is_model_in_cdimage(get_slot_trait(slot, 66))) { + m_vars.m_valid_slots[i].push_back(slot); + } + } + + if (!m_vars.m_valid_slots[i].empty()) { + add_option(submenu_option(get_garage_name(i)) + .add_submenu() + .add_click([=] { + spawner_vehicle_garage_selected_menu::get()->set_name(get_garage_name(i), false, false); + spawner::vehicle::garage::selected::vars::m_vars.m_slot = i; + })); + } + } + + if (get_options().size() == 0) { + add_option(button_option(get_string("~m~No Garages"))); + } +} + +void spawner_vehicle_garage_menu::feature_update() {} + +spawner_vehicle_garage_menu* g_instance; +spawner_vehicle_garage_menu* spawner_vehicle_garage_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_vehicle_garage_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_garage.h b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_garage.h new file mode 100644 index 0000000..46ef186 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_garage.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class spawner_vehicle_garage_menu : public menu::submenu::submenu { +public: + static spawner_vehicle_garage_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_vehicle_garage_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::vehicle::garage::vars { + struct variables { + std::vector m_valid_slots[25]; + }; + + const char* get_garage_name(int id); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_manage.cpp b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_manage.cpp new file mode 100644 index 0000000..44a28b6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_manage.cpp @@ -0,0 +1,110 @@ +#include "spawner_vehicle_manage.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" +#include "edit/spawner_vehicle_manage_edit.h" + +using namespace spawner::vehicle::manage::vars; + +namespace spawner::vehicle::manage::vars { + variables m_vars; +} + +void spawner_vehicle_manage_menu::load() { + set_name("Manage Spawned Vehicles"); + set_parent(); + + add_option(submenu_option("All Vehicles") + .add_translate().add_hotkey() + .add_click([] { + spawner::vehicle::manage::edit::vars::m_vars.m_editing_all = true; + spawner::vehicle::manage::edit::vars::m_vars.m_esp = &m_vars.m_esp; + }) + .add_submenu()); + + add_option(button_option("Clear Manager") + .add_translate().add_hotkey() + .add_click([this] { m_vars.m_vehicles.clear(); update_once(); }) + .add_tooltip("Does NOT delete the vehicles from the world, only from the manager")); + + add_option(break_option("Vehicles") + .add_translate()); + + add_string("~m~None"); +} + +void spawner_vehicle_manage_menu::update() {} + +void spawner_vehicle_manage_menu::update_once() { + clear_options(3); + + for (std::size_t i = 0; i < m_vars.m_vehicles.size(); i++) { + if (!native::does_entity_exist(m_vars.m_vehicles[i].m_handle)) { + m_vars.m_vehicles.erase(m_vars.m_vehicles.begin() + i); + } + } + + if (!m_vars.m_vehicles.empty()) { + for (std::size_t i = 0; i < m_vars.m_vehicles.size(); i++) { + add_option(submenu_option(util::va::va("[%i] %s", i + 1, native::get_label_text(native::get_display_name_from_vehicle_model(m_vars.m_vehicles[i].m_model_hash)))) + .add_click([=] { + spawner::vehicle::manage::edit::vars::m_vars.m_editing_all = false; + spawner::vehicle::manage::edit::vars::m_vars.m_esp = &m_vars.m_vehicles[i].m_esp; + spawner::vehicle::manage::edit::vars::m_vars.m_selected = i; + }) + .add_submenu()); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void spawner_vehicle_manage_menu::feature_update() { + for (spawned_vehicle& vehicle : m_vars.m_vehicles) { + if (vehicle.m_esp.m_name || m_vars.m_esp.m_name) { + helper::esp::vars::name_esp(vehicle.m_esp.m_name ? vehicle.m_esp : m_vars.m_esp, vehicle.m_handle, native::get_label_text(native::get_display_name_from_vehicle_model(vehicle.m_model_hash))); + } + + if (vehicle.m_esp.m_snapline || m_vars.m_esp.m_snapline) { + helper::esp::vars::snapline_esp(vehicle.m_esp.m_snapline ? vehicle.m_esp : m_vars.m_esp, vehicle.m_handle); + } + + if (vehicle.m_esp.m_2d_box || m_vars.m_esp.m_2d_box) { + helper::esp::vars::_2d_esp(vehicle.m_esp.m_2d_box ? vehicle.m_esp : m_vars.m_esp, vehicle.m_handle, 0); + } + + if (vehicle.m_esp.m_2d_corners || m_vars.m_esp.m_2d_corners) { + helper::esp::vars::_2d_esp(vehicle.m_esp.m_2d_corners ? vehicle.m_esp : m_vars.m_esp, vehicle.m_handle, 1); + } + + if (vehicle.m_esp.m_3d_box || m_vars.m_esp.m_3d_box) { + helper::esp::vars::_3d_esp(vehicle.m_esp.m_3d_box ? vehicle.m_esp : m_vars.m_esp, vehicle.m_handle, 0); + } + + if (vehicle.m_esp.m_3d_axis || m_vars.m_esp.m_3d_axis) { + helper::esp::vars::_3d_esp(vehicle.m_esp.m_3d_axis ? vehicle.m_esp : m_vars.m_esp, vehicle.m_handle, 1); + } + + if (!m_vars.m_esp.m_2d_box_rainbow.m_rainbow_toggle && vehicle.m_esp.m_2d_box_rainbow.m_rainbow_toggle) vehicle.m_esp.m_2d_box_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_2d_corners_rainbow.m_rainbow_toggle && vehicle.m_esp.m_2d_corners_rainbow.m_rainbow_toggle) vehicle.m_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_3d_box_rainbow.m_rainbow_toggle && vehicle.m_esp.m_3d_box_rainbow.m_rainbow_toggle) vehicle.m_esp.m_3d_box_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_name_bg_rainbow.m_rainbow_toggle && vehicle.m_esp.m_name_bg_rainbow.m_rainbow_toggle) vehicle.m_esp.m_name_bg_rainbow.m_rainbow.run(); + if (!m_vars.m_esp.m_name_text_rainbow.m_rainbow_toggle && vehicle.m_esp.m_name_text_rainbow.m_rainbow_toggle) vehicle.m_esp.m_name_text_rainbow.m_rainbow.run(); + } + + if (m_vars.m_esp.m_2d_box_rainbow.m_rainbow_toggle) m_vars.m_esp.m_2d_box_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_2d_corners_rainbow.m_rainbow_toggle) m_vars.m_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_3d_box_rainbow.m_rainbow_toggle) m_vars.m_esp.m_3d_box_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_name_bg_rainbow.m_rainbow_toggle) m_vars.m_esp.m_name_bg_rainbow.m_rainbow.run(); + if (m_vars.m_esp.m_name_text_rainbow.m_rainbow_toggle) m_vars.m_esp.m_name_text_rainbow.m_rainbow.run(); +} + +spawner_vehicle_manage_menu* g_instance; +spawner_vehicle_manage_menu* spawner_vehicle_manage_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_vehicle_manage_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_manage.h b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_manage.h new file mode 100644 index 0000000..f7c894a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_manage.h @@ -0,0 +1,32 @@ +#pragma once +#include "menu/base/submenu.h" +#include "../../helper/helper_esp.h" + +class spawner_vehicle_manage_menu : public menu::submenu::submenu { +public: + static spawner_vehicle_manage_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_vehicle_manage_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::vehicle::manage::vars { + struct spawned_vehicle { + Vehicle m_handle = 0; + uint32_t m_model_hash = 0; + int m_creation_time = 0; + helper::esp::vars::esp_context m_esp; + }; + + struct variables { + helper::esp::vars::esp_context m_esp; + std::vector m_vehicles; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_modded.cpp b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_modded.cpp new file mode 100644 index 0000000..e2154c9 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_modded.cpp @@ -0,0 +1,944 @@ +#include "spawner_vehicle_modded.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" +#include "util/dirs.h" +#include "util/xml/pugixml.h" +#include "menu/base/util/notify.h" +#include "menu/base/util/control.h" +#include "rage/engine.h" +#include "util/fiber.h" + +using namespace spawner::vehicle::modded::vars; + +namespace spawner::vehicle::modded::vars { + variables m_vars; + + struct xml_attachment { + struct attachment { + bool m_is_attached; + int m_attached_to; + int m_bone_index; + math::vector3 m_position; + math::vector3 m_rotation; + } attachment; + + struct placement { + math::vector3 m_position; + math::vector3 m_rotation; + } placement; + + int m_initial_handle; + int m_handle; + int m_type; + uint32_t m_model_hash; + bool m_dynamic; + bool m_frozen_position; + int m_opacity_level; + int m_lod_distance; + bool m_is_visible; + int m_max_health; + int m_health; + bool m_has_gravity; + bool m_is_on_fire; + bool m_is_invincible; + bool m_is_bullet_proof; + bool m_is_collision_proof; + bool m_is_explosion_proof; + bool m_is_fire_proof; + bool m_is_melee_proof; + bool m_is_only_damaged_by_player; + }; + + xml_attachment create_entity(pugi::xml_node node) { + xml_attachment attachment; + attachment.m_type = node.child("Type").text().as_int(); + attachment.m_frozen_position = node.child("FrozenPos").text().as_bool(); + attachment.m_model_hash = node.child("ModelHash").text().as_uint(); + attachment.m_dynamic = node.child("Dynamic").text().as_bool(); + attachment.m_initial_handle = node.child("InitialHandle").text().as_int(); + attachment.m_opacity_level = node.child("OpacityLevel").text().as_int(); + attachment.m_lod_distance = node.child("LodDistance").text().as_int(); + attachment.m_is_visible = node.child("IsVisible").text().as_bool(); + attachment.m_health = node.child("Health").text().as_int(); + attachment.m_max_health = node.child("MaxHealth").text().as_int(); + attachment.m_is_on_fire = node.child("IsOnFire").text().as_bool(); + attachment.m_is_invincible = node.child("IsInvincible").text().as_bool(); + attachment.m_is_bullet_proof = node.child("IsBulletProof").text().as_bool(); + attachment.m_is_collision_proof = node.child("IsCollisionProof").text().as_bool(); + attachment.m_is_explosion_proof = node.child("IsExplosionProof").text().as_bool(); + attachment.m_is_fire_proof = node.child("IsFireProof").text().as_bool(); + attachment.m_is_melee_proof = node.child("IsMeleeProof").text().as_bool(); + attachment.m_is_only_damaged_by_player = node.child("IsOnlyDamagedByPlayer").text().as_bool(); + attachment.m_has_gravity = node.child("HasGravity").text().as_bool(true); + + attachment.placement.m_position = math::vector3(node.child("PositionRotation").child("X").text().as_float(), node.child("PositionRotation").child("Y").text().as_float(), node.child("PositionRotation").child("Z").text().as_float()); + attachment.placement.m_rotation = math::vector3(node.child("PositionRotation").child("Pitch").text().as_float(), node.child("PositionRotation").child("Roll").text().as_float(), node.child("PositionRotation").child("Yaw").text().as_float()); + + attachment.attachment.m_is_attached = node.child("Attachment").attribute("isAttached").as_bool(); + attachment.attachment.m_bone_index = node.child("Attachment").child("BoneIndex").text().as_int(); + attachment.attachment.m_position = math::vector3(node.child("Attachment").child("X").text().as_float(), node.child("Attachment").child("Y").text().as_float(), node.child("Attachment").child("Z").text().as_float()); + attachment.attachment.m_rotation = math::vector3(node.child("Attachment").child("Pitch").text().as_float(), node.child("Attachment").child("Roll").text().as_float(), node.child("Attachment").child("Yaw").text().as_float()); + + if (node.child("Attachment").child("AttachedTo").text().as_string() == "VEHICLE") { + attachment.attachment.m_attached_to = m_vars.m_vehicle_handle; + } else if (node.child("Attachment").child("AttachedTo").text().as_string() == "PLAYER") { + attachment.attachment.m_attached_to = menu::player::get_local_player().m_ped; + } else { + attachment.attachment.m_attached_to = node.child("Attachment").child("AttachedTo").text().as_int(); + } + + menu::control::simple_request_model(attachment.m_model_hash); + + switch (attachment.m_type) { + case 1: { // ped + attachment.m_handle = native::create_ped(21, attachment.m_model_hash, attachment.placement.m_position.x, attachment.placement.m_position.y, attachment.placement.m_position.z, 0.f, true, true); + if (native::does_entity_exist(attachment.m_handle)) { + native::freeze_entity_position(attachment.m_handle, attachment.m_frozen_position); + + native::set_ped_can_be_knocked_off_vehicle(attachment.m_handle, false); + native::set_ped_can_switch_weapon(attachment.m_handle, false); + + native::set_ped_flee_attributes(attachment.m_handle, 0, 0); + native::set_ped_combat_attributes(attachment.m_handle, 17, 1); + + if (attachment.m_opacity_level < 255) native::set_entity_alpha(attachment.m_handle, attachment.m_opacity_level, 0); + native::set_entity_lod_dist(attachment.m_handle, attachment.m_lod_distance); + native::set_entity_visible(attachment.m_handle, attachment.m_is_visible, true); + + if (attachment.m_max_health) native::set_entity_max_health(attachment.m_handle, attachment.m_max_health); + if (attachment.m_health) native::set_entity_health(attachment.m_handle, attachment.m_health); + + if (attachment.m_is_on_fire) { + native::start_entity_fire(attachment.m_handle); + } + + native::set_entity_invincible(attachment.m_handle, attachment.m_is_invincible); + native::set_entity_proofs(attachment.m_handle, attachment.m_is_bullet_proof, attachment.m_is_fire_proof, attachment.m_is_explosion_proof, attachment.m_is_collision_proof, attachment.m_is_melee_proof, 1, 1, 1); + native::set_entity_only_damaged_by_player(attachment.m_handle, attachment.m_is_only_damaged_by_player); + + pugi::xml_node ped_properties = node.child("PedProperties"); + + if (ped_properties.child("IsStill").text().as_bool()) { + native::task_stand_still(attachment.m_handle, -1); + } + + if (ped_properties.child("CanRagdoll")) native::set_ped_can_ragdoll(attachment.m_handle, ped_properties.child("CanRagdoll").text().as_bool()); + + native::set_ped_armour(attachment.m_handle, ped_properties.child("Armour").text().as_int()); + + if (ped_properties.child("CurrentWeapon")) { + native::give_delayed_weapon_to_ped(attachment.m_handle, ped_properties.child("CurrentWeapon").text().as_uint(), 9999, 1); + } + + if (ped_properties.child("PedComps")) { + for (pugi::xml_node node_components = ped_properties.child("PedComps").first_child(); node_components; node_components = node_components.next_sibling()) { + int mod_type = std::stoi(std::string(node_components.name()).substr(1)); + std::string mod_value_str = node_components.text().as_string(); + if (mod_value_str.find(",") != std::string::npos) { + native::set_ped_component_variation(attachment.m_handle, mod_type, std::stoi(mod_value_str.substr(0, mod_value_str.find(","))), std::stoi(mod_value_str.substr(mod_value_str.find(",") + 1)), 0); + } + } + } + + if (ped_properties.child("RelationshipGroupAltered").text().as_bool()) { + native::set_ped_relationship_group_default_hash(attachment.m_handle, ped_properties.child("RelationshipGroup").text().as_uint()); + } + + if (ped_properties.child("ScenarioActive").text().as_bool()) { + native::task_start_scenario_in_place(attachment.m_handle, (char*)ped_properties.child("ScenarioName").text().as_string(), 0, 1); + } + + if (ped_properties.child("AnimActive").text().as_bool()) { + char* anim_dict = (char*)ped_properties.child("AnimDict").text().as_string(); + char* anim_name = (char*)ped_properties.child("AnimName").text().as_string(); + + native::request_anim_dict(anim_dict); + native::task_play_anim(attachment.m_handle, anim_dict, anim_name, 8, 0, -1, 9, 0, 0, 0, 0); + } + } + + break; + } + + case 2: { // vehicle + attachment.m_handle = native::create_vehicle(attachment.m_model_hash, attachment.placement.m_position.x, attachment.placement.m_position.y, attachment.placement.m_position.z, menu::player::get_local_player().m_heading, true, true, false); + if (native::does_entity_exist(attachment.m_handle)) { + native::freeze_entity_position(attachment.m_handle, attachment.m_frozen_position); + + native::decor_set_int(attachment.m_handle, "MPBitset", (1 << 10)); + native::set_vehicle_is_stolen(attachment.m_handle, false); + + native::set_vehicle_mod_kit(attachment.m_handle, 0); + native::set_entity_visible(attachment.m_handle, node.child("IsVisible").text().as_bool(), true); + native::set_entity_visible(menu::player::get_local_player().m_ped, node.child("IsDriverVisible").text().as_bool(), false); + + int opacity_level = node.child("OpacityLevel").text().as_int(); + if (opacity_level < 255) native::set_entity_alpha(attachment.m_handle, opacity_level, 0); + native::set_entity_lod_dist(attachment.m_handle, node.child("LodDistance").text().as_int()); + + if (attachment.m_max_health) native::set_entity_max_health(attachment.m_handle, attachment.m_max_health); + if (attachment.m_health) native::set_entity_health(attachment.m_handle, attachment.m_health); + + native::set_vehicle_gravity(attachment.m_handle, attachment.m_has_gravity); + + if (attachment.m_is_on_fire) { + native::start_entity_fire(attachment.m_handle); + } + + native::set_entity_invincible(attachment.m_handle, node.child("IsInvincible").text().as_bool()); + native::set_entity_proofs(attachment.m_handle, node.child("IsBulletProof").text().as_bool(), node.child("IsFireProof").text().as_bool(), node.child("IsExplosionProof").text().as_bool(), node.child("IsCollisionProof").text().as_bool(), node.child("IsMeleeProof").text().as_bool(), 1, 1, 1); + native::set_entity_only_damaged_by_player(attachment.m_handle, node.child("IsOnlyDamagedByPlayer").text().as_bool()); + + pugi::xml_node vehicle_properties = node.child("VehicleProperties"); + native::set_vehicle_livery(attachment.m_handle, vehicle_properties.child("Livery").text().as_int()); + + pugi::xml_node vehicle_colors = vehicle_properties.child("Colours"); + + int current_primary_color, current_secondary_color; + native::get_vehicle_colours(attachment.m_handle, ¤t_primary_color, ¤t_secondary_color); + native::set_vehicle_colours(attachment.m_handle, vehicle_colors.child("Primary").text().as_int(), current_secondary_color); + native::get_vehicle_colours(attachment.m_handle, ¤t_primary_color, ¤t_secondary_color); + native::set_vehicle_colours(attachment.m_handle, current_primary_color, vehicle_colors.child("Secondary").text().as_int()); + + int current_pearlescent_color, current_wheel_color; + native::get_vehicle_extra_colours(attachment.m_handle, ¤t_pearlescent_color, ¤t_wheel_color); + native::set_vehicle_extra_colours(attachment.m_handle, vehicle_colors.child("Pearl").text().as_int(), current_wheel_color); + native::get_vehicle_extra_colours(attachment.m_handle, ¤t_pearlescent_color, ¤t_wheel_color); + native::set_vehicle_extra_colours(attachment.m_handle, current_pearlescent_color, vehicle_colors.child("Rim").text().as_int()); + + bool is_primary_color_custom = vehicle_colors.child("IsPrimaryColourCustom").text().as_bool(); + bool is_secondary_color_custom = vehicle_colors.child("IsSecondaryColourCustom").text().as_bool(); + + color_rgba vehicle_color; + + if (is_primary_color_custom) { + vehicle_color.r = vehicle_colors.child("Cust1_R").text().as_int(); + vehicle_color.g = vehicle_colors.child("Cust1_G").text().as_int(); + vehicle_color.b = vehicle_colors.child("Cust1_B").text().as_int(); + native::set_vehicle_custom_primary_colour(attachment.m_handle, vehicle_color.r, vehicle_color.g, vehicle_color.b); + } + + if (is_secondary_color_custom) { + vehicle_color.r = vehicle_colors.child("Cust2_R").text().as_int(); + vehicle_color.g = vehicle_colors.child("Cust2_G").text().as_int(); + vehicle_color.b = vehicle_colors.child("Cust2_B").text().as_int(); + native::set_vehicle_custom_secondary_colour(attachment.m_handle, vehicle_color.r, vehicle_color.g, vehicle_color.b); + } + + vehicle_color.r = vehicle_colors.child("tyreSmoke_R").text().as_int(); + vehicle_color.g = vehicle_colors.child("tyreSmoke_G").text().as_int(); + vehicle_color.b = vehicle_colors.child("tyreSmoke_B").text().as_int(); + native::set_vehicle_tyre_smoke_color(attachment.m_handle, vehicle_color.r, vehicle_color.g, vehicle_color.b); + + int mod1a = vehicle_colors.child("Mod1_a").text().as_int(); + int mod1b = vehicle_colors.child("Mod1_b").text().as_int(); + int mod1c = vehicle_colors.child("Mod1_c").text().as_int(); + native::set_vehicle_mod_color1(attachment.m_handle, mod1a, mod1b, mod1c); + + int mod2a = vehicle_colors.child("Mod2_a").text().as_int(); + int mod2b = vehicle_colors.child("Mod2_b").text().as_int(); + native::set_vehicle_mod_color2(attachment.m_handle, mod2a, mod2b); + + native::set_vehicle_number_plate_text(attachment.m_handle, (char*)vehicle_properties.child("NumberPlateText").text().as_string()); + native::set_vehicle_number_plate_text_index(attachment.m_handle, vehicle_properties.child("NumberPlateIndex").text().as_int()); + native::set_vehicle_wheel_type(attachment.m_handle, vehicle_properties.child("WheelType").text().as_int()); + + native::set_vehicle_window_tint(attachment.m_handle, vehicle_properties.child("WindowTint").text().as_int()); + native::set_vehicle_tyres_can_burst(attachment.m_handle, !vehicle_properties.child("BulletProofTyres").text().as_bool()); + native::set_vehicle_dirt_level(attachment.m_handle, vehicle_properties.child("DirtLevel").text().as_float()); + native::set_vehicle_enveff_scale(attachment.m_handle, vehicle_properties.child("PaintFade").text().as_float()); + + switch (vehicle_properties.child("RoofState").text().as_int()) { + case 0: + case 3: + native::raise_convertible_roof(attachment.m_handle, false); + break; + case 2: + case 1: + native::lower_convertible_roof(attachment.m_handle, false); + break; + } + + native::set_vehicle_siren(attachment.m_handle, vehicle_properties.child("SirenActive").text().as_bool()); + + if (vehicle_properties.child("EngineOn")) native::set_vehicle_engine_on(attachment.m_handle, vehicle_properties.child("EngineOn").text().as_bool(), true, 0); + if (vehicle_properties.child("EngineHealth")) native::set_vehicle_engine_health(attachment.m_handle, vehicle_properties.child("EngineHealth").text().as_float()); + + if (vehicle_properties.child("LightsOn")) native::set_vehicle_lights(attachment.m_handle, vehicle_properties.child("LightsOn").text().as_bool() ? 3 : 4); + if (vehicle_properties.child("IsRadioLoud").text().as_int(0)) { + native::set_vehicle_radio_loud(attachment.m_handle, vehicle_properties.child("IsRadioLoud").text().as_bool()); + native::set_vehicle_radio_enabled(attachment.m_handle, true); + } + + native::set_vehicle_doors_locked(attachment.m_handle, vehicle_properties.child("LockStatus").text().as_bool()); + + pugi::xml_node vehicle_neons = vehicle_properties.child("Neons"); + native::set_vehicle_neon_light_enabled(attachment.m_handle, 0, vehicle_neons.child("Left").text().as_bool()); + native::set_vehicle_neon_light_enabled(attachment.m_handle, 1, vehicle_neons.child("Right").text().as_bool()); + native::set_vehicle_neon_light_enabled(attachment.m_handle, 2, vehicle_neons.child("Front").text().as_bool()); + native::set_vehicle_neon_light_enabled(attachment.m_handle, 3, vehicle_neons.child("Back").text().as_bool()); + native::set_vehicle_neon_lights_colour(attachment.m_handle, vehicle_neons.child("R").text().as_int(), vehicle_neons.child("G").text().as_int(), vehicle_neons.child("B").text().as_int()); + + for (pugi::xml_node node_vehicle_mod_extras_object = vehicle_properties.child("ModExtras").first_child(); node_vehicle_mod_extras_object; node_vehicle_mod_extras_object = node_vehicle_mod_extras_object.next_sibling()) { + native::set_vehicle_extra(attachment.m_handle, std::stoi(std::string(node_vehicle_mod_extras_object.name()).substr(1)), !node_vehicle_mod_extras_object.text().as_bool()); + } + + for (pugi::xml_node node_vehicle_mods_object = vehicle_properties.child("Mods").first_child(); node_vehicle_mods_object; node_vehicle_mods_object = node_vehicle_mods_object.next_sibling()) { + int mod_type = std::stoi(std::string(node_vehicle_mods_object.name()).substr(1)); + std::string mod_value_str = node_vehicle_mods_object.text().as_string(); + if (mod_value_str.find(",") == std::string::npos) { + native::toggle_vehicle_mod(attachment.m_handle, mod_type, node_vehicle_mods_object.text().as_bool()); + } else { + native::set_vehicle_mod(attachment.m_handle, mod_type, stoi(mod_value_str.substr(0, mod_value_str.find(","))), stoi(mod_value_str.substr(mod_value_str.find(",") + 1)) ? true : false); + } + } + + pugi::xml_node vehicle_doors_open = vehicle_properties.child("DoorsOpen"); + + if (vehicle_doors_open) { + if (vehicle_doors_open.child("BackLeftDoor").text().as_bool()) { + native::set_vehicle_door_open(attachment.m_handle, 2, false, true); + native::play_vehicle_door_open_sound(attachment.m_handle, 1); + } else { + native::set_vehicle_door_shut(attachment.m_handle, 2, true); + native::play_vehicle_door_close_sound(attachment.m_handle, 1); + } + + if (vehicle_doors_open.child("BackRightDoor").text().as_bool()) { + native::set_vehicle_door_open(attachment.m_handle, 3, false, true); + native::play_vehicle_door_open_sound(attachment.m_handle, 1); + } else { + native::set_vehicle_door_shut(attachment.m_handle, 3, true); + native::play_vehicle_door_close_sound(attachment.m_handle, 1); + } + + if (vehicle_doors_open.child("FrontLeftDoor").text().as_bool()) { + native::set_vehicle_door_open(attachment.m_handle, 0, false, true); + native::play_vehicle_door_open_sound(attachment.m_handle, 1); + } else { + native::set_vehicle_door_shut(attachment.m_handle, 0, true); + native::play_vehicle_door_close_sound(attachment.m_handle, 1); + } + + if (vehicle_doors_open.child("FrontRightDoor").text().as_bool()) { + native::set_vehicle_door_open(attachment.m_handle, 1, false, true); + native::play_vehicle_door_open_sound(attachment.m_handle, 1); + } else { + native::set_vehicle_door_shut(attachment.m_handle, 1, true); + native::play_vehicle_door_close_sound(attachment.m_handle, 1); + } + + if (vehicle_doors_open.child("Hood").text().as_bool()) { + native::set_vehicle_door_open(attachment.m_handle, 4, false, true); + native::play_vehicle_door_open_sound(attachment.m_handle, 1); + } else { + native::set_vehicle_door_shut(attachment.m_handle, 4, true); + native::play_vehicle_door_close_sound(attachment.m_handle, 1); + } + + if (vehicle_doors_open.child("Trunk").text().as_bool()) { + native::set_vehicle_door_open(attachment.m_handle, 5, false, true); + native::play_vehicle_door_open_sound(attachment.m_handle, 1); + } else { + native::set_vehicle_door_shut(attachment.m_handle, 5, true); + native::play_vehicle_door_close_sound(attachment.m_handle, 1); + } + + if (vehicle_doors_open.child("Trunk2").text().as_bool()) { + native::set_vehicle_door_open(attachment.m_handle, 6, false, true); + native::play_vehicle_door_open_sound(attachment.m_handle, 1); + } else { + native::set_vehicle_door_shut(attachment.m_handle, 6, true); + native::play_vehicle_door_close_sound(attachment.m_handle, 1); + } + } + + pugi::xml_node vehicle_doors_broken = vehicle_properties.child("DoorsBroken"); + + if (vehicle_doors_broken) { + if (vehicle_doors_broken.child("BackLeftDoor").text().as_bool()) { + native::set_vehicle_door_broken(attachment.m_handle, 2, true); + } + + if (vehicle_doors_broken.child("BackRightDoor").text().as_bool()) { + native::set_vehicle_door_broken(attachment.m_handle, 3, true); + } + + if (vehicle_doors_broken.child("FrontLeftDoor").text().as_bool()) { + native::set_vehicle_door_broken(attachment.m_handle, 0, true); + } + + if (vehicle_doors_broken.child("FrontRightDoor").text().as_bool()) { + native::set_vehicle_door_broken(attachment.m_handle, 1, true); + } + + if (vehicle_doors_broken.child("Hood").text().as_bool()) { + native::set_vehicle_door_broken(attachment.m_handle, 4, true); + } + + if (vehicle_doors_broken.child("Trunk").text().as_bool()) { + native::set_vehicle_door_broken(attachment.m_handle, 5, true); + } + + if (vehicle_doors_broken.child("Trunk2").text().as_bool()) { + native::set_vehicle_door_broken(attachment.m_handle, 6, true); + } + } + + pugi::xml_node vehicle_tyres_bursted = vehicle_properties.child("TyresBursted"); + + if (vehicle_tyres_bursted) { + if (vehicle_tyres_bursted.child("FrontLeft").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(attachment.m_handle)) native::set_vehicle_tyres_can_burst(attachment.m_handle, true); + native::set_vehicle_tyre_burst(attachment.m_handle, 0, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("FrontRight").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(attachment.m_handle)) native::set_vehicle_tyres_can_burst(attachment.m_handle, true); + native::set_vehicle_tyre_burst(attachment.m_handle, 1, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_2").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(attachment.m_handle)) native::set_vehicle_tyres_can_burst(attachment.m_handle, true); + native::set_vehicle_tyre_burst(attachment.m_handle, 2, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_3").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(attachment.m_handle)) native::set_vehicle_tyres_can_burst(attachment.m_handle, true); + native::set_vehicle_tyre_burst(attachment.m_handle, 3, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("BackLeft").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(attachment.m_handle)) native::set_vehicle_tyres_can_burst(attachment.m_handle, true); + native::set_vehicle_tyre_burst(attachment.m_handle, 4, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("BackRight").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(attachment.m_handle)) native::set_vehicle_tyres_can_burst(attachment.m_handle, true); + native::set_vehicle_tyre_burst(attachment.m_handle, 5, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_6").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(attachment.m_handle)) native::set_vehicle_tyres_can_burst(attachment.m_handle, true); + native::set_vehicle_tyre_burst(attachment.m_handle, 6, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_7").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(attachment.m_handle)) native::set_vehicle_tyres_can_burst(attachment.m_handle, true); + native::set_vehicle_tyre_burst(attachment.m_handle, 7, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_8").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(attachment.m_handle)) native::set_vehicle_tyres_can_burst(attachment.m_handle, true); + native::set_vehicle_tyre_burst(attachment.m_handle, 8, 1, 1000.f); + } + } + + pugi::xml_node vehicle_rpm_multiplier = vehicle_properties.child("RpmMultiplier"); + pugi::xml_node vehicle_torque_multiplier = vehicle_properties.child("TorqueMultiplier"); + pugi::xml_node vehicle_max_speed = vehicle_properties.child("MaxSpeed"); + pugi::xml_node vehicle_headlight_intensity = vehicle_properties.child("HeadlightIntensity"); + + if (vehicle_rpm_multiplier) { + native::set_vehicle_engine_power_multiplier(attachment.m_handle, vehicle_rpm_multiplier.text().as_float()); + } + + if (vehicle_torque_multiplier) { + uint64_t address = rage::engine::get_entity_address(attachment.m_handle); + if (address) { + *(float*)(address + 0x1360) = vehicle_torque_multiplier.text().as_float(); + } + } + + if (vehicle_max_speed) { + native::set_entity_max_speed(attachment.m_handle, vehicle_max_speed.text().as_float()); + } + + if (vehicle_headlight_intensity) { + native::set_vehicle_light_multiplier(attachment.m_handle, vehicle_headlight_intensity.text().as_float()); + } + } + + break; + } + + case 3: { // object + attachment.m_handle = native::create_object(attachment.m_model_hash, attachment.placement.m_position.x, attachment.placement.m_position.y, attachment.placement.m_position.z, true, true, attachment.m_dynamic); + if (native::does_entity_exist(attachment.m_handle)) { + native::freeze_entity_position(attachment.m_handle, attachment.m_frozen_position); + + if (attachment.m_opacity_level < 255) native::set_entity_alpha(attachment.m_handle, attachment.m_opacity_level, 0); + native::set_entity_lod_dist(attachment.m_handle, attachment.m_lod_distance); + native::set_entity_visible(attachment.m_handle, attachment.m_is_visible, true); + + if (attachment.m_max_health) native::set_entity_max_health(attachment.m_handle, attachment.m_max_health); + if (attachment.m_health) native::set_entity_health(attachment.m_handle, attachment.m_health); + + if (attachment.m_is_on_fire) { + native::start_entity_fire(attachment.m_handle); + } + + native::set_entity_invincible(attachment.m_handle, attachment.m_is_invincible); + native::set_entity_proofs(attachment.m_handle, attachment.m_is_bullet_proof, attachment.m_is_fire_proof, attachment.m_is_explosion_proof, attachment.m_is_collision_proof, attachment.m_is_melee_proof, 1, 1, 1); + native::set_entity_only_damaged_by_player(attachment.m_handle, attachment.m_is_only_damaged_by_player); + } + + break; + } + } + + if (native::does_entity_exist(attachment.m_handle)) { + native::network_register_entity_as_networked(attachment.m_handle); + } + + m_vars.m_spawned_attachments.push_back(attachment.m_handle); + return attachment; + } + + void load_xml(std::string file) { + spawner_vehicle_modded_menu* _this = spawner_vehicle_modded_menu::get(); + + native::set_entity_visible(menu::player::get_local_player().m_ped, true, true); + + if (m_vars.m_delete_current) { + for (Entity entity : m_vars.m_spawned_vehicles) { + native::set_entity_as_mission_entity(entity, true, true); + native::delete_entity(&entity); + } + + for (Entity entity : m_vars.m_spawned_attachments) { + native::set_entity_as_mission_entity(entity, true, true); + native::delete_entity(&entity); + } + } + + m_vars.m_initial_handle = 0; + m_vars.m_vehicle_handle = 0; + + pugi::xml_document doc; + if (doc.load_file(util::va::va("%s%s.xml", util::dirs::get_path(modded_vehicles), file.c_str())).status != pugi::status_ok) { + menu::notify::stacked(_this->get_name().get(), _this->get_string("Failed to load XML file!")); + return; + } + + pugi::xml_node root = doc.child("Vehicle"); + if (root) { + uint32_t vehicle_hash = root.child("ModelHash").text().as_uint(); + m_vars.m_initial_handle = root.child("InitialHandle").text().as_int(); + menu::control::simple_request_model(vehicle_hash); + + math::vector3 forward = menu::player::get_local_player().m_coords + (native::get_entity_forward_vector(menu::player::get_local_player().m_entity) * 5.f); + + m_vars.m_vehicle_handle = native::create_vehicle(vehicle_hash, forward.x, forward.y, forward.z, menu::player::get_local_player().m_heading, true, true, false); + if (!native::does_entity_exist(m_vars.m_vehicle_handle)) { + menu::notify::stacked(_this->get_name().get(), _this->get_string("Failed to create XML vehicle!")); + return; + } + + m_vars.m_spawned_vehicles.push_back(m_vars.m_vehicle_handle); + + native::decor_set_int(m_vars.m_vehicle_handle, "MPBitset", (1 << 10)); + native::set_vehicle_is_stolen(m_vars.m_vehicle_handle, false); + + if (menu::player::get_local_player().m_in_vehicle) { + native::set_entity_as_mission_entity(menu::player::get_local_player().m_vehicle, true, true); + native::delete_entity(&menu::player::get_local_player().m_vehicle); + } + + native::set_ped_into_vehicle(menu::player::get_local_player().m_ped, m_vars.m_vehicle_handle, -1); + native::set_vehicle_mod_kit(m_vars.m_vehicle_handle, 0); + + native::set_entity_visible(m_vars.m_vehicle_handle, root.child("IsVisible").text().as_bool(), true); + native::set_entity_visible(menu::player::get_local_player().m_ped, root.child("IsDriverVisible").text().as_bool(), false); + + int opacity_level = root.child("OpacityLevel").text().as_int(); + if (opacity_level < 255) native::set_entity_alpha(m_vars.m_vehicle_handle, opacity_level, 0); + native::set_entity_lod_dist(m_vars.m_vehicle_handle, root.child("LodDistance").text().as_int()); + + if (root.child("MaxHealth")) native::set_entity_max_health(m_vars.m_vehicle_handle, root.child("MaxHealth").text().as_int()); + if (root.child("Health")) native::set_entity_health(m_vars.m_vehicle_handle, root.child("Health").text().as_int()); + + native::set_vehicle_gravity(m_vars.m_vehicle_handle, root.child("HasGravity").text().as_bool(true)); + + if (root.child("IsOnFire").text().as_bool()) { + native::start_entity_fire(m_vars.m_vehicle_handle); + } + + native::set_entity_invincible(m_vars.m_vehicle_handle, root.child("IsInvincible").text().as_bool()); + native::set_entity_proofs(m_vars.m_vehicle_handle, root.child("IsBulletProof").text().as_bool(), root.child("IsFireProof").text().as_bool(), root.child("IsExplosionProof").text().as_bool(), root.child("IsCollisionProof").text().as_bool(), root.child("IsMeleeProof").text().as_bool(), 1, 1, 1); + native::set_entity_only_damaged_by_player(m_vars.m_vehicle_handle, root.child("IsOnlyDamagedByPlayer").text().as_bool()); + + pugi::xml_node vehicle_properties = root.child("VehicleProperties"); + native::set_vehicle_livery(m_vars.m_vehicle_handle, vehicle_properties.child("Livery").text().as_int()); + + pugi::xml_node vehicle_colors = vehicle_properties.child("Colours"); + + int current_primary_color, current_secondary_color; + native::get_vehicle_colours(m_vars.m_vehicle_handle, ¤t_primary_color, ¤t_secondary_color); + native::set_vehicle_colours(m_vars.m_vehicle_handle, vehicle_colors.child("Primary").text().as_int(), current_secondary_color); + native::get_vehicle_colours(m_vars.m_vehicle_handle, ¤t_primary_color, ¤t_secondary_color); + native::set_vehicle_colours(m_vars.m_vehicle_handle, current_primary_color, vehicle_colors.child("Secondary").text().as_int()); + + int current_pearlescent_color, current_wheel_color; + native::get_vehicle_extra_colours(m_vars.m_vehicle_handle, ¤t_pearlescent_color, ¤t_wheel_color); + native::set_vehicle_extra_colours(m_vars.m_vehicle_handle, vehicle_colors.child("Pearl").text().as_int(), current_wheel_color); + native::get_vehicle_extra_colours(m_vars.m_vehicle_handle, ¤t_pearlescent_color, ¤t_wheel_color); + native::set_vehicle_extra_colours(m_vars.m_vehicle_handle, current_pearlescent_color, vehicle_colors.child("Rim").text().as_int()); + + bool is_primary_color_custom = vehicle_colors.child("IsPrimaryColourCustom").text().as_bool(); + bool is_secondary_color_custom = vehicle_colors.child("IsSecondaryColourCustom").text().as_bool(); + + color_rgba vehicle_color; + + if (is_primary_color_custom) { + vehicle_color.r = vehicle_colors.child("Cust1_R").text().as_int(); + vehicle_color.g = vehicle_colors.child("Cust1_G").text().as_int(); + vehicle_color.b = vehicle_colors.child("Cust1_B").text().as_int(); + native::set_vehicle_custom_primary_colour(m_vars.m_vehicle_handle, vehicle_color.r, vehicle_color.g, vehicle_color.b); + } + + if (is_secondary_color_custom) { + vehicle_color.r = vehicle_colors.child("Cust2_R").text().as_int(); + vehicle_color.g = vehicle_colors.child("Cust2_G").text().as_int(); + vehicle_color.b = vehicle_colors.child("Cust2_B").text().as_int(); + native::set_vehicle_custom_secondary_colour(m_vars.m_vehicle_handle, vehicle_color.r, vehicle_color.g, vehicle_color.b); + } + + vehicle_color.r = vehicle_colors.child("tyreSmoke_R").text().as_int(); + vehicle_color.g = vehicle_colors.child("tyreSmoke_G").text().as_int(); + vehicle_color.b = vehicle_colors.child("tyreSmoke_B").text().as_int(); + native::set_vehicle_tyre_smoke_color(m_vars.m_vehicle_handle, vehicle_color.r, vehicle_color.g, vehicle_color.b); + + int mod1a = vehicle_colors.child("Mod1_a").text().as_int(); + int mod1b = vehicle_colors.child("Mod1_b").text().as_int(); + int mod1c = vehicle_colors.child("Mod1_c").text().as_int(); + native::set_vehicle_mod_color1(m_vars.m_vehicle_handle, mod1a, mod1b, mod1c); + + int mod2a = vehicle_colors.child("Mod2_a").text().as_int(); + int mod2b = vehicle_colors.child("Mod2_b").text().as_int(); + native::set_vehicle_mod_color2(m_vars.m_vehicle_handle, mod2a, mod2b); + + native::set_vehicle_number_plate_text(m_vars.m_vehicle_handle, (char*)vehicle_properties.child("NumberPlateText").text().as_string()); + native::set_vehicle_number_plate_text_index(m_vars.m_vehicle_handle, vehicle_properties.child("NumberPlateIndex").text().as_int()); + native::set_vehicle_wheel_type(m_vars.m_vehicle_handle, vehicle_properties.child("WheelType").text().as_int()); + + native::set_vehicle_window_tint(m_vars.m_vehicle_handle, vehicle_properties.child("WindowTint").text().as_int()); + native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, !vehicle_properties.child("BulletProofTyres").text().as_bool()); + native::set_vehicle_dirt_level(m_vars.m_vehicle_handle, vehicle_properties.child("DirtLevel").text().as_float()); + native::set_vehicle_enveff_scale(m_vars.m_vehicle_handle, vehicle_properties.child("PaintFade").text().as_float()); + + switch (vehicle_properties.child("RoofState").text().as_int()) { + case 0: + case 3: + native::raise_convertible_roof(m_vars.m_vehicle_handle, false); + break; + case 2: + case 1: + native::lower_convertible_roof(m_vars.m_vehicle_handle, false); + break; + } + + native::set_vehicle_siren(m_vars.m_vehicle_handle, vehicle_properties.child("SirenActive").text().as_bool()); + + if (vehicle_properties.child("EngineOn")) native::set_vehicle_engine_on(m_vars.m_vehicle_handle, vehicle_properties.child("EngineOn").text().as_bool(), true, 0); + if (vehicle_properties.child("EngineHealth")) native::set_vehicle_engine_health(m_vars.m_vehicle_handle, vehicle_properties.child("EngineHealth").text().as_float()); + + if (vehicle_properties.child("LightsOn")) native::set_vehicle_lights(m_vars.m_vehicle_handle, vehicle_properties.child("LightsOn").text().as_bool() ? 3 : 4); + if (vehicle_properties.child("IsRadioLoud").text().as_int(0)) { + native::set_vehicle_radio_loud(m_vars.m_vehicle_handle, vehicle_properties.child("IsRadioLoud").text().as_bool()); + native::set_vehicle_radio_enabled(m_vars.m_vehicle_handle, true); + } + + native::set_vehicle_doors_locked(m_vars.m_vehicle_handle, vehicle_properties.child("LockStatus").text().as_bool()); + + pugi::xml_node vehicle_neons = vehicle_properties.child("Neons"); + native::set_vehicle_neon_light_enabled(m_vars.m_vehicle_handle, 0, vehicle_neons.child("Left").text().as_bool()); + native::set_vehicle_neon_light_enabled(m_vars.m_vehicle_handle, 1, vehicle_neons.child("Right").text().as_bool()); + native::set_vehicle_neon_light_enabled(m_vars.m_vehicle_handle, 2, vehicle_neons.child("Front").text().as_bool()); + native::set_vehicle_neon_light_enabled(m_vars.m_vehicle_handle, 3, vehicle_neons.child("Back").text().as_bool()); + native::set_vehicle_neon_lights_colour(m_vars.m_vehicle_handle, vehicle_neons.child("R").text().as_int(), vehicle_neons.child("G").text().as_int(), vehicle_neons.child("B").text().as_int()); + + for (pugi::xml_node node_vehicle_mod_extras_object = vehicle_properties.child("ModExtras").first_child(); node_vehicle_mod_extras_object; node_vehicle_mod_extras_object = node_vehicle_mod_extras_object.next_sibling()) { + native::set_vehicle_extra(m_vars.m_vehicle_handle, std::stoi(std::string(node_vehicle_mod_extras_object.name()).substr(1)), !node_vehicle_mod_extras_object.text().as_bool()); + } + + for (pugi::xml_node node_vehicle_mods_object = vehicle_properties.child("Mods").first_child(); node_vehicle_mods_object; node_vehicle_mods_object = node_vehicle_mods_object.next_sibling()) { + int mod_type = std::stoi(std::string(node_vehicle_mods_object.name()).substr(1)); + std::string mod_value_str = node_vehicle_mods_object.text().as_string(); + if (mod_value_str.find(",") == std::string::npos) { + native::toggle_vehicle_mod(m_vars.m_vehicle_handle, mod_type, node_vehicle_mods_object.text().as_bool()); + } else { + native::set_vehicle_mod(m_vars.m_vehicle_handle, mod_type, stoi(mod_value_str.substr(0, mod_value_str.find(","))), stoi(mod_value_str.substr(mod_value_str.find(",") + 1)) ? true : false); + } + } + + pugi::xml_node vehicle_doors_open = vehicle_properties.child("DoorsOpen"); + + if (vehicle_doors_open) { + if (vehicle_doors_open.child("BackLeftDoor").text().as_bool()) { + native::set_vehicle_door_open(m_vars.m_vehicle_handle, 2, false, true); + native::play_vehicle_door_open_sound(m_vars.m_vehicle_handle, 1); + } else { + native::set_vehicle_door_shut(m_vars.m_vehicle_handle, 2, true); + native::play_vehicle_door_close_sound(m_vars.m_vehicle_handle, 1); + } + + if (vehicle_doors_open.child("BackRightDoor").text().as_bool()) { + native::set_vehicle_door_open(m_vars.m_vehicle_handle, 3, false, true); + native::play_vehicle_door_open_sound(m_vars.m_vehicle_handle, 1); + } else { + native::set_vehicle_door_shut(m_vars.m_vehicle_handle, 3, true); + native::play_vehicle_door_close_sound(m_vars.m_vehicle_handle, 1); + } + + if (vehicle_doors_open.child("FrontLeftDoor").text().as_bool()) { + native::set_vehicle_door_open(m_vars.m_vehicle_handle, 0, false, true); + native::play_vehicle_door_open_sound(m_vars.m_vehicle_handle, 1); + } else { + native::set_vehicle_door_shut(m_vars.m_vehicle_handle, 0, true); + native::play_vehicle_door_close_sound(m_vars.m_vehicle_handle, 1); + } + + if (vehicle_doors_open.child("FrontRightDoor").text().as_bool()) { + native::set_vehicle_door_open(m_vars.m_vehicle_handle, 1, false, true); + native::play_vehicle_door_open_sound(m_vars.m_vehicle_handle, 1); + } else { + native::set_vehicle_door_shut(m_vars.m_vehicle_handle, 1, true); + native::play_vehicle_door_close_sound(m_vars.m_vehicle_handle, 1); + } + + if (vehicle_doors_open.child("Hood").text().as_bool()) { + native::set_vehicle_door_open(m_vars.m_vehicle_handle, 4, false, true); + native::play_vehicle_door_open_sound(m_vars.m_vehicle_handle, 1); + } else { + native::set_vehicle_door_shut(m_vars.m_vehicle_handle, 4, true); + native::play_vehicle_door_close_sound(m_vars.m_vehicle_handle, 1); + } + + if (vehicle_doors_open.child("Trunk").text().as_bool()) { + native::set_vehicle_door_open(m_vars.m_vehicle_handle, 5, false, true); + native::play_vehicle_door_open_sound(m_vars.m_vehicle_handle, 1); + } else { + native::set_vehicle_door_shut(m_vars.m_vehicle_handle, 5, true); + native::play_vehicle_door_close_sound(m_vars.m_vehicle_handle, 1); + } + + if (vehicle_doors_open.child("Trunk2").text().as_bool()) { + native::set_vehicle_door_open(m_vars.m_vehicle_handle, 6, false, true); + native::play_vehicle_door_open_sound(m_vars.m_vehicle_handle, 1); + } else { + native::set_vehicle_door_shut(m_vars.m_vehicle_handle, 6, true); + native::play_vehicle_door_close_sound(m_vars.m_vehicle_handle, 1); + } + } + + pugi::xml_node vehicle_doors_broken = vehicle_properties.child("DoorsBroken"); + + if (vehicle_doors_broken) { + if (vehicle_doors_broken.child("BackLeftDoor").text().as_bool()) { + native::set_vehicle_door_broken(m_vars.m_vehicle_handle, 2, true); + } + + if (vehicle_doors_broken.child("BackRightDoor").text().as_bool()) { + native::set_vehicle_door_broken(m_vars.m_vehicle_handle, 3, true); + } + + if (vehicle_doors_broken.child("FrontLeftDoor").text().as_bool()) { + native::set_vehicle_door_broken(m_vars.m_vehicle_handle, 0, true); + } + + if (vehicle_doors_broken.child("FrontRightDoor").text().as_bool()) { + native::set_vehicle_door_broken(m_vars.m_vehicle_handle, 1, true); + } + + if (vehicle_doors_broken.child("Hood").text().as_bool()) { + native::set_vehicle_door_broken(m_vars.m_vehicle_handle, 4, true); + } + + if (vehicle_doors_broken.child("Trunk").text().as_bool()) { + native::set_vehicle_door_broken(m_vars.m_vehicle_handle, 5, true); + } + + if (vehicle_doors_broken.child("Trunk2").text().as_bool()) { + native::set_vehicle_door_broken(m_vars.m_vehicle_handle, 6, true); + } + } + + pugi::xml_node vehicle_tyres_bursted = vehicle_properties.child("TyresBursted"); + + if (vehicle_tyres_bursted) { + if (vehicle_tyres_bursted.child("FrontLeft").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(m_vars.m_vehicle_handle)) native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, true); + native::set_vehicle_tyre_burst(m_vars.m_vehicle_handle, 0, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("FrontRight").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(m_vars.m_vehicle_handle)) native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, true); + native::set_vehicle_tyre_burst(m_vars.m_vehicle_handle, 1, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_2").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(m_vars.m_vehicle_handle)) native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, true); + native::set_vehicle_tyre_burst(m_vars.m_vehicle_handle, 2, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_3").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(m_vars.m_vehicle_handle)) native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, true); + native::set_vehicle_tyre_burst(m_vars.m_vehicle_handle, 3, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("BackLeft").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(m_vars.m_vehicle_handle)) native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, true); + native::set_vehicle_tyre_burst(m_vars.m_vehicle_handle, 4, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("BackRight").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(m_vars.m_vehicle_handle)) native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, true); + native::set_vehicle_tyre_burst(m_vars.m_vehicle_handle, 5, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_6").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(m_vars.m_vehicle_handle)) native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, true); + native::set_vehicle_tyre_burst(m_vars.m_vehicle_handle, 6, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_7").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(m_vars.m_vehicle_handle)) native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, true); + native::set_vehicle_tyre_burst(m_vars.m_vehicle_handle, 7, 1, 1000.f); + } + + if (vehicle_tyres_bursted.child("_8").text().as_bool()) { + if (!native::get_vehicle_tyres_can_burst(m_vars.m_vehicle_handle)) native::set_vehicle_tyres_can_burst(m_vars.m_vehicle_handle, true); + native::set_vehicle_tyre_burst(m_vars.m_vehicle_handle, 8, 1, 1000.f); + } + } + + pugi::xml_node vehicle_rpm_multiplier = vehicle_properties.child("RpmMultiplier"); + pugi::xml_node vehicle_torque_multiplier = vehicle_properties.child("TorqueMultiplier"); + pugi::xml_node vehicle_max_speed = vehicle_properties.child("MaxSpeed"); + pugi::xml_node vehicle_headlight_intensity = vehicle_properties.child("HeadlightIntensity"); + + if (vehicle_rpm_multiplier) { + native::set_vehicle_engine_power_multiplier(m_vars.m_vehicle_handle, vehicle_rpm_multiplier.text().as_float()); + } + + if (vehicle_torque_multiplier) { + uint64_t address = rage::engine::get_entity_address(m_vars.m_vehicle_handle); + if (address) { + *(float*)(address + 0x1360) = vehicle_torque_multiplier.text().as_float(); + } + } + + if (vehicle_max_speed) { + native::set_entity_max_speed(m_vars.m_vehicle_handle, vehicle_max_speed.text().as_float()); + } + + if (vehicle_headlight_intensity) { + native::set_vehicle_light_multiplier(m_vars.m_vehicle_handle, vehicle_headlight_intensity.text().as_float()); + } + } else { + menu::notify::stacked(_this->get_name().get(), _this->get_string("Failed to load XML file! Invalid formatting!")); + return; + } + + util::fiber::sleep(100); + + pugi::xml_node attachments = root.child("SpoonerAttachments"); + if (attachments) { + std::vector used_models; + std::vector attachment_list; + + for (pugi::xml_node node_attachment = attachments.first_child(); node_attachment; node_attachment = node_attachment.next_sibling()) { + menu::control::simple_request_model(node_attachment.child("ModelHash").text().as_uint()); + if (node_attachment.child("Type").text().as_int() == 1) { // ped + if (node_attachment.child("PedProperties").child("AnimActive").text().as_bool()) { + native::request_anim_dict((char*)node_attachment.child("PedProperties").child("AnimDict").text().as_string()); + } + } + + used_models.push_back(node_attachment.child("ModelHash").text().as_uint()); + } + + for (pugi::xml_node node_attachment = attachments.first_child(); node_attachment; node_attachment = node_attachment.next_sibling()) { + util::fiber::sleep(10); + attachment_list.push_back(create_entity(node_attachment)); + } + + if (!m_vars.m_initial_handle) { + for (xml_attachment e : attachment_list) { + native::attach_entity_to_entity(e.m_handle, m_vars.m_vehicle_handle, e.attachment.m_bone_index, e.attachment.m_position.x, e.attachment.m_position.y, e.attachment.m_position.z, e.attachment.m_rotation.x, e.attachment.m_rotation.y, e.attachment.m_rotation.z, 1, 0, m_vars.m_use_collision, 1, 2, 1); + } + } else { + xml_attachment temp; + temp.m_handle = m_vars.m_vehicle_handle; + temp.m_initial_handle = m_vars.m_initial_handle; + attachment_list.push_back(temp); + + for (xml_attachment e : attachment_list) { + if (e.attachment.m_is_attached) { + for (xml_attachment b : attachment_list) { + if (e.m_handle != b.m_handle && e.attachment.m_attached_to == b.m_initial_handle) { + native::attach_entity_to_entity(e.m_handle, b.m_handle, e.attachment.m_bone_index, e.attachment.m_position.x, e.attachment.m_position.y, e.attachment.m_position.z, e.attachment.m_rotation.x, e.attachment.m_rotation.y, e.attachment.m_rotation.z, 1, 0, m_vars.m_use_collision, 1, 2, 1); + break; + } + } + } + } + } + + for (uint32_t e : used_models) { + native::set_model_as_no_longer_needed(e); + } + + for (xml_attachment e : attachment_list) { + native::set_entity_as_no_longer_needed(&e.m_handle); + } + } + + + } +} + +void spawner_vehicle_modded_menu::load() { + set_name("Modded Vehicles"); + set_parent(); + + add_option(toggle_option("Delete Current") + .add_translate() + .add_toggle(m_vars.m_delete_current)); + + add_option(toggle_option("Use Collision") + .add_translate() + .add_toggle(m_vars.m_use_collision)); + + add_option(break_option("Vehicles") + .add_translate()); + + add_string("Failed to load XML file!"); + add_string("Failed to create XML vehicle!"); + add_string("Failed to load XML file! Invalid formatting!"); +} + +void spawner_vehicle_modded_menu::update() {} + +void spawner_vehicle_modded_menu::update_once() { + clear_options(3); + + for (std::string file : util::dirs::get_files_in_directory(util::dirs::get_path(modded_vehicles), ".xml")) { + add_option(button_option(file) + .add_click([=] { load_xml(file); })); + } +} + +void spawner_vehicle_modded_menu::feature_update() {} + +spawner_vehicle_modded_menu* g_instance; +spawner_vehicle_modded_menu* spawner_vehicle_modded_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_vehicle_modded_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_modded.h b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_modded.h new file mode 100644 index 0000000..e9862b2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_modded.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class spawner_vehicle_modded_menu : public menu::submenu::submenu { +public: + static spawner_vehicle_modded_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_vehicle_modded_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::vehicle::modded::vars { + struct variables { + bool m_delete_current; + bool m_use_collision; + + Entity m_vehicle_handle; + Entity m_initial_handle; + + std::vector m_spawned_vehicles; + std::vector m_spawned_attachments; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_save.cpp b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_save.cpp new file mode 100644 index 0000000..bcb0189 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_save.cpp @@ -0,0 +1,278 @@ +#include "spawner_vehicle_save.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" +#include "util/dirs.h" +#include "util/log.h" +#include + +using namespace spawner::vehicle::save::vars; + +namespace spawner::vehicle::save::vars { + variables m_vars; + + void save_vehicle(button_option* _this, const char* name) { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::notify::stacked(spawner_vehicle_save_menu::get()->get_name().get(), "You need to be in a vehicle!"); + return; + } + + try { + std::ofstream output(util::va::va("%s%s.json", util::dirs::get_path(lsc), name)); + nlohmann::json object; + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + + object["Armor"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARMOR); + object["Brakes"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_BRAKES); + object["FrontBumper"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER); + object["RearBumper"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER); + object["Engine"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE); + object["Exhaust"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_EXHAUST); + object["Hood"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HOOD); + object["Horn"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS); + object["Skirts"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SIDESKIRT); + object["Suspension"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SUSPENSION); + object["Transmission"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRANSMISSION); + object["Spoiler"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPOILER); + object["Grille"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_GRILLE); + object["LeftFender"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FENDER); + object["RightFender"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER); + object["Roof"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ROOF); + object["Chassis"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_CHASSIS); + object["FrontWheels"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + object["BackWheels"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_BACKWHEELS); + + object["WindowTint"] = native::get_vehicle_window_tint(menu::player::get_local_player().m_vehicle); + object["Turbo"] = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_TURBO); + object["Lights"] = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_XENONLIGHTS); + object["XenonColor"] = native::get_vehicle_xenon_lights_colour(menu::player::get_local_player().m_vehicle); + object["PlateIndex"] = native::get_vehicle_number_plate_text_index(menu::player::get_local_player().m_vehicle); + object["PlateText"] = native::get_vehicle_number_plate_text(menu::player::get_local_player().m_vehicle); + object["WheelType"] = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + object["CustomTires"] = native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + object["Unk17"] = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_UNK17); + object["Unk19"] = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_UNK19); + object["TireSmoke"] = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_TIRESMOKE); + object["Unk21"] = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_UNK21); + + // Bennys + object["BennysPlateholder"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_PLATEHOLDER); + object["BennysVanityPlate"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_VANITY_PLATES); + object["BennysTrimDesign"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRIM_DESIGN); + object["BennysOrnaments"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ORNAMENTS); + object["BennysInteriorDesign"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DASHBOARD); + object["BennysDials"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DIAL); + object["BennysDoors"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DOOR_SPEAKER); + object["BennysSeats"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SEATS); + object["BennysSteeringWheel"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_STEERINGWHEEL); + object["BennysShifter"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SHIFTER_LEAVERS); + object["BennysPlaques"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_PLAQUES); + object["BennysTrunk"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRUNK); + object["BennysAudioInstall"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPEAKERS); + object["BennysHydraulics"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HYDRULICS); + object["BennysEngineBlock"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE_BLOCK); + object["BennysAirFilters"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_AIR_FILTER); + object["BennysStuntBrace"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_STRUTS); + object["BennysArchCovers"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARCH_COVER); + object["BennysAerials"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_AERIALS); + object["BennysRearStripeColor"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRIM); + object["BennysTank"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TANK); + object["BennysWindowMod"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_WINDOWS); + object["BennysLivery"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_LIVERY); + object["BennysSpecialFrontRims"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPECIAL_FRONT_RIMS); + object["BennysSpecialRearRims"] = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPECIAL_REAR_RIMS); + + object["LowGrip"] = native::get_vehicle_tyres_are_low_grip(menu::player::get_local_player().m_vehicle); + object["Bulletproof"] = native::get_vehicle_tyres_can_burst(menu::player::get_local_player().m_vehicle); + + object["Neon"] = { + native::is_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, 0), + native::is_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, 1), + native::is_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, 2), + native::is_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, 3) + }; + + color_rgba neon_color; + native::get_vehicle_neon_lights_colour(menu::player::get_local_player().m_vehicle, &neon_color.r, &neon_color.g, &neon_color.b); + object["NeonColor"] = { neon_color.r, neon_color.g, neon_color.b }; + + color_rgba tyre_smoke_color; + native::get_vehicle_tyre_smoke_color(menu::player::get_local_player().m_vehicle, &tyre_smoke_color.r, &tyre_smoke_color.g, &tyre_smoke_color.b); + object["TyreSmokeColor"] = { tyre_smoke_color.r, tyre_smoke_color.g, tyre_smoke_color.b }; + + color_rgba vehicle_color; + native::get_vehicle_color(menu::player::get_local_player().m_vehicle, &vehicle_color.r, &vehicle_color.g, &vehicle_color.b); + object["VehicleColor"] = { vehicle_color.r, vehicle_color.g, vehicle_color.b }; + + int pearlescent_color = 0; + int wheel_color = 0; + native::get_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, &pearlescent_color, &wheel_color); + + object["PearlescentColor"] = pearlescent_color; + object["WheelColor"] = wheel_color; + + color_rgba primary_color = vehicle_color; + color_rgba secondary_color = vehicle_color; + + if (native::get_is_vehicle_primary_colour_custom(menu::player::get_local_player().m_vehicle)) { + native::get_vehicle_custom_primary_colour(menu::player::get_local_player().m_vehicle, &primary_color.r, &primary_color.g, &primary_color.b); + } + + if (native::get_is_vehicle_secondary_colour_custom(menu::player::get_local_player().m_vehicle)) { + native::get_vehicle_custom_secondary_colour(menu::player::get_local_player().m_vehicle, &secondary_color.r, &secondary_color.g, &secondary_color.b); + } + + object["PrimaryColor"] = { primary_color.r, primary_color.g, primary_color.b }; + object["SecondaryColor"] = { secondary_color.r, secondary_color.g, secondary_color.b }; + + object["Traction"] = global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_traction_curve_max; + + output << object.dump(4); + output.close(); + spawner_vehicle_save_menu::get()->update_once(); + } catch (std::exception& E) { + LOG_WARN("[JSON] %s", E.what()); + } + } + + void load_vehicle(std::string file) { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::notify::stacked(spawner_vehicle_save_menu::get()->get_name().get(), "You need to be in a vehicle!"); + return; + } + + try { + std::ifstream input(util::va::va("%s%s.json", util::dirs::get_path(lsc), file.c_str())); + if (input.good()) { + nlohmann::json object = nlohmann::json::parse(input); + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARMOR, object["Armor"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_BRAKES, object["Brakes"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER, object["FrontBumper"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER, object["RearBumper"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE, object["Engine"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_EXHAUST, object["Exhaust"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HOOD, object["Hood"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS, object["Horn"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SIDESKIRT, object["Skirts"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SUSPENSION, object["Suspension"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRANSMISSION, object["Transmission"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPOILER, object["Spoiler"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_GRILLE, object["Grille"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FENDER, object["LeftFender"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER, object["RightFender"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ROOF, object["Roof"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_CHASSIS, object["Chassis"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, object["FrontWheels"], object["CustomTires"]); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_BACKWHEELS, object["BackWheels"], object["CustomTires"]); + + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TURBO, object["Turbo"]); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_XENONLIGHTS, object["Lights"]); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_UNK17, object["Unk17"]); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_UNK19, object["Unk19"]); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TIRESMOKE, object["TireSmoke"]); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_UNK21, object["Unk21"]); + + native::set_vehicle_window_tint(menu::player::get_local_player().m_vehicle, object["WindowTint"]); + native::set_vehicle_xenon_lights_colour(menu::player::get_local_player().m_vehicle, object["XenonColor"]); + native::set_vehicle_number_plate_text_index(menu::player::get_local_player().m_vehicle, object["PlateIndex"]); + native::set_vehicle_number_plate_text(menu::player::get_local_player().m_vehicle, object["PlateText"].get().c_str()); + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, object["WheelType"]); + + // Bennys + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_PLATEHOLDER, object["BennysPlateholder"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_VANITY_PLATES, object["BennysVanityPlate"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRIM_DESIGN, object["BennysTrimDesign"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ORNAMENTS, object["BennysOrnaments"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DASHBOARD, object["BennysInteriorDesign"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DIAL, object["BennysDials"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DOOR_SPEAKER, object["BennysDoors"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SEATS, object["BennysSeats"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_STEERINGWHEEL, object["BennysSteeringWheel"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SHIFTER_LEAVERS, object["BennysShifter"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_PLAQUES, object["BennysPlaques"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRUNK, object["BennysTrunk"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPEAKERS, object["BennysAudioInstall"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HYDRULICS, object["BennysHydraulics"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE_BLOCK, object["BennysEngineBlock"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_AIR_FILTER, object["BennysAirFilters"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_STRUTS, object["BennysStuntBrace"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARCH_COVER, object["BennysArchCovers"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_AERIALS, object["BennysAerials"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRIM, object["BennysRearStripeColor"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TANK, object["BennysTank"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_WINDOWS, object["BennysWindowMod"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_LIVERY, object["BennysLivery"], false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPECIAL_FRONT_RIMS, object["BennysSpecialFrontRims"], object["CustomTires"]); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPECIAL_REAR_RIMS, object["BennysSpecialRearRims"], object["CustomTires"]); + + if (!object["LowGrip"].is_null()) { + native::set_vehicle_tyres_low_grip(menu::player::get_local_player().m_vehicle, object["LowGrip"].get()); + } + + if (!object["Bulletproof"].is_null()) { + native::set_vehicle_tyres_can_burst(menu::player::get_local_player().m_vehicle, object["Bulletproof"].get()); + } + + native::set_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, 0, object["Neon"][0]); + native::set_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, 1, object["Neon"][1]); + native::set_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, 2, object["Neon"][2]); + native::set_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, 3, object["Neon"][3]); + + native::set_vehicle_neon_lights_colour(menu::player::get_local_player().m_vehicle, object["NeonColor"][0], object["NeonColor"][1], object["NeonColor"][2]); + native::set_vehicle_tyre_smoke_color(menu::player::get_local_player().m_vehicle, object["TyreSmokeColor"][0], object["TyreSmokeColor"][1], object["TyreSmokeColor"][2]); + + native::set_vehicle_custom_primary_colour(menu::player::get_local_player().m_vehicle, object["PrimaryColor"][0], object["PrimaryColor"][1], object["PrimaryColor"][2]); + native::set_vehicle_custom_secondary_colour(menu::player::get_local_player().m_vehicle, object["SecondaryColor"][0], object["SecondaryColor"][1], object["SecondaryColor"][2]); + + native::set_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, object["PearlescentColor"], object["WheelColor"]); + + global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_traction_curve_max = object["Traction"]; + } + } catch (std::exception& E) { + LOG_WARN("[Json] %s", E.what()); + } + } +} + +void spawner_vehicle_save_menu::load() { + set_name("Save and Load"); + set_parent(); + + add_string("You need to be in a vehicle!"); + add_string("~m~None"); + + add_option(button_option("Save Vehicle Modifications") + .add_translate() + .add_keyboard("Enter name of vehicle", 30, save_vehicle)); + + add_option(break_option("Vehicles") + .add_translate()); +} + +void spawner_vehicle_save_menu::update() {} + +void spawner_vehicle_save_menu::update_once() { + clear_options(2); + + for (std::string file : util::dirs::get_files_in_directory(util::dirs::get_path(lsc), ".json")) { + add_option(button_option(file) + .add_click([=] { load_vehicle(file); })); + } +} + +void spawner_vehicle_save_menu::feature_update() {} + +spawner_vehicle_save_menu* g_instance; +spawner_vehicle_save_menu* spawner_vehicle_save_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_vehicle_save_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_save.h b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_save.h new file mode 100644 index 0000000..db82188 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_save.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class spawner_vehicle_save_menu : public menu::submenu::submenu { +public: + static spawner_vehicle_save_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_vehicle_save_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::vehicle::save::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_selected.cpp b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_selected.cpp new file mode 100644 index 0000000..901173f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_selected.cpp @@ -0,0 +1,267 @@ +#include "spawner_vehicle_selected.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "rage/engine.h" +#include "menu/base/util/panels.h" + +using namespace spawner::vehicle::selected::vars; + +namespace spawner::vehicle::selected::vars { + variables m_vars; + + std::string texture_list[] = { + "candc_apartments", + "candc_assault", + "candc_battle", + "candc_casinoheist", + "candc_chopper", + "candc_default", + "candc_executive1", + "candc_gunrunning", + "candc_hacker", + "candc_importexport", + "candc_smuggler", + "candc_truck", + "candc_xmas2017", + "casino_suites", + "dock_default", + "dock_dlc_banner", + "dock_dlc_color", + "dock_dlc_executive1", + "dock_dlc_fittings", + "dock_dlc_flag", + "dock_dlc_lights", + "dock_dlc_model", + "dock_dlc_slides", + "dock_yacht_backgrounds", + "elt_default", + "elt_dlc_apartments", + "elt_dlc_assault", + "elt_dlc_battle", + "elt_dlc_business", + "elt_dlc_executive1", + "elt_dlc_luxe", + "elt_dlc_pilot", + "elt_dlc_smuggler", + "lgm_default", + "lgm_dlc_apartments", + "lgm_dlc_arena", + "lgm_dlc_assault", + "lgm_dlc_battle", + "lgm_dlc_biker", + "lgm_dlc_business", + "lgm_dlc_business2", + "lgm_dlc_casinoheist", + "lgm_dlc_executive1", + "lgm_dlc_gunrunning", + "lgm_dlc_heist", + "lgm_dlc_importexport", + "lgm_dlc_lts_creator", + "lgm_dlc_luxe", + "lgm_dlc_pilot", + "lgm_dlc_smuggler", + "lgm_dlc_specialraces", + "lgm_dlc_stunt", + "lgm_dlc_summer2020", + "lgm_dlc_valentines", + "lgm_dlc_valentines2", + "lgm_dlc_vinewood", + "lgm_dlc_xmas2017", + "lsc_default", + "lsc_dlc_import_export", + "lsc_dlc_summer2020", + "lsc_jan2016", + "lsc_lowrider2", + "mba_vehicles", + "pandm_default", + "sssa_default", + "sssa_dlc_arena", + "sssa_dlc_assault", + "sssa_dlc_battle", + "sssa_dlc_biker", + "sssa_dlc_business", + "sssa_dlc_business2", + "sssa_dlc_casinoheist", + "sssa_dlc_christmas_2", + "sssa_dlc_christmas_3", + "sssa_dlc_executive_1", + "sssa_dlc_halloween", + "sssa_dlc_heist", + "sssa_dlc_hipster", + "sssa_dlc_independence", + "sssa_dlc_lts_creator", + "sssa_dlc_mp_to_sp", + "sssa_dlc_smuggler", + "sssa_dlc_stunt", + "sssa_dlc_summer2020", + "sssa_dlc_valentines", + "sssa_dlc_vinewood", + "sssa_dlc_xmas2017", + "lgm_dlc_tuner", + "sssa_dlc_tuner" + }; + + void populate_textures() { + util::fiber::pool::add([=] { + for (std::string texture : texture_list) { + bool loaded = true; + + while (!native::has_streamed_texture_dict_loaded(texture.c_str())) { + loaded = false; + native::request_streamed_texture_dict(texture.c_str(), true); + util::fiber::sleep(100); + } + + util::fiber::sleep(250); + + rage::types::texture_store* store = global::vars::g_texture_store; + if (is_valid_ptr(store) && is_valid_ptr(store->m_pool) && is_valid_ptr(store->m_mask)) { + rage::types::dictionary_pool* pool = store->m_pool; + for (uint32_t i = 0; i < store->m_count; i++) { + if (~(store->m_mask[i] >> 7) & 1) { + rage::types::dictionary_pool element = pool[i]; + if (is_valid_ptr(element.m_pool)) { + if (element.m_dictionary_hash == native::get_hash_key(texture.c_str())) { + for (short j = 0; j < element.m_pool->m_count; j++) { + rage::types::grc_texture_dx11* item = element.m_pool->m_items[j]; + if (is_valid_ptr(item)) { + if (is_valid_ptr(item->m_name)) { + if (!strstr(item->m_name, "_")) { + m_vars.m_textures[native::get_hash_key(item->m_name)] = texture; + } + } + } + } + } + } + } + } + } + + if (!loaded) { + native::set_streamed_texture_dict_as_no_longer_needed(texture.c_str()); + } + } + }); + } + + std::pair, rage::types::vehicle_model_info*> get_vehicle_model_texture(uint32_t model) { + rage::types::vehicle_model_info* info = (rage::types::vehicle_model_info*)rage::engine::get_model_info(model); + if (info) { + auto vit = std::find_if(m_vars.m_textures.begin(), m_vars.m_textures.end(), [=](std::pair Element) { + return Element.first == model; + }); + + if (vit != m_vars.m_textures.end()) { + return { std::make_pair(vit->second, info->m_model_name), info }; + } + + // try again for 2 + std::string name = std::string(info->m_model_name) + "2"; + + vit = std::find_if(m_vars.m_textures.begin(), m_vars.m_textures.end(), [=](std::pair Element) { + return Element.first == native::get_hash_key(name.c_str()); + }); + + if (vit != m_vars.m_textures.end()) { + return { std::make_pair(vit->second, name), info }; + } + } + + return { std::make_pair("", ""), nullptr }; + } + + void preview(uint32_t model) { + menu::panels::panel_custom_vehicle_preview data; + + std::pair, rage::types::vehicle_model_info*> texture = get_vehicle_model_texture(model); + if (!texture.first.first.empty()) { + strcpy_s(data.m_dict, texture.first.first.c_str()); + strcpy_s(data.m_name, texture.first.second.c_str()); + } + + data.m_model = model; + data.m_max_speed = native::get_vehicle_model_max_speed(model) * global::vars::g_selected_metric_system.first; + data.m_seats = native::get_vehicle_model_number_of_seats(model); + data.m_max_braking = native::get_vehicle_model_max_braking(model); + data.m_max_traction = native::get_vehicle_model_max_traction(model); + + if (texture.second) { + strcpy_s(data.m_manufacturer, texture.second->m_manufacturer_name); + } else { + menu::panels::toggle_panel_render("PANEL_VEHICLE_PREVIEW", false); + return; + } + + menu::panels::set_structure(menu::panels::get_child(menu::panels::get_parent("PANEL_VEHICLE_PREVIEW"), "PANEL_VEHICLE_PREVIEW_INFO"), &data, sizeof(data)); + menu::panels::toggle_panel_render("PANEL_VEHICLE_PREVIEW", spawner::vars::m_vars.m_flag == spawner::vars::SPAWNER_SELF); + } +} + +void spawner_vehicle_selected_menu::load() { + set_name("Spawner", false, false); + set_parent(); + + populate_textures(); +} + +void spawner_vehicle_selected_menu::update() {} + +void spawner_vehicle_selected_menu::update_once() { + clear_options(0); + set_name(spawner_menu::get()->get_string(spawner::vars::get_class_name(m_vars.m_selected)), false, false); + + struct found_vehicles { + std::string m_name; + int m_count; + uint32_t m_hash; + }; + + std::vector vehicles; + + for (uint32_t hash : spawner::vars::m_vars.m_vehicle_hashes[m_vars.m_selected]) { + const char* name = native::get_display_name_from_vehicle_model(hash); + if (name) { + name = native::get_label_text(name); + if (strcmp(name, "NULL")) { + vehicles.push_back({ name, 0, hash }); + } + } + } + + std::vector> names; + + for (found_vehicles& vehicle : vehicles) { + auto& vit = std::find_if(names.begin(), names.end(), [=](std::pair& Element) { + return Element.first == vehicle.m_name; + }); + + if (vit == names.end()) { + names.push_back({ vehicle.m_name, 0 }); + } else { + vit->second++; + vehicle.m_name += " " + std::to_string(vit->second + 1); + } + } + + for (found_vehicles& vehicle : vehicles) { + add_option(button_option(vehicle.m_name) + .add_hover([=] { preview(vehicle.m_hash); }) + .add_click([=] { spawner::vars::spawn_vehicle(vehicle.m_hash); })); + } +} + +void spawner_vehicle_selected_menu::feature_update() {} + +spawner_vehicle_selected_menu* g_instance; +spawner_vehicle_selected_menu* spawner_vehicle_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_vehicle_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_selected.h b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_selected.h new file mode 100644 index 0000000..141c613 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_selected.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" +#include + +class spawner_vehicle_selected_menu : public menu::submenu::submenu { +public: + static spawner_vehicle_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_vehicle_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::vehicle::selected::vars { + struct variables { + int m_selected; + std::unordered_map m_textures; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_settings.cpp b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_settings.cpp new file mode 100644 index 0000000..031cb9b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_settings.cpp @@ -0,0 +1,96 @@ +#include "spawner_vehicle_settings.h" +#include "menu/base/submenu_handler.h" +#include "../../spawner.h" + +using namespace spawner::vehicle::settings::vars; + +namespace spawner::vehicle::settings::vars { + variables m_vars; + + scroll_struct upgrades[] = { + { localization("Performance", true), 0 }, + { localization("Everything", true), 0 }, + }; +} + +void spawner_vehicle_settings_menu::load() { + set_name("Spawn Settings", true, false); + set_parent(); + + get_submenu_name_stack().push("Vehicle"); + + add_option(toggle_option("Gift Vehicle") + .add_translate() + .add_toggle(menu::player::get_selected_player().m_gift_vehicle) + .add_update([] (toggle_option* option, int pos) { + if (spawner::vars::m_vars.m_flag == spawner::vars::SPAWNER_SESSION) { + option->add_toggle(m_vars.m_session_gift); + } else { + option->add_toggle(menu::player::get_selected_player().m_gift_vehicle); + } + }) + .add_requirement([] { return spawner::vars::m_vars.m_flag != spawner::vars::SPAWNER_SELF; }) + .add_tooltip("Vehicles spawned for this player will be gifted to them")); + + add_option(toggle_option("Notification") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_notification).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Blip") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_blip).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Particle FX") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_particle_fx).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Teleport Inside") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_teleport_inside).add_savable(get_submenu_name_stack()) + .add_requirement([] { return spawner::vars::m_vars.m_flag == spawner::vars::SPAWNER_SELF; })); + + add_option(toggle_option("Godmode") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_godmode).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Fade") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_fade).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Air Vehicles In Air") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_air_vehicles_in_air).add_savable(get_submenu_name_stack()) + .add_requirement([] { return spawner::vars::m_vars.m_flag == spawner::vars::SPAWNER_SELF; })); + + add_option(number_option(SCROLL, "Air Vehicles Height") + .add_translate() + .add_number(m_vars.m_spawn_height, "%.0f", 1.f).add_min(0.f).add_max(1000.f).add_savable(get_submenu_name_stack()) + .add_requirement([] { return spawner::vars::m_vars.m_flag == spawner::vars::SPAWNER_SELF; })); + + add_option(toggle_option("Delete Current") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_delete_current).add_savable(get_submenu_name_stack()) + .add_requirement([] { return spawner::vars::m_vars.m_flag == spawner::vars::SPAWNER_SELF; })); + + add_option(scroll_option(TOGGLE, "Upgrades") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_upgrades) + .add_scroll(m_vars.m_upgrades_var, 0, NUMOF(upgrades), upgrades).add_savable(get_submenu_name_stack())); +} + +void spawner_vehicle_settings_menu::update() {} + +void spawner_vehicle_settings_menu::update_once() {} + +void spawner_vehicle_settings_menu::feature_update() {} + +spawner_vehicle_settings_menu* g_instance; +spawner_vehicle_settings_menu* spawner_vehicle_settings_menu::get() { + if (g_instance == nullptr) { + g_instance = new spawner_vehicle_settings_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_settings.h b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_settings.h new file mode 100644 index 0000000..20617ce --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/spawner/vehicle/spawner_vehicle_settings.h @@ -0,0 +1,35 @@ +#pragma once +#include "menu/base/submenu.h" + +class spawner_vehicle_settings_menu : public menu::submenu::submenu { +public: + static spawner_vehicle_settings_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + spawner_vehicle_settings_menu() + : menu::submenu::submenu() {} +}; + +namespace spawner::vehicle::settings::vars { + struct variables { + bool m_notification = true; + bool m_blip; + bool m_particle_fx; + bool m_teleport_inside = true; + bool m_godmode = true; + bool m_fade; + bool m_delete_current = true; + bool m_air_vehicles_in_air = true; + bool m_upgrades; + bool m_session_gift; + + int m_upgrades_var; + float m_spawn_height = 100.f; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport.cpp b/GTAV/src/menu/base/submenus/main/teleport.cpp new file mode 100644 index 0000000..daf1a28 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport.cpp @@ -0,0 +1,509 @@ +#include "teleport.h" +#include "menu/base/submenu_handler.h" +#include "../main.h" +#include "teleport/teleport_save_load.h" +#include "teleport/teleport_settings.h" +#include "teleport/teleport_selected.h" +#include "teleport/teleport_directional.h" +#include "teleport/teleport_ipl.h" +#include "teleport/teleport_stores.h" +#include "menu/base/util/control.h" +#include "util/fiber_pool.h" +#include "util/fiber.h" +#include "global/lists.h" + +using namespace teleport::vars; + +namespace teleport::vars { + variables m_vars; + + scroll_struct vehicle_types[] = { + { localization("Inside", true), 0 }, + { localization("Outside", true), 1 }, + }; + + scroll_struct> airstrips[] = { + { localization("Arcadius - Helipad", true), { -143.71f, -593.77f, 211.78f } }, + { localization("Casino - Helipad", true), { 974.41f, 48.71f, 123.12f } }, + { localization("Davis Hospital - Helipad", true), { 318.68f, -1451.53f, 46.51f } }, + { localization("Del Perro - Helipad", true), { -1224.19f, -829.52f, 29.41f } }, + { localization("Del Perro - Helipad 2", true), { -1390.84f, -478.36f, 91.25f } }, + { localization("Del Perro - Helipad 3", true), { -1582.87f, -569.21f, 116.33f } }, + { localization("Downtown Vinewood - PD Helipad", true), { 571.07f, 4.87f, 103.23f } }, + { localization("Elysian Island - Helipad", true), { 484.33f, -3375.14f, 6.07f } }, + { localization("Fort Zancudo - Hangar", true), { -1828.f, 2974.f, 32.81f } }, + { localization("Fort Zancudo - Helipad", true), { -1859.f, 2816.f, 32.81f } }, + { localization("Fort Zancudo - Jet Spawn", true), { -2242.52f, 3229.81f, 32.81f } }, + { localization("Fort Zancudo - North Runway", true), { -2022.53f, 2867.f, 32.91f } }, + { localization("Grapeseed - East Runway", true), { 2136.51f, 4810.95f, 41.20f } }, + { localization("Humane Labs - Helipad", true), { 2510.61f, -341.90f, 118.19f } }, + { localization("La Mesa - Helipad", true), { 910.54f, -1680.18f, 51.13f } }, + { localization("La Puerta - Helipad", true), { -726.48f, -1423.14f, 5.f } }, + { localization("Little Seoul - Helipad", true), { -583.80f, -930.93f, 36.83f } }, + { localization("LSIA - Hangar", true), { -998.97f, -3025.83f, 13.95f } }, + { localization("LSIA - Helipad", true), { -1159.51f, -2889.13f, 13.95f } }, + { localization("LSIA - East Runway", true), { -1328.78f, -2197.64f, 13.94f } }, + { localization("LSIA - North Runway", true), { -940.38f, -3371.61f, 13.94f } }, + { localization("Maze Bank - Helipad", true), { -75.02f, -826.03f, 326.18f } }, + { localization("Mission Row - Helipad", true), { 476.71f, -1107.70f, 43.08f } }, + { localization("Mission Row - Helipad 2", true), { 450.16f, -981.89f, 43.69f } }, + { localization("Rockford Hills - Helipad", true), { -903.96f, -373.48f, 136.26f } }, + { localization("Sandy Shores - East Runway", true), { 1707.08f, 3251.56f, 41.02f } }, + { localization("Sandy Shores - Helipad", true), { 1781.56f, 3249.81f, 42.12f } }, + { localization("Vespucci Canals - Helipad", true), { -1094.59f, -834.67f, 37.68f } }, + }; + + scroll_struct> docks[] = { + { localization("Del Perro Beach", true), { -1799.99f, -1224.71f, 1.58f } }, + { localization("Elysian Island - Harbor", true), { -69.52f, -2775.38f, 6.08f } }, + { localization("Elysian Island - South Docks", true), { -499.00f, -2923.25f, 6.00f } }, + { localization("Galilee", true), { 1302.69f, 4233.84f, 33.91f } }, + { localization("La Puerta", true), { -800.71f, -1512.88f, 1.60f } }, + { localization("Paleto Cove", true), { -1609.46f, 5255.05f, 3.97f } }, + { localization("San Chianski Mountain Range", true), { 3865.21f, 4463.74f, 2.72f } }, + }; + + scroll_struct> zones[] = { + { localization("Chumash", true), { -3126.20f, 1122.80f, 20.61f } }, + { localization("Downtown Los Santos", true), { 21.25f, -750.30f, 44.10f } }, + { localization("Del Perro", true), { -1434.20f, -736.68f, 23.51f, } }, + { localization("East Los Santos", true), { 773.83f, -2047.25f, 29.24f, } }, + { localization("Elysian Island", true), { 198.34f, -2572.42f, 6.12f, } }, + { localization("Grapeseed", true), { 2168.62f, 4922.48f, 40.68f } }, + { localization("Harmony", true), { 580.02f, 2701.47f, 41.75f } }, + { localization("La Puerta", true), { -419.77f, -1753.76f, 20.21f, } }, + { localization("Little Seoul", true), { -551.83f, -970.10f, 23.42f, } }, + { localization("Pacific Bluffs", true), { -2022.12f, -277.07f, 32.10f, } }, + { localization("Paleto Bay", true), { -59.84f, 6290.79f, 31.41f } }, + { localization("Rocksford Hills", true), { -848.61f, -57.22f, 37.84f, } }, + { localization("Sandy Shores", true), { 2050.89f, 3723.60f, 32.92f } }, + { localization("South Los Santos", true), { -176.76f, -1634.20f, 33.32f, } }, + { localization("Vespucci", true), { -1147.62f, -1298.82f, 5.12f, } }, + { localization("Vinewood", true), { 27.00f, 270.65f, 109.48f, } }, + { localization("Vinewood Hills", true), { 293.96f, 823.40f, 191.21f, } }, + }; + + scroll_struct> interiors[] = { + { localization("Apartment Complex", true), { -1159.14f, -225.50f, 37.94f, } }, + { localization("FIB Floor 47", true), { 137.60f, -767.00f, 234.15f, } }, + { localization("FIB Floor 49", true), { 142.09f, -768.82f, 242.15f, } }, + { localization("FIB Floors 50 & 51", true), { 142.18f, -769.20f, 250.15f, } }, + { localization("LSIA", true), { -1559.07f, -3236.76f, 29.63f, } }, + { localization("LSIA Hangar", true), { -931.94f, -2922.82f, 13.95f, } }, + { localization("Motel", true), { 152.26f, -1004.46f, -99.00f, } }, + { localization("Mount Chilliad Mill", true), { -579.96f, 5313.40f, 70.21f, } }, + { localization("Pacific Standard Bank", true), { 224.28f, 210.89f, 105.55f, } }, + { localization("Rundown Motel", true), { 1552.53f, 3557.59f, 35.36f, } }, + { localization("Sandy Shores Air Control", true), { 1699.77f, 3299.43f, 41.15f, } }, + { localization("Solomon's Office", true), { -1003.96f, -477.95f, 50.03f, } }, + }; + + int get_ideal_switch(math::vector3 from, math::vector3 to) { + return native::get_ideal_player_switch_type(from.x, from.y, from.z, to.x, to.y, to.z); + } + + void teleport(math::vector3 coords, bool only_player, std::function)> callback, bool no_tp) { + if (m_vars.m_transition) { + util::fiber::pool::add([=] { + uint32_t hash = native::get_hash_key(menu::player::get_local_player().m_connected ? "mp_m_freemode_01" : "player_zero"); + menu::control::request_model(hash, [=](uint32_t model) { + Ped ped = native::create_ped(13, model, coords.x, coords.y, coords.z, 0.f, true, false); + if (native::does_entity_exist(ped)) { + native::start_player_switch(menu::player::get_local_player().m_ped, ped, 0, get_ideal_switch(menu::player::get_local_player().m_coords, coords)); + native::set_entity_as_mission_entity(ped, true, true); + native::delete_entity(&ped); + + if (native::is_player_switch_in_progress()) { + while (native::get_player_switch_state() != 8) { + util::fiber::sleep(100); + + if (native::get_player_switch_state() == 12) break; + } + + if (m_vars.m_include_current_vehicle && !only_player) { + if (menu::player::get_local_player().m_in_vehicle) { + Ped driver = native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, -1, 0); + if (driver == menu::player::get_local_player().m_ped) { + if (!no_tp) native::set_entity_coords(menu::player::get_local_player().m_vehicle, coords.x, coords.y, coords.z, false, false, false, false); + callback(coords); + } else { + // request control + menu::control::request_control(menu::player::get_local_player().m_vehicle, [=](Entity entity) { + if (!no_tp) native::set_entity_coords(entity, coords.x, coords.y, coords.z, false, false, false, false); + callback(coords); + }); + } + } else { + if (!no_tp) native::set_entity_coords(menu::player::get_local_player().m_ped, coords.x, coords.y, coords.z, false, false, false, false); + callback(coords); + } + } else { + if (!no_tp) native::set_entity_coords(menu::player::get_local_player().m_ped, coords.x, coords.y, coords.z, false, false, false, false); + callback(coords); + } + } + } + }); + }); + } else { + if (m_vars.m_include_current_vehicle && !only_player) { + if (menu::player::get_local_player().m_in_vehicle) { + Ped driver = native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, -1, 0); + if (driver == menu::player::get_local_player().m_ped) { + if (!no_tp) native::set_entity_coords(menu::player::get_local_player().m_vehicle, coords.x, coords.y, coords.z, false, false, false, false); + callback(coords); + } else { + // request control + menu::control::request_control(menu::player::get_local_player().m_vehicle, [=](Entity entity) { + if (!no_tp) native::set_entity_coords(entity, coords.x, coords.y, coords.z, false, false, false, false); + callback(coords); + }); + } + } else { + if (!no_tp) native::set_entity_coords(menu::player::get_local_player().m_ped, coords.x, coords.y, coords.z, false, false, false, false); + callback(coords); + } + } else { + if (!no_tp) native::set_entity_coords(menu::player::get_local_player().m_ped, coords.x, coords.y, coords.z, false, false, false, false); + callback(coords); + } + } + } + + void teleport_to_objective() { + teleport_menu* instance = teleport_menu::get(); + bool teleported = false; + + rage::types::blip_list* list = global::vars::g_blip_list; + if (list) { + for (int i = 0; i < 1500; i++) { + rage::types::blip* blip = list->m_blips[i]; + if (blip) { + int color = blip->m_color; + int icon = blip->m_sprite; + + if ((icon == 306) || (color == 66 && icon == 1) || (color == 60 && icon == 1) || + (color == 5 && icon == 1) || (color == 0 && icon == 38) || (color == 2 && icon == 1) || (color == 3 && icon == 1)) { + math::vector3 coords = math::vector3_::to_padded(blip->m_coords); + if (coords.is_null()) { + menu::notify::stacked(instance->get_string("Teleport"), instance->get_string("Failed to teleport to objective")); + } else { + teleported = true; + teleport(coords); + break; + } + } + } + } + } + + if (!teleported) { + menu::notify::stacked(instance->get_string("Teleport"), instance->get_string("Failed to find objective")); + } + } + + void teleport_to_nearest_player() { + float closest_distance = std::numeric_limits::max(); + Player closest_player = -1; + + menu::player::for_each([&](menu::player::player_context& player) { + float distance = player.m_coords.get_distance(menu::player::get_local_player().m_coords); + if (distance < closest_distance) { + closest_distance = distance; + closest_player = player.m_id; + } + }); + + if (closest_player != -1) { + teleport(menu::player::get_player(closest_player).m_coords); + } + } + + void teleport_to_nearest_vehicle() { + float closest_distance = std::numeric_limits::max(); + Vehicle closest_vehicle = -1; + int vehicle_seat = -2; + + global::vars::g_vehicle_pool->for_each([&](Entity vehicle, void* veh) { + if (menu::player::get_local_player().m_in_vehicle && vehicle == menu::player::get_local_player().m_vehicle) return; + + math::vector3 coords = native::get_entity_coords(vehicle, true); + + float distance = coords.get_distance(menu::player::get_local_player().m_coords); + if (distance < closest_distance) { + Ped driver = native::get_ped_in_vehicle_seat(vehicle, -1, 0); + if (!native::does_entity_exist(driver) || !native::is_ped_a_player(driver)) { + closest_distance = distance; + closest_vehicle = vehicle; + vehicle_seat = -1; + return; + } + + for (int i = 0; i < native::get_vehicle_max_number_of_passengers(vehicle); i++) { + Ped ped = native::get_ped_in_vehicle_seat(vehicle, i, 0); + if (!native::does_entity_exist(ped)) { + closest_distance = distance; + closest_vehicle = vehicle; + vehicle_seat = i; + return; + } + } + } + }); + + if (closest_vehicle != -1) { + if (native::does_entity_exist(closest_vehicle)) { + if (m_vars.m_nearest_vehicle == 0) { + // inside + Ped driver = native::get_ped_in_vehicle_seat(closest_vehicle, -1, 0); + if (native::does_entity_exist(driver)) { + if (native::is_ped_a_player(driver)) { + menu::control::request_control(closest_vehicle, [](Entity, int) {}, true); + } else { + native::clear_ped_tasks_immediately(driver); + } + } + + native::set_ped_into_vehicle(menu::player::get_local_player().m_ped, closest_vehicle, vehicle_seat); + } else { + // outside + teleport(native::get_entity_coords(closest_vehicle, true), true); + } + } + } + } + + void teleport_to_personal_vehicle() { + bool found = false; + + for (int i = 225; i < 227; i++) { + int handle = native::get_first_blip_info_id(i); + if (native::does_blip_exist(handle)) { + math::vector3 coords = native::get_blip_coords(handle); + if (!coords.is_null()) { + found = true; + + Vehicle vehicle = native::get_closest_vehicle(coords.x, coords.y, coords.z, 5.f, 0, 70); + if (m_vars.m_personal_vehicle == 0) { + // inside + Ped driver = native::get_ped_in_vehicle_seat(vehicle, -1, 0); + if (native::does_entity_exist(driver)) { + if (native::is_ped_a_player(driver)) { + menu::control::request_control(vehicle, [](Entity, int) {}, true); + } else { + native::clear_ped_tasks_immediately(driver); + } + } + + native::set_ped_into_vehicle(menu::player::get_local_player().m_ped, vehicle, -1); + } else { + // outside + teleport(native::get_entity_coords(vehicle, true), true); + } + + break; + } + } + } + + if (!found) { + teleport_menu* _this = teleport_menu::get(); + menu::notify::stacked(_this->get_string("Teleport"), _this->get_string("Failed to find personal vehicle")); + } + } + + void teleport_to_last_vehicle() { + Vehicle vehicle = native::get_players_last_vehicle(); + if (native::does_entity_exist(vehicle)) { + if (m_vars.m_last_vehicle == 0) { + // inside + Ped driver = native::get_ped_in_vehicle_seat(vehicle, -1, 0); + if (native::does_entity_exist(driver)) { + if (native::is_ped_a_player(driver)) { + menu::control::request_control(vehicle, [](Entity, int) {}, true); + } else { + native::clear_ped_tasks_immediately(driver); + } + } + + native::set_ped_into_vehicle(menu::player::get_local_player().m_ped, vehicle, -1); + } else { + // outside + teleport(native::get_entity_coords(vehicle, true), true); + } + } else { + teleport_menu* _this = teleport_menu::get(); + menu::notify::stacked(_this->get_string("Teleport"), _this->get_string("Failed to find last vehicle")); + } + } + + void teleport_to_waypoint() { + util::fiber::pool::add([=] { + math::vector3 coords = native::get_blip_info_id_coord(native::get_first_blip_info_id(8)); + if (coords.is_null()) { + teleport_menu* _this = teleport_menu::get(); + menu::notify::stacked(_this->get_string("Teleport"), _this->get_string("Failed to find waypoint")); + return; + } + + Entity entity = menu::player::get_local_player().m_ped; + if (m_vars.m_include_current_vehicle && menu::player::get_local_player().m_in_vehicle) { + entity = menu::player::get_local_player().m_vehicle; + } + + bool ground_found = false; + float ground_check_height[] = { 100.0f, 150.0f, 50.0f, 0.0f, 200.0f, 250.0f, 300.0f, 350.0f, 400.0f, 450.0f, 500.0f, 550.0f, 600.0f, 650.0f, 700.0f, 750.0f, 800.0f }; + for (int i = 0; i < sizeof(ground_check_height) / sizeof(float); i++) { + native::set_entity_coords_no_offset(entity, coords.x, coords.y, ground_check_height[i], 0, 0, 1); + util::fiber::sleep(100); + if (native::get_ground_z_for_3d_coord(coords.x, coords.y, ground_check_height[i], &coords.z, 0)) { + ground_found = true; + break; + } + } + + if (!ground_found) { + coords.z = 1000.0f; + native::give_delayed_weapon_to_ped(menu::player::get_local_player().m_ped, 0xFBAB5776, 1, 0); + } + + native::set_entity_coords(entity, coords.x, coords.y, coords.z, false, false, false, false); + }); + } +} + +void teleport_menu::load() { + set_name("Teleport"); + set_parent(); + + add_string("Teleport"); + add_string("Failed to teleport to objective"); + add_string("Failed to find objective"); + add_string("Failed to find personal vehicle"); + add_string("Failed to find waypoint"); + add_string("Failed to find last vehicle"); + + teleport::selected::vars::m_vars.m_selected = airstrips; + teleport::selected::vars::m_vars.m_size = NUMOF(airstrips); + + add_option(submenu_option("Settings") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Save and Load") + .add_translate().add_hotkey() + .add_submenu()); + + m_vars.m_popular = add_option(submenu_option("Popular") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + teleport::selected::vars::m_vars.m_selected = global::lists::g_popular_locations; + teleport::selected::vars::m_vars.m_size = NUMOF(global::lists::g_popular_locations); + teleport_selected_menu::get()->set_name(m_vars.m_popular->get_name().get(), false, false); + })); + + add_option(submenu_option("Stores") + .add_translate().add_hotkey() + .add_submenu()); + + m_vars.m_airstrips = add_option(submenu_option("Airstrips and Helipads") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + teleport::selected::vars::m_vars.m_selected = airstrips; + teleport::selected::vars::m_vars.m_size = NUMOF(airstrips); + teleport_selected_menu::get()->set_name(m_vars.m_airstrips->get_name().get(), false, false); + })); + + m_vars.m_zones = add_option(submenu_option("Zones") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + teleport::selected::vars::m_vars.m_selected = zones; + teleport::selected::vars::m_vars.m_size = NUMOF(zones); + teleport_selected_menu::get()->set_name(m_vars.m_zones->get_name().get(), false, false); + })); + + m_vars.m_docks = add_option(submenu_option("Docks") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + teleport::selected::vars::m_vars.m_selected = docks; + teleport::selected::vars::m_vars.m_size = NUMOF(docks); + teleport_selected_menu::get()->set_name(m_vars.m_docks->get_name().get(), false, false); + })); + + m_vars.m_interiors = add_option(submenu_option("Interiors") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + teleport::selected::vars::m_vars.m_selected = interiors; + teleport::selected::vars::m_vars.m_size = NUMOF(interiors); + teleport_selected_menu::get()->set_name(m_vars.m_interiors->get_name().get(), false, false); + })); + + add_option(submenu_option("IPL") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Directional") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(button_option("Teleport to Objective") + .add_translate().add_hotkey() + .add_click(teleport_to_objective)); + + add_option(button_option("Teleport to Waypoint") + .add_translate().add_hotkey() + .add_click(teleport_to_waypoint)); + + add_option(button_option("Teleport to Nearest Player") + .add_translate().add_hotkey() + .add_click(teleport_to_nearest_player)); + + add_option(scroll_option(SCROLLSELECT, "Teleport to Nearest Vehicle") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_nearest_vehicle, 0, NUMOF(vehicle_types), vehicle_types) + .add_click(teleport_to_nearest_vehicle)); + + add_option(scroll_option(SCROLLSELECT, "Teleport to Personal Vehicle") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_personal_vehicle, 0, NUMOF(vehicle_types), vehicle_types) + .add_click(teleport_to_personal_vehicle)); + + add_option(scroll_option(SCROLLSELECT, "Teleport to Last Vehicle") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_last_vehicle, 0, NUMOF(vehicle_types), vehicle_types) + .add_click(teleport_to_last_vehicle)); +} + +void teleport_menu::update() {} + +void teleport_menu::update_once() {} + +void teleport_menu::feature_update() { + if (m_vars.m_auto_waypoint) { + if (native::is_waypoint_active() && !m_vars.m_has_teleported_flag) { + teleport_to_waypoint(); + m_vars.m_has_teleported_flag = true; + m_vars.m_waypoint_timer = GetTickCount() + 3000; + } + + if (m_vars.m_waypoint_timer < GetTickCount()) { + m_vars.m_has_teleported_flag = false; + } + } +} + +teleport_menu* g_instance; +teleport_menu* teleport_menu::get() { + if (g_instance == nullptr) { + g_instance = new teleport_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport.h b/GTAV/src/menu/base/submenus/main/teleport.h new file mode 100644 index 0000000..6d888c0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport.h @@ -0,0 +1,39 @@ +#pragma once +#include "menu/base/submenu.h" + +class teleport_menu : public menu::submenu::submenu { +public: + static teleport_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + teleport_menu() + : menu::submenu::submenu() {} +}; + +namespace teleport::vars { + struct variables { + bool m_transition; + bool m_auto_waypoint; + bool m_include_current_vehicle = true; + bool m_has_teleported_flag; + + std::shared_ptr m_popular; + std::shared_ptr m_docks; + std::shared_ptr m_airstrips; + std::shared_ptr m_zones; + std::shared_ptr m_interiors; + + int m_nearest_vehicle; + int m_personal_vehicle; + int m_last_vehicle; + + uint32_t m_waypoint_timer; + }; + + void teleport(math::vector3 coords, bool only_player = false, std::function)> callback = [](math::vector3) {}, bool no_tp = false); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/stores/teleport_stores_selected.cpp b/GTAV/src/menu/base/submenus/main/teleport/stores/teleport_stores_selected.cpp new file mode 100644 index 0000000..c9cc692 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/stores/teleport_stores_selected.cpp @@ -0,0 +1,125 @@ +#include "teleport_stores_selected.h" +#include "menu/base/submenu_handler.h" +#include "../teleport_stores.h" +#include "../../teleport.h" + +using namespace teleport::stores::selected::vars; + +namespace teleport::stores::selected::vars { + variables m_vars; + + std::pair> locations[9][12] = { + { // Ammunation + { "Sandy Shores", { 1705.173f, 3747.373f, 33.922f } }, + { "Hawick", { 234.312f, -42.553f, 69.676f } }, + { "La Mesa", { 843.569f, -1018.228f, 27.561f } }, + { "Paleto Bay", { -320.263f, 6071.031f, 31.337f } }, + { "Little Seoul", { -663.388f, -950.879f, 21.399f } }, + { "Morningwood", { -1324.082f, -388.411f, 36.545f } }, + { "Great Chaparral", { -1108.773f, 2685.568f, 18.875f } }, + { "Chumash", { -3158.208f, 1078.877f, 20.691f } }, + { "Tataviam", { 2568.549f, 313.032f, 108.461f } }, + { "Pillbox Hill", { 15.288f, -1122.648f, 28.816f } }, + { "Cypress Flats", { 812.893f, -2139.652f, 29.292f } }, + }, + { // Barber Shop + { "Rockford Hills", { -827.346f, -190.451f, 37.604f } }, + { "Davis", { 130.348f, -1715.111f, 29.234f } }, + { "Vespucci", { -1295.014f, -1116.923f, 6.655f } }, + { "Sandy Shores", { 1936.458f, 3720.811f, 32.672f } }, + { "Mirror Park", { 1202.648f, -470.297f, 66.246f } }, + { "Hawick", { -30.615f, -142.411f, 57.051f } }, + { "Paleto Bay", { -284.387f, 6236.210f, 31.460f } }, + }, + { // Binco + { "Textile City", { 411.758f, -808.082f, 29.144f } }, + { "Vespucci Canals", { -814.987f, -1083.856f, 11.012f } }, + }, + { // Discount + { "Strawberry", { 89.663f, -1390.938f, 29.249f } }, + { "Grapeseed", { 1678.675f, 4821.034f, 42.007f } }, + { "Great Chaparral", { -1091.677f, 2700.770f, 19.625f } }, + { "Senora Desert", { 1200.602f, 2696.959f, 37.927f } }, + { "Paleto Bay", { -5.078f, 6521.567f, 31.270f } }, + }, + { // LSC + { "Burton", { -365.425f, -131.809f, 37.873f } }, + { "LS Airport", { -1134.224f, -1984.387f, 13.166f } }, + { "La Mesa", { 709.797f, -1082.649f, 22.398f } }, + { "Senora Desert", { 1178.653f, 2666.179f, 37.881f } }, + }, + { // Ponsonbys + { "Rockford Hills", { -718.441f, -162.860f, 37.013f } }, + { "Burton", { -150.952f, -304.549f, 38.925f } }, + { "Morningwood", { -1461.290f, -226.524f, 49.249f } }, + }, + { // Suburban + { "Del Perro", { -1209.446f, -783.510f, 17.169f } }, + { "Harmony", { 617.782f, 2736.849f, 41.999f } }, + { "Harwick", { 130.452f, -202.726f, 54.505f } }, + { "Chumash", { -3165.330f, 1062.592f, 20.840f } }, + }, + { // Tattoo + { "Downtown", { 318.079f, 170.586f, 103.767f } }, + { "Sandy Shores", { 1853.978f, 3745.352f, 33.082f } }, + { "Paleto Bay", { -286.602f, 6202.248f, 31.322f } }, + { "Vespucci Canals", { -1159.103f, -1417.739f, 4.706f } }, + { "El Burro Heights", { 1319.359f, -1643.693f, 52.145f } }, + { "Chumash", { -3162.709f, 1071.733f, 20.681f } }, + }, + { // Other + { "Beekers Garage", { 126.219f, 6608.142f, 31.866f } }, + { "Vespucci Movie Masks", { -1339.926f, -1279.063f, 4.870f } }, + } + }; + + int count[] = { + 11, + 7, + 2, + 5, + 4, + 3, + 4, + 6, + 2, + }; +} + +void teleport_stores_selected_menu::load() { + set_name("Stores", false, false); + set_parent(); + + for (int i = 0; i < 9; i++) { + for (std::pair> location : locations[i]) { + add_string(location.first); + } + } +} + +void teleport_stores_selected_menu::update() {} + +void teleport_stores_selected_menu::update_once() { + set_name(teleport::stores::vars::categories[m_vars.m_selected].m_name.get(), false, false); + clear_options(0); + + for (int i = 0; i < count[m_vars.m_selected]; i++) { + std::pair> location = locations[m_vars.m_selected][i]; + + add_option(button_option(get_string(location.first)) + .add_click([=] { teleport::vars::teleport(location.second); })); + } +} + +void teleport_stores_selected_menu::feature_update() {} + +teleport_stores_selected_menu* g_instance; +teleport_stores_selected_menu* teleport_stores_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new teleport_stores_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/stores/teleport_stores_selected.h b/GTAV/src/menu/base/submenus/main/teleport/stores/teleport_stores_selected.h new file mode 100644 index 0000000..ef2ef7c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/stores/teleport_stores_selected.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class teleport_stores_selected_menu : public menu::submenu::submenu { +public: + static teleport_stores_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + teleport_stores_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace teleport::stores::selected::vars { + struct variables { + int m_selected; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_directional.cpp b/GTAV/src/menu/base/submenus/main/teleport/teleport_directional.cpp new file mode 100644 index 0000000..b6277fd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_directional.cpp @@ -0,0 +1,102 @@ +#include "teleport_directional.h" +#include "menu/base/submenu_handler.h" +#include "../teleport.h" + +using namespace teleport::directional::vars; + +namespace teleport::directional::vars { + variables m_vars; + + void teleport_direction(int direction) { + math::vector3 coords = { 0.f, 0.f, 0.f }; + + switch (direction) { + case 0: + coords.y = m_vars.m_directions[0] + 1.f; + break; + case 1: + coords.y = (m_vars.m_directions[1] * -1.f) + 1.f; + break; + case 2: + coords.z = m_vars.m_directions[2] + 1.f; + break; + case 3: + coords.z = (m_vars.m_directions[3] * -1.f) + 1.f; + break; + case 4: + coords.x = (m_vars.m_directions[4] * -1.f) + 1.f; + break; + case 5: + coords.x = m_vars.m_directions[5] + 1.f; + break; + } + + bool use_vehicle = teleport::vars::m_vars.m_include_current_vehicle; + Entity entity = use_vehicle && menu::player::get_local_player().m_in_vehicle ? menu::player::get_local_player().m_vehicle : menu::player::get_local_player().m_ped; + + math::vector3 velocity; + if (use_vehicle && menu::player::get_local_player().m_in_vehicle) { + velocity = native::get_entity_velocity(menu::player::get_local_player().m_vehicle); + } + + math::vector3 world = native::get_offset_from_entity_in_world_coords(entity, coords.x, coords.y, coords.z); + native::set_entity_coords_no_offset(entity, world.x, world.y, world.z, false, false, false); + + if (use_vehicle && menu::player::get_local_player().m_in_vehicle) { + native::set_entity_velocity(entity, velocity.x, velocity.y, velocity.z); + native::set_vehicle_engine_on(entity, true, true, true); + } + } +} + +void teleport_directional_menu::load() { + set_name("Directional"); + set_parent(); + + add_option(number_option(SCROLLSELECT, "Forwards") + .add_translate().add_hotkey() + .add_number(m_vars.m_directions[0], "%.0f", 1.f).add_min(1.f).add_max(100.f) + .add_click([] { teleport_direction(0); })); + + add_option(number_option(SCROLLSELECT, "Backwards") + .add_translate().add_hotkey() + .add_number(m_vars.m_directions[1], "%.0f", 1.f).add_min(1.f).add_max(100.f) + .add_click([] { teleport_direction(1); })); + + add_option(number_option(SCROLLSELECT, "Above") + .add_translate().add_hotkey() + .add_number(m_vars.m_directions[2], "%.0f", 1.f).add_min(1.f).add_max(100.f) + .add_click([] { teleport_direction(2); })); + + add_option(number_option(SCROLLSELECT, "Below") + .add_translate().add_hotkey() + .add_number(m_vars.m_directions[3], "%.0f", 1.f).add_min(1.f).add_max(100.f) + .add_click([] { teleport_direction(3); })); + + add_option(number_option(SCROLLSELECT, "Left") + .add_translate().add_hotkey() + .add_number(m_vars.m_directions[4], "%.0f", 1.f).add_min(1.f).add_max(100.f) + .add_click([] { teleport_direction(4); })); + + add_option(number_option(SCROLLSELECT, "Right") + .add_translate().add_hotkey() + .add_number(m_vars.m_directions[5], "%.0f", 1.f).add_min(1.f).add_max(100.f) + .add_click([] { teleport_direction(5); })); +} + +void teleport_directional_menu::update() {} + +void teleport_directional_menu::update_once() {} + +void teleport_directional_menu::feature_update() {} + +teleport_directional_menu* g_instance; +teleport_directional_menu* teleport_directional_menu::get() { + if (g_instance == nullptr) { + g_instance = new teleport_directional_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_directional.h b/GTAV/src/menu/base/submenus/main/teleport/teleport_directional.h new file mode 100644 index 0000000..f4598bb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_directional.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class teleport_directional_menu : public menu::submenu::submenu { +public: + static teleport_directional_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + teleport_directional_menu() + : menu::submenu::submenu() {} +}; + +namespace teleport::directional::vars { + struct variables { + float m_directions[6] = { 5.f, 5.f, 5.f, 5.f, 5.f, 5.f }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_ipl.cpp b/GTAV/src/menu/base/submenus/main/teleport/teleport_ipl.cpp new file mode 100644 index 0000000..6d15406 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_ipl.cpp @@ -0,0 +1,193 @@ +#include "teleport_ipl.h" +#include "menu/base/submenu_handler.h" +#include "../teleport.h" + +using namespace teleport::ipl::vars; + +namespace teleport::ipl::vars { + variables m_vars; + + void request(const char** ipls, int count) { + for (int i = 0; i < count; i++) { + if (!native::is_ipl_active(ipls[i])) { + native::request_ipl(ipls[i]); + } + } + } + + void remove(const char** ipls, int count) { + for (int i = 0; i < count; i++) { + if (native::is_ipl_active(ipls[i])) { + native::remove_ipl(ipls[i]); + } + } + } +} + +void teleport_ipl_menu::load() { + set_name("IPL"); + set_parent(); + + add_option(button_option("North Yankton") + .add_translate().add_hotkey() + .add_click([] { + const char* maps[] = { "plg_01", "prologue01", "prologue01_lod", "prologue01c", "prologue01c_lod", "prologue01d", "prologue01d_lod", "prologue01e", "prologue01e_lod", "prologue01f", "prologue01f_lod", "prologue01g", "prologue01h", "prologue01h_lod", "prologue01i", "prologue01i_lod", "prologue01j", "prologue01j_lod", "prologue01k", "prologue01k_lod", "prologue01z", "prologue01z_lod", "plg_02", "prologue02", "prologue02_lod", "plg_03", "prologue03", "prologue03_lod", "prologue03b", "prologue03b_lod", "prologue03_grv_dug", "prologue03_grv_dug_lod", "prologue_grv_torch", "plg_04", "prologue04", "prologue04_lod", "prologue04b", "prologue04b_lod", "prologue04_cover", "des_protree_end", "des_protree_start", "des_protree_start_lod", "plg_05", "prologue05", "prologue05_lod", "prologue05b", "prologue05b_lod", "plg_06", "prologue06", "prologue06_lod", "prologue06b", "prologue06b_lod", "prologue06_int", "prologue06_int_lod", "prologue06_pannel", "prologue06_pannel_lod", "prologue_m2_door", "prologue_m2_door_lod", "plg_occl_00", "prologue_occl", "plg_rd", "prologuerd", "prologuerdb", "prologuerd_lod" }; + request(maps, 64); + teleport::vars::teleport({ 3360.19f, -4849.67f, 111.8f }); + })); + + add_option(button_option("Carrier") + .add_translate().add_hotkey() + .add_click([] { + const char* maps[] = { "hei_carrier", "hei_carrier_DistantLights", "hei_Carrier_int1", "hei_Carrier_int2", "hei_Carrier_int3", "hei_Carrier_int4", "hei_Carrier_int5", "hei_Carrier_int6", "hei_carrier_LODLights" }; + request(maps, 9); + teleport::vars::teleport({ 3016.46f, -4534.09f, 14.84f }); + })); + + add_option(button_option("Dignity Heist Yacht") + .add_translate().add_hotkey() + .add_click([] { + native::remove_ipl("smboat"); + const char* maps[] = { "hei_yacht_heist", "hei_yacht_heist_Bar", "hei_yacht_heist_Bedrm", "hei_yacht_heist_Bridge", "hei_yacht_heist_DistantLights", "hei_yacht_heist_enginrm", "hei_yacht_heist_LODLights", "hei_yacht_heist_Lounge" }; + request(maps, 8); + teleport::vars::teleport({ -2045.8f, -1031.2f, 11.9f }); + })); + + add_option(button_option("Dignity Party Yacht") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("smboat"); + const char* maps[] = { "hei_yacht_heist", "hei_yacht_heist_Bar", "hei_yacht_heist_Bedrm", "hei_yacht_heist_Bridge", "hei_yacht_heist_DistantLights", "hei_yacht_heist_enginrm", "hei_yacht_heist_LODLights", "hei_yacht_heist_Lounge" }; + remove(maps, 8); + teleport::vars::teleport({ -2045.8f, -1031.2f, 11.9f }); + })); + + add_option(button_option("Desert UFO") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("ufo"); + teleport::vars::teleport({ 2490.47729f, 3774.84351f, 2414.035f }); + })); + + add_option(button_option("Fort Zancudo UFO") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("ufo"); + teleport::vars::teleport({ -2051.99463f, 3237.05835f, 1456.97021f }); + })); + + add_option(button_option("Cluckin Bell") + .add_translate().add_hotkey() + .add_click([] { + native::remove_ipl("CS1_02_cf_offmission"); + const char* maps[] = { "CS1_02_cf_onmission1", "CS1_02_cf_onmission2", "CS1_02_cf_onmission3", "CS1_02_cf_onmission4" }; + request(maps, 4); + teleport::vars::teleport({ -72.68752f, 6253.72656f, 31.08991f }); + })); + + add_option(button_option("Jewelery Store") + .add_translate().add_hotkey() + .add_click([] { + native::remove_ipl("jewel2fake"); + native::remove_ipl("bh1_16_refurb"); + native::request_ipl("post_hiest_unload"); + teleport::vars::teleport({ -630.4f, -236.7f, 40.0f }); + })); + + add_option(button_option("Morgue") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("Coroner_Int_on"); + teleport::vars::teleport({ 244.9f, -1374.7f, 39.5f }); + })); + + add_option(button_option("FIB Lobby") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("FIBlobby"); + teleport::vars::teleport({ 110.4f, -744.2f, 45.7f }); + })); + + add_option(button_option("LifeInvader Lobby") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("facelobby"); + teleport::vars::teleport({ -1047.9f, -233.0f, 39.0f }); + })); + + add_option(button_option("Destroyed Hospital") + .add_translate().add_hotkey() + .add_click([] { + native::remove_ipl("RC12B_Default"); + native::remove_ipl("RC12B_Fixed"); + native::request_ipl("RC12B_Destroyed"); + native::request_ipl("RC12B_HospitalInterior"); + teleport::vars::teleport({ 356.8f, -590.1f, 43.3f }); + })); + + add_option(button_option("Cargo Ship") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("cargoship"); + teleport::vars::teleport({ -90.0f, -2365.8f, 14.3f }); + })); + + add_option(button_option("Train Crash") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("canyonriver01_traincrash"); + native::request_ipl("railing_end"); + native::remove_ipl("railing_start"); + native::remove_ipl("canyonriver01"); + teleport::vars::teleport({ -532.1309f, 4526.187f, 88.7955f }); + })); + + add_option(button_option("Broken Stilt House") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("DES_StiltHouse_imapend"); + native::remove_ipl("DES_StiltHouse_imapstart"); + native::remove_ipl("des_stilthouse_rebuild"); + teleport::vars::teleport({ -1020.5f, 663.41f, 154.75f }); + })); + + add_option(button_option("Plane Crash") + .add_translate().add_hotkey() + .add_click([] { + native::request_ipl("Plane_crash_trench"); + teleport::vars::teleport({ 2814.7f, 4758.5f, 50.0f }); + })); + + add_option(button_option("Gunrunning Heist Yacht") + .add_translate().add_hotkey() + .add_click([] { + const char* maps[] = { + "gr_heist_yacht2", + "gr_heist_yacht2_bar", + "gr_heist_yacht2_bedrm", + "gr_heist_yacht2_bridge", + "gr_heist_yacht2_enginrm", + "gr_heist_yacht2_lounge" + }; + + request(maps, NUMOF(maps)); + teleport::vars::teleport({ 1373.828f, 6737.393f, 6.707596f }); + })); +} + +void teleport_ipl_menu::update() {} + +void teleport_ipl_menu::update_once() {} + +void teleport_ipl_menu::feature_update() {} + +teleport_ipl_menu* g_instance; +teleport_ipl_menu* teleport_ipl_menu::get() { + if (g_instance == nullptr) { + g_instance = new teleport_ipl_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_ipl.h b/GTAV/src/menu/base/submenus/main/teleport/teleport_ipl.h new file mode 100644 index 0000000..e5f30ff --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_ipl.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class teleport_ipl_menu : public menu::submenu::submenu { +public: + static teleport_ipl_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + teleport_ipl_menu() + : menu::submenu::submenu() {} +}; + +namespace teleport::ipl::vars { + struct variables { + + }; + + extern variables m_vars; +} diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_save_load.cpp b/GTAV/src/menu/base/submenus/main/teleport/teleport_save_load.cpp new file mode 100644 index 0000000..4bb244c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_save_load.cpp @@ -0,0 +1,122 @@ +#include "teleport_save_load.h" +#include "menu/base/submenu_handler.h" +#include "../teleport.h" +#include "util/dirs.h" +#include "util/log.h" +#include +#include + +using namespace teleport::save::vars; + +namespace teleport::save::vars { + variables m_vars; + + void save(const char* text, math::vector3 coords) { + try { + std::ifstream input(util::dirs::get_path(teleport)); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + std::ofstream output(util::dirs::get_path(teleport)); + if (output.good()) { + json["locations"][text] = { coords.x, coords.y, coords.z }; + + output << json.dump(4); + output.close(); + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } + + void load_saves(teleport_save_load_menu* _this) { + try { + std::ifstream input(util::dirs::get_path(teleport)); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + nlohmann::json& data = json["locations"]; + if (!data.empty()) { + m_vars.m_locations.clear(); + + for (auto& it = data.begin(); it != data.end(); ++it) { + nlohmann::json& coords = *it; + m_vars.m_locations.push_back({ it.key(), { coords[0].get(), coords[1].get(), coords[2].get() } }); + } + } + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + + _this->clear_options(2); + + if (!m_vars.m_locations.empty()) { + for (std::pair>& location : m_vars.m_locations) { + _this->add_option(button_option(location.first) + .add_click([=] { teleport::vars::teleport(location.second); })); + } + } else { + _this->add_option(break_option(_this->get_string("~m~None"))); + } + } +} + +void teleport_save_load_menu::load() { + set_name("Save and Load"); + set_parent(); + + add_string("~m~None"); + + add_option(button_option("Save Current Position") + .add_translate().add_hotkey() + .add_keyboard("Enter save name", 30, [this](button_option* option, const char* text) { + save(text, menu::player::get_local_player().m_coords); + load_saves(this); + })); + + add_option(break_option("Locations") + .add_translate()); + + if (!std::filesystem::exists(util::dirs::get_path(teleport))) { + try { + std::ofstream output(util::dirs::get_path(teleport)); + if (output.good()) { + nlohmann::json json; + json["locations"]["Beach Cove"] = { 3073.21f, 2128.90f, 2.38f }; + json["locations"]["Karaoke Bar"] = { 374.39f, -1000.61f, -99.f }; + json["locations"]["Character Creation"] = { 409.43f, -998.23f, -99.f }; + json["locations"]["Garage"] = { 398.87f, -970.25f, -99.f }; + + output << json.dump(4); + output.close(); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } +} + +void teleport_save_load_menu::update() {} + +void teleport_save_load_menu::update_once() { + load_saves(this); +} + +void teleport_save_load_menu::feature_update() {} + +teleport_save_load_menu* g_instance; +teleport_save_load_menu* teleport_save_load_menu::get() { + if (g_instance == nullptr) { + g_instance = new teleport_save_load_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_save_load.h b/GTAV/src/menu/base/submenus/main/teleport/teleport_save_load.h new file mode 100644 index 0000000..3cab127 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_save_load.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class teleport_save_load_menu : public menu::submenu::submenu { +public: + static teleport_save_load_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + teleport_save_load_menu() + : menu::submenu::submenu() {} +}; + +namespace teleport::save::vars { + struct variables { + std::vector>> m_locations; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_selected.cpp b/GTAV/src/menu/base/submenus/main/teleport/teleport_selected.cpp new file mode 100644 index 0000000..496b393 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_selected.cpp @@ -0,0 +1,38 @@ +#include "teleport_selected.h" +#include "menu/base/submenu_handler.h" +#include "../teleport.h" + +using namespace teleport::selected::vars; + +namespace teleport::selected::vars { + variables m_vars; +} + +void teleport_selected_menu::load() { + set_name("Placeholder", false, false); + set_parent(); +} + +void teleport_selected_menu::update() {} + +void teleport_selected_menu::update_once() { + clear_options(0); + + for (int i = 0; i < m_vars.m_size; i++) { + add_option(button_option(m_vars.m_selected[i].m_name.get()) + .add_click([=] { teleport::vars::teleport(m_vars.m_selected[i].m_result); })); + } +} + +void teleport_selected_menu::feature_update() {} + +teleport_selected_menu* g_instance; +teleport_selected_menu* teleport_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new teleport_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_selected.h b/GTAV/src/menu/base/submenus/main/teleport/teleport_selected.h new file mode 100644 index 0000000..b4686e1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_selected.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class teleport_selected_menu : public menu::submenu::submenu { +public: + static teleport_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + teleport_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace teleport::selected::vars { + struct variables { + scroll_struct>* m_selected; + int m_size; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_settings.cpp b/GTAV/src/menu/base/submenus/main/teleport/teleport_settings.cpp new file mode 100644 index 0000000..490de77 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_settings.cpp @@ -0,0 +1,44 @@ +#include "teleport_settings.h" +#include "menu/base/submenu_handler.h" +#include "../teleport.h" + +using namespace teleport::settings::vars; + +namespace teleport::settings::vars { + variables m_vars; +} + +void teleport_settings_menu::load() { + set_name("Settings"); + set_parent(); + + add_option(toggle_option("Transition") + .add_translate().add_hotkey() + .add_toggle(teleport::vars::m_vars.m_transition).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Auto Teleport to Waypoint") + .add_translate().add_hotkey() + .add_toggle(teleport::vars::m_vars.m_auto_waypoint).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Include Current Vehicle") + .add_translate().add_hotkey() + .add_toggle(teleport::vars::m_vars.m_include_current_vehicle).add_savable(get_submenu_name_stack()) + .add_tooltip("Teleport your vehicle too")); +} + +void teleport_settings_menu::update() {} + +void teleport_settings_menu::update_once() {} + +void teleport_settings_menu::feature_update() {} + +teleport_settings_menu* g_instance; +teleport_settings_menu* teleport_settings_menu::get() { + if (g_instance == nullptr) { + g_instance = new teleport_settings_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_settings.h b/GTAV/src/menu/base/submenus/main/teleport/teleport_settings.h new file mode 100644 index 0000000..043ce7f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_settings.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class teleport_settings_menu : public menu::submenu::submenu { +public: + static teleport_settings_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + teleport_settings_menu() + : menu::submenu::submenu() {} +}; + +namespace teleport::settings::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_stores.cpp b/GTAV/src/menu/base/submenus/main/teleport/teleport_stores.cpp new file mode 100644 index 0000000..233f3c0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_stores.cpp @@ -0,0 +1,56 @@ +#include "teleport_stores.h" +#include "menu/base/submenu_handler.h" +#include "../teleport.h" +#include "stores/teleport_stores_selected.h" + +using namespace teleport::stores::vars; + +namespace teleport::stores::vars { + variables m_vars; + + scroll_struct categories[] = { + { localization("Ammunation", true), 0 }, + { localization("Barber Shop", true), 1 }, + { localization("Binco", true), 2 }, + { localization("Discount", true), 3 }, + { localization("Los Santos Customs", true), 4 }, + { localization("Ponsonbys", true), 5 }, + { localization("Suburban", true), 6 }, + { localization("Tattoo", true), 7 }, + { localization("Other", true), 8 } + }; +} + +void teleport_stores_menu::load() { + set_name("Stores"); + set_parent(); + + teleport_stores_selected_menu::get(); +} + +void teleport_stores_menu::update() {} + +void teleport_stores_menu::update_once() { + clear_options(0); + + for (scroll_struct& category : categories) { + add_option(submenu_option(category.m_name.get()) + .add_submenu() + .add_click([=] { + teleport::stores::selected::vars::m_vars.m_selected = category.m_result; + })); + } +} + +void teleport_stores_menu::feature_update() {} + +teleport_stores_menu* g_instance; +teleport_stores_menu* teleport_stores_menu::get() { + if (g_instance == nullptr) { + g_instance = new teleport_stores_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/teleport/teleport_stores.h b/GTAV/src/menu/base/submenus/main/teleport/teleport_stores.h new file mode 100644 index 0000000..0dd0e45 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/teleport/teleport_stores.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class teleport_stores_menu : public menu::submenu::submenu { +public: + static teleport_stores_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + teleport_stores_menu() + : menu::submenu::submenu() {} +}; + +namespace teleport::stores::vars { + struct variables { + + }; + + extern scroll_struct categories[9]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle.cpp b/GTAV/src/menu/base/submenus/main/vehicle.cpp new file mode 100644 index 0000000..728aa87 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle.cpp @@ -0,0 +1,431 @@ +#include "vehicle.h" +#include "menu/base/submenu_handler.h" +#include "../main.h" +#include "global/lists.h" +#include "menu/base/util/control.h" +#include "vehicle/vehicle_health.h" +#include "vehicle/vehicle_weapons.h" +#include "vehicle/vehicle_particles.h" +#include "vehicle/vehicle_movement.h" +#include "vehicle/vehicle_boost.h" +#include "vehicle/vehicle_collision.h" +#include "vehicle/vehicle_gravity.h" +#include "vehicle/vehicle_multipliers.h" +#include "vehicle/vehicle_modifiers.h" +#include "vehicle/vehicle_autopilot.h" +#include "vehicle/vehicle_ramps.h" +#include "vehicle/vehicle_tyre_tracks.h" +#include "vehicle/vehicle_doors.h" +#include "vehicle/vehicle_speedometer.h" +#include "vehicle/vehicle_seats.h" +#include "vehicle/vehicle_randomization.h" +#include "vehicle/vehicle_customs.h" +#include "menu/base/util/control.h" + +using namespace vehicle::vars; + +namespace vehicle::vars { + variables m_vars; + + scroll_struct upgrades[] = { + { localization("Performance", true), 0 }, + { localization("Everything", true), 0 }, + }; + + Vehicle clone_vehicle(Vehicle veh) { + Vehicle spawned_vehicle = 0; + + if (native::does_entity_exist(veh)) { + uint32_t model = native::get_entity_model(veh); + menu::control::simple_request_model(model); + + math::vector3 coords = native::get_entity_coords(veh, true); + math::vector3 spawn_coords = coords + (native::get_entity_forward_vector(veh) * 5.f); + + spawned_vehicle = native::create_vehicle(model, spawn_coords.x, spawn_coords.y, spawn_coords.z, native::get_entity_heading(veh), true, true, 0); + if (native::does_entity_exist(spawned_vehicle)) { + native::set_vehicle_dirt_level(spawned_vehicle, native::get_vehicle_dirt_level(veh)); + native::set_vehicle_tyres_can_burst(spawned_vehicle, native::get_vehicle_tyres_can_burst(veh)); + native::set_vehicle_mod_kit(spawned_vehicle, 0); + + for (int i = MOD_SPOILER; i <= MOD_ARMOR; i++) { + if (native::get_num_vehicle_mods(veh, i) > 0) { + native::set_vehicle_mod(spawned_vehicle, i, native::get_vehicle_mod(veh, i), 0); + } + } + + for (int i = MOD_PLATEHOLDER; i <= MOD_LIVERY; i++) { + if (native::get_num_vehicle_mods(veh, i) > 0) { + native::set_vehicle_mod(spawned_vehicle, i, native::get_vehicle_mod(veh, i), 0); + } + } + + native::set_vehicle_wheel_type(spawned_vehicle, native::get_vehicle_wheel_type(veh)); + native::set_vehicle_mod(spawned_vehicle, MOD_FRONTWHEELS, native::get_vehicle_mod(veh, MOD_FRONTWHEELS), native::get_vehicle_mod_variation(veh, MOD_FRONTWHEELS)); + native::set_vehicle_mod(spawned_vehicle, MOD_BACKWHEELS, native::get_vehicle_mod(veh, MOD_BACKWHEELS), native::get_vehicle_mod_variation(veh, MOD_FRONTWHEELS)); + + for (int i = MOD_UNK17; i <= MOD_XENONLIGHTS; i++) { + native::toggle_vehicle_mod(spawned_vehicle, native::get_vehicle_mod_variation(veh, i), true); + } + + int colors[2]; + int extra_colors[2]; + color_rgba tyre_smoke; + color_rgba custom_primary; + color_rgba custom_secondary; + color_rgba neon; + + native::get_vehicle_custom_primary_colour(veh, &custom_primary.r, &custom_primary.g, &custom_primary.b); + native::get_vehicle_custom_secondary_colour(veh, &custom_secondary.r, &custom_secondary.g, &custom_secondary.b); + native::get_vehicle_neon_lights_colour(veh, &neon.r, &neon.g, &neon.b); + native::get_vehicle_tyre_smoke_color(veh, &tyre_smoke.r, &tyre_smoke.g, &tyre_smoke.b); + native::get_vehicle_colours(veh, &colors[0], &colors[1]); + native::get_vehicle_extra_colours(veh, &extra_colors[0], &extra_colors[1]); + + native::set_vehicle_colours(spawned_vehicle, colors[0], colors[1]); + native::set_vehicle_extra_colours(spawned_vehicle, extra_colors[0], extra_colors[1]); + native::set_vehicle_window_tint(spawned_vehicle, native::get_vehicle_window_tint(veh)); + + native::set_vehicle_tyre_smoke_color(spawned_vehicle, tyre_smoke.r, tyre_smoke.g, tyre_smoke.b); + native::set_vehicle_custom_primary_colour(spawned_vehicle, custom_primary.r, custom_primary.g, custom_primary.b); + native::set_vehicle_custom_secondary_colour(spawned_vehicle, custom_secondary.r, custom_secondary.g, custom_secondary.b); + + for (int i = 0; i < 4; i++) { + native::set_vehicle_neon_light_enabled(spawned_vehicle, i, native::is_vehicle_neon_light_enabled(veh, i)); + } + + native::set_vehicle_neon_lights_colour(spawned_vehicle, neon.r, neon.g, neon.b); + native::set_vehicle_number_plate_text_index(spawned_vehicle, native::get_vehicle_number_plate_text_index(veh)); + native::set_vehicle_number_plate_text(spawned_vehicle, native::get_vehicle_number_plate_text(veh)); + } + } + + return spawned_vehicle; + } + + void run_task(Vehicle veh, std::function callback) { + if (veh) { + if (menu::player::get_local_player().m_in_vehicle) { + if (menu::player::get_local_player().m_vehicle == veh) { + if (native::get_ped_in_vehicle_seat(veh, -1, 0) == menu::player::get_local_player().m_ped && !native::network_is_in_session()) { + callback(veh); + return; + } else { + if (native::network_has_control_of_entity(veh)) { + callback(veh); + return; + } + + menu::control::request_control(veh, [=](Entity v) { + callback(v); + }); + + return; + } + } + } + + Ped driver = native::get_ped_in_vehicle_seat(veh, -1, 0); + if (native::does_entity_exist(driver)) { + if (native::is_ped_a_player(driver)) { + if (native::network_has_control_of_entity(veh)) { + callback(veh); + return; + } + + menu::control::request_control(veh, [=] (Entity v) { + callback(v); + }); + + return; + } + } + + callback(veh); + } + } + + void max_upgrades(Vehicle vehicle, int type) { + run_task(vehicle, [=](Vehicle veh) { + if (type == 1) { + native::set_vehicle_fixed(veh); + native::set_vehicle_dirt_level(veh, 0); + native::set_vehicle_tyres_can_burst(veh, false); + native::set_vehicle_mod_kit(veh, 0); + + for (int i = MOD_SPOILER; i <= MOD_ARMOR; i++) { + if (native::get_num_vehicle_mods(veh, i) > 0) { + native::set_vehicle_mod(veh, i, native::get_num_vehicle_mods(veh, i) - 1, 0); + } + } + + for (int i = MOD_PLATEHOLDER; i <= MOD_LIVERY; i++) { + if (native::get_num_vehicle_mods(veh, i) > 0) { + native::set_vehicle_mod(veh, i, native::get_num_vehicle_mods(veh, i) - 1, 0); + } + } + + native::set_vehicle_mod(veh, MOD_HORNS, 30, 0); + + if (native::get_entity_model(veh) != joaat("vigilante")) { + native::set_vehicle_wheel_type(veh, 7); + native::set_vehicle_mod(veh, MOD_FRONTWHEELS, 39, 1); + native::set_vehicle_mod(veh, MOD_BACKWHEELS, 39, 1); + } + + for (int i = MOD_UNK17; i <= MOD_XENONLIGHTS; i++) { + native::toggle_vehicle_mod(veh, i, true); + } + + native::set_vehicle_colours(veh, 160, 160); + native::set_vehicle_extra_colours(veh, 160, 160); + native::set_vehicle_window_tint(veh, 5); + + color_rgba temp; + temp.r = native::get_random_int_in_range(0, 255); + temp.g = native::get_random_int_in_range(0, 255); + temp.b = native::get_random_int_in_range(0, 255); + + native::set_vehicle_tyre_smoke_color(veh, temp.r, temp.g, temp.b); + native::set_vehicle_custom_primary_colour(veh, temp.r, temp.g, temp.b); + native::set_vehicle_custom_secondary_colour(veh, temp.r, temp.g, temp.b); + + native::set_vehicle_neon_light_enabled(veh, 0, true); + native::set_vehicle_neon_light_enabled(veh, 1, true); + native::set_vehicle_neon_light_enabled(veh, 2, true); + native::set_vehicle_neon_light_enabled(veh, 3, true); + native::set_vehicle_neon_lights_colour(veh, temp.r, temp.g, temp.b); + + native::set_vehicle_number_plate_text_index(veh, 5); + } else { + // Perf: brakes, engine, armor, trans, suspension, turbo + native::set_vehicle_mod_kit(veh, 0); + native::set_vehicle_mod(veh, MOD_BRAKES, native::get_num_vehicle_mods(veh, MOD_BRAKES) - 1, 0); + native::set_vehicle_mod(veh, MOD_ENGINE, native::get_num_vehicle_mods(veh, MOD_ENGINE) - 1, 0); + native::set_vehicle_mod(veh, MOD_ARMOR, native::get_num_vehicle_mods(veh, MOD_ARMOR) - 1, 0); + native::set_vehicle_mod(veh, MOD_TRANSMISSION, native::get_num_vehicle_mods(veh, MOD_TRANSMISSION) - 1, 0); + native::set_vehicle_mod(veh, MOD_SUSPENSION, native::get_num_vehicle_mods(veh, MOD_SUSPENSION) - 1, 0); + native::toggle_vehicle_mod(veh, MOD_TURBO, true); + } + }); + } + + void low_upgrades(Vehicle vehicle, int type) { + run_task(vehicle, [=](Vehicle veh) { + if (type == 1) { + native::set_vehicle_fixed(veh); + native::set_vehicle_dirt_level(veh, 0); + native::set_vehicle_tyres_can_burst(veh, true); + native::set_vehicle_mod_kit(veh, 0); + + for (int i = MOD_SPOILER; i <= MOD_ARMOR; i++) { + native::remove_vehicle_mod(veh, i); + } + + for (int i = MOD_PLATEHOLDER; i <= MOD_LIVERY; i++) { + native::remove_vehicle_mod(veh, i); + } + + native::remove_vehicle_mod(veh, MOD_HORNS); + native::remove_vehicle_mod(veh, MOD_FRONTWHEELS); + + for (int i = MOD_UNK17; i <= MOD_XENONLIGHTS; i++) { + native::toggle_vehicle_mod(veh, i, false); + } + + native::clear_vehicle_custom_primary_colour(veh); + native::clear_vehicle_custom_secondary_colour(veh); + native::set_vehicle_colours(veh, 135, 135); + native::set_vehicle_extra_colours(veh, 135, 135); + native::set_vehicle_window_tint(veh, 0); + native::set_vehicle_number_plate_text_index(veh, 1); + + native::set_vehicle_neon_light_enabled(veh, 0, false); + native::set_vehicle_neon_light_enabled(veh, 1, false); + native::set_vehicle_neon_light_enabled(veh, 2, false); + native::set_vehicle_neon_light_enabled(veh, 3, false); + } else { + native::set_vehicle_mod_kit(veh, 0); + native::remove_vehicle_mod(veh, MOD_BRAKES); + native::remove_vehicle_mod(veh, MOD_ENGINE); + native::remove_vehicle_mod(veh, MOD_ARMOR); + native::remove_vehicle_mod(veh, MOD_TRANSMISSION); + native::remove_vehicle_mod(veh, MOD_SUSPENSION); + native::toggle_vehicle_mod(veh, MOD_TURBO, false); + } + }); + } +} + +void vehicle_menu::load() { + set_name("Vehicle"); + set_parent(); + + add_option(toggle_option("Godmode") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_godmode).add_savable(get_submenu_name_stack()) + .add_click([] { if (!m_vars.m_godmode) run_task(menu::player::get_local_player().m_vehicle, [] (Vehicle veh) { native::set_entity_invincible(veh, false); }); })); + + add_option(toggle_option("Invisibility") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_invisibility).add_savable(get_submenu_name_stack()) + .add_click([] { if (!m_vars.m_invisibility) run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { native::set_entity_visible(veh, true, true); }); })); + + add_option(toggle_option("Seatbelt") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_seatbelt).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_seatbelt) { + native::set_ped_can_be_knocked_off_vehicle(menu::player::get_local_player().m_ped, 0); + native::set_ped_config_flag(menu::player::get_local_player().m_ped, 32, true); + } + })); + + add_option(scroll_option(SCROLLSELECT, "Upgrades") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_upgrades_var, 0, NUMOF(upgrades), upgrades) + .add_click([] { max_upgrades(menu::player::get_local_player().m_vehicle, m_vars.m_upgrades_var); })); + + add_option(scroll_option(SCROLLSELECT, "Downgrades") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_downgrades_var, 0, NUMOF(upgrades), upgrades) + .add_click([] { low_upgrades(menu::player::get_local_player().m_vehicle, m_vars.m_downgrades_var); })); + + add_option(submenu_option("Customs") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { vehicle_customs_menu::get()->update_once(); }) + .add_requirement([] { return vehicle::customs::vars::get_size() > 0; })); + + add_option(submenu_option("Health") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Weapons") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Particle FX") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Movement") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Boost") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Collision") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Gravity") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Multipliers") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Modifiers") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Autopilot") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Ramps") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Randomization") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Seats") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Speedometer") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Doors") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Tire Tracks") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(button_option("Clone") + .add_translate().add_hotkey() + .add_click([] { if (menu::player::get_local_player().m_in_vehicle) clone_vehicle(menu::player::get_local_player().m_vehicle); })); + + add_option(toggle_option("Burn Shell") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_burn_shell).add_savable(get_submenu_name_stack()) + .add_click([] { if (!m_vars.m_burn_shell) run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { native::set_entity_render_scorched(veh, false); }); })); + + add_option(scroll_option(SCROLL, "Opacity") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_opacity, 0, NUMOF(global::lists::g_opacity), global::lists::g_opacity) + .add_click([] { run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { native::set_entity_alpha(veh, global::lists::g_opacity[m_vars.m_opacity].m_result, false); }); })); + + add_option(button_option("Delete") + .add_translate().add_hotkey() + .add_click([] { + if (menu::player::get_local_player().m_in_vehicle) { + run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { + native::set_entity_as_mission_entity(veh, true, true); + native::delete_entity(&veh); + }); + } + })); +} + +void vehicle_menu::update() { + std::vector> options = menu::submenu::handler::get_current()->get_options(); + int count = (int)std::count_if(begin(options), end(options), [](std::shared_ptr option) { return option->is_visible(); }); + + if (menu::base::get_current_option() > count) { + menu::base::set_current_option(count - 1); + } +} + +void vehicle_menu::update_once() {} + +void vehicle_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_godmode) { + native::set_entity_invincible(menu::player::get_local_player().m_vehicle, true); + } + + if (m_vars.m_invisibility) { + native::set_entity_visible(menu::player::get_local_player().m_vehicle, false, true); + } + + if (m_vars.m_seatbelt) { + native::set_ped_can_be_knocked_off_vehicle(menu::player::get_local_player().m_ped, 1); + native::set_ped_config_flag(menu::player::get_local_player().m_ped, 32, false); + } + + if (m_vars.m_burn_shell) { + native::set_entity_render_scorched(menu::player::get_local_player().m_vehicle, true); + } + } +} + +vehicle_menu* g_instance; +vehicle_menu* vehicle_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle.h b/GTAV/src/menu/base/submenus/main/vehicle.h new file mode 100644 index 0000000..5a4299d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle.h @@ -0,0 +1,36 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_menu : public menu::submenu::submenu { +public: + static vehicle_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::vars { + struct variables { + bool m_godmode; + bool m_invisibility; + bool m_seatbelt; + bool m_burn_shell; + + int m_upgrades_var; + int m_downgrades_var; + int m_opacity = 5; + }; + + Vehicle clone_vehicle(Vehicle veh); + void run_task(Vehicle veh, std::function callback); + void max_upgrades(Vehicle veh, int type = 1); + void low_upgrades(Vehicle vehicle, int type); + + extern scroll_struct upgrades[2]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/neon/vehicle_customs_neon_color.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/neon/vehicle_customs_neon_color.cpp new file mode 100644 index 0000000..c4f6bc3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/neon/vehicle_customs_neon_color.cpp @@ -0,0 +1,167 @@ +#include "vehicle_customs_neon_color.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs_neon.h" +#include "../../../vehicle_customs.h" + +using namespace vehicle::customs::neon::color::vars; + +namespace vehicle::customs::neon::color::vars { + variables m_vars; + + std::vector> color_map = { + { { 222, 222, 255 }, 0 }, + { { 2, 21, 255 }, 1 }, + { { 3, 83, 255 }, 2 }, + { { 0, 255, 140 }, 3 }, + { { 94, 255, 1 }, 4 }, + { { 255, 255, 0 }, 5 }, + { { 255, 150, 0 }, 6 }, + { { 255, 62, 0 }, 7 }, + { { 255, 1, 1 }, 8 }, + { { 255, 50, 100 }, 9 }, + { { 255, 5, 190 }, 10 }, + { { 35, 1, 255 }, 11 }, + { { 15, 3, 255 }, 12 } + }; + + void update_color_preview(color_rgba col) { + for (int i = 0; i < 4; i++) { + if (native::is_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, i)) { + native::set_vehicle_neon_lights_colour(menu::player::get_local_player().m_vehicle, col.r, col.g, col.b); + } + } + } + + void update_color(color_rgba col) { + vehicle::customs::vars::m_vars.m_cached_stats.m_neon_color = col; + } +} + +void vehicle_customs_neon_color_menu::load() { + set_name("Neon Color"); + set_parent(); + + add_string("White"); + add_string("Blue"); + add_string("Electric Blue"); + add_string("Mint Green"); + add_string("Lime Green"); + add_string("Yellow"); + add_string("Golden Shower"); + add_string("Orange"); + add_string("Red"); + add_string("Pony Pink"); + add_string("Hot Pink"); + add_string("Purple"); + add_string("Blacklight"); +} + +void vehicle_customs_neon_color_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); + if (menu::base::get_scroll_offset() < menu::submenu::handler::get_total_options() - menu::base::get_max_options() && menu::base::get_current_option() - menu::base::get_scroll_offset() >= menu::base::get_max_options()) menu::base::set_scroll_offset(menu::base::get_scroll_offset() + 1); +} + +void vehicle_customs_neon_color_menu::update_once() { + clear_options(0); + m_vars.m_context.reset(); + m_vars.m_context.m_selected = 0; + + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("White")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 222, 222, 255 }); }) + .add_hover([] { update_color_preview({ 222, 222, 255 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Blue")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 2, 21, 255 }); }) + .add_hover([] { update_color_preview({ 2, 21, 255 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Electric Blue")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 3, 83, 255 }); }) + .add_hover([] { update_color_preview({ 3, 83, 255 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Mint Green")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 0, 255, 140 }); }) + .add_hover([] { update_color_preview({ 0, 255, 140 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Lime Green")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 94, 255, 1 }); }) + .add_hover([] { update_color_preview({ 94, 255, 1 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Yellow")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 255, 255, 0 }); }) + .add_hover([] { update_color_preview({ 255, 255, 0 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Golden Shower")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 255, 150, 0 }); }) + .add_hover([] { update_color_preview({ 255, 150, 0 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Orange")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 255, 62, 0 }); }) + .add_hover([] { update_color_preview({ 255, 62, 0 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Red")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 255, 1, 1 }); }) + .add_hover([] { update_color_preview({ 255, 1, 1 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Pony Pink")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 255, 50, 100 }); }) + .add_hover([] { update_color_preview({ 255, 50, 100 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Hot Pink")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 255, 5, 190 }); }) + .add_hover([] { update_color_preview({ 255, 5, 190 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Purple")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 35, 1, 255 }); }) + .add_hover([] { update_color_preview({ 35, 1, 255 }); }))); + + temp_options.push_back(add_option(radio_option(get_string("Blacklight")) + .add_radio(m_vars.m_context) + .add_click([] { update_color({ 15, 3, 255 }); }) + .add_hover([] { update_color_preview({ 15, 3, 255 }); }))); + + for (std::pair& map : color_map) { + color_rgba color = vehicle::customs::vars::m_vars.m_cached_stats.m_neon_color; + if (color.r == map.first.r + && color.g == map.first.g + && color.b == map.first.b) { + if (map.second != 0) { + temp_options[map.second]->update_selected(); + menu::base::set_current_option(map.second); + } + + break; + } + } +} + +void vehicle_customs_neon_color_menu::feature_update() {} + +vehicle_customs_neon_color_menu* g_instance; +vehicle_customs_neon_color_menu* vehicle_customs_neon_color_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_neon_color_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/neon/vehicle_customs_neon_color.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/neon/vehicle_customs_neon_color.h new file mode 100644 index 0000000..ff23ddb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/neon/vehicle_customs_neon_color.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_neon_color_menu : public menu::submenu::submenu { +public: + static vehicle_customs_neon_color_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_neon_color_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::neon::color::vars { + struct variables { + radio_context m_context = { "commonmenu", "shop_garage_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/vehicle_customs_neon.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/vehicle_customs_neon.cpp new file mode 100644 index 0000000..e9a48fa --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/vehicle_customs_neon.cpp @@ -0,0 +1,56 @@ +#include "vehicle_customs_neon.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs_lights.h" +#include "../../vehicle_customs.h" +#include "../vehicle_customs_lsc.h" +#include "neon/vehicle_customs_neon_color.h" + +using namespace vehicle::customs::neon::vars; + +namespace vehicle::customs::neon::vars { + variables m_vars; +} + +void vehicle_customs_neon_menu::load() { + set_name("Neon Kits"); + set_parent(); + + add_option(submenu_option("Neon Layout") + .add_translate() + .add_submenu() + .add_click([] { vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_NEON; })); + + add_option(submenu_option("Neon Color") + .add_translate() + .add_submenu()); +} + +void vehicle_customs_neon_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_neon_menu::update_once() { + for (int i = 0; i < 4; i++) { + native::set_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, i, vehicle::customs::vars::m_vars.m_cached_stats.m_neon[i]); + } + + native::set_vehicle_neon_lights_colour(menu::player::get_local_player().m_vehicle, vehicle::customs::vars::m_vars.m_cached_stats.m_neon_color.r, vehicle::customs::vars::m_vars.m_cached_stats.m_neon_color.g, vehicle::customs::vars::m_vars.m_cached_stats.m_neon_color.b); +} + +void vehicle_customs_neon_menu::feature_update() {} + +vehicle_customs_neon_menu* g_instance; +vehicle_customs_neon_menu* vehicle_customs_neon_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_neon_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/vehicle_customs_neon.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/vehicle_customs_neon.h new file mode 100644 index 0000000..fa69603 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/lights/vehicle_customs_neon.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_neon_menu : public menu::submenu::submenu { +public: + static vehicle_customs_neon_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_neon_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::neon::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_edit.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_edit.cpp new file mode 100644 index 0000000..b08d693 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_edit.cpp @@ -0,0 +1,141 @@ +#include "vehicle_customs_respray_edit.h" +#include "menu/base/submenu_handler.h" +#include "vehicle_customs_respray_type.h" +#include "../../vehicle_customs.h" +#include "rage/engine.h" + +using namespace vehicle::customs::respray::edit::vars; + +namespace vehicle::customs::respray::edit::vars { + variables m_vars; +} + +void vehicle_customs_respray_edit_menu::load() { + set_name("Respray"); + set_parent(); +} + +void vehicle_customs_respray_edit_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); + if (menu::base::get_scroll_offset() < menu::submenu::handler::get_total_options() - menu::base::get_max_options() && menu::base::get_current_option() - menu::base::get_scroll_offset() >= menu::base::get_max_options()) menu::base::set_scroll_offset(menu::base::get_scroll_offset() + 1); +} + +void vehicle_customs_respray_edit_menu::update_once() { + clear_options(0); + + vehicle::customs::respray::type::vars::m_vars.m_update_cache = true; + m_vars.m_context.reset(); + m_vars.m_context.m_selected = 0; + + std::vector> temp_options; + int selected_index = 99; + + uint64_t paint = rage::engine::get_vehicle_paint(m_vars.m_type); + if (paint) { + uint64_t paint_info = *(uint64_t*)paint; + if (paint_info) { + uint16_t paint_count = *(uint16_t*)(paint + 0x8); + for (uint16_t i = 0; i < paint_count; i++) { + uint64_t paint_meta = paint_info + (uint64_t(i) << 4); + if (paint_meta) { + const char* paint_label = *(const char**)paint_meta; + if (paint_label) { + int paint_index = (int)*(uint8_t*)(paint_meta + 0x8); + temp_options.push_back(add_option(radio_option(native::get_label_text(paint_label)) + .add_radio(m_vars.m_context) + .add_click([=] { + if (m_vars.m_type == 2) { + vehicle::customs::respray::type::vars::m_vars.m_paint_index[vehicle::customs::respray::type::vars::PEARLESCENT] = paint_index; + } else { + if (vehicle::customs::respray::type::vars::m_vars.m_type == 1) { + vehicle::customs::respray::type::vars::m_vars.m_paint_index[vehicle::customs::respray::type::vars::PRIMARY] = paint_index; + } else { + vehicle::customs::respray::type::vars::m_vars.m_paint_index[vehicle::customs::respray::type::vars::SECONDARY] = paint_index; + } + } + }) + .add_hover([=] { + if (m_vars.m_type == 2) { + // PEARLESCENT + int wheel_color = 0; + int pearl_color = 0; + native::get_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, &pearl_color, &wheel_color); + native::set_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, paint_index, wheel_color); + } else { + if (native::get_is_vehicle_primary_colour_custom(menu::player::get_local_player().m_vehicle)) { + native::clear_vehicle_custom_primary_colour(menu::player::get_local_player().m_vehicle); + } + + if (native::get_is_vehicle_secondary_colour_custom(menu::player::get_local_player().m_vehicle)) { + native::clear_vehicle_custom_secondary_colour(menu::player::get_local_player().m_vehicle); + } + + if (vehicle::customs::respray::type::vars::m_vars.m_type == 1) { + // PRIMARY + int primary = 0; + int secondary = 0; + native::get_vehicle_colours(menu::player::get_local_player().m_vehicle, &primary, &secondary); + native::set_vehicle_colours(menu::player::get_local_player().m_vehicle, paint_index, secondary); + } else { + // SECONDARY + int primary = 0; + int secondary = 0; + native::get_vehicle_colours(menu::player::get_local_player().m_vehicle, &primary, &secondary); + native::set_vehicle_colours(menu::player::get_local_player().m_vehicle, primary, paint_index); + } + } + }))); + + if (selected_index == 99) { + if (m_vars.m_type == 2) { + // PEARLESCENT + if (paint_index == vehicle::customs::respray::type::vars::m_vars.m_paint_index[vehicle::customs::respray::type::vars::PEARLESCENT]) { + selected_index = i; + } + } else { + if (vehicle::customs::respray::type::vars::m_vars.m_type == 1) { + if (paint_index == vehicle::customs::respray::type::vars::m_vars.m_paint_index[vehicle::customs::respray::type::vars::PRIMARY]) { + selected_index = i; + } + } else { + if (paint_index == vehicle::customs::respray::type::vars::m_vars.m_paint_index[vehicle::customs::respray::type::vars::SECONDARY]) { + selected_index = i; + } + } + } + } + } + } + } + } + } + + if (selected_index != 0) { + if (selected_index != 99) { + temp_options[selected_index]->update_selected(); + menu::base::set_current_option(selected_index); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } +} + +void vehicle_customs_respray_edit_menu::feature_update() {} + +vehicle_customs_respray_edit_menu* g_instance; +vehicle_customs_respray_edit_menu* vehicle_customs_respray_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_respray_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_edit.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_edit.h new file mode 100644 index 0000000..d8d0cda --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_edit.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_respray_edit_menu : public menu::submenu::submenu { +public: + static vehicle_customs_respray_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_respray_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::respray::edit::vars { + struct variables { + int m_type; + radio_context m_context = { "commonmenu", "shop_garage_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_type.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_type.cpp new file mode 100644 index 0000000..2a6576a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_type.cpp @@ -0,0 +1,137 @@ +#include "vehicle_customs_respray_type.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs_respray.h" +#include "../../vehicle_customs.h" +#include "vehicle_customs_respray_edit.h" + +using namespace vehicle::customs::respray::type::vars; + +namespace vehicle::customs::respray::type::vars { + variables m_vars; +} + +void vehicle_customs_respray_type_menu::load() { + set_name("Respray"); + set_parent(); + + add_string("Chrome"); + add_string("Classic"); + add_string("Matte"); + add_string("Metallic"); + add_string("Metals"); + add_string("Pearlescent"); +} + +void vehicle_customs_respray_type_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_respray_type_menu::update_once() { + clear_options(0); + + vehicle::customs::respray::vars::m_vars.m_update_cache = true; + m_vars.m_context.reset(); + m_vars.m_context.m_selected = 0; + + if (m_vars.m_update_cache) { + m_vars.m_update_cache = false; + + if (native::get_is_vehicle_primary_colour_custom(menu::player::get_local_player().m_vehicle)) { + native::clear_vehicle_custom_primary_colour(menu::player::get_local_player().m_vehicle); + } + + if (native::get_is_vehicle_secondary_colour_custom(menu::player::get_local_player().m_vehicle)) { + native::clear_vehicle_custom_secondary_colour(menu::player::get_local_player().m_vehicle); + } + + native::set_vehicle_colours(menu::player::get_local_player().m_vehicle, m_vars.m_paint_index[PRIMARY], m_vars.m_paint_index[SECONDARY]); + + int wheel_color = 0; + int pearl = 0; + native::get_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, &pearl, &wheel_color); + native::set_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, m_vars.m_paint_index[PEARLESCENT], wheel_color); + } + + int wheel_color = 0; + native::get_vehicle_colours(menu::player::get_local_player().m_vehicle, &m_vars.m_paint_index[PRIMARY], &m_vars.m_paint_index[SECONDARY]); + native::get_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, &m_vars.m_paint_index[PEARLESCENT], &wheel_color); + + if (m_vars.m_type == 1 || m_vars.m_type == 2) { + add_option(submenu_option(get_string("Chrome")) + .add_submenu() + .add_click([] { vehicle::customs::respray::edit::vars::m_vars.m_type = 5; })); + + add_option(submenu_option(get_string("Classic")) + .add_submenu() + .add_click([] { vehicle::customs::respray::edit::vars::m_vars.m_type = 1; })); + + add_option(submenu_option(get_string("Matte")) + .add_submenu() + .add_click([] { vehicle::customs::respray::edit::vars::m_vars.m_type = 3; })); + + add_option(submenu_option(get_string("Metallic")) + .add_submenu() + .add_click([] { vehicle::customs::respray::edit::vars::m_vars.m_type = 0; })); + + add_option(submenu_option(get_string("Metals")) + .add_submenu() + .add_click([] { vehicle::customs::respray::edit::vars::m_vars.m_type = 4; })); + + // Primary only + if (m_vars.m_type == 1) { + add_option(submenu_option(get_string("Pearlescent")) + .add_submenu() + .add_click([] { vehicle::customs::respray::edit::vars::m_vars.m_type = 2; })); + } + } else { + // Livery + std::vector> temp_options; + int selected_index = 99; + + for (int i = 0; i < native::get_vehicle_livery_count(menu::player::get_local_player().m_vehicle); i++) { + const char* livery_name = native::get_livery_name(menu::player::get_local_player().m_vehicle, i); + if (livery_name) { + temp_options.push_back(add_option(radio_option(native::get_label_text(livery_name)) + .add_radio(m_vars.m_context) + .add_click([=] { vehicle::customs::respray::vars::m_vars.m_livery = i; }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_livery(menu::player::get_local_player().m_vehicle, i); + }))); + + if (vehicle::customs::respray::vars::m_vars.m_livery == i) { + selected_index = i; + } + } + } + + if (selected_index != 0) { + if (selected_index != 99) { + temp_options[selected_index]->update_selected(); + menu::base::set_current_option(selected_index); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + } +} + +void vehicle_customs_respray_type_menu::feature_update() {} + +vehicle_customs_respray_type_menu* g_instance; +vehicle_customs_respray_type_menu* vehicle_customs_respray_type_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_respray_type_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_type.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_type.h new file mode 100644 index 0000000..cd2ec8f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/respray/vehicle_customs_respray_type.h @@ -0,0 +1,32 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_respray_type_menu : public menu::submenu::submenu { +public: + static vehicle_customs_respray_type_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_respray_type_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::respray::type::vars { + enum ePaintIndexs { + PRIMARY, + SECONDARY, + PEARLESCENT + }; + + struct variables { + bool m_update_cache; + int m_type; + int m_paint_index[3]; + radio_context m_context = { "commonmenu", "shop_garage_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_bumpers.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_bumpers.cpp new file mode 100644 index 0000000..a36069b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_bumpers.cpp @@ -0,0 +1,68 @@ +#include "vehicle_customs_bumpers.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs.h" +#include "vehicle_customs_lsc.h" + +using namespace vehicle::customs::bumper::vars; + +namespace vehicle::customs::bumper::vars { + variables m_vars; +} + +void vehicle_customs_bumper_menu::load() { + set_name("Bumpers"); + set_parent(); + + add_string("Front Bumper"); + add_string("Rear Bumper"); +} + +void vehicle_customs_bumper_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_bumper_menu::update_once() { + clear_options(0); + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER, vehicle::customs::vars::m_vars.m_cached_stats.m_front_bumper, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER, vehicle::customs::vars::m_vars.m_cached_stats.m_rear_bumper, false); + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER)) { + add_option(submenu_option(get_string("Front Bumper")) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_FRONTBUMPER; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_front_bumper; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER)) { + add_option(submenu_option(get_string("Rear Bumper")) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_REARBUMPER; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_rear_bumper; + })); + } +} + +void vehicle_customs_bumper_menu::feature_update() {} + +vehicle_customs_bumper_menu* g_instance; +vehicle_customs_bumper_menu* vehicle_customs_bumper_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_bumper_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_bumpers.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_bumpers.h new file mode 100644 index 0000000..f32b8b6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_bumpers.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_bumper_menu : public menu::submenu::submenu { +public: + static vehicle_customs_bumper_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_bumper_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::bumper::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_fender.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_fender.cpp new file mode 100644 index 0000000..1d2cd9a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_fender.cpp @@ -0,0 +1,68 @@ +#include "vehicle_customs_fender.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs.h" +#include "vehicle_customs_lsc.h" + +using namespace vehicle::customs::fender::vars; + +namespace vehicle::customs::fender::vars { + variables m_vars; +} + +void vehicle_customs_fender_menu::load() { + set_name("Fenders"); + set_parent(); + + add_string("Left Fender"); + add_string("Right Bumper"); +} + +void vehicle_customs_fender_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_fender_menu::update_once() { + clear_options(0); + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FENDER, vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER, vehicle::customs::vars::m_vars.m_cached_stats.m_right_fender, false); + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FENDER)) { + add_option(submenu_option(get_string("Left Fender")) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_FENDER; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER)) { + add_option(submenu_option(get_string("Right Fender")) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_RIGHTFENDER; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_right_fender; + })); + } +} + +void vehicle_customs_fender_menu::feature_update() {} + +vehicle_customs_fender_menu* g_instance; +vehicle_customs_fender_menu* vehicle_customs_fender_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_fender_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_fender.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_fender.h new file mode 100644 index 0000000..2db6772 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_fender.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_fender_menu : public menu::submenu::submenu { +public: + static vehicle_customs_fender_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_fender_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::fender::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_horn.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_horn.cpp new file mode 100644 index 0000000..2647352 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_horn.cpp @@ -0,0 +1,69 @@ +#include "vehicle_customs_horn.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs.h" +#include "vehicle_customs_lsc.h" + +using namespace vehicle::customs::horn::vars; + +namespace vehicle::customs::horn::vars { + variables m_vars; +} + +void vehicle_customs_horn_menu::load() { + set_name("Horn"); + set_parent(); + + add_option(submenu_option("Standard") + .add_translate() + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_HORN_STANDARD; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender; + })); + + add_option(submenu_option("Musical") + .add_translate() + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_HORN_MUSICAL; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender; + })); + + add_option(submenu_option("Loop") + .add_translate() + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_HORN_LOOP; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender; + })); +} + +void vehicle_customs_horn_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_horn_menu::update_once() { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS, vehicle::customs::vars::m_vars.m_cached_stats.m_horn, false); +} + +void vehicle_customs_horn_menu::feature_update() {} + +vehicle_customs_horn_menu* g_instance; +vehicle_customs_horn_menu* vehicle_customs_horn_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_horn_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_horn.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_horn.h new file mode 100644 index 0000000..52d3e2e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_horn.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_horn_menu : public menu::submenu::submenu { +public: + static vehicle_customs_horn_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_horn_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::horn::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_interior.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_interior.cpp new file mode 100644 index 0000000..5283e1d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_interior.cpp @@ -0,0 +1,143 @@ +#include "vehicle_customs_interior.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs.h" +#include "vehicle_customs_lsc.h" + +using namespace vehicle::customs::interior::vars; + +namespace vehicle::customs::interior::vars { + variables m_vars; +} + +void vehicle_customs_interior_menu::load() { + set_name("Benny's"); + set_parent(); + + add_string("Audio Install"); + add_string("Dash"); + add_string("Dials"); + add_string("Doors"); + add_string("Ornaments"); + add_string("Seats"); + add_string("Shifter"); + add_string("Steering Wheels"); +} + +void vehicle_customs_interior_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_interior_menu::update_once() { + clear_options(0); + + if (m_vars.m_update_cache) { + m_vars.m_update_cache = false; + + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DASHBOARD, vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_interior_design, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DIAL, vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_dials, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DOOR_SPEAKER, vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_doors, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SEATS, vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_seats, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_STEERINGWHEEL, vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_steering_wheel, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ORNAMENTS, vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_ornaments, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SHIFTER_LEAVERS, vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_shifter, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPEAKERS, vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_audio_install, false); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SPEAKERS)) { + add_option(submenu_option(vehicle::customs::vars::get_vehicle_mod_name(MOD_SPEAKERS, get_string("Audio Install"))) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_SPEAKERS; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_audio_install; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_DASHBOARD)) { + add_option(submenu_option(vehicle::customs::vars::get_vehicle_mod_name(MOD_DASHBOARD, get_string("Dash"))) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_DASHBOARD; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_interior_design; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_DIAL)) { + add_option(submenu_option(vehicle::customs::vars::get_vehicle_mod_name(MOD_DIAL, get_string("Dials"))) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_DIAL; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_dials; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_DOOR_SPEAKER)) { + add_option(submenu_option(vehicle::customs::vars::get_vehicle_mod_name(MOD_DOOR_SPEAKER, get_string("Doors"))) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_DOOR_SPEAKER; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_doors; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_ORNAMENTS)) { + add_option(submenu_option(vehicle::customs::vars::get_vehicle_mod_name(MOD_ORNAMENTS, get_string("Ornaments"))) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_ORNAMENTS; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_ornaments; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SEATS)) { + add_option(submenu_option(vehicle::customs::vars::get_vehicle_mod_name(MOD_SEATS, get_string("Seats"))) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_SEATS; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_seats; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SHIFTER_LEAVERS)) { + add_option(submenu_option(vehicle::customs::vars::get_vehicle_mod_name(MOD_SHIFTER_LEAVERS, get_string("Shifter"))) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_SHIFTER_LEAVERS; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_shifter; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_STEERINGWHEEL)) { + add_option(submenu_option(vehicle::customs::vars::get_vehicle_mod_name(MOD_STEERINGWHEEL, get_string("Steering Wheels"))) + .add_submenu() + .add_click([] { + vehicle::customs::vars::cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_STEERINGWHEEL; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_bennys_steering_wheel; + })); + } +} + +void vehicle_customs_interior_menu::feature_update() {} + +vehicle_customs_interior_menu* g_instance; +vehicle_customs_interior_menu* vehicle_customs_interior_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_interior_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_interior.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_interior.h new file mode 100644 index 0000000..d3cdf8d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_interior.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_interior_menu : public menu::submenu::submenu { +public: + static vehicle_customs_interior_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_interior_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::interior::vars { + struct variables { + bool m_update_cache; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lights.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lights.cpp new file mode 100644 index 0000000..825605f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lights.cpp @@ -0,0 +1,56 @@ +#include "vehicle_customs_lights.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs.h" +#include "vehicle_customs_lsc.h" +#include "lights/vehicle_customs_neon.h" + +using namespace vehicle::customs::lights::vars; + +namespace vehicle::customs::lights::vars { + variables m_vars; +} + +void vehicle_customs_lights_menu::load() { + set_name("Lights"); + set_parent(); + + add_option(submenu_option("Headlights") + .add_translate() + .add_submenu() + .add_click([] { + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_XENONLIGHTS; + vehicle::customs::lsc::vars::m_vars.m_value = &vehicle::customs::vars::m_vars.m_cached_stats.m_lights; + })); + + add_option(submenu_option("Neon Kits") + .add_translate() + .add_submenu() + .add_requirement([] { return native::is_this_model_a_car(native::get_entity_model(menu::player::get_local_player().m_vehicle)); })); +} + +void vehicle_customs_lights_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_lights_menu::update_once() { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_XENONLIGHTS, vehicle::customs::vars::m_vars.m_cached_stats.m_lights); +} + +void vehicle_customs_lights_menu::feature_update() {} + +vehicle_customs_lights_menu* g_instance; +vehicle_customs_lights_menu* vehicle_customs_lights_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_lights_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lights.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lights.h new file mode 100644 index 0000000..4603d9b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lights.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_lights_menu : public menu::submenu::submenu { +public: + static vehicle_customs_lights_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_lights_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::lights::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lsc.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lsc.cpp new file mode 100644 index 0000000..eb9adde --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lsc.cpp @@ -0,0 +1,993 @@ +#include "vehicle_customs_lsc.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs.h" +#include "vehicle_customs_bumpers.h" +#include "vehicle_customs_fender.h" +#include "vehicle_customs_horn.h" +#include "vehicle_customs_lights.h" +#include "lights/vehicle_customs_neon.h" + +using namespace vehicle::customs::lsc::vars; + +namespace vehicle::customs::lsc::vars { + variables m_vars; + + scroll_struct armor[] = { + { localization("Armor Upgrade 20%", true), 0, }, + { localization("Armor Upgrade 40%", true), 1, }, + { localization("Armor Upgrade 60%", true), 2, }, + { localization("Armor Upgrade 80%", true), 3, }, + { localization("Armor Upgrade 100%", true), 4 }, + }; + + scroll_struct suspension[] = { + { localization("Lowered Suspension", true), 0, }, + { localization("Street Suspension", true), 1, }, + { localization("Sport Suspension", true), 2, }, + { localization("Competition Suspension", true), 3, }, + { localization("Race Suspension", true), 4, }, + }; + + scroll_struct transmission[] = { + { localization("Street Transmission", true), 0, }, + { localization("Sports Transmission", true), 1, }, + { localization("Race Transmission", true), 2, }, + }; + + scroll_struct brakes[] = { + { localization("Street Brakes", true), 0, }, + { localization("Sport Brakes", true), 1, }, + { localization("Race Brakes", true), 2, }, + { localization("Open Wheel Brakes", true), 3 }, + }; + + scroll_struct> neons[] = { + { localization("Front", true), { 2 }, }, + { localization("Back", true), { 3 }, }, + { localization("Sides", true), { 0, 1 }, }, + { localization("Front and Back", true), { 2, 3 }, }, + { localization("Front and Sides", true), { 2, 0, 1 }, }, + { localization("Back and Sides", true), { 3, 0, 1 }, }, + { localization("Front, Back and Sides", true), { 0, 1, 2, 3 } }, + }; + + scroll_struct standard_horns[] = { + { localization("Stock Horn", true), -1, }, + { localization("Truck Horn", true), 0, }, + { localization("Cop Horn", true), 1, }, + { localization("Clown Horn", true), 2, }, + }; + + scroll_struct musical_horns[] = { + { localization("Star Spangled Banner 1", true), 28, }, + { localization("Star Spangled Banner 2", true), 29, }, + { localization("Star Spangled Banner 3", true), 30, }, + { localization("Star Spangled Banner 4", true), 31, }, + { localization("Jazz Horn 1", true), 24, }, + { localization("Jazz Horn 2", true), 25, }, + { localization("Jazz Horn 3", true), 26, }, + { localization("Scale - Do", true), 16, }, + { localization("Scale - Re", true), 17, }, + { localization("Scale - Mi", true), 18, }, + { localization("Scale - Fa", true), 19, }, + { localization("Scale - Sol", true), 20, }, + { localization("Scale - La", true), 21, }, + { localization("Scale - Ti", true), 22, }, + { localization("Scale - Do (high)", true), 23, }, + { localization("Classical Horn 1", true), 9, }, + { localization("Classical Horn 2", true), 10, }, + { localization("Classical Horn 3", true), 11, }, + { localization("Classical Horn 4", true), 12, }, + { localization("Classical Horn 5", true), 13, }, + { localization("Classical Horn 6", true), 14, }, + { localization("Classical Horn 7", true), 15, }, + { localization("Classical Horn 8", true), 32, }, + { localization("Musical Horn 1", true), 3, }, + { localization("Musical Horn 2", true), 4, }, + { localization("Musical Horn 3", true), 5, }, + { localization("Musical Horn 4", true), 6, }, + { localization("Musical Horn 5", true), 7, }, + { localization("Sad Trombone", true), 8 }, + }; + + scroll_struct loop_horns[] = { + { localization("Jazz Horn Loop", true), 27, }, + { localization("San Andreas Loop", true), 42, }, + { localization("Liberty City Loop", true), 44, }, + { localization("Halloween Loop 1", true), 38, }, + { localization("Halloween Loop 2", true), 40, }, + { localization("Festive Loop 1", true), 46, }, + { localization("Festive Loop 2", true), 48, }, + { localization("Festive Loop 3", true), 50, }, + { localization("Air Horn 1", true), 52, }, + { localization("Air Horn 2", true), 54, }, + { localization("Air Horn 3", true), 56, }, + { localization("Classical Horn Loop 1", true), 33, }, + { localization("Classical Horn Loop 2", true), 34 }, + }; + + scroll_struct xenon_colors[] = { + { localization("Default", true), -1 }, + { localization("White", true), 0 }, + { localization("Blue", true), 1 }, + { localization("Electric Blue", true), 2 }, + { localization("Mint Green", true), 3 }, + { localization("Lime Green", true), 4 }, + { localization("Yellow", true), 5 }, + { localization("Golden Shower", true), 6 }, + { localization("Orange", true), 7 }, + { localization("Red", true), 8 }, + { localization("Pony Pink", true), 9 }, + { localization("Hot PInk", true), 10 }, + { localization("Purple", true), 11 }, + { localization("Blacklight", true), 12 }, + }; + + scroll_struct window_tints[] = { + { localization("Light Smoke", true), 4 }, + { localization("Dark Smoke", true), 3 }, + { localization("Limo", true), 2 }, + { localization("Pure Black", true), 5 }, + { localization("Green", true), 6 } + }; + + scroll_struct plates[] = { + { localization("Blue on White 1", true), 0 }, + { localization("Blue on White 2", true), 3 }, + { localization("Blue on White 3", true), 4 }, + { localization("Yellow on Blue", true), 2 }, + { localization("Yellow on Black", true), 1 }, + { localization("Yankton", true), 5 }, + }; + + std::unordered_map stock_mod_names = { + { MOD_EXHAUST, "Stock" }, + { MOD_HOOD, "Stock" }, + { MOD_SPOILER, "None" }, + { MOD_GRILLE, "Stock" }, + { MOD_FENDER, "Stock" }, + { MOD_ROOF, "Stock" }, + { MOD_CHASSIS, "None" }, + { MOD_DASHBOARD, "None" }, + { MOD_DIAL, "Stock" }, + { MOD_DOOR_SPEAKER, "None" }, + { MOD_SEATS, "None" }, + { MOD_STEERINGWHEEL, "Stock" }, + { MOD_LIVERY, "None" }, + }; +} + +void vehicle_customs_lsc_menu::load() { + set_name("Los Santos Customs"); + set_parent(); + + add_string("None"); + add_string("Stock EMS"); + add_string("EMS Upgrade, Level 1"); + add_string("EMS Upgrade, Level 2"); + add_string("EMS Upgrade, Level 3"); + add_string("EMS Upgrade, Level 4"); + add_string("EMS Upgrade, Level 5"); + add_string("Stock Suspension"); + add_string("Stock Transmission"); + add_string("Stock Brakes"); + add_string("Turbo Tuning"); + add_string("Stock Skirts"); + add_string("Stock Lights"); + add_string("Xenon Lights"); + add_string("Xenon Color"); + add_string("Stock Front Bumper"); + add_string("Stock Rear Bumper"); + add_string("Stock Left Fender"); + add_string("Stock Right Fender"); + add_string("Stock"); + add_string("Los Santos Customs"); + add_string("Benny's"); +} + +void vehicle_customs_lsc_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); + if (menu::base::get_scroll_offset() < menu::submenu::handler::get_total_options() - menu::base::get_max_options() && menu::base::get_current_option() - menu::base::get_scroll_offset() >= menu::base::get_max_options()) menu::base::set_scroll_offset(menu::base::get_scroll_offset() + 1); +} + +void vehicle_customs_lsc_menu::update_once() { + if (vehicle::customs::vars::m_vars.m_type == 0) { + set_name(get_string("Los Santos Customs"), false, false); + } else set_name(get_string("Benny's"), false, false); + + set_parent(); + clear_options(0); + + vehicle::customs::vars::m_vars.m_update_cache = true; + // VehicleEditorBennysInteriorMenuVars::m_vars.m_update_cache = true; + m_vars.m_context.reset(); + m_vars.m_context.m_selected = 0; + + if (m_vars.m_mod_type == MOD_ARMOR) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("None")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_armor = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARMOR, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_ARMOR); i++) { + temp_options.push_back(add_option(radio_option(armor[i].m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_armor = armor[i].m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARMOR, armor[i].m_result, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_armor != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_armor + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_armor + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_armor + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_ENGINE) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock EMS")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_engine = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_ENGINE); i++) { + temp_options.push_back(add_option(radio_option(get_string(util::va::va("EMS Upgrade, Level %i", i + 1))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_engine = i; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE, i, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_engine != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_engine + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_engine + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_engine + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_SUSPENSION) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Suspension")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_suspension = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SUSPENSION, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SUSPENSION); i++) { + temp_options.push_back(add_option(radio_option(suspension[i].m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_suspension = suspension[i].m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SUSPENSION, suspension[i].m_result, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_suspension != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_suspension + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_suspension + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_suspension + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_TRANSMISSION) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Transmission")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_transmission = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRANSMISSION, -1, false); + }))); + + for (int i = 0; i < NUMOF(transmission); i++) { + temp_options.push_back(add_option(radio_option(transmission[i].m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_transmission = transmission[i].m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRANSMISSION, transmission[i].m_result, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_transmission != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_transmission + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_transmission + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_transmission + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_BRAKES) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Brakes")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_brakes = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_BRAKES, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_BRAKES); i++) { + temp_options.push_back(add_option(radio_option(brakes[i].m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_brakes = brakes[i].m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_BRAKES, brakes[i].m_result, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_brakes != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_brakes + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_brakes + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_brakes + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_TURBO) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("None")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_turbo = 0; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TURBO, false); + }))); + + temp_options.push_back(add_option(radio_option(get_string("Turbo Tuning")) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_turbo = 1; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TURBO, true); + }))); + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_turbo) { + temp_options[1]->update_selected(); + menu::base::set_current_option(1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_SIDESKIRT) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Skirts")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_skirts = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SIDESKIRT, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SIDESKIRT); i++) { + const char* label = native::get_label_text(native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_SIDESKIRT, i)); + if (!strcmp(label, "NULL")) label = "Custom Skirts"; + + temp_options.push_back(add_option(radio_option(label) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_skirts = i; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SIDESKIRT, i, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_skirts != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_skirts + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_skirts + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_skirts + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_XENONLIGHTS) { + set_parent(); + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Lights")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_lights = 0; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_XENONLIGHTS, false); + }))); + + temp_options.push_back(add_option(radio_option(get_string("Xenon Lights")) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_lights = 1; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_XENONLIGHTS, true); + }))); + + add_option(scroll_option(SCROLL, get_string("Xenon Color")) + .add_scroll(m_vars.m_xenon_color, 0, NUMOF(xenon_colors), xenon_colors) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_xenon_color = xenon_colors[m_vars.m_xenon_color].m_result; + }) + .add_hover([] { + native::set_vehicle_xenon_lights_colour(menu::player::get_local_player().m_vehicle, xenon_colors[m_vars.m_xenon_color].m_result); + }).add_requirement([] { return vehicle::customs::vars::m_vars.m_cached_stats.m_lights == 1; })); + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_lights) { + temp_options[1]->update_selected(); + menu::base::set_current_option(1); + } + + for (int i = 0; i < NUMOF(xenon_colors); i++) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_xenon_color == xenon_colors[i].m_result) { + m_vars.m_xenon_color = i; + break; + } + } + + return; + } + + if (m_vars.m_mod_type == MOD_NEON) { + set_parent(); + std::vector> temp_options; + + auto disable_neons = [] { + for (int i = 0; i < 4; i++) { + native::set_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, i, false); + } + }; + + auto set_neons = [](std::vector Neons) { + for (auto& Neon : Neons) { + native::set_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, Neon, true); + } + }; + + temp_options.push_back(add_option(radio_option(get_string("None")) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + // set neons enabled in vars + for (int i = 0; i < 4; i++) { + vehicle::customs::vars::m_vars.m_cached_stats.m_neon[i] = false; + } + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + // set neons enabled native + disable_neons(); + }))); + + for (int i = 0; i < NUMOF(neons); i++) { + temp_options.push_back(add_option(radio_option(neons[i].m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + + memset(&vehicle::customs::vars::m_vars.m_cached_stats.m_neon, 0, sizeof(vehicle::customs::vars::m_vars.m_cached_stats.m_neon)); + for (auto neon : neons[i].m_result) { + vehicle::customs::vars::m_vars.m_cached_stats.m_neon[neon] = true; + } + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + disable_neons(); + set_neons(neons[i].m_result); + }))); + } + + bool Left = vehicle::customs::vars::m_vars.m_cached_stats.m_neon[0]; + bool Right = vehicle::customs::vars::m_vars.m_cached_stats.m_neon[1]; + bool Front = vehicle::customs::vars::m_vars.m_cached_stats.m_neon[2]; + bool Back = vehicle::customs::vars::m_vars.m_cached_stats.m_neon[3]; + + if (Front && (!Left && !Right && !Back)) { + temp_options[1]->update_selected(); + menu::base::set_current_option(1); + } else if (Back && (!Left && !Right && !Front)) { + temp_options[2]->update_selected(); + menu::base::set_current_option(2); + } else if ((Left && Right) && (!Front && !Back)) { + temp_options[3]->update_selected(); + menu::base::set_current_option(3); + } else if (Front && Back && (!Left && !Right)) { + temp_options[4]->update_selected(); + menu::base::set_current_option(4); + } else if (Front && Left & Right && (!Back)) { + temp_options[5]->update_selected(); + menu::base::set_current_option(5); + } else if (Back && Left && Right && (!Front)) { + temp_options[6]->update_selected(); + menu::base::set_current_option(6); + } else if (Front && Back && Left && Right) { + temp_options[7]->update_selected(); + menu::base::set_current_option(7); + } + + return; + } + + if (m_vars.m_mod_type == MOD_HORN_STANDARD) { + set_parent(); + std::vector> temp_options; + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS); + + for (int i = 0; i < NUMOF(standard_horns); i++) { + auto horn = standard_horns[i]; + temp_options.push_back(add_option(radio_option(horn.m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_horn = horn.m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS, horn.m_result, false); + }))); + + if (horn.m_result == current_mod) { + selected_index = i; + } + } + + if (selected_index != 0) { + if (selected_index != 99) { + temp_options[selected_index]->update_selected(); + menu::base::set_current_option(selected_index); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + if (m_vars.m_mod_type == MOD_HORN_MUSICAL) { + set_parent(); + std::vector> temp_options; + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS); + + for (int i = 0; i < NUMOF(musical_horns); i++) { + auto horn = musical_horns[i]; + temp_options.push_back(add_option(radio_option(horn.m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_horn = horn.m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS, horn.m_result, false); + }))); + + if (horn.m_result == current_mod) { + selected_index = i; + } + } + + if (selected_index != 0) { + if (selected_index != 99) { + temp_options[selected_index]->update_selected(); + menu::base::set_current_option(selected_index); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + if (m_vars.m_mod_type == MOD_HORN_LOOP) { + set_parent(); + std::vector> temp_options; + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS); + + for (int i = 0; i < NUMOF(loop_horns); i++) { + auto horn = loop_horns[i]; + temp_options.push_back(add_option(radio_option(horn.m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_horn = horn.m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS, horn.m_result, false); + }))); + + if (horn.m_result == current_mod) { + selected_index = i; + } + } + + if (selected_index != 0) { + if (selected_index != 99) { + temp_options[selected_index]->update_selected(); + menu::base::set_current_option(selected_index); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + if (m_vars.m_mod_type == MOD_FRONTBUMPER) { + set_parent(); + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Front Bumper")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_front_bumper = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER); i++) { + temp_options.push_back(add_option(radio_option(native::get_label_text(native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER, i))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_front_bumper = i; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER, i, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_front_bumper != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_front_bumper + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_front_bumper + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_front_bumper + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_REARBUMPER) { + set_parent(); + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Rear Bumper")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_rear_bumper = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER); i++) { + temp_options.push_back(add_option(radio_option(native::get_label_text(native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER, i))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_rear_bumper = i; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER, i, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_rear_bumper != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_rear_bumper + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_rear_bumper + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_rear_bumper + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_FENDER) { + set_parent(); + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Left Fender")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FENDER, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FENDER); i++) { + temp_options.push_back(add_option(radio_option(native::get_label_text(native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FENDER, i))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender = i; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FENDER, i, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_left_fender + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_RIGHTFENDER) { + set_parent(); + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Right Fender")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_right_fender = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER); i++) { + temp_options.push_back(add_option(radio_option(native::get_label_text(native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER, i))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_right_fender = i; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER, i, false); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_right_fender != -1) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_right_fender + 1 >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_right_fender + 1]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_right_fender + 1); + } + + return; + } + + if (m_vars.m_mod_type == MOD_WINDOWS_CUSTOM) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("None")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_window_tint = 0; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_window_tint(menu::player::get_local_player().m_vehicle, 0); + }))); + + for (int i = 0; i < NUMOF(window_tints); i++) { + temp_options.push_back(add_option(radio_option(window_tints[i].m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_window_tint = window_tints[i].m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_window_tint(menu::player::get_local_player().m_vehicle, window_tints[i].m_result); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_window_tint > 0) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_window_tint >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_window_tint]->update_selected(); // crash here + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_window_tint); + } + + return; + } + + if (m_vars.m_mod_type == MOD_PLATES) { + std::vector> temp_options; + + add_option(button_option("Input Custom Plate") + .add_keyboard("Enter plate text", 8, [](button_option* option, const char* result) { + native::set_vehicle_number_plate_text(menu::player::get_local_player().m_vehicle, result); + })); + + for (int i = 0; i < NUMOF(plates); i++) { + temp_options.push_back(add_option(radio_option(plates[i].m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::vars::m_vars.m_cached_stats.m_plate_index = plates[i].m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_number_plate_text_index(menu::player::get_local_player().m_vehicle, plates[i].m_result); + }))); + } + + if (vehicle::customs::vars::m_vars.m_cached_stats.m_plate_index != 0) { + if (vehicle::customs::vars::m_vars.m_cached_stats.m_plate_index >= temp_options.size()) return; + temp_options[vehicle::customs::vars::m_vars.m_cached_stats.m_plate_index]->update_selected(); + menu::base::set_current_option(vehicle::customs::vars::m_vars.m_cached_stats.m_plate_index + 1); + } + return; + } + + if (m_vars.m_mod_type == MOD_DASHBOARD + || m_vars.m_mod_type == MOD_DIAL + || m_vars.m_mod_type == MOD_DOOR_SPEAKER + || m_vars.m_mod_type == MOD_SEATS + || m_vars.m_mod_type == MOD_STEERINGWHEEL + || m_vars.m_mod_type == MOD_ORNAMENTS + || m_vars.m_mod_type == MOD_SHIFTER_LEAVERS + || m_vars.m_mod_type == MOD_SPEAKERS) { + //SetParentSubmenu(); + } + + std::vector> temp_options; + + std::string stock_name = get_string("None"); + if (stock_mod_names.find(m_vars.m_mod_type) != stock_mod_names.end()) { + stock_name = get_string(stock_mod_names[m_vars.m_mod_type]); + } + + temp_options.push_back(add_option(radio_option(stock_name) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + *m_vars.m_value = -1; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, m_vars.m_mod_type, -1, false); + }))); + + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, m_vars.m_mod_type); i++) { + const char* mod_label = native::get_mod_text_label(menu::player::get_local_player().m_vehicle, m_vars.m_mod_type, i); + if (is_valid_ptr(mod_label)) { + temp_options.push_back(add_option(radio_option(native::get_label_text(mod_label)) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + *m_vars.m_value = i; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, m_vars.m_mod_type, i, false); + }))); + } + } + + if (m_vars.m_value) { + if (*m_vars.m_value != -1) { + if (*m_vars.m_value + 1 >= temp_options.size()) return; + + if (temp_options[*m_vars.m_value + 1]) { + temp_options[*m_vars.m_value + 1]->update_selected(); + } + + menu::base::set_current_option(*m_vars.m_value + 1); + } + } +} + +void vehicle_customs_lsc_menu::feature_update() {} + +vehicle_customs_lsc_menu* g_instance; +vehicle_customs_lsc_menu* vehicle_customs_lsc_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_lsc_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lsc.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lsc.h new file mode 100644 index 0000000..35aec29 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_lsc.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_lsc_menu : public menu::submenu::submenu { +public: + static vehicle_customs_lsc_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_lsc_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::lsc::vars { + struct variables { + eVehicleModTypes m_mod_type; + int m_xenon_color; + int* m_value; + + radio_context m_context = { "commonmenu", "shop_garage_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_respray.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_respray.cpp new file mode 100644 index 0000000..d70aa66 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_respray.cpp @@ -0,0 +1,62 @@ +#include "vehicle_customs_respray.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs.h" +#include "respray/vehicle_customs_respray_type.h" + +using namespace vehicle::customs::respray::vars; + +namespace vehicle::customs::respray::vars { + variables m_vars; +} + +void vehicle_customs_respray_menu::load() { + set_name("Respray"); + set_parent(); + + add_option(submenu_option("Primary Color") + .add_translate() + .add_submenu() + .add_click([] { vehicle::customs::respray::type::vars::m_vars.m_type = 1; })); + + add_option(submenu_option("Secondary Color") + .add_translate() + .add_submenu() + .add_click([] { vehicle::customs::respray::type::vars::m_vars.m_type = 2; })); + + add_option(submenu_option("Livery") + .add_translate() + .add_submenu() + .add_click([] { vehicle::customs::respray::type::vars::m_vars.m_type = 3; }) + .add_requirement([] { return native::get_vehicle_livery_count(menu::player::get_local_player().m_vehicle) > 0 && native::get_livery_name(menu::player::get_local_player().m_vehicle, 0); })); +} + +void vehicle_customs_respray_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_respray_menu::update_once() { + if (m_vars.m_update_cache) { + m_vars.m_update_cache = false; + native::set_vehicle_livery(menu::player::get_local_player().m_vehicle, m_vars.m_livery); + } + + m_vars.m_livery = native::get_vehicle_livery(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_respray_menu::feature_update() {} + +vehicle_customs_respray_menu* g_instance; +vehicle_customs_respray_menu* vehicle_customs_respray_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_respray_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_respray.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_respray.h new file mode 100644 index 0000000..01bb7c7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_respray.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_respray_menu : public menu::submenu::submenu { +public: + static vehicle_customs_respray_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_respray_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::respray::vars { + struct variables { + bool m_update_cache; + int m_livery; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_wheels.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_wheels.cpp new file mode 100644 index 0000000..d671aa8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_wheels.cpp @@ -0,0 +1,65 @@ +#include "vehicle_customs_wheels.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs.h" +#include "wheels/vehicle_customs_wheels_type.h" +#include "wheels/vehicle_customs_wheels_color.h" +#include "wheels/vehicle_customs_wheels_tires.h" + +using namespace vehicle::customs::wheels::vars; + +namespace vehicle::customs::wheels::vars { + variables m_vars; +} + +void vehicle_customs_wheels_menu::load() { + set_name("Wheels"); + set_parent(); + + add_option(submenu_option("Wheel Type") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Wheel Color") + .add_translate() + .add_submenu()); + + add_option(submenu_option("Tires") + .add_translate() + .add_submenu()); +} + +void vehicle_customs_wheels_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_wheels_menu::update_once() { + if (m_vars.m_update_cache) { + m_vars.m_update_cache = false; + + int perl = 0; + int cur = 0; + native::get_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, &perl, &cur); + native::set_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, perl, m_vars.m_paint_index); + } + + int perl = 0; + native::get_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, &perl, &m_vars.m_paint_index); +} + +void vehicle_customs_wheels_menu::feature_update() {} + +vehicle_customs_wheels_menu* g_instance; +vehicle_customs_wheels_menu* vehicle_customs_wheels_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_wheels_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_wheels.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_wheels.h new file mode 100644 index 0000000..181247c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/vehicle_customs_wheels.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_wheels_menu : public menu::submenu::submenu { +public: + static vehicle_customs_wheels_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_wheels_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::wheels::vars { + struct variables { + bool m_update_cache; + int m_paint_index; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_color.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_color.cpp new file mode 100644 index 0000000..f40f54f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_color.cpp @@ -0,0 +1,93 @@ +#include "vehicle_customs_wheels_color.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs_wheels.h" +#include "../../vehicle_customs.h" +#include "vehicle_customs_wheels_type.h" +#include "rage/engine.h" + +using namespace vehicle::customs::wheels::color::vars; + +namespace vehicle::customs::wheels::color::vars { + variables m_vars; +} + +void vehicle_customs_wheels_color_menu::load() { + set_name("Wheel Color"); + set_parent(); +} + +void vehicle_customs_wheels_color_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); + if (menu::base::get_scroll_offset() < menu::submenu::handler::get_total_options() - menu::base::get_max_options() && menu::base::get_current_option() - menu::base::get_scroll_offset() >= menu::base::get_max_options()) menu::base::set_scroll_offset(menu::base::get_scroll_offset() + 1); +} + +void vehicle_customs_wheels_color_menu::update_once() { + clear_options(0); + + vehicle::customs::wheels::vars::m_vars.m_update_cache = true; + m_vars.m_context.reset(); + m_vars.m_context.m_selected = 0; + + std::vector> temp_options; + + int selected_index = 99; + + uint64_t paint = rage::engine::get_vehicle_paint(1); + if (paint) { + uint64_t paint_info = *(uint64_t*)paint; + if (paint_info) { + uint16_t paint_count = *(uint16_t*)(paint + 0x8); + for (uint16_t i = 0; i < paint_count; i++) { + uint64_t paint_meta = paint_info + (uint64_t(i) << 4); + if (paint_meta) { + const char* paint_label = *(const char**)paint_meta; + if (paint_label) { + int paint_index = (int)*(uint8_t*)(paint_meta + 0x8); + temp_options.push_back(add_option(radio_option(native::get_label_text(paint_label)) + .add_radio(m_vars.m_context) + .add_click([=] { vehicle::customs::wheels::vars::m_vars.m_paint_index = paint_index; }) + .add_hover([=] { + int perl = 0; + int cur = 0; + native::get_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, &perl, &cur); + native::set_vehicle_extra_colours(menu::player::get_local_player().m_vehicle, perl, paint_index); + }))); + + if (paint_index == vehicle::customs::wheels::vars::m_vars.m_paint_index && selected_index == 99) { + selected_index = i; + } + } + } + } + } + } + + if (selected_index != 0) { + if (selected_index != 99) { + temp_options[selected_index]->update_selected(); + menu::base::set_current_option(selected_index); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } +} + +void vehicle_customs_wheels_color_menu::feature_update() {} + +vehicle_customs_wheels_color_menu* g_instance; +vehicle_customs_wheels_color_menu* vehicle_customs_wheels_color_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_wheels_color_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_color.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_color.h new file mode 100644 index 0000000..4c99cde --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_color.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_wheels_color_menu : public menu::submenu::submenu { +public: + static vehicle_customs_wheels_color_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_wheels_color_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::wheels::color::vars { + struct variables { + radio_context m_context = { "commonmenu", "shop_garage_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires.cpp new file mode 100644 index 0000000..a3771c8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires.cpp @@ -0,0 +1,70 @@ +#include "vehicle_customs_wheels_tires.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs_wheels.h" +#include "../../vehicle_customs.h" +#include "vehicle_customs_wheels_tires_edit.h" + +using namespace vehicle::customs::wheels::tires::vars; + +namespace vehicle::customs::wheels::tires::vars { + variables m_vars; +} + +void vehicle_customs_wheels_tires_menu::load() { + set_name("Tires"); + set_parent(); + + add_option(submenu_option("Tire Design") + .add_translate() + .add_submenu() + .add_click([] { vehicle::customs::wheels::tires::edit::vars::m_vars.m_type = 1; })); + + add_option(submenu_option("Tire Enhancements") + .add_translate() + .add_submenu() + .add_click([] { vehicle::customs::wheels::tires::edit::vars::m_vars.m_type = 2; })); + + add_option(submenu_option("Tire Smoke") + .add_translate() + .add_submenu() + .add_click([] { vehicle::customs::wheels::tires::edit::vars::m_vars.m_type = 3; })); +} + +void vehicle_customs_wheels_tires_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_wheels_tires_menu::update_once() { + if (m_vars.m_update_cache) { + m_vars.m_update_cache = false; + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_tyres_low_grip(menu::player::get_local_player().m_vehicle, m_vars.m_tires_low_grip); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS), m_vars.m_custom_tires); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TIRESMOKE, m_vars.m_tire_smoke); + native::set_vehicle_tyre_smoke_color(menu::player::get_local_player().m_vehicle, m_vars.m_tire_smoke_color.r, m_vars.m_tire_smoke_color.g, m_vars.m_tire_smoke_color.b); + } + + m_vars.m_tires_low_grip = native::get_vehicle_tyres_are_low_grip(menu::player::get_local_player().m_vehicle); + m_vars.m_custom_tires = native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_tire_smoke = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_TIRESMOKE); + native::get_vehicle_tyre_smoke_color(menu::player::get_local_player().m_vehicle, &m_vars.m_tire_smoke_color.r, &m_vars.m_tire_smoke_color.g, &m_vars.m_tire_smoke_color.b); +} + +void vehicle_customs_wheels_tires_menu::feature_update() {} + +vehicle_customs_wheels_tires_menu* g_instance; +vehicle_customs_wheels_tires_menu* vehicle_customs_wheels_tires_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_wheels_tires_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires.h new file mode 100644 index 0000000..a6a7d3a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_wheels_tires_menu : public menu::submenu::submenu { +public: + static vehicle_customs_wheels_tires_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_wheels_tires_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::wheels::tires::vars { + struct variables { + bool m_update_cache; + bool m_custom_tires; + bool m_tire_smoke; + bool m_tires_low_grip; + color_rgba m_tire_smoke_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires_edit.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires_edit.cpp new file mode 100644 index 0000000..c66a8d8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires_edit.cpp @@ -0,0 +1,213 @@ +#include "vehicle_customs_wheels_tires_edit.h" +#include "menu/base/submenu_handler.h" +#include "vehicle_customs_wheels_tires.h" +#include "../../vehicle_customs.h" + +using namespace vehicle::customs::wheels::tires::edit::vars; + +namespace vehicle::customs::wheels::tires::edit::vars { + variables m_vars; + + scroll_struct tire_smoke[] = { + { localization("White Tire Smoke", true), { 255, 255, 255 } }, + { localization("Black Tire Smoke", true), { 20, 20, 20 } }, + { localization("Blue Tire Smoke", true), { 0, 174, 239 } }, + { localization("Yellow Tire Smoke", true), { 252, 238, 0 } }, + { localization("Purple Tire Smoke", true), { -1, -1, -1 } }, + { localization("Orange Tire Smoke", true), { 255, 127, 0 } }, + { localization("Green Tire Smoke", true), { -1, -1, -1 } }, + { localization("Red Tire Smoke", true), { 226, 6, 6 } }, + { localization("Pink Tire Smoke", true), { -1, -1, -1 } }, + { localization("Brown Tire Smoke", true), { -1, -1, -1 } }, + { localization("Patriot Tire Smoke", true), { 0, 0, 0 } }, + }; +} + +void vehicle_customs_wheels_tires_edit_menu::load() { + set_name("Tires"); + set_parent(); + + add_string("Stock Tires"); + add_string("Custom Tires"); + add_string("Bulletproof Tires"); +} + +void vehicle_customs_wheels_tires_edit_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_wheels_tires_edit_menu::update_once() { + clear_options(0); + + vehicle::customs::wheels::tires::vars::m_vars.m_update_cache = true; + m_vars.m_context.reset(); + m_vars.m_context.m_selected = 0; + + // Populate hud element colors + if (tire_smoke[4].m_result.r == -1) { + native::get_hud_colour(21, &tire_smoke[4].m_result.r, &tire_smoke[4].m_result.g, &tire_smoke[4].m_result.b, &tire_smoke[4].m_result.a); + native::get_hud_colour(18, &tire_smoke[6].m_result.r, &tire_smoke[6].m_result.g, &tire_smoke[6].m_result.b, &tire_smoke[6].m_result.a); + native::get_hud_colour(24, &tire_smoke[8].m_result.r, &tire_smoke[8].m_result.g, &tire_smoke[8].m_result.b, &tire_smoke[8].m_result.a); + native::get_hud_colour(107, &tire_smoke[9].m_result.r, &tire_smoke[9].m_result.g, &tire_smoke[9].m_result.b, &tire_smoke[9].m_result.a); + } + + // Tire Design + if (m_vars.m_type == 1) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Tires")) + .add_radio(m_vars.m_context) + .add_click([] { vehicle::customs::wheels::tires::vars::m_vars.m_custom_tires = false; }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS), false); + }))); + + temp_options.push_back(add_option(radio_option(get_string("Custom Tires")) + .add_radio(m_vars.m_context) + .add_click([] { vehicle::customs::wheels::tires::vars::m_vars.m_custom_tires = true; }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS), true); + }))); + + if (native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)) { + temp_options[1]->update_selected(); + menu::base::set_current_option(1); + } + + return; + } + + // Tire Enhancements + if (m_vars.m_type == 2) { + m_vars.m_enhancements.clear(); + + m_vars.m_enhancements.push_back(add_option(button_option(get_string("Standard Tires")) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::tires::vars::m_vars.m_tires_low_grip = false; + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_tyres_low_grip(menu::player::get_local_player().m_vehicle, false); + + m_vars.m_enhancements[0]->add_sprite({ "commonmenu", "shop_garage_icon" }).add_sprite_scale({ 0.02112f * 0.8f, 0.03744f * 0.8f }); + m_vars.m_enhancements[1]->remove_sprite(); + }).add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_tyres_low_grip(menu::player::get_local_player().m_vehicle, false); + }))); + + m_vars.m_enhancements.push_back(add_option(button_option(get_string("Low Grip Tires")) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::tires::vars::m_vars.m_tires_low_grip = true; + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_tyres_low_grip(menu::player::get_local_player().m_vehicle, true); + + m_vars.m_enhancements[0]->remove_sprite(); + m_vars.m_enhancements[1]->add_sprite({ "commonmenu", "shop_garage_icon" }).add_sprite_scale({ 0.02112f * 0.8f, 0.03744f * 0.8f }); + }).add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_tyres_low_grip(menu::player::get_local_player().m_vehicle, true); + }))); + + m_vars.m_enhancements.push_back(add_option(button_option(get_string("Bulletproof Tires")) + .add_click([=] { + vehicle::customs::vars::update_caches(); + bool state = native::get_vehicle_tyres_can_burst(menu::player::get_local_player().m_vehicle); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_tyres_can_burst(menu::player::get_local_player().m_vehicle, !state); + + if (!state) { + m_vars.m_enhancements[2]->remove_sprite(); + } else { + m_vars.m_enhancements[2]->add_sprite({ "commonmenu", "shop_garage_icon" }).add_sprite_scale({ 0.02112f * 0.8f, 0.03744f * 0.8f }); + } + }).add_hover([this] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_tyres_low_grip(menu::player::get_local_player().m_vehicle, vehicle::customs::wheels::tires::vars::m_vars.m_tires_low_grip); + }))); + + if (native::get_vehicle_tyres_are_low_grip(menu::player::get_local_player().m_vehicle)) { + m_vars.m_enhancements[0]->remove_sprite(); + m_vars.m_enhancements[1]->add_sprite({ "commonmenu", "shop_garage_icon" }).add_sprite_scale({ 0.02112f * 0.8f, 0.03744f * 0.8f }); + } else { + m_vars.m_enhancements[0]->add_sprite({ "commonmenu", "shop_garage_icon" }).add_sprite_scale({ 0.02112f * 0.8f, 0.03744f * 0.8f }); + m_vars.m_enhancements[1]->remove_sprite(); + } + + if (native::get_vehicle_tyres_can_burst(menu::player::get_local_player().m_vehicle)) { + m_vars.m_enhancements[2]->remove_sprite(); + } else { + m_vars.m_enhancements[2]->add_sprite({ "commonmenu", "shop_garage_icon" }).add_sprite_scale({ 0.02112f * 0.8f, 0.03744f * 0.8f }); + } + + return; + } + + // Tire Smoke + if (m_vars.m_type == 3) { + std::vector> temp_options; + + int selected_index = 99; + bool toggled = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_TIRESMOKE); + color_rgba current_color; + native::get_vehicle_tyre_smoke_color(menu::player::get_local_player().m_vehicle, ¤t_color.r, ¤t_color.g, ¤t_color.b); + + for (int i = 0; i < NUMOF(tire_smoke); i++) { + auto Smoke = tire_smoke[i]; + temp_options.push_back(add_option(radio_option(Smoke.m_name.get()) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::wheels::tires::vars::m_vars.m_tire_smoke = true; + vehicle::customs::wheels::tires::vars::m_vars.m_tire_smoke_color = Smoke.m_result; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TIRESMOKE, true); + native::set_vehicle_tyre_smoke_color(menu::player::get_local_player().m_vehicle, Smoke.m_result.r, Smoke.m_result.g, Smoke.m_result.b); + }))); + + if (toggled) { + if (Smoke.m_result.r == current_color.r + && Smoke.m_result.g == current_color.g + && Smoke.m_result.b == current_color.b) { + selected_index = i; + } + } + } + + if (selected_index != 0) { + if (selected_index != 99) { + temp_options[selected_index]->update_selected(); + menu::base::set_current_option(selected_index); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } +} + +void vehicle_customs_wheels_tires_edit_menu::feature_update() {} + +vehicle_customs_wheels_tires_edit_menu* g_instance; +vehicle_customs_wheels_tires_edit_menu* vehicle_customs_wheels_tires_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_wheels_tires_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires_edit.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires_edit.h new file mode 100644 index 0000000..014a72c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_tires_edit.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_wheels_tires_edit_menu : public menu::submenu::submenu { +public: + static vehicle_customs_wheels_tires_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_wheels_tires_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::wheels::tires::edit::vars { + struct variables { + int m_type; + radio_context m_context = { "commonmenu", "shop_garage_icon" }; + + std::vector> m_enhancements; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type.cpp new file mode 100644 index 0000000..a731c20 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type.cpp @@ -0,0 +1,212 @@ +#include "vehicle_customs_wheels_type.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_customs_wheels.h" +#include "../../vehicle_customs.h" +#include "vehicle_customs_wheels_type_edit.h" + +using namespace vehicle::customs::wheels::type::vars; + +namespace vehicle::customs::wheels::type::vars { + variables m_vars; +} + +void vehicle_customs_wheels_type_menu::load() { + set_name("Wheel Type"); + set_parent(); + + add_string("Front Wheel"); + add_string("Rear Wheel"); + add_string("High End"); + add_string("Lowrider"); + add_string("Muscle"); + add_string("Offroad"); + add_string("Sport"); + add_string("SUV"); + add_string("Tuner"); + add_string("Benny's Original"); + add_string("Benny's Bespoke"); + add_string("Open Wheel"); + add_string("Street"); + add_string("Track"); + + vehicle_customs_wheels_type_edit_menu::get(); +} + +void vehicle_customs_wheels_type_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); + if (menu::base::get_scroll_offset() < menu::submenu::handler::get_total_options() - menu::base::get_max_options() && menu::base::get_current_option() - menu::base::get_scroll_offset() >= menu::base::get_max_options()) menu::base::set_scroll_offset(menu::base::get_scroll_offset() + 1); +} + +void vehicle_customs_wheels_type_menu::update_once() { + clear_options(0); + + if (m_vars.m_update_cache) { + m_vars.m_update_cache = false; + + if (menu::player::get_local_player().m_in_vehicle) { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, m_vars.m_cached_wheel_type); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, m_vars.m_mod_type, m_vars.m_cached_wheel_index, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, m_vars.m_mod_type)); + } + } + + if (native::is_this_model_a_bike(native::get_entity_model(menu::player::get_local_player().m_vehicle))) { + add_option(submenu_option(get_string("Front Wheel")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Front Wheel"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 1; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Rear Wheel")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Rear Wheel"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 2; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_BACKWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_BACKWHEELS; + })); + } else { + add_option(submenu_option(get_string("High End")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("High End"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 3; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Lowrider")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Lowrider"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 4; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Muscle")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Muscle"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 5; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Offroad")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Offroad"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 6; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Sport")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Sport"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 7; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("SUV")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("SUV"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 8; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Tuner")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Tuner"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 9; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Benny's Original")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Benny's Original"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 10; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Benny's Bespoke")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Benny's Bespoke"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 11; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Open Wheel")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Open Wheel"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 12; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Street")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Street"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 13; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + + add_option(submenu_option(get_string("Track")) + .add_submenu() + .add_click([this] { + vehicle_customs_wheels_type_edit_menu::get()->set_name(get_string("Track"), false, false); + vehicle::customs::wheels::type::edit::vars::m_vars.m_wheel_type = 14; + m_vars.m_cached_wheel_index = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + m_vars.m_cached_wheel_type = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + m_vars.m_mod_type = MOD_FRONTWHEELS; + })); + } +} + +void vehicle_customs_wheels_type_menu::feature_update() {} + +vehicle_customs_wheels_type_menu* g_instance; +vehicle_customs_wheels_type_menu* vehicle_customs_wheels_type_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_wheels_type_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type.h new file mode 100644 index 0000000..5eec2ab --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_wheels_type_menu : public menu::submenu::submenu { +public: + static vehicle_customs_wheels_type_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_wheels_type_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::wheels::type::vars { + struct variables { + bool m_update_cache; + int m_cached_wheel_type; + int m_cached_wheel_index; + eVehicleModTypes m_mod_type; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type_edit.cpp b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type_edit.cpp new file mode 100644 index 0000000..1a29f16 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type_edit.cpp @@ -0,0 +1,751 @@ +#include "vehicle_customs_wheels_type_edit.h" +#include "menu/base/submenu_handler.h" +#include "vehicle_customs_wheels_type.h" +#include "../../vehicle_customs.h" + +using namespace vehicle::customs::wheels::type::edit::vars; + +namespace vehicle::customs::wheels::type::edit::vars { + variables m_vars; +} + +void vehicle_customs_wheels_type_edit_menu::load() { + set_name("Wheel Type"); + set_parent(); + + add_string("Stock Wheels"); + + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_bike) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_high_end) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_lowrider) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_muscle) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_offroad) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_sport) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_suv) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_tuner) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_bennys) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_bespoke) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_open) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_street) add_string(native::get_label_text(wheel.first)); + for (auto& wheel : vehicle::customs::vars::m_vars.m_wheel_track) add_string(native::get_label_text(wheel.first)); +} + +void vehicle_customs_wheels_type_edit_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + vehicle::customs::vars::scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); + if (menu::base::get_scroll_offset() < menu::submenu::handler::get_total_options() - menu::base::get_max_options() && menu::base::get_current_option() - menu::base::get_scroll_offset() >= menu::base::get_max_options()) menu::base::set_scroll_offset(menu::base::get_scroll_offset() + 1); +} + +void vehicle_customs_wheels_type_edit_menu::update_once() { + clear_options(0); + + vehicle::customs::wheels::type::vars::m_vars.m_update_cache = true; + m_vars.m_context.reset(); + m_vars.m_context.m_selected = 0; + + /* Bike Wheels */ + if (m_vars.m_wheel_type == 1 || m_vars.m_wheel_type == 2) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 6; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 6); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, m_vars.m_wheel_type == 1 ? MOD_FRONTWHEELS : MOD_BACKWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, m_vars.m_wheel_type == 1 ? MOD_FRONTWHEELS : MOD_BACKWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, m_vars.m_wheel_type == 1 ? MOD_FRONTWHEELS : MOD_BACKWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_bike) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 6; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 6); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, m_vars.m_wheel_type == 1 ? MOD_FRONTWHEELS : MOD_BACKWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, m_vars.m_wheel_type == 1 ? MOD_FRONTWHEELS : MOD_BACKWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 6) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Highend */ + if (m_vars.m_wheel_type == 3) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 7; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 7); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_high_end) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 7; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 7); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 7) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Lowrider */ + if (m_vars.m_wheel_type == 4) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 2; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 2); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_lowrider) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 2; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 2); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 2) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Muscle */ + if (m_vars.m_wheel_type == 5) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 1; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 1); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_muscle) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 1; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 1); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 1) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Offroad */ + if (m_vars.m_wheel_type == 6) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 4; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 4); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_offroad) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 4; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 4); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 4) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Sport */ + if (m_vars.m_wheel_type == 7) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 0; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_sport) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 0; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 0) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* SUV */ + if (m_vars.m_wheel_type == 8) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 3; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 3); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_suv) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 3; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 3); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 3) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Tuner */ + if (m_vars.m_wheel_type == 9) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 5; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 5); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_tuner) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 5; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 5); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 5) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Benny's */ + if (m_vars.m_wheel_type == 10) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 8; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 8); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_bennys) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 8; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 8); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 8) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Bespoke */ + if (m_vars.m_wheel_type == 11) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 9; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 9); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_bespoke) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 9; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 9); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 9) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Open Wheel */ + if (m_vars.m_wheel_type == 12) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 10; + }) + .add_hover([] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 10); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_open) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 10; + }) + .add_hover([=] { + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 10); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 10) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Street */ + if (m_vars.m_wheel_type == 13) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 11; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 11); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_street) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 11; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 11); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 11) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } + + /* Track */ + if (m_vars.m_wheel_type == 14) { + std::vector> temp_options; + + temp_options.push_back(add_option(radio_option(get_string("Stock Wheels")) + .add_radio(m_vars.m_context) + .add_click([] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = -1; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 12; + }) + .add_hover([] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 12); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, -1, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + int selected_index = 99; + int current_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); + + for (auto& Wheel : vehicle::customs::vars::m_vars.m_wheel_street) { + temp_options.push_back(add_option(radio_option(get_string(native::get_label_text(Wheel.first))) + .add_radio(m_vars.m_context) + .add_click([=] { + vehicle::customs::vars::update_caches(); + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_index = Wheel.second; + vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type = 12; + }) + .add_hover([=] { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 12); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, Wheel.second, native::get_vehicle_mod_variation(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS)); + }))); + + if (Wheel.second == current_mod) { + selected_index = Wheel.second; + } + } + + if (current_mod != -1 && vehicle::customs::wheels::type::vars::m_vars.m_cached_wheel_type == 12) { + if (selected_index != 99) { + temp_options[selected_index + 1]->update_selected(); + menu::base::set_current_option(selected_index + 1); + } else { + m_vars.m_context.m_toggles[m_vars.m_context.m_selected] = false; + m_vars.m_context.m_selected = 99; + m_vars.m_context.m_toggles[99] = true; + } + } + + return; + } +} + +void vehicle_customs_wheels_type_edit_menu::feature_update() {} + +vehicle_customs_wheels_type_edit_menu* g_instance; +vehicle_customs_wheels_type_edit_menu* vehicle_customs_wheels_type_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_wheels_type_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type_edit.h b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type_edit.h new file mode 100644 index 0000000..93d1f16 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/customs/wheels/vehicle_customs_wheels_type_edit.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_wheels_type_edit_menu : public menu::submenu::submenu { +public: + static vehicle_customs_wheels_type_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_wheels_type_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::wheels::type::edit::vars { + struct variables { + int m_wheel_type; + radio_context m_context = { "commonmenu", "shop_garage_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_attr.cpp b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_attr.cpp new file mode 100644 index 0000000..2fd5987 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_attr.cpp @@ -0,0 +1,540 @@ +#include "vehicle_modifiers_handling_attr.h" +#include "menu/base/submenu_handler.h" +#include "vehicle_modifiers_handling_main.h" + +using namespace vehicle::modifiers::handling::attr::vars; + +namespace vehicle::modifiers::handling::attr::vars { + variables m_vars; + + scroll_struct drive_bias[] = { + { localization("RWD", true), 0.f }, + { localization("4WD", true), 0.5f }, + { localization("FWD", true), 1.f } + }; + + rage::types::handling_data* get_data() { + static rage::types::handling_data hd; + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data) { + return global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data; + } + } + } + } + + return &hd; + } + + void reset() { + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + + switch (m_vars.m_type) { + case 0: /* Physical */ + if (m_vars.m_physical_restore.find(model) != m_vars.m_physical_restore.end()) { + auto& backup = m_vars.m_physical_restore[model]; + get_data()->m_mass = backup.m_mass; + get_data()->m_downforce_modifier = backup.m_downforce_modifier; + get_data()->m_percent_submerged = backup.m_percent_submerged; + get_data()->m_vec_centre_of_mass_offset = backup.m_vec_centre_of_mass_offset; + get_data()->m_vec_inertia_multiplier = backup.m_vec_inertia_multiplier; + } + break; + + case 1: /* Transmission */ + if (m_vars.m_transmission_restore.find(model) != m_vars.m_transmission_restore.end()) { + auto& backup = m_vars.m_transmission_restore[model]; + get_data()->m_drive_bias_front = backup.m_drive_bias_front; + get_data()->m_initial_drive_gears = backup.m_initial_drive_gears; + get_data()->m_initial_drive_force = backup.m_initial_drive_force; + get_data()->m_drive_inertia = backup.m_drive_inertia; + get_data()->m_initial_drive_max_flat_vel = backup.m_initial_drive_max_flat_vel; + get_data()->m_clutch_change_rate_scale_up_shift = backup.m_clutch_change_rate_scale_up_shift; + get_data()->m_clutch_change_rate_scale_down_shift = backup.m_clutch_change_rate_scale_down_shift; + get_data()->m_brake_force = backup.m_brake_force; + get_data()->m_hand_brake_force = backup.m_hand_brake_force; + get_data()->m_steering_lock = backup.m_steering_lock; + + if (get_data()->m_drive_bias_front == 0.0f) + m_vars.m_drive_bias_front = 0; + else if (get_data()->m_drive_bias_front == 0.5f) + m_vars.m_drive_bias_front = 1; + else if (get_data()->m_drive_bias_front == 1.0f) + m_vars.m_drive_bias_front = 2; + } + break; + + case 2: /* Wheel Traction */ + if (m_vars.m_wheel_traction_restore.find(model) != m_vars.m_wheel_traction_restore.end()) { + auto& backup = m_vars.m_wheel_traction_restore[model]; + get_data()->m_traction_curve_max = backup.m_traction_curve_max; + get_data()->m_traction_spring_delta_max = backup.m_traction_spring_delta_max; + get_data()->m_low_speed_traction_loss_mult = backup.m_low_speed_traction_loss_mult; + get_data()->m_camber_stiffness = backup.m_camber_stiffness; + get_data()->m_traction_loss_mult = backup.m_traction_loss_mult; + } + break; + + case 3: /* Suspension */ + if (m_vars.m_suspension_restore.find(model) != m_vars.m_suspension_restore.end()) { + auto& backup = m_vars.m_suspension_restore[model]; + get_data()->m_suspension_force = backup.m_suspension_force; + get_data()->m_suspension_comp_damp = backup.m_suspension_comp_damp; + get_data()->m_suspension_rebound_damp = backup.m_suspension_rebound_damp; + get_data()->m_suspension_upper_limit = backup.m_suspension_upper_limit; + get_data()->m_suspension_lower_limit = backup.m_suspension_lower_limit; + get_data()->m_anti_roll_bar_force = backup.m_anti_roll_bar_force; + get_data()->m_roll_centre_height_front = backup.m_roll_centre_height_front; + get_data()->m_roll_centre_height_rear = backup.m_roll_centre_height_rear; + } + break; + + case 4: /* Damage */ + if (m_vars.m_damage_restore.find(model) != m_vars.m_damage_restore.end()) { + auto& backup = m_vars.m_damage_restore[model]; + get_data()->m_collision_damage_mult = backup.m_collision_damage_mult; + get_data()->m_weapon_damage_mult = backup.m_weapon_damage_mult; + get_data()->m_deformation_damage_mult = backup.m_deformation_damage_mult; + get_data()->m_engine_damage_mult = backup.m_engine_damage_mult; + get_data()->m_petrol_tank_volume = backup.m_petrol_tank_volume; + } + break; + + case 5: /* Misc */ + if (m_vars.m_misc_restore.find(model) != m_vars.m_misc_restore.end()) { + auto& backup = m_vars.m_misc_restore[model]; + get_data()->m_oil_volume = backup.m_oil_volume; + get_data()->m_seat_offset = backup.m_seat_offset; + get_data()->m_monetary_value = backup.m_monetary_value; + } + break; + } + } + + void cache_physical(uint32_t model) { + if (m_vars.m_physical_restore.find(model) == m_vars.m_physical_restore.end()) { + m_vars.m_physical_restore[model] = { + get_data()->m_mass, + get_data()->m_downforce_modifier, + get_data()->m_percent_submerged, + get_data()->m_vec_centre_of_mass_offset, + get_data()->m_vec_inertia_multiplier + }; + } + } + + void cache_transmission(uint32_t model) { + if (m_vars.m_transmission_restore.find(model) == m_vars.m_transmission_restore.end()) { + m_vars.m_transmission_restore[model] = { + get_data()->m_drive_bias_front, + get_data()->m_initial_drive_gears, + get_data()->m_initial_drive_force, + get_data()->m_drive_inertia, + get_data()->m_initial_drive_max_flat_vel, + get_data()->m_clutch_change_rate_scale_up_shift, + get_data()->m_clutch_change_rate_scale_down_shift, + get_data()->m_brake_force, + get_data()->m_hand_brake_force, + get_data()->m_steering_lock + }; + } + } + + void cache_wheel_traction(uint32_t model) { + if (m_vars.m_wheel_traction_restore.find(model) == m_vars.m_wheel_traction_restore.end()) { + m_vars.m_wheel_traction_restore[model] = { + get_data()->m_traction_curve_max, + get_data()->m_traction_spring_delta_max, + get_data()->m_low_speed_traction_loss_mult, + get_data()->m_camber_stiffness, + get_data()->m_traction_loss_mult + }; + } + } + + void cache_suspension(uint32_t model) { + if (m_vars.m_suspension_restore.find(model) == m_vars.m_suspension_restore.end()) { + m_vars.m_suspension_restore[model] = { + get_data()->m_suspension_force, + get_data()->m_suspension_comp_damp, + get_data()->m_suspension_rebound_damp, + get_data()->m_suspension_upper_limit, + get_data()->m_suspension_lower_limit, + get_data()->m_anti_roll_bar_force, + get_data()->m_roll_centre_height_front, + get_data()->m_roll_centre_height_rear + }; + } + } + + void cache_damage(uint32_t model) { + if (m_vars.m_damage_restore.find(model) == m_vars.m_damage_restore.end()) { + m_vars.m_damage_restore[model] = { + get_data()->m_collision_damage_mult, + get_data()->m_weapon_damage_mult, + get_data()->m_deformation_damage_mult, + get_data()->m_engine_damage_mult, + get_data()->m_petrol_tank_volume, + get_data()->m_oil_volume + }; + } + } + + void cache_misc(uint32_t model) { + if (m_vars.m_misc_restore.find(model) == m_vars.m_misc_restore.end()) { + m_vars.m_misc_restore[model] = { + get_data()->m_oil_volume, + get_data()->m_seat_offset, + get_data()->m_monetary_value + }; + } + } +} + +void vehicle_modifiers_handling_attr_menu::load() { + set_name("Handling Attributes"); + set_parent(); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click(reset)); + + add_string("Mass"); + add_string("Downforce Modifier"); + add_string("Percent Submerged"); + add_string("Center of Mass - Horizontal (X"); + add_string("Center of Mass - Vertical (Y)"); + add_string("Center of Mass - Height (Z)"); + add_string("Inertia Multiplier - Horizontal (X)"); + add_string("Inertia Multiplier - Vertical (Y)"); + add_string("Inertia Multiplier - Height (Z)"); + + add_string("Drive Type"); + add_string("Drive Gears"); + add_string("Drive Force"); + add_string("Drive Inertia"); + add_string("Drive Max Flat Velocity"); + add_string("Clutch Shift Up Multiplier"); + add_string("Clutch Shift Down Multiplier"); + add_string("Brake Force"); + add_string("Handbrake Force"); + add_string("Steering Lock"); + + add_string("Traction Curve Max"); + add_string("Traction Spring Delta Max"); + add_string("Low Speed Traction Loss Multiplier"); + add_string("Camber Stiffnesss"); + add_string("Traction Loss Multiplier"); + + add_string("Suspension Force"); + add_string("Suspension Compression Damping"); + add_string("Suspension Rebound Damping"); + add_string("Suspension Upper Limit"); + add_string("Suspension Lower Limit"); + add_string("Suspension Anti Rollbar force"); + add_string("Roll Centre Height Front"); + add_string("Roll Centre Height Rear"); + + add_string("Collision Damage Multiplier"); + add_string("Weapon Damage Multiplier"); + add_string("Deformation Damage Multiplier"); + add_string("Engine Damage Multiplier"); + add_string("Petrol Tank Volume"); + + add_string("Oil Volume"); + add_string("Seat Offset - Horizontal (X)"); + add_string("Seat Offset - Vertical (Y)"); + add_string("Seat Offset - Height (Z)"); + add_string("Monetary Value"); +} + +void vehicle_modifiers_handling_attr_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(true); + return; + } +} + +void vehicle_modifiers_handling_attr_menu::update_once() { + clear_options(1); + + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + + /* Physical */ + if (m_vars.m_type == 0) { + cache_physical(model); + + add_option(number_option(SCROLL, get_string("Mass")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_mass, "%.0f", 1.f); }) + .add_min(0.0f).add_max(10000.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Downforce Modifier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_downforce_modifier, "%.0f", 1.f); }) + .add_min(0.0f).add_max(10000.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Percent Submerged")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_percent_submerged, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Center of Mass - Horizontal (X)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_centre_of_mass_offset.x, "%.2f", 0.01f); }) + .add_min(-5.f).add_max(5.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Center of Mass - Vertical (Y)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_centre_of_mass_offset.y, "%.2f", 0.01f); }) + .add_min(-5.f).add_max(5.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Center of Mass - Height (Z)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_centre_of_mass_offset.z, "%.2f", 0.01f); }) + .add_min(-5.f).add_max(5.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Inertia Multiplier - Horizontal (X)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_inertia_multiplier.x, "%.2f", 0.01f); }) + .add_min(-5.f).add_max(5.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Inertia Multiplier - Vertical (Y)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_inertia_multiplier.y, "%.2f", 0.01f); }) + .add_min(-5.f).add_max(5.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Inertia Multiplier - Height (Z)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_inertia_multiplier.z, "%.2f", 0.01f); }) + .add_min(-5.f).add_max(5.f).set_scroll_speed(10).show_max()); + + return; + } + + /* Transmission */ + if (m_vars.m_type == 1) { + cache_transmission(model); + + if (get_data()->m_drive_bias_front == 0.0f) + m_vars.m_drive_bias_front = 0; + else if (get_data()->m_drive_bias_front == 0.5f) + m_vars.m_drive_bias_front = 1; + else if (get_data()->m_drive_bias_front == 1.0f) + m_vars.m_drive_bias_front = 2; + + add_option(scroll_option(SCROLL, get_string("Drive Type")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_scroll(m_vars.m_drive_bias_front, 0, NUMOF(drive_bias), drive_bias) + .add_update([](scroll_option* option, int pos) { get_data()->m_drive_bias_front = drive_bias[m_vars.m_drive_bias_front].m_result; })); + + add_option(number_option(SCROLL, get_string("Drive Gears")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_initial_drive_gears, "%i", 1); }) + .add_min(1).add_max(16).show_max()); + + add_option(number_option(SCROLL, get_string("Drive Force")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_initial_drive_force, "%.2f", 0.01f); }) + .add_min(0.0f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Drive Inertia")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_drive_inertia, "%.2f", 0.01f); }) + .add_min(0.0f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Drive Max Flat Velocity")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_initial_drive_max_flat_vel, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(500.f).show_max().set_scroll_speed(10)); + + add_option(number_option(SCROLL, get_string("Clutch Shift Up Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_clutch_change_rate_scale_up_shift, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(100.f).show_max().set_scroll_speed(10)); + + add_option(number_option(SCROLL, get_string("Clutch Shift Down Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_clutch_change_rate_scale_down_shift, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(100.f).show_max().set_scroll_speed(10)); + + add_option(number_option(SCROLL, get_string("Brake Force")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_brake_force, "%.1f", 0.1f); }) + .add_min(0.f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Handbrake Force")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_hand_brake_force, "%.1f", 0.1f); }) + .add_min(0.f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Steering Lock")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_steering_lock, "%.1f", 0.1f); }) + .add_min(0.f).add_max(100.f).show_max()); + + return; + } + + /* Wheel Traction */ + if (m_vars.m_type == 2) { + cache_wheel_traction(model); + + add_option(number_option(SCROLL, get_string("Traction Curve Max")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_traction_curve_max, "%.1f", 0.1f); }) + .add_min(0.f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Traction Spring Delta Max")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_traction_spring_delta_max, "%.1f", 0.1f); }) + .add_min(0.f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Low Speed Traction Loss Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_low_speed_traction_loss_mult, "%.1f", 0.1f); }) + .add_min(0.f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Camber Stiffnesss")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_camber_stiffness, "%.1f", 0.1f); }) + .add_min(0.f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Traction Loss Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_traction_loss_mult, "%.1f", 0.1f); }) + .add_min(0.f).add_max(100.f).show_max()); + + return; + } + + /* Suspension */ + if (m_vars.m_type == 3) { + cache_suspension(model); + + add_option(number_option(SCROLL, get_string("Suspension Force")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_suspension_force, "%.1f", 0.1f); }) + .add_min(0.1f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Suspension Compression Damping")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_suspension_comp_damp, "%.1f", 0.1f); }) + .add_min(0.1f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Suspension Rebound Damping")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_suspension_rebound_damp, "%.1f", 0.1f); }) + .add_min(0.1f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Suspension Upper Limit")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_suspension_upper_limit, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Suspension Lower Limit")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_suspension_lower_limit, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Suspension Anti Rollbar force")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_anti_roll_bar_force, "%.1f", 0.1f); }) + .add_min(0.1f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Roll Centre Height Front")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_roll_centre_height_front, "%.1f", 0.1f); }) + .add_min(0.1f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Roll Centre Height Rear")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_roll_centre_height_rear, "%.1f", 0.1f); }) + .add_min(0.1f).add_max(100.f).show_max()); + + return; + } + + /* Damage */ + if (m_vars.m_type == 4) { + cache_damage(model); + + add_option(number_option(SCROLL, get_string("Collision Damage Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_collision_damage_mult, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Weapon Damage Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_weapon_damage_mult, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Deformation Damage Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_deformation_damage_mult, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Engine Damage Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_engine_damage_mult, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Petrol Tank Volume")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_petrol_tank_volume, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(100.f).show_max()); + + return; + } + + /* Misc */ + if (m_vars.m_type == 5) { + cache_misc(model); + + add_option(number_option(SCROLL, get_string("Oil Volume")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_oil_volume, "%.1f", 0.1f); }) + .add_min(0.0f).add_max(100.f).show_max()); + + add_option(number_option(SCROLL, get_string("Seat Offset - Horizontal (X)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_seat_offset.x, "%.2f", 0.01f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Seat Offset - Vertical (Y)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_seat_offset.y, "%.2f", 0.01f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Seat Offset - Height (Z)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_seat_offset.z, "%.2f", 0.01f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Monetary Value")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_monetary_value, "%i", 1000); }) + .add_min(0).add_max(100000000).set_scroll_speed(0)); + + return; + } +} + +void vehicle_modifiers_handling_attr_menu::feature_update() {} + +vehicle_modifiers_handling_attr_menu* g_instance; +vehicle_modifiers_handling_attr_menu* vehicle_modifiers_handling_attr_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_modifiers_handling_attr_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_attr.h b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_attr.h new file mode 100644 index 0000000..a90fe17 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_attr.h @@ -0,0 +1,92 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_modifiers_handling_attr_menu : public menu::submenu::submenu { +public: + static vehicle_modifiers_handling_attr_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_modifiers_handling_attr_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::modifiers::handling::attr::vars { + struct physical_restore { + float m_mass; + float m_downforce_modifier; + float m_percent_submerged; + math::vector3_ m_vec_centre_of_mass_offset; + math::vector3_ m_vec_inertia_multiplier; + }; + + struct transmission_restore { + float m_drive_bias_front; + uint8_t m_initial_drive_gears; + float m_initial_drive_force; + float m_drive_inertia; + float m_initial_drive_max_flat_vel; + float m_clutch_change_rate_scale_up_shift; + float m_clutch_change_rate_scale_down_shift; + float m_brake_force; + float m_hand_brake_force; + float m_steering_lock; + }; + + struct wheel_traction_restore { + float m_traction_curve_max; + float m_traction_spring_delta_max; + float m_low_speed_traction_loss_mult; + float m_camber_stiffness; + float m_traction_loss_mult; + }; + + struct suspension_restore { + float m_suspension_force; + float m_suspension_comp_damp; + float m_suspension_rebound_damp; + float m_suspension_upper_limit; + float m_suspension_lower_limit; + float m_anti_roll_bar_force; + float m_roll_centre_height_front; + float m_roll_centre_height_rear; + }; + + struct damage_restore { + float m_collision_damage_mult; + float m_weapon_damage_mult; + float m_deformation_damage_mult; + float m_engine_damage_mult; + float m_petrol_tank_volume; + float m_oil_volume; + }; + + struct misc_restore { + float m_oil_volume; + math::vector3_ m_seat_offset; + int m_monetary_value; + }; + + struct variables { + int m_type; + int m_drive_bias_front; + + std::unordered_map m_physical_restore; + std::unordered_map m_transmission_restore; + std::unordered_map m_wheel_traction_restore; + std::unordered_map m_suspension_restore; + std::unordered_map m_damage_restore; + std::unordered_map m_misc_restore; + }; + + void cache_physical(uint32_t model); + void cache_transmission(uint32_t model); + void cache_wheel_traction(uint32_t model); + void cache_suspension(uint32_t model); + void cache_damage(uint32_t model); + void cache_misc(uint32_t model); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_bike.cpp b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_bike.cpp new file mode 100644 index 0000000..4334a00 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_bike.cpp @@ -0,0 +1,297 @@ +#include "vehicle_modifiers_handling_bike.h" +#include "menu/base/submenu_handler.h" +#include "vehicle_modifiers_handling_main.h" + +using namespace vehicle::modifiers::handling::bike::vars; + +namespace vehicle::modifiers::handling::bike::vars { + variables m_vars; + + rage::types::bike_handling_data* get_data() { + static rage::types::bike_handling_data hd; + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data) { + return &global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data->m_bike_handling_data; + } + } + } + } + } + } + + return &hd; + } + + void reset() { + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + + switch (m_vars.m_type) { + case 0: /* Physical */ + if (m_vars.m_physical_restore.find(model) != m_vars.m_physical_restore.end()) { + auto& backup = m_vars.m_physical_restore[model]; + get_data()->m_lean_fwd_com_mult = backup.m_lean_fwd_com_mult; + get_data()->m_lean_fwd_force_mult = backup.m_lean_fwd_force_mult; + get_data()->m_lean_bak_com_mult = backup.m_lean_bak_com_mult; + get_data()->m_lean_bak_force_mult = backup.m_lean_bak_force_mult; + get_data()->m_max_bank_angle = backup.m_max_bank_angle; + get_data()->m_full_anim_angle = backup.m_full_anim_angle; + get_data()->m_des_lean_return_frac = backup.m_des_lean_return_frac; + get_data()->m_stick_lean_mult = backup.m_stick_lean_mult; + get_data()->m_braking_stability_mult = backup.m_braking_stability_mult; + get_data()->m_in_air_steer_mult = backup.m_in_air_steer_mult; + get_data()->m_jump_force = backup.m_jump_force; + } + + break; + + case 1: /* Balance */ + if (m_vars.m_balance_restore.find(model) != m_vars.m_balance_restore.end()) { + auto& backup = m_vars.m_balance_restore[model]; + get_data()->m_bike_on_stand_steer_angle = backup.m_bike_on_stand_steer_angle; + get_data()->m_bike_on_stand_lean_angle = backup.m_bike_on_stand_lean_angle; + get_data()->m_front_balance_mult = backup.m_front_balance_mult; + get_data()->m_rear_balance_mult = backup.m_rear_balance_mult; + get_data()->m_wheelie_balance_point = backup.m_wheelie_balance_point; + get_data()->m_stoppie_balance_point = backup.m_stoppie_balance_point; + get_data()->m_wheelie_steer_mult = backup.m_wheelie_steer_mult; + } + break; + + case 2: /* Friction */ + if (m_vars.m_friction_restore.find(model) != m_vars.m_friction_restore.end()) { + auto& backup = m_vars.m_friction_restore[model]; + get_data()->m_bike_ground_side_friction_mult = backup.m_bike_ground_side_friction_mult; + get_data()->m_bike_wheel_ground_side_friction_mult = backup.m_bike_wheel_ground_side_friction_mult; + } + break; + } + } + + void cache_physical(uint32_t model) { + if (m_vars.m_physical_restore.find(model) == m_vars.m_physical_restore.end()) { + m_vars.m_physical_restore[model] = { + get_data()->m_lean_fwd_com_mult, + get_data()->m_lean_fwd_force_mult, + get_data()->m_lean_bak_com_mult, + get_data()->m_lean_bak_force_mult, + get_data()->m_max_bank_angle, + get_data()->m_full_anim_angle, + get_data()->m_des_lean_return_frac, + get_data()->m_stick_lean_mult, + get_data()->m_braking_stability_mult, + get_data()->m_in_air_steer_mult, + get_data()->m_jump_force, + }; + } + } + + void cache_balance(uint32_t model) { + if (m_vars.m_balance_restore.find(model) == m_vars.m_balance_restore.end()) { + m_vars.m_balance_restore[model] = { + get_data()->m_bike_on_stand_steer_angle, + get_data()->m_bike_on_stand_lean_angle, + get_data()->m_front_balance_mult, + get_data()->m_rear_balance_mult, + get_data()->m_wheelie_balance_point, + get_data()->m_stoppie_balance_point, + get_data()->m_wheelie_steer_mult + }; + } + } + + void cache_friction(uint32_t model) { + if (m_vars.m_friction_restore.find(model) == m_vars.m_friction_restore.end()) { + m_vars.m_friction_restore[model] = { + get_data()->m_bike_ground_side_friction_mult, + get_data()->m_bike_wheel_ground_side_friction_mult + }; + } + } +} + +void vehicle_modifiers_handling_bike_menu::load() { + set_name("Bike Handling"); + set_parent(); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click(reset)); + + add_string("Lean Forward COM Multiplier"); + add_string("Lean Forward Force Multiplier"); + add_string("Lean Backward COM Multiplier"); + add_string("Lean Backward Force Multiplier"); + add_string("Max Bank Angle"); + add_string("Full Animation Angle"); + add_string("Lean Return Fraction"); + add_string("Stick Lean Multiplier"); + add_string("Braking Stability Multiplier"); + add_string("In Air Steer Multiplier"); + add_string("Jump Force"); + + add_string("On Stand Steer Angle"); + add_string("On Stand Lean Angle"); + add_string("Front Balance Multiplier"); + add_string("Rear Balance Multiplier"); + add_string("Wheelie Balance Point"); + add_string("Stoppie Balance Point"); + add_string("Wheelie Steer Multiplier"); + + add_string("Ground Side Friction Multiplier"); + add_string("Wheel Ground Side Friction Multiplier"); +} + +void vehicle_modifiers_handling_bike_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(true); + return; + } + + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + if (!(native::is_this_model_a_bicycle(model) || native::is_this_model_a_bike(model))) { + menu::submenu::handler::set_submenu_previous(true); + return; + } +} + +void vehicle_modifiers_handling_bike_menu::update_once() { + clear_options(1); + + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + + /* Physical */ + if (m_vars.m_type == 0) { + cache_physical(model); + + add_option(number_option(SCROLL, get_string("Lean Forward COM Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_lean_fwd_com_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Lean Forward Force Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_lean_fwd_force_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Lean Backward COM Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_lean_bak_com_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Lean Backward Force Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_lean_bak_force_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Max Bank Angle")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_max_bank_angle, "%.2f", 0.01f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Full Animation Angle")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_full_anim_angle, "%.2f", 0.01f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Lean Return Fraction")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_des_lean_return_frac, "%.2f", 0.01f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Stick Lean Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_stick_lean_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Braking Stability Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_braking_stability_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("In Air Steer Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_in_air_steer_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Jump Force")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_jump_force, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + } + + /* Balance */ + if (m_vars.m_type == 1) { + cache_balance(model); + + add_option(number_option(SCROLL, get_string("On Stand Steer Angle")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_bike_on_stand_steer_angle, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("On Stand Lean Angle")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_bike_on_stand_lean_angle, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Front Balance Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_front_balance_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Rear Balance Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_rear_balance_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Wheelie Balance Point")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_wheelie_balance_point, "%.1f", 0.1f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Stoppie Balance Point")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_stoppie_balance_point, "%.1f", 0.1f); }) + .add_min(-100.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Wheelie Steer Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_wheelie_steer_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + } + + /* Friction */ + if (m_vars.m_type == 2) { + cache_friction(model); + + add_option(number_option(SCROLL, get_string("Ground Side Friction Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_bike_ground_side_friction_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Wheel Ground Side Friction Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_bike_wheel_ground_side_friction_mult, "%.1f", 0.1f); }) + .add_min(-500.f).add_max(500.f).set_scroll_speed(10).show_max()); + } +} + +void vehicle_modifiers_handling_bike_menu::feature_update() {} + +vehicle_modifiers_handling_bike_menu* g_instance; +vehicle_modifiers_handling_bike_menu* vehicle_modifiers_handling_bike_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_modifiers_handling_bike_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_bike.h b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_bike.h new file mode 100644 index 0000000..ae38bea --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_bike.h @@ -0,0 +1,59 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_modifiers_handling_bike_menu : public menu::submenu::submenu { +public: + static vehicle_modifiers_handling_bike_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_modifiers_handling_bike_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::modifiers::handling::bike::vars { + struct PhysicalRestore { + float m_lean_fwd_com_mult; + float m_lean_fwd_force_mult; + float m_lean_bak_com_mult; + float m_lean_bak_force_mult; + float m_max_bank_angle; + float m_full_anim_angle; + float m_des_lean_return_frac; + float m_stick_lean_mult; + float m_braking_stability_mult; + float m_in_air_steer_mult; + float m_jump_force; + }; + + struct BalanceRestore { + float m_bike_on_stand_steer_angle; + float m_bike_on_stand_lean_angle; + float m_front_balance_mult; + float m_rear_balance_mult; + float m_wheelie_balance_point; + float m_stoppie_balance_point; + float m_wheelie_steer_mult; + }; + + struct FrictionRestore { + float m_bike_ground_side_friction_mult; + float m_bike_wheel_ground_side_friction_mult; + }; + + struct variables { + int m_type; + + std::unordered_map m_physical_restore; + std::unordered_map m_balance_restore; + std::unordered_map m_friction_restore; + }; + + void cache_physical(uint32_t model); + void cache_balance(uint32_t model); + void cache_friction(uint32_t model); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_boat.cpp b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_boat.cpp new file mode 100644 index 0000000..1c17c8f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_boat.cpp @@ -0,0 +1,406 @@ +#include "vehicle_modifiers_handling_boat.h" +#include "menu/base/submenu_handler.h" +#include "vehicle_modifiers_handling_main.h" + +using namespace vehicle::modifiers::handling::boat::vars; + +namespace vehicle::modifiers::handling::boat::vars { + variables m_vars; + + rage::types::boat_handling_data* get_data() { + static rage::types::boat_handling_data hd; + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data) { + return &global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data->m_boat_handling_data; + } + } + } + } + } + } + + return &hd; + } + + void reset() { + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + + switch (m_vars.m_type) { + case 0: /* Physical */ + if (m_vars.m_physical_restore.find(model) != m_vars.m_physical_restore.end()) { + auto& backup = m_vars.m_physical_restore[model]; + get_data()->m_box_front_mult = backup.m_box_front_mult; + get_data()->m_box_rear_mult = backup.m_box_rear_mult; + get_data()->m_box_side_mult = backup.m_box_side_mult; + get_data()->m_sample_top = backup.m_sample_top; + get_data()->m_sample_bottom = backup.m_sample_bottom; + } + break; + + case 1: /* Aquaplane */ + if (m_vars.m_aquaplane_restore.find(model) != m_vars.m_aquaplane_restore.end()) { + auto& backup = m_vars.m_aquaplane_restore[model]; + get_data()->m_aquaplane_force = backup.m_aquaplane_force; + get_data()->m_aquaplane_push_water_mult = backup.m_aquaplane_push_water_mult; + get_data()->m_aquaplane_push_water_cap = backup.m_aquaplane_push_water_cap; + get_data()->m_aquaplane_push_water_apply = backup.m_aquaplane_push_water_apply; + get_data()->m_keel_sphere_size = backup.m_keel_sphere_size; + get_data()->m_prop_radius = backup.m_prop_radius; + get_data()->m_impeller_offset = backup.m_impeller_offset; + get_data()->m_impeller_force_mult = backup.m_impeller_force_mult; + get_data()->m_prow_raise_mult = backup.m_prow_raise_mult; + } + break; + + case 2: /* Rudder */ + if (m_vars.m_rudder_restore.find(model) != m_vars.m_rudder_restore.end()) { + auto& backup = m_vars.m_rudder_restore[model]; + get_data()->m_rudder_force = backup.m_rudder_force; + get_data()->m_rudder_offset_submerge = backup.m_rudder_offset_submerge; + get_data()->m_rudder_offset_force = backup.m_rudder_offset_force; + get_data()->m_rudder_offset_force_z_mult = backup.m_rudder_offset_force_z_mult; + } + break; + + case 3: /* Resistance */ + if (m_vars.m_resistance_restore.find(model) != m_vars.m_resistance_restore.end()) { + auto& backup = m_vars.m_resistance_restore[model]; + get_data()->m_drag_coefficient = backup.m_drag_coefficient; + get_data()->m_vec_move_resistance = backup.m_vec_move_resistance; + get_data()->m_vec_turn_resistance = backup.m_vec_turn_resistance; + } + break; + + case 4: /* Misc */ + if (m_vars.m_misc_restore.find(model) != m_vars.m_misc_restore.end()) { + auto& backup = m_vars.m_misc_restore[model]; + get_data()->m_wave_audio_mult = backup.m_wave_audio_mult; + get_data()->m_look_lr_cam_height = backup.m_look_lr_cam_height; + get_data()->m_low_lod_ang_offset = backup.m_low_lod_ang_offset; + get_data()->m_low_lod_draught_offset = backup.m_low_lod_draught_offset; + get_data()->m_dinghy_sphere_buoy_const = backup.m_dinghy_sphere_buoy_const; + } + break; + } + } + + void cache_physical(uint32_t model) { + if (m_vars.m_physical_restore.find(model) == m_vars.m_physical_restore.end()) { + m_vars.m_physical_restore[model] = { + get_data()->m_box_front_mult, + get_data()->m_box_rear_mult, + get_data()->m_box_side_mult, + get_data()->m_sample_top, + get_data()->m_sample_bottom + }; + } + } + + void cache_aquaplane(uint32_t model) { + if (m_vars.m_aquaplane_restore.find(model) == m_vars.m_aquaplane_restore.end()) { + m_vars.m_aquaplane_restore[model] = { + get_data()->m_aquaplane_force, + get_data()->m_aquaplane_push_water_mult, + get_data()->m_aquaplane_push_water_cap, + get_data()->m_aquaplane_push_water_apply, + get_data()->m_keel_sphere_size, + get_data()->m_prop_radius, + get_data()->m_impeller_offset, + get_data()->m_impeller_force_mult, + get_data()->m_prow_raise_mult + }; + } + } + + void cache_rudder(uint32_t model) { + if (m_vars.m_rudder_restore.find(model) == m_vars.m_rudder_restore.end()) { + m_vars.m_rudder_restore[model] = { + get_data()->m_rudder_force, + get_data()->m_rudder_offset_submerge, + get_data()->m_rudder_offset_force, + get_data()->m_rudder_offset_force_z_mult + }; + } + } + + void cache_resistance(uint32_t model) { + if (m_vars.m_resistance_restore.find(model) == m_vars.m_resistance_restore.end()) { + m_vars.m_resistance_restore[model] = { + get_data()->m_drag_coefficient, + get_data()->m_vec_move_resistance, + get_data()->m_vec_turn_resistance + }; + } + } + + void cache_misc(uint32_t model) { + if (m_vars.m_misc_restore.find(model) == m_vars.m_misc_restore.end()) { + m_vars.m_misc_restore[model] = { + get_data()->m_wave_audio_mult, + get_data()->m_look_lr_cam_height, + get_data()->m_low_lod_ang_offset, + get_data()->m_low_lod_draught_offset, + get_data()->m_dinghy_sphere_buoy_const + }; + } + } +} + +void vehicle_modifiers_handling_boat_menu::load() { + set_name("Boat Handling"); + set_parent(); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click(reset)); + + add_string("Box Front Multiplier"); + add_string("Box Rear Multiplier"); + add_string("Box Side Multiplier"); + add_string("Sample Top"); + add_string("Sample Bottom"); + + add_string("Aquaplane Force"); + add_string("Aquaplane Push Water Multiplier"); + add_string("Aquaplane Push Water Cap"); + add_string("Aquaplane Push Water Apply"); + add_string("Keel Sphere Size"); + add_string("Propeller Radius"); + add_string("Impeller Offset"); + add_string("Impeller Force Multiplier"); + add_string("Prow Raise Multiplier"); + + add_string("Rudder Force"); + add_string("Rudder Offset Submerge"); + add_string("Rudder Offset Force"); + add_string("Rudder Offset Force Z Multiplier"); + + add_string("Drag Coefficient"); + add_string("Move Resistance - Horizontal (X)"); + add_string("Move Resistance - Vertical (Y)"); + add_string("Move Resistance - Height (Z)"); + add_string("Turn Resistance - Horizontal (X)"); + add_string("Turn Resistance - Vertical (Y)"); + add_string("Turn Resistance - Height (Z)"); + + add_string("Wave Audio Multiplier"); + add_string("Look L/R Cam Height"); + add_string("Low Lod Angular Offset"); + add_string("Low Lod Draught Offset"); + add_string("Dinghy Sphere Buoy Const"); +} + +void vehicle_modifiers_handling_boat_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(true); + return; + } + + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + if (!(native::is_this_model_a_boat(model) || native::is_this_model_an_emergency_boat(model))) { + menu::submenu::handler::set_submenu_previous(true); + return; + } +} + +void vehicle_modifiers_handling_boat_menu::update_once() { + clear_options(1); + + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + + /* Physical */ + if (m_vars.m_type == 0) { + cache_physical(model); + + add_option(number_option(SCROLL, get_string("Box Front Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_box_front_mult, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Box Rear Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_box_rear_mult, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Box Side Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_box_side_mult, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Sample Top")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_sample_top, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Sample Bottom")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_sample_bottom, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Aquaplane */ + if (m_vars.m_type == 1) { + cache_aquaplane(model); + + add_option(number_option(SCROLL, get_string("Aquaplane Force")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_aquaplane_force, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Aquaplane Push Water Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_aquaplane_push_water_mult, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Aquaplane Push Water Cap")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_aquaplane_push_water_cap, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Aquaplane Push Water Apply")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_aquaplane_push_water_apply, "%.3f", 0.3f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Keel Sphere Size")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_keel_sphere_size, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Propeller Radius")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_prop_radius, "%.1f", 0.1f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Impeller Offset")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_impeller_offset, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Impeller Force Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_impeller_force_mult, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Prow Raise Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_prow_raise_mult, "%.1f", 0.1f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Rudder */ + if (m_vars.m_type == 2) { + cache_rudder(model); + + add_option(number_option(SCROLL, get_string("Rudder Force")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_rudder_force, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Rudder Offset Submerge")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_rudder_offset_submerge, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Rudder Offset Force")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_rudder_offset_force, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Rudder Offset Force Z Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_rudder_offset_force_z_mult, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Resistance */ + if (m_vars.m_type == 3) { + cache_resistance(model); + + add_option(number_option(SCROLL, get_string("Drag Coefficient")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_drag_coefficient, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Move Resistance - Horizontal (X)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_move_resistance.x, "%.0f", 1.f); }) + .add_min(-10000.f).add_max(10000.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Move Resistance - Vertical (Y)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_move_resistance.y, "%.0f", 1.f); }) + .add_min(-10000.f).add_max(10000.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Move Resistance - Height (Z)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_move_resistance.z, "%.0f", 1.f); }) + .add_min(-10000.f).add_max(10000.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Turn Resistance - Horizontal (X)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_turn_resistance.x, "%.1f", 0.1f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Turn Resistance - Vertical (Y)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_turn_resistance.y, "%.1f", 0.1f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Turn Resistance - Height (Z)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_turn_resistance.z, "%.1f", 0.1f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Miscellaneous */ + if (m_vars.m_type == 4) { + cache_misc(model); + + add_option(number_option(SCROLL, get_string("Wave Audio Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_wave_audio_mult, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Look L/R Cam Height")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_look_lr_cam_height, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Low Lod Angular Offset")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_low_lod_ang_offset, "%.2f", 0.01f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Low Lod Draught Offset")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_low_lod_draught_offset, "%.3f", 0.3f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Dinghy Sphere Buoy Const")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_dinghy_sphere_buoy_const, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + } +} + +void vehicle_modifiers_handling_boat_menu::feature_update() {} + +vehicle_modifiers_handling_boat_menu* g_instance; +vehicle_modifiers_handling_boat_menu* vehicle_modifiers_handling_boat_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_modifiers_handling_boat_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_boat.h b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_boat.h new file mode 100644 index 0000000..e62c6a7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_boat.h @@ -0,0 +1,75 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_modifiers_handling_boat_menu : public menu::submenu::submenu { +public: + static vehicle_modifiers_handling_boat_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_modifiers_handling_boat_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::modifiers::handling::boat::vars { + struct physical_restore { + float m_box_front_mult; + float m_box_rear_mult; + float m_box_side_mult; + float m_sample_top; + float m_sample_bottom; + }; + + struct aquaplane_restore { + float m_aquaplane_force; + float m_aquaplane_push_water_mult; + float m_aquaplane_push_water_cap; + float m_aquaplane_push_water_apply; + float m_keel_sphere_size; + float m_prop_radius; + float m_impeller_offset; + float m_impeller_force_mult; + float m_prow_raise_mult; + }; + + struct rudder_restore { + float m_rudder_force; + float m_rudder_offset_submerge; + float m_rudder_offset_force; + float m_rudder_offset_force_z_mult; + }; + + struct resistance_restore { + float m_drag_coefficient; + math::vector3_ m_vec_move_resistance; + math::vector3_ m_vec_turn_resistance; + }; + + struct misc_restore { + float m_wave_audio_mult; + float m_look_lr_cam_height; + float m_low_lod_ang_offset; + float m_low_lod_draught_offset; + float m_dinghy_sphere_buoy_const; + }; + + struct variables { + int m_type; + + std::unordered_map m_physical_restore; + std::unordered_map m_aquaplane_restore; + std::unordered_map m_rudder_restore; + std::unordered_map m_resistance_restore; + std::unordered_map m_misc_restore; + }; + + void cache_physical(uint32_t model); + void cache_aquaplane(uint32_t model); + void cache_rudder(uint32_t model); + void cache_resistance(uint32_t model); + void cache_misc(uint32_t model); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_flying.cpp b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_flying.cpp new file mode 100644 index 0000000..bd1b433 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_flying.cpp @@ -0,0 +1,460 @@ +#include "vehicle_modifiers_handling_flying.h" +#include "menu/base/submenu_handler.h" +#include "vehicle_modifiers_handling_main.h" + +using namespace vehicle::modifiers::handling::flying::vars; + +namespace vehicle::modifiers::handling::flying::vars { + variables m_vars; + + rage::types::flying_handling_data* get_data() { + static rage::types::flying_handling_data hd; + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data) { + return &global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data->m_flying_handling_data; + } + } + } + } + } + } + + return &hd; + } + + void reset() { + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + + switch (m_vars.m_type) { + case 0: /* Thrust */ + if (m_vars.m_ThrustRestore.find(model) != m_vars.m_ThrustRestore.end()) { + auto& Backup = m_vars.m_ThrustRestore[model]; + get_data()->m_thrust = Backup.m_thrust; + get_data()->m_thrust_fall_off = Backup.m_thrust_fall_off; + get_data()->m_thrust_vectoring = Backup.m_thrust_vectoring; + } + break; + + case 1: /* Movement */ + if (m_vars.m_MovementRestore.find(model) != m_vars.m_MovementRestore.end()) { + auto& Backup = m_vars.m_MovementRestore[model]; + get_data()->m_side_slip_mult = Backup.m_side_slip_mult; + get_data()->m_yaw_mult = Backup.m_yaw_mult; + get_data()->m_yaw_stabilise = Backup.m_yaw_stabilise; + get_data()->m_roll_mult = Backup.m_roll_mult; + get_data()->m_roll_stabilise = Backup.m_roll_stabilise; + get_data()->m_pitch_mult = Backup.m_pitch_mult; + get_data()->m_pitch_stabilise = Backup.m_pitch_stabilise; + get_data()->m_form_lift_mult = Backup.m_form_lift_mult; + get_data()->m_attack_lift_mult = Backup.m_attack_lift_mult; + get_data()->m_attack_dive_mult = Backup.m_attack_dive_mult; + get_data()->m_engine_off_glide_multi = Backup.m_engine_off_glide_multi; + } + break; + + case 2: /* Resistance */ + if (m_vars.m_ResistanceRestore.find(model) != m_vars.m_ResistanceRestore.end()) { + auto& Backup = m_vars.m_ResistanceRestore[model]; + get_data()->m_wind_mult = Backup.m_wind_mult; + get_data()->m_move_res = Backup.m_move_res; + get_data()->m_vec_turn_resistance = Backup.m_vec_turn_resistance; + get_data()->m_vec_speed_resistance = Backup.m_vec_speed_resistance; + } + break; + + case 3: /* Turbulence */ + if (m_vars.m_TurbulenceRestore.find(model) != m_vars.m_TurbulenceRestore.end()) { + auto& Backup = m_vars.m_TurbulenceRestore[model]; + get_data()->m_turublence_magnitude_max = Backup.m_turublence_magnitude_max; + get_data()->m_turublence_force_multi = Backup.m_turublence_force_multi; + get_data()->m_turublence_roll_torque_multi = Backup.m_turublence_roll_torque_multi; + get_data()->m_turublence_pitch_torque_multi = Backup.m_turublence_pitch_torque_multi; + } + break; + + case 4: /* Gear */ + if (m_vars.m_GearRestore.find(model) != m_vars.m_GearRestore.end()) { + auto& Backup = m_vars.m_GearRestore[model]; + get_data()->m_gear_down_drag_v = Backup.m_gear_down_drag_v; + get_data()->m_gear_down_lift_mult = Backup.m_gear_down_lift_mult; + } + break; + + case 5: /* Ground */ + if (m_vars.m_GroundRestore.find(model) != m_vars.m_GroundRestore.end()) { + auto& Backup = m_vars.m_GroundRestore[model]; + get_data()->m_on_ground_yaw_boost_speed_peak = Backup.m_on_ground_yaw_boost_speed_peak; + get_data()->m_on_ground_yaw_boost_speed_cap = Backup.m_on_ground_yaw_boost_speed_cap; + } + break; + + case 6: /* Misc */ + if (m_vars.m_MiscRestore.find(model) != m_vars.m_MiscRestore.end()) { + auto& Backup = m_vars.m_MiscRestore[model]; + get_data()->m_body_damage_control_effect_mult = Backup.m_body_damage_control_effect_mult; + get_data()->m_input_sensitivity_for_difficulty = Backup.m_input_sensitivity_for_difficulty; + } + break; + } + } + + void cache_thrust(uint32_t model) { + if (m_vars.m_ThrustRestore.find(model) == m_vars.m_ThrustRestore.end()) { + m_vars.m_ThrustRestore[model] = { + get_data()->m_thrust, + get_data()->m_thrust_fall_off, + get_data()->m_thrust_vectoring + }; + } + } + + void cache_movement(uint32_t model) { + if (m_vars.m_MovementRestore.find(model) == m_vars.m_MovementRestore.end()) { + m_vars.m_MovementRestore[model] = { + get_data()->m_side_slip_mult, + get_data()->m_yaw_mult, + get_data()->m_yaw_stabilise, + get_data()->m_roll_mult, + get_data()->m_roll_stabilise, + get_data()->m_pitch_mult, + get_data()->m_pitch_stabilise, + get_data()->m_form_lift_mult, + get_data()->m_attack_lift_mult, + get_data()->m_attack_dive_mult, + get_data()->m_engine_off_glide_multi, + }; + } + } + + void cache_resistance(uint32_t model) { + if (m_vars.m_ResistanceRestore.find(model) == m_vars.m_ResistanceRestore.end()) { + m_vars.m_ResistanceRestore[model] = { + get_data()->m_wind_mult, + get_data()->m_move_res, + get_data()->m_vec_turn_resistance, + get_data()->m_vec_speed_resistance + }; + } + } + + void cache_turbulence(uint32_t model) { + if (m_vars.m_TurbulenceRestore.find(model) == m_vars.m_TurbulenceRestore.end()) { + m_vars.m_TurbulenceRestore[model] = { + get_data()->m_turublence_magnitude_max, + get_data()->m_turublence_force_multi, + get_data()->m_turublence_roll_torque_multi, + get_data()->m_turublence_pitch_torque_multi + }; + } + } + + void cache_gear(uint32_t model) { + if (m_vars.m_GearRestore.find(model) == m_vars.m_GearRestore.end()) { + m_vars.m_GearRestore[model] = { + get_data()->m_gear_down_drag_v, + get_data()->m_gear_down_lift_mult + }; + } + } + + void cache_ground(uint32_t model) { + if (m_vars.m_GroundRestore.find(model) == m_vars.m_GroundRestore.end()) { + m_vars.m_GroundRestore[model] = { + get_data()->m_on_ground_yaw_boost_speed_peak, + get_data()->m_on_ground_yaw_boost_speed_cap + }; + } + } + + void cache_misc(uint32_t model) { + if (m_vars.m_MiscRestore.find(model) == m_vars.m_MiscRestore.end()) { + m_vars.m_MiscRestore[model] = { + get_data()->m_body_damage_control_effect_mult, + get_data()->m_input_sensitivity_for_difficulty + }; + } + } +} + +void vehicle_modifiers_handling_flying_menu::load() { + set_name("Flying Handling"); + set_parent(); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click(reset)); + + add_string("Thrust"); + add_string("Thrust Falloff"); + add_string("Thrust Vectoring"); + + add_string("Side Slip Multiplier"); + add_string("Yaw Multiplier"); + add_string("Yaw Stabilize"); + add_string("Roll Multiplier"); + add_string("Roll Stabilize"); + add_string("Pitch Multiplier"); + add_string("Pitch Stabilize"); + add_string("Form Lift Multiplier"); + add_string("Attack Lift Multiplier"); + add_string("Attack Dive Multiplier"); + add_string("Engine Off Glide Multiplier"); + + add_string("Wind Multiplier"); + add_string("Move Resistance"); + add_string("Turn Resistance - Horizontal (X)"); + add_string("Turn Resistance - Vertical (Y)"); + add_string("Turn Resistance - Height (Z)"); + add_string("Speed Resistance - Horizontal (X)"); + add_string("Speed Resistance - Vertical (Y)"); + add_string("Speed Resistance - Height (Z)"); + + add_string("Maximum Magnitude"); + add_string("Force Multiplier"); + add_string("Roll Torque Multiplier"); + add_string("Pitch Torque Multiplier"); + + add_string("Down Drag"); + add_string("Down Lift Multiplier"); + + add_string("Yaw Boost Speed Peak"); + add_string("Yaw Boost Speed Cap"); + + add_string("Body Damage Multiplier"); + add_string("Input Sensitivity"); +} + +void vehicle_modifiers_handling_flying_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(true); + return; + } + + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + if (!(native::is_this_model_a_plane(model) || native::is_this_model_a_heli(model))) { + menu::submenu::handler::set_submenu_previous(true); + return; + } +} + +void vehicle_modifiers_handling_flying_menu::update_once() { + clear_options(1); + + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + + /* Thrust */ + if (m_vars.m_type == 0) { + cache_thrust(model); + + add_option(number_option(SCROLL, get_string("Thrust")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_thrust, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Thrust Falloff")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_thrust_fall_off, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Thrust Vectoring")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_thrust_vectoring, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Movement */ + if (m_vars.m_type == 1) { + cache_movement(model); + + add_option(number_option(SCROLL, get_string("Side Slip Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_side_slip_mult, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Yaw Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_yaw_mult, "%.3f", 0.001f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Yaw Stabilize")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_yaw_stabilise, "%.3f", 0.001f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Roll Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_roll_mult, "%.3f", 0.001f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Roll Stabilize")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_roll_stabilise, "%.3f", 0.001f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Pitch Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_pitch_mult, "%.3f", 0.001f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Pitch Stabilize")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_pitch_stabilise, "%.3f", 0.001f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Form Lift Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_form_lift_mult, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Attack Lift Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_attack_lift_mult, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Attack Dive Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_attack_dive_mult, "%.3f", 0.001f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Engine Off Glide Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_engine_off_glide_multi, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Resistance */ + if (m_vars.m_type == 2) { + cache_resistance(model); + + add_option(number_option(SCROLL, get_string("Wind Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_wind_mult, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Move Resistance")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_move_res, "%.3f", 0.001f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Turn Resistance - Horizontal (X)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_turn_resistance.x, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Turn Resistance - Vertical (Y)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_turn_resistance.y, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Turn Resistance - Height (Z)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_turn_resistance.z, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Speed Resistance - Horizontal (X)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_speed_resistance.x, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Speed Resistance - Vertical (Y)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_speed_resistance.y, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Speed Resistance - Height (Z)")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_vec_speed_resistance.z, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Turbulence */ + if (m_vars.m_type == 3) { + cache_turbulence(model); + + add_option(number_option(SCROLL, get_string("Maximum Magnitude")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_turublence_magnitude_max, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Force Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_turublence_force_multi, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Roll Torque Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_turublence_roll_torque_multi, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Pitch Torque Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_turublence_pitch_torque_multi, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Gear */ + if (m_vars.m_type == 4) { + cache_gear(model); + + add_option(number_option(SCROLL, get_string("Down Drag")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_gear_down_drag_v, "%.2f", 0.01f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Down Lift Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_gear_down_lift_mult, "%.1f", 0.1f); }) + .add_min(-10.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Ground */ + if (m_vars.m_type == 5) { + cache_ground(model); + + add_option(number_option(SCROLL, get_string("Yaw Boost Speed Peak")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_on_ground_yaw_boost_speed_peak, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Yaw Boost Speed Cap")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_on_ground_yaw_boost_speed_cap, "%.0f", 1.f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + } + + /* Miscellaneous */ + if (m_vars.m_type == 6) { + cache_misc(model); + + add_option(number_option(SCROLL, get_string("Body Damage Multiplier")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_body_damage_control_effect_mult, "%.1f", 0.1f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + + add_option(number_option(SCROLL, get_string("Input Sensitivity")) + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; }) + .add_update([](number_option* option, int pos) { option->add_number(get_data()->m_input_sensitivity_for_difficulty, "%.1f", 0.1f); }) + .add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max()); + } +} + +void vehicle_modifiers_handling_flying_menu::feature_update() {} + +vehicle_modifiers_handling_flying_menu* g_instance; +vehicle_modifiers_handling_flying_menu* vehicle_modifiers_handling_flying_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_modifiers_handling_flying_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_flying.h b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_flying.h new file mode 100644 index 0000000..0eee34e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_flying.h @@ -0,0 +1,87 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_modifiers_handling_flying_menu : public menu::submenu::submenu { +public: + static vehicle_modifiers_handling_flying_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_modifiers_handling_flying_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::modifiers::handling::flying::vars { + struct ThrustRestore { + float m_thrust; + float m_thrust_fall_off; + float m_thrust_vectoring; + }; + + struct MovementRestore { + float m_side_slip_mult; + float m_yaw_mult; + float m_yaw_stabilise; + float m_roll_mult; + float m_roll_stabilise; + float m_pitch_mult; + float m_pitch_stabilise; + float m_form_lift_mult; + float m_attack_lift_mult; + float m_attack_dive_mult; + float m_engine_off_glide_multi; + }; + + struct ResistanceRestore { + float m_wind_mult; + float m_move_res; + math::vector3_ m_vec_turn_resistance; + math::vector3_ m_vec_speed_resistance; + }; + + struct TurbulenceRestore { + float m_turublence_magnitude_max; + float m_turublence_force_multi; + float m_turublence_roll_torque_multi; + float m_turublence_pitch_torque_multi; + }; + + struct GearRestore { + float m_gear_down_drag_v; + float m_gear_down_lift_mult; + }; + + struct GroundRestore { + float m_on_ground_yaw_boost_speed_peak; + float m_on_ground_yaw_boost_speed_cap; + }; + + struct MiscRestore { + float m_body_damage_control_effect_mult; + float m_input_sensitivity_for_difficulty; + }; + + struct variables { + int m_type; + + std::unordered_map m_ThrustRestore; + std::unordered_map m_MovementRestore; + std::unordered_map m_ResistanceRestore; + std::unordered_map m_TurbulenceRestore; + std::unordered_map m_GearRestore; + std::unordered_map m_GroundRestore; + std::unordered_map m_MiscRestore; + }; + + void cache_thrust(uint32_t model); + void cache_movement(uint32_t model); + void cache_resistance(uint32_t model); + void cache_turbulence(uint32_t model); + void cache_gear(uint32_t model); + void cache_ground(uint32_t model); + void cache_misc(uint32_t model); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_load.cpp b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_load.cpp new file mode 100644 index 0000000..5dbe4b9 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_load.cpp @@ -0,0 +1,584 @@ +#include "vehicle_modifiers_handling_load.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_modifiers_handling.h" +#include "vehicle_modifiers_handling_attr.h" +#include "vehicle_modifiers_handling_boat.h" +#include "vehicle_modifiers_handling_bike.h" +#include "vehicle_modifiers_handling_flying.h" +#include "../../vehicle_multipliers.h" +#include "rage/engine.h" +#include "util/dirs.h" +#include "util/log.h" +#include + +using namespace vehicle::modifiers::handling::load::vars; + +namespace vehicle::modifiers::handling::load::vars { + variables m_vars; + + rage::types::handling_data* get_data_main() { + static rage::types::handling_data hd; + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data) { + return global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data; + } + } + } + } + + return &hd; + } + + rage::types::boat_handling_data* get_data_boat() { + static rage::types::boat_handling_data hd; + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data) { + return &global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data->m_boat_handling_data; + } + } + } + } + } + } + + return &hd; + } + + rage::types::bike_handling_data* get_data_bike() { + static rage::types::bike_handling_data hd; + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data) { + return &global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data->m_bike_handling_data; + } + } + } + } + } + } + + return &hd; + } + + rage::types::flying_handling_data* get_data_flying() { + static rage::types::flying_handling_data hd; + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data) { + return &global::vars::g_ped_factory->m_local_ped->m_vehicle->m_handling_data->m_sub_handling_data->m_sub_handling_data->m_flying_handling_data; + } + } + } + } + } + } + + return &hd; + } + + void load_handling(std::string file) { + vehicle_modifiers_handling_menu::get()->update_once(); // re-cache model check + + const char* location = util::va::va("%s%s.json", util::dirs::get_path(handling), file.c_str()); + + try { + std::ifstream input(location); + if (!input.good()) return; + + nlohmann::json object; + input >> object; + + if ((object["Type"].get() == 1 && !vehicle::modifiers::handling::vars::m_vars.m_in_boat) + || (object["Type"].get() == 2 && !vehicle::modifiers::handling::vars::m_vars.m_in_bike) + || (object["Type"].get() == 3 && !vehicle::modifiers::handling::vars::m_vars.m_in_flying)) { + menu::notify::stacked(vehicle_modifiers_handling_load_menu::get()->get_string("Handling"), vehicle_modifiers_handling_load_menu::get()->get_string("You're not in the correct vehicle type"), global::ui::g_error); + return; + } + + if (!object["Multipliers"].is_null()) { + vehicle::multipliers::vars::m_vars.m_rpm = object["Multipliers"]["RPM"].get(); + vehicle::multipliers::vars::m_vars.m_torque = object["Multipliers"]["Torque"].get(); + } + + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + vehicle::modifiers::handling::attr::vars::cache_physical(model); + vehicle::modifiers::handling::attr::vars::cache_transmission(model); + vehicle::modifiers::handling::attr::vars::cache_wheel_traction(model); + vehicle::modifiers::handling::attr::vars::cache_suspension(model); + vehicle::modifiers::handling::attr::vars::cache_damage(model); + vehicle::modifiers::handling::attr::vars::cache_misc(model); + + // Main handling + auto& Main = object["Main"]; + auto& Physical = Main["Physical"]; + auto& Transmission = Main["Transmission"]; + auto& WheelTraction = Main["Wheel Traction"]; + auto& Suspension = Main["Suspension"]; + auto& Damage = Main["Damage"]; + auto& Miscellaneous = Main["Miscellaneous"]; + + get_data_main()->m_mass = Physical["Mass"]; + get_data_main()->m_downforce_modifier = Physical["DownforceModifier"]; + get_data_main()->m_percent_submerged = Physical["PercentSubmerged"]; + get_data_main()->m_vec_centre_of_mass_offset.x = Physical["VecCentreOfMassOffset.X"]; + get_data_main()->m_vec_centre_of_mass_offset.y = Physical["VecCentreOfMassOffset.Y"]; + get_data_main()->m_vec_centre_of_mass_offset.z = Physical["VecCentreOfMassOffset.Z"]; + get_data_main()->m_vec_inertia_multiplier.x = Physical["VecInertiaMultiplier.X"]; + get_data_main()->m_vec_inertia_multiplier.y = Physical["VecInertiaMultiplier.Y"]; + get_data_main()->m_vec_inertia_multiplier.z = Physical["VecInertiaMultiplier.Z"]; + + get_data_main()->m_drive_bias_front = Transmission["DriveBiasFront"]; + get_data_main()->m_initial_drive_gears = Transmission["InitialDriveGears"]; + get_data_main()->m_initial_drive_force = Transmission["InitialDriveForce"]; + get_data_main()->m_drive_inertia = Transmission["DriveInertia"]; + get_data_main()->m_initial_drive_max_flat_vel = Transmission["InitialDriveMaxFlatVel"]; + get_data_main()->m_clutch_change_rate_scale_up_shift = Transmission["ClutchChangeRateScaleUpShift"]; + get_data_main()->m_clutch_change_rate_scale_down_shift = Transmission["ClutchChangeRateScaleDownShift"]; + get_data_main()->m_brake_force = Transmission["BrakeForce"]; + get_data_main()->m_hand_brake_force = Transmission["HandBrakeForce"]; + get_data_main()->m_steering_lock = Transmission["SteeringLock"]; + + get_data_main()->m_traction_curve_max = WheelTraction["TractionCurveMax"]; + get_data_main()->m_traction_spring_delta_max = WheelTraction["TractionSpringDeltaMax"]; + get_data_main()->m_low_speed_traction_loss_mult = WheelTraction["LowSpeedTractionLossMult"]; + get_data_main()->m_camber_stiffness = WheelTraction["CamberStiffnesss"]; + get_data_main()->m_traction_loss_mult = WheelTraction["TractionLossMult"]; + + get_data_main()->m_suspension_force = Suspension["SuspensionForce"]; + get_data_main()->m_suspension_comp_damp = Suspension["SuspensionCompDamp"]; + get_data_main()->m_suspension_rebound_damp = Suspension["SuspensionReboundDamp"]; + get_data_main()->m_suspension_upper_limit = Suspension["SuspensionUpperLimit"]; + get_data_main()->m_suspension_lower_limit = Suspension["SuspensionLowerLimit"]; + get_data_main()->m_anti_roll_bar_force = Suspension["AntiRollBarForce"]; + get_data_main()->m_roll_centre_height_front = Suspension["RollCentreHeightFront"]; + get_data_main()->m_roll_centre_height_rear = Suspension["RollCentreHeightRear"]; + + get_data_main()->m_collision_damage_mult = Damage["CollisionDamageMult"]; + get_data_main()->m_weapon_damage_mult = Damage["WeaponDamageMult"]; + get_data_main()->m_deformation_damage_mult = Damage["DeformationDamageMult"]; + get_data_main()->m_engine_damage_mult = Damage["EngineDamageMult"]; + get_data_main()->m_petrol_tank_volume = Damage["PetrolTankVolume"]; + + get_data_main()->m_oil_volume = Miscellaneous["OilVolume"]; + get_data_main()->m_seat_offset.x = Miscellaneous["SeatOffset.X"]; + get_data_main()->m_seat_offset.y = Miscellaneous["SeatOffset.Y"]; + get_data_main()->m_seat_offset.z = Miscellaneous["SeatOffset.Z"]; + get_data_main()->m_monetary_value = Miscellaneous["MonetaryValue"]; + + // Boat + if (object["Type"].get() == 1) { + vehicle::modifiers::handling::boat::vars::cache_physical(model); + vehicle::modifiers::handling::boat::vars::cache_aquaplane(model); + vehicle::modifiers::handling::boat::vars::cache_rudder(model); + vehicle::modifiers::handling::boat::vars::cache_resistance(model); + vehicle::modifiers::handling::boat::vars::cache_misc(model); + + auto& Boat = object["Boat"]; + auto& Physical = Boat["Physical"]; + auto& Aquaplane = Boat["Aquaplane"]; + auto& Rudder = Boat["Rudder"]; + auto& Resistance = Boat["Resistance"]; + auto& Miscellaneous = Boat["Miscellaneous"]; + + get_data_boat()->m_box_front_mult = Physical["BoxFrontMult"]; + get_data_boat()->m_box_rear_mult = Physical["BoxRearMult"]; + get_data_boat()->m_box_side_mult = Physical["BoxSideMult"]; + get_data_boat()->m_sample_top = Physical["SampleTop"]; + get_data_boat()->m_sample_bottom = Physical["SampleBottom"]; + + get_data_boat()->m_aquaplane_force = Aquaplane["AquaplaneForce"]; + get_data_boat()->m_aquaplane_push_water_mult = Aquaplane["AquaplanePushWaterMult"]; + get_data_boat()->m_aquaplane_push_water_cap = Aquaplane["AquaplanePushWaterCap"]; + get_data_boat()->m_aquaplane_push_water_apply = Aquaplane["AquaplanePushWaterApply"]; + get_data_boat()->m_keel_sphere_size = Aquaplane["KeelSphereSize"]; + get_data_boat()->m_prop_radius = Aquaplane["PropRadius"]; + get_data_boat()->m_impeller_offset = Aquaplane["ImpellerOffset"]; + get_data_boat()->m_impeller_force_mult = Aquaplane["ImpellerForceMult"]; + get_data_boat()->m_prow_raise_mult = Aquaplane["ProwRaiseMult"]; + + get_data_boat()->m_rudder_force = Rudder["RudderForce"]; + get_data_boat()->m_rudder_offset_submerge = Rudder["RudderOffsetSubmerge"]; + get_data_boat()->m_rudder_offset_force = Rudder["RudderOffsetForce"]; + get_data_boat()->m_rudder_offset_force_z_mult = Rudder["RudderOffsetForceZMult"]; + + get_data_boat()->m_drag_coefficient = Resistance["DragCoefficient"]; + get_data_boat()->m_vec_move_resistance.x = Resistance["VecMoveResistance.X"]; + get_data_boat()->m_vec_move_resistance.y = Resistance["VecMoveResistance.Y"]; + get_data_boat()->m_vec_move_resistance.z = Resistance["VecMoveResistance.Z"]; + get_data_boat()->m_vec_turn_resistance.x = Resistance["VecTurnResistance.X"]; + get_data_boat()->m_vec_turn_resistance.y = Resistance["VecTurnResistance.Y"]; + get_data_boat()->m_vec_turn_resistance.z = Resistance["VecTurnResistance.Z"]; + + get_data_boat()->m_wave_audio_mult = Miscellaneous["WaveAudioMult"]; + get_data_boat()->m_look_lr_cam_height = Miscellaneous["Look_L_R_CamHeight"]; + get_data_boat()->m_low_lod_ang_offset = Miscellaneous["LowLodAngOffset"]; + get_data_boat()->m_low_lod_draught_offset = Miscellaneous["LowLodDraughtOffset"]; + get_data_boat()->m_dinghy_sphere_buoy_const = Miscellaneous["DinghySphereBuoyConst"]; + } + + // Bike + if (object["Type"].get() == 2) { + vehicle::modifiers::handling::bike::vars::cache_physical(model); + vehicle::modifiers::handling::bike::vars::cache_balance(model); + vehicle::modifiers::handling::bike::vars::cache_friction(model); + + auto& Bike = object["Bike"]; + auto& Physical = Bike["Physical"]; + auto& Balance = Bike["Balance"]; + auto& Friction = Bike["Friction"]; + + get_data_bike()->m_lean_fwd_com_mult = Physical["LeanFwdCOMMult"]; + get_data_bike()->m_lean_fwd_force_mult = Physical["LeanFwdForceMult"]; + get_data_bike()->m_lean_bak_com_mult = Physical["LeanBakCOMMult"]; + get_data_bike()->m_lean_bak_force_mult = Physical["LeanBakForceMult"]; + get_data_bike()->m_max_bank_angle = Physical["MaxBankAngle"]; + get_data_bike()->m_full_anim_angle = Physical["FullAnimAngle"]; + get_data_bike()->m_des_lean_return_frac = Physical["DesLeanReturnFrac"]; + get_data_bike()->m_stick_lean_mult = Physical["StickLeanMult"]; + get_data_bike()->m_braking_stability_mult = Physical["BrakingStabilityMult"]; + get_data_bike()->m_in_air_steer_mult = Physical["InAirSteerMult"]; + get_data_bike()->m_jump_force = Physical["JumpForce"]; + + get_data_bike()->m_bike_on_stand_steer_angle = Balance["BikeOnStandSteerAngle"]; + get_data_bike()->m_bike_on_stand_lean_angle = Balance["BikeOnStandLeanAngle"]; + get_data_bike()->m_front_balance_mult = Balance["FrontBalanceMult"]; + get_data_bike()->m_rear_balance_mult = Balance["RearBalanceMult"]; + get_data_bike()->m_wheelie_balance_point = Balance["WheelieBalancePoint"]; + get_data_bike()->m_stoppie_balance_point = Balance["StoppieBalancePoint"]; + get_data_bike()->m_wheelie_steer_mult = Balance["WheelieSteerMult"]; + + get_data_bike()->m_bike_ground_side_friction_mult = Friction["BikeGroundSideFrictionMult"]; + get_data_bike()->m_bike_wheel_ground_side_friction_mult = Friction["BikeWheelGroundSideFrictionMult"]; + } + + // Flying + if (object["Type"].get() == 3) { + vehicle::modifiers::handling::flying::vars::cache_thrust(model); + vehicle::modifiers::handling::flying::vars::cache_movement(model); + vehicle::modifiers::handling::flying::vars::cache_resistance(model); + vehicle::modifiers::handling::flying::vars::cache_turbulence(model); + vehicle::modifiers::handling::flying::vars::cache_gear(model); + vehicle::modifiers::handling::flying::vars::cache_ground(model); + vehicle::modifiers::handling::flying::vars::cache_misc(model); + + auto& Flying = object["Flying"]; + auto& Thrust = Flying["Thrust"]; + auto& Movement = Flying["Movement"]; + auto& Resistance = Flying["Resistance"]; + auto& Turbulence = Flying["Turbulence"]; + auto& Gear = Flying["Gear"]; + auto& Ground = Flying["Ground"]; + auto& Miscellaneous = Flying["Miscellaneous"]; + + get_data_flying()->m_thrust = Thrust["Thrust"]; + get_data_flying()->m_thrust_fall_off = Thrust["ThrustFallOff"]; + get_data_flying()->m_thrust_vectoring = Thrust["ThrustVectoring"]; + + get_data_flying()->m_side_slip_mult = Movement["SideSlipMult"]; + get_data_flying()->m_yaw_mult = Movement["YawMult"]; + get_data_flying()->m_yaw_stabilise = Movement["YawStabilise"]; + get_data_flying()->m_roll_mult = Movement["RollMult"]; + get_data_flying()->m_roll_stabilise = Movement["RollStabilise"]; + get_data_flying()->m_pitch_mult = Movement["PitchMult"]; + get_data_flying()->m_pitch_stabilise = Movement["PitchStabilise"]; + get_data_flying()->m_form_lift_mult = Movement["FormLiftMult"]; + get_data_flying()->m_attack_lift_mult = Movement["AttackLiftMult"]; + get_data_flying()->m_attack_dive_mult = Movement["AttackDiveMult"]; + get_data_flying()->m_engine_off_glide_multi = Movement["EngineOffGlideMulti"]; + + get_data_flying()->m_wind_mult = Resistance["WindMult"]; + get_data_flying()->m_move_res = Resistance["MoveRes"]; + get_data_flying()->m_vec_turn_resistance.x = Resistance["VecTurnResistance.X"]; + get_data_flying()->m_vec_turn_resistance.y = Resistance["VecTurnResistance.Y"]; + get_data_flying()->m_vec_turn_resistance.z = Resistance["VecTurnResistance.Z"]; + get_data_flying()->m_vec_speed_resistance.x = Resistance["VecSpeedResistance.X"]; + get_data_flying()->m_vec_speed_resistance.y = Resistance["VecSpeedResistance.Y"]; + get_data_flying()->m_vec_speed_resistance.z = Resistance["VecSpeedResistance.Z"]; + + get_data_flying()->m_turublence_magnitude_max = Turbulence["TurublenceMagnitudeMax"]; + get_data_flying()->m_turublence_force_multi = Turbulence["TurublenceForceMulti"]; + get_data_flying()->m_turublence_roll_torque_multi = Turbulence["TurublenceRollTorqueMulti"]; + get_data_flying()->m_turublence_pitch_torque_multi = Turbulence["TurublencePitchTorqueMulti"]; + + get_data_flying()->m_gear_down_drag_v = Gear["GearDownDragV"]; + get_data_flying()->m_gear_down_lift_mult = Gear["GearDownLiftMult"]; + + get_data_flying()->m_on_ground_yaw_boost_speed_peak = Ground["OnGroundYawBoostSpeedPeak"]; + get_data_flying()->m_on_ground_yaw_boost_speed_cap = Ground["OnGroundYawBoostSpeedCap"]; + + get_data_flying()->m_body_damage_control_effect_mult = Miscellaneous["BodyDamageControlEffectMult"]; + get_data_flying()->m_input_sensitivity_for_difficulty = Miscellaneous["InputSensitivityForDifficulty"]; + } + + input.close(); + } catch (std::exception& E) { + LOG_WARN("[Json] %s", E.what()); + } + } + + void save_handling(std::string file) { + vehicle_modifiers_handling_menu::get()->update_once(); // re-cache model check + + const char* location = util::va::va("%s%s.json", util::dirs::get_path(handling), file.c_str()); + + try { + std::ofstream output(location); + nlohmann::json object; + + object["Multipliers"]["RPM"] = vehicle::multipliers::vars::m_vars.m_rpm; + object["Multipliers"]["Torque"] = vehicle::multipliers::vars::m_vars.m_torque; + + object["Type"] = 0; + auto& Main = object["Main"]; + auto& Physical = Main["Physical"]; + auto& Transmission = Main["Transmission"]; + auto& WheelTraction = Main["Wheel Traction"]; + auto& Suspension = Main["Suspension"]; + auto& Damage = Main["Damage"]; + auto& Miscellaneous = Main["Miscellaneous"]; + + Physical["Mass"] = get_data_main()->m_mass; + Physical["DownforceModifier"] = get_data_main()->m_downforce_modifier; + Physical["PercentSubmerged"] = get_data_main()->m_percent_submerged; + Physical["VecCentreOfMassOffset.X"] = get_data_main()->m_vec_centre_of_mass_offset.x; + Physical["VecCentreOfMassOffset.Y"] = get_data_main()->m_vec_centre_of_mass_offset.y; + Physical["VecCentreOfMassOffset.Z"] = get_data_main()->m_vec_centre_of_mass_offset.z; + Physical["VecInertiaMultiplier.X"] = get_data_main()->m_vec_inertia_multiplier.x; + Physical["VecInertiaMultiplier.Y"] = get_data_main()->m_vec_inertia_multiplier.y; + Physical["VecInertiaMultiplier.Z"] = get_data_main()->m_vec_inertia_multiplier.z; + + Transmission["DriveBiasFront"] = get_data_main()->m_drive_bias_front; + Transmission["InitialDriveGears"] = get_data_main()->m_initial_drive_gears; + Transmission["InitialDriveForce"] = get_data_main()->m_initial_drive_force; + Transmission["DriveInertia"] = get_data_main()->m_drive_inertia; + Transmission["InitialDriveMaxFlatVel"] = get_data_main()->m_initial_drive_max_flat_vel; + Transmission["ClutchChangeRateScaleUpShift"] = get_data_main()->m_clutch_change_rate_scale_up_shift; + Transmission["ClutchChangeRateScaleDownShift"] = get_data_main()->m_clutch_change_rate_scale_down_shift; + Transmission["BrakeForce"] = get_data_main()->m_brake_force; + Transmission["HandBrakeForce"] = get_data_main()->m_hand_brake_force; + Transmission["SteeringLock"] = get_data_main()->m_steering_lock; + + WheelTraction["TractionCurveMax"] = get_data_main()->m_traction_curve_max; + WheelTraction["TractionSpringDeltaMax"] = get_data_main()->m_traction_spring_delta_max; + WheelTraction["LowSpeedTractionLossMult"] = get_data_main()->m_low_speed_traction_loss_mult; + WheelTraction["CamberStiffnesss"] = get_data_main()->m_camber_stiffness; + WheelTraction["TractionLossMult"] = get_data_main()->m_traction_loss_mult; + + Suspension["SuspensionForce"] = get_data_main()->m_suspension_force; + Suspension["SuspensionCompDamp"] = get_data_main()->m_suspension_comp_damp; + Suspension["SuspensionReboundDamp"] = get_data_main()->m_suspension_rebound_damp; + Suspension["SuspensionUpperLimit"] = get_data_main()->m_suspension_upper_limit; + Suspension["SuspensionLowerLimit"] = get_data_main()->m_suspension_lower_limit; + Suspension["AntiRollBarForce"] = get_data_main()->m_anti_roll_bar_force; + Suspension["RollCentreHeightFront"] = get_data_main()->m_roll_centre_height_front; + Suspension["RollCentreHeightRear"] = get_data_main()->m_roll_centre_height_rear; + + Damage["CollisionDamageMult"] = get_data_main()->m_collision_damage_mult; + Damage["WeaponDamageMult"] = get_data_main()->m_weapon_damage_mult; + Damage["DeformationDamageMult"] = get_data_main()->m_deformation_damage_mult; + Damage["EngineDamageMult"] = get_data_main()->m_engine_damage_mult; + Damage["PetrolTankVolume"] = get_data_main()->m_petrol_tank_volume; + + Miscellaneous["OilVolume"] = get_data_main()->m_oil_volume; + Miscellaneous["SeatOffset.X"] = get_data_main()->m_seat_offset.x; + Miscellaneous["SeatOffset.Y"] = get_data_main()->m_seat_offset.y; + Miscellaneous["SeatOffset.Z"] = get_data_main()->m_seat_offset.z; + Miscellaneous["MonetaryValue"] = get_data_main()->m_monetary_value; + + if (vehicle::modifiers::handling::vars::m_vars.m_in_boat) { + object["Type"] = 1; + auto& Boat = object["Boat"]; + auto& Physical = Boat["Physical"]; + auto& Aquaplane = Boat["Aquaplane"]; + auto& Rudder = Boat["Rudder"]; + auto& Resistance = Boat["Resistance"]; + auto& Miscellaneous = Boat["Miscellaneous"]; + + Physical["BoxFrontMult"] = get_data_boat()->m_box_front_mult; + Physical["BoxRearMult"] = get_data_boat()->m_box_rear_mult; + Physical["BoxSideMult"] = get_data_boat()->m_box_side_mult; + Physical["SampleTop"] = get_data_boat()->m_sample_top; + Physical["SampleBottom"] = get_data_boat()->m_sample_bottom; + + Aquaplane["AquaplaneForce"] = get_data_boat()->m_aquaplane_force; + Aquaplane["AquaplanePushWaterMult"] = get_data_boat()->m_aquaplane_push_water_mult; + Aquaplane["AquaplanePushWaterCap"] = get_data_boat()->m_aquaplane_push_water_cap; + Aquaplane["AquaplanePushWaterApply"] = get_data_boat()->m_aquaplane_push_water_apply; + Aquaplane["KeelSphereSize"] = get_data_boat()->m_keel_sphere_size; + Aquaplane["PropRadius"] = get_data_boat()->m_prop_radius; + Aquaplane["ImpellerOffset"] = get_data_boat()->m_impeller_offset; + Aquaplane["ImpellerForceMult"] = get_data_boat()->m_impeller_force_mult; + Aquaplane["ProwRaiseMult"] = get_data_boat()->m_prow_raise_mult; + + Rudder["RudderForce"] = get_data_boat()->m_rudder_force; + Rudder["RudderOffsetSubmerge"] = get_data_boat()->m_rudder_offset_submerge; + Rudder["RudderOffsetForce"] = get_data_boat()->m_rudder_offset_force; + Rudder["RudderOffsetForceZMult"] = get_data_boat()->m_rudder_offset_force_z_mult; + + Resistance["DragCoefficient"] = get_data_boat()->m_drag_coefficient; + Resistance["VecMoveResistance.X"] = get_data_boat()->m_vec_move_resistance.x; + Resistance["VecMoveResistance.Y"] = get_data_boat()->m_vec_move_resistance.y; + Resistance["VecMoveResistance.Z"] = get_data_boat()->m_vec_move_resistance.z; + Resistance["VecTurnResistance.X"] = get_data_boat()->m_vec_turn_resistance.x; + Resistance["VecTurnResistance.Y"] = get_data_boat()->m_vec_turn_resistance.y; + Resistance["VecTurnResistance.Z"] = get_data_boat()->m_vec_turn_resistance.z; + + Miscellaneous["WaveAudioMult"] = get_data_boat()->m_wave_audio_mult; + Miscellaneous["Look_L_R_CamHeight"] = get_data_boat()->m_look_lr_cam_height; + Miscellaneous["LowLodAngOffset"] = get_data_boat()->m_low_lod_ang_offset; + Miscellaneous["LowLodDraughtOffset"] = get_data_boat()->m_low_lod_draught_offset; + Miscellaneous["DinghySphereBuoyConst"] = get_data_boat()->m_dinghy_sphere_buoy_const; + } else if (vehicle::modifiers::handling::vars::m_vars.m_in_bike) { + object["Type"] = 2; + auto& Bike = object["Bike"]; + auto& Physical = Bike["Physical"]; + auto& Balance = Bike["Balance"]; + auto& Friction = Bike["Friction"]; + + Physical["LeanFwdCOMMult"] = get_data_bike()->m_lean_fwd_com_mult; + Physical["LeanFwdForceMult"] = get_data_bike()->m_lean_fwd_force_mult; + Physical["LeanBakCOMMult"] = get_data_bike()->m_lean_bak_com_mult; + Physical["LeanBakForceMult"] = get_data_bike()->m_lean_bak_force_mult; + Physical["MaxBankAngle"] = get_data_bike()->m_max_bank_angle; + Physical["FullAnimAngle"] = get_data_bike()->m_full_anim_angle; + Physical["DesLeanReturnFrac"] = get_data_bike()->m_des_lean_return_frac; + Physical["StickLeanMult"] = get_data_bike()->m_stick_lean_mult; + Physical["BrakingStabilityMult"] = get_data_bike()->m_braking_stability_mult; + Physical["InAirSteerMult"] = get_data_bike()->m_in_air_steer_mult; + Physical["JumpForce"] = get_data_bike()->m_jump_force; + + Balance["BikeOnStandSteerAngle"] = get_data_bike()->m_bike_on_stand_steer_angle; + Balance["BikeOnStandLeanAngle"] = get_data_bike()->m_bike_on_stand_lean_angle; + Balance["FrontBalanceMult"] = get_data_bike()->m_front_balance_mult; + Balance["RearBalanceMult"] = get_data_bike()->m_rear_balance_mult; + Balance["WheelieBalancePoint"] = get_data_bike()->m_wheelie_balance_point; + Balance["StoppieBalancePoint"] = get_data_bike()->m_stoppie_balance_point; + Balance["WheelieSteerMult"] = get_data_bike()->m_wheelie_steer_mult; + + Friction["BikeGroundSideFrictionMult"] = get_data_bike()->m_bike_ground_side_friction_mult; + Friction["BikeWheelGroundSideFrictionMult"] = get_data_bike()->m_bike_wheel_ground_side_friction_mult; + } else if (vehicle::modifiers::handling::vars::m_vars.m_in_flying) { + object["Type"] = 3; + auto& Flying = object["Flying"]; + auto& Thrust = Flying["Thrust"]; + auto& Movement = Flying["Movement"]; + auto& Resistance = Flying["Resistance"]; + auto& Turbulence = Flying["Turbulence"]; + auto& Gear = Flying["Gear"]; + auto& Ground = Flying["Ground"]; + auto& Miscellaneous = Flying["Miscellaneous"]; + + Thrust["Thrust"] = get_data_flying()->m_thrust; + Thrust["ThrustFallOff"] = get_data_flying()->m_thrust_fall_off; + Thrust["ThrustVectoring"] = get_data_flying()->m_thrust_vectoring; + + Movement["SideSlipMult"] = get_data_flying()->m_side_slip_mult; + Movement["YawMult"] = get_data_flying()->m_yaw_mult; + Movement["YawStabilise"] = get_data_flying()->m_yaw_stabilise; + Movement["RollMult"] = get_data_flying()->m_roll_mult; + Movement["RollStabilise"] = get_data_flying()->m_roll_stabilise; + Movement["PitchMult"] = get_data_flying()->m_pitch_mult; + Movement["PitchStabilise"] = get_data_flying()->m_pitch_stabilise; + Movement["FormLiftMult"] = get_data_flying()->m_form_lift_mult; + Movement["AttackLiftMult"] = get_data_flying()->m_attack_lift_mult; + Movement["AttackDiveMult"] = get_data_flying()->m_attack_dive_mult; + Movement["EngineOffGlideMulti"] = get_data_flying()->m_engine_off_glide_multi; + + Resistance["WindMult"] = get_data_flying()->m_wind_mult; + Resistance["MoveRes"] = get_data_flying()->m_move_res; + Resistance["VecTurnResistance.X"] = get_data_flying()->m_vec_turn_resistance.x; + Resistance["VecTurnResistance.Y"] = get_data_flying()->m_vec_turn_resistance.y; + Resistance["VecTurnResistance.Z"] = get_data_flying()->m_vec_turn_resistance.z; + Resistance["VecSpeedResistance.X"] = get_data_flying()->m_vec_speed_resistance.x; + Resistance["VecSpeedResistance.Y"] = get_data_flying()->m_vec_speed_resistance.y; + Resistance["VecSpeedResistance.Z"] = get_data_flying()->m_vec_speed_resistance.z; + + Turbulence["TurublenceMagnitudeMax"] = get_data_flying()->m_turublence_magnitude_max; + Turbulence["TurublenceForceMulti"] = get_data_flying()->m_turublence_force_multi; + Turbulence["TurublenceRollTorqueMulti"] = get_data_flying()->m_turublence_roll_torque_multi; + Turbulence["TurublencePitchTorqueMulti"] = get_data_flying()->m_turublence_pitch_torque_multi; + + Gear["GearDownDragV"] = get_data_flying()->m_gear_down_drag_v; + Gear["GearDownLiftMult"] = get_data_flying()->m_gear_down_lift_mult; + + Ground["OnGroundYawBoostSpeedPeak"] = get_data_flying()->m_on_ground_yaw_boost_speed_peak; + Ground["OnGroundYawBoostSpeedCap"] = get_data_flying()->m_on_ground_yaw_boost_speed_cap; + + Miscellaneous["BodyDamageControlEffectMult"] = get_data_flying()->m_body_damage_control_effect_mult; + Miscellaneous["InputSensitivityForDifficulty"] = get_data_flying()->m_input_sensitivity_for_difficulty; + } + + output << object.dump(4); + output.close(); + vehicle_modifiers_handling_load_menu::get()->update_once(); + } catch (std::exception& E) { + LOG_WARN("[Json] %s", E.what()); + } + } +} + +void vehicle_modifiers_handling_load_menu::load() { + set_name("Save and Load"); + set_parent(); + + add_option(button_option("Save Handling") + .add_translate() + .add_keyboard("Enter the handling name!", 30, [](button_option* option, const char* result) { save_handling(result); })); + + add_option(break_option("Handling") + .add_translate()); + + add_string("~m~None"); + add_string("You're not in the correct vehicle type"); + add_string("Handling"); +} + +void vehicle_modifiers_handling_load_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(true); + return; + } +} + +void vehicle_modifiers_handling_load_menu::update_once() { + clear_options(2); + + std::vector handling = util::dirs::get_files_in_directory(util::dirs::get_path(handling), ".json"); + if (handling.size()) { + for (std::string file : handling) { + add_option(button_option(file) + .add_click([=] { load_handling(file); })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } +} + +void vehicle_modifiers_handling_load_menu::feature_update() {} + +vehicle_modifiers_handling_load_menu* g_instance; +vehicle_modifiers_handling_load_menu* vehicle_modifiers_handling_load_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_modifiers_handling_load_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_load.h b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_load.h new file mode 100644 index 0000000..99b23c8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_load.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_modifiers_handling_load_menu : public menu::submenu::submenu { +public: + static vehicle_modifiers_handling_load_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_modifiers_handling_load_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::modifiers::handling::load::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_main.cpp b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_main.cpp new file mode 100644 index 0000000..40c0f9b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_main.cpp @@ -0,0 +1,158 @@ +#include "vehicle_modifiers_handling_main.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_modifiers_handling.h" +#include "vehicle_modifiers_handling_attr.h" +#include "vehicle_modifiers_handling_boat.h" +#include "vehicle_modifiers_handling_bike.h" +#include "vehicle_modifiers_handling_flying.h" + +using namespace vehicle::modifiers::handling::main::vars; + +namespace vehicle::modifiers::handling::main::vars { + variables m_vars; +} + +void vehicle_modifiers_handling_main_menu::load() { + set_name("Handling"); + set_parent(); + + add_string("Physical Attributes"); + add_string("Transmission Attributes"); + add_string("Wheel Traction Attributes"); + add_string("Suspension Attributes"); + add_string("Damage Attributes"); + add_string("Miscellaneous Attributes"); + + add_string("Aquaplane Attributes"); + add_string("Rudder Attributes"); + add_string("Resistance Attributes"); + + add_string("Balance Attributes"); + add_string("Friction Attributes"); + + add_string("Thrust Attributes"); + add_string("Movement Attributes"); + add_string("Turbulence Attributes"); + add_string("Gear Attributes"); + add_string("Ground Attributes"); +} + +void vehicle_modifiers_handling_main_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(true); + return; + } +} + +void vehicle_modifiers_handling_main_menu::update_once() { + clear_options(0); + + /* Vehicle Handling */ + if (m_vars.m_type == 0) { + add_option(submenu_option(get_string("Physical Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::attr::vars::m_vars.m_type = 0; })); + + add_option(submenu_option(get_string("Transmission Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::attr::vars::m_vars.m_type = 1; })); + + add_option(submenu_option(get_string("Wheel Traction Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::attr::vars::m_vars.m_type = 2; })); + + add_option(submenu_option(get_string("Suspension Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::attr::vars::m_vars.m_type = 3; })); + + add_option(submenu_option(get_string("Damage Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::attr::vars::m_vars.m_type = 4; })); + + add_option(submenu_option(get_string("Miscellaneous Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::attr::vars::m_vars.m_type = 5; })); + } + + /* Boat */ + if (m_vars.m_type == 1) { + add_option(submenu_option(get_string("Physical Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::boat::vars::m_vars.m_type = 0; })); + + add_option(submenu_option(get_string("Aquaplane Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::boat::vars::m_vars.m_type = 1; })); + + add_option(submenu_option(get_string("Rudder Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::boat::vars::m_vars.m_type = 2; })); + + add_option(submenu_option(get_string("Resistance Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::boat::vars::m_vars.m_type = 3; })); + + add_option(submenu_option(get_string("Miscellaneous Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::boat::vars::m_vars.m_type = 4; })); + } + + /* Bike */ + if (m_vars.m_type == 2) { + add_option(submenu_option(get_string("Physical Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::bike::vars::m_vars.m_type = 0; })); + + add_option(submenu_option(get_string("Balance Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::bike::vars::m_vars.m_type = 1; })); + + add_option(submenu_option(get_string("Friction Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::bike::vars::m_vars.m_type = 2; })); + } + + /* Flying */ + if (m_vars.m_type == 3) { + add_option(submenu_option(get_string("Thrust Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::flying::vars::m_vars.m_type = 0; })); + + add_option(submenu_option(get_string("Movement Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::flying::vars::m_vars.m_type = 1; })); + + add_option(submenu_option(get_string("Resistance Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::flying::vars::m_vars.m_type = 2; })); + + add_option(submenu_option(get_string("Turbulence Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::flying::vars::m_vars.m_type = 3; })); + + add_option(submenu_option(get_string("Gear Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::flying::vars::m_vars.m_type = 4; })); + + add_option(submenu_option(get_string("Ground Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::flying::vars::m_vars.m_type = 5; })); + + add_option(submenu_option(get_string("Miscellaneous Attributes")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::flying::vars::m_vars.m_type = 6; })); + } +} + +void vehicle_modifiers_handling_main_menu::feature_update() {} + +vehicle_modifiers_handling_main_menu* g_instance; +vehicle_modifiers_handling_main_menu* vehicle_modifiers_handling_main_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_modifiers_handling_main_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_main.h b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_main.h new file mode 100644 index 0000000..e411993 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/handling/vehicle_modifiers_handling_main.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_modifiers_handling_main_menu : public menu::submenu::submenu { +public: + static vehicle_modifiers_handling_main_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_modifiers_handling_main_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::modifiers::handling::main::vars { + struct variables { + int m_type; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/vehicle_modifiers_handling.cpp b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/vehicle_modifiers_handling.cpp new file mode 100644 index 0000000..0a3c780 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/vehicle_modifiers_handling.cpp @@ -0,0 +1,88 @@ +#include "vehicle_modifiers_handling.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_modifiers.h" +#include "handling/vehicle_modifiers_handling_main.h" +#include "handling/vehicle_modifiers_handling_load.h" + +using namespace vehicle::modifiers::handling::vars; + +namespace vehicle::modifiers::handling::vars { + variables m_vars; +} + +void vehicle_modifiers_handling_menu::load() { + set_name("Handling"); + set_parent(); + + add_string("Boat Handling"); + add_string("Bike Handling"); + add_string("Flying Handling"); + add_string("Save and Load"); + add_string("Main Handling"); +} + +void vehicle_modifiers_handling_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(true); + return; + } +} + +void vehicle_modifiers_handling_menu::update_once() { + m_vars.m_in_boat = false; + m_vars.m_in_bike = false; + m_vars.m_in_flying = false; + + if (menu::player::get_local_player().m_in_vehicle) { + uint32_t model = native::get_entity_model(menu::player::get_local_player().m_vehicle); + m_vars.m_in_boat = native::is_this_model_a_boat(model) || native::is_this_model_an_emergency_boat(model); + m_vars.m_in_bike = native::is_this_model_a_bicycle(model) || native::is_this_model_a_bike(model); + m_vars.m_in_flying = native::is_this_model_a_plane(model) || native::is_this_model_a_heli(model); + } + + clear_options(0); + + add_option(submenu_option(get_string("Save and Load")) + .add_submenu()); + + add_option(submenu_option(get_string("Main Handling")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::main::vars::m_vars.m_type = 0; })); + + add_option(submenu_option(get_string("Boat Handling")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::main::vars::m_vars.m_type = 1; }) + .add_requirement([] { return m_vars.m_in_boat; })); + + add_option(submenu_option(get_string("Bike Handling")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::main::vars::m_vars.m_type = 2; }) + .add_requirement([] { return m_vars.m_in_bike; })); + + add_option(submenu_option(get_string("Flying Handling")) + .add_submenu() + .add_click([] { vehicle::modifiers::handling::main::vars::m_vars.m_type = 3; }) + .add_requirement([] { return m_vars.m_in_flying; })); + + add_option(button_option("~c~" + get_string("Boat Handling")) + .add_requirement([] { return !m_vars.m_in_boat; })); + + add_option(button_option("~c~" + get_string("Bike Handling")) + .add_requirement([] { return !m_vars.m_in_bike; })); + + add_option(button_option("~c~" + get_string("Flying Handling")) + .add_requirement([] { return !m_vars.m_in_flying; })); +} + +void vehicle_modifiers_handling_menu::feature_update() {} + +vehicle_modifiers_handling_menu* g_instance; +vehicle_modifiers_handling_menu* vehicle_modifiers_handling_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_modifiers_handling_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/modifiers/vehicle_modifiers_handling.h b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/vehicle_modifiers_handling.h new file mode 100644 index 0000000..63cfb3c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/modifiers/vehicle_modifiers_handling.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_modifiers_handling_menu : public menu::submenu::submenu { +public: + static vehicle_modifiers_handling_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_modifiers_handling_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::modifiers::handling::vars { + struct variables { + int m_type = 0; + + bool m_in_boat; + bool m_in_bike; + bool m_in_flying; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_acrobatics.cpp b/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_acrobatics.cpp new file mode 100644 index 0000000..70e694e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_acrobatics.cpp @@ -0,0 +1,39 @@ +#include "vehicle_movement_acrobatics.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_movement.h" +#include "global/lists.h" + +using namespace vehicle::movement::acrobatics::vars; + +namespace vehicle::movement::acrobatics::vars { + variables m_vars; +} + +void vehicle_movement_acrobatics_menu::load() { + set_name("Acrobatics"); + set_parent(); +} + +void vehicle_movement_acrobatics_menu::update() {} + +void vehicle_movement_acrobatics_menu::update_once() { + clear_options(0); + + for (scroll_struct, math::vector3_>>& acrobat : global::lists::g_acrobatics) { + add_option(button_option(acrobat.m_name.get()) + .add_click([=] { vehicle::movement::vars::run_acrobatic(menu::player::get_local_player().m_vehicle, acrobat.m_result); })); + } +} + +void vehicle_movement_acrobatics_menu::feature_update() {} + +vehicle_movement_acrobatics_menu* g_instance; +vehicle_movement_acrobatics_menu* vehicle_movement_acrobatics_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_movement_acrobatics_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_acrobatics.h b/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_acrobatics.h new file mode 100644 index 0000000..b6b2dae --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_acrobatics.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_movement_acrobatics_menu : public menu::submenu::submenu { +public: + static vehicle_movement_acrobatics_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_movement_acrobatics_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::movement::acrobatics::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_parachute.cpp b/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_parachute.cpp new file mode 100644 index 0000000..b7e6b72 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_parachute.cpp @@ -0,0 +1,66 @@ +#include "vehicle_movement_parachute.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_movement.h" +#include "rage/engine.h" +#include "../../vehicle.h" + +using namespace vehicle::movement::parachute::vars; + +namespace vehicle::movement::parachute::vars { + variables m_vars; + + void deploy() { + if (menu::player::get_local_player().m_in_vehicle) { + if (native::get_entity_height_above_ground(menu::player::get_local_player().m_vehicle) > 5.f) { + if (native::is_this_model_a_heli(native::get_entity_model(menu::player::get_local_player().m_vehicle))) return; + + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [=] (Vehicle veh) { + uint64_t address = rage::engine::get_entity_address(veh); + if (address) { + uint64_t model_info = *(uint64_t*)(address + 0x20); + if (model_info) { + *(uint8_t*)(model_info + 0x58C) |= 1; + } + + *(bool*)(address + 0x1A5D) = true; + native::set_vehicle_parachute_active(veh, true); + } + }); + } + } + } +} + +void vehicle_movement_parachute_menu::load() { + set_name("Parachute"); + set_parent(); + + add_option(button_option("Deploy") + .add_translate().add_hotkey() + .add_click(deploy)); + + add_option(toggle_option("Auto Deploy") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_auto_deploy).add_savable(get_submenu_name_stack())); +} + +void vehicle_movement_parachute_menu::update() {} + +void vehicle_movement_parachute_menu::update_once() {} + +void vehicle_movement_parachute_menu::feature_update() { + if (m_vars.m_auto_deploy) { + deploy(); + } +} + +vehicle_movement_parachute_menu* g_instance; +vehicle_movement_parachute_menu* vehicle_movement_parachute_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_movement_parachute_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_parachute.h b/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_parachute.h new file mode 100644 index 0000000..2dc1338 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/movement/vehicle_movement_parachute.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_movement_parachute_menu : public menu::submenu::submenu { +public: + static vehicle_movement_parachute_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_movement_parachute_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::movement::parachute::vars { + struct variables { + bool m_auto_deploy; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/seats/vehicle_seats_edit.cpp b/GTAV/src/menu/base/submenus/main/vehicle/seats/vehicle_seats_edit.cpp new file mode 100644 index 0000000..9a35c2e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/seats/vehicle_seats_edit.cpp @@ -0,0 +1,41 @@ +#include "vehicle_seats_edit.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle_seats.h" + +using namespace vehicle::seats::edit::vars; + +namespace vehicle::seats::edit::vars { + variables m_vars; + + void click() { + if (menu::player::get_local_player().m_in_vehicle) { + native::clear_ped_tasks_immediately(native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, m_vars.m_seat, 0)); + } + } +} + +void vehicle_seats_edit_menu::load() { + set_name("Seats"); + set_parent(); + + add_option(button_option("Kick") + .add_translate() + .add_click(click)); +} + +void vehicle_seats_edit_menu::update() {} + +void vehicle_seats_edit_menu::update_once() {} + +void vehicle_seats_edit_menu::feature_update() {} + +vehicle_seats_edit_menu* g_instance; +vehicle_seats_edit_menu* vehicle_seats_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_seats_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/seats/vehicle_seats_edit.h b/GTAV/src/menu/base/submenus/main/vehicle/seats/vehicle_seats_edit.h new file mode 100644 index 0000000..390e120 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/seats/vehicle_seats_edit.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_seats_edit_menu : public menu::submenu::submenu { +public: + static vehicle_seats_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_seats_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::seats::edit::vars { + struct variables { + int m_seat; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_autopilot.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_autopilot.cpp new file mode 100644 index 0000000..6c08fb7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_autopilot.cpp @@ -0,0 +1,106 @@ +#include "vehicle_autopilot.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" + +using namespace vehicle::autopilot::vars; + +namespace vehicle::autopilot::vars { + variables m_vars; + + scroll_struct> destinations[] = { + { localization("Wander", true), { 0.f, 0.f, 0.f } }, + { localization("Waypoint", true), { 0.f, 0.f, 0.f } }, + { localization("Eclipse Towers", true), { -775.0500f, 312.32f, 85.7f } }, + { localization("Los Santos Airport", true), { -1102.2910f, -2894.5160f, 13.9467f } }, + { localization("Fort Zancudo", true), { -2012.8470f, 2956.5270f, 32.8101f } }, + { localization("Mount Chiliad", true), { 430.2037f, 5614.7340f, 766.1684f } }, + { localization("Diamond Casino", true), { 919.94f, 50.7f, 80.90f } }, + }; + + scroll_struct styles[] = { + { localization("Normal", true), 786603 }, + { localization("Ignore Stops", true), 2883621 }, + { localization("Rushed", true), 1074528293 } + }; + + void disable() { + native::clear_ped_tasks_immediately(menu::player::get_local_player().m_ped); + native::set_ped_into_vehicle(menu::player::get_local_player().m_ped, menu::player::get_local_player().m_vehicle, -1); + } + + void enable() { + disable(); + + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { + switch (m_vars.m_destinations) { + case 0: + native::task_vehicle_drive_wander(menu::player::get_local_player().m_ped, veh, m_vars.m_speed, styles[m_vars.m_styles].m_result); + break; + + case 1: + if (native::does_blip_exist(native::get_first_blip_info_id(8))) { + math::vector3 coords = native::get_blip_coords(native::get_first_blip_info_id(8)); + native::task_vehicle_drive_to_coord_longrange(menu::player::get_local_player().m_ped, veh, coords.x, coords.y, coords.z, m_vars.m_speed, styles[m_vars.m_styles].m_result, 15.f); + } else { + menu::notify::stacked(vehicle_autopilot_menu::get()->get_string("Autopilot"), vehicle_autopilot_menu::get()->get_string("No waypoint found")); + } + + break; + + case 2: + case 3: + case 4: + case 5: + case 6: + math::vector3_ coords = destinations[m_vars.m_destinations].m_result; + native::task_vehicle_drive_to_coord_longrange(menu::player::get_local_player().m_ped, veh, coords.x, coords.y, coords.z, m_vars.m_speed, styles[m_vars.m_styles].m_result, 15.f); + break; + } + }); + } +} + +void vehicle_autopilot_menu::load() { + set_name("Autopilot"); + set_parent(); + + add_string("Autopilot"); + add_string("No waypoint found"); + + add_option(scroll_option>(SCROLL, "Destination") + .add_translate() + .add_scroll(m_vars.m_destinations, 0, NUMOF(destinations), destinations)); + + add_option(scroll_option(SCROLL, "Style") + .add_translate() + .add_scroll(m_vars.m_styles, 0, NUMOF(styles), styles)); + + add_option(number_option(SCROLL, "Speed") + .add_translate() + .add_number(m_vars.m_speed, "%.0f", 1.f).add_min(0).add_max(200.f).show_max()); + + add_option(button_option("Enable Autopilot") + .add_translate().add_hotkey() + .add_click(enable)); + + add_option(button_option("Disable Autopilot") + .add_translate().add_hotkey() + .add_click(disable)); +} + +void vehicle_autopilot_menu::update() {} + +void vehicle_autopilot_menu::update_once() {} + +void vehicle_autopilot_menu::feature_update() {} + +vehicle_autopilot_menu* g_instance; +vehicle_autopilot_menu* vehicle_autopilot_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_autopilot_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_autopilot.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_autopilot.h new file mode 100644 index 0000000..3ebbefb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_autopilot.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_autopilot_menu : public menu::submenu::submenu { +public: + static vehicle_autopilot_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_autopilot_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::autopilot::vars { + struct variables { + int m_destinations; + int m_styles; + + float m_speed = 20.f; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_boost.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_boost.cpp new file mode 100644 index 0000000..91480e4 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_boost.cpp @@ -0,0 +1,138 @@ +#include "vehicle_boost.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "rage/engine.h" + +using namespace vehicle::boost::vars; + +namespace vehicle::boost::vars { + variables m_vars; + + void boost(Vehicle ve, bool Forwards, bool disable_fx) { + vehicle::vars::run_task(ve, [=](Vehicle veh) { + if (m_vars.m_boost_fx && !disable_fx) { + native::set_vehicle_boost_active(veh, true); + native::start_screen_effect("RaceTurbo", -1, false); + } + + if (m_vars.m_boost_sound && !disable_fx) { + native::request_script_audio_bank("DLC_IMPORTEXPORT/STEAL_STUNT", false, -1); + native::play_sound_from_entity(-1, "Speed_Boost", veh, "DLC_IE_Stunt_Man_Sounds", false, 0); + } + + native::set_vehicle_forward_speed(veh, Forwards ? m_vars.m_boost_forwards + native::get_entity_speed(veh) : -m_vars.m_boost_backwards); + + if (m_vars.m_boost_fx && !disable_fx) { + native::stop_screen_effect("RaceTurbo"); + native::set_vehicle_boost_active(veh, false); + } + }); + } +} + +void vehicle_boost_menu::load() { + set_name("Boost"); + set_parent(); + + add_option(toggle_option("Boost FX") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_boost_fx).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Boost Sound") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_boost_sound).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Nitrous Oxide (Horn)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_nitrous_oxide).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLLSELECT, "Boost Forwards") + .add_translate().add_hotkey() + .add_number(m_vars.m_boost_forwards, "%i", 1).add_min(0).add_max(5000).set_scroll_speed(10).show_max() + .add_click([] { boost(menu::player::get_local_player().m_vehicle, true); })); + + add_option(number_option(SCROLLSELECT, "Boost Backwards") + .add_translate().add_hotkey() + .add_number(m_vars.m_boost_backwards, "%i", 1).add_min(0).add_max(5000).set_scroll_speed(10).show_max() + .add_click([] { boost(menu::player::get_local_player().m_vehicle, false); })); + + add_option(toggle_option("Unlimited Special Ability") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_unlimited_special_ability).add_savable(get_submenu_name_stack())); +} + +void vehicle_boost_menu::update() {} + +void vehicle_boost_menu::update_once() {} + +void vehicle_boost_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_unlimited_special_ability) { + if (native::has_vehicle_rocket_boost(menu::player::get_local_player().m_vehicle)) { + static std::pair yes = { 0, false }; + + if (native::is_vehicle_rocket_boost_active(menu::player::get_local_player().m_vehicle)) { + if (!yes.second) { + yes.second = true; + yes.first = GetTickCount() + 3500; + } + + native::set_vehicle_rocket_boost_refill_time(menu::player::get_local_player().m_vehicle, 0.0f); + native::set_vehicle_rocket_boost_percentage(menu::player::get_local_player().m_vehicle, 100.f); + + if (yes.second) { + if (GetTickCount() > yes.first) { + yes.second = false; + native::set_vehicle_rocket_boost_active(menu::player::get_local_player().m_vehicle, false); + } + } + } + } + } + + static bool reset = false; + if (m_vars.m_nitrous_oxide) { + Vehicle veh = menu::player::get_local_player().m_vehicle; + if (native::is_horn_active(veh)) { + if (m_vars.m_boost_fx) { + native::set_vehicle_boost_active(veh, true); + native::start_screen_effect("RaceTurbo", -1, false); + } + + native::set_vehicle_engine_power_multiplier(menu::player::get_local_player().m_vehicle, 10.f); + + uint64_t address = rage::engine::get_entity_address(veh); + if (address) { + *(float*)(address + 0x1360) = 30.f; + } + + if (m_vars.m_boost_fx) { + native::stop_screen_effect("RaceTurbo"); + native::set_vehicle_boost_active(veh, false); + } + + reset = true; + } else { + if (reset) { + uint64_t address = rage::engine::get_entity_address(veh); + if (address) { + *(float*)(address + 0x1360) = 1.f; + } + + reset = false; + } + } + } + } +} + +vehicle_boost_menu* g_instance; +vehicle_boost_menu* vehicle_boost_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_boost_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_boost.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_boost.h new file mode 100644 index 0000000..5911e73 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_boost.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_boost_menu : public menu::submenu::submenu { +public: + static vehicle_boost_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_boost_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::boost::vars { + struct variables { + bool m_boost_fx; + bool m_boost_sound; + bool m_nitrous_oxide; + bool m_unlimited_special_ability; + + int m_boost_forwards = 40; + int m_boost_backwards = 40; + }; + + void boost(Vehicle ve, bool Forwards, bool disable_fx = false); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_collision.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_collision.cpp new file mode 100644 index 0000000..e19ac1b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_collision.cpp @@ -0,0 +1,52 @@ +#include "vehicle_collision.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" + +using namespace vehicle::collision::vars; + +namespace vehicle::collision::vars { + variables m_vars; +} + +void vehicle_collision_menu::load() { + set_name("Collision"); + set_parent(); + + add_option(toggle_option("Disable Full Collision") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_full_collision) + .add_click([] { if (!m_vars.m_disable_full_collision) if (menu::player::get_local_player().m_in_vehicle) native::set_entity_collision(menu::player::get_local_player().m_vehicle, true, true); })); + + add_option(toggle_option("Disable Vehicle Collision") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_vehicle_collision)); +} + +void vehicle_collision_menu::update() {} + +void vehicle_collision_menu::update_once() {} + +void vehicle_collision_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_disable_full_collision) { + native::set_entity_collision(menu::player::get_local_player().m_vehicle, !m_vars.m_disable_full_collision, true); + } + + if (m_vars.m_disable_vehicle_collision) { + global::vars::g_vehicle_pool->for_each([](Entity veh, void*) { + native::set_entity_no_collision_entity(veh, menu::player::get_local_player().m_vehicle, true); + }); + } + } +} + +vehicle_collision_menu* g_instance; +vehicle_collision_menu* vehicle_collision_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_collision_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_collision.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_collision.h new file mode 100644 index 0000000..a75b13a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_collision.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_collision_menu : public menu::submenu::submenu { +public: + static vehicle_collision_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_collision_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::collision::vars { + struct variables { + bool m_disable_full_collision; + bool m_disable_vehicle_collision; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_customs.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_customs.cpp new file mode 100644 index 0000000..8e2e798 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_customs.cpp @@ -0,0 +1,1325 @@ +#include "vehicle_customs.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "menu/base/util/global.h" +#include "customs/vehicle_customs_lsc.h" +#include "customs/vehicle_customs_bumpers.h" +#include "customs/vehicle_customs_fender.h" +#include "customs/vehicle_customs_horn.h" +#include "customs/vehicle_customs_lights.h" +#include "customs/vehicle_customs_respray.h" +#include "customs/vehicle_customs_wheels.h" +#include "customs/vehicle_customs_interior.h" +#include "rage/types/global_types.h" + +using namespace vehicle::customs::vars; + +namespace vehicle::customs::vars { + variables m_vars; + + scroll_struct shop[] = { + { localization("Los Santos Customs", true), 0 }, + { localization("Benny's Original Motorworks", true), 0 } + }; + + namespace scripts { + void func_1666(float fParam0, float fParam1, float fParam2, float fParam3, int iParam4, int iParam5, int iParam6, int iParam7) { + std::pair texture = menu::renderer::get_texture(global::ui::m_vehicle_stats_bar); + menu::renderer::draw_sprite_aligned(texture, { fParam0, fParam1 }, { fParam2, fParam3 }, 0.f, { iParam4, iParam5, iParam6, iParam7 }); + } + + void draw_vehicle_stat_rects(float fParam0, float fParam1, float fParam2, float fParam3, int iParam4, int iParam5, int iParam6, int iParam7) { + float fVar0; + float fVar1; + float fVar2; + int iVar3; + + fVar0 = ((125.f - 8.f) * 0.00078125f); + fVar1 = (125.f * 0.00078125f); + fVar2 = fParam0; + iVar3 = 0; + while (iVar3 < 5) { + if (fParam2 > ((fVar0 / 100.f) * 20.f)) { + func_1666(fVar2, fParam1, ((fVar0 / 100.f) * 20.f), fParam3, iParam4, iParam5, iParam6, iParam7); + } else if (fParam2 > 0.f) { + func_1666(fVar2, fParam1, fParam2, fParam3, iParam4, iParam5, iParam6, iParam7); + } + + fParam2 = (fParam2 - ((fVar0 / 100.f) * 20.f)); + fVar2 = (fVar2 + ((fVar1 / 100.f) * 20.f)); + iVar3++; + } + } + + void func_1665(int iParam0, int* uParam1, int* uParam2, int* uParam3) { + switch (iParam0) { + case 0: + *uParam1 = 8; + *uParam2 = 8; + *uParam3 = 8; + break; + + case 1: + *uParam1 = 37; + *uParam2 = 37; + *uParam3 = 39; + break; + + case 22: + *uParam1 = 140; + *uParam2 = 146; + *uParam3 = 154; + break; + + case 23: + *uParam1 = 91; + *uParam2 = 93; + *uParam3 = 94; + break; + + case 6: + *uParam1 = 81; + *uParam2 = 84; + *uParam3 = 89; + break; + + case 111: + *uParam1 = 240; + *uParam2 = 240; + *uParam3 = 240; + break; + + case 28: + *uParam1 = 150; + *uParam2 = 8; + *uParam3 = 0; + break; + + case 34: + *uParam1 = 38; + *uParam2 = 3; + *uParam3 = 6; + break; + + case 88: + *uParam1 = 245; + *uParam2 = 137; + *uParam3 = 15; + break; + + case 45: + *uParam1 = 74; + *uParam2 = 22; + *uParam3 = 7; + break; + + case 56: + *uParam1 = 45; + *uParam2 = 58; + *uParam3 = 53; + break; + + case 58: + *uParam1 = 71; + *uParam2 = 120; + *uParam3 = 60; + break; + + case 54: + *uParam1 = 77; + *uParam2 = 98; + *uParam3 = 104; + break; + + case 73: + *uParam1 = 14; + *uParam2 = 49; + *uParam3 = 109; + break; + + case 68: + *uParam1 = 22; + *uParam2 = 34; + *uParam3 = 72; + break; + + case 140: + *uParam1 = 0; + *uParam2 = 174; + *uParam3 = 239; + break; + + case 131: + *uParam1 = 255; + *uParam2 = 183; + *uParam3 = 0; + break; + + case 90: + *uParam1 = 142; + *uParam2 = 140; + *uParam3 = 70; + break; + + case 97: + *uParam1 = 156; + *uParam2 = 141; + *uParam3 = 113; + break; + + case 89: + *uParam1 = 145; + *uParam2 = 115; + *uParam3 = 71; + break; + + case 105: + *uParam1 = 98; + *uParam2 = 68; + *uParam3 = 40; + break; + + case 100: + *uParam1 = 124; + *uParam2 = 27; + *uParam3 = 68; + break; + + case 99: + *uParam1 = 114; + *uParam2 = 42; + *uParam3 = 63; + break; + + case 136: + *uParam1 = 246; + *uParam2 = 151; + *uParam3 = 153; + break; + + case 49: + *uParam1 = 32; + *uParam2 = 32; + *uParam3 = 44; + break; + + case 146: + *uParam1 = 26; + *uParam2 = 1; + *uParam3 = 23; + break; + + default: + *uParam1 = 255; + *uParam2 = 255; + *uParam3 = 255; + break; + } + } + + int func_243(int iParam0) { + if (iParam0 != -1) { + return native::is_bit_set(menu::script_global(rage::global::_155_property_base2).at(iParam0, rage::global::_155_property_base2_size).at(rage::global::_155_property_base2_offset1).as(), 6); + } + return 0; + } + + int func_1027(int iParam0) { + if (iParam0 != -1) { + return native::is_bit_set(menu::script_global(rage::global::_155_property_base2).at(iParam0, rage::global::_155_property_base2_size).at(rage::global::_155_property_base2_offset1).at(2).as(), 6); + } + return 0; + } + + int func_1013(int iParam0) { + if (iParam0 != -1) { + return native::is_bit_set(menu::script_global(rage::global::_155_property_base2).at(iParam0, rage::global::_155_property_base2_size).at(rage::global::_155_property_base2_offset1).at(3).as(), 4); + } + return 0; + } + + int is_model_a_bicycle(int iParam0) { + if (iParam0 == joaat("BMX")) { + return 1; + } + if (iParam0 == joaat("CRUISER")) { + return 1; + } + if (iParam0 == joaat("SCORCHER")) { + return 1; + } + if ((iParam0 == joaat("TRIBIKE") || iParam0 == joaat("TRIBIKE2")) || iParam0 == joaat("TRIBIKE3")) { + return 1; + } + if (iParam0 == joaat("FIXTER")) { + return 1; + } + return 0; + } + + int func_2480(int iParam0) { + switch (iParam0) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 17: + case 18: + case 19: + case 20: + case 22: + return 0; + break; + + case 14: + return 3; + break; + + case 15: + return 1; + break; + + case 16: + return 2; + break; + } + return -1; + } + + int func_19(int iParam0, int iParam1) { + switch (iParam0) { + case 0: + switch (iParam1) { + case 0: + return 0; + + case 1: + return 1; + + case 2: + return 2; + + case 3: + return 3; + + case 4: + return 4; + + case 5: + return 5; + + case 6: + return 6; + + case 7: + return 7; + + case 8: + return 8; + + case 9: + return 9; + + case 10: + return 10; + + case 11: + return 11; + + case 12: + return 12; + + case 13: + return 13; + + case 14: + return 17; + + case 15: + return 18; + + case 16: + return 19; + + case 17: + return 20; + + case 18: + return 22; + } + break; + + case 3: + switch (iParam1) { + case 0: + return 14; + } + break; + + case 1: + switch (iParam1) { + case 0: + return 15; + } + break; + + case 2: + switch (iParam1) { + case 0: + return 16; + } + break; + } + return -1; + } + + float func_18(int iParam0) { + if (iParam0 == 7) { + return 51.77096f; + } + + return native::get_vehicle_class_estimated_speed(iParam0); + } + + bool flag = false; + + void populate_globals(int* uParam0) { + int iVar0; + int iVar1; + float fVar2; + + if (!flag) { + iVar1 = func_19(uParam0[0], uParam0[1]); + if (iVar1 == -1) { + uParam0[0]++; + uParam0[1] = 0; + if (uParam0[0] >= 4) { + flag = 1; + } + return; + } else { + iVar0 = iVar1; + + if ((iVar0 == 15 || iVar0 == 16) || iVar0 == 14) { + fVar2 = native::get_vehicle_class_max_agility(iVar0); + } else { + fVar2 = native::get_vehicle_class_max_traction(iVar0); + } + + if (m_vars.m_values[uParam0[0]][0] < func_18(iVar0)) + m_vars.m_values[uParam0[0]][0] = func_18(iVar0); + if (m_vars.m_values[uParam0[0]][1] < native::get_vehicle_class_max_acceleration(iVar0)) + m_vars.m_values[uParam0[0]][1] = native::get_vehicle_class_max_acceleration(iVar0); + if (m_vars.m_values[uParam0[0]][2] < native::get_vehicle_class_max_braking(iVar0)) + m_vars.m_values[uParam0[0]][2] = native::get_vehicle_class_max_braking(iVar0); + if (m_vars.m_values[uParam0[0]][3] < fVar2) + m_vars.m_values[uParam0[0]][3] = fVar2; + + uParam0[1]++; + } + } + } + + void get_vehicle_stats(int iParam0, vehicle_stats* uParam1) { + float fVar1; + int iVar2; + float fVar3; + + if (func_243(menu::player::get_local_player().m_id) && native::does_entity_exist(menu::script_global(rage::global::_155_customs_base).at(304).at(0).as())) {// 1.55 good + if (iParam0 == menu::script_global(rage::global::_155_customs_base).at(304).at(1).as() || iParam0 == menu::script_global(rage::global::_155_customs_base2).as()) {// 1.55 good + return; + } + } + + if (func_1027(menu::player::get_local_player().m_id) && native::does_entity_exist(menu::script_global(rage::global::_155_customs_base).at(308).as())) {// 1.55 good + if (iParam0 == menu::script_global(rage::global::_155_customs_base).at(308).as()) {// 1.55 good + return; + } + } + + if (func_1013(menu::player::get_local_player().m_id) && native::does_entity_exist(menu::script_global(rage::global::_155_customs_base).at(325).as())) {// 1.55 good + if (iParam0 == menu::script_global(rage::global::_155_customs_base).at(325).as()) { // 1.55 good + return; + } + } + + if (!native::is_entity_dead(iParam0, 0)) { + if (!uParam1->m_success) { + fVar1 = 1.f; + iVar2 = native::get_entity_model(iParam0); + + if (is_model_a_bicycle(iVar2)) { + fVar1 = 0.5f; + } else { + fVar1 = 1.f; + } + + uParam1->m_estimated_max_speed = native::get_vehicle_estimated_max_speed(iParam0); + uParam1->m_braking = (native::get_vehicle_max_braking(iParam0) * fVar1); + uParam1->m_acceleration = (native::get_vehicle_acceleration(iParam0) * fVar1); + + if (iVar2 == joaat("VOLTIC")) { + uParam1->m_acceleration = (native::get_vehicle_acceleration(iParam0) * 2.f); + } + + if (iVar2 == joaat("tezeract")) { + uParam1->m_acceleration = (native::get_vehicle_acceleration(iParam0) * 2.6753f); + } + + if (iVar2 == joaat("jester3")) { + uParam1->m_estimated_max_speed = (native::get_vehicle_estimated_max_speed(iParam0) * 0.9890084f); + } + + if (iVar2 == joaat("freecrawler")) { + uParam1->m_estimated_max_speed = (native::get_vehicle_estimated_max_speed(iParam0) * 0.9788762f); + } + + if (iVar2 == joaat("swinger")) { + uParam1->m_estimated_max_speed = (native::get_vehicle_estimated_max_speed(iParam0) * 0.9650553f); + } + + if (iVar2 == joaat("menacer")) { + uParam1->m_estimated_max_speed = (native::get_vehicle_estimated_max_speed(iParam0) * 0.9730466f); + } + + if (iVar2 == joaat("speedo4")) { + uParam1->m_estimated_max_speed = (native::get_vehicle_estimated_max_speed(iParam0) * 0.9426523f); + } + + if (native::is_this_model_a_heli(iVar2) || native::is_this_model_a_plane(iVar2)) { + fVar3 = (native::_0xC6AD107DDC9054CC(iVar2) * fVar1); + } else if (native::is_this_model_a_boat(iVar2)) { + fVar3 = (native::_0x5AA3F878A178C4FC(iVar2) * fVar1); + } else { + fVar3 = (native::get_vehicle_max_traction(iParam0) * fVar1); + } + + uParam1->m_traction = fVar3; + if (iVar2 == joaat("T20")) { + uParam1->m_acceleration = (uParam1->m_acceleration - 0.05f); + } else if (iVar2 == joaat("VINDICATOR")) { + uParam1->m_acceleration = (uParam1->m_acceleration - 0.02f); + } + + while (!flag) { + populate_globals(m_vars.m_global_stats); + } + + int iVar4 = func_2480(native::get_vehicle_class(iParam0)); + if (iVar4 == -1) { + uParam1->m_success = false; + uParam1->m_estimated_max_speed = 0.f; + uParam1->m_acceleration = 0.f; + uParam1->m_braking = 0.f; + uParam1->m_traction = 0.f; + return; + } + + uParam1->m_estimated_max_speed = ((uParam1->m_estimated_max_speed / m_vars.m_values[iVar4][0]) * 100.f); + if (uParam1->m_estimated_max_speed > 100.f) { + uParam1->m_estimated_max_speed = 100.f; + } + + uParam1->m_acceleration = ((uParam1->m_acceleration / m_vars.m_values[iVar4][1]) * 100.f); + if (uParam1->m_acceleration > 100.f) { + uParam1->m_acceleration = 100.f; + } + + uParam1->m_braking = ((uParam1->m_braking / m_vars.m_values[iVar4][2]) * 100.f); + if (uParam1->m_braking > 100.f) { + uParam1->m_braking = 100.f; + } + + uParam1->m_traction = ((uParam1->m_traction / m_vars.m_values[iVar4][3]) * 100.f); + if (uParam1->m_traction > 100.f) { + uParam1->m_traction = 100.f; + } + + uParam1->m_success = true; + } + } + } + + void draw_vehicle_stats(Vehicle Veh) { + std::vector> options = menu::submenu::handler::get_current()->get_options(); + int count = (int)std::count_if(begin(options), end(options), [](std::shared_ptr option) { return option->is_visible(); }); + + if (count > menu::base::get_max_options()) { + count = menu::base::get_max_options(); + } + + float Y = global::ui::g_position.y + ((count + 1) * global::ui::g_option_scale) + 0.0025f; + + std::pair texture = menu::renderer::get_texture(global::ui::m_vehicle_stats_background); + menu::renderer::draw_sprite_aligned(texture, { global::ui::g_position.x, Y }, { global::ui::g_scale.x, 0.15f }, 0.f, global::ui::g_main_header.opacity(220)); + + float fVar42 = (125.f - 8.f); + + int iVar43 = 0; + int iVar44 = 0; + int iVar45 = 0; + int iVar46 = 0; + + float new_font_size = menu::renderer::get_normalized_font_scale(global::ui::g_option_font, global::ui::g_option_height); + + float fVar49 = 0.0115f; + menu::renderer::draw_text("Top Speed", { global::ui::g_position.x + 0.004f, (Y + fVar49) }, new_font_size, global::ui::g_option_font, { 255, 255, 255, 255 }); + fVar49 = (fVar49 + 0.034722f); + + menu::renderer::draw_text("Acceleration", { global::ui::g_position.x + 0.004f, (Y + fVar49) }, new_font_size, global::ui::g_option_font, { 255, 255, 255, 255 }); + fVar49 = (fVar49 + 0.034722f); + + menu::renderer::draw_text("Braking", { global::ui::g_position.x + 0.004f, (Y + fVar49) }, new_font_size, global::ui::g_option_font, { 255, 255, 255, 255 }); + fVar49 = (fVar49 + 0.034722f); + + menu::renderer::draw_text("Traction", { global::ui::g_position.x + 0.004f, (Y + fVar49) }, new_font_size, global::ui::g_option_font, { 255, 255, 255, 255 }); + + native::get_hud_colour(1, &iVar43, &iVar44, &iVar45, &iVar46); + iVar46 = 76; + + float fVar51 = 0.017f; + draw_vehicle_stat_rects(global::ui::g_position.x + 0.11f, (Y + fVar51), (0.00078125f * fVar42), (0.00138888f * 6.f), iVar43, iVar44, iVar45, iVar46); // faint bars - w=0.09140625 + + fVar51 = (fVar51 + 0.034722f); + draw_vehicle_stat_rects(global::ui::g_position.x + 0.11f, (Y + fVar51), (0.00078125f * fVar42), (0.00138888f * 6.f), iVar43, iVar44, iVar45, iVar46); // faint bars + + fVar51 = (fVar51 + 0.034722f); + draw_vehicle_stat_rects(global::ui::g_position.x + 0.11f, (Y + fVar51), (0.00078125f * fVar42), (0.00138888f * 6.f), iVar43, iVar44, iVar45, iVar46); // faint bars + + fVar51 = (fVar51 + 0.034722f); + draw_vehicle_stat_rects(global::ui::g_position.x + 0.11f, (Y + fVar51), (0.00078125f * fVar42), (0.00138888f * 6.f), iVar43, iVar44, iVar45, iVar46); // faint bars + + fVar51 = 0.017f; + + scripts::flag = 0; + m_vars.m_new_stats.m_success = false; + get_vehicle_stats(Veh, &m_vars.m_new_stats); + + int iVar58 = 0; + float fVar52 = 0.f; + float fVar53 = 0.f; + + float CachedData[] = { m_vars.m_cached_stats.m_estimated_max_speed, m_vars.m_cached_stats.m_acceleration, m_vars.m_cached_stats.m_braking, m_vars.m_cached_stats.m_traction }; + float NewData[] = { m_vars.m_new_stats.m_estimated_max_speed, m_vars.m_new_stats.m_acceleration, m_vars.m_new_stats.m_braking, m_vars.m_new_stats.m_traction }; + + while (iVar58 < 4) { + fVar52 = (0.00078125f * ((fVar42 / 100.f) * (NewData[iVar58] - CachedData[iVar58]))); + fVar53 = (0.00078125f * ((fVar42 / 100.f) * CachedData[iVar58])); + + // handles showing what the upgrade will do for u + if (fVar52 < 0.f) { + native::get_hud_colour(6, &iVar43, &iVar44, &iVar45, &iVar46); + draw_vehicle_stat_rects(global::ui::g_position.x + 0.11f, (Y + fVar51), fVar53, (0.00138888f * 6.f), iVar43, iVar44, iVar45, iVar46); // less -> red + fVar53 = (fVar53 + fVar52); + } else { + native::get_hud_colour(9, &iVar43, &iVar44, &iVar45, &iVar46); + draw_vehicle_stat_rects(global::ui::g_position.x + 0.11f, (Y + fVar51), (fVar53 + fVar52), (0.00138888f * 6.f), iVar43, iVar44, iVar45, iVar46); // more -> blue + } + + native::get_hud_colour(1, &iVar43, &iVar44, &iVar45, &iVar46); + draw_vehicle_stat_rects(global::ui::g_position.x + 0.11f, (Y + fVar51), fVar53, (0.00138888f * 6.f), iVar43, iVar44, iVar45, 255); // old value + fVar51 = (fVar51 + 0.034722f); + iVar58++; + } + } + }; + + bool can_run_lsc() { + if (!menu::player::get_local_player().m_in_vehicle) return false; + + for (int i = MOD_SPOILER; i <= MOD_BACKWHEELS; i++) { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, i) > 0) { + return true; + } + } + + return false; + } + + bool can_run_bennys() { + if (!menu::player::get_local_player().m_in_vehicle) return false; + + int count = 0; + for (int i = MOD_PLATEHOLDER; i <= MOD_LIVERY; i++) { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, i) > 0) { + count++; + } + } + + if (count > 1) return true; + + // fuck livery + if (count == 1) { + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_LIVERY) > 0) return false; + return true; + } + + return false; + } + + int get_size() { + int count = 0; + count += (int)can_run_lsc(); + count += (int)can_run_bennys(); + return count; + } + + void update_caches() { + m_vars.m_cached_stats.m_success = false; + scripts::get_vehicle_stats(menu::player::get_local_player().m_vehicle, &m_vars.m_cached_stats); + } + + void cache_vehicle_stats() { + if (!menu::player::get_local_player().m_in_vehicle) { + return; + } + + scripts::flag = 0; + m_vars.m_global_stats[0] = m_vars.m_global_stats[1] = 0; + m_vars.m_cached_stats.m_success = false; + scripts::get_vehicle_stats(menu::player::get_local_player().m_vehicle, &m_vars.m_cached_stats); + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + m_vars.m_cached_stats.m_armor = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARMOR); + m_vars.m_cached_stats.m_brakes = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_BRAKES); + m_vars.m_cached_stats.m_front_bumper = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER); + m_vars.m_cached_stats.m_rear_bumper = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER); + m_vars.m_cached_stats.m_engine = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE); + m_vars.m_cached_stats.m_exhaust = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_EXHAUST); + m_vars.m_cached_stats.m_hood = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HOOD); + m_vars.m_cached_stats.m_horn = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS); + m_vars.m_cached_stats.m_skirts = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SIDESKIRT); + m_vars.m_cached_stats.m_suspension = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SUSPENSION); + m_vars.m_cached_stats.m_transmission = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRANSMISSION); + m_vars.m_cached_stats.m_spoiler = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPOILER); + m_vars.m_cached_stats.m_grille = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_GRILLE); + m_vars.m_cached_stats.m_left_fender = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FENDER); + m_vars.m_cached_stats.m_right_fender = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER); + m_vars.m_cached_stats.m_roof = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ROOF); + m_vars.m_cached_stats.m_chassis = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_CHASSIS); + m_vars.m_cached_stats.m_window_tint = native::get_vehicle_window_tint(menu::player::get_local_player().m_vehicle); + m_vars.m_cached_stats.m_turbo = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_TURBO); + m_vars.m_cached_stats.m_lights = native::is_toggle_mod_on(menu::player::get_local_player().m_vehicle, MOD_XENONLIGHTS); + m_vars.m_cached_stats.m_xenon_color = native::get_vehicle_xenon_lights_colour(menu::player::get_local_player().m_vehicle); + m_vars.m_cached_stats.m_plate_index = native::get_vehicle_number_plate_text_index(menu::player::get_local_player().m_vehicle); + + // Bennys + m_vars.m_cached_stats.m_bennys_plateholder = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_PLATEHOLDER); + m_vars.m_cached_stats.m_bennys_vanity_plate = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_VANITY_PLATES); + m_vars.m_cached_stats.m_bennys_trim_design = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRIM_DESIGN); + m_vars.m_cached_stats.m_bennys_ornaments = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ORNAMENTS); + m_vars.m_cached_stats.m_bennys_interior_design = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DASHBOARD); + m_vars.m_cached_stats.m_bennys_dials = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DIAL); + m_vars.m_cached_stats.m_bennys_doors = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_DOOR_SPEAKER); + m_vars.m_cached_stats.m_bennys_seats = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SEATS); + m_vars.m_cached_stats.m_bennys_steering_wheel = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_STEERINGWHEEL); + m_vars.m_cached_stats.m_bennys_shifter = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SHIFTER_LEAVERS); + m_vars.m_cached_stats.m_bennys_plaques = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_PLAQUES); + m_vars.m_cached_stats.m_bennys_trunk = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRUNK); + m_vars.m_cached_stats.m_bennys_audio_install = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPEAKERS); + m_vars.m_cached_stats.m_bennys_hydraulics = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HYDRULICS); + m_vars.m_cached_stats.m_bennys_engine_block = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE_BLOCK); + m_vars.m_cached_stats.m_bennys_air_filters = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_AIR_FILTER); + m_vars.m_cached_stats.m_bennys_stunt_brace = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_STRUTS); + m_vars.m_cached_stats.m_bennys_arch_covers = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARCH_COVER); + m_vars.m_cached_stats.m_bennys_aerials = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_AERIALS); + m_vars.m_cached_stats.m_bennys_rear_stripe_color = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRIM); + m_vars.m_cached_stats.m_bennys_tank = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TANK); + m_vars.m_cached_stats.m_bennys_window_mod = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_WINDOWS); + m_vars.m_cached_stats.m_bennys_livery = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_LIVERY); + m_vars.m_cached_stats.m_bennys_special_front_rims = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPECIAL_FRONT_RIMS); + m_vars.m_cached_stats.m_bennys_special_rear_rims = native::get_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPECIAL_REAR_RIMS); + + for (int i = 0; i < 4; i++) { + m_vars.m_cached_stats.m_neon[i] = native::is_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, i); + } + + native::get_vehicle_neon_lights_colour(menu::player::get_local_player().m_vehicle, &m_vars.m_cached_stats.m_neon_color.r, &m_vars.m_cached_stats.m_neon_color.g, &m_vars.m_cached_stats.m_neon_color.b); + } + + std::string get_vehicle_mod_name(eVehicleModTypes type, std::string default) { + if (native::does_text_label_exist(native::get_mod_slot_name(menu::player::get_local_player().m_vehicle, type))) { + if (strcmp(native::get_label_text(native::get_mod_slot_name(menu::player::get_local_player().m_vehicle, type)), "NULL")) { + return native::get_label_text(native::get_mod_slot_name(menu::player::get_local_player().m_vehicle, type)); + } + } + + return default; + } + + bool can_run_bennys_interior() { + if (!menu::player::get_local_player().m_in_vehicle) { + return false; + } + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_DASHBOARD) > 0 + || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_DIAL) > 0 + || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_DOOR_SPEAKER) > 0 + || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SEATS) > 0 + || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_STEERINGWHEEL) > 0 + || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_ORNAMENTS) > 0 + || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SHIFTER_LEAVERS) > 0 + || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SPEAKERS) > 0) { + return true; + } + + return false; + } +} + +void vehicle_customs_menu::load() { + set_name("Customs"); + set_parent(); + + add_option(scroll_option(SCROLL, "Shop") + .add_scroll(m_vars.m_type, 0, get_size(), shop) + .add_update([](scroll_option* option, int pos) { option->add_scroll(m_vars.m_type, 0, get_size(), shop); }) + .add_click([this] { update_once(); })); + + add_string("Armor"); + add_string("Brakes"); + add_string("Bumpers"); + add_string("Chassis"); + add_string("Engine"); + add_string("Exhaust"); + add_string("Fenders"); + add_string("Grille"); + add_string("Hood"); + add_string("Horn"); + add_string("Lights"); + add_string("Plate"); + add_string("Respray"); + add_string("Roof"); + add_string("Skirts"); + add_string("Spoiler"); + add_string("Suspension"); + add_string("Transmission"); + add_string("Turbo"); + add_string("Wheels"); + add_string("Windows"); + add_string("Interior"); + add_string("Aerials"); + add_string("Air Filters"); + add_string("Arch Covers"); + add_string("Engine Block"); + add_string("Hydraulics"); + add_string("Livery"); + add_string("Plaques"); + add_string("Plate Holder"); + add_string("Rear Stripe"); + add_string("Stunt Brace"); + add_string("Tank"); + add_string("Trim Design"); + add_string("Trunk"); + add_string("Vanity Plate"); + add_string("Window Mod"); +} + +void vehicle_customs_menu::update() { + if (!menu::player::get_local_player().m_in_vehicle) { + menu::submenu::handler::set_submenu_previous(true); + return; + } + + scripts::draw_vehicle_stats(menu::player::get_local_player().m_vehicle); +} + +void vehicle_customs_menu::update_once() { + if (m_vars.m_type == -1) m_vars.m_type = 0; + + if (m_vars.m_update_cache) { + m_vars.m_update_cache = false; + + if (menu::player::get_local_player().m_in_vehicle) { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARMOR, m_vars.m_cached_stats.m_armor, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_BRAKES, m_vars.m_cached_stats.m_brakes, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER, m_vars.m_cached_stats.m_front_bumper, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER, m_vars.m_cached_stats.m_rear_bumper, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE, m_vars.m_cached_stats.m_engine, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_EXHAUST, m_vars.m_cached_stats.m_exhaust, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HOOD, m_vars.m_cached_stats.m_hood, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HORNS, m_vars.m_cached_stats.m_horn, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SIDESKIRT, m_vars.m_cached_stats.m_skirts, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SUSPENSION, m_vars.m_cached_stats.m_suspension, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRANSMISSION, m_vars.m_cached_stats.m_transmission, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_SPOILER, m_vars.m_cached_stats.m_spoiler, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_GRILLE, m_vars.m_cached_stats.m_grille, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_FENDER, m_vars.m_cached_stats.m_left_fender, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER, m_vars.m_cached_stats.m_right_fender, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ROOF, m_vars.m_cached_stats.m_roof, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_CHASSIS, m_vars.m_cached_stats.m_chassis, false); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TURBO, (bool)m_vars.m_cached_stats.m_turbo); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_XENONLIGHTS, (bool)m_vars.m_cached_stats.m_lights); + native::set_vehicle_xenon_lights_colour(menu::player::get_local_player().m_vehicle, m_vars.m_cached_stats.m_xenon_color); + native::set_vehicle_window_tint(menu::player::get_local_player().m_vehicle, m_vars.m_cached_stats.m_window_tint); + native::set_vehicle_number_plate_text_index(menu::player::get_local_player().m_vehicle, m_vars.m_cached_stats.m_plate_index); + + native::set_vehicle_neon_lights_colour(menu::player::get_local_player().m_vehicle, m_vars.m_cached_stats.m_neon_color.r, m_vars.m_cached_stats.m_neon_color.g, m_vars.m_cached_stats.m_neon_color.b); + + for (int i = 0; i < 4; i++) { + native::set_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, i, m_vars.m_cached_stats.m_neon[i]); + } + + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_PLATEHOLDER, m_vars.m_cached_stats.m_bennys_plateholder, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_VANITY_PLATES, m_vars.m_cached_stats.m_bennys_vanity_plate, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRIM_DESIGN, m_vars.m_cached_stats.m_bennys_trim_design, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_PLAQUES, m_vars.m_cached_stats.m_bennys_plaques, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRUNK, m_vars.m_cached_stats.m_bennys_trunk, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_HYDRULICS, m_vars.m_cached_stats.m_bennys_hydraulics, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ENGINE_BLOCK, m_vars.m_cached_stats.m_bennys_engine_block, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_AIR_FILTER, m_vars.m_cached_stats.m_bennys_air_filters, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_STRUTS, m_vars.m_cached_stats.m_bennys_stunt_brace, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_ARCH_COVER, m_vars.m_cached_stats.m_bennys_arch_covers, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_AERIALS, m_vars.m_cached_stats.m_bennys_aerials, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TRIM, m_vars.m_cached_stats.m_bennys_rear_stripe_color, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TANK, m_vars.m_cached_stats.m_bennys_tank, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_WINDOWS, m_vars.m_cached_stats.m_bennys_window_mod, false); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_LIVERY, m_vars.m_cached_stats.m_bennys_livery, false); + } + } + + cache_vehicle_stats(); + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + + clear_options(1); + + // LSC + if (m_vars.m_type == 0) { + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_ARMOR)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_ARMOR, get_string("Armor"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_ARMOR; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_armor; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_BRAKES)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_BRAKES, get_string("Brakes"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_BRAKES; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_brakes; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTBUMPER) || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_REARBUMPER)) { + add_option(submenu_option(get_string("Bumpers")) + .add_submenu() + .add_click(cache_vehicle_stats)); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_CHASSIS)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_CHASSIS, get_string("Chassis"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_CHASSIS; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_chassis; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_ENGINE)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_ENGINE, get_string("Engine"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_ENGINE; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_engine; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_EXHAUST)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_EXHAUST, get_string("Exhaust"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_EXHAUST; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_exhaust; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FENDER) || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_RIGHTFENDER)) { + add_option(submenu_option(get_string("Fenders")) + .add_submenu() + .add_click(cache_vehicle_stats)); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_GRILLE)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_GRILLE, get_string("Grille"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_GRILLE; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_grille; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_HOOD)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_HOOD, get_string("Hood"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_HOOD; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_hood; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_HORNS)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_HORNS, get_string("Horn"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + })); + } + + add_option(submenu_option(get_string("Lights")) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_XENONLIGHTS; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_lights; + })); + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_LIVERY)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_LIVERY, get_string("Livery"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_LIVERY; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_livery; + })); + } + + add_option(submenu_option(get_string("Plate")) + .add_submenu() + .add_click([] { cache_vehicle_stats(); vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_PLATES; })); + + add_option(submenu_option(get_string("Respray")) + .add_submenu() + .add_click(cache_vehicle_stats)); + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_ROOF)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_ROOF, get_string("Roof"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_ROOF; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_roof; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SIDESKIRT)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_SIDESKIRT, get_string("Skirts"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_SIDESKIRT; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_skirts; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SPOILER)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_SPOILER, get_string("Spoiler"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_SPOILER; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_spoiler; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_SUSPENSION)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_SUSPENSION, get_string("Suspension"))) + .add_submenu() + .add_click([] { cache_vehicle_stats(); vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_SUSPENSION; })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_TRANSMISSION)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_TRANSMISSION, get_string("Transmission"))) + .add_submenu() + .add_click([] { cache_vehicle_stats(); vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_TRANSMISSION; })); + } + + add_option(submenu_option(get_string("Turbo")) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_TURBO; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_turbo; + })); + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS) || native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_BACKWHEELS)) { + add_option(submenu_option(get_string("Wheels")) + .add_submenu() + .add_click(cache_vehicle_stats)); + + if (m_vars.m_wheel_sport.empty()) { + int cached = native::get_vehicle_wheel_type(menu::player::get_local_player().m_vehicle); + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 0); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_sport.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 1); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_muscle.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 2); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_lowrider.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 3); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_suv.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 4); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_offroad.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 5); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_tuner.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 6); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_bike.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 7); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_high_end.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 8); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_bennys.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 9); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_bespoke.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 10); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_open.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 11); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_street.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, 12); + for (int i = 0; i < native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS); i++) { + m_vars.m_wheel_track.push_back({ native::get_mod_text_label(menu::player::get_local_player().m_vehicle, MOD_FRONTWHEELS, i), i }); + } + + native::set_vehicle_wheel_type(menu::player::get_local_player().m_vehicle, cached); + } + } + + if (native::is_this_model_a_car(native::get_entity_model(menu::player::get_local_player().m_vehicle))) { + add_option(submenu_option(get_string("Windows")) + .add_submenu() + .add_click([] { cache_vehicle_stats(); vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_WINDOWS_CUSTOM; })); + } + + return; + } + + // Bennys + if (m_vars.m_type == 1) { + add_option(submenu_option(get_string("Interior")) + .add_submenu() + .add_requirement(can_run_bennys_interior)); + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_AERIALS)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_AERIALS, get_string("Aerials"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_AERIALS; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_aerials; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_AIR_FILTER)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_AIR_FILTER, get_string("Air Filters"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_AIR_FILTER; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_air_filters; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_ARCH_COVER)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_ARCH_COVER, get_string("Arch Covers"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_ARCH_COVER; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_arch_covers; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_ENGINE_BLOCK)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_ENGINE_BLOCK, get_string("Engine Block"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_ENGINE_BLOCK; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_engine_block; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_HYDRULICS)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_HYDRULICS, get_string("Hydraulics"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_HYDRULICS; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_hydraulics; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_LIVERY)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_LIVERY, get_string("Livery"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_LIVERY; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_livery; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_PLAQUES)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_PLAQUES, get_string("Plaques"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_PLAQUES; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_plaques; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_PLATEHOLDER)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_PLATEHOLDER, get_string("Plate Holder"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_PLATEHOLDER; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_plateholder; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_TRIM)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_TRIM, get_string("Rear Stripe"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_TRIM; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_rear_stripe_color; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_STRUTS)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_STRUTS, get_string("Stunt Brace"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_STRUTS; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_stunt_brace; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_TANK)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_TANK, get_string("Tank"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_TANK; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_tank; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_TRIM_DESIGN)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_TRIM_DESIGN, get_string("Trim Design"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_TRIM_DESIGN; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_trim_design; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_TRUNK)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_TRUNK, get_string("Trunk"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_TRUNK; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_trunk; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_VANITY_PLATES)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_VANITY_PLATES, get_string("Vanity Plate"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_VANITY_PLATES; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_vanity_plate; + })); + } + + if (native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, MOD_WINDOWS)) { + add_option(submenu_option(get_vehicle_mod_name(MOD_WINDOWS, get_string("Window Mod"))) + .add_submenu() + .add_click([] { + cache_vehicle_stats(); + vehicle::customs::lsc::vars::m_vars.m_mod_type = MOD_WINDOWS; + vehicle::customs::lsc::vars::m_vars.m_value = &m_vars.m_cached_stats.m_bennys_window_mod; + })); + } + + return; + } +} + +void vehicle_customs_menu::feature_update() {} + +vehicle_customs_menu* g_instance; +vehicle_customs_menu* vehicle_customs_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_customs_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_customs.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_customs.h new file mode 100644 index 0000000..ab084d3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_customs.h @@ -0,0 +1,169 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_customs_menu : public menu::submenu::submenu { +public: + static vehicle_customs_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_customs_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::customs::vars { + struct vehicle_stats { + float m_estimated_max_speed; + float m_acceleration; + float m_braking; + float m_traction; + bool m_success; + + // Mods + int m_armor; + int m_brakes; + int m_front_bumper; + int m_rear_bumper; + int m_engine; + int m_exhaust; + int m_hood; + int m_horn; + int m_lights; + int m_skirts; + int m_suspension; + int m_transmission; + int m_spoiler; + int m_grille; + int m_left_fender; + int m_right_fender; + int m_roof; + int m_chassis; + int m_turbo; + int m_window_tint; + int m_xenon_color; + int m_plate_index; + bool m_neon[4] = { false, false, false, false }; + color_rgba m_neon_color = { 0, 0, 0, 0 }; + + // Bennys + int m_bennys_plateholder; + int m_bennys_vanity_plate; + int m_bennys_trim_design; + int m_bennys_ornaments; + int m_bennys_interior_design; + int m_bennys_dials; + int m_bennys_doors; + int m_bennys_seats; + int m_bennys_steering_wheel; + int m_bennys_shifter; + int m_bennys_plaques; + int m_bennys_trunk; + int m_bennys_audio_install; + int m_bennys_hydraulics; + int m_bennys_engine_block; + int m_bennys_air_filters; + int m_bennys_stunt_brace; + int m_bennys_arch_covers; + int m_bennys_aerials; + int m_bennys_rear_stripe_color; + int m_bennys_tank; + int m_bennys_window_mod; + int m_bennys_livery; + int m_bennys_special_front_rims; + int m_bennys_special_rear_rims; + + vehicle_stats() + : m_estimated_max_speed(0.f), + m_acceleration(0.f), + m_braking(0.f), + m_traction(0.f), + m_success(false), + m_window_tint(0), + m_spoiler(0), + m_grille(0), + m_left_fender(0), + m_right_fender(0), + m_plate_index(0), + m_xenon_color(0), + m_roof(0), + m_chassis(0), + m_armor(0), + m_brakes(0), + m_front_bumper(0), + m_rear_bumper(0), + m_engine(0), + m_exhaust(0), + m_hood(0), + m_horn(0), + m_lights(0), + m_skirts(0), + m_suspension(0), + m_transmission(0), + m_turbo(0), + + m_bennys_plateholder(0), + m_bennys_vanity_plate(0), + m_bennys_trim_design(0), + m_bennys_ornaments(0), + m_bennys_interior_design(0), + m_bennys_dials(0), + m_bennys_doors(0), + m_bennys_seats(0), + m_bennys_steering_wheel(0), + m_bennys_shifter(0), + m_bennys_plaques(0), + m_bennys_trunk(0), + m_bennys_audio_install(0), + m_bennys_hydraulics(0), + m_bennys_engine_block(0), + m_bennys_air_filters(0), + m_bennys_stunt_brace(0), + m_bennys_arch_covers(0), + m_bennys_aerials(0), + m_bennys_rear_stripe_color(0), + m_bennys_tank(0), + m_bennys_window_mod(0), + m_bennys_livery(0), + m_bennys_special_front_rims(0), + m_bennys_special_rear_rims(0) {} + }; + + struct variables { + int m_type = 0; + int m_global_stats[2] = { 0, 0 }; + float m_values[4][4]; + vehicle_stats m_cached_stats; + vehicle_stats m_new_stats; + bool m_update_cache = false; + + std::vector> m_wheel_sport; + std::vector> m_wheel_muscle; + std::vector> m_wheel_lowrider; + std::vector> m_wheel_suv; + std::vector> m_wheel_offroad; + std::vector> m_wheel_tuner; + std::vector> m_wheel_bike; + std::vector> m_wheel_high_end; + std::vector> m_wheel_bennys; + std::vector> m_wheel_bespoke; + std::vector> m_wheel_open; + std::vector> m_wheel_street; + std::vector> m_wheel_track; + }; + + bool can_run_lsc(); + bool can_run_bennys(); + int get_size(); + void update_caches(); + void cache_vehicle_stats(); + std::string get_vehicle_mod_name(eVehicleModTypes type, std::string default); + + namespace scripts { + void draw_vehicle_stats(Vehicle Veh); + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_doors.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_doors.cpp new file mode 100644 index 0000000..6ad1a5b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_doors.cpp @@ -0,0 +1,99 @@ +#include "vehicle_doors.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" + +using namespace vehicle::doors::vars; + +namespace vehicle::doors::vars { + variables m_vars; +} + +void vehicle_doors_menu::load() { + set_name("Doors"); + set_parent(); + + add_option(number_option(SCROLLSELECT, "Open Door") + .add_translate().add_hotkey() + .add_number(m_vars.m_open_door, "%i", 1).add_min(0).add_max(1) + .add_update([](number_option* option, int pos) { + if (menu::player::get_local_player().m_in_vehicle) { + option->add_max(native::get_number_of_vehicle_doors(menu::player::get_local_player().m_vehicle)); + } + }) + .add_click([] { + if (menu::player::get_local_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { + native::set_vehicle_door_open(veh, m_vars.m_open_door, false, false); + }); + } + })); + + add_option(number_option(SCROLLSELECT, "Close Door") + .add_translate().add_hotkey() + .add_number(m_vars.m_close_door, "%i", 1).add_min(0).add_max(1) + .add_update([](number_option* option, int pos) { + if (menu::player::get_local_player().m_in_vehicle) { + option->add_max(native::get_number_of_vehicle_doors(menu::player::get_local_player().m_vehicle)); + } + }) + .add_click([] { + if (menu::player::get_local_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { + native::set_vehicle_door_shut(veh, m_vars.m_close_door, false); + }); + } + })); + + add_option(number_option(SCROLLSELECT, "Delete Door") + .add_translate().add_hotkey() + .add_number(m_vars.m_delete_door, "%i", 1).add_min(0).add_max(1) + .add_update([](number_option* option, int pos) { + if (menu::player::get_local_player().m_in_vehicle) { + option->add_max(native::get_number_of_vehicle_doors(menu::player::get_local_player().m_vehicle)); + } + }) + .add_click([] { + if (menu::player::get_local_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { + native::set_vehicle_door_broken(veh, m_vars.m_delete_door, true); + }); + } + })); + + add_option(button_option("Lock Doors") + .add_translate().add_hotkey() + .add_click([] { + if (menu::player::get_local_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { + native::set_vehicle_doors_locked(veh, 4); + }); + } + })); + + add_option(button_option("Unlock Doors") + .add_translate().add_hotkey() + .add_click([] { + if (menu::player::get_local_player().m_in_vehicle) { + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { + native::set_vehicle_doors_locked(veh, 0); + }); + } + })); +} + +void vehicle_doors_menu::update() {} + +void vehicle_doors_menu::update_once() {} + +void vehicle_doors_menu::feature_update() {} + +vehicle_doors_menu* g_instance; +vehicle_doors_menu* vehicle_doors_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_doors_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_doors.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_doors.h new file mode 100644 index 0000000..b7a59a8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_doors.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_doors_menu : public menu::submenu::submenu { +public: + static vehicle_doors_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_doors_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::doors::vars { + struct variables { + int m_open_door; + int m_close_door; + int m_delete_door; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_gravity.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_gravity.cpp new file mode 100644 index 0000000..1a9f29e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_gravity.cpp @@ -0,0 +1,126 @@ +#include "vehicle_gravity.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "global/lists.h" +#include "menu/base/util/control.h" +#include "rage/engine.h" + +using namespace vehicle::gravity::vars; + +namespace vehicle::gravity::vars { + variables m_vars; + + void gravity() { + if (menu::player::get_local_player().m_in_vehicle) { + if (rage::engine::get_entity_address(menu::player::get_local_player().m_vehicle) == 0) return; + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { + rage::engine::set_vehicle_gravity(rage::engine::get_entity_address(veh), global::lists::g_gravity[m_vars.m_gravity].m_result); + }); + } + } +} + +void vehicle_gravity_menu::load() { + set_name("Gravity"); + set_parent(); + + add_option(scroll_option(SCROLL, "Gravity") + .add_translate() + .add_scroll(m_vars.m_gravity, 0, NUMOF(global::lists::g_gravity), global::lists::g_gravity) + .add_click(gravity)); + + add_option(toggle_option("Drive on Water") + .add_translate() + .add_toggle(m_vars.m_drive_on_water) + .add_click([] { + if (!m_vars.m_drive_on_water) { + if (native::does_entity_exist(m_vars.m_drive_on_water_entity)) { + native::set_entity_as_mission_entity(m_vars.m_drive_on_water_entity, true, true); + native::delete_entity(&m_vars.m_drive_on_water_entity); + } + } + })); + + add_option(toggle_option("Slippy Wheels") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_slippy_wheels).add_savable(get_submenu_name_stack()) + .add_click([] { if (!m_vars.m_slippy_wheels) if (menu::player::get_local_player().m_in_vehicle) native::set_vehicle_reduce_grip(menu::player::get_local_player().m_vehicle, false); })); + + add_option(toggle_option("Freeze") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_freeze).add_savable(get_submenu_name_stack()) + .add_click([] { if (!m_vars.m_freeze) if (menu::player::get_local_player().m_in_vehicle) native::freeze_entity_position(menu::player::get_local_player().m_vehicle, false); })); + + add_option(toggle_option("Stick to Ground") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_stick_to_ground).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Auto Flip") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_auto_flip).add_savable(get_submenu_name_stack())); + + add_option(button_option("Place on Ground") + .add_translate().add_hotkey() + .add_click([] { if (menu::player::get_local_player().m_in_vehicle) vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { native::set_vehicle_on_ground_properly(veh, 0); }); })); + +} + +void vehicle_gravity_menu::update() {} + +void vehicle_gravity_menu::update_once() {} + +void vehicle_gravity_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_slippy_wheels) { + native::set_vehicle_reduce_grip(menu::player::get_local_player().m_vehicle, true); + } + + if (m_vars.m_drive_on_water) { + math::vector3 coords = menu::player::get_local_player().m_coords; + + float water_height = 0.f; + native::get_water_height(coords.x, coords.y, coords.z, &water_height); + + math::vector3 adjusted = { coords.x, coords.y, water_height - 1.9f }; + + if (coords.z - water_height <= 3.f) { + if (!native::does_entity_exist(m_vars.m_drive_on_water_entity)) { + menu::control::simple_request_model(0xC42C019A); + m_vars.m_drive_on_water_entity = native::create_object(0xC42C019A, coords.x, coords.y, coords.z, true, false, false); + native::set_model_as_no_longer_needed(0xC42C019A); + } else { + native::set_entity_visible(m_vars.m_drive_on_water_entity, false, true); + native::set_entity_rotation(m_vars.m_drive_on_water_entity, 180.f, 90.f, 180.f, 2, false); + native::set_entity_coords(m_vars.m_drive_on_water_entity, adjusted.x, adjusted.y, adjusted.z, true, false, false, true); + native::freeze_entity_position(m_vars.m_drive_on_water_entity, true); + } + } + } + + if (m_vars.m_freeze) { + native::freeze_entity_position(menu::player::get_local_player().m_vehicle, true); + } + + if (m_vars.m_stick_to_ground) { + native::set_vehicle_on_ground_properly(menu::player::get_local_player().m_vehicle, 0); + } + + if (m_vars.m_auto_flip) { + if (!native::is_entity_upright(menu::player::get_local_player().m_vehicle, 120.f)) { + math::vector3 rotation = native::get_entity_rotation(menu::player::get_local_player().m_vehicle, 0); + native::set_entity_rotation(menu::player::get_local_player().m_vehicle, 0.f, rotation.y, rotation.z, 0, true); + } + } + } +} + +vehicle_gravity_menu* g_instance; +vehicle_gravity_menu* vehicle_gravity_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_gravity_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_gravity.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_gravity.h new file mode 100644 index 0000000..0533842 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_gravity.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_gravity_menu : public menu::submenu::submenu { +public: + static vehicle_gravity_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_gravity_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::gravity::vars { + struct variables { + int m_gravity; + bool m_slippy_wheels; + bool m_drive_on_water; + bool m_freeze; + bool m_stick_to_ground; + bool m_auto_flip; + + Entity m_drive_on_water_entity; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_health.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_health.cpp new file mode 100644 index 0000000..434d117 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_health.cpp @@ -0,0 +1,65 @@ +#include "vehicle_health.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" + +using namespace vehicle::health::vars; + +namespace vehicle::health::vars { + variables m_vars; +} + +void vehicle_health_menu::load() { + set_name("Health"); + set_parent(); + + add_option(button_option("Repair Vehicle") + .add_translate().add_hotkey() + .add_click([] { vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { native::set_vehicle_fixed(veh); }); })); + + add_option(button_option("Wash Vehicle") + .add_translate().add_hotkey() + .add_click([] { vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { native::set_vehicle_dirt_level(menu::player::get_local_player().m_vehicle, 0.f); }); })); + + add_option(button_option("Dirty Vehicle") + .add_translate().add_hotkey() + .add_click([] { vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [](Vehicle veh) { native::set_vehicle_dirt_level(menu::player::get_local_player().m_vehicle, 15.f); }); })); + + add_option(toggle_option("Auto Repair") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_auto_repair).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Auto Wash") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_auto_wash).add_savable(get_submenu_name_stack())); +} + +void vehicle_health_menu::update() {} + +void vehicle_health_menu::update_once() {} + +void vehicle_health_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_auto_repair) { + if (native::is_vehicle_damaged(menu::player::get_local_player().m_vehicle)) { + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [] (Vehicle veh) { + native::set_vehicle_fixed(veh); + }); + } + } + + if (m_vars.m_auto_wash) { + native::set_vehicle_dirt_level(menu::player::get_local_player().m_vehicle, 0.f); + } + } +} + +vehicle_health_menu* g_instance; +vehicle_health_menu* vehicle_health_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_health_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_health.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_health.h new file mode 100644 index 0000000..b915282 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_health.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_health_menu : public menu::submenu::submenu { +public: + static vehicle_health_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_health_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::health::vars { + struct variables { + bool m_auto_repair; + bool m_auto_wash; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_modifiers.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_modifiers.cpp new file mode 100644 index 0000000..12fddc8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_modifiers.cpp @@ -0,0 +1,139 @@ +#include "vehicle_modifiers.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "rage/engine.h" +#include "modifiers/vehicle_modifiers_handling.h" + +using namespace vehicle::modifiers::vars; + +namespace vehicle::modifiers::vars { + variables m_vars; + + void set_suspension() { + if (menu::player::get_local_player().m_in_vehicle) { + uint64_t address = rage::engine::get_entity_address(menu::player::get_local_player().m_vehicle); + if (address) { + if (*(uint32_t*)(address + 0xBE8) <= 10) { + *(float*)(address + 0x19DC) = -m_vars.m_suspension; + } + } + } + } + + void set_tire_scale() { + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + rage::types::vehicle* veh = global::vars::g_ped_factory->m_local_ped->m_vehicle; + if (veh->m_vehicle_draw_handler) { + if (veh->m_vehicle_draw_handler->m_vehicle_stream_render) { + veh->m_vehicle_draw_handler->m_vehicle_stream_render->m_tire_size = m_vars.m_tire_size; + } + } + } + } + } + } + + void set_tire_width() { + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + rage::types::vehicle* veh = global::vars::g_ped_factory->m_local_ped->m_vehicle; + if (veh->m_vehicle_draw_handler) { + if (veh->m_vehicle_draw_handler->m_vehicle_stream_render) { + veh->m_vehicle_draw_handler->m_vehicle_stream_render->m_tire_width = m_vars.m_tire_width; + } + } + } + } + } + } +} + +void vehicle_modifiers_menu::load() { + set_name("Modifiers"); + set_parent(); + + add_string("Wheel Scale"); + add_string("Wheel Width"); + add_string("Handling"); + add_string("Advanced Suspension"); +} + +void vehicle_modifiers_menu::update() { + m_vars.m_has_suspension = false; + m_vars.m_has_custom_wheels = false; + + if (menu::player::get_local_player().m_in_vehicle) { + uint64_t address = rage::engine::get_entity_address(menu::player::get_local_player().m_vehicle); + if (address) { + if (*(uint32_t*)(address + 0xBE8) <= 10) { + m_vars.m_has_suspension = true; + m_vars.m_suspension = -*(float*)(address + 0x19DC); + } + + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_vehicle) { + rage::types::vehicle* veh = global::vars::g_ped_factory->m_local_ped->m_vehicle; + if (veh->m_vehicle_draw_handler) { + if (veh->m_vehicle_draw_handler->m_vehicle_stream_render) { + m_vars.m_has_custom_wheels = true; + m_vars.m_tire_size = veh->m_vehicle_draw_handler->m_vehicle_stream_render->m_tire_size; + m_vars.m_tire_width = veh->m_vehicle_draw_handler->m_vehicle_stream_render->m_tire_width; + } + } + } + } + } + } + } +} + +void vehicle_modifiers_menu::update_once() { + clear_options(0); + + add_option(submenu_option(get_string("Handling")) + .add_submenu() + .add_requirement([] { return menu::player::get_local_player().m_in_vehicle; })); + + add_option(number_option(SCROLL, get_string("Advanced Suspension")) + .add_number(m_vars.m_suspension, "%.2f", 0.01f).add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max() + .add_click(set_suspension) + .add_requirement([] { return m_vars.m_has_suspension; })); + + add_option(number_option(SCROLL, get_string("Wheel Scale")) + .add_number(m_vars.m_tire_size, "%.2f", 0.01f).add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max() + .add_click(set_tire_scale) + .add_requirement([] { return m_vars.m_has_custom_wheels; })); + + add_option(number_option(SCROLL, get_string("Wheel Width")) + .add_number(m_vars.m_tire_width, "%.2f", 0.01f).add_min(-100.f).add_max(100.f).set_scroll_speed(10).show_max() + .add_click(set_tire_width) + .add_requirement([] { return m_vars.m_has_custom_wheels; })); + + add_option(button_option("~c~" + get_string("Handling")) + .add_requirement([] { return !menu::player::get_local_player().m_in_vehicle; })); + + add_option(button_option("~c~" + get_string("Wheel Scale")) + .add_requirement([] { return !m_vars.m_has_custom_wheels; }) + .add_tooltip("You need custom tires to edit wheels")); + + add_option(button_option("~c~" + get_string("Wheel Width")) + .add_requirement([] { return !m_vars.m_has_custom_wheels; }) + .add_tooltip("You need custom tires to edit wheels")); +} + +void vehicle_modifiers_menu::feature_update() {} + +vehicle_modifiers_menu* g_instance; +vehicle_modifiers_menu* vehicle_modifiers_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_modifiers_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_modifiers.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_modifiers.h new file mode 100644 index 0000000..4f353b6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_modifiers.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_modifiers_menu : public menu::submenu::submenu { +public: + static vehicle_modifiers_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_modifiers_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::modifiers::vars { + struct variables { + float m_suspension; + float m_tire_size; + float m_tire_width; + + bool m_has_suspension; + bool m_has_custom_wheels; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_movement.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_movement.cpp new file mode 100644 index 0000000..861fa99 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_movement.cpp @@ -0,0 +1,127 @@ +#include "vehicle_movement.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "movement/vehicle_movement_parachute.h" +#include "movement/vehicle_movement_acrobatics.h" + +using namespace vehicle::movement::vars; + +namespace vehicle::movement::vars { + variables m_vars; + + void run_acrobatic(Vehicle vehicle, std::pair, math::vector3_> data) { + if (vehicle) { + vehicle::vars::run_task(vehicle, [=] (Vehicle veh){ + native::apply_force_to_entity(veh, 1, data.first.x, data.first.y, data.first.z, data.second.x, data.second.y, data.second.z, 0, true, true, true, false, true); + }); + } + } + + void limit_max_speed() { + native::set_entity_max_speed(menu::player::get_local_player().m_vehicle, m_vars.m_limit_max_speed ? m_vars.m_limit_max_speed_val / global::vars::g_selected_metric_system.first : 500.f); + } + + void bypass_max_speed() { + native::set_entity_max_speed(menu::player::get_local_player().m_vehicle, 9999999.f); + } +} + +void vehicle_movement_menu::load() { + set_name("Movement"); + set_parent(); + + add_option(submenu_option("Acrobatics") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Parachute") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Bypass Max Speed") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_max_speed).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Limit Max Speed") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_limit_max_speed) + .add_number(m_vars.m_limit_max_speed_val, "%.0f", 1.f).add_min(0).add_max(99999) + .add_click([] { m_vars.m_disable_max_speed = false; vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [] (Vehicle veh) { limit_max_speed(); }); }).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Flying Vehicle") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_flying_vehicle) + .add_number(m_vars.m_flying_vehicle_speed, "%.1f", 0.1f).add_min(0.5f).add_max(1000.f) + .add_click([] { if (!m_vars.m_flying_vehicle) if (menu::player::get_local_player().m_in_vehicle) native::set_entity_collision(menu::player::get_local_player().m_vehicle, true, true); })); + + add_option(toggle_option("Flying Vehicle Pause") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_flying_vehicle_pause).add_savable(get_submenu_name_stack()) + .add_tooltip("Pause vehicle after input loss") + .add_requirement([] { return m_vars.m_flying_vehicle; })); +} + +void vehicle_movement_menu::update() {} + +void vehicle_movement_menu::update_once() {} + +void vehicle_movement_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_flying_vehicle) { + if (native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, -1, 0) == menu::player::get_local_player().m_ped) { + auto apply_force_relative = [] (std::uint32_t handle, math::vector3 direction) { + native::apply_force_to_entity(handle, true, direction.x, direction.y, direction.z, 0.f, 0.f, 0.f, true, true, true, true, false, true); + }; + + int left_right = native::get_control_value(2, 188); + int up_down = native::get_control_value(2, 189); + + auto w_down = GetKeyState('W') & 0x8000 || up_down == 0; + auto s_down = GetKeyState('S') & 0x8000 || up_down == 254; + auto d_down = GetKeyState('D') & 0x8000 || left_right == 254; + auto a_down = GetKeyState('A') & 0x8000 || left_right == 0; + + auto veh = menu::player::get_local_player().m_vehicle; + + if (w_down || s_down || d_down || a_down) { + if (w_down) + apply_force_relative(veh, math::vector3(0, 1.0f * m_vars.m_flying_vehicle_speed, 0)); + + if (s_down) + apply_force_relative(veh, math::vector3(0, -1.0f * m_vars.m_flying_vehicle_speed, 0)); + + if (d_down) + apply_force_relative(veh, math::vector3(1.0f * m_vars.m_flying_vehicle_speed, 0, 0)); + + if (a_down) + apply_force_relative(veh, math::vector3(-1.0f * m_vars.m_flying_vehicle_speed, 0, 0)); + } else { + if (m_vars.m_flying_vehicle_pause) + native::set_entity_velocity(veh, 0, 0, 0); + } + + auto cam_rot = native::get_gameplay_cam_rot(0); + native::set_entity_rotation(veh, cam_rot.x, cam_rot.y, cam_rot.z, 0, true); + } + } + + if (m_vars.m_disable_max_speed) { + bypass_max_speed(); + } + + if (m_vars.m_limit_max_speed) { + limit_max_speed(); + } + } +} + +vehicle_movement_menu* g_instance; +vehicle_movement_menu* vehicle_movement_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_movement_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_movement.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_movement.h new file mode 100644 index 0000000..c93eb24 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_movement.h @@ -0,0 +1,31 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_movement_menu : public menu::submenu::submenu { +public: + static vehicle_movement_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_movement_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::movement::vars { + struct variables { + bool m_flying_vehicle; + bool m_flying_vehicle_pause; + bool m_flying_vehicle_mouse = true; + bool m_disable_max_speed; + bool m_limit_max_speed; + + float m_flying_vehicle_speed = 10.f; + float m_limit_max_speed_val; + }; + + void run_acrobatic(Vehicle veh, std::pair, math::vector3_> data); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_multipliers.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_multipliers.cpp new file mode 100644 index 0000000..54ce05e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_multipliers.cpp @@ -0,0 +1,110 @@ +#include "vehicle_multipliers.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "rage/engine.h" + +using namespace vehicle::multipliers::vars; + +namespace vehicle::multipliers::vars { + variables m_vars; + + void cache_traction() { + if (menu::player::get_local_player().m_in_vehicle) { + rage::types::ped_factory* factory = global::vars::g_ped_factory; + if (factory) { + rage::types::ped* Ped = factory->m_local_ped; + if (Ped) { + rage::types::vehicle* vehicle = Ped->m_vehicle; + if (vehicle) { + rage::types::handling_data* handling = vehicle->m_handling_data; + if (handling) { + m_vars.m_traction_curve_max = handling->m_traction_curve_max; + m_vars.m_cached_traction = true; + return; + } + } + } + } + } + + m_vars.m_cached_traction = false; + } + + void set_traction() { + if (menu::player::get_local_player().m_in_vehicle) { + rage::types::ped_factory* factory = global::vars::g_ped_factory; + if (factory) { + rage::types::ped* Ped = factory->m_local_ped; + if (Ped) { + rage::types::vehicle* vehicle = Ped->m_vehicle; + if (vehicle) { + rage::types::handling_data* handling = vehicle->m_handling_data; + if (handling) { + handling->m_traction_curve_max = m_vars.m_traction_curve_max; + } + } + } + } + } + } +} + +void vehicle_multipliers_menu::load() { + set_name("Multipliers"); + set_parent(); + + add_option(number_option(SCROLL, "Power (RPM)") + .add_translate() + .add_number(m_vars.m_rpm, "%.0f", 1.f).add_min(1.f).add_max(10000.f).show_max().set_scroll_speed(10) + .add_click([] { + if (menu::player::get_local_player().m_in_vehicle) { + native::set_vehicle_engine_power_multiplier(menu::player::get_local_player().m_vehicle, m_vars.m_rpm); + } + })); + + add_option(number_option(SCROLL, "Torque") + .add_translate() + .add_number(m_vars.m_torque, "%.0f", 1.f).add_min(1.f).add_max(10000.f).show_max().set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Headlight") + .add_translate() + .add_number(m_vars.m_headlight, "%.0f", 1.f).add_min(1.f).add_max(150.f).show_max().set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Traction") + .add_translate() + .add_number(m_vars.m_traction_curve_max, "%.1f", 0.1f).add_min(0.f).add_max(1000.f).show_max().set_scroll_speed(10) + .add_click(set_traction) + .add_requirement([] { return m_vars.m_cached_traction; })); +} + +void vehicle_multipliers_menu::update() {} + +void vehicle_multipliers_menu::update_once() { + cache_traction(); +} + +void vehicle_multipliers_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_torque != 1.f) { + uint64_t address = rage::engine::get_entity_address(menu::player::get_local_player().m_vehicle); + if (address) { + *(float*)(address + 0x1360) = m_vars.m_torque; + } + } + + if (m_vars.m_headlight != 1.f) { + native::set_vehicle_light_multiplier(menu::player::get_local_player().m_vehicle, m_vars.m_headlight); + } + } +} + +vehicle_multipliers_menu* g_instance; +vehicle_multipliers_menu* vehicle_multipliers_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_multipliers_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_multipliers.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_multipliers.h new file mode 100644 index 0000000..5562617 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_multipliers.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_multipliers_menu : public menu::submenu::submenu { +public: + static vehicle_multipliers_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_multipliers_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::multipliers::vars { + struct variables { + float m_rpm = 1.f; + float m_torque = 1.f; + float m_headlight = 1.f; + float m_traction_curve_max = 1.f; + + bool m_cached_traction = false; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_particles.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_particles.cpp new file mode 100644 index 0000000..ff15465 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_particles.cpp @@ -0,0 +1,109 @@ +#include "vehicle_particles.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "global/lists.h" +#include "menu/base/util/timers.h" + +using namespace vehicle::particles::vars; + +namespace vehicle::particles::vars { + variables m_vars; +} + +void vehicle_particles_menu::load() { + set_name("Particle FX"); + set_parent(); + + add_option(toggle_option("Toggle Particle FX") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_toggle).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Particle") + .add_translate() + .add_scroll(m_vars.m_particle, 0, NUMOF(global::lists::g_particles), global::lists::g_particles).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Scale") + .add_translate() + .add_number(m_vars.m_scale, "%.2f", 0.01f).add_min(0.01f).add_max(10.f).set_scroll_speed(10).add_savable(get_submenu_name_stack())); + + add_option(break_option("Bones") + .add_translate()); +} + +void vehicle_particles_menu::update() {} + +void vehicle_particles_menu::update_once() { + clear_options(3); + + for (int i = 0; i < NUMOF(global::lists::g_vehicle_bones); i++) { + scroll_struct bone = global::lists::g_vehicle_bones[i]; + + if (native::get_entity_bone_index_by_name(menu::player::get_local_player().m_vehicle, bone.m_result) > 0) { + add_option(toggle_option(bone.m_name.get()) + .add_toggle(m_vars.m_bones[i])); + } else { + m_vars.m_bones[i] = false; + } + } +} + +void vehicle_particles_menu::feature_update() { + static int timer[11]; + static int timer2[16]; + + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_toggle) { + for (int i = 0; i < NUMOF(global::lists::g_vehicle_bones); i++) { + if (m_vars.m_bones[i]) { + if (i == NUMOF(global::lists::g_vehicle_bones) - 1) { + for (int j = 0; j < 16; j++) { + int index = native::get_entity_bone_index_by_name(menu::player::get_local_player().m_vehicle, j == 0 ? "exhaust" : util::va::va("exhaust_%i", j)); + + if (index) { + math::vector3 coords = native::get_world_position_of_entity_bone(menu::player::get_local_player().m_vehicle, index); + if (!coords.is_null()) { + scroll_struct particle = global::lists::g_particles[m_vars.m_particle]; + + menu::timers::run_timed(&timer2[j], 100, [=] { + native::request_named_ptfx_asset(particle.m_result.m_dict); + native::use_particle_fx_asset_next_call(particle.m_result.m_dict); + native::start_particle_fx_non_looped_at_coord2(particle.m_result.m_texture, coords.x, coords.y, coords.z, 0.f, 0.f, 0.f, m_vars.m_scale, false, false, false); + }); + } + } + } + } else { + scroll_struct bone = global::lists::g_vehicle_bones[i]; + int index = native::get_entity_bone_index_by_name(menu::player::get_local_player().m_vehicle, bone.m_result); + + if (index) { + math::vector3 coords = native::get_world_position_of_entity_bone(menu::player::get_local_player().m_vehicle, index); + if (!coords.is_null()) { + scroll_struct particle = global::lists::g_particles[m_vars.m_particle]; + + menu::timers::run_timed(&timer[i], 100, [=] { + native::request_named_ptfx_asset(particle.m_result.m_dict); + native::use_particle_fx_asset_next_call(particle.m_result.m_dict); + native::start_particle_fx_non_looped_at_coord2(particle.m_result.m_texture, coords.x, coords.y, coords.z, 0.f, 0.f, 0.f, m_vars.m_scale, false, false, false); + }); + } + } else { + m_vars.m_bones[i] = false; + } + } + } + } + } + } +} + +vehicle_particles_menu* g_instance; +vehicle_particles_menu* vehicle_particles_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_particles_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_particles.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_particles.h new file mode 100644 index 0000000..7369587 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_particles.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_particles_menu : public menu::submenu::submenu { +public: + static vehicle_particles_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_particles_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::particles::vars { + struct variables { + bool m_toggle; + bool m_bones[10]; + int m_particle; + float m_scale = 0.2f; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_ramps.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_ramps.cpp new file mode 100644 index 0000000..61947ba --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_ramps.cpp @@ -0,0 +1,148 @@ +#include "vehicle_ramps.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "menu/base/util/control.h" + +using namespace vehicle::ramps::vars; + +namespace vehicle::ramps::vars { + variables m_vars; + + Object create_attached_ramp(Entity attach_to, uint32_t model, int pos = 0, bool opacitated = true) { + menu::control::simple_request_model(model); + + math::vector3 min, max; + native::get_model_dimensions(model, &min, &max); + + math::vector3 dim = { max.x - min.x, max.y - min.y, max.z - min.z }; + + math::vector3 coords = native::get_entity_coords(attach_to, true); + Object ramp = native::create_object(model, coords.x, coords.y, coords.z, true, true, false); + + switch (pos) { + case 0: + native::attach_entity_to_entity(ramp, attach_to, 0, /**/ 0, dim.y, -0.5, /**/ 0, 0, 180, true, true, true, false, 2, true); + break; + + case 1:native::attach_entity_to_entity(ramp, attach_to, 0, /**/ 0, (-1) * dim.y, -0.5, /**/ 0, 0, 0, true, true, true, false, 2, true); + break; + + case 2:native::attach_entity_to_entity(ramp, attach_to, 0, /**/ (-1) * dim.x, 0, -0.5, /**/ 0, 0, 270, true, true, true, false, 2, true); + break; + + case 3:native::attach_entity_to_entity(ramp, attach_to, 0, /**/ dim.x, 0, -0.5, /**/ 0, 0, 90, true, true, true, false, 2, true); + break; + } + + if (opacitated) { + native::set_entity_alpha(ramp, 100, true); + } + + return ramp; + } + + void attach() { + if (!menu::player::get_local_player().m_in_vehicle) return; + + char buffer[50]; + sprintf_s(buffer, "PROP_MP_RAMP_0%i", m_vars.m_ramp_type); + + uint32_t model = native::get_hash_key(buffer); + + if (m_vars.m_front_ramp) { + create_attached_ramp(menu::player::get_local_player().m_vehicle, model, 0, m_vars.m_transparency); + } + + if (m_vars.m_rear_ramp) { + create_attached_ramp(menu::player::get_local_player().m_vehicle, model, 1, m_vars.m_transparency); + } + + if (m_vars.m_left_ramp) { + create_attached_ramp(menu::player::get_local_player().m_vehicle, model, 2, m_vars.m_transparency); + } + + if (m_vars.m_right_ramp) { + create_attached_ramp(menu::player::get_local_player().m_vehicle, model, 3, m_vars.m_transparency); + } + } + + void detach() { + if (!menu::player::get_local_player().m_in_vehicle) return; + math::vector3 coords = menu::player::get_local_player().m_coords; + + uint32_t ramps[] = { 0xB157C9E4, 0xF4F1511E, 0x93948E5E }; + for (int i = 0; i < 3; i++) { + int counter = 0; + search: + Object ramp = native::get_closest_object_of_type(coords.x, coords.y, coords.z, 20.f, ramps[i], false, false, false); + if (ramp) { + if (native::does_entity_exist(ramp) && native::is_entity_attached_to_entity(ramp, menu::player::get_local_player().m_vehicle)) { + menu::control::simple_request_model(ramp); + + native::set_entity_as_mission_entity(ramp, true, true); + native::delete_entity(&ramp); + + counter++; + + if (counter < 20) { + goto search; + } + } + } + } + } +} + +void vehicle_ramps_menu::load() { + set_name("Ramps"); + set_parent(); + + add_option(number_option(SCROLL, "Ramp Type") + .add_translate() + .add_number(m_vars.m_ramp_type, "%i", 1).add_min(1).add_max(3).show_max().add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Ramp Transparency") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_transparency).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Front Ramp") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_front_ramp).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Rear Ramp") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rear_ramp).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Left Ramp") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_left_ramp).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Right Ramp") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_right_ramp).add_savable(get_submenu_name_stack())); + + add_option(button_option("Apply Ramps") + .add_translate().add_hotkey() + .add_click(attach)); + + add_option(button_option("Delete Attached Ramps") + .add_translate().add_hotkey() + .add_click(detach)); +} + +void vehicle_ramps_menu::update() {} + +void vehicle_ramps_menu::update_once() {} + +void vehicle_ramps_menu::feature_update() {} + +vehicle_ramps_menu* g_instance; +vehicle_ramps_menu* vehicle_ramps_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_ramps_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_ramps.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_ramps.h new file mode 100644 index 0000000..2e65707 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_ramps.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_ramps_menu : public menu::submenu::submenu { +public: + static vehicle_ramps_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_ramps_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::ramps::vars { + struct variables { + bool m_transparency; + bool m_front_ramp; + bool m_rear_ramp; + bool m_left_ramp; + bool m_right_ramp; + + int m_ramp_type = 1; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_randomization.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_randomization.cpp new file mode 100644 index 0000000..69ef092 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_randomization.cpp @@ -0,0 +1,171 @@ +#include "vehicle_randomization.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "global/lists.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/instructionals.h" +#include "../helper/helper_rainbow.h" + +using namespace vehicle::randomization::vars; + +namespace vehicle::randomization::vars { + variables m_vars; +} + +void vehicle_randomization_menu::load() { + set_name("Randomization"); + set_parent(); + + set_default_instructionals(false); + + add_option(toggle_option("Rainbow Primary Paint") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rainbow_primary) + .add_click([] { + m_vars.m_rainbow_primary_run.toggle(m_vars.m_rainbow_primary); + if (m_vars.m_rainbow_primary) { + if (menu::player::get_local_player().m_in_vehicle) { + native::get_vehicle_custom_primary_colour(menu::player::get_local_player().m_vehicle, &m_vars.m_rainbow_primary_color.r, &m_vars.m_rainbow_primary_color.g, &m_vars.m_rainbow_primary_color.b); + } + + m_vars.m_rainbow_primary_run.add(&m_vars.m_rainbow_primary_color); + } else { + m_vars.m_rainbow_primary_run.remove(&m_vars.m_rainbow_primary_color); + } + }).add_hover([] { helper::rainbow::vars::m_vars.m_rainbow = &m_vars.m_rainbow_primary_run; }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Rainbow Secondary Paint") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rainbow_secondary) + .add_click([] { + m_vars.m_rainbow_secondary_run.toggle(m_vars.m_rainbow_secondary); + if (m_vars.m_rainbow_secondary) { + if (menu::player::get_local_player().m_in_vehicle) { + native::get_vehicle_custom_secondary_colour(menu::player::get_local_player().m_vehicle, &m_vars.m_rainbow_secondary_color.r, &m_vars.m_rainbow_secondary_color.g, &m_vars.m_rainbow_secondary_color.b); + } + + m_vars.m_rainbow_secondary_run.add(&m_vars.m_rainbow_secondary_color); + } else { + m_vars.m_rainbow_secondary_run.remove(&m_vars.m_rainbow_secondary_color); + } + }).add_hover([] { helper::rainbow::vars::m_vars.m_rainbow = &m_vars.m_rainbow_secondary_run; }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Rainbow Tire Smoke") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rainbow_tire_smoke) + .add_click([] { + m_vars.m_rainbow_tire_smoke_run.toggle(m_vars.m_rainbow_tire_smoke); + if (m_vars.m_rainbow_tire_smoke) { + if (menu::player::get_local_player().m_in_vehicle) { + native::get_vehicle_tyre_smoke_color(menu::player::get_local_player().m_vehicle, &m_vars.m_rainbow_tire_smoke_color.r, &m_vars.m_rainbow_tire_smoke_color.g, &m_vars.m_rainbow_tire_smoke_color.b); + } + + m_vars.m_rainbow_tire_smoke_run.add(&m_vars.m_rainbow_tire_smoke_color); + } else { + m_vars.m_rainbow_tire_smoke_run.remove(&m_vars.m_rainbow_tire_smoke_color); + } + }).add_hover([] { helper::rainbow::vars::m_vars.m_rainbow = &m_vars.m_rainbow_tire_smoke_run; }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Rainbow Neons") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rainbow_neons) + .add_click([] { + m_vars.m_rainbow_neons_run.toggle(m_vars.m_rainbow_neons); + if (m_vars.m_rainbow_neons) { + if (menu::player::get_local_player().m_in_vehicle) { + native::get_vehicle_neon_lights_colour(menu::player::get_local_player().m_vehicle, &m_vars.m_rainbow_tire_smoke_color.r, &m_vars.m_rainbow_tire_smoke_color.g, &m_vars.m_rainbow_tire_smoke_color.b); + } + + m_vars.m_rainbow_neons_run.add(&m_vars.m_rainbow_neons_color); + } else { + m_vars.m_rainbow_neons_run.remove(&m_vars.m_rainbow_neons_color); + } + }).add_hover([] { helper::rainbow::vars::m_vars.m_rainbow = &m_vars.m_rainbow_neons_run; }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Random Upgrades") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_random_upgrades).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Random Acrobatics") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_random_acrobatics).add_savable(get_submenu_name_stack())); +} + +void vehicle_randomization_menu::update() { + if (menu::base::get_current_option() > 3) { + instructionals::standard(false, false, true); + } else { + instructionals::rainbow(false, false, true); + + if (menu::input::is_just_pressed(false, ControlFrontendX)) { + helper_rainbow_menu::get()->set_parent(); + menu::submenu::handler::set_submenu(helper_rainbow_menu::get()); + } + } +} + +void vehicle_randomization_menu::update_once() {} + +void vehicle_randomization_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_rainbow_neons) { + m_vars.m_rainbow_neons_run.run(); + + for (int i = 0; i < 4; i++) { + native::set_vehicle_neon_light_enabled(menu::player::get_local_player().m_vehicle, i, true); + } + + native::set_vehicle_neon_lights_colour(menu::player::get_local_player().m_vehicle, m_vars.m_rainbow_neons_color.r, m_vars.m_rainbow_neons_color.g, m_vars.m_rainbow_neons_color.b); + } + + if (m_vars.m_rainbow_primary) { + m_vars.m_rainbow_primary_run.run(); + + native::set_vehicle_custom_primary_colour(menu::player::get_local_player().m_vehicle, m_vars.m_rainbow_primary_color.r, m_vars.m_rainbow_primary_color.g, m_vars.m_rainbow_primary_color.b); + } + + if (m_vars.m_rainbow_secondary) { + m_vars.m_rainbow_secondary_run.run(); + + native::set_vehicle_custom_secondary_colour(menu::player::get_local_player().m_vehicle, m_vars.m_rainbow_secondary_color.r, m_vars.m_rainbow_secondary_color.g, m_vars.m_rainbow_secondary_color.b); + } + + if (m_vars.m_rainbow_tire_smoke) { + m_vars.m_rainbow_tire_smoke_run.run(); + + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + native::toggle_vehicle_mod(menu::player::get_local_player().m_vehicle, MOD_TIRESMOKE, true); + native::set_vehicle_tyre_smoke_color(menu::player::get_local_player().m_vehicle, m_vars.m_rainbow_tire_smoke_color.r, m_vars.m_rainbow_tire_smoke_color.g, m_vars.m_rainbow_tire_smoke_color.b); + } + + if (m_vars.m_random_upgrades) { + native::set_vehicle_mod_kit(menu::player::get_local_player().m_vehicle, 0); + int class_ = native::get_random_int_in_range(MOD_SPOILER - 1, MOD_LIVERY - 1); + int max = native::get_num_vehicle_mods(menu::player::get_local_player().m_vehicle, class_); + int mod = native::get_random_int_in_range(-2, max + 1); + native::set_vehicle_mod(menu::player::get_local_player().m_vehicle, class_, mod, 0); + } + + if (m_vars.m_random_acrobatics) { + static int timer = 0; + menu::timers::run_timed(&timer, 5000, [] { + vehicle::vars::run_task(menu::player::get_local_player().m_vehicle, [] (Vehicle veh) { + std::pair, math::vector3_> data = global::lists::g_acrobatics[native::get_random_int_in_range(0, 9)].m_result; + native::apply_force_to_entity(veh, 1, data.first.x, data.first.y, data.first.z, data.second.x, data.second.y, data.second.z, 0, true, true, true, false, true); + + }); + }); + } + } +} + +vehicle_randomization_menu* g_instance; +vehicle_randomization_menu* vehicle_randomization_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_randomization_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_randomization.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_randomization.h new file mode 100644 index 0000000..7f6b33e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_randomization.h @@ -0,0 +1,41 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/rainbow.h" + +class vehicle_randomization_menu : public menu::submenu::submenu { +public: + static vehicle_randomization_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_randomization_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::randomization::vars { + struct variables { + bool m_rainbow_primary; + bool m_rainbow_secondary; + bool m_rainbow_tire_smoke; + bool m_rainbow_neons; + bool m_random_upgrades; + bool m_random_acrobatics; + + menu::rainbow m_rainbow_primary_run = { 0, 255, 255 }; + color_rgba m_rainbow_primary_color; + + menu::rainbow m_rainbow_secondary_run = { 0, 255, 255 }; + color_rgba m_rainbow_secondary_color; + + menu::rainbow m_rainbow_tire_smoke_run = { 0, 255, 255 }; + color_rgba m_rainbow_tire_smoke_color; + + menu::rainbow m_rainbow_neons_run = { 0, 255, 255 }; + color_rgba m_rainbow_neons_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_seats.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_seats.cpp new file mode 100644 index 0000000..ebfa43b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_seats.cpp @@ -0,0 +1,98 @@ +#include "vehicle_seats.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "seats/vehicle_seats_edit.h" + +using namespace vehicle::seats::vars; + +namespace vehicle::seats::vars { + variables m_vars; + + void kick(bool exclude) { + if (!menu::player::get_local_player().m_in_vehicle) return; + + for (int i = -1; i < native::get_vehicle_max_number_of_passengers(menu::player::get_local_player().m_vehicle); i++) { + if (!native::is_vehicle_seat_free(menu::player::get_local_player().m_vehicle, i, 0)) { + if (exclude && native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, i, 0) == menu::player::get_local_player().m_ped) break; + native::clear_ped_tasks_immediately(native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, i, 0)); + } + } + } + + void kick_driver() { + if (!native::is_vehicle_seat_free(menu::player::get_local_player().m_vehicle, -1, 0)) { + native::clear_ped_tasks_immediately(native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, -1, 0)); + } + } +} + +void vehicle_seats_menu::load() { + set_name("Seats"); + set_parent(); + + add_option(button_option("Kick All Seats") + .add_translate().add_hotkey() + .add_click([] { kick(false); })); + + add_option(button_option("Kick All Seats (Exclude Me)") + .add_translate().add_hotkey() + .add_click([] { kick(true); })); + + add_option(button_option("Kick Driver") + .add_translate().add_hotkey() + .add_click(kick_driver)); + + add_option(break_option("Seats") + .add_translate()); +} + +void vehicle_seats_menu::update() {} + +void vehicle_seats_menu::update_once() { + clear_options(4); + + if (!menu::player::get_local_player().m_in_vehicle) return; + + for (int i = -1; i < native::get_vehicle_max_number_of_passengers(menu::player::get_local_player().m_vehicle); i++) { + bool free = native::is_vehicle_seat_free(menu::player::get_local_player().m_vehicle, i, 0); + bool driver = i == -1; + + std::string n = ""; + if (free) n = "Free Seat"; + else { + Ped ped = native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, i, 0); + menu::player::for_each([&](menu::player::player_context& player) { + if (player.m_ped == ped) { + n = player.m_name; + if (player.m_id == menu::player::get_local_player().m_id) { + n = "Me"; + } + } + }, true); + + if (n.empty()) { + n = "Ped - " + std::to_string(ped); + } + } + + char name[100]; + sprintf_s(name, "[Seat %i] %s%s", i + 1, driver ? "[Driver] " : "", n.c_str()); + + add_option(submenu_option(name) + .add_submenu() + .add_click([=] { vehicle::seats::edit::vars::m_vars.m_seat = i; })); + } +} + +void vehicle_seats_menu::feature_update() {} + +vehicle_seats_menu* g_instance; +vehicle_seats_menu* vehicle_seats_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_seats_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_seats.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_seats.h new file mode 100644 index 0000000..db319c3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_seats.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_seats_menu : public menu::submenu::submenu { +public: + static vehicle_seats_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_seats_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::seats::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_speedometer.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_speedometer.cpp new file mode 100644 index 0000000..b2de1d7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_speedometer.cpp @@ -0,0 +1,68 @@ +#include "vehicle_speedometer.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "menu/base/util/stacked_display.h" + +using namespace vehicle::speedometer::vars; + +namespace vehicle::speedometer::vars { + variables m_vars; +} + +void vehicle_speedometer_menu::load() { + set_name("Speedometer"); + set_parent(); + + add_option(toggle_option("Basic Speedometer") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_basic_speedometer) + .add_click([] { + if (!m_vars.m_basic_speedometer) { + menu::display::disable("SR_BASICSPEEDO"); + } + }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Numberplate Speedometer") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_number_plate_speedometer) + .add_click([] { + if (m_vars.m_number_plate_speedometer) { + if (menu::player::get_local_player().m_in_vehicle) { + m_vars.m_previous_number_plate_text = native::get_vehicle_number_plate_text(menu::player::get_local_player().m_vehicle); + } + } else { + native::set_vehicle_number_plate_text(menu::player::get_local_player().m_vehicle, m_vars.m_previous_number_plate_text.c_str()); + } + }).add_savable(get_submenu_name_stack())); + + add_string("Speed"); +} + +void vehicle_speedometer_menu::update() {} + +void vehicle_speedometer_menu::update_once() {} + +void vehicle_speedometer_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_basic_speedometer) { + float speed = native::get_entity_speed(menu::player::get_local_player().m_vehicle) * global::vars::g_selected_metric_system.first; + menu::display::update("SR_BASICSPEEDO", get_string("Speed"), util::va::va("%.0f %s", speed, global::vars::g_selected_metric_system.second.c_str())); + } + + if (m_vars.m_number_plate_speedometer) { + float speed = native::get_entity_speed(menu::player::get_local_player().m_vehicle) * global::vars::g_selected_metric_system.first; + native::set_vehicle_number_plate_text(menu::player::get_local_player().m_vehicle, util::va::va("%.0f %s", speed, global::vars::g_selected_metric_system.second.c_str())); + } + } +} + +vehicle_speedometer_menu* g_instance; +vehicle_speedometer_menu* vehicle_speedometer_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_speedometer_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_speedometer.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_speedometer.h new file mode 100644 index 0000000..62a53c1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_speedometer.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_speedometer_menu : public menu::submenu::submenu { +public: + static vehicle_speedometer_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_speedometer_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::speedometer::vars { + struct variables { + bool m_basic_speedometer; + bool m_number_plate_speedometer; + + std::string m_previous_number_plate_text; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_tyre_tracks.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_tyre_tracks.cpp new file mode 100644 index 0000000..5320e95 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_tyre_tracks.cpp @@ -0,0 +1,166 @@ +#include "vehicle_tyre_tracks.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "util/config.h" +#include "menu/base/submenus/main/helper/helper_color.h" +#include "menu/base/submenus/main/helper/helper_rainbow.h" +#include "menu/base/util/instructionals.h" + +using namespace vehicle::tyres::vars; + +namespace vehicle::tyres::vars { + variables m_vars; + + void persistent() { + rage::types::vfx_wheel* vfx_wheel = global::vars::g_vfx_wheel.first; + rage::types::vfx_wheel* vfx_wheel_cache = m_vars.m_cache; + + for (uint32_t i = 0; i < (uint32_t)(global::vars::g_vfx_wheel.second * 4); i++) { + if (m_vars.m_persistent) { + vfx_wheel[i].m_type1 = 53; + vfx_wheel[i].m_type2 = 53; + vfx_wheel[i].m_type3 = 64; + vfx_wheel[i].m_type4 = 255; + vfx_wheel[i].m_unk1 = TRUE; + vfx_wheel[i].m_unk2 = TRUE; + vfx_wheel[i].m_unk3 = TRUE; + vfx_wheel[i].m_unk4 = TRUE; + vfx_wheel[i].m_pressure_min = 0.0f; + vfx_wheel[i].m_pressure_max = 0.0f; + } else { + vfx_wheel[i].m_type1 = vfx_wheel_cache[i].m_type1; + vfx_wheel[i].m_type2 = vfx_wheel_cache[i].m_type2; + vfx_wheel[i].m_type3 = vfx_wheel_cache[i].m_type3; + vfx_wheel[i].m_type4 = vfx_wheel_cache[i].m_type4; + vfx_wheel[i].m_unk1 = vfx_wheel_cache[i].m_unk1; + vfx_wheel[i].m_unk2 = vfx_wheel_cache[i].m_unk2; + vfx_wheel[i].m_unk3 = vfx_wheel_cache[i].m_unk3; + vfx_wheel[i].m_unk4 = vfx_wheel_cache[i].m_unk4; + vfx_wheel[i].m_pressure_min = vfx_wheel_cache[i].m_pressure_min; + vfx_wheel[i].m_pressure_max = vfx_wheel_cache[i].m_pressure_max; + } + } + } + + void set_color(bool reset, color_rgba color) { + rage::types::vfx_wheel* vfx_wheel = global::vars::g_vfx_wheel.first; + rage::types::vfx_wheel* vfx_wheel_cache = m_vars.m_cache; + + for (uint32_t i = 0; i < (uint32_t)(global::vars::g_vfx_wheel.second * 4); i++) { + if (!reset) { + vfx_wheel[i].m_r = color.r; + vfx_wheel[i].m_g = color.g; + vfx_wheel[i].m_b = color.b; + } else { + vfx_wheel[i].m_r = vfx_wheel_cache[i].m_r; + vfx_wheel[i].m_g = vfx_wheel_cache[i].m_g; + vfx_wheel[i].m_b = vfx_wheel_cache[i].m_b; + } + } + } +} + +void vehicle_tyre_tracks_menu::load() { + set_name("Tire Tracks"); + set_parent(); + + set_default_instructionals(false); + + m_vars.m_cache = (rage::types::vfx_wheel*)malloc((sizeof(rage::types::vfx_wheel) * global::vars::g_vfx_wheel.second) * 4); + memcpy(m_vars.m_cache, global::vars::g_vfx_wheel.first, (sizeof(rage::types::vfx_wheel) * global::vars::g_vfx_wheel.second) * 4); + + add_option(toggle_option("Save to Config") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_save_to_config).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Persistent Tracks") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_persistent) + .add_click(persistent)); + + add_option(toggle_option("Rainbow") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rainbow_toggle) + .add_click([] { + m_vars.m_rainbow.toggle(m_vars.m_rainbow_toggle); + if (m_vars.m_rainbow_toggle) { + m_vars.m_rainbow.add(&m_vars.m_color); + } else { + m_vars.m_rainbow.remove(&m_vars.m_color); + set_color(false, m_vars.m_color); + } + })); + + add_option(submenu_option("Edit Color") + .add_translate() + .add_submenu() + .add_click([=] { + helper_color_menu::get()->set_name(get_name().get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = &m_vars.m_color; + helper::color::vars::m_vars.m_callback = [] { set_color(false, m_vars.m_color); }; + }) + .add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, & m_vars.m_color)); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { + m_vars.m_rainbow_toggle = false; + m_vars.m_rainbow.stop(); + set_color(true, color_rgba()); + })); + + if (m_vars.m_save_to_config) { + m_vars.m_rainbow_toggle = util::config::read_bool(get_submenu_name_stack(), "Rainbow", false); + m_vars.m_persistent = util::config::read_bool(get_submenu_name_stack(), "Persistent Tracks", false); + util::config::read_color(get_submenu_name_stack(), "Color", &m_vars.m_color); + + if (m_vars.m_rainbow_toggle) { + m_vars.m_rainbow.add(&m_vars.m_color); + m_vars.m_rainbow.toggle(true); + } + + if (m_vars.m_persistent) { + persistent(); + } + } +} + +void vehicle_tyre_tracks_menu::update() { + if (menu::base::get_current_option() == 2) { + instructionals::rainbow(); + + if (menu::input::is_just_pressed(false, ControlFrontendX)) { + helper::rainbow::vars::m_vars.m_rainbow = &m_vars.m_rainbow; + helper_rainbow_menu::get()->set_parent(); + menu::submenu::handler::set_submenu(helper_rainbow_menu::get()); + } + } else instructionals::standard(false, false, false); +} + +void vehicle_tyre_tracks_menu::update_once() { + if (m_vars.m_save_to_config) { + util::config::write_color(get_submenu_name_stack(), "Color", m_vars.m_color); + } +} + +void vehicle_tyre_tracks_menu::feature_update() { + if (m_vars.m_rainbow_toggle) { + m_vars.m_rainbow.run(); + set_color(false, m_vars.m_color); + } +} + +vehicle_tyre_tracks_menu* g_instance; +vehicle_tyre_tracks_menu* vehicle_tyre_tracks_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_tyre_tracks_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_tyre_tracks.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_tyre_tracks.h new file mode 100644 index 0000000..6876314 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_tyre_tracks.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/rainbow.h" +#include "rage/types/base_types.h" + +class vehicle_tyre_tracks_menu : public menu::submenu::submenu { +public: + static vehicle_tyre_tracks_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_tyre_tracks_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::tyres::vars { + struct variables { + bool m_persistent; + rage::types::vfx_wheel* m_cache; + color_rgba m_color = color_rgba(255, 0, 0, 255); + bool m_rainbow_toggle; + bool m_save_to_config; + menu::rainbow m_rainbow; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_weapons.cpp b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_weapons.cpp new file mode 100644 index 0000000..810736a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_weapons.cpp @@ -0,0 +1,118 @@ +#include "vehicle_weapons.h" +#include "menu/base/submenu_handler.h" +#include "../vehicle.h" +#include "global/lists.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/control.h" + +using namespace vehicle::weapons::vars; + +namespace vehicle::weapons::vars { + variables m_vars; + + scroll_struct line_type[] = { + { localization("Point", true), 0 }, + { localization("Cross", true), 1 }, + { localization("Straight", true), 2 } + }; +} + +void vehicle_weapons_menu::load() { + set_name("Weapons"); + set_parent(); + + add_option(toggle_option("Toggle Weapons") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_toggle).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Bullet Speed") + .add_translate() + .add_number(m_vars.m_speed, "%.0f", 1.f).add_min(1.f).add_max(10000.f).set_scroll_speed(5).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(TOGGLE, "Aiming Lines") + .add_translate() + .add_toggle(m_vars.m_aiming_lines) + .add_scroll(m_vars.m_aiming_line_type, 0, NUMOF(line_type), line_type).add_savable(get_submenu_name_stack())); + + add_option(break_option("Bullets") + .add_translate()); +} + +void vehicle_weapons_menu::update() {} + +void vehicle_weapons_menu::update_once() { + clear_options(4); + + for (scroll_struct bullet : global::lists::g_vehicle_weapons) { + add_option(radio_option(bullet.m_name.get()) + .add_radio(m_vars.m_context)); + } +} + +void vehicle_weapons_menu::feature_update() { + if (menu::player::get_local_player().m_in_vehicle) { + if (m_vars.m_toggle) { + static int timer = 0; + + math::vector3 model_size_min; + math::vector3 model_size_max; + native::get_model_dimensions(native::get_entity_model(menu::player::get_local_player().m_vehicle), &model_size_min, &model_size_max); + + math::vector3 origin_left; + math::vector3 origin_right; + math::vector3 target_left; + math::vector3 target_right; + + math::vector3 calculation = model_size_max - model_size_min; + + switch (m_vars.m_aiming_line_type) { + case 0: + origin_left = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, calculation.x / 4.f, model_size_max.y + 1.f, 0.5f); + origin_right = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, -(calculation.x / 4.f), model_size_max.y + 1.f, 0.5f); + target_left = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, (calculation.x / 4.f) - 0.9f, model_size_max.y + 300.f, 0.5f); + target_right = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, -(calculation.x / 4.f) + 0.9f, model_size_max.y + 300.f, 0.5f); + + break; + case 1: + origin_left = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, calculation.x / 4.f, model_size_max.y + 1.f, 0.5f); + origin_right = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, -(calculation.x / 4.f), model_size_max.y + 1.f, 0.5f); + target_left = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, (calculation.x / 4.f) - 5.f, model_size_max.y + 300.f, 0.5f); + target_right = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, -(calculation.x / 4.f) + 5.f, model_size_max.y + 300.f, 0.5f); + + break; + case 2: + origin_left = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, calculation.x / 4.f, model_size_max.y + 1.f, 0.5f); + origin_right = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, -(calculation.x / 4.f), model_size_max.y + 1.f, 0.5f); + target_left = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, (calculation.x / 4.f) + 8.f, model_size_max.y + 300.f, 0.5f); + target_right = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_vehicle, -(calculation.x / 4.f) - 8.f, model_size_max.y + 300.f, 0.5f); + + break; + } + + menu::timers::run_timed(&timer, 100, [=] { + if (native::is_horn_active(menu::player::get_local_player().m_vehicle)) { + menu::control::request_weapon(global::lists::g_vehicle_weapons[m_vars.m_context.m_selected].m_result, [=] (uint32_t hash) { + native::shoot_single_bullet_between_coords_ignore_entity(origin_right.x, origin_right.y, origin_right.z, target_right.x, target_right.y, target_right.z, 250, 0, global::lists::g_vehicle_weapons[m_vars.m_context.m_selected].m_result, 0, true, false, native::get_entity_speed(menu::player::get_local_player().m_vehicle) + m_vars.m_speed, menu::player::get_local_player().m_entity, 0); + native::shoot_single_bullet_between_coords_ignore_entity(origin_left.x, origin_left.y, origin_left.z, target_left.x, target_left.y, target_left.z, 250, 0, global::lists::g_vehicle_weapons[m_vars.m_context.m_selected].m_result, 0, true, false, native::get_entity_speed(menu::player::get_local_player().m_vehicle) + m_vars.m_speed, menu::player::get_local_player().m_entity, 0); + }); + } + }); + + if (m_vars.m_aiming_lines) { + native::draw_line(origin_right.x, origin_right.y, origin_right.z, target_right.x, target_right.y, target_right.z, 255, 0, 0, 255); + native::draw_line(origin_left.x, origin_left.y, origin_left.z, target_left.x, target_left.y, target_left.z, 255, 0, 0, 255); + } + } + } +} + +vehicle_weapons_menu* g_instance; +vehicle_weapons_menu* vehicle_weapons_menu::get() { + if (g_instance == nullptr) { + g_instance = new vehicle_weapons_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/vehicle/vehicle_weapons.h b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_weapons.h new file mode 100644 index 0000000..ff03130 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/vehicle/vehicle_weapons.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class vehicle_weapons_menu : public menu::submenu::submenu { +public: + static vehicle_weapons_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + vehicle_weapons_menu() + : menu::submenu::submenu() {} +}; + +namespace vehicle::weapons::vars { + struct variables { + bool m_toggle; + bool m_aiming_lines; + float m_speed = 2000.f; + int m_aiming_line_type; + + radio_context m_context = { "commonmenu", "shop_ammo_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/aimbot.cpp b/GTAV/src/menu/base/submenus/main/weapon/aimbot.cpp new file mode 100644 index 0000000..eac48a7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/aimbot.cpp @@ -0,0 +1,220 @@ +#include "aimbot.h" +#include "menu/base/submenu_handler.h" +#include "weapon_mods.h" +#include "global/lists.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/camera.h" +#include "menu/base/renderer.h" +#include "menu/base/util/player_manager.h" +#include "rage/engine.h" +#include "triggerbot.h" + +using namespace weapon::aimbot::vars; + +namespace weapon::aimbot::vars { + variables m_vars; + + scroll_struct aim_entity[] = { + { localization("Players Only", true), 0, }, + { localization("Peds Only", true), 1, }, + { localization("Everyone", true), 2 }, + }; + + scroll_struct aim_filter[] = { + { localization("Visible", true), 0, }, + { localization("Logical", true), 1 }, + }; + + scroll_struct aim_type[] = { + { localization("Snap", true), 0, }, + { localization("Silent", true), 1 }, + }; +} + +void aimbot_menu::load() { + set_name("Aim Assist"); + set_parent(); + + add_option(submenu_option("Triggerbot") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Toggle Aimbot") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_toggle).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Aiming Required") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_aiming_required).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Aim Entity") + .add_translate() + .add_scroll(m_vars.m_aim_entity, 0, NUMOF(aim_entity), aim_entity).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Aim Filter") + .add_translate() + .add_scroll(m_vars.m_aim_filter, 0, NUMOF(aim_filter), aim_filter).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Aim Type") + .add_translate() + .add_scroll(m_vars.m_aim_type, 0, NUMOF(aim_type), aim_type).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Aim Tag") + .add_translate() + .add_scroll(m_vars.m_aim_tag, 0, NUMOF(global::lists::g_ped_bones), global::lists::g_ped_bones).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Aim Distance") + .add_translate() + .add_scroll(m_vars.m_aim_distance, 0, NUMOF(global::lists::g_distances), global::lists::g_distances).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Limit to FOV") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_fov) + .add_number(m_vars.m_fov_range, "%.2f", 0.01f).add_min(0.f).add_max(5.f).can_loop().set_scroll_speed(10).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Draw FOV Radius") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_fov_draw).add_savable(get_submenu_name_stack()) + .add_tooltip("Draws the FOV radius on-screen") + .add_requirement([] { return m_vars.m_fov; })); + + add_option(scroll_option(TOGGLE, "Auto Fire (With Delay)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_auto_fire) + .add_scroll(m_vars.m_auto_fire_delay, 0, NUMOF(global::lists::g_timers), global::lists::g_timers).add_savable(get_submenu_name_stack())); +} + +void aimbot_menu::update() {} + +void aimbot_menu::update_once() {} + +void aimbot_menu::feature_update() { + if (m_vars.m_toggle) { + if (m_vars.m_fov && m_vars.m_fov_draw) { + menu::renderer::draw_sprite({ "ozarktextures", "circle_rev2.png" }, { 0.5f, 0.5f }, { 0.1f * m_vars.m_fov_range, 0.18f * m_vars.m_fov_range }, 0.f, { 255, 255, 255, 255 }); + } + + if (m_vars.m_aiming_required) { + if (!menu::player::get_local_player().m_is_aiming) { + return; + } + } + + float closest_distance = 9999.f; + Ped closest_entity = 0; + + switch (m_vars.m_aim_entity) { + case 2: + case 0: { + // players only + menu::player::for_each([&](menu::player::player_context& player) { + if (native::is_entity_dead(player.m_ped, 0)) return; // alive check + if (player.m_id == menu::player::get_local_player().m_id) return; + if (m_vars.m_aim_filter == 0 && !native::has_entity_clear_los_to_entity(menu::player::get_local_player().m_ped, player.m_ped, 1)) return; // visible check + if (native::get_entity_height_above_ground(player.m_ped) < 0.f) return; + + float distance = menu::player::get_local_player().m_coords.get_distance(player.m_coords); + if (distance > global::lists::g_distances[m_vars.m_aim_distance].m_result) return; + + if (m_vars.m_fov) { + math::vector2 screen_position; + if (native::get_screen_coord_from_world_coord(player.m_coords.x, player.m_coords.y, player.m_coords.z, &screen_position.x, &screen_position.y)) { + float left_side = 0.5f - ((0.1f * m_vars.m_fov_range) / 2.f); + float right_side = 0.5f + ((0.1f * m_vars.m_fov_range) / 2.f); + float top = 0.5f - ((0.18f * m_vars.m_fov_range) / 2.f); + float bottom = 0.5f + ((0.18f * m_vars.m_fov_range) / 2.f); + + if (!((screen_position.x >= left_side && screen_position.x <= right_side) && (screen_position.y >= top && screen_position.y <= bottom))) { + return; + } + } else return; + } + + if (distance < closest_distance) { + closest_distance = distance; + closest_entity = player.m_ped; + } + }, true); + + if (m_vars.m_aim_entity != 2) break; + } + + case 1: { + // peds only + global::vars::g_ped_pool->for_each([&](Ped ped, void* ptr) { + if (native::is_ped_a_player(ped)) return; + if (native::is_entity_dead(ped, TRUE)) return; + if (m_vars.m_aim_filter == 0 && !native::has_entity_clear_los_to_entity(menu::player::get_local_player().m_ped, ped, 1)) return; + if (native::get_entity_height_above_ground(ped) < 0.f) return; + + math::vector3 coords = native::get_entity_coords(ped, false); + float distance = menu::player::get_local_player().m_coords.get_distance(coords); + if (distance > global::lists::g_distances[m_vars.m_aim_distance].m_result) return; + + if (m_vars.m_fov) { + math::vector2 screen_position; + if (native::get_screen_coord_from_world_coord(coords.x, coords.y, coords.z, &screen_position.x, &screen_position.y)) { + float left_side = 0.5f - ((0.1f * m_vars.m_fov_range) / 2.f); + float right_side = 0.5f + ((0.1f * m_vars.m_fov_range) / 2.f); + float top = 0.5f - ((0.18f * m_vars.m_fov_range) / 2.f); + float bottom = 0.5f + ((0.18f * m_vars.m_fov_range) / 2.f); + + if (!((screen_position.x >= left_side && screen_position.x <= right_side) && (screen_position.y >= top && screen_position.y <= bottom))) { + return; + } + } else return; + } + + if (distance < closest_distance) { + closest_distance = distance; + closest_entity = ped; + } + }); + + if (m_vars.m_aim_entity != 2) break; + } + } + + if (closest_entity) { + math::vector3 bone_coords = native::get_world_position_of_entity_bone(closest_entity, native::get_ped_bone_index(closest_entity, global::lists::g_ped_bones[m_vars.m_aim_tag].m_result)); + + if (m_vars.m_aim_type == 0) { + rage::network::player_angles* camera = menu::camera::get_player_angles(); + if (is_valid_ptr(camera)) { + math::vector3_ crosshair = camera->m_crosshair_location; + math::vector3 converted(crosshair.x, crosshair.y, crosshair.z); + + float distance = bone_coords.get_distance(converted); + camera->m_view_angles = { (bone_coords.x - crosshair.x) / distance, (bone_coords.y - crosshair.y) / distance, (bone_coords.z - crosshair.z) / distance }; + + if (m_vars.m_auto_fire) { + menu::timers::run_timed(&m_vars.m_auto_fire_delay_timer, global::lists::g_timers[m_vars.m_auto_fire_delay].m_result, [=] { + native::set_ped_shoots_at_coord(menu::player::get_local_player().m_ped, bone_coords.x, bone_coords.y, bone_coords.z, true); + }); + } + } + } else { + if (m_vars.m_auto_fire) { + menu::timers::run_timed(&m_vars.m_auto_fire_delay_timer, global::lists::g_timers[m_vars.m_auto_fire_delay].m_result, [=] { + native::set_ped_shoots_at_coord(menu::player::get_local_player().m_ped, bone_coords.x, bone_coords.y, bone_coords.z, true); + }); + } + + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + native::set_ped_shoots_at_coord(menu::player::get_local_player().m_ped, bone_coords.x, bone_coords.y, bone_coords.z, true); + } + } + } + } +} + +aimbot_menu* g_instance; +aimbot_menu* aimbot_menu::get() { + if (g_instance == nullptr) { + g_instance = new aimbot_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/aimbot.h b/GTAV/src/menu/base/submenus/main/weapon/aimbot.h new file mode 100644 index 0000000..1f67def --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/aimbot.h @@ -0,0 +1,40 @@ +#pragma once +#include "menu/base/submenu.h" + +class aimbot_menu : public menu::submenu::submenu { +public: + static aimbot_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + aimbot_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::aimbot::vars { + struct variables { + bool m_toggle; + bool m_aiming_required; + bool m_auto_fire; + bool m_auto_ads; + bool m_show_aimbot_target; + bool m_fov; + bool m_fov_draw; + + int m_aim_entity; + int m_aim_filter; + int m_aim_type; + int m_aim_tag; + int m_auto_fire_delay; + int m_auto_fire_delay_timer; + int m_aim_distance; + + float m_fov_range = 2.5f; + }; + + extern scroll_struct aim_entity[3]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/entity_gun.cpp b/GTAV/src/menu/base/submenus/main/weapon/entity_gun.cpp new file mode 100644 index 0000000..a20353b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/entity_gun.cpp @@ -0,0 +1,322 @@ +#include "entity_gun.h" +#include "menu/base/submenu_handler.h" +#include "weapon_mods.h" +#include "global/lists.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/control.h" +#include "menu/base/util/camera.h" +#include "util/memory/memory.h" + +using namespace weapon::entity::gun::vars; + +namespace weapon::entity::gun::vars { + variables m_vars; + + scroll_struct types[] = { + { localization("Object", true), 0 }, + { localization("Vehicle", true), 1 }, + { localization("Ped", true), 2 }, + }; + + scroll_struct objects[] = { + { localization("Meteor", true), 0xDF9841D7 }, + { localization("Stairs", true), 0x757C28D }, + { localization("Egg", true), 0x6B795EBC }, + { localization("Barbell", true), 0xE2FBA8D8 }, + { localization("Campfire", true), 0xC079B265 }, + { localization("Volleyball", true), 0xC79A987E }, + { localization("Dildo", true), 0xE6CB661E }, + { localization("Guitar", true), 0xD5C0BC07 }, + { localization("Gold", true), 0xF046EA37 }, + { localization("Missile", true), 0xB2274905 }, + { localization("Toilet", true), 0x6F9939C7 }, + { localization("Money Bag", true), 0x113FD533 }, + { localization("Wheelchair", true), 0x4B3D240F }, + { localization("Pumpkin", true), 0x83C07621 }, + }; + + scroll_struct vehicles[] = { + { localization("", false), 0x5A82F9AE }, + { localization("", false), 0x5BA0FF1E }, + { localization("", false), 0x18619B7E }, + { localization("", false), 0x322CF98F }, + { localization("", false), 0xB2E046FB }, + { localization("", false), 0xE83C17 }, + { localization("", false), 0xA29F78B0 }, + { localization("", false), 0x42BC5E19 }, + { localization("", false), 0x1FD824AF }, + { localization("", false), 0x8B213907 }, + { localization("", false), 0x2C1FEA99 }, + { localization("", false), 0xEA6A047F }, + { localization("", false), 0x432AA566 }, + { localization("", false), 0xEB298297 }, + { localization("", false), 0xB44F0582 }, + { localization("", false), 0x9472CD24 }, + { localization("", false), 0x23CA25F2 }, + { localization("", false), 0x619C1B82 }, + { localization("", false), 0xB472D2B5 }, + { localization("", false), 0xC2974024 }, + { localization("", false), 0x761E2AD3 }, + }; + + scroll_struct peds[] = { + { localization("Whale", true), 0x8D8AC8B9 }, + { localization("Cow", true), 0xFCFA9E1E }, + { localization("Seagull", true), 0xD3939DFD }, + { localization("Topless Girl", true), 0x9CF26183 }, + { localization("Bride", true), 0x6162EC47 }, + { localization("Hooker", true), 0x28ABF95 }, + { localization("Astronaut", true), 0xE7B31432 }, + { localization("Human Statue", true), 0x795AC7A8 }, + { localization("Mime", true), 0x3CDCA742 }, + { localization("Jesus", true), 0xCE2CB751 }, + { localization("Pogo", true), 0xDC59940D }, + { localization("Zombie", true), 0xAC4B4506 }, + }; + + int get_size(int type) { + switch (type) { + case 0: + for (int i = 0; i < 100; i++) { + if (objects[i].m_result == 0x0) { + return i; + } + } + + break; + + case 1: + for (int i = 0; i < 100; i++) { + if (vehicles[i].m_result == 0x0) { + return i; + } + } + + break; + + case 2: + for (int i = 0; i < 100; i++) { + if (peds[i].m_result == 0x0) { + return i; + } + } + + break; + } + + return 0; + } + + int get_model_type(uint32_t model) { + struct hash_node { + uint32_t m_model_hash; + uint16_t m_data; + uint16_t m_padding; + hash_node* m_next; + }; + + uint16_t hash_table_count = *(uint16_t*)memory::read_instruction(global::vars::g_get_model_info); + uint64_t hash_table = *(uint64_t*)memory::read_instruction(global::vars::g_get_model_info + 0x7E); + hash_node** hash_map = *(hash_node***)memory::read_instruction(global::vars::g_get_model_info + 0x21); + + for (uint16_t i = 0; i < hash_table_count; i++) { + for (hash_node* current = hash_map[i]; current; current = current->m_next) { + uint64_t element = *(uint64_t*)(hash_table + (current->m_data * 8)); + if (element) { + if (current->m_model_hash == model) { + return (int)*(uint8_t*)(element + 0x9D) & 0x1F; + } + } + } + } + + return 0; + } +} + +void entity_gun_menu::load() { + set_name("Entity Gun"); + set_parent(); + + add_string("Could not determine models type"); + + for (scroll_struct& n : vehicles) { + n.m_name = localization(native::get_label_text(native::get_display_name_from_vehicle_model(n.m_result)), false); + } + + add_option(toggle_option("Toggle Entity Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_toggle)); + + add_option(scroll_option(SCROLL, "Current Type") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(types), types)); + + add_option(scroll_option(SCROLL, "Delay") + .add_translate() + .add_scroll(m_vars.m_wait, 0, NUMOF(global::lists::g_timers), global::lists::g_timers)); + + add_option(number_option(SCROLL, "Speed") + .add_translate() + .add_number(m_vars.m_speed, "%.0f", 100.f).set_scroll_speed(10)); + + add_option(button_option("Input Custom Model") + .add_translate() + .add_keyboard("Input the model! (Hint: name, hash or numeric)", 30, [=](button_option* option, const char* text) { + if (text) { + uint32_t hash = 0; + if (text[0] == '0' && (text[1] == 'x' || text[1] == 'X')) { + // hash + hash = (uint32_t)_strtoui64(text, 0, 0); + } else { + std::string str_name(text); + if (std::find_if(str_name.begin(), str_name.end(), [](unsigned char c) { return !std::isdigit(c); }) == str_name.end()) { + // numeric + hash = (uint32_t)atoi(text); + } else { + // name + hash = native::get_hash_key(text); + } + } + + if (hash) { + int type = get_model_type(hash); + if (type > 0) { + switch (type) { + case 1: // object + for (int i = 0; i < 100; i++) { + if (objects[i].m_result == 0x0) { + objects[i].m_name = localization(text, false); + objects[i].m_result = hash; + m_vars.m_object = i; + m_vars.m_type = 0; + break; + } + } + + break; + + case 5: { // vehicle + const char* label = native::get_display_name_from_vehicle_model(hash); + if (label) { + label = native::get_label_text(label); + if (strcmp(label, "NULL")) { + text = label; + } + } + + for (int i = 0; i < 100; i++) { + if (vehicles[i].m_result == 0x0) { + vehicles[i].m_name = localization(text, false); + vehicles[i].m_result = hash; + m_vars.m_vehicle = i; + m_vars.m_type = 1; + break; + } + } + + break; + } + + case 6: // ped + for (int i = 0; i < 100; i++) { + if (peds[i].m_result == 0x0) { + peds[i].m_name = localization(text, false); + peds[i].m_result = hash; + m_vars.m_ped = i; + m_vars.m_type = 2; + break; + } + } + + break; + + default: + menu::notify::stacked(get_name().get(), get_string("Could not determine models type"), global::ui::g_error); + break; + } + } + } + } + })); + + add_option(break_option("Types") + .add_translate()); + + add_option(scroll_option(SCROLL, "Object") + .add_translate() + .add_scroll(m_vars.m_object, 0, get_size(0), objects) + .add_update([](scroll_option* option, int pos) { + option->add_scroll(m_vars.m_object, 0, get_size(0), objects); + })); + + add_option(scroll_option(SCROLL, "Vehicle") + .add_translate() + .add_scroll(m_vars.m_vehicle, 0, get_size(1), vehicles) + .add_update([](scroll_option* option, int pos) { + option->add_scroll(m_vars.m_vehicle, 0, get_size(1), vehicles); + })); + + add_option(scroll_option(SCROLL, "Ped") + .add_translate() + .add_scroll(m_vars.m_ped, 0, get_size(2), peds) + .add_update([](scroll_option* option, int pos) { + option->add_scroll(m_vars.m_ped, 0, get_size(2), peds); + })); +} + +void entity_gun_menu::update() {} + +void entity_gun_menu::update_once() {} + +void entity_gun_menu::feature_update() { + if (m_vars.m_toggle) { + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + static int timer = 0; + menu::timers::run_timed(&timer, global::lists::g_timers[m_vars.m_wait].m_result, [] { + Entity handle = 0; + switch (m_vars.m_type) { + case 0: // object + menu::control::simple_request_model(objects[m_vars.m_object].m_result); + handle = native::create_object(objects[m_vars.m_object].m_result, 0.f, 0.f, 0.f, true, true, false); + break; + + case 1: // vehicle + menu::control::simple_request_model(vehicles[m_vars.m_vehicle].m_result); + handle = native::create_vehicle(vehicles[m_vars.m_vehicle].m_result, 0.f, 0.f, 0.f, 0.f, true, true, 0); + break; + + case 2: // ped + menu::control::simple_request_model(peds[m_vars.m_ped].m_result); + handle = native::create_ped(21, peds[m_vars.m_ped].m_result, 0.f, 0.f, 0.f, 0.f, true, false); + break; + } + + if (native::does_entity_exist(handle)) { + native::set_entity_as_mission_entity(handle, true, true); + native::set_entity_no_collision_entity(menu::player::get_local_player().m_entity, handle, true); + + math::vector3 rotation = native::get_gameplay_cam_rot(0); + math::vector3 target = native::get_gameplay_cam_coord() + (menu::camera::get_direction(rotation) * 25.f); + + native::set_entity_coords(handle, target.x, target.y, target.z, false, false, false, false); + native::set_entity_rotation(handle, rotation.x, 0.f, rotation.z, 0, 1); + + if (native::is_entity_a_vehicle(handle)) native::set_vehicle_out_of_control(handle, true, true); + native::apply_force_to_entity_center_of_mass(handle, 1, 0.f, m_vars.m_speed, 0.f, false, true, true, false); + } + }); + } + } +} + +entity_gun_menu* g_instance; +entity_gun_menu* entity_gun_menu::get() { + if (g_instance == nullptr) { + g_instance = new entity_gun_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/entity_gun.h b/GTAV/src/menu/base/submenus/main/weapon/entity_gun.h new file mode 100644 index 0000000..2fc14c0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/entity_gun.h @@ -0,0 +1,33 @@ +#pragma once +#include "menu/base/submenu.h" + +class entity_gun_menu : public menu::submenu::submenu { +public: + static entity_gun_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + entity_gun_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::entity::gun::vars { + struct variables { + int m_type = 0; + int m_wait = 0; + int m_object = 0; + int m_vehicle = 0; + int m_ped = 0; + float m_speed = 900.f; + + bool m_toggle = false; + }; + + extern scroll_struct objects[100]; + extern scroll_struct vehicles[100]; + extern scroll_struct peds[100]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_editor.cpp b/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_editor.cpp new file mode 100644 index 0000000..8cc3a0f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_editor.cpp @@ -0,0 +1,359 @@ +#include "explosion_editor.h" +#include "menu/base/submenu_handler.h" +#include "../weapon_mods.h" + +using namespace weapon::explosion::editor::vars; + +namespace weapon::explosion::editor::vars { + variables m_vars; + + scroll_struct explosion_names[83]; + + scroll_struct explosion_fx_list[] = { + { localization("GRENADE", true), 0x8CBD7381 }, + { localization("GRENADELAUNCHER", true), 0x8CBD7381 }, + { localization("STICKYBOMB", true), 0x6818372E }, + { localization("MOLOTOV", true), 0x289C84AB }, + { localization("ROCKET", true), 0xC18A7083 }, + { localization("TANKSHELL", true), 0xC6109DA9 }, + { localization("HI_OCTANE", true), 0xC18A7083 }, + { localization("CAR", true), 0x1FDD8CC7 }, + { localization("PLANE", true), 0x174DDF67 }, + { localization("PETROL_PUMP", true), 0x5C685140 }, + { localization("BIKE", true), 0x2E89B6C6 }, + { localization("DIR_STEAM", true), 0xB096860 }, + { localization("DIR_FLAME", true), 0x61BEF304 }, + { localization("DIR_WATER_HYDRANT", true), 0xC9E6266C }, + { localization("DIR_GAS_CANISTER", true), 0xDCD1237B }, + { localization("BOAT", true), 0x9AE5CE85 }, + { localization("SHIP_DESTROY", true), 0xC18A7083 }, + { localization("TRUCK", true), 0x272C2A1C }, + { localization("BULLET", true), 0x4A602D1B }, + { localization("SMOKEGRENADELAUNCHER", true), 0x1B171B0A }, + { localization("SMOKEGRENADE", true), 0xC36F9FF4 }, + { localization("BZGAS", true), 0xC36F9FF4 }, + { localization("FLARE", true), 0x4DFE55EF }, + { localization("GAS_CANISTER", true), 0x531AE6D7 }, + { localization("EXTINGUISHER", true), 0x3C212E68 }, + { localization("PROGRAMMABLEAR", true), 0x4A602D1B }, + { localization("TRAIN", true), 0x7DF5D791 }, + { localization("BARREL", true), 0x26A49BC }, + { localization("PROPANE", true), 0x2A8D8114 }, + { localization("BLIMP", true), 0xBA683EF5 }, + { localization("DIR_FLAME_EXPLODE", true), 0x61BEF304 }, + { localization("TANKER", true), 0x6136E279 }, + { localization("PLANE_ROCKET", true), 0x549AE743 }, + { localization("VEHICLE_BULLET", true), 0x4A602D1B }, + { localization("GAS_TANK", true), 0x2A8D8114 }, + { localization("BIRD_CRAP", true), 0x8B716982 }, + { localization("RAILGUN", true), 0x4A602D1B }, + { localization("BLIMP2", true), 0x9077376B }, + { localization("FIREWORK", true), 0x1499FEF9 }, + { localization("SNOWBALL", true), 0x4B0245BA }, + { localization("PROXMINE", true), 0x6818372E }, + { localization("VALKYRIE_CANNON", true), 0x8CBD7381 }, + { localization("AIR_DEFENCE", true), 0x3C84F30B }, + { localization("PIPEBOMB", true), 0x2E3BC2D6 }, + { localization("VEHICLEMINE", true), 0x8CBD7381 }, + { localization("EXPLOSIVEAMMO", true), 0x4A602D1B }, + { localization("APCSHELL", true), 0xC6109DA9 }, + { localization("BOMB_CLUSTER", true), 0x7007891E }, + { localization("BOMB_GAS", true), 0xAD0A7E5D }, + { localization("BOMB_INCENDIARY", true), 0x62F8744D }, + { localization("BOMB_STANDARD", true), 0x30A5254A }, + { localization("TORPEDO", true), 0xC18A7083 }, + { localization("TORPEDO_UNDERWATER", true), 0x8D16EE2E }, + { localization("BOMBUSHKA_CANNON", true), 0x8CBD7381 }, + { localization("BOMB_CLUSTER_SECONDARY", true), 0x8CBD7381 }, + { localization("HUNTER_BARRAGE", true), 0x549AE743 }, + { localization("HUNTER_CANNON", true), 0x8CBD7381 }, + { localization("ROGUE_CANNON", true), 0x2E3BC2D6 }, + { localization("MINE_UNDERWATER", true), 0x4F7CD2DC }, + { localization("ORBITAL_CANNON", true), 0x0 }, + { localization("BOMB_STANDARD_WIDE", true), 0x30A5254A }, + { localization("EXPLOSIVEAMMO_SHOTGUN", true), 0x4A602D1B }, + { localization("OPPRESSOR2_CANNON", true), 0x3C4CCAAB }, + { localization("MORTAR_KINETIC", true), 0x996D8865 }, + { localization("VEHICLEMINE_KINETIC", true), 0xD0CB2C03 }, + { localization("VEHICLEMINE_EMP", true), 0xEEC9E329 }, + { localization("VEHICLEMINE_SPIKE", true), 0xD1C5557C }, + { localization("VEHICLEMINE_SLICK", true), 0x98BC33A3 }, + { localization("VEHICLEMINE_TAR", true), 0x1325B17C }, + { localization("SCRIPT_DRONE", true), 0x8CBD7381 }, + { localization("RAYGUN", true), 0x86AD156C }, + { localization("BURIEDMINE", true), 0x25A8CEBF }, + { localization("SCRIPT_MISSILE", true), 0xC18A7083 }, + { localization("RCTANK_ROCKET", true), 0x26CB9D76 }, + { localization("BOMB_WATER", true), 0xC612E8E3 }, + { localization("BOMB_WATER_SECONDARY", true), 0xC612E8E3 }, + { localization("EXTINGUISHER", true), 0x3C212E68 }, + { localization("EXTINGUISHER", true), 0x3C212E68 }, + { localization("EXTINGUISHER", true), 0x3C212E68 }, + { localization("EXTINGUISHER", true), 0x3C212E68 }, + { localization("EXTINGUISHER", true), 0x3C212E68 }, + { localization("SCRIPT_MISSILE_LARGE", true), 0xC18A7083 }, + { localization("SUBMARINE_BIG", true), 0x32775176 }, + }; + + rage::types::explosion_data* get_explosion(uint32_t explosion_hash) { + for (std::size_t i = 0; i < 83; i++) { + rage::types::explosion_data* explosion = &global::vars::g_explosion_data[i]; + if (native::get_hash_key(explosion->m_explosion_name) == explosion_hash) { + return explosion; + } + } + + return nullptr; + } + + rage::types::explosion_fx* get_explosion_fx(uint32_t hash) { + for (std::size_t i = 0; i < 53; i++) { + rage::types::explosion_fx* fx = &global::vars::g_explosion_fx[i]; + if (fx->m_name_hash == hash) { + return fx; + } + } + + return nullptr; + } + + std::size_t get_explosion_fx_entry(uint32_t hash) { + for (std::size_t i = 0; i < NUMOF(explosion_fx_list); i++) { + if (explosion_fx_list[i].m_result == hash) { + return i; + } + } + + return 0; + } + + void update_editor() { + if (explosion_names[0].m_result != 1337) { + for (std::size_t i = 0; i < NUMOF(explosion_names); i++) { + rage::types::explosion_data* explosion = &global::vars::g_explosion_data[i]; + explosion_names[i].m_name.set(native::get_text_substring_slice(explosion->m_explosion_name, 8, (int)strlen(explosion->m_explosion_name))); + explosion_names[i].m_result = 1337; + } + } + + m_vars.m_explosion_data_ptr = &global::vars::g_explosion_data[m_vars.m_selected_explosion]; + memcpy(&m_vars.m_explosion_data, m_vars.m_explosion_data_ptr, sizeof(rage::types::explosion_data)); + + m_vars.m_selected_fx = (int)get_explosion_fx_entry(m_vars.m_explosion_data_ptr->m_vfx_tag_name_hash); + + m_vars.m_explosion_fx_ptr = get_explosion_fx(m_vars.m_explosion_data_ptr->m_vfx_tag_name_hash); + if (m_vars.m_explosion_fx_ptr) { + memcpy(&m_vars.m_explosion_fx, m_vars.m_explosion_fx_ptr, sizeof(rage::types::explosion_fx)); + } + } +} + +void explosion_editor_menu::load() { + set_name("Explosion Editor"); + set_parent(); + + add_option(scroll_option(SCROLL, "Explosion") + .add_translate() + .add_scroll(m_vars.m_selected_explosion, 0, NUMOF(explosion_names), explosion_names) + .add_click(update_editor)); + + add_option(scroll_option(SCROLL, "FX") + .add_translate() + .add_scroll(m_vars.m_selected_fx, 0, NUMOF(explosion_fx_list), explosion_fx_list) + .add_click([] { m_vars.m_explosion_data_ptr->m_vfx_tag_name_hash = explosion_fx_list[m_vars.m_selected_fx].m_result; })); + + add_option(number_option(SCROLL, "FX Scale") + .add_translate() + .add_number(m_vars.m_explosion_fx.m_scale, "%.1f", 0.1f).add_min(-1.f).add_max(100.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_fx_ptr->m_scale = m_vars.m_explosion_fx.m_scale; }) + .add_requirement([] { return m_vars.m_explosion_fx_ptr != nullptr; })); + + add_option(number_option(SCROLL, "Center Damage") + .add_translate() + .add_number(m_vars.m_explosion_data.m_damage_at_centre, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_damage_at_centre = m_vars.m_explosion_data.m_damage_at_centre; })); + + add_option(number_option(SCROLL, "Edge Damage") + .add_translate() + .add_number(m_vars.m_explosion_data.m_damage_at_edge, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_damage_at_edge = m_vars.m_explosion_data.m_damage_at_edge; })); + + add_option(number_option(SCROLL, "Network Player Modifier") + .add_translate() + .add_number(m_vars.m_explosion_data.m_network_player_modifier, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_network_player_modifier = m_vars.m_explosion_data.m_network_player_modifier; })); + + add_option(number_option(SCROLL, "Network Ped Modifier") + .add_translate() + .add_number(m_vars.m_explosion_data.m_network_ped_modifier, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_network_ped_modifier = m_vars.m_explosion_data.m_network_ped_modifier; })); + + add_option(number_option(SCROLL, "End Radius") + .add_translate() + .add_number(m_vars.m_explosion_data.m_end_radius, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_end_radius = m_vars.m_explosion_data.m_end_radius; })); + + add_option(number_option(SCROLL, "Init Speed") + .add_translate() + .add_number(m_vars.m_explosion_data.m_init_speed, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_init_speed = m_vars.m_explosion_data.m_init_speed; })); + + add_option(number_option(SCROLL, "Decay Factor") + .add_translate() + .add_number(m_vars.m_explosion_data.m_decay_factor, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_decay_factor = m_vars.m_explosion_data.m_decay_factor; })); + + add_option(number_option(SCROLL, "Force Factor") + .add_translate() + .add_number(m_vars.m_explosion_data.m_force_factor, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_force_factor = m_vars.m_explosion_data.m_force_factor; })); + + add_option(number_option(SCROLL, "Ragdoll Force Modifier") + .add_translate() + .add_number(m_vars.m_explosion_data.m_ragdoll_force_modifier, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_ragdoll_force_modifier = m_vars.m_explosion_data.m_ragdoll_force_modifier; })); + + add_option(number_option(SCROLL, "Self Force Modifier") + .add_translate() + .add_number(m_vars.m_explosion_data.m_self_force_modifier, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_self_force_modifier = m_vars.m_explosion_data.m_self_force_modifier; })); + + add_option(number_option(SCROLL, "Directed Width") + .add_translate() + .add_number(m_vars.m_explosion_data.m_directed_width, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_directed_width = m_vars.m_explosion_data.m_directed_width; })); + + add_option(number_option(SCROLL, "Directed Lifetime") + .add_translate() + .add_number(m_vars.m_explosion_data.m_directed_lifetime, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_directed_lifetime = m_vars.m_explosion_data.m_directed_lifetime; })); + + add_option(number_option(SCROLL, "Cam Shake") + .add_translate() + .add_number(m_vars.m_explosion_data.m_cam_shake, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_cam_shake = m_vars.m_explosion_data.m_cam_shake; })); + + add_option(number_option(SCROLL, "Cam Shake Rolloff Scaling") + .add_translate() + .add_number(m_vars.m_explosion_data.m_cam_shake_roll_off_scaling, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_cam_shake_roll_off_scaling = m_vars.m_explosion_data.m_cam_shake_roll_off_scaling; })); + + add_option(number_option(SCROLL, "Shocking Event Visual Range") + .add_translate() + .add_number(m_vars.m_explosion_data.m_shocking_event_visual_range_override, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_shocking_event_visual_range_override = m_vars.m_explosion_data.m_shocking_event_visual_range_override; })); + + add_option(number_option(SCROLL, "Shocking Event Audio Range") + .add_translate() + .add_number(m_vars.m_explosion_data.m_shocking_event_audio_range_override, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_shocking_event_audio_range_override = m_vars.m_explosion_data.m_shocking_event_audio_range_override; })); + + add_option(number_option(SCROLL, "Frag Damage") + .add_translate() + .add_number(m_vars.m_explosion_data.m_frag_damage, "%.1f", 0.1f).add_min(-1.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { m_vars.m_explosion_data_ptr->m_frag_damage = m_vars.m_explosion_data.m_frag_damage; })); + + add_option(toggle_option("Minor Explosion") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_minor_explosion) + .add_click([] { m_vars.m_explosion_data_ptr->m_minor_explosion = m_vars.m_explosion_data.m_minor_explosion; })); + + add_option(toggle_option("Applies Continuous Damage") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_applies_continuous_damage) + .add_click([] { m_vars.m_explosion_data_ptr->m_applies_continuous_damage = m_vars.m_explosion_data.m_applies_continuous_damage; })); + + add_option(toggle_option("Post Process Collisions") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_post_process_collisions_with_no_force) + .add_click([] { m_vars.m_explosion_data_ptr->m_post_process_collisions_with_no_force = m_vars.m_explosion_data.m_post_process_collisions_with_no_force; })); + + add_option(toggle_option("Damage Vehicles") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_damage_vehicles) + .add_click([] { m_vars.m_explosion_data_ptr->m_damage_vehicles = m_vars.m_explosion_data.m_damage_vehicles; })); + + add_option(toggle_option("Damage Objects") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_damage_objects) + .add_click([] { m_vars.m_explosion_data_ptr->m_damage_objects = m_vars.m_explosion_data.m_damage_objects; })); + + add_option(toggle_option("Only Affect Living Peds") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_only_affects_live_peds) + .add_click([] { m_vars.m_explosion_data_ptr->m_only_affects_live_peds = m_vars.m_explosion_data.m_only_affects_live_peds; })); + + add_option(toggle_option("Ignore Exploding Entity") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_ignore_exploding_entity) + .add_click([] { m_vars.m_explosion_data_ptr->m_ignore_exploding_entity = m_vars.m_explosion_data.m_ignore_exploding_entity; })); + + add_option(toggle_option("No Occlusion") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_no_occlusion) + .add_click([] { m_vars.m_explosion_data_ptr->m_no_occlusion = m_vars.m_explosion_data.m_no_occlusion; })); + + add_option(toggle_option("Explode Attach When Finished") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_explode_attach_entity_when_finished) + .add_click([] { m_vars.m_explosion_data_ptr->m_explode_attach_entity_when_finished = m_vars.m_explosion_data.m_explode_attach_entity_when_finished; })); + + add_option(toggle_option("Can Set Ped On Fire") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_can_set_ped_on_fire) + .add_click([] { m_vars.m_explosion_data_ptr->m_can_set_ped_on_fire = m_vars.m_explosion_data.m_can_set_ped_on_fire; })); + + add_option(toggle_option("Can Set Player On Fire") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_can_set_player_on_fire) + .add_click([] { m_vars.m_explosion_data_ptr->m_can_set_player_on_fire = m_vars.m_explosion_data.m_can_set_player_on_fire; })); + + add_option(toggle_option("Supress Crime") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_suppress_crime) + .add_click([] { m_vars.m_explosion_data_ptr->m_suppress_crime = m_vars.m_explosion_data.m_suppress_crime; })); + + add_option(toggle_option("Use Distance Damage Calculation") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_use_distance_damage_calc) + .add_click([] { m_vars.m_explosion_data_ptr->m_use_distance_damage_calc = m_vars.m_explosion_data.m_use_distance_damage_calc; })); + + add_option(toggle_option("Prevent Water Explosion VFX") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_prevent_water_explosion_vfx) + .add_click([] { m_vars.m_explosion_data_ptr->m_prevent_water_explosion_vfx = m_vars.m_explosion_data.m_prevent_water_explosion_vfx; })); + + add_option(toggle_option("Ignore Fire Ratio Check") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_ignore_ratio_check_for_fire) + .add_click([] { m_vars.m_explosion_data_ptr->m_ignore_ratio_check_for_fire = m_vars.m_explosion_data.m_ignore_ratio_check_for_fire; })); + + add_option(toggle_option("Allow Underwater Explosion") + .add_translate() + .add_toggle(m_vars.m_explosion_data.m_allow_underwater_explosion) + .add_click([] { m_vars.m_explosion_data_ptr->m_allow_underwater_explosion = m_vars.m_explosion_data.m_allow_underwater_explosion; })); + + for (std::size_t i = 0; i < NUMOF(explosion_names); i++) { + explosion_names[i].m_name.set(""); + explosion_names[i].m_result = 0; + } +} + +void explosion_editor_menu::update() {} + +void explosion_editor_menu::update_once() { + update_editor(); +} + +void explosion_editor_menu::feature_update() {} + +explosion_editor_menu* g_instance; +explosion_editor_menu* explosion_editor_menu::get() { + if (g_instance == nullptr) { + g_instance = new explosion_editor_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_editor.h b/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_editor.h new file mode 100644 index 0000000..21b2689 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_editor.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class explosion_editor_menu : public menu::submenu::submenu { +public: + static explosion_editor_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + explosion_editor_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::explosion::editor::vars { + struct variables { + int m_selected_explosion = 0; + int m_selected_fx = 0; + + rage::types::explosion_data m_explosion_data; + rage::types::explosion_fx m_explosion_fx; + + rage::types::explosion_data* m_explosion_data_ptr; + rage::types::explosion_fx* m_explosion_fx_ptr; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_gun.cpp b/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_gun.cpp new file mode 100644 index 0000000..6279200 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_gun.cpp @@ -0,0 +1,91 @@ +#include "explosion_gun.h" +#include "menu/base/submenu_handler.h" +#include "../weapon_mods.h" +#include "menu/base/util/raycast.h" +#include "global/lists.h" + +using namespace weapon::explosion::gun::vars; + +namespace weapon::explosion::gun::vars { + variables m_vars; +} + +void explosion_gun_menu::load() { + set_name("Explosion Gun"); + set_parent(); + + add_option(toggle_option("Toggle Explosion Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_toggle).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Explosion") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(global::lists::g_explosions), global::lists::g_explosions).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Audible") + .add_translate() + .add_toggle(m_vars.m_audible).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Invisible") + .add_translate() + .add_toggle(m_vars.m_invisible).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Radius") + .add_translate() + .add_number(m_vars.m_radius, "%.1f", 0.1f).add_min(0.f).add_max(100.f).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Camera Shake") + .add_translate() + .add_number(m_vars.m_camera_shake, "%.1f", 0.1f).add_min(0.f).add_max(100.f).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(TOGGLE, "Owner") + .add_translate() + .add_toggle(m_vars.m_change_owner) + .add_click([] { + m_vars.m_owner_id = m_vars.m_change_owner_list[m_vars.m_change_owner_value].m_result; + }) + .add_scroll(m_vars.m_change_owner_value, 0, NUMOF(m_vars.m_change_owner_list), m_vars.m_change_owner_list) + .add_update([](scroll_option* option, int position) { option->add_scroll(m_vars.m_change_owner_value, 0, NUMOF(m_vars.m_change_owner_list), m_vars.m_change_owner_list); }) + .add_requirement([] { return m_vars.m_list_size >= 1; })); +} + +void explosion_gun_menu::update() { + m_vars.m_list_size = 0; + menu::player::for_each([&](menu::player::player_context& player) { + m_vars.m_change_owner_list[m_vars.m_list_size].m_name.set(player.m_name); + m_vars.m_change_owner_list[m_vars.m_list_size].m_result = player.m_id; + + if (m_vars.m_change_owner) { + if (m_vars.m_owner_id == player.m_id) { + m_vars.m_change_owner_value = m_vars.m_list_size; + } + } + + m_vars.m_list_size++; + }); +} + +void explosion_gun_menu::update_once() {} + +void explosion_gun_menu::feature_update() { + if (m_vars.m_toggle) { + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + menu::raycast cast = menu::raycast_infront(9999.f); + if (cast.hit_something()) { + math::vector3 coords = cast.get_coords(); + native::add_owned_explosion(m_vars.m_change_owner ? menu::player::get_player(m_vars.m_change_owner_list[m_vars.m_owner_id].m_result).m_ped : menu::player::get_local_player().m_ped, coords.x, coords.y, coords.z, m_vars.m_type, m_vars.m_radius, m_vars.m_audible, m_vars.m_invisible, m_vars.m_camera_shake); + } + } + } +} + +explosion_gun_menu* g_instance; +explosion_gun_menu* explosion_gun_menu::get() { + if (g_instance == nullptr) { + g_instance = new explosion_gun_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_gun.h b/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_gun.h new file mode 100644 index 0000000..cd8d74b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/explosions/explosion_gun.h @@ -0,0 +1,33 @@ +#pragma once +#include "menu/base/submenu.h" + +class explosion_gun_menu : public menu::submenu::submenu { +public: + static explosion_gun_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + explosion_gun_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::explosion::gun::vars { + struct variables { + int m_type; + int m_change_owner_value; + int m_list_size; + bool m_toggle; + bool m_audible = true; + bool m_invisible = false; + bool m_change_owner = false; + float m_radius = 10.f; + float m_camera_shake = 0.f; + int m_owner_id = 0; + scroll_struct m_change_owner_list[32]; + }; + + extern variables m_vars; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment.cpp b/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment.cpp new file mode 100644 index 0000000..0a84ee0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment.cpp @@ -0,0 +1,134 @@ +#include "give_attachment.h" +#include "menu/base/submenu_handler.h" +#include "give_weapons.h" +#include "../purchase/purchase_weapon.h" +#include "rage/engine.h" +#include "global/lists.h" +#include "give_weapon.h" +#include "give_attachment_selected.h" +#include "menu/base/util/notify.h" + +using namespace weapon::give::attachment::vars; + +namespace weapon::give::attachment::vars { + variables m_vars; + + scroll_struct give_all[] = { + { localization("Current", true), 0 }, + { localization("All", true), 1 } + }; + + bool does_weapon_have_components(uint32_t weapon) { + int count = 0; + uint32_t last_component = 0; + + auto hashes = rage::engine::get_hash_list_from_hash_table(*(uint32_t*)(global::vars::g_weapon_components.m_count) - 1, global::vars::g_weapon_components.m_list); + for (uint32_t component : hashes) { + if (native::does_weapon_take_weapon_component(weapon, component)) { + count++; + last_component = component; + } + } + + if (count) { + if (count == 1) { + if (!strcmp(weapon::purchase::weapon::vars::scripts::func_181(last_component, weapon), "NULL")) { + return false; + } + } + + return true; + } + + return false; + } + + void do_give_all(give_attachment_menu* _this, bool remove) { + if (remove) { + if (m_vars.m_remove_all == 0) { + if (menu::player::get_local_player().m_has_weapon_in_hand) { + weapon::give::vars::remove_weapon_upgrades(menu::player::get_local_player().m_ped, menu::player::get_local_player().m_weapon_hash); + } else { + menu::notify::stacked(_this->get_string("Remove Attachments"), _this->get_string("You don't have a weapon in hand"), global::ui::g_error); + } + + return; + } + + for (scroll_struct weapon : global::lists::g_weapons) { + weapon::give::vars::remove_weapon_upgrades(menu::player::get_local_player().m_ped, weapon.m_result); + } + + return; + } + + if (m_vars.m_give_all == 0) { + if (menu::player::get_local_player().m_has_weapon_in_hand) { + weapon::give::vars::upgrade_weapon_components(menu::player::get_local_player().m_ped, menu::player::get_local_player().m_weapon_hash); + } else { + menu::notify::stacked(_this->get_string("Give Attachments"), _this->get_string("You don't have a weapon in hand"), global::ui::g_error); + } + + return; + } + + for (scroll_struct weapon : global::lists::g_weapons) { + weapon::give::vars::upgrade_weapon_components(menu::player::get_local_player().m_ped, weapon.m_result); + } + } +} + +void give_attachment_menu::load() { + set_name("Give Attachment"); + set_parent(); + + add_string("Remove Attachments"); + add_string("Give Attachments"); + add_string("You don't have a weapon in hand"); + + add_option(scroll_option(SCROLLSELECT, "Give All Attachments") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_give_all, 0, NUMOF(give_all), give_all) + .add_click([this] { do_give_all(this, false); })); + + add_option(scroll_option(SCROLLSELECT, "Remove All Attachments") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_remove_all, 0, NUMOF(give_all), give_all) + .add_click([this] { do_give_all(this, true); })); + + add_option(submenu_option("Current Weapon") + .add_translate().add_hotkey() + .add_click([] { weapon::give::attachment::selected::vars::m_vars.m_selected_weapon = menu::player::get_local_player().m_weapon_hash; }) + .add_submenu() + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand && does_weapon_have_components(menu::player::get_local_player().m_weapon_hash); })); + + add_option(break_option("Weapons") + .add_translate()); +} + +void give_attachment_menu::update() {} + +void give_attachment_menu::update_once() { + clear_options(4); + + for (scroll_struct weapon : global::lists::g_weapons) { + if (does_weapon_have_components(weapon.m_result)) { + add_option(submenu_option(weapon.m_name.get()) + .add_click([=] { weapon::give::attachment::selected::vars::m_vars.m_selected_weapon = weapon.m_result; }) + .add_submenu()); + } + } +} + +void give_attachment_menu::feature_update() {} + +give_attachment_menu* g_instance; +give_attachment_menu* give_attachment_menu::get() { + if (g_instance == nullptr) { + g_instance = new give_attachment_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment.h b/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment.h new file mode 100644 index 0000000..94a5448 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class give_attachment_menu : public menu::submenu::submenu { +public: + static give_attachment_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + give_attachment_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::give::attachment::vars { + struct variables { + int m_give_all; + int m_remove_all; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment_selected.cpp b/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment_selected.cpp new file mode 100644 index 0000000..ffb7e26 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment_selected.cpp @@ -0,0 +1,62 @@ +#include "give_attachment_selected.h" +#include "menu/base/submenu_handler.h" +#include "give_attachment.h" +#include "rage/engine.h" +#include "../purchase/purchase_weapon.h" + +using namespace weapon::give::attachment::selected::vars; + +namespace weapon::give::attachment::selected::vars { + variables m_vars; +} + +void give_attachment_selected_menu::load() { + set_name("Give Attachment"); + set_parent(); +} + +void give_attachment_selected_menu::update() {} + +void give_attachment_selected_menu::update_once() { + clear_options(0); + + std::vector hashes = rage::engine::get_hash_list_from_hash_table(*(uint32_t*)(global::vars::g_weapon_components.m_count) - 1, global::vars::g_weapon_components.m_list); + for (std::size_t i = 0; i < hashes.size(); i++) { + uint32_t component = hashes[i]; + if (native::does_weapon_take_weapon_component(m_vars.m_selected_weapon, component)) { + const char* label = weapon::purchase::weapon::vars::scripts::func_181(component, m_vars.m_selected_weapon); + if (label) { + if (strcmp(native::get_label_text(label), "NULL")) { + std::shared_ptr option = add_option(button_option(native::get_label_text(label)) + .add_click_this([=] (button_option* option) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, m_vars.m_selected_weapon, component)) { + native::remove_weapon_component_from_ped(menu::player::get_local_player().m_ped, m_vars.m_selected_weapon, component); + } else { + native::give_weapon_component_to_ped(menu::player::get_local_player().m_ped, m_vars.m_selected_weapon, component); + } + + update_once(); + })); + + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, m_vars.m_selected_weapon, component)) { + option->add_sprite({ "commonmenu", "shop_gunclub_icon" }); + option->add_sprite_scale({ 0.02112f, 0.03744f }); + } + } + } + } + } +} + +void give_attachment_selected_menu::feature_update() {} + +give_attachment_selected_menu* g_instance; +give_attachment_selected_menu* give_attachment_selected_menu::get() { + if (g_instance == nullptr) { + g_instance = new give_attachment_selected_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment_selected.h b/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment_selected.h new file mode 100644 index 0000000..6125336 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_attachment_selected.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class give_attachment_selected_menu : public menu::submenu::submenu { +public: + static give_attachment_selected_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + give_attachment_selected_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::give::attachment::selected::vars { + struct variables { + uint32_t m_selected_weapon; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_tint.cpp b/GTAV/src/menu/base/submenus/main/weapon/give/give_tint.cpp new file mode 100644 index 0000000..d7744b2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_tint.cpp @@ -0,0 +1,171 @@ +#include "give_tint.h" +#include "menu/base/submenu_handler.h" +#include "give_weapons.h" +#include "give_tint_selected.h" +#include "global/lists.h" + +using namespace weapon::give::tint::vars; + +namespace weapon::give::tint::vars { + namespace scripts { + bool func_173(int iParam0) { + switch (iParam0) { + case joaat("WEAPON_PISTOL_MK2"): + case joaat("WEAPON_SMG_MK2"): + case joaat("WEAPON_ASSAULTRIFLE_MK2"): + case joaat("WEAPON_CARBINERIFLE_MK2"): + case joaat("WEAPON_COMBATMG_MK2"): + case joaat("WEAPON_HEAVYSNIPER_MK2"): + case joaat("WEAPON_PUMPSHOTGUN_MK2"): + case joaat("WEAPON_SPECIALCARBINE_MK2"): + case joaat("WEAPON_SNSPISTOL_MK2"): + case joaat("WEAPON_MARKSMANRIFLE_MK2"): + case joaat("WEAPON_REVOLVER_MK2"): + case joaat("WEAPON_BULLPUPRIFLE_MK2"): + return true; + } + return false; + } + + int func_81(int iParam0, int* data) { + int iVar0; + int iVar1; + + iVar1 = native::get_num_dlc_weapons(); + iVar0 = 0; + while (iVar0 < iVar1) { + if (native::get_dlc_weapon_data(iVar0, data)) { + if (data[2] == iParam0) { + return iVar0; + } + } + iVar0++; + } + return -1; + } + } + + bool does_weapon_have_tints(uint32_t weapon) { + switch (weapon) { + case joaat("WEAPON_KNUCKLE"): + case joaat("WEAPON_DOUBLEACTION"): + return false; + } + + uint32_t group = native::get_weapontype_group(weapon); + if (group == 0xD49321D4 || group == 0x5C4C5883 || group == 0x5F1BE07C || group == 0xFDBF656C || group == 0xA27A4F9F) return false; + return true; + } + + std::vector> get_tints(int weapon) { + std::vector> items; + + switch (weapon) { + case joaat("WEAPON_RAYPISTOL"): { + for (int i = 0; i <= 6; i++) { + items.push_back({ "RWT_TINT" + std::to_string(i), i }); + } + break; + } + + case joaat("WEAPON_RAYCARBINE"): + case joaat("WEAPON_RAYMINIGUN"): { + items.push_back({ "RWT_TINT7", 0 }); + items.push_back({ "RWT_TINT1", 1 }); + items.push_back({ "RWT_TINT2", 2 }); + items.push_back({ "RWT_TINT3", 3 }); + items.push_back({ "RWT_TINT4", 4 }); + items.push_back({ "RWT_TINT5", 5 }); + items.push_back({ "RWT_TINT6", 6 }); + break; + } + + default: { + int data[100]; + + if (weapon == -61829581) { + for (int i = 0; i <= 11; i++) { + items.push_back({ "FW_TINT" + std::to_string(i), i }); + } + } else if (native::network_is_game_in_progress() || scripts::func_81(weapon, data) != -1) { + if (scripts::func_173(weapon)) { + for (int i = 0; i <= 31; i++) { + items.push_back({ "WCT_TINT_" + std::to_string(i), i }); + } + } else { + if ((((weapon == joaat("WEAPON_MUSKET") || weapon == joaat("WEAPON_FLAREGUN")) || weapon == joaat("WEAPON_FIREWORK")) || weapon == joaat("WEAPON_MARKSMANPISTOL")) || weapon == joaat("WEAPON_DBSHOTGUN")) { + items.push_back({ "WM_TINTDF", 0 }); + } else { + items.push_back({ "WM_TINT0", 0 }); + } + + items.push_back({ "WM_TINT4", 4 }); + items.push_back({ "WM_TINT1", 1 }); + items.push_back({ "WM_TINT6", 6 }); + items.push_back({ "WM_TINT5", 5 }); + items.push_back({ "WM_TINT3", 3 }); + items.push_back({ "WM_TINT2", 2 }); + items.push_back({ "WM_TINT7", 7 }); + } + } else { + items.push_back({ "WM_TINT0", 0 }); + items.push_back({ "WM_TINT4", 4 }); + items.push_back({ "WM_TINT1", 1 }); + items.push_back({ "WM_TINT6", 6 }); + items.push_back({ "WM_TINT5", 5 }); + items.push_back({ "WM_TINT3", 3 }); + items.push_back({ "WM_TINT2", 2 }); + items.push_back({ "WM_TINT7", 7 }); + } + + break; + } + } + + return items; + } +} + +void give_tint_menu::load() { + set_name("Give Tint"); + set_parent(); + + add_option(submenu_option("Current Weapon") + .add_translate().add_hotkey() + .add_click([] { weapon::give::tint::selected::vars::m_vars.m_selected_weapon = menu::player::get_local_player().m_weapon_hash; }) + .add_submenu() + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand && does_weapon_have_tints(menu::player::get_local_player().m_weapon_hash); })); + + add_option(break_option("Weapons") + .add_translate()); +} + +void give_tint_menu::update() {} + +void give_tint_menu::update_once() { + clear_options(2); + + for (scroll_struct weapon : global::lists::g_weapons) { + if (does_weapon_have_tints(weapon.m_result)) { + std::vector> camos = get_tints((int)weapon.m_result); + if (camos.size()) { + add_option(submenu_option(weapon.m_name.get()) + .add_submenu() + .add_click([=] { weapon::give::tint::selected::vars::m_vars.m_selected_weapon = weapon.m_result; })); + } + } + } +} + +void give_tint_menu::feature_update() {} + +give_tint_menu* g_instance; +give_tint_menu* give_tint_menu::get() { + if (g_instance == nullptr) { + g_instance = new give_tint_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_tint.h b/GTAV/src/menu/base/submenus/main/weapon/give/give_tint.h new file mode 100644 index 0000000..1bab9c3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_tint.h @@ -0,0 +1,19 @@ +#pragma once +#include "menu/base/submenu.h" + +class give_tint_menu : public menu::submenu::submenu { +public: + static give_tint_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + give_tint_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::give::tint::vars { + std::vector> get_tints(int weapon); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_tint_selected.cpp b/GTAV/src/menu/base/submenus/main/weapon/give/give_tint_selected.cpp new file mode 100644 index 0000000..c237e70 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_tint_selected.cpp @@ -0,0 +1,56 @@ +#include "give_tint_selected.h" +#include "menu/base/submenu_handler.h" +#include "give_tint.h" +#include "util/util.h" + +using namespace weapon::give::tint::selected::vars; + +namespace weapon::give::tint::selected::vars { + variables m_vars; +} + +void give_tint_selection_menu::load() { + set_name("Give Tint"); + set_parent(); +} + +void give_tint_selection_menu::update() {} + +void give_tint_selection_menu::update_once() { + clear_options(0); + + std::vector> camos = weapon::give::tint::vars::get_tints(m_vars.m_selected_weapon); + + m_vars.m_context.reset(); + m_vars.m_context.m_selected = 0; + + std::vector> options; + for (std::pair& camo : camos) { + std::string label_text = native::get_label_text(camo.first.c_str()); + util::replace_string(label_text, "tint", "Tint"); + + options.push_back(add_option(radio_option(label_text) + .add_radio(m_vars.m_context) + .add_click([=, this] { + native::set_ped_weapon_tint_index(menu::player::get_local_player().m_ped, m_vars.m_selected_weapon, camo.second); + update_once(); + }))); + } + + if (native::get_ped_weapon_tint_index(menu::player::get_local_player().m_ped, m_vars.m_selected_weapon) != -1) { + options[native::get_ped_weapon_tint_index(menu::player::get_local_player().m_ped, m_vars.m_selected_weapon)]->update_selected(); + } +} + +void give_tint_selection_menu::feature_update() {} + +give_tint_selection_menu* g_instance; +give_tint_selection_menu* give_tint_selection_menu::get() { + if (g_instance == nullptr) { + g_instance = new give_tint_selection_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_tint_selected.h b/GTAV/src/menu/base/submenus/main/weapon/give/give_tint_selected.h new file mode 100644 index 0000000..8edc0bc --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_tint_selected.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class give_tint_selection_menu : public menu::submenu::submenu { +public: + static give_tint_selection_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + give_tint_selection_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::give::tint::selected::vars { + struct variables { + radio_context m_context = { "commonmenu", "shop_tick_icon" }; + uint32_t m_selected_weapon; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_weapon.cpp b/GTAV/src/menu/base/submenus/main/weapon/give/give_weapon.cpp new file mode 100644 index 0000000..fbbecca --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_weapon.cpp @@ -0,0 +1,105 @@ +#include "give_weapon.h" +#include "menu/base/submenu_handler.h" +#include "give_weapons.h" +#include "rage/engine.h" +#include "global/lists.h" + +using namespace weapon::give::vars; + +namespace weapon::give::vars { + variables m_vars; + + void upgrade_weapon_components(Ped ped, uint32_t weapon_hash) { + std::vector hashes = rage::engine::get_hash_list_from_hash_table(*(uint32_t*)(global::vars::g_weapon_components.m_count) - 1, global::vars::g_weapon_components.m_list); + for (uint32_t component : hashes) { + if (native::does_weapon_take_weapon_component(weapon_hash, component)) { + native::give_weapon_component_to_ped(ped, weapon_hash, component); + } + } + } + + void remove_weapon_upgrades(Ped ped, uint32_t weapon_hash) { + std::vector hashes = rage::engine::get_hash_list_from_hash_table(*(uint32_t*)(global::vars::g_weapon_components.m_count) - 1, global::vars::g_weapon_components.m_list); + for (uint32_t component : hashes) { + if (native::does_weapon_take_weapon_component(weapon_hash, component)) { + native::remove_weapon_component_from_ped(ped, weapon_hash, component); + } + } + } + + void give_weapon(Ped ped, uint32_t weapon_hash, bool equip_now, bool fully_upgraded) { + int ammo = -1; + native::get_max_ammo(ped, weapon_hash, &ammo); + native::give_weapon_to_ped(ped, weapon_hash, ammo, false, equip_now); + + if (fully_upgraded) { + upgrade_weapon_components(ped, weapon_hash); + } + } +} + +void give_weapon_menu::load() { + set_name("Give Weapon"); + set_parent(); + + add_option(toggle_option("Give All Weapons (Persistent)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_give_weapons) + .add_click([] { + if (m_vars.m_give_weapons) { + for (scroll_struct weapon : global::lists::g_weapons) { + give_weapon(menu::player::get_local_player().m_ped, weapon.m_result, false, false); + } + } + }).add_savable(get_submenu_name_stack()) + .add_tooltip("When toggled, weapons are reapplied on model change and session change")); + + add_option(break_option("Weapons") + .add_translate()); + + if (m_vars.m_give_weapons) { + for (scroll_struct weapon : global::lists::g_weapons) { + give_weapon(menu::player::get_local_player().m_ped, weapon.m_result, false, false); + } + } +} + +void give_weapon_menu::update() {} + +void give_weapon_menu::update_once() { + clear_options(2); + + for (scroll_struct weapon : global::lists::g_weapons) { + add_option(button_option(weapon.m_name.get()) + .add_click([=] { give_weapon(menu::player::get_local_player().m_ped, weapon.m_result, true, false); }) + .add_update([=](button_option* option) { + if (native::has_ped_got_weapon(menu::player::get_local_player().m_ped, weapon.m_result, false)) { + option->add_sprite({ "commonmenu", "shop_gunclub_icon" }); + option->add_sprite_scale({ 0.02112f, 0.03744f }); + } else option->remove_sprite(); + })); + } +} + +void give_weapon_menu::feature_update() { + if (m_vars.m_give_weapons) { + if (global::vars::g_reapply_weapons) { + global::vars::g_reapply_weapons = false; + + for (scroll_struct weapon : global::lists::g_weapons) { + give_weapon(menu::player::get_local_player().m_ped, weapon.m_result, false, false); + } + } + } +} + +give_weapon_menu* g_instance; +give_weapon_menu* give_weapon_menu::get() { + if (g_instance == nullptr) { + g_instance = new give_weapon_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_weapon.h b/GTAV/src/menu/base/submenus/main/weapon/give/give_weapon.h new file mode 100644 index 0000000..1dc9282 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_weapon.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class give_weapon_menu : public menu::submenu::submenu { +public: + static give_weapon_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + give_weapon_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::give::vars { + struct variables { + bool m_give_weapons; + }; + + void upgrade_weapon_components(Ped ped, uint32_t weapon_hash); + void remove_weapon_upgrades(Ped ped, uint32_t weapon_hash); + void give_weapon(Ped ped, uint32_t weapon_hash, bool equip_now, bool fully_upgraded); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_weapons.cpp b/GTAV/src/menu/base/submenus/main/weapon/give/give_weapons.cpp new file mode 100644 index 0000000..3b43bd5 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_weapons.cpp @@ -0,0 +1,41 @@ +#include "give_weapons.h" +#include "menu/base/submenu_handler.h" +#include "../weapon_mods.h" +#include "give_weapon.h" +#include "give_attachment.h" +#include "give_tint.h" +#include "../give_weapons_ammo.h" + +void give_weapons_menu::load() { + set_name("Give Weapons"); + set_parent(); + + add_option(submenu_option("Give Weapon") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Give Attachment") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Give Tint") + .add_translate().add_hotkey() + .add_submenu()); +} + +void give_weapons_menu::update() {} + +void give_weapons_menu::update_once() {} + +void give_weapons_menu::feature_update() {} + +give_weapons_menu* g_instance; +give_weapons_menu* give_weapons_menu::get() { + if (g_instance == nullptr) { + g_instance = new give_weapons_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give/give_weapons.h b/GTAV/src/menu/base/submenus/main/weapon/give/give_weapons.h new file mode 100644 index 0000000..a7e37c3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give/give_weapons.h @@ -0,0 +1,15 @@ +#pragma once +#include "menu/base/submenu.h" + +class give_weapons_menu : public menu::submenu::submenu { +public: + static give_weapons_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + give_weapons_menu() + : menu::submenu::submenu() {} +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give_weapons_ammo.cpp b/GTAV/src/menu/base/submenus/main/weapon/give_weapons_ammo.cpp new file mode 100644 index 0000000..a4234a0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give_weapons_ammo.cpp @@ -0,0 +1,56 @@ +#include "give_weapons_ammo.h" +#include "menu/base/submenu_handler.h" +#include "weapon_mods.h" +#include "global/lists.h" +#include "purchase/purchase_weapons.h" +#include "give/give_weapons.h" +#include "weapon_mods.h" +#include "give/give_weapon.h" + +void give_weapons_ammo_menu::load() { + set_name("Give Weapons and Ammo"); + set_parent(); + + add_option(submenu_option("Give Weapons") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Purchase Weapons") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(button_option("Give All Weapons") + .add_translate().add_hotkey() + .add_click([] { + for (scroll_struct weapon : global::lists::g_weapons) { + weapon::give::vars::give_weapon(menu::player::get_local_player().m_ped, weapon.m_result, false, false); + } + })); + + add_option(button_option("Max Weapon Ammo") + .add_translate().add_hotkey() + .add_click([] { + for (scroll_struct weapon : global::lists::g_weapons) { + int ammo = -1; + native::get_max_ammo(menu::player::get_local_player().m_ped, weapon.m_result, &ammo); + native::add_ammo_to_ped(menu::player::get_local_player().m_ped, weapon.m_result, ammo); + } + })); +} + +void give_weapons_ammo_menu::update() {} + +void give_weapons_ammo_menu::update_once() {} + +void give_weapons_ammo_menu::feature_update() {} + +give_weapons_ammo_menu* g_instance; +give_weapons_ammo_menu* give_weapons_ammo_menu::get() { + if (g_instance == nullptr) { + g_instance = new give_weapons_ammo_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/give_weapons_ammo.h b/GTAV/src/menu/base/submenus/main/weapon/give_weapons_ammo.h new file mode 100644 index 0000000..042347a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/give_weapons_ammo.h @@ -0,0 +1,15 @@ +#pragma once +#include "menu/base/submenu.h" + +class give_weapons_ammo_menu : public menu::submenu::submenu { +public: + static give_weapons_ammo_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + give_weapons_ammo_menu() + : menu::submenu::submenu() {} +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/gravity_gun.cpp b/GTAV/src/menu/base/submenus/main/weapon/gravity_gun.cpp new file mode 100644 index 0000000..8c6a625 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/gravity_gun.cpp @@ -0,0 +1,109 @@ +#include "gravity_gun.h" +#include "menu/base/submenu_handler.h" +#include "weapon_mods.h" +#include "menu/base/util/raycast.h" +#include "menu/base/util/control.h" +#include "menu/base/util/camera.h" + +using namespace weapon::gravity::vars; + +namespace weapon::gravity::vars { + variables m_vars; + + void gravity_gun() { + static int timer = 0; + if (menu::player::get_local_player().m_is_aiming) { + math::vector3 position = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_ped, 0.4f, 0.0f, 0.8f); + + if (native::does_entity_exist(m_vars.m_entity)) { + native::set_input_exclusive(0, ControlFrontendUp); + native::set_input_exclusive(0, ControlFrontendDown); + + if (native::is_control_pressed(0, ControlFrontendUp)) { + m_vars.m_distance++; + } else if (native::is_control_pressed(0, ControlFrontendDown) && m_vars.m_distance > 3.f) { + m_vars.m_distance--; + } + + menu::control::simple_request_control(m_vars.m_entity); + + auto velocity = ((position + (menu::camera::get_direction() * m_vars.m_distance)) - native::get_entity_coords(m_vars.m_entity, false)) * m_vars.m_force; + native::set_entity_velocity(m_vars.m_entity, velocity.x, velocity.y, velocity.z); + + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + velocity = ((position + (menu::camera::get_direction() * 5000.f)) - native::get_entity_coords(m_vars.m_entity, false)) * m_vars.m_force; + native::set_entity_velocity(m_vars.m_entity, velocity.x, velocity.y, velocity.z); + m_vars.m_entity = 0; + timer = native::get_game_timer() + 750; + } + } else { + m_vars.m_entity = 0; + + if (native::get_game_timer() > timer) { + menu::raycast cast = menu::raycast_infront(9999.f); + if (cast.hit_entity()) { + m_vars.m_entity = cast.get_entity(); + + if (native::is_entity_a_ped(m_vars.m_entity)) { + if (native::is_ped_in_any_vehicle(m_vars.m_entity, false)) { + m_vars.m_entity = native::get_vehicle_ped_is_in(m_vars.m_entity, false); + } else { + if (native::is_ped_a_player(m_vars.m_entity)) { + timer = 0; + m_vars.m_entity = 0; + return; + } + } + } + + timer = 0; + } + } + } + + return; + } + + timer = 0; + m_vars.m_entity = 0; + } +} + +void gravity_gun_menu::load() { + set_name("Gravity Gun"); + set_parent(); + + add_option(toggle_option("Toggle Gravity Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_toggle).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Force") + .add_translate() + .add_number(m_vars.m_force, "%.1f", 0.1f).add_min(1.f).add_max(200.f).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Distance") + .add_translate() + .add_number(m_vars.m_distance, "%.0f", 1.f).add_min(1.f).add_max(200.f).add_savable(get_submenu_name_stack()) + .add_tooltip("Alternatively, you can use UP and DOWN")); +} + +void gravity_gun_menu::update() {} + +void gravity_gun_menu::update_once() {} + +void gravity_gun_menu::feature_update() { + if (m_vars.m_toggle) { + gravity_gun(); + } +} + +gravity_gun_menu* g_instance; +gravity_gun_menu* gravity_gun_menu::get() { + if (g_instance == nullptr) { + g_instance = new gravity_gun_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/gravity_gun.h b/GTAV/src/menu/base/submenus/main/weapon/gravity_gun.h new file mode 100644 index 0000000..c5b87f2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/gravity_gun.h @@ -0,0 +1,33 @@ +#pragma once +#include "menu/base/submenu.h" + +class gravity_gun_menu : public menu::submenu::submenu { +public: + static gravity_gun_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + gravity_gun_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::gravity::vars { + struct variables { + bool m_toggle; + bool m_attraction; + bool m_peds; + bool m_vehicles; + bool m_objects; + + float m_attraction_distance = 10.f; + float m_force = 4.f; + float m_distance = 10.f; + + Entity m_entity; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier.cpp b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier.cpp new file mode 100644 index 0000000..f3bd2e7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier.cpp @@ -0,0 +1,76 @@ +#include "ammo_modifier.h" +#include "menu/base/submenu_handler.h" +#include "../../weapon_modifiers.h" +#include "global/lists.h" +#include "ammo_modifier_edit.h" +#include "ammo_modifier_load.h" + +using namespace weapon::ammo::vars; + +namespace weapon::ammo::vars { + variables m_vars; + + void reset() { + for (auto& modifier : edit::vars::m_vars.m_modifiers) { + edit::vars::reset_modifier(modifier.m_hash); + } + } + + bool has_existing_modifier(uint32_t hash) { + for (auto& modifier : edit::vars::m_vars.m_modifiers) { + if (modifier.m_hash == hash) return true; + } + + return false; + } +} + +void ammo_modifier_menu::load() { + set_name("Ammo Modifier"); + set_parent(); + + add_option(submenu_option("Load Modifier") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(button_option("Reset All Modifiers") + .add_translate().add_hotkey() + .add_click(reset)); + + add_option(submenu_option("Current Weapon") + .add_translate().add_hotkey() + .add_submenu() + .add_click([] { + weapon::ammo::edit::vars::m_vars.m_current_hash = menu::player::get_local_player().m_weapon_hash; + }) + .add_requirement([] { return menu::player::get_local_player().m_weapon_hash && menu::player::get_local_player().m_weapon_hash != 2725352035; })); + + add_option(break_option("All Weapons") + .add_translate()); + + for (scroll_struct& weapon : global::lists::g_weapons) { + add_option(button_option(weapon.m_name.get()) + .add_sprite({ "commonmenu", "shop_ammo_icon" }, [=] { return has_existing_modifier(weapon.m_result); }) + .add_click([=] { + weapon::ammo::edit::vars::m_vars.m_current_hash = weapon.m_result; + menu::submenu::handler::set_submenu(ammo_modifier_edit_menu::get()); + })); + } +} + +void ammo_modifier_menu::update() {} + +void ammo_modifier_menu::update_once() {} + +void ammo_modifier_menu::feature_update() {} + +ammo_modifier_menu* g_instance; +ammo_modifier_menu* ammo_modifier_menu::get() { + if (g_instance == nullptr) { + g_instance = new ammo_modifier_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier.h b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier.h new file mode 100644 index 0000000..cc793f8 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class ammo_modifier_menu : public menu::submenu::submenu { +public: + static ammo_modifier_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + ammo_modifier_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::ammo::vars { + struct variables { + + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_edit.cpp b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_edit.cpp new file mode 100644 index 0000000..6b38649 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_edit.cpp @@ -0,0 +1,142 @@ +#include "ammo_modifier_edit.h" +#include "menu/base/submenu_handler.h" +#include "ammo_modifier.h" +#include "../../weapon_modifiers.h" +#include "ammo_modifier_load.h" +#include "ammo_modifier_swap.h" + +using namespace weapon::ammo::edit::vars; + +namespace weapon::ammo::edit::vars { + variables m_vars; + + void reset_modifier(uint32_t hash) { + auto vit = std::find_if(m_vars.m_modifiers.begin(), m_vars.m_modifiers.end(), [=](EditContext& Context) { + return Context.m_hash == hash; + }); + + if (vit != m_vars.m_modifiers.end()) { + uint64_t table = *(uint64_t*)global::vars::g_weapon_info.m_list; + if (table) { + for (int16_t i = 0; i < (*(int16_t*)global::vars::g_weapon_info.m_count) - 1; i++) { + rage::types::weapon_info* ptr = (rage::types::weapon_info*) * (uint64_t*)(table + (i * 8)); + if (ptr) { + if (ptr->m_name_hash == hash) { + ptr->m_ammo_info = vit->m_ammo_info; + ptr->m_aiming_info = vit->m_aiming_info; + ptr->m_fire_type = vit->m_fire_type; + ptr->m_audio = vit->m_audio; + break; + } + } + } + } + + m_vars.m_modifiers.erase(vit); + } + + } + + rage::types::weapon_info* get_active_weapon() { + if (m_vars.m_current_hash == menu::player::get_local_player().m_weapon_hash) return weapon::modifiers::vars::get_weapon_info(); + + uint64_t table = *(uint64_t*)global::vars::g_weapon_info.m_list; + if (table) { + for (int16_t i = 0; i < (*(int16_t*)global::vars::g_weapon_info.m_count) - 1; i++) { + rage::types::weapon_info* ptr = (rage::types::weapon_info*) * (uint64_t*)(table + (i * 8)); + if (ptr) { + if (ptr->m_name_hash == m_vars.m_current_hash) { + return ptr; + } + } + } + } + + return nullptr; + } +} + +void ammo_modifier_edit_menu::load() { + set_name("Ammo Modifier"); + set_parent(); + + add_option(button_option("Save Modifier") + .add_keyboard("Enter modifier name", 100, [](button_option* _this, const char* Name) { weapon::ammo::load::vars::save_modifier(Name, m_vars.m_current_hash); })); + + add_option(button_option("Reset Modifier") + .add_translate() + .add_click([] { reset_modifier(m_vars.m_current_hash); })); + + add_option(submenu_option("Bullet Swap") + .add_translate() + .add_submenu()); + + add_option(number_option(SCROLL, "Damage") + .add_translate() + .add_number(m_vars.m_damage, "%.0f", 1.f).set_scroll_speed(5).add_min(1.f).add_max(10000.f) + .add_click([] { + rage::types::weapon_info* weapon = get_active_weapon(); + if (weapon) { + weapon->m_damage = m_vars.m_damage; + } + }) + .add_requirement([] { return get_active_weapon() != nullptr; }) + .add_tooltip("~y~Notice: ~w~Won't reset with Reset option")); + + add_option(number_option(SCROLL, "Force") + .add_translate() + .add_number(m_vars.m_force, "%.0f", 1.f).set_scroll_speed(5).add_min(1.f).add_max(10000.f) + .add_click([] { + rage::types::weapon_info* weapon = get_active_weapon(); + if (weapon) { + weapon->m_force = m_vars.m_force; + } + }) + .add_requirement([] { return get_active_weapon() != nullptr; }) + .add_tooltip("~y~Notice: ~w~Won't reset with Reset option")); + + add_option(number_option(SCROLL, "Speed") + .add_translate() + .add_number(m_vars.m_speed, "%.0f", 1.f).set_scroll_speed(5).add_min(1.f).add_max(10000.f) + .add_click([] { + rage::types::weapon_info* weapon = get_active_weapon(); + if (weapon) { + weapon->m_speed = m_vars.m_speed; + } + }) + .add_requirement([] { return get_active_weapon() != nullptr; }) + .add_tooltip("~y~Notice: ~w~Won't reset with Reset option")); +} + +void ammo_modifier_edit_menu::update() { + rage::types::weapon_info* active = get_active_weapon(); + if (active == nullptr) { + menu::submenu::handler::set_submenu_previous(); + return; + } + + if (m_vars.m_cached_weapon != active) { + m_vars.m_current_hash = menu::player::get_local_player().m_weapon_hash; + m_vars.m_cached_weapon = active; + if (m_vars.m_cached_weapon) { + m_vars.m_damage = m_vars.m_cached_weapon->m_damage; + m_vars.m_force = m_vars.m_cached_weapon->m_force; + m_vars.m_speed = m_vars.m_cached_weapon->m_speed; + } + } +} + +void ammo_modifier_edit_menu::update_once() {} + +void ammo_modifier_edit_menu::feature_update() {} + +ammo_modifier_edit_menu* g_instance; +ammo_modifier_edit_menu* ammo_modifier_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new ammo_modifier_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_edit.h b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_edit.h new file mode 100644 index 0000000..3845be0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_edit.h @@ -0,0 +1,40 @@ +#pragma once +#include "menu/base/submenu.h" + +class ammo_modifier_edit_menu : public menu::submenu::submenu { +public: + static ammo_modifier_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + ammo_modifier_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::ammo::edit::vars { + struct EditContext { + rage::types::ammo_info* m_ammo_info; + rage::types::aiming_info* m_aiming_info; + int m_fire_type; + uint32_t m_audio; + uint32_t m_hash; + uint32_t m_swap; + }; + + struct variables { + uint32_t m_current_hash; + std::vector m_modifiers; + rage::types::weapon_info* m_cached_weapon; + + float m_damage = 0.f; + float m_force = 0.f; + float m_speed = 0.f; + }; + + rage::types::weapon_info* get_active_weapon(); + void reset_modifier(uint32_t hash); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_load.cpp b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_load.cpp new file mode 100644 index 0000000..ea121ae --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_load.cpp @@ -0,0 +1,138 @@ +#include "ammo_modifier_load.h" +#include "menu/base/submenu_handler.h" +#include "ammo_modifier.h" +#include "util/json.h" +#include "util/log.h" +#include "util/dirs.h" +#include "ammo_modifier_swap.h" +#include "ammo_modifier_edit.h" +#include "ammo_modifier_swap.h" +#include + +using namespace weapon::ammo::load::vars; + +namespace weapon::ammo::load::vars { + variables m_vars; + + struct ModifierSave { + std::string m_name; + uint32_t m_model; + uint32_t m_swap; + float m_damage; + float m_force; + float m_speed; + }; + + void load_modifier(ModifierSave modifier) { + if (modifier.m_model != modifier.m_swap) { + swap::vars::swap(modifier.m_model, modifier.m_swap); + } + + edit::vars::m_vars.m_current_hash = modifier.m_model; + + rage::types::weapon_info* weapon = edit::vars::get_active_weapon(); + if (weapon) { + weapon->m_damage = modifier.m_damage; + weapon->m_force = modifier.m_force; + weapon->m_speed = modifier.m_speed; + } + } + + void save_modifier(const char* name, uint32_t model) { + uint32_t swap_model = model; + + auto vit = std::find_if(edit::vars::m_vars.m_modifiers.begin(), edit::vars::m_vars.m_modifiers.end(), [=](edit::vars::EditContext& Context) { + return Context.m_hash == model; + }); + + if (vit != edit::vars::m_vars.m_modifiers.end()) { + swap_model = vit->m_swap; + } + + edit::vars::m_vars.m_current_hash = model; + + rage::types::weapon_info* weapon = edit::vars::get_active_weapon(); + if (weapon) { + try { + nlohmann::json json; + + std::ifstream input(util::dirs::get_path(ammo_modifier)); + if (input.good()) { + input >> json; + input.close(); + } + + std::ofstream output(util::dirs::get_path(ammo_modifier)); + if (output.good()) { + json[name] = nlohmann::json::array({ + model, + swap_model, + weapon->m_damage, + weapon->m_force, + weapon->m_speed + }); + + output << json.dump(4); + output.close(); + } + } catch (std::exception& e) { + LOG_WARN("[json] %s", e.what()); + } + } + } +} + +void ammo_modifier_load_menu::load() { + set_name("Load modifier"); + set_parent(); + + add_string("~m~None"); +} + +void ammo_modifier_load_menu::update() {} + +void ammo_modifier_load_menu::update_once() { + clear_options(0); + + try { + std::ifstream input(util::dirs::get_path(ammo_modifier)); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + if (json.size() > 0) { + std::vector modifiers; + + for (auto& it = json.begin(); it != json.end(); ++it) { + nlohmann::json data = *it; + modifiers.push_back({ it.key(), data[0].get(), data[1].get(), data[2].get(), data[3].get(), data[4].get() }); + } + + for (ModifierSave& modifier : modifiers) { + add_option(button_option(modifier.m_name) + .add_click([=] { load_modifier(modifier); })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } +} + +void ammo_modifier_load_menu::feature_update() {} + +ammo_modifier_load_menu* g_instance; +ammo_modifier_load_menu* ammo_modifier_load_menu::get() { + if (g_instance == nullptr) { + g_instance = new ammo_modifier_load_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_load.h b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_load.h new file mode 100644 index 0000000..d32441e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_load.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class ammo_modifier_load_menu : public menu::submenu::submenu { +public: + static ammo_modifier_load_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + ammo_modifier_load_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::ammo::load::vars { + struct variables { + + }; + + void save_modifier(const char* name, uint32_t model); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_swap.cpp b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_swap.cpp new file mode 100644 index 0000000..76309a4 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_swap.cpp @@ -0,0 +1,89 @@ +#include "ammo_modifier_swap.h" +#include "menu/base/submenu_handler.h" +#include "ammo_modifier_edit.h" +#include "global/lists.h" + +using namespace weapon::ammo::swap::vars; + +namespace weapon::ammo::swap::vars { + variables m_vars; + + void swap(uint32_t first, uint32_t second) { + uint64_t table = *(uint64_t*)global::vars::g_weapon_info.m_list; + if (table) { + rage::types::weapon_info* first_ptr = nullptr; + rage::types::weapon_info* second_ptr = nullptr; + + for (int16_t i = 0; i < (*(int16_t*)global::vars::g_weapon_info.m_count) - 1; i++) { + rage::types::weapon_info* ptr = (rage::types::weapon_info*) * (uint64_t*)(table + (i * 8)); + if (ptr) { + if (ptr->m_name_hash == first) { + first_ptr = ptr; + break; + } + } + } + + for (int16_t i = 0; i < (*(int16_t*)global::vars::g_weapon_info.m_count) - 1; i++) { + rage::types::weapon_info* ptr = (rage::types::weapon_info*) * (uint64_t*)(table + (i * 8)); + if (ptr) { + if (ptr->m_name_hash == second) { + second_ptr = ptr; + break; + } + } + } + + if (first_ptr && second_ptr) { + auto vit = std::find_if(weapon::ammo::edit::vars::m_vars.m_modifiers.begin(), weapon::ammo::edit::vars::m_vars.m_modifiers.end(), [=](weapon::ammo::edit::vars::EditContext& Context) { + return Context.m_hash == first; + }); + + if (vit == weapon::ammo::edit::vars::m_vars.m_modifiers.end()) { + weapon::ammo::edit::vars::m_vars.m_modifiers.push_back({ first_ptr->m_ammo_info, first_ptr->m_aiming_info, first_ptr->m_fire_type, first_ptr->m_audio, first, second }); + } + + int ammo = -1; + native::get_max_ammo(menu::player::get_local_player().m_ped, first, &ammo); + + first_ptr->m_ammo_info = second_ptr->m_ammo_info; + first_ptr->m_aiming_info = second_ptr->m_aiming_info; + first_ptr->m_fire_type = second_ptr->m_fire_type; + first_ptr->m_audio = second_ptr->m_audio; + + native::add_ammo_to_ped(menu::player::get_local_player().m_ped, first, ammo); + native::give_weapon_to_ped(menu::player::get_local_player().m_ped, second, ammo, false, false); + } + } + } +} + +void ammo_modifier_swap_menu::load() { + set_name("Swap With..."); + set_parent(); + + for (scroll_struct weapon : global::lists::g_weapons) { + add_option(button_option(weapon.m_name.get()) + .add_click([=] { + swap(weapon::ammo::edit::vars::m_vars.m_current_hash, weapon.m_result); + menu::submenu::handler::set_submenu_previous(); + })); + } +} + +void ammo_modifier_swap_menu::update() {} + +void ammo_modifier_swap_menu::update_once() {} + +void ammo_modifier_swap_menu::feature_update() {} + +ammo_modifier_swap_menu* g_instance; +ammo_modifier_swap_menu* ammo_modifier_swap_menu::get() { + if (g_instance == nullptr) { + g_instance = new ammo_modifier_swap_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_swap.h b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_swap.h new file mode 100644 index 0000000..235cdc5 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/ammo/ammo_modifier_swap.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class ammo_modifier_swap_menu : public menu::submenu::submenu { +public: + static ammo_modifier_swap_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + ammo_modifier_swap_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::ammo::swap::vars { + struct variables { + + }; + + void swap(uint32_t first, uint32_t second); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_matrix.cpp b/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_matrix.cpp new file mode 100644 index 0000000..f7f1f60 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_matrix.cpp @@ -0,0 +1,259 @@ +#include "weapon_matrix.h" +#include "menu/base/submenu_handler.h" +#include "../weapon_modifiers.h" +#include "rage/engine.h" +#include "../weapon_modifiers.h" + +using namespace weapon::matrix::vars; + +namespace weapon::matrix::vars { + variables m_vars; +} + +void weapon_matrix_menu::load() { + set_name("Matrix"); + set_parent(); + + add_option(number_option(TOGGLE, "Left - (X)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_left.x) + .add_number(m_vars.m_matrix_val.m_left.x, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_left.x) { + object->m_matrix.m_left.x = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_left.x; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Left - (Y)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_left.y) + .add_number(m_vars.m_matrix_val.m_left.y, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_left.y) { + object->m_matrix.m_left.y = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_left.y; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Left - (Z)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_left.z) + .add_number(m_vars.m_matrix_val.m_left.z, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_left.z) { + object->m_matrix.m_left.z = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_left.z; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Left - (W)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_left.w) + .add_number(m_vars.m_matrix_val.m_left.w, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_left.w) { + object->m_matrix.m_left.w = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_left.w; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Up - (X)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_up.x) + .add_number(m_vars.m_matrix_val.m_up.x, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_up.x) { + object->m_matrix.m_up.x = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_up.x; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Up - (Y)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_up.y) + .add_number(m_vars.m_matrix_val.m_up.y, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_up.y) { + object->m_matrix.m_up.y = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_up.y; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Up - (Z)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_up.z) + .add_number(m_vars.m_matrix_val.m_up.z, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_up.z) { + object->m_matrix.m_up.z = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_up.z; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Up - (W, Width)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_up.w) + .add_number(m_vars.m_matrix_val.m_up.w, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_up.w) { + object->m_matrix.m_up.w = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_up.w; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Forward - (X)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_forward.x) + .add_number(m_vars.m_matrix_val.m_forward.x, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_forward.x) { + object->m_matrix.m_forward.x = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_forward.x; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Forward - (Y)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_forward.y) + .add_number(m_vars.m_matrix_val.m_forward.y, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_forward.y) { + object->m_matrix.m_forward.y = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_forward.y; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Forward - (Z)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_forward.z) + .add_number(m_vars.m_matrix_val.m_forward.z, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_forward.z) { + object->m_matrix.m_forward.z = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_forward.z; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Forward - (W, Height)") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_matrix.m_forward.w) + .add_number(m_vars.m_matrix_val.m_forward.w, "%.2f", 0.01f).set_scroll_speed(10).add_min(0.f).add_max(100.f) + .add_update([](number_option* option, int position) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (!m_vars.m_matrix.m_forward.w) { + object->m_matrix.m_forward.w = m_vars.m_original[weapon::modifiers::vars::get_weapon_info()].m_forward.w; + } + } + }) + .add_requirement([] { return menu::player::get_local_player().m_has_weapon_in_hand; }) + .add_savable(get_submenu_name_stack())); +} + +void weapon_matrix_menu::update() {} + +void weapon_matrix_menu::update_once() { + if (menu::player::get_local_player().m_has_weapon_in_hand) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (m_vars.m_original.find(weapon::modifiers::vars::get_weapon_info()) == m_vars.m_original.end()) { + m_vars.m_original[weapon::modifiers::vars::get_weapon_info()] = object->m_matrix; + } + + if (!m_vars.m_matrix.m_left.x) m_vars.m_matrix_val.m_left.x = object->m_matrix.m_left.x; + if (!m_vars.m_matrix.m_left.y) m_vars.m_matrix_val.m_left.y = object->m_matrix.m_left.y; + if (!m_vars.m_matrix.m_left.z) m_vars.m_matrix_val.m_left.z = object->m_matrix.m_left.z; + if (!m_vars.m_matrix.m_left.w) m_vars.m_matrix_val.m_left.w = object->m_matrix.m_left.w; + + if (!m_vars.m_matrix.m_up.x) m_vars.m_matrix_val.m_up.x = object->m_matrix.m_up.x; + if (!m_vars.m_matrix.m_up.y) m_vars.m_matrix_val.m_up.y = object->m_matrix.m_up.y; + if (!m_vars.m_matrix.m_up.z) m_vars.m_matrix_val.m_up.z = object->m_matrix.m_up.z; + if (!m_vars.m_matrix.m_up.w) m_vars.m_matrix_val.m_up.w = object->m_matrix.m_up.w; + + if (!m_vars.m_matrix.m_forward.x) m_vars.m_matrix_val.m_forward.x = object->m_matrix.m_forward.x; + if (!m_vars.m_matrix.m_forward.y) m_vars.m_matrix_val.m_forward.y = object->m_matrix.m_forward.y; + if (!m_vars.m_matrix.m_forward.z) m_vars.m_matrix_val.m_forward.z = object->m_matrix.m_forward.z; + if (!m_vars.m_matrix.m_forward.w) m_vars.m_matrix_val.m_forward.w = object->m_matrix.m_forward.w; + } + } +} + +void weapon_matrix_menu::feature_update() { + if (menu::player::get_local_player().m_has_weapon_in_hand) { + if (m_vars.m_original.find(weapon::modifiers::vars::get_weapon_info()) != m_vars.m_original.end()) { + rage::types::object* object = (rage::types::object*)rage::engine::get_entity_address(menu::player::get_local_player().m_weapon_entity); + if (object) { + if (m_vars.m_matrix.m_left.x) object->m_matrix.m_left.x = m_vars.m_matrix_val.m_left.x; + if (m_vars.m_matrix.m_left.y) object->m_matrix.m_left.y = m_vars.m_matrix_val.m_left.y; + if (m_vars.m_matrix.m_left.z) object->m_matrix.m_left.z = m_vars.m_matrix_val.m_left.z; + if (m_vars.m_matrix.m_left.w) object->m_matrix.m_left.w = m_vars.m_matrix_val.m_left.w; + + if (m_vars.m_matrix.m_up.x) object->m_matrix.m_up.x = m_vars.m_matrix_val.m_up.x; + if (m_vars.m_matrix.m_up.y) object->m_matrix.m_up.y = m_vars.m_matrix_val.m_up.y; + if (m_vars.m_matrix.m_up.z) object->m_matrix.m_up.z = m_vars.m_matrix_val.m_up.z; + if (m_vars.m_matrix.m_up.w) object->m_matrix.m_up.w = m_vars.m_matrix_val.m_up.w; + + if (m_vars.m_matrix.m_forward.x) object->m_matrix.m_forward.x = m_vars.m_matrix_val.m_forward.x; + if (m_vars.m_matrix.m_forward.y) object->m_matrix.m_forward.y = m_vars.m_matrix_val.m_forward.y; + if (m_vars.m_matrix.m_forward.z) object->m_matrix.m_forward.z = m_vars.m_matrix_val.m_forward.z; + if (m_vars.m_matrix.m_forward.w) object->m_matrix.m_forward.w = m_vars.m_matrix_val.m_forward.w; + } + } + } +} + +weapon_matrix_menu* g_instance; +weapon_matrix_menu* weapon_matrix_menu::get() { + if (g_instance == nullptr) { + g_instance = new weapon_matrix_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_matrix.h b/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_matrix.h new file mode 100644 index 0000000..4786f53 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_matrix.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class weapon_matrix_menu : public menu::submenu::submenu { +public: + static weapon_matrix_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + weapon_matrix_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::matrix::vars { + struct variables { + math::matrix m_matrix; + math::matrix m_matrix_val; + + std::unordered_map> m_original; + }; + + extern variables m_vars; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_multipliers.cpp b/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_multipliers.cpp new file mode 100644 index 0000000..7e32593 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_multipliers.cpp @@ -0,0 +1,63 @@ +#include "weapon_multipliers.h" +#include "menu/base/submenu_handler.h" +#include "../weapon_modifiers.h" + +using namespace weapon::multipliers::vars; + +namespace weapon::multipliers::vars { + variables m_vars; +} + +void weapon_multipliers_menu::load() { + set_name("Multipliers"); + set_parent(); + + add_option(number_option(TOGGLE, "Bullet Damage") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_weapon_damage_multiplier) + .add_number(m_vars.m_weapon_damage_multiplier_val, "%.0f", 1.f).add_min(1.f).add_max(1000.f).set_scroll_speed(10) + .add_click([] { if (menu::player::get_local_player().m_weapon_hash) native::set_player_weapon_damage_modifier(menu::player::get_local_player().m_id, 1.f); }).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Melee Damage") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_melee_damage_multiplier) + .add_number(m_vars.m_melee_damage_multiplier_val, "%.0f", 1.f).add_min(1.f).add_max(1000.f).set_scroll_speed(10) + .add_click([] { if (menu::player::get_local_player().m_weapon_hash) native::set_player_melee_weapon_damage_modifier(menu::player::get_local_player().m_id, 1.f, 1); }).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Defense Damage") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_defense_damage_multiplier) + .add_number(m_vars.m_defense_damage_multiplier_val, "%.0f", 1.f).add_min(1.f).add_max(1000.f).set_scroll_speed(10) + .add_click([] { if (menu::player::get_local_player().m_weapon_hash) native::set_player_weapon_defense_modifier(menu::player::get_local_player().m_id, 1.f); }).add_savable(get_submenu_name_stack())); +} + +void weapon_multipliers_menu::update() {} + +void weapon_multipliers_menu::update_once() {} + +void weapon_multipliers_menu::feature_update() { + if (menu::player::get_local_player().m_has_weapon_in_hand) { + if (m_vars.m_weapon_damage_multiplier) { + native::set_player_weapon_damage_modifier(menu::player::get_local_player().m_id, m_vars.m_weapon_damage_multiplier_val); + } + + if (m_vars.m_melee_damage_multiplier) { + native::set_player_melee_weapon_damage_modifier(menu::player::get_local_player().m_id, m_vars.m_melee_damage_multiplier_val, 1); + } + + if (m_vars.m_defense_damage_multiplier) { + native::set_player_weapon_defense_modifier(menu::player::get_local_player().m_id, m_vars.m_defense_damage_multiplier_val); + } + } +} + +weapon_multipliers_menu* g_instance; +weapon_multipliers_menu* weapon_multipliers_menu::get() { + if (g_instance == nullptr) { + g_instance = new weapon_multipliers_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_multipliers.h b/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_multipliers.h new file mode 100644 index 0000000..01970c0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/modifiers/weapon_multipliers.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" + +class weapon_multipliers_menu : public menu::submenu::submenu { +public: + static weapon_multipliers_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + weapon_multipliers_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::multipliers::vars { + struct variables { + bool m_weapon_damage_multiplier; + bool m_melee_damage_multiplier; + bool m_defense_damage_multiplier; + + float m_weapon_damage_multiplier_val = 1.f; + float m_melee_damage_multiplier_val = 1.f; + float m_defense_damage_multiplier_val = 1.f; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/particle_gun.cpp b/GTAV/src/menu/base/submenus/main/weapon/particle_gun.cpp new file mode 100644 index 0000000..7dd1875 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/particle_gun.cpp @@ -0,0 +1,69 @@ +#include "particle_gun.h" +#include "menu/base/submenu_handler.h" +#include "weapon_mods.h" +#include "global/lists.h" +#include "menu/base/util/control.h" +#include "menu/base/util/raycast.h" + +using namespace weapon::particle::vars; + +namespace weapon::particle::vars { + variables m_vars; +} + +void particle_gun_menu::load() { + set_name("Particle Gun"); + set_parent(); + + add_option(toggle_option("Toggle Particle Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_toggle).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Scale") + .add_translate() + .add_number(m_vars.m_scale, "%.2f", 0.01f).add_min(0.f).add_max(10.f).set_scroll_speed(10).show_max().add_savable(get_submenu_name_stack())); + + add_option(break_option("Particles") + .add_translate()); +} + +void particle_gun_menu::update() {} + +void particle_gun_menu::update_once() { + clear_options(3); + + for (int i = 0; i < 20; i++) { + add_option(radio_option(global::lists::g_particles[i].m_name.get()) + .add_radio(m_vars.m_radio)); + } +} + +void particle_gun_menu::feature_update() { + if (m_vars.m_toggle) { + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + menu::raycast cast = menu::raycast_infront(9999.f); + if (!cast.get_coords().is_null()) { + if (cast.get_coords().get_distance(menu::player::get_local_player().m_coords) > 3.5f) { + scroll_struct particle = global::lists::g_particles[m_vars.m_radio.m_selected]; + math::vector3 position = cast.get_coords(); + + menu::control::request_particle({ particle.m_result.m_dict, particle.m_result.m_texture }, [=](std::pair anim) { + native::use_particle_fx_asset_next_call(anim.first); + native::start_particle_fx_non_looped_at_coord2(anim.second, position.x, position.y, position.z, 0.f, 0.f, 0.f, m_vars.m_scale, false, false, false); + }); + } + } + } + } +} + +particle_gun_menu* g_instance; +particle_gun_menu* particle_gun_menu::get() { + if (g_instance == nullptr) { + g_instance = new particle_gun_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/particle_gun.h b/GTAV/src/menu/base/submenus/main/weapon/particle_gun.h new file mode 100644 index 0000000..b45d0d2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/particle_gun.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class particle_gun_menu : public menu::submenu::submenu { +public: + static particle_gun_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + particle_gun_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::particle::vars { + struct variables { + bool m_toggle; + float m_scale = 1.f; + radio_context m_radio = { "commonmenu", "shop_makeup_icon" }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_attachment.cpp b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_attachment.cpp new file mode 100644 index 0000000..584dbe6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_attachment.cpp @@ -0,0 +1,105 @@ +#include "purchase_attachment.h" +#include "menu/base/submenu_handler.h" +#include "purchase_weapons.h" +#include "purchase_weapon.h" +#include "global/lists.h" +#include "rage/engine.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "menu/base/util/notify.h" + +using namespace weapon::purchase::attachment::vars; +using namespace weapon::purchase::weapon::vars; + +namespace weapon::purchase::attachment::vars { + variables m_vars; + + // g_weapon_components + std::vector create_component_transaction_list(uint32_t weapon) { + std::vector list; + + std::vector hashes = rage::engine::get_hash_list_from_hash_table(*(uint32_t*)(global::vars::g_weapon_components.m_count) - 1, global::vars::g_weapon_components.m_list); + for (uint32_t component : hashes) { + if (native::does_weapon_take_weapon_component(weapon, component)) { + if (!native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, component)) { + char output[0x100]; + scripts::func_116(output, scripts::func_181(component, (int)weapon), native::get_entity_model(menu::player::get_local_player().m_ped), 3, 1, scripts::func_57((int)weapon), scripts::func_117((int)weapon), -1, 0, 0); + + int transaction_hash = (int)native::get_hash_key(output); + + if (native::network_shop_get_price(transaction_hash, 1671640801, true) != -1) { + list.push_back({ transaction_hash, -1, native::network_shop_get_price(transaction_hash, 1671640801, true), 1, 1 }); + } + } + } + } + + return list; + } + + int calculate_total_price() { + int total = 0; + + for (scroll_struct hash : global::lists::g_weapons) { + std::vector list = create_component_transaction_list(hash.m_result); + if (!list.empty()) { + for (rage::network::transaction& transaction : list) { + total += transaction.m_price; + } + } + } + + return total; + } + + void purchase_all_attachments() { + util::fiber::pool::add([] { + for (scroll_struct hash : global::lists::g_weapons) { + std::vector list = create_component_transaction_list(hash.m_result); + if (!list.empty()) { + int total = 0; + for (rage::network::transaction& transaction : list) { + total += transaction.m_price; + } + + rage::engine::process_basket_transaction(1671640801, 537254313, 4, list); + while (rage::engine::is_basket_transaction_queue_busy()) util::fiber::sleep(1); + } + } + + menu::notify::stacked(purchase_attachment_menu::get()->get_string("Purchase Attachments"), purchase_attachment_menu::get()->get_string("Purchase complete! Change sessions to take affect"), global::ui::g_success); + }); + } +} + +void purchase_attachment_menu::load() { + set_name("Purchase Attachment"); + set_parent(); + + add_string("Purchase Attachments"); + add_string("Total price: $"); + add_string("Purchase complete! Change sessions to take affect"); + + weapon::purchase::attachment::vars::m_vars.m_button = add_option(button_option("Purchase All Attachments") + .add_translate().add_hotkey() + .add_click(purchase_all_attachments)); +} + +void purchase_attachment_menu::update() {} + +void purchase_attachment_menu::update_once() { + weapon::purchase::attachment::vars::m_vars.m_button->set_tooltip(get_string("Total price: $") + std::to_string(calculate_total_price())); +} + +void purchase_attachment_menu::feature_update() {} + +purchase_attachment_menu* g_instance; +purchase_attachment_menu* purchase_attachment_menu::get() { + if (g_instance == nullptr) { + g_instance = new purchase_attachment_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_attachment.h b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_attachment.h new file mode 100644 index 0000000..8142bbd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_attachment.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class purchase_attachment_menu : public menu::submenu::submenu { +public: + static purchase_attachment_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + purchase_attachment_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::purchase::attachment::vars { + struct variables { + std::shared_ptr m_button; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapon.cpp b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapon.cpp new file mode 100644 index 0000000..7cbc0fe --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapon.cpp @@ -0,0 +1,2806 @@ +#include "purchase_weapon.h" +#include "menu/base/submenu_handler.h" +#include "purchase_weapons.h" +#include "menu/base/util/global.h" +#include "global/lists.h" +#include "rage/engine.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "util/va.h" +#include "menu/base/util/notify.h" + +using namespace weapon::purchase::weapon::vars; + +namespace weapon::purchase::weapon::vars { + variables m_vars; + + std::vector blacklisted_submenu_weapons = { + 0x92a27487, + 0x958a4a8f, + 0xf9e6aa4b, + 0x84bd7bfd, + 0x8bb05fd7, + 0x440e4788, + 0x4e875f73, + 0xf9dcbf2d, + 0xd8df3c3c, + 0x99b507ea, + 0xdd5df8d9, + 0xdfe37640, + 0x678b81b1, + 0x19044ee0, + 0xcd274149, + 0x94117305, + 0x3813fc08, + 0x34a67b97, + 0x24b17070, + 0xa0973d5e, + 0x2c3731d9, + 0xab564b93, + 0xba45e8b8, + 0xfdbc8a50, + 0x93e220bd + }; + + std::vector blacklisted_weapons = { + 0x497facc3, + 0xba536372, + 0xfdbadced, + 0x60ec506, + 0x23c9f95c, + 0x787f0bb, + 0x3656c8c1 + }; + + namespace scripts { + void string_int_concat(char* input, int Val, int Size) { + strncat(input, std::to_string(Val).c_str(), 64); + } + + int func_81(int iParam0, int* Data) { + int iVar0; + int iVar1; + + iVar1 = native::get_num_dlc_weapons(); + iVar0 = 0; + while (iVar0 < iVar1) { + if (native::get_dlc_weapon_data(iVar0, Data)) { + if (Data[2] == iParam0) { + return iVar0; + } + } + iVar0++; + } + return -1; + } + + const char* func_181(int iParam0, int iParam1) { + int iVar0; + int iVar1; + static int Var41[100]; + + if (iParam1 == joaat("WEAPON_KNUCKLE")) { + switch (iParam0) { + case joaat("COMPONENT_KNUCKLE_VARMOD_BASE"): + return "WT_KNUCKLE"; + case joaat("COMPONENT_KNUCKLE_VARMOD_PIMP"): + return "WCT_KNUCK_02"; + case joaat("COMPONENT_KNUCKLE_VARMOD_BALLAS"): + return "WCT_KNUCK_BG"; + case joaat("COMPONENT_KNUCKLE_VARMOD_DOLLAR"): + return "WCT_KNUCK_DLR"; + case joaat("COMPONENT_KNUCKLE_VARMOD_DIAMOND"): + return "WCT_KNUCK_DMD"; + case joaat("COMPONENT_KNUCKLE_VARMOD_HATE"): + return "WCT_KNUCK_HT"; + case joaat("COMPONENT_KNUCKLE_VARMOD_LOVE"): + return "WCT_KNUCK_LV"; + case joaat("COMPONENT_KNUCKLE_VARMOD_PLAYER"): + return "WCT_KNUCK_PC"; + case joaat("COMPONENT_KNUCKLE_VARMOD_KING"): + return "WCT_KNUCK_SLG"; + case joaat("COMPONENT_KNUCKLE_VARMOD_VAGOS"): + return "WCT_KNUCK_VG"; + } + } + switch (iParam0) { + case 0: + return "WCT_NONE"; + case joaat("COMPONENT_AT_RAILCOVER_01"): + return "WCT_RAIL"; + case joaat("COMPONENT_AT_AR_AFGRIP"): + return "WCT_GRIP"; + case joaat("COMPONENT_AT_PI_FLSH"): + return "WCT_FLASH"; + case joaat("COMPONENT_AT_AR_FLSH"): + return "WCT_FLASH"; + case joaat("COMPONENT_AT_SCOPE_MACRO"): + return "WCT_SCOPE_MAC"; + case joaat("COMPONENT_AT_SCOPE_MACRO_02"): + return "WCT_SCOPE_MAC"; + case joaat("COMPONENT_AT_SCOPE_SMALL"): + return "WCT_SCOPE_SML"; + case joaat("COMPONENT_AT_SCOPE_SMALL_02"): + return "WCT_SCOPE_SML"; + case joaat("COMPONENT_AT_SCOPE_MEDIUM"): + return "WCT_SCOPE_MED"; + case joaat("COMPONENT_AT_SCOPE_LARGE"): + return "WCT_SCOPE_LRG"; + case joaat("COMPONENT_AT_SCOPE_MAX"): + return "WCT_SCOPE_MAX"; + case joaat("COMPONENT_AT_PI_SUPP"): + return "WCT_SUPP"; + case joaat("COMPONENT_AT_AR_SUPP"): + return "WCT_SUPP"; + case joaat("COMPONENT_AT_AR_SUPP_02"): + return "WCT_SUPP"; + case joaat("COMPONENT_AT_SR_SUPP"): + return "WCT_SUPP"; + case joaat("COMPONENT_PISTOL_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_PISTOL_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_COMBATPISTOL_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_COMBATPISTOL_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_APPISTOL_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_APPISTOL_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_MICROSMG_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_MICROSMG_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_SMG_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_SMG_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_ASSAULTRIFLE_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_ASSAULTRIFLE_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_CARBINERIFLE_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_CARBINERIFLE_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_ADVANCEDRIFLE_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_ADVANCEDRIFLE_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_MG_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_MG_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_COMBATMG_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_COMBATMG_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_ASSAULTSHOTGUN_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_ASSAULTSHOTGUN_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_SNIPERRIFLE_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_HEAVYSNIPER_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_MINIGUN_CLIP_01"): + return "WCT_CLIP2"; + case joaat("COMPONENT_ASSAULTSMG_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_ASSAULTSMG_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_PISTOL50_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_PISTOL50_CLIP_02"): + return "WCT_CLIP2"; + case 195735895: + return "WCT_CLIP1"; + case 1525977990: + return "WCT_CLIP1"; + case 1824470811: + return "WCT_CLIP2"; + case -890514874: + return "WCT_CLIP1"; + case -507117574: + return "WCT_CLIP2"; + case -124428919: + return "WCT_CLIP1"; + case 1048471894: + return "WCT_CLIP2"; + case joaat("COMPONENT_SNSPISTOL_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_SNSPISTOL_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_VINTAGEPISTOL_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_VINTAGEPISTOL_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_HEAVYSHOTGUN_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_MARKSMANRIFLE_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_HEAVYSHOTGUN_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_MARKSMANRIFLE_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_AT_SCOPE_LARGE_FIXED_ZOOM"): + return "WCT_SCOPE_LRG"; + case joaat("COMPONENT_AT_PI_SUPP_02"): + return "WCT_SUPP"; + case joaat("COMPONENT_COMBATPDW_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_COMBATPDW_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_MARKSMANPISTOL_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_MACHINEPISTOL_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_MACHINEPISTOL_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_ASSAULTRIFLE_VARMOD_LUXE"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_ADVANCEDRIFLE_VARMOD_LUXE"): + return "WCT_VAR_METAL"; + case joaat("COMPONENT_CARBINERIFLE_VARMOD_LUXE"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_APPISTOL_VARMOD_LUXE"): + return "WCT_VAR_METAL"; + case joaat("COMPONENT_PISTOL_VARMOD_LUXE"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_PISTOL50_VARMOD_LUXE"): + return "WCT_VAR_SIL"; + case joaat("COMPONENT_HEAVYPISTOL_VARMOD_LUXE"): + return "WCT_VAR_WOOD"; + case joaat("COMPONENT_SMG_VARMOD_LUXE"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_MICROSMG_VARMOD_LUXE"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_SAWNOFFSHOTGUN_VARMOD_LUXE"): + return "WCT_VAR_METAL"; + case joaat("COMPONENT_SNIPERRIFLE_VARMOD_LUXE"): + return "WCT_VAR_WOOD"; + case joaat("COMPONENT_MARKSMANRIFLE_VARMOD_LUXE"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_ASSAULTSMG_VARMOD_LOWRIDER"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_BULLPUPRIFLE_VARMOD_LOW"): + return "WCT_VAR_METAL"; + case joaat("COMPONENT_COMBATMG_VARMOD_LOWRIDER"): + return "WCT_VAR_ETCHM"; + case joaat("COMPONENT_COMBATPISTOL_VARMOD_LOWRIDER"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_MG_VARMOD_LOWRIDER"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_PUMPSHOTGUN_VARMOD_LOWRIDER"): + return "WCT_VAR_GOLD"; + case joaat("COMPONENT_SNSPISTOL_VARMOD_LOWRIDER"): + return "WCT_VAR_WOOD"; + case joaat("COMPONENT_SPECIALCARBINE_VARMOD_LOWRIDER"): + return "WCT_VAR_ETCHM"; + case joaat("COMPONENT_SWITCHBLADE_VARMOD_BASE"): + return "WCT_SB_BASE"; + case joaat("COMPONENT_SWITCHBLADE_VARMOD_VAR1"): + return "WCT_SB_VAR1"; + case joaat("COMPONENT_SWITCHBLADE_VARMOD_VAR2"): + return "WCT_SB_VAR2"; + case joaat("COMPONENT_REVOLVER_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_REVOLVER_VARMOD_BOSS"): + return "WCT_REV_VARB"; + case joaat("COMPONENT_REVOLVER_VARMOD_GOON"): + return "WCT_REV_VARG"; + case joaat("COMPONENT_SMG_CLIP_03"): + return "WCT_CLIP_DRM"; + case joaat("COMPONENT_CARBINERIFLE_CLIP_03"): + return "WCT_CLIP_BOX"; + case joaat("COMPONENT_ASSAULTRIFLE_CLIP_03"): + return "WCT_CLIP_DRM"; + case joaat("COMPONENT_HEAVYSHOTGUN_CLIP_03"): + return "WCT_CLIP_DRM"; + case joaat("COMPONENT_GUNRUN_MK2_UPGRADE"): + return "WCT_VAR_GUN"; + case joaat("COMPONENT_MARKSMANRIFLE_MK2_CAMO_IND_01"): + return "WCT_CAMO_IND"; + case joaat("COMPONENT_SNSPISTOL_MK2_CAMO_IND_01"): + return "WCT_CAMO_IND"; + case joaat("COMPONENT_SNSPISTOL_MK2_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_AT_SCOPE_MACRO_02_MK2"): + return "WCT_SCOPE_MAC2"; + case joaat("COMPONENT_AT_SCOPE_SMALL_MK2"): + return "WCT_SCOPE_SML2"; + case joaat("COMPONENT_RAYPISTOL_VARMOD_XMAS18"): + return "WCT_VAR_RAY18"; + case joaat("COMPONENT_CERAMICPISTOL_CLIP_01"): + return "WCT_CLIP1"; + case joaat("COMPONENT_CERAMICPISTOL_CLIP_02"): + return "WCT_CLIP2"; + case joaat("COMPONENT_CERAMICPISTOL_SUPP"): + return "WCT_SUPP"; + default: + if (iParam1 != 0) { + iVar0 = func_81(iParam1, Var41); + if (iVar0 != -1) { + iVar1 = 0; + while (iVar1 < native::get_num_dlc_weapon_components(iVar0)) { + if (native::get_dlc_weapon_component_data(iVar0, iVar1, Var41)) { + if (Var41[6] == iParam0) { + return (const char*)&Var41[12]; + } + } + iVar1++; + } + } + } + break; + } + return "WCT_INVALID"; + } + + int func_58(int iParam0) { + switch (iParam0) { + case joaat("WEAPON_UNARMED"): + return 0; + case joaat("WEAPON_PISTOL"): + return 1; + case joaat("WEAPON_COMBATPISTOL"): + return 2; + case joaat("WEAPON_APPISTOL"): + return 3; + case joaat("WEAPON_PISTOL50"): + return 4; + case joaat("WEAPON_SMG"): + return 5; + case joaat("WEAPON_ASSAULTSMG"): + return 6; + case joaat("WEAPON_MICROSMG"): + return 7; + case joaat("WEAPON_ASSAULTRIFLE"): + return 8; + case joaat("WEAPON_CARBINERIFLE"): + return 9; + case joaat("WEAPON_HEAVYRIFLE"): + return 10; + case joaat("WEAPON_ADVANCEDRIFLE"): + return 11; + case joaat("WEAPON_MG"): + return 12; + case joaat("WEAPON_COMBATMG"): + return 13; + case joaat("WEAPON_ASSAULTMG"): + return 14; + case joaat("WEAPON_STICKYBOMB"): + return 15; + case joaat("WEAPON_GRENADE"): + return 16; + case joaat("WEAPON_SMOKEGRENADE"): + return 17; + case joaat("WEAPON_REMOTESNIPER"): + return 18; + case joaat("WEAPON_ASSAULTSNIPER"): + return 19; + case joaat("WEAPON_SNIPERRIFLE"): + return 20; + case joaat("WEAPON_HEAVYSNIPER"): + return 21; + case joaat("WEAPON_PUMPSHOTGUN"): + return 22; + case joaat("WEAPON_BULLPUPSHOTGUN"): + return 23; + case joaat("WEAPON_ASSAULTSHOTGUN"): + return 24; + case joaat("WEAPON_SAWNOFFSHOTGUN"): + return 25; + case joaat("WEAPON_GRENADELAUNCHER"): + return 26; + case joaat("WEAPON_RPG"): + return 27; + case joaat("WEAPON_MINIGUN"): + return 28; + case joaat("WEAPON_LOUDHAILER"): + return 29; + case joaat("WEAPON_PROGRAMMABLEAR"): + return 30; + case joaat("WEAPON_STUNGUN"): + return 31; + case joaat("WEAPON_RUBBERGUN"): + return 32; + case joaat("GADGET_PARACHUTE"): + return 33; + case joaat("WEAPON_KNIFE"): + return 34; + case joaat("WEAPON_NIGHTSTICK"): + return 35; + case joaat("WEAPON_HAMMER"): + return 36; + case joaat("WEAPON_BAT"): + return 37; + case joaat("WEAPON_CROWBAR"): + return 38; + case joaat("WEAPON_GOLFCLUB"): + return 39; + case joaat("WEAPON_GRENADELAUNCHER_SMOKE"): + return 40; + case joaat("WEAPON_MOLOTOV"): + return 41; + case joaat("WEAPON_FIREEXTINGUISHER"): + return 42; + case joaat("WEAPON_PETROLCAN"): + return 43; + case joaat("WEAPON_DIGISCANNER"): + return 44; + case joaat("WEAPON_BOTTLE"): + return 45; + case joaat("WEAPON_SPECIALCARBINE"): + return 46; + case joaat("WEAPON_SNSPISTOL"): + return 47; + case joaat("WEAPON_HEAVYPISTOL"): + return 49; + case joaat("WEAPON_BULLPUPRIFLE"): + return 48; + case joaat("WEAPON_GUSENBERG"): + return 50; + case joaat("WEAPON_DAGGER"): + return 51; + case joaat("WEAPON_VINTAGEPISTOL"): + return 52; + case joaat("WEAPON_FLAREGUN"): + return 57; + case joaat("WEAPON_MUSKET"): + return 53; + case joaat("WEAPON_FIREWORK"): + return 54; + case joaat("WEAPON_MARKSMANRIFLE"): + return 56; + case joaat("WEAPON_HEAVYSHOTGUN"): + return 55; + case joaat("WEAPON_PROXMINE"): + return 60; + case joaat("WEAPON_HOMINGLAUNCHER"): + return 61; + case joaat("WEAPON_HATCHET"): + return 58; + case joaat("WEAPON_RAILGUN"): + return 59; + case joaat("WEAPON_COMBATPDW"): + return 64; + case joaat("WEAPON_KNUCKLE"): + return 62; + case joaat("WEAPON_MARKSMANPISTOL"): + return 63; + case joaat("WEAPON_MACHETE"): + return 65; + case joaat("WEAPON_MACHINEPISTOL"): + return 68; + case joaat("WEAPON_DBSHOTGUN"): + return 66; + case joaat("WEAPON_COMPACTRIFLE"): + return 67; + case joaat("WEAPON_FLASHLIGHT"): + return 69; + case joaat("WEAPON_REVOLVER"): + return 70; + case joaat("WEAPON_SWITCHBLADE"): + return 71; + case joaat("WEAPON_AUTOSHOTGUN"): + return 72; + case joaat("WEAPON_MINISMG"): + return 73; + case joaat("WEAPON_COMPACTLAUNCHER"): + return 74; + case joaat("WEAPON_BATTLEAXE"): + return 75; + case joaat("WEAPON_PIPEBOMB"): + return 76; + case joaat("WEAPON_POOLCUE"): + return 77; + case joaat("WEAPON_WRENCH"): + return 78; + case joaat("WEAPON_ASSAULTRIFLE_MK2"): + return 8; + case joaat("WEAPON_CARBINERIFLE_MK2"): + return 9; + case joaat("WEAPON_COMBATMG_MK2"): + return 13; + case joaat("WEAPON_HEAVYSNIPER_MK2"): + return 21; + case joaat("WEAPON_PISTOL_MK2"): + return 1; + case joaat("WEAPON_SMG_MK2"): + return 5; + case joaat("WEAPON_PUMPSHOTGUN_MK2"): + return 22; + case joaat("WEAPON_SPECIALCARBINE_MK2"): + return 46; + case joaat("WEAPON_SNSPISTOL_MK2"): + return 47; + case joaat("WEAPON_MARKSMANRIFLE_MK2"): + return 56; + case joaat("WEAPON_REVOLVER_MK2"): + return 70; + case joaat("WEAPON_BULLPUPRIFLE_MK2"): + return 48; + case joaat("WEAPON_DOUBLEACTION"): + return 79; + case joaat("WEAPON_STONE_HATCHET"): + return 80; + case joaat("WEAPON_RAYPISTOL"): + return 81; + case joaat("WEAPON_RAYCARBINE"): + return 82; + case joaat("WEAPON_RAYMINIGUN"): + return 83; + case joaat("WEAPON_NAVYREVOLVER"): + return 84; + case joaat("WEAPON_CERAMICPISTOL"): + return 85; + } + return 0; + } + + int func_57(int iParam0) { + return func_58(iParam0); + } + + int func_117(int iParam0) { + switch (iParam0) { + case joaat("WEAPON_PISTOL_MK2"): + case joaat("WEAPON_SMG_MK2"): + case joaat("WEAPON_ASSAULTRIFLE_MK2"): + case joaat("WEAPON_CARBINERIFLE_MK2"): + case joaat("WEAPON_COMBATMG_MK2"): + case joaat("WEAPON_HEAVYSNIPER_MK2"): + case joaat("WEAPON_PUMPSHOTGUN_MK2"): + case joaat("WEAPON_SPECIALCARBINE_MK2"): + case joaat("WEAPON_SNSPISTOL_MK2"): + case joaat("WEAPON_MARKSMANRIFLE_MK2"): + case joaat("WEAPON_REVOLVER_MK2"): + case joaat("WEAPON_BULLPUPRIFLE_MK2"): + return 2; + } + return -1; + } + + void func_116(char* sParam0, const char* cParam1, uint32_t iParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10, bool bParam11, bool bParam12) { + switch ((int)native::get_hash_key(cParam1)) { + case 64715401: /* GXTEntry: "Round" */ + case -2016195117: /* GXTEntry: "Rounds" */ + cParam1 = "GSA_TYPE_R"; + break; + case -414529079: /* GXTEntry: "Cartridge" */ + case -1253005183: /* GXTEntry: "Cartridges" */ + cParam1 = "GSA_TYPE_C"; + break; + case 336264847: /* GXTEntry: "Rocket" */ + case -1119195824: /* GXTEntry: "Rockets" */ + cParam1 = "GSA_TYPE_RO"; + break; + case 531395379: /* GXTEntry: "Charge" */ + case -672224483: /* GXTEntry: "Charges" */ + cParam1 = "GSA_TYPE_CH"; + break; + case 1034118160: /* GXTEntry: "Grenade" */ + case 600999375: /* GXTEntry: "Grenades" */ + cParam1 = "GSA_TYPE_G"; + break; + case -218834291: /* GXTEntry: "Bomb" */ + case -859056265: /* GXTEntry: "Bombs" */ + cParam1 = "GSA_TYPE_B"; + break; + case 1779531303: /* GXTEntry: "Firework" */ + case 82051787: /* GXTEntry: "Fireworks" */ + cParam1 = "GSA_TYPE_FW"; + break; + } + + strncpy(sParam0, "", 64); + switch (iParam6) { + case 0: + if (iParam5 == joaat("MP_M_FREEMODE_01")) { + strncpy(sParam0, "M", 64); + } else if (iParam5 == joaat("MP_F_FREEMODE_01")) { + strncpy(sParam0, "F", 64); + } + strncat(sParam0, "_HA_", 64); + strncat(sParam0, cParam1, 64); + strncat(sParam0, "_t", 64); + string_int_concat(sParam0, iParam7, 64); + strncat(sParam0, "_v", 64); + string_int_concat(sParam0, iParam8, 64); + break; + case 1: + if (iParam5 == joaat("MP_M_FREEMODE_01")) { + strncpy(sParam0, "M", 64); + } else if (iParam5 == joaat("MP_F_FREEMODE_01")) { + strncpy(sParam0, "F", 64); + } + strncat(sParam0, "_CL_", 64); + if (iParam7 == 12) { + strncat(sParam0, "OUTFIT_", 64); + } + strncat(sParam0, cParam1, 64); + if (iParam9 != -1) { + strncat(sParam0, "_n", 64); + string_int_concat(sParam0, iParam9, 64); + } + strncat(sParam0, "_t", 64); + string_int_concat(sParam0, iParam7, 64); + strncat(sParam0, "_v", 64); + string_int_concat(sParam0, iParam8, 64); + if (iParam10 != -1) { + strncat(sParam0, "_p", 64); + string_int_concat(sParam0, iParam10, 64); + } + break; + case 2: + if (iParam5 == joaat("MP_M_FREEMODE_01")) { + strncpy(sParam0, "M", 64); + } else if (iParam5 == joaat("MP_F_FREEMODE_01")) { + strncpy(sParam0, "F", 64); + } + strncat(sParam0, "_TA_", 64); + strncat(sParam0, cParam1, 64); + strncat(sParam0, "_t", 64); + string_int_concat(sParam0, iParam7, 64); + strncat(sParam0, "_v", 64); + string_int_concat(sParam0, iParam8, 64); + break; + case 3: + strncat(sParam0, "WP_", 64); + strncat(sParam0, cParam1, 64); + strncat(sParam0, "_t", 64); + string_int_concat(sParam0, iParam7, 64); + strncat(sParam0, "_v", 64); + string_int_concat(sParam0, iParam8, 64); + if (iParam9 != -1) { + strncat(sParam0, "_n", 64); + string_int_concat(sParam0, iParam9, 64); + } + break; + case 4: + if (iParam5 == menu::script_global(74390).as()) { // 1.55 done + strncpy(sParam0, "VE_BIG_YACHT_t0_v0", 64); + } else if (iParam5 == menu::script_global(74391).as()) {// 1.55 done + strncpy(sParam0, "VE_BIG_TRUCK_t0_v0", 64); + } else if (iParam5 == menu::script_global(74392).as()) {// 1.55 done + strncpy(sParam0, "VE_BALLISTIC_EQUIPMENT_t0_v0", 64); + } else if (iParam5 == menu::script_global(74393).as()) {// 1.55 done + strncpy(sParam0, "VE_BIG_PLANE_t0_v0", 64); + } else if (iParam5 == menu::script_global(74394).as()) {// 1.55 done + strncpy(sParam0, "VE_HACKER_TRUCK_t0_v0", 64); + } else if (iParam5 == 0) { + strncat(sParam0, "VEM_", 64); + if (iParam7 == 24 || iParam7 == 25) { + if (iParam9 == 1) { + strncat(sParam0, "COLOUR_1_", 64); + } else if (iParam9 == 2) { + strncat(sParam0, "COLOUR_2_", 64); + } else if (iParam9 == 3) { + strncat(sParam0, "COLOUR_EXTRA_1_", 64); + } + if (iParam10 == 5) { + strncat(sParam0, "MCT_CHROME_", 64); + } else if (iParam10 == 1) { + strncat(sParam0, "MCT_CLASSIC_", 64); + } else if (iParam10 == 0) { + strncat(sParam0, "MCT_METALLIC_", 64); + } else if (iParam10 == 4) { + strncat(sParam0, "MCT_METALS_", 64); + } else if (iParam10 == 3) { + strncat(sParam0, "MCT_MATTE_", 64); + } else if (iParam10 == 2) { + strncat(sParam0, "MCT_PEARLESCENT_", 64); + } else if (iParam10 == 6) { + strncat(sParam0, "MCT_NONE_", 64); + } + iParam9 = -1; + } else if (iParam7 == 38) { + strncat(sParam0, "COLOUR_5_", 64); + } else if (iParam7 == 65) { + strncat(sParam0, "COLOUR_6_", 64); + } + strncat(sParam0, cParam1, 64); + if (iParam9 != -1) { + strncat(sParam0, "_n", 64); + string_int_concat(sParam0, iParam9, 64); + } + strncat(sParam0, "_t", 64); + string_int_concat(sParam0, iParam7, 64); + strncat(sParam0, "_v", 64); + string_int_concat(sParam0, iParam8, 64); + } else if (iParam7 == 22) { + cParam1 = native::get_display_name_from_vehicle_model(iParam5); + if (native::is_string_null_or_empty(cParam1) || native::get_hash_key(cParam1) == -515263000) { + return; + } + + strncat(sParam0, "VEM_INSURANCE_", 64); + strncat(sParam0, cParam1, 64); + if (!bParam11) { + switch (iParam5) { + case joaat("DUBSTA2"): + case joaat("CAVALCADE2"): + case joaat("MESA2"): + case joaat("RAPIDGT2"): + case joaat("EMPEROR2"): + case joaat("CARGOBOB2"): + strncat(sParam0, "2", 64); + break; + case joaat("MESA3"): + case joaat("EMPEROR3"): + case joaat("BURRITO3"): + case joaat("MULE3"): + strncat(sParam0, "3", 64); + break; + case joaat("TORNADO4"): + strncat(sParam0, "4", 64); + break; + } + } + } else if (iParam7 == 40) { + switch (iParam5) { + case joaat("FCR2"): + cParam1 = "FCR2"; + break; + case joaat("DIABLOUS2"): + cParam1 = "DIABLOUS2"; + break; + case joaat("COMET3"): + cParam1 = "COMET3"; + break; + default: + cParam1 = native::get_display_name_from_vehicle_model(iParam5); + if (native::is_string_null_or_empty(cParam1)) { + return; + } + + break; + } + strncat(sParam0, "VEU_", 64); + strncat(sParam0, cParam1, 64); + strncat(sParam0, "_t0_v", 64); + string_int_concat(sParam0, iParam8, 64); + } else { + strncat(sParam0, "VE_", 64); + strncat(sParam0, cParam1, 64); + if (!bParam11) { + switch (iParam5) { + case joaat("DUBSTA2"): + case joaat("CAVALCADE2"): + case joaat("MESA2"): + case joaat("RAPIDGT2"): + case joaat("EMPEROR2"): + case joaat("CARGOBOB2"): + strncat(sParam0, "2", 64); + break; + case joaat("MESA3"): + case joaat("EMPEROR3"): + case joaat("BURRITO3"): + case joaat("MULE3"): + strncat(sParam0, "3", 64); + break; + case joaat("TORNADO4"): + strncat(sParam0, "4", 64); + break; + } + } + if (iParam9 != -1) { + strncat(sParam0, "_n", 64); + string_int_concat(sParam0, iParam9, 64); + } + strncat(sParam0, "_t", 64); + string_int_concat(sParam0, iParam7, 64); + strncat(sParam0, "_v", 64); + string_int_concat(sParam0, iParam8, 64); + if (iParam10 != -1) { + strncat(sParam0, "_p", 64); + string_int_concat(sParam0, iParam10, 64); + } + } + break; + } + if (bParam12) { + strncat(sParam0, "_CESP", 64); + } + } + + char* func_229(int iParam0, bool bParam1) { + static int Var0[0x100]; + + switch (iParam0) { + case 0: + if (bParam1) { + return "WTU_INVALID"; + } else { + return "WT_INVALID"; + } + break; + case joaat("WEAPON_UNARMED"): + if (bParam1) { + return "WTU_UNARMED"; + } else { + return "WT_UNARMED"; + } + break; + case joaat("WEAPON_PISTOL"): + if (bParam1) { + return "WTU_PIST"; + } else { + return "WT_PIST"; + } + break; + case joaat("WEAPON_COMBATPISTOL"): + if (bParam1) { + return "WTU_PIST_CBT"; + } else { + return "WT_PIST_CBT"; + } + break; + case joaat("WEAPON_APPISTOL"): + if (bParam1) { + return "WTU_PIST_AP"; + } else { + return "WT_PIST_AP"; + } + break; + case joaat("WEAPON_SMG"): + if (bParam1) { + return "WTU_SMG"; + } else { + return "WT_SMG"; + } + break; + case joaat("WEAPON_MICROSMG"): + if (bParam1) { + return "WTU_SMG_MCR"; + } else { + return "WT_SMG_MCR"; + } + break; + case joaat("WEAPON_ASSAULTRIFLE"): + if (bParam1) { + return "WTU_RIFLE_ASL"; + } else { + return "WT_RIFLE_ASL"; + } + break; + case joaat("WEAPON_CARBINERIFLE"): + if (bParam1) { + return "WTU_RIFLE_CBN"; + } else { + return "WT_RIFLE_CBN"; + } + break; + case joaat("WEAPON_ADVANCEDRIFLE"): + if (bParam1) { + return "WTU_RIFLE_ADV"; + } else { + return "WT_RIFLE_ADV"; + } + break; + case joaat("WEAPON_MG"): + if (bParam1) { + return "WTU_MG"; + } else { + return "WT_MG"; + } + break; + case joaat("WEAPON_COMBATMG"): + if (bParam1) { + return "WTU_MG_CBT"; + } else { + return "WT_MG_CBT"; + } + break; + case joaat("WEAPON_PUMPSHOTGUN"): + if (bParam1) { + return "WTU_SG_PMP"; + } else { + return "WT_SG_PMP"; + } + break; + case joaat("WEAPON_SAWNOFFSHOTGUN"): + if (bParam1) { + return "WTU_SG_SOF"; + } else { + return "WT_SG_SOF"; + } + break; + case joaat("WEAPON_ASSAULTSHOTGUN"): + if (bParam1) { + return "WTU_SG_ASL"; + } else { + return "WT_SG_ASL"; + } + break; + case joaat("WEAPON_HEAVYSNIPER"): + if (bParam1) { + return "WTU_SNIP_HVY"; + } else { + return "WT_SNIP_HVY"; + } + break; + case joaat("WEAPON_REMOTESNIPER"): + if (bParam1) { + return "WTU_SNIP_RMT"; + } else { + return "WT_SNIP_RMT"; + } + break; + case joaat("WEAPON_SNIPERRIFLE"): + if (bParam1) { + return "WTU_SNIP_RIF"; + } else { + return "WT_SNIP_RIF"; + } + break; + case joaat("WEAPON_GRENADELAUNCHER"): + if (bParam1) { + return "WTU_GL"; + } else { + return "WT_GL"; + } + break; + case joaat("WEAPON_RPG"): + if (bParam1) { + return "WTU_RPG"; + } else { + return "WT_RPG"; + } + break; + case joaat("WEAPON_MINIGUN"): + if (bParam1) { + return "WTU_MINIGUN"; + } else { + return "WT_MINIGUN"; + } + break; + case joaat("WEAPON_GRENADE"): + if (bParam1) { + return "WTU_GNADE"; + } else { + return "WT_GNADE"; + } + break; + case joaat("WEAPON_SMOKEGRENADE"): + if (bParam1) { + return "WTU_GNADE_SMK"; + } else { + return "WT_GNADE_SMK"; + } + break; + case joaat("WEAPON_STICKYBOMB"): + if (bParam1) { + return "WTU_GNADE_STK"; + } else { + return "WT_GNADE_STK"; + } + break; + case joaat("WEAPON_MOLOTOV"): + if (bParam1) { + return "WTU_MOLOTOV"; + } else { + return "WT_MOLOTOV"; + } + break; + case joaat("WEAPON_STUNGUN"): + if (bParam1) { + return "WTU_STUN"; + } else { + return "WT_STUN"; + } + break; + case joaat("WEAPON_PETROLCAN"): + if (bParam1) { + return "WTU_PETROL"; + } else { + return "WT_PETROL"; + } + break; + case joaat("WEAPON_ELECTRIC_FENCE"): + if (bParam1) { + return "WTU_ELCFEN"; + } else { + return "WT_ELCFEN"; + } + break; + case joaat("VEHICLE_WEAPON_TANK"): + if (bParam1) { + return "WTU_V_TANK"; + } else { + return "WT_V_TANK"; + } + break; + case joaat("VEHICLE_WEAPON_SPACE_ROCKET"): + if (bParam1) { + return "WTU_V_SPACERKT"; + } else { + return "WT_V_SPACERKT"; + } + break; + case joaat("VEHICLE_WEAPON_PLAYER_LASER"): + if (bParam1) { + return "WTU_V_PLRLSR"; + } else { + return "WT_V_PLRLSR"; + } + break; + case joaat("OBJECT"): + if (bParam1) { + return "WTU_OBJECT"; + } else { + return "WT_OBJECT"; + } + break; + case joaat("GADGET_PARACHUTE"): + if (bParam1) { + return "WTU_PARA"; + } else { + return "WT_PARA"; + } + break; + case joaat("AMMO_RPG"): + if (bParam1) { + return "WTU_A_RPG"; + } else { + return "WT_A_RPG"; + } + break; + case joaat("AMMO_TANK"): + if (bParam1) { + return "WTU_A_TANK"; + } else { + return "WT_A_TANK"; + } + break; + case joaat("AMMO_SPACE_ROCKET"): + if (bParam1) { + return "WTU_A_SPACERKT"; + } else { + return "WT_A_SPACERKT"; + } + break; + case joaat("AMMO_PLAYER_LASER"): + if (bParam1) { + return "WTU_A_PLRLSR"; + } else { + return "WT_A_PLRLSR"; + } + break; + case joaat("AMMO_ENEMY_LASER"): + if (bParam1) { + return "WTU_A_ENMYLSR"; + } else { + return "WT_A_ENMYLSR"; + } + break; + case joaat("WEAPON_KNIFE"): + if (bParam1) { + return "WTU_KNIFE"; + } else { + return "WT_KNIFE"; + } + break; + case joaat("WEAPON_NIGHTSTICK"): + if (bParam1) { + return "WTU_NGTSTK"; + } else { + return "WT_NGTSTK"; + } + break; + case joaat("WEAPON_HAMMER"): + if (bParam1) { + return "WTU_HAMMER"; + } else { + return "WT_HAMMER"; + } + break; + case joaat("WEAPON_BAT"): + if (bParam1) { + return "WTU_BAT"; + } else { + return "WT_BAT"; + } + break; + case joaat("WEAPON_CROWBAR"): + if (bParam1) { + return "WTU_CROWBAR"; + } else { + return "WT_CROWBAR"; + } + break; + case joaat("WEAPON_GOLFCLUB"): + if (bParam1) { + return "WTU_GOLFCLUB"; + } else { + return "WT_GOLFCLUB"; + } + break; + case joaat("WEAPON_RAMMED_BY_CAR"): + if (bParam1) { + return "WTU_PIST"; + } else { + return "WT_PIST"; + } + break; + case joaat("WEAPON_RUN_OVER_BY_CAR"): + if (bParam1) { + return "WTU_PIST"; + } else { + return "WT_PIST"; + } + break; + case joaat("WEAPON_ASSAULTSMG"): + if (bParam1) { + return "WTU_SMG_ASL"; + } else { + return "WT_SMG_ASL"; + } + break; + case joaat("WEAPON_BULLPUPSHOTGUN"): + if (bParam1) { + return "WTU_SG_BLP"; + } else { + return "WT_SG_BLP"; + } + break; + case joaat("WEAPON_PISTOL50"): + if (bParam1) { + return "WTU_PIST_50"; + } else { + return "WT_PIST_50"; + } + break; + case joaat("WEAPON_BOTTLE"): + if (bParam1) { + return "WTU_BOTTLE"; + } else { + return "WT_BOTTLE"; + } + break; + case joaat("WEAPON_GUSENBERG"): + if (bParam1) { + return "WTU_GUSENBERG"; + } else { + return "WT_GUSENBERG"; + } + break; + case joaat("WEAPON_SNSPISTOL"): + if (bParam1) { + return "WTU_SNSPISTOL"; + } else { + return "WT_SNSPISTOL"; + } + break; + case joaat("WEAPON_VINTAGEPISTOL"): + if (bParam1) { + return "WTU_VPISTOL"; + } else { + return "WT_VPISTOL"; + } + break; + case joaat("WEAPON_DAGGER"): + if (bParam1) { + return "WTU_DAGGER"; + } else { + return "WT_DAGGER"; + } + break; + case joaat("WEAPON_FLAREGUN"): + if (bParam1) { + return "WTU_FLAREGUN"; + } else { + return "WT_FLAREGUN"; + } + break; + case joaat("WEAPON_HEAVYPISTOL"): + if (bParam1) { + return "WTU_HEAVYPSTL"; + } else { + return "WT_HEAVYPSTL"; + } + break; + case joaat("WEAPON_SPECIALCARBINE"): + if (bParam1) { + return "WTU_RIFLE_SCBN"; + } else { + return "WT_RIFLE_SCBN"; + } + break; + case joaat("WEAPON_MUSKET"): + if (bParam1) { + return "WTU_MUSKET"; + } else { + return "WT_MUSKET"; + } + break; + case joaat("WEAPON_FIREWORK"): + if (bParam1) { + return "WTU_FWRKLNCHR"; + } else { + return "WT_FWRKLNCHR"; + } + break; + case joaat("WEAPON_MARKSMANRIFLE"): + if (bParam1) { + return "WTU_MKRIFLE"; + } else { + return "WT_MKRIFLE"; + } + break; + case joaat("WEAPON_HEAVYSHOTGUN"): + if (bParam1) { + return "WTU_HVYSHOT"; + } else { + return "WT_HVYSHOT"; + } + break; + case joaat("WEAPON_PROXMINE"): + if (bParam1) { + return "WTU_PRXMINE"; + } else { + return "WT_PRXMINE"; + } + break; + case joaat("WEAPON_HOMINGLAUNCHER"): + if (bParam1) { + return "WTU_HOMLNCH"; + } else { + return "WT_HOMLNCH"; + } + break; + case joaat("WEAPON_HATCHET"): + if (bParam1) { + return "WTU_HATCHET"; + } else { + return "WT_HATCHET"; + } + break; + case joaat("WEAPON_RAILGUN"): + if (bParam1) { + return "WTU_RAILGUN"; + } else { + return "WT_RAILGUN"; + } + break; + case joaat("WEAPON_COMBATPDW"): + if (bParam1) { + return "WTU_COMBATPDW"; + } else { + return "WT_COMBATPDW"; + } + break; + case joaat("WEAPON_KNUCKLE"): + if (bParam1) { + return "WTU_KNUCKLE"; + } else { + return "WT_KNUCKLE"; + } + break; + case joaat("WEAPON_MARKSMANPISTOL"): + if (bParam1) { + return "WTU_MKPISTOL"; + } else { + return "WT_MKPISTOL"; + } + break; + case joaat("WEAPON_BULLPUPRIFLE"): + if (bParam1) { + return "WTU_BULLRIFLE"; + } else { + return "WT_BULLRIFLE"; + } + break; + case joaat("WEAPON_MACHETE"): + if (bParam1) { + return "WTU_MACHETE"; + } else { + return "WT_MACHETE"; + } + break; + case joaat("WEAPON_MACHINEPISTOL"): + if (bParam1) { + return "WTU_MCHPIST"; + } else { + return "WT_MCHPIST"; + } + break; + case joaat("WEAPON_FLASHLIGHT"): + if (bParam1) { + return "WTU_FLASHLIGHT"; + } else { + return "WT_FLASHLIGHT"; + } + break; + case joaat("WEAPON_DBSHOTGUN"): + if (bParam1) { + return "WTU_DBSHGN"; + } else { + return "WT_DBSHGN"; + } + break; + case joaat("WEAPON_COMPACTRIFLE"): + if (bParam1) { + return "WTU_CMPRIFLE"; + } else { + return "WT_CMPRIFLE"; + } + break; + case joaat("WEAPON_SWITCHBLADE"): + if (bParam1) { + return "WTU_SWBLADE"; + } else { + return "WT_SWBLADE"; + } + break; + case joaat("WEAPON_REVOLVER"): + if (bParam1) { + return "WTU_REVOLVER"; + } else { + return "WT_REVOLVER"; + } + break; + case joaat("WEAPON_AUTOSHOTGUN"): + if (bParam1) { + return "WTU_AUTOSHGN"; + } else { + return "WT_AUTOSHGN"; + } + break; + case joaat("WEAPON_BATTLEAXE"): + if (bParam1) { + return "WTU_BATTLEAXE"; + } else { + return "WT_BATTLEAXE"; + } + break; + case joaat("WEAPON_COMPACTLAUNCHER"): + if (bParam1) { + return "WTU_CMPGL"; + } else { + return "WT_CMPGL"; + } + break; + case joaat("WEAPON_MINISMG"): + if (bParam1) { + return "WTU_MINISMG"; + } else { + return "WT_MINISMG"; + } + break; + case joaat("WEAPON_PIPEBOMB"): + if (bParam1) { + return "WTU_PIPEBOMB"; + } else { + return "WT_PIPEBOMB"; + } + break; + case joaat("WEAPON_POOLCUE"): + if (bParam1) { + return "WTU_POOLCUE"; + } else { + return "WT_POOLCUE"; + } + break; + case joaat("WEAPON_WRENCH"): + if (bParam1) { + return "WTU_WRENCH"; + } else { + return "WT_WRENCH"; + } + break; + case joaat("WEAPON_COUGAR"): + return "WT_RAGE"; + case -159960575: + return "WT_VEH_WEP"; + case joaat("WEAPON_PISTOL_MK2"): + if (bParam1) { + return "WTU_PIST2"; + } else { + return "WT_PIST2"; + } + break; + case joaat("WEAPON_SMG_MK2"): + if (bParam1) { + return "WTU_SMG2"; + } else { + return "WT_SMG2"; + } + break; + case joaat("WEAPON_HEAVYSNIPER_MK2"): + if (bParam1) { + return "WTU_SNIP_HVY2"; + } else { + return "WT_SNIP_HVY2"; + } + break; + case joaat("WEAPON_COMBATMG_MK2"): + if (bParam1) { + return "WTU_MG_CBT2"; + } else { + return "WT_MG_CBT2"; + } + break; + case joaat("WEAPON_ASSAULTRIFLE_MK2"): + if (bParam1) { + return "WTU_RIFLE_ASL2"; + } else { + return "WT_RIFLE_ASL2"; + } + break; + case joaat("WEAPON_CARBINERIFLE_MK2"): + if (bParam1) { + return "WTU_RIFLE_CBN2"; + } else { + return "WT_RIFLE_CBN2"; + } + break; + case joaat("WEAPON_PUMPSHOTGUN_MK2"): + if (bParam1) { + return "WTU_SG_PMP2"; + } else { + return "WT_SG_PMP2"; + } + break; + case joaat("WEAPON_SPECIALCARBINE_MK2"): + if (bParam1) { + return "WTU_SPCARBINE2"; + } else { + return "WT_SPCARBINE2"; + } + break; + case joaat("WEAPON_SNSPISTOL_MK2"): + if (bParam1) { + return "WTU_SNSPISTOL2"; + } else { + return "WT_SNSPISTOL2"; + } + break; + case joaat("WEAPON_MARKSMANRIFLE_MK2"): + if (bParam1) { + return "WTU_MKRIFLE2"; + } else { + return "WT_MKRIFLE2"; + } + break; + case joaat("WEAPON_REVOLVER_MK2"): + if (bParam1) { + return "WTU_REVOLVER2"; + } else { + return "WT_REVOLVER2"; + } + break; + case joaat("WEAPON_BULLPUPRIFLE_MK2"): + if (bParam1) { + return "WTU_BULLRIFLE2"; + } else { + return "WT_BULLRIFLE2"; + } + break; + case joaat("WEAPON_DOUBLEACTION"): + if (bParam1) { + return "WTU_REV_DA"; + } else { + return "WT_REV_DA"; + } + break; + case joaat("WEAPON_STONE_HATCHET"): + if (bParam1) { + return "WTU_SHATCHET"; + } else { + return "WT_SHATCHET"; + } + break; + case joaat("WEAPON_RAYPISTOL"): + if (bParam1) { + return "WTU_RAYPISTOL"; + } else { + return "WT_RAYPISTOL"; + } + break; + case joaat("WEAPON_RAYCARBINE"): + if (bParam1) { + return "WTU_RAYCARBINE"; + } else { + return "WT_RAYCARBINE"; + } + break; + case joaat("WEAPON_RAYMINIGUN"): + if (bParam1) { + return "WTU_RAYMINIGUN"; + } else { + return "WT_RAYMINIGUN"; + } + break; + case joaat("WEAPON_NAVYREVOLVER"): + if (bParam1) { + return "WTU_REV_NV"; + } else { + return "WT_REV_NV"; + } + break; + case joaat("WEAPON_CERAMICPISTOL"): + if (bParam1) { + return "WTU_CERPST"; + } else { + return "WT_CERPST"; + } + break; + default: + if (func_81(iParam0, Var0) != -1) { + if (bParam1) { + return (char*)&Var0[32]; + } else { + return (char*)&Var0[8]; + } + } + break; + } + return "WT_INVALID"; + } + + void func_228(int iParam0, int* uParam1, int* iParam2) { + *iParam2 = 0; + if (iParam0 == joaat("WEAPON_PETROLCAN")) { + *uParam1 = 5; + } else if (iParam0 == joaat("GADGET_PARACHUTE")) { + *uParam1 = 4; + } else if (iParam0 == joaat("WEAPON_UNARMED")) { + *uParam1 = 3; + } else if ((((iParam0 == joaat("WEAPON_PISTOL50") || iParam0 == joaat("WEAPON_SNSPISTOL")) || iParam0 == joaat("WEAPON_HEAVYPISTOL")) || iParam0 == joaat("WEAPON_VINTAGEPISTOL")) || iParam0 == joaat("WEAPON_FLAREGUN")) { + *uParam1 = 0; + } else if (((((((((iParam0 == joaat("WEAPON_BOTTLE") || iParam0 == joaat("WEAPON_DAGGER")) || iParam0 == joaat("WEAPON_HAMMER")) || iParam0 == joaat("WEAPON_HATCHET")) || iParam0 == joaat("WEAPON_KNIFE")) || iParam0 == joaat("WEAPON_NIGHTSTICK")) || iParam0 == joaat("WEAPON_FLASHLIGHT")) || iParam0 == joaat("WEAPON_SWITCHBLADE")) || iParam0 == joaat("WEAPON_KNUCKLE")) || iParam0 == joaat("WEAPON_MACHETE")) { + *uParam1 = 1; + } else if ((((iParam0 == joaat("WEAPON_GRENADE") || iParam0 == joaat("WEAPON_SMOKEGRENADE")) || iParam0 == joaat("WEAPON_STICKYBOMB")) || iParam0 == joaat("WEAPON_PROXMINE")) || iParam0 == joaat("WEAPON_PIPEBOMB")) { + *uParam1 = 2; + *iParam2 = 1; + } else { + *uParam1 = 0; + } + } + + bool func_83() { + int iVar0; + + if (native::network_is_signed_in()) { + if (native::network_are_ros_available()) { + if (native::network_has_ros_privilege(24)) { + native::stat_get_int(joaat("SP_UNLOCK_EXCLUS_CONTENT"), &iVar0, -1); + native::set_bit(&iVar0, 2); + native::set_bit(&iVar0, 4); + native::set_bit(&iVar0, 6); + native::set_bit(menu::script_global(25).get(), 2); // 1.55 done + native::set_bit(menu::script_global(25).get(), 4);// 1.55 done + native::set_bit(menu::script_global(25).get(), 6);// 1.55 done + native::stat_set_int(joaat("SP_UNLOCK_EXCLUS_CONTENT"), iVar0, true); + + if (native::are_profile_settings_valid()) { + iVar0 = native::get_profile_setting(866); + native::set_bit(&iVar0, 0); + native::set_has_content_unlocks_flags(iVar0); + } + + return true; + } + } + } + + if (menu::script_global(151130).as() == 2) {// 1.55 done + return true; + } else if (menu::script_global(151130).as() == 3) {// 1.55 done + return false; + } + + if (native::are_profile_settings_valid()) { + if (native::is_bit_set(native::get_profile_setting(866), 0)) { + return true; + } + } + + return false; + } + + int func_165() { + int iVar0; + int iVar1; + int iVar2; + int iVar3; + int iVar4; + + if (native::is_bit_set(menu::script_global(25).as(), 5)) {// 1.55 done + if (native::is_bit_set(menu::script_global(25).as(), 1) || native::is_bit_set(menu::script_global(25).as(), 3)) {// 1.55 done + return 1; + } else { + return 0; + } + } + if (native::stat_get_int(joaat("SP_UNLOCK_EXCLUS_CONTENT"), &iVar0, -1)) { + if (native::is_bit_set(iVar0, 5)) { + if (native::is_bit_set(iVar0, 1) || native::is_bit_set(iVar0, 3)) { + return 1; + } else { + return 0; + } + } + } + if (native::stat_slot_is_loaded(false)) { + if (menu::script_global(151131).at(3).as()) { // 1.55 done + iVar2 = joaat("MPPLY_PLAT_UP_LB_CHECK"); + if (native::stat_get_int(iVar2, &iVar1, -1)) { + if (native::is_bit_set(iVar1, 5)) { + return 1; + } + } + } + } + if (native::are_profile_settings_valid()) { + iVar3 = native::get_profile_setting(866); + if (native::is_bit_set(iVar3, 1) || native::is_bit_set(iVar3, 3)) { + return 1; + } + } + if (native::network_is_signed_in()) { + if (native::network_are_ros_available()) { + if (native::network_has_ros_privilege(25)) { + native::stat_get_int(joaat("SP_UNLOCK_EXCLUS_CONTENT"), &iVar4, -1); + native::set_bit(&iVar4, 1); + native::set_bit(&iVar4, 3); + native::set_bit(&iVar4, 5); + native::set_bit(&menu::script_global(25).as(), 1);// 1.55 done + native::set_bit(&menu::script_global(25).as(), 3);// 1.55 done + native::set_bit(&menu::script_global(25).as(), 5);// 1.55 done + native::stat_set_int(joaat("SP_UNLOCK_EXCLUS_CONTENT"), iVar4, true); + if (native::are_profile_settings_valid()) { + iVar4 = native::get_profile_setting(866); + native::set_bit(&iVar4, 1); + native::set_bit(&iVar4, 3); + native::set_has_content_unlocks_flags(iVar4); + } + return 1; + } + } + } + return 0; + } + + int func_164() { + int iVar0; + int iVar1; + int iVar2; + int iVar3; + + if (native::is_bit_set(menu::script_global(25).as(), 6)) {// 1.55 done + if (native::is_bit_set(menu::script_global(25).as(), 2) || native::is_bit_set(menu::script_global(25).as(), 4)) {// 1.55 done + return 1; + } else { + return 0; + } + } + if (native::stat_get_int(joaat("SP_UNLOCK_EXCLUS_CONTENT"), &iVar0, -1)) { + if (native::is_bit_set(iVar0, 6)) { + if (native::is_bit_set(iVar0, 2) || native::is_bit_set(iVar0, 4)) { + return 1; + } else { + return 0; + } + } + } + if (native::stat_slot_is_loaded(false)) { + if (menu::script_global(151131).at(3).as()) {// 1.55 done + iVar2 = joaat("MPPLY_PLAT_UP_LB_CHECK"); + if (native::stat_get_int(iVar2, &iVar1, -1)) { + if (native::is_bit_set(iVar1, 8)) { + return 1; + } + } + } + } + if (native::are_profile_settings_valid()) { + iVar3 = native::get_profile_setting(866); + if (native::is_bit_set(iVar3, 2) || native::is_bit_set(iVar3, 4)) { + return 1; + } + } + return 0; + } + + int func_77() { + switch (_i(0x155467ACA0F55705)) { + case 1: + case 2: + case 3: + case 4: + return 1; + default: + break; + } + return 0; + } + + int func_78() { + switch (_i(0x754615490A029508)) { + case 1: + case 2: + case 3: + case 4: + return 1; + default: + break; + } + return 0; + } + + bool func_76() { + return (func_78() || func_77()); + } + + bool func_75(int iParam0) { + if (native::network_is_game_in_progress()) { + if (func_76()) { + if ((iParam0 == joaat("WEAPON_MARKSMANRIFLE") || iParam0 == joaat("WEAPON_COMPACTRIFLE")) || iParam0 == joaat("WEAPON_COMPACTLAUNCHER")) { + return true; + } + } + } + return false; + } + + bool func_226(int iParam0, int iParam1, char* sParam2, char* sParam3) { + if (!native::is_string_null_or_empty(sParam3)) { + strncpy(sParam2, sParam3, 16); + } else { + strncpy(sParam2, "GSA", 16); + } + + if (iParam0 == joaat("AMMO_PISTOL")) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == joaat("AMMO_SMG")) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == joaat("AMMO_RIFLE")) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == joaat("AMMO_MG")) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == -1866678455) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == joaat("AMMO_SNIPER")) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == joaat("AMMO_SNIPER_REMOTE")) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == joaat("AMMO_MINIGUN")) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == -873900901) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == joaat("AMMO_SHOTGUN")) { + strncat(sParam2, "_TYPE_C", 16); + } else if (iParam0 == joaat("AMMO_STUNGUN")) { + strncat(sParam2, "_TYPE_CH", 16); + } else if (iParam0 == joaat("AMMO_GRENADELAUNCHER")) { + strncat(sParam2, "_TYPE_G", 16); + } else if (iParam0 == joaat("AMMO_GRENADELAUNCHER_SMOKE")) { + strncat(sParam2, "_TYPE_G", 16); + } else if (iParam0 == joaat("AMMO_SMOKEGRENADE")) { + strncat(sParam2, "_TYPE_G", 16); + } else if (iParam0 == 214501711) { + strncat(sParam2, "_TYPE_G", 16); + } else if (iParam0 == joaat("AMMO_STICKYBOMB")) { + strncat(sParam2, "_TYPE_B", 16); + } else if (iParam0 == joaat("AMMO_RPG")) { + strncat(sParam2, "_TYPE_RO", 16); + } else if (iParam0 == joaat("AMMO_FLAREGUN")) { + strncat(sParam2, "_TYPE_F", 16); + } else if (iParam0 == joaat("AMMO_FIREWORK")) { + strncat(sParam2, "_TYPE_FW", 16); + } else if (iParam0 == joaat("AMMO_HOMINGLAUNCHER")) { + strncat(sParam2, "_TYPE_RO", 16); + } else if (iParam0 == joaat("AMMO_PROXMINE")) { + strncat(sParam2, "_TYPE_M", 16); + } else if (iParam0 == joaat("AMMO_RAILGUN")) { + strncat(sParam2, "_TYPE_R", 16); + } else if (iParam0 == joaat("AMMO_PIPEBOMB")) { + strncat(sParam2, "_TYPE_B", 16); + } else if (iParam0 == joaat("AMMO_MG_ARMORPIERCING")) { + strncpy(sParam2, "WCT_CLIP_AP", 16); + } else if (iParam0 == joaat("AMMO_MG_FMJ")) { + strncpy(sParam2, "WCT_CLIP_FMJ", 16); + } else if (iParam0 == joaat("AMMO_MG_INCENDIARY")) { + strncpy(sParam2, "WCT_CLIP_INC", 16); + } else if (iParam0 == joaat("AMMO_MG_TRACER")) { + strncpy(sParam2, "WCT_CLIP_TR", 16); + } else if (iParam0 == joaat("AMMO_PISTOL_FMJ")) { + strncpy(sParam2, "WCT_CLIP_FMJ", 16); + } else if (iParam0 == joaat("AMMO_PISTOL_HOLLOWPOINT")) { + strncpy(sParam2, "WCT_CLIP_HP", 16); + } else if (iParam0 == joaat("AMMO_PISTOL_INCENDIARY")) { + strncpy(sParam2, "WCT_CLIP_INC", 16); + } else if (iParam0 == joaat("AMMO_PISTOL_TRACER")) { + strncpy(sParam2, "WCT_CLIP_TR", 16); + } else if (iParam0 == joaat("AMMO_RIFLE_ARMORPIERCING")) { + strncpy(sParam2, "WCT_CLIP_AP", 16); + } else if (iParam0 == joaat("AMMO_RIFLE_FMJ")) { + strncpy(sParam2, "WCT_CLIP_FMJ", 16); + } else if (iParam0 == joaat("AMMO_RIFLE_INCENDIARY")) { + strncpy(sParam2, "WCT_CLIP_INC", 16); + } else if (iParam0 == joaat("AMMO_RIFLE_TRACER")) { + strncpy(sParam2, "WCT_CLIP_TR", 16); + } else if (iParam0 == joaat("AMMO_SMG_FMJ")) { + strncpy(sParam2, "WCT_CLIP_FMJ", 16); + } else if (iParam0 == joaat("AMMO_SMG_HOLLOWPOINT")) { + strncpy(sParam2, "WCT_CLIP_HP", 16); + } else if (iParam0 == joaat("AMMO_SMG_INCENDIARY")) { + strncpy(sParam2, "WCT_CLIP_INC", 16); + } else if (iParam0 == joaat("AMMO_SMG_TRACER")) { + strncpy(sParam2, "WCT_CLIP_TR", 16); + } else if (iParam0 == joaat("AMMO_SNIPER_ARMORPIERCING")) { + strncpy(sParam2, "WCT_CLIP_AP", 16); + } else if (iParam0 == joaat("AMMO_SNIPER_EXPLOSIVE")) { + strncpy(sParam2, "WCT_CLIP_EX", 16); + } else if (iParam0 == joaat("AMMO_SNIPER_FMJ")) { + strncpy(sParam2, "WCT_CLIP_FMJ", 16); + } else if (iParam0 == joaat("AMMO_SNIPER_INCENDIARY")) { + strncpy(sParam2, "WCT_CLIP_INC", 16); + } else if (iParam0 == joaat("AMMO_SNIPER_TRACER")) { + strncpy(sParam2, "WCT_CLIP_TR", 16); + } else if (iParam0 == joaat("AMMO_SHOTGUN_ARMORPIERCING")) { + strncpy(sParam2, "WCT_SHELL_AP", 16); + } else if (iParam0 == joaat("AMMO_SHOTGUN_EXPLOSIVE")) { + strncpy(sParam2, "WCT_SHELL_EX", 16); + } else if (iParam0 == joaat("AMMO_SHOTGUN_HOLLOWPOINT")) { + strncpy(sParam2, "WCT_SHELL_HP", 16); + } else if (iParam0 == joaat("AMMO_SHOTGUN_INCENDIARY")) { + strncpy(sParam2, "WCT_SHELL_INC", 16); + } else { + return false; + } + + if (iParam1 == 1 && iParam0 != joaat("AMMO_FIREWORK")) { + strncat(sParam2, "1", 16); + } + + return native::get_hash_key(sParam2) != 0; + } + + bool func_227(int iParam0, int* iParam1) { + *iParam1 = -1; + switch (iParam0) { + case joaat("WEAPON_PISTOL"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_COMBATPISTOL"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_APPISTOL"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_PISTOL50"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_SNSPISTOL"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_HEAVYPISTOL"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_VINTAGEPISTOL"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_MICROSMG"): + *iParam1 = joaat("AMMO_SMG"); + break; + case joaat("WEAPON_SMG"): + *iParam1 = joaat("AMMO_SMG"); + break; + case joaat("WEAPON_ASSAULTSMG"): + *iParam1 = joaat("AMMO_SMG"); + break; + case joaat("WEAPON_COMBATPDW"): + *iParam1 = joaat("AMMO_SMG"); + break; + case joaat("WEAPON_ASSAULTRIFLE"): + *iParam1 = joaat("AMMO_RIFLE"); + break; + case joaat("WEAPON_CARBINERIFLE"): + *iParam1 = joaat("AMMO_RIFLE"); + break; + case joaat("WEAPON_ADVANCEDRIFLE"): + *iParam1 = joaat("AMMO_RIFLE"); + break; + case joaat("WEAPON_SPECIALCARBINE"): + *iParam1 = joaat("AMMO_RIFLE"); + break; + case joaat("WEAPON_HEAVYRIFLE"): + *iParam1 = joaat("AMMO_RIFLE"); + break; + case joaat("WEAPON_BULLPUPRIFLE"): + *iParam1 = joaat("AMMO_RIFLE"); + break; + case joaat("WEAPON_MG"): + *iParam1 = joaat("AMMO_MG"); + break; + case joaat("WEAPON_COMBATMG"): + *iParam1 = joaat("AMMO_MG"); + break; + case joaat("WEAPON_ASSAULTMG"): + *iParam1 = joaat("AMMO_MG"); + break; + case joaat("WEAPON_GUSENBERG"): + *iParam1 = joaat("AMMO_MG"); + break; + case joaat("WEAPON_PUMPSHOTGUN"): + *iParam1 = joaat("AMMO_SHOTGUN"); + break; + case joaat("WEAPON_SAWNOFFSHOTGUN"): + *iParam1 = joaat("AMMO_SHOTGUN"); + break; + case joaat("WEAPON_ASSAULTSHOTGUN"): + *iParam1 = joaat("AMMO_SHOTGUN"); + break; + case joaat("WEAPON_BULLPUPSHOTGUN"): + *iParam1 = joaat("AMMO_SHOTGUN"); + break; + case joaat("WEAPON_HEAVYSHOTGUN"): + *iParam1 = joaat("AMMO_SHOTGUN"); + break; + case joaat("WEAPON_SNIPERRIFLE"): + *iParam1 = joaat("AMMO_SNIPER"); + break; + case joaat("WEAPON_HEAVYSNIPER"): + *iParam1 = joaat("AMMO_SNIPER"); + break; + case joaat("WEAPON_MUSKET"): + *iParam1 = joaat("AMMO_SHOTGUN"); + break; + case joaat("WEAPON_MARKSMANRIFLE"): + *iParam1 = joaat("AMMO_SNIPER"); + break; + case joaat("WEAPON_GRENADELAUNCHER"): + *iParam1 = joaat("AMMO_GRENADELAUNCHER"); + break; + case joaat("WEAPON_RPG"): + *iParam1 = joaat("AMMO_RPG"); + break; + case joaat("WEAPON_MINIGUN"): + *iParam1 = joaat("AMMO_MINIGUN"); + break; + case joaat("WEAPON_FIREWORK"): + *iParam1 = joaat("AMMO_FIREWORK"); + break; + case joaat("WEAPON_FLAREGUN"): + *iParam1 = joaat("AMMO_FLAREGUN"); + break; + case joaat("WEAPON_HOMINGLAUNCHER"): + *iParam1 = joaat("AMMO_HOMINGLAUNCHER"); + break; + case joaat("WEAPON_PROXMINE"): + *iParam1 = joaat("AMMO_PROXMINE"); + break; + case joaat("WEAPON_RAILGUN"): + *iParam1 = joaat("AMMO_RAILGUN"); + break; + case joaat("WEAPON_MARKSMANPISTOL"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_MACHINEPISTOL"): + *iParam1 = joaat("AMMO_SMG"); + break; + case joaat("WEAPON_REVOLVER"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_DBSHOTGUN"): + *iParam1 = joaat("AMMO_SHOTGUN"); + break; + case joaat("WEAPON_COMPACTRIFLE"): + *iParam1 = joaat("AMMO_RIFLE"); + break; + case joaat("WEAPON_AUTOSHOTGUN"): + *iParam1 = joaat("AMMO_SHOTGUN"); + break; + case joaat("WEAPON_COMPACTLAUNCHER"): + *iParam1 = joaat("AMMO_GRENADELAUNCHER"); + break; + case joaat("WEAPON_MINISMG"): + *iParam1 = joaat("AMMO_SMG"); + break; + case joaat("WEAPON_PIPEBOMB"): + *iParam1 = joaat("AMMO_PIPEBOMB"); + break; + case joaat("WEAPON_DOUBLEACTION"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_PISTOL_MK2"): + *iParam1 = joaat("AMMO_PISTOL"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_PISTOL_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_PISTOL_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_PISTOL_MK2_CLIP_HOLLOWPOINT"))) { + *iParam1 = joaat("AMMO_PISTOL_HOLLOWPOINT"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_PISTOL_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_PISTOL_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_PISTOL_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_PISTOL_TRACER"); + } + } + break; + case joaat("WEAPON_SMG_MK2"): + *iParam1 = joaat("AMMO_SMG"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SMG_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_SMG_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SMG_MK2_CLIP_HOLLOWPOINT"))) { + *iParam1 = joaat("AMMO_SMG_HOLLOWPOINT"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SMG_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_SMG_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SMG_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_SMG_TRACER"); + } + } + break; + case joaat("WEAPON_HEAVYSNIPER_MK2"): + *iParam1 = joaat("AMMO_SNIPER"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_HEAVYSNIPER_MK2_CLIP_ARMORPIERCING"))) { + *iParam1 = joaat("AMMO_SNIPER_ARMORPIERCING"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_HEAVYSNIPER_MK2_CLIP_EXPLOSIVE"))) { + *iParam1 = joaat("AMMO_SNIPER_EXPLOSIVE"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_HEAVYSNIPER_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_SNIPER_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_HEAVYSNIPER_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_SNIPER_INCENDIARY"); + } + } + break; + case joaat("WEAPON_COMBATMG_MK2"): + *iParam1 = joaat("AMMO_MG"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_COMBATMG_MK2_CLIP_ARMORPIERCING"))) { + *iParam1 = joaat("AMMO_MG_ARMORPIERCING"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_COMBATMG_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_MG_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_COMBATMG_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_MG_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_COMBATMG_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_MG_TRACER"); + } + } + break; + case joaat("WEAPON_ASSAULTRIFLE_MK2"): + *iParam1 = joaat("AMMO_RIFLE"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_ASSAULTRIFLE_MK2_CLIP_ARMORPIERCING"))) { + *iParam1 = joaat("AMMO_RIFLE_ARMORPIERCING"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_ASSAULTRIFLE_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_RIFLE_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_ASSAULTRIFLE_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_RIFLE_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_ASSAULTRIFLE_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_RIFLE_TRACER"); + } + } + break; + case joaat("WEAPON_CARBINERIFLE_MK2"): + *iParam1 = joaat("AMMO_RIFLE"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_CARBINERIFLE_MK2_CLIP_ARMORPIERCING"))) { + *iParam1 = joaat("AMMO_RIFLE_ARMORPIERCING"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_CARBINERIFLE_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_RIFLE_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_CARBINERIFLE_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_RIFLE_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_CARBINERIFLE_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_RIFLE_TRACER"); + } + } + break; + case joaat("WEAPON_PUMPSHOTGUN_MK2"): + *iParam1 = joaat("AMMO_SHOTGUN"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_PUMPSHOTGUN_MK2_CLIP_ARMORPIERCING"))) { + *iParam1 = joaat("AMMO_SHOTGUN_ARMORPIERCING"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_PUMPSHOTGUN_MK2_CLIP_EXPLOSIVE"))) { + *iParam1 = joaat("AMMO_SHOTGUN_EXPLOSIVE"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_PUMPSHOTGUN_MK2_CLIP_HOLLOWPOINT"))) { + *iParam1 = joaat("AMMO_SHOTGUN_HOLLOWPOINT"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_PUMPSHOTGUN_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_SHOTGUN_INCENDIARY"); + } + } + break; + case joaat("WEAPON_SPECIALCARBINE_MK2"): + *iParam1 = joaat("AMMO_RIFLE"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SPECIALCARBINE_MK2_CLIP_ARMORPIERCING"))) { + *iParam1 = joaat("AMMO_RIFLE_ARMORPIERCING"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SPECIALCARBINE_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_RIFLE_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SPECIALCARBINE_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_RIFLE_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SPECIALCARBINE_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_RIFLE_TRACER"); + } + } + break; + case joaat("WEAPON_SNSPISTOL_MK2"): + *iParam1 = joaat("AMMO_PISTOL"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SNSPISTOL_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_PISTOL_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SNSPISTOL_MK2_CLIP_HOLLOWPOINT"))) { + *iParam1 = joaat("AMMO_PISTOL_HOLLOWPOINT"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SNSPISTOL_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_PISTOL_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_SNSPISTOL_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_PISTOL_TRACER"); + } + } + break; + case joaat("WEAPON_MARKSMANRIFLE_MK2"): + *iParam1 = joaat("AMMO_SNIPER"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_MARKSMANRIFLE_MK2_CLIP_ARMORPIERCING"))) { + *iParam1 = joaat("AMMO_SNIPER_ARMORPIERCING"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_MARKSMANRIFLE_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_SNIPER_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_MARKSMANRIFLE_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_SNIPER_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_MARKSMANRIFLE_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_SNIPER_TRACER"); + } + } + break; + case joaat("WEAPON_REVOLVER_MK2"): + *iParam1 = joaat("AMMO_PISTOL"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_REVOLVER_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_PISTOL_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_REVOLVER_MK2_CLIP_HOLLOWPOINT"))) { + *iParam1 = joaat("AMMO_PISTOL_HOLLOWPOINT"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_REVOLVER_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_PISTOL_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_REVOLVER_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_PISTOL_TRACER"); + } + } + break; + case joaat("WEAPON_BULLPUPRIFLE_MK2"): + *iParam1 = joaat("AMMO_RIFLE"); + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_BULLPUPRIFLE_MK2_CLIP_ARMORPIERCING"))) { + *iParam1 = joaat("AMMO_RIFLE_ARMORPIERCING"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_BULLPUPRIFLE_MK2_CLIP_FMJ"))) { + *iParam1 = joaat("AMMO_RIFLE_FMJ"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_BULLPUPRIFLE_MK2_CLIP_INCENDIARY"))) { + *iParam1 = joaat("AMMO_RIFLE_INCENDIARY"); + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, iParam0, joaat("COMPONENT_BULLPUPRIFLE_MK2_CLIP_TRACER"))) { + *iParam1 = joaat("AMMO_RIFLE_TRACER"); + } + } + break; + case joaat("WEAPON_RAYPISTOL"): + *iParam1 = joaat("AMMO_RAYPISTOL"); + break; + case joaat("WEAPON_RAYCARBINE"): + *iParam1 = joaat("AMMO_MG"); + break; + case joaat("WEAPON_RAYMINIGUN"): + *iParam1 = joaat("AMMO_MINIGUN"); + break; + case joaat("WEAPON_CERAMICPISTOL"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + case joaat("WEAPON_NAVYREVOLVER"): + *iParam1 = joaat("AMMO_PISTOL"); + break; + } + + return *iParam1 != -1; + } + + int func_464(int iParam0) { + switch (iParam0) { + case joaat("WEAPON_PISTOL_MK2"): + return joaat("WEAPON_PISTOL"); + case joaat("WEAPON_SMG_MK2"): + return joaat("WEAPON_SMG"); + case joaat("WEAPON_ASSAULTRIFLE_MK2"): + return joaat("WEAPON_ASSAULTRIFLE"); + case joaat("WEAPON_CARBINERIFLE_MK2"): + return joaat("WEAPON_CARBINERIFLE"); + case joaat("WEAPON_COMBATMG_MK2"): + return joaat("WEAPON_COMBATMG"); + case joaat("WEAPON_HEAVYSNIPER_MK2"): + return joaat("WEAPON_HEAVYSNIPER"); + case joaat("WEAPON_BULLPUPRIFLE_MK2"): + return joaat("WEAPON_BULLPUPRIFLE"); + case joaat("WEAPON_MARKSMANRIFLE_MK2"): + return joaat("WEAPON_MARKSMANRIFLE"); + case joaat("WEAPON_PUMPSHOTGUN_MK2"): + return joaat("WEAPON_PUMPSHOTGUN"); + case joaat("WEAPON_REVOLVER_MK2"): + return joaat("WEAPON_REVOLVER"); + case joaat("WEAPON_SNSPISTOL_MK2"): + return joaat("WEAPON_SNSPISTOL"); + case joaat("WEAPON_SPECIALCARBINE_MK2"): + return joaat("WEAPON_SPECIALCARBINE"); + default: + break; + } + return 0; + } + + // is weapon ammo full + bool func_882(int iParam0, bool IsMark2 = false) { + int iVar0; + bool iVar1 = false; + + if (native::has_ped_got_weapon(menu::player::get_local_player().m_ped, iParam0, false)) { + if (IsMark2 && func_464(iParam0) != 0) { + bool bVar2 = native::get_ped_ammo_type_from_weapon2(menu::player::get_local_player().m_ped, iParam0); + if (native::get_max_ammo_by_type(menu::player::get_local_player().m_ped, bVar2, &iVar0)) { + if (native::get_ped_ammo_by_type(menu::player::get_local_player().m_ped, bVar2) >= iVar0) { + iVar1 = true; + } + } + } else if (!native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::get_max_ammo(menu::player::get_local_player().m_ped, iParam0, &iVar0)) { + if (native::get_ammo_in_ped_weapon(menu::player::get_local_player().m_ped, iParam0) >= iVar0) { + iVar1 = true; + } + } + } + } + + return iVar1; + } + } + + int get_round_count(uint32_t weapon) { + switch (weapon) { + case joaat("WEAPON_MICROSMG"): return 32; + case joaat("WEAPON_SMG"): return 60; + case joaat("WEAPON_ASSAULTSMG"): return 60; + case joaat("WEAPON_SAWNOFFSHOTGUN"): return 16; + case joaat("WEAPON_PUMPSHOTGUN"): return 16; + case joaat("WEAPON_ASSAULTSHOTGUN"): return 16; + case joaat("WEAPON_ASSAULTRIFLE"): return 60; + case joaat("WEAPON_CARBINERIFLE"): return 60; + case joaat("WEAPON_ADVANCEDRIFLE"): return 60; + case joaat("WEAPON_SNIPERRIFLE"): return 20; + case joaat("WEAPON_HEAVYSNIPER"): return 12; + case joaat("WEAPON_MG"): return 108; + case joaat("WEAPON_COMBATMG"): return 200; + case joaat("WEAPON_RPG"): return 2; + case joaat("WEAPON_GRENADELAUNCHER"): return 20; + case joaat("WEAPON_GRENADELAUNCHER_SMOKE"): return 20; + case joaat("WEAPON_MINIGUN"): return 100; + case joaat("WEAPON_RAYCARBINE"): return 100; + case joaat("WEAPON_RAYMINIGUN"): return 100; + case joaat("WEAPON_APPISTOL"): return 36; + case joaat("WEAPON_COMBATPISTOL"): return 24; + case joaat("WEAPON_PISTOL"): return 24; + case joaat("WEAPON_PISTOL50"): return 48; + case joaat("WEAPON_SMOKEGRENADE"): return 1; + case joaat("WEAPON_GRENADE"): return 1; + case joaat("WEAPON_STICKYBOMB"): return 1; + case joaat("WEAPON_PROXMINE"): return 1; + case joaat("WEAPON_PIPEBOMB"): return 1; + case joaat("WEAPON_DOUBLEACTION"): return 12; + case joaat("WEAPON_SNSPISTOL"): return 24; + case joaat("WEAPON_HEAVYPISTOL"): return 72; + case joaat("WEAPON_VINTAGEPISTOL"): return 28; + case joaat("WEAPON_FLAREGUN"): return 2; + case joaat("WEAPON_REVOLVER"): return 24; + case joaat("WEAPON_MACHINEPISTOL"): return 48; + case joaat("WEAPON_COMPACTLAUNCHER"): return 2; + case joaat("WEAPON_HOMINGLAUNCHER"): return 2; + case joaat("WEAPON_CERAMICPISTOL"): return 48; + case joaat("WEAPON_MARKSMANRIFLE"): return 16; + case joaat("WEAPON_HEAVYSHOTGUN"): return 12; + case joaat("WEAPON_SPECIALCARBINE"): return 60; + case joaat("WEAPON_PUMPSHOTGUN_MK2"): return 16; + case joaat("WEAPON_COMBATPDW"): return 60; + case joaat("WEAPON_MINISMG"): return 40; + case joaat("WEAPON_RAINGUN"): return 1; + case joaat("WEAPON_FIREWORK"): return 2; + case joaat("WEAPON_GUSENBERG"): return 60; + case joaat("WEAPON_MILITARYRIFLE"): return 60; + case joaat("WEAPON_COMPACTRIFLE"): return 60; + case joaat("WEAPON_BULLPUPRIFLE"): return 60; + case joaat("WEAPON_AUTOSHOTGUN"): return 20; + case joaat("WEAPON_DBSHOTGUN"): return 4; + case joaat("WEAPON_MUSKET"): return 2; + case joaat("WEAPON_BULLPUPSHOTGUN"): return 16; + case joaat("WEAPON_NAVYREVOLVER"): return 1; + case joaat("WEAPON_MARKSMANPISTOL"): return 1; + + case joaat("WEAPON_ASSAULTRIFLE_MK2"): + { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_ASSAULTRIFLE_MK2_CLIP_ARMORPIERCING"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_ASSAULTRIFLE_MK2_CLIP_FMJ"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_ASSAULTRIFLE_MK2_CLIP_INCENDIARY"))) { + return 40; + } + } + + return 60; + } + + case joaat("WEAPON_PISTOL_MK2"): + { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_PISTOL_MK2_CLIP_FMJ"))) { + return 16; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_PISTOL_MK2_CLIP_HOLLOWPOINT"))) { + return 16; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_PISTOL_MK2_CLIP_INCENDIARY"))) { + return 16; + } + } + + return 24; + } + + case joaat("WEAPON_SMG_MK2"): + { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SMG_MK2_CLIP_FMJ"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SMG_MK2_CLIP_HOLLOWPOINT"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SMG_MK2_CLIP_INCENDIARY"))) { + return 40; + } + } + + return 60; + } + + case joaat("WEAPON_HEAVYSNIPER_MK2"): + { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_HEAVYSNIPER_MK2_CLIP_ARMORPIERCING"))) { + return 8; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_HEAVYSNIPER_MK2_CLIP_EXPLOSIVE"))) { + return 8; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_HEAVYSNIPER_MK2_CLIP_FMJ"))) { + return 8; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_HEAVYSNIPER_MK2_CLIP_INCENDIARY"))) { + return 8; + } + } + + return 12; + } + + case joaat("WEAPON_COMBATMG_MK2"): + { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_COMBATMG_MK2_CLIP_ARMORPIERCING"))) { + return 160; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_COMBATMG_MK2_CLIP_FMJ"))) { + return 160; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_COMBATMG_MK2_CLIP_INCENDIARY"))) { + return 160; + } + } + + return 200; + } + + case joaat("WEAPON_CARBINERIFLE_MK2"): + { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_CARBINERIFLE_MK2_CLIP_ARMORPIERCING"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_CARBINERIFLE_MK2_CLIP_FMJ"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_CARBINERIFLE_MK2_CLIP_INCENDIARY"))) { + return 40; + } + } + + return 60; + } + + case joaat("WEAPON_SPECIALCARBINE_MK2"): + { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SPECIALCARBINE_MK2_CLIP_ARMORPIERCING"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SPECIALCARBINE_MK2_CLIP_FMJ"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SPECIALCARBINE_MK2_CLIP_INCENDIARY"))) { + return 40; + } + } + + return 60; + } + + case joaat("WEAPON_SNSPISTOL_MK2"): { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SNSPISTOL_MK2_CLIP_FMJ"))) { + return 12; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SNSPISTOL_MK2_CLIP_HOLLOWPOINT"))) { + return 12; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SNSPISTOL_MK2_CLIP_INCENDIARY"))) { + return 12; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_SNSPISTOL_MK2_CLIP_TRACER"))) { + return 12; + } + } + + return 24; + } + + case joaat("WEAPON_MARKSMANRIFLE_MK2"): { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_MARKSMANRIFLE_MK2_CLIP_ARMORPIERCING"))) { + return 10; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_MARKSMANRIFLE_MK2_CLIP_FMJ"))) { + return 10; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_MARKSMANRIFLE_MK2_CLIP_INCENDIARY"))) { + return 10; + } + } + + return 16; + } + + case joaat("WEAPON_REVOLVER_MK2"): { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_REVOLVER_MK2_CLIP_FMJ"))) { + return 12; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_REVOLVER_MK2_CLIP_HOLLOWPOINT"))) { + return 12; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_REVOLVER_MK2_CLIP_INCENDIARY"))) { + return 12; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_REVOLVER_MK2_CLIP_TRACER"))) { + return 12; + } + } + + return 24; + } + + case joaat("WEAPON_BULLPUPRIFLE_MK2"): { + if (native::does_entity_exist(menu::player::get_local_player().m_ped) && !native::is_entity_dead(menu::player::get_local_player().m_ped, false)) { + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_BULLPUPRIFLE_MK2_CLIP_ARMORPIERCING"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_BULLPUPRIFLE_MK2_CLIP_FMJ"))) { + return 40; + } + if (native::has_ped_got_weapon_component(menu::player::get_local_player().m_ped, weapon, joaat("COMPONENT_BULLPUPRIFLE_MK2_CLIP_INCENDIARY"))) { + return 40; + } + } + + return 60; + } + } + + return 0; + } + + std::string get_transaction_name_for_weapon(uint32_t weapon_hash) { + char Var96[0x50]; + int iVar101 = 0; + int iVar100 = 0; + int iVar102 = 0; + + int iParam0 = (int)weapon_hash;//hash + + strncpy(Var96, scripts::func_229(iParam0, 0), 16); + scripts::func_228(iParam0, &iVar100, &iVar101); + + if (scripts::func_83() && (scripts::func_165() || scripts::func_164())) { + if ((iParam0 == joaat("WEAPON_HAMMER") || iParam0 == joaat("WEAPON_PISTOL50")) || iParam0 == joaat("WEAPON_BULLPUPSHOTGUN")) { + iVar101 = 1; + } + } + + if (scripts::func_83()) { + if (iParam0 == joaat("WEAPON_HATCHET")) { + iVar101 = 1; + } + } + + iVar102 = 0; + if (scripts::func_75(iParam0)) { + iVar102 = 1; + iVar101 = 2; + } + + char output[0x50]; + scripts::func_116(output, Var96, native::get_entity_model(menu::player::get_local_player().m_ped), 3, iVar100, iVar101, scripts::func_117(iParam0), -1, 0, 0); + return std::string(output); + } + + std::string get_transaction_name_for_weapon_ammo(uint32_t weapon_hash) { + if ((((weapon_hash == joaat("WEAPON_GRENADE") || weapon_hash == joaat("WEAPON_SMOKEGRENADE")) || weapon_hash == joaat("WEAPON_STICKYBOMB")) || weapon_hash == joaat("WEAPON_PROXMINE")) || weapon_hash == joaat("WEAPON_PIPEBOMB")) { + switch (weapon_hash) { + case joaat("WEAPON_GRENADE"): + return "WP_WT_GNADE_t2_v1"; + case joaat("WEAPON_SMOKEGRENADE"): + return "WP_WT_GNADE_SMK_t2_v1"; + case joaat("WEAPON_STICKYBOMB"): + return "WP_WT_GNADE_STK_t2_v1"; + case joaat("WEAPON_PROXMINE"): + return "WP_WT_PRXMINE_t2_v1"; + case joaat("WEAPON_PIPEBOMB"): + return "WP_WT_PIPEBOMB_t2_v1"; + } + } + + char output[0x50]; + char Var96[0x50]; + int hash = 0; + + scripts::func_227((int)weapon_hash, &hash); + scripts::func_226(hash, 2, Var96, 0); // Native::_GetLabelText(Var96) + scripts::func_116(output, Var96, native::get_entity_model(menu::player::get_local_player().m_ped), 3, 0, scripts::func_57((int)weapon_hash), scripts::func_117((int)weapon_hash), -1, 0, 0); + + return std::string(output); + } + + int get_weapon_price(std::string transaction_name) { + return native::network_shop_get_price((int)native::get_hash_key(transaction_name.c_str()), -1829708865, true); + } + + bool purchase_weapon(std::string transaction_name, std::string weapon_name, int price) { + if (rage::engine::process_basket_transaction(-1829708865, 537254313, 4, { { (int)native::get_hash_key(transaction_name.c_str()), -1, price, 1, 1 } })) { + purchase_weapon_menu* _this = purchase_weapon_menu::get(); + menu::notify::stacked(_this->get_string("Purchase Weapon"), util::va::va("%s %s %s%i", _this->get_string("Purchased").c_str(), weapon_name.c_str(), _this->get_string("for $").c_str(), price), global::ui::g_success); + return true; + } + + return false; + } + + int calculate_total_price() { + int total_price = 0; + + for (scroll_struct& weapon : global::lists::g_weapons) { + if (std::find(begin(blacklisted_submenu_weapons), end(blacklisted_submenu_weapons), weapon.m_result) != end(blacklisted_submenu_weapons)) { + std::string transaction_name = get_transaction_name_for_weapon_ammo(weapon.m_result); + if (!transaction_name.empty()) { + int price = get_weapon_price(transaction_name); + if (price > 0) { + int max_ammo = 0; + if (native::get_max_ammo(menu::player::get_local_player().m_ped, weapon.m_result, &max_ammo)) { + int current_ammo = native::get_ammo_in_ped_weapon(menu::player::get_local_player().m_ped, weapon.m_result); + if (current_ammo < max_ammo) { + total_price += (max_ammo - current_ammo) * price; + } + } + } + } + + continue; + } + + if (!native::has_ped_got_weapon(menu::player::get_local_player().m_ped, weapon.m_result, false)) { + std::string transaction_name = get_transaction_name_for_weapon(weapon.m_result); + if (!transaction_name.empty()) { + int price = get_weapon_price(transaction_name); + if (price > 0 || weapon.m_result == 0x7846a318) { + total_price += price; + } + } + } + } + + return total_price; + } + + void purchase_all_weapons() { + util::fiber::pool::add([] { + std::vector weapons; + + for (scroll_struct& weapon : global::lists::g_weapons) { + if (std::find(begin(blacklisted_submenu_weapons), end(blacklisted_submenu_weapons), weapon.m_result) != end(blacklisted_submenu_weapons)) { + std::string transaction_name = get_transaction_name_for_weapon_ammo(weapon.m_result); + if (!transaction_name.empty()) { + int price = get_weapon_price(transaction_name); + if (price > 0) { + int max_ammo = 0; + if (native::get_max_ammo(menu::player::get_local_player().m_ped, weapon.m_result, &max_ammo)) { + int current_ammo = native::get_ammo_in_ped_weapon(menu::player::get_local_player().m_ped, weapon.m_result); + if (current_ammo < max_ammo) { + weapons.push_back({ (int)native::get_hash_key(transaction_name.c_str()), -1, price, 1, max_ammo - current_ammo }); + native::add_ammo_to_ped(menu::player::get_local_player().m_ped, weapon.m_result, max_ammo - current_ammo); + } + } + } + } + + continue; + } + + if (!native::has_ped_got_weapon(menu::player::get_local_player().m_ped, weapon.m_result, false)) { + std::string transaction_name = get_transaction_name_for_weapon(weapon.m_result); + if (!transaction_name.empty()) { + int price = get_weapon_price(transaction_name); + if (price > 0 || weapon.m_result == 0x7846a318) { + weapons.push_back({ (int)native::get_hash_key(transaction_name.c_str()), -1, price, 1, 1 }); + native::give_weapon_to_ped(menu::player::get_local_player().m_ped, weapon.m_result, 1, false, true); + } + } + } + } + + if (weapons.size() > 71) { + while (weapons.size()) { + std::vector current; + + for (int i = 0; i < (weapons.size() >= 71 ? 71 : weapons.size()); i++) { + current.push_back(weapons[i]); + weapons.erase(weapons.begin() + i); + } + + rage::engine::process_basket_transaction(-1829708865, 537254313, 4, current); + } + } else rage::engine::process_basket_transaction(-1829708865, 537254313, 4, weapons); + + purchase_weapon_menu::get()->update_once(); + }); + } + + void handle(uint32_t weapon, std::string transaction_name, std::string name, int price) { + if (price != -1) { + if (std::find(begin(blacklisted_submenu_weapons), end(blacklisted_submenu_weapons), weapon) != end(blacklisted_submenu_weapons)) { + if (scripts::func_882((int)weapon)) { + return; + } + } + + if (purchase_weapon(transaction_name, name, price)) { + native::give_weapon_to_ped(menu::player::get_local_player().m_ped, weapon, 1, false, true); + purchase_weapon_menu::get()->update_once(); + } + + return; + } + } +} + +void purchase_weapon_menu::load() { + set_name("Purchase weapon"); + set_parent(); + + add_string("Purchased"); + add_string("for $"); + add_string("Total price: $"); + add_string("FREE"); + add_string("Purchase Weapon"); + + m_vars.m_button = add_option(button_option("Purchase All Weapons") + .add_translate().add_hotkey() + .add_click(purchase_all_weapons)); + + add_option(break_option("Weapons") + .add_translate()); +} + +void purchase_weapon_menu::update() {} + +void purchase_weapon_menu::update_once() { + m_vars.m_button->set_tooltip(get_string("Total price: $") + std::to_string(calculate_total_price())); + + clear_options(2); + + for (int i = 0; i < NUMOF(global::lists::g_weapons); i++) { + scroll_struct weapon = global::lists::g_weapons[i]; + if (std::find(begin(blacklisted_weapons), end(blacklisted_weapons), weapon.m_result) != end(blacklisted_weapons)) { + continue; + } + + if (std::find(begin(blacklisted_submenu_weapons), end(blacklisted_submenu_weapons), weapon.m_result) != end(blacklisted_submenu_weapons)) { + std::string transaction_name = get_transaction_name_for_weapon_ammo(weapon.m_result); + if (!transaction_name.empty()) { + int price = get_weapon_price(transaction_name); + if (price > 0) { + add_option(button_option(weapon.m_name.get()) + .add_click([=] { handle(weapon.m_result, transaction_name, global::lists::g_weapons[i].m_name.get(), price); }) + .add_side_text(scripts::func_882((int)weapon.m_result) ? "FULL" : "$" + std::to_string(price))); + } + } + + continue; + } else { + if (!native::has_ped_got_weapon(menu::player::get_local_player().m_ped, weapon.m_result, false)) { + std::string transaction_name = get_transaction_name_for_weapon(weapon.m_result); + if (!transaction_name.empty()) { + int price = get_weapon_price(transaction_name); + if (price > 0 || weapon.m_result == 0x7846a318) { + add_option(button_option(weapon.m_name.get()) + .add_click([=] { handle(weapon.m_result, transaction_name, global::lists::g_weapons[i].m_name.get(), price); }) + .add_side_text(price == 0 ? get_string("FREE") : "$" + std::to_string(price))); + } + } + + continue; + } + } + + add_option(button_option(weapon.m_name.get()) + .add_sprite({ "commonmenu", "shop_gunclub_icon" }) + .add_sprite_scale({ 0.02112f, 0.03744f })); + } +} + +void purchase_weapon_menu::feature_update() {} + +purchase_weapon_menu* g_instance; +purchase_weapon_menu* purchase_weapon_menu::get() { + if (g_instance == nullptr) { + g_instance = new purchase_weapon_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapon.h b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapon.h new file mode 100644 index 0000000..701f0b7 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapon.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class purchase_weapon_menu : public menu::submenu::submenu { +public: + static purchase_weapon_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + purchase_weapon_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::purchase::weapon::vars { + struct variables { + std::shared_ptr m_button; + }; + + namespace scripts { + const char* func_181(int iParam0, int iParam1); + void func_116(char* sParam0, const char* cParam1, uint32_t iParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10, bool bParam11, bool bParam12); + int func_57(int iParam0); + int func_117(int iParam0); + } + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapons.cpp b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapons.cpp new file mode 100644 index 0000000..0c6a8da --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapons.cpp @@ -0,0 +1,35 @@ +#include "purchase_weapons.h" +#include "menu/base/submenu_handler.h" +#include "purchase_weapon.h" +#include "purchase_attachment.h" +#include "../give_weapons_ammo.h" + +void purchase_weapons_menu::load() { + set_name("Purchase Weapons"); + set_parent(); + + add_option(submenu_option("Purchase Weapon") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Purchase Attachment") + .add_translate().add_hotkey() + .add_submenu()); +} + +void purchase_weapons_menu::update() {} + +void purchase_weapons_menu::update_once() {} + +void purchase_weapons_menu::feature_update() {} + +purchase_weapons_menu* g_instance; +purchase_weapons_menu* purchase_weapons_menu::get() { + if (g_instance == nullptr) { + g_instance = new purchase_weapons_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapons.h b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapons.h new file mode 100644 index 0000000..34c1704 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/purchase/purchase_weapons.h @@ -0,0 +1,15 @@ +#pragma once +#include "menu/base/submenu.h" + +class purchase_weapons_menu : public menu::submenu::submenu { +public: + static purchase_weapons_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + purchase_weapons_menu() + : menu::submenu::submenu() {} +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/triggerbot.cpp b/GTAV/src/menu/base/submenus/main/weapon/triggerbot.cpp new file mode 100644 index 0000000..2a6f715 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/triggerbot.cpp @@ -0,0 +1,68 @@ +#include "triggerbot.h" +#include "menu/base/submenu_handler.h" +#include "weapon_mods.h" +#include "menu/base/util/timers.h" +#include "global/lists.h" +#include "aimbot.h" + +using namespace weapon::triggerbot::vars; + +namespace weapon::triggerbot::vars { + variables m_vars; +} + +void triggerbot_menu::load() { + set_name("Triggerbot"); + set_parent(); + + add_option(toggle_option("Toggle Triggerbot") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_enable).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Aim Entity") + .add_translate() + .add_scroll(m_vars.m_aim_entity, 0, NUMOF(weapon::aimbot::vars::aim_entity), weapon::aimbot::vars::aim_entity).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Aim Tag") + .add_translate() + .add_scroll(m_vars.m_aim_tag, 0, NUMOF(global::lists::g_ped_bones), global::lists::g_ped_bones).add_savable(get_submenu_name_stack())); + + add_option(number_option(SCROLL, "Bullet Delay") + .add_translate() + .add_number(m_vars.m_delay, "%i", 20).add_min(0).add_max(2000).add_savable(get_submenu_name_stack())); +} + +void triggerbot_menu::update() {} + +void triggerbot_menu::update_once() {} + +void triggerbot_menu::feature_update() { + if (m_vars.m_enable) { + Entity aimed_entity = 0; + static int timer = 0; + + if (native::get_entity_player_is_free_aiming_at(menu::player::get_local_player().m_id, &aimed_entity)) { + if (!native::is_entity_a_ped(aimed_entity) || native::is_entity_dead(aimed_entity, 0)) return; + if (m_vars.m_aim_entity == 0 && !native::is_ped_a_player(aimed_entity)) return; + if (m_vars.m_aim_entity == 1 && native::is_ped_a_player(aimed_entity)) return; + + math::vector3 bone = native::get_ped_bone_coords(aimed_entity, global::lists::g_ped_bones[m_vars.m_aim_tag].m_result, 0.f, 0.f, 0.f); + if (!bone.is_null()) { + menu::timers::run_timed(&timer, m_vars.m_delay, [=] { + native::set_ped_shoots_at_coord(menu::player::get_local_player().m_ped, bone.x, bone.y, bone.z, true); + }); + } + } + } +} + +triggerbot_menu* g_instance; +triggerbot_menu* triggerbot_menu::get() { + if (g_instance == nullptr) { + g_instance = new triggerbot_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/triggerbot.h b/GTAV/src/menu/base/submenus/main/weapon/triggerbot.h new file mode 100644 index 0000000..0bb2b18 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/triggerbot.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class triggerbot_menu : public menu::submenu::submenu { +public: + static triggerbot_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + triggerbot_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::triggerbot::vars { + struct variables { + bool m_enable; + int m_delay = 100; + int m_aim_tag; + int m_aim_entity; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/weapon_disables.cpp b/GTAV/src/menu/base/submenus/main/weapon/weapon_disables.cpp new file mode 100644 index 0000000..d42b369 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/weapon_disables.cpp @@ -0,0 +1,231 @@ +#include "weapon_disables.h" +#include "menu/base/submenu_handler.h" +#include "weapon_mods.h" +#include "weapon_modifiers.h" + +using namespace weapon::disables::vars; + +namespace weapon::disables::vars { + variables m_vars; + + void disable_weapon_limits() { + if (m_vars.m_disable_vehicle_weapon_limits) m_vars.m_weapon_groups.clear(); + + uint64_t table = *(uint64_t*)global::vars::g_weapon_info.m_list; + if (table) { + for (int16_t i = 0; i < (*(int16_t*)global::vars::g_weapon_info.m_count) - 1; i++) { + rage::types::weapon_info* ptr = (rage::types::weapon_info*) * (uint64_t*)(table + (i * 8)); + if (ptr) { + if (!m_vars.m_disable_vehicle_weapon_limits) { + auto vit = std::find_if(m_vars.m_weapon_groups.begin(), m_vars.m_weapon_groups.end(), [=](std::pair& element) { + return element.first == ptr->m_name_hash; + }); + + if (vit != m_vars.m_weapon_groups.end()) { + ptr->m_group_hash = vit->second; + } + } else { + uint32_t weapon_groups[] = { + 0x18d5fa97, + 0xc6e9a5c5, + 0x39d5c192, + 0x451b04bc, + 0x33431399, + 0xb7bbd827, + 0xa27a4f9f, + 0x29268262, + 0xfdbf656c + }; + + for (uint32_t hash : weapon_groups) { + if (ptr->m_group_hash == hash) { + m_vars.m_weapon_groups.push_back({ ptr->m_name_hash, ptr->m_group_hash }); + ptr->m_group_hash = 0x18d5fa97; // set to a pistol + break; + } + } + } + } + } + } + } +} + +void weapon_disables_menu::load() { + set_name("Disables"); + set_parent(); + + add_option(toggle_option("Disable Vehicle Restrictions") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_vehicle_weapon_limits) + .add_click(disable_weapon_limits).add_savable(get_submenu_name_stack()) + .add_tooltip("Disables not being able to use any weapon in vehicles")); + + add_option(toggle_option("Disable Passive Restrictions") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_passive_weapons).add_savable(get_submenu_name_stack()) + .add_tooltip("Allows you to use weapons while in passive")); + + add_option(toggle_option("Disable Interior Restrictions") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_interior_weapons).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Orbital Cooldown") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_orbital_cooldown).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Disable Spread") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_spread).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_disable_spread) { + if (weapon::modifiers::vars::get_weapon_info()) { + if (m_vars.m_original_spread.find(weapon::modifiers::vars::get_weapon_info()) != m_vars.m_original_spread.end()) { + weapon::modifiers::vars::get_weapon_info()->m_batch_spread = m_vars.m_original_spread[weapon::modifiers::vars::get_weapon_info()].first; + weapon::modifiers::vars::get_weapon_info()->m_accuracy_spread = m_vars.m_original_spread[weapon::modifiers::vars::get_weapon_info()].second; + } + } + } + })); + + add_option(toggle_option("Disable Recoil") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_recoil).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_disable_recoil) { + if (weapon::modifiers::vars::get_weapon_info()) { + if (m_vars.m_original_recoil.find(weapon::modifiers::vars::get_weapon_info()) != m_vars.m_original_recoil.end()) { + weapon::modifiers::vars::get_weapon_info()->m_recoil_shake_amptitude = m_vars.m_original_recoil[weapon::modifiers::vars::get_weapon_info()]; + } + } + } + })); + + add_option(toggle_option("Disable Cooldown") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_cooldown).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_disable_cooldown) { + if (weapon::modifiers::vars::get_weapon_info()) { + if (m_vars.m_original_time_between_shots.find(weapon::modifiers::vars::get_weapon_info()) != m_vars.m_original_time_between_shots.end()) { + weapon::modifiers::vars::get_weapon_info()->m_time_between_shots = m_vars.m_original_time_between_shots[weapon::modifiers::vars::get_weapon_info()]; + } + } + } + })); + + add_option(toggle_option("Disable Spin Time") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_spin).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_disable_spin) { + if (weapon::modifiers::vars::get_weapon_info()) { + if (m_vars.m_original_instant_spin.find(weapon::modifiers::vars::get_weapon_info()) != m_vars.m_original_instant_spin.end()) { + weapon::modifiers::vars::get_weapon_info()->m_spin_up_time = m_vars.m_original_instant_spin[weapon::modifiers::vars::get_weapon_info()].first; + weapon::modifiers::vars::get_weapon_info()->m_spin_down_time = m_vars.m_original_instant_spin[weapon::modifiers::vars::get_weapon_info()].second; + } + } + } + })); + + add_option(toggle_option("Disable Reload Anim") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_instant_reload).add_savable(get_submenu_name_stack()) + .add_click([] { + if (!m_vars.m_instant_reload) { + if (weapon::modifiers::vars::get_weapon_info()) { + if (m_vars.m_original_anim_reload_rate.find(weapon::modifiers::vars::get_weapon_info()) != m_vars.m_original_anim_reload_rate.end()) { + weapon::modifiers::vars::get_weapon_info()->m_anim_reload_rate = m_vars.m_original_anim_reload_rate[weapon::modifiers::vars::get_weapon_info()]; + } + } + } + })); +} + +void weapon_disables_menu::update() {} + +void weapon_disables_menu::update_once() {} + +void weapon_disables_menu::feature_update() { + if (menu::player::get_local_player().m_has_weapon_in_hand) { + if (m_vars.m_instant_reload) { + rage::types::weapon_info* weapon_info = weapon::modifiers::vars::get_weapon_info(); + if (weapon_info) { + if (weapon_info->m_name_hash != 0xb1ca77b1 + && weapon_info->m_name_hash != 0x7f7497e5 + && weapon_info->m_name_hash != 0x63ab0442) { + if (m_vars.m_original_anim_reload_rate.find(weapon::modifiers::vars::get_weapon_info()) == m_vars.m_original_anim_reload_rate.end()) { + m_vars.m_original_anim_reload_rate[weapon_info] = weapon_info->m_anim_reload_rate; + } + + weapon_info->m_anim_reload_rate = 100.f; + } + } + } + + if (m_vars.m_disable_spread) { + rage::types::weapon_info* weapon_info = weapon::modifiers::vars::get_weapon_info(); + if (weapon_info) { + if (m_vars.m_original_spread.find(weapon::modifiers::vars::get_weapon_info()) == m_vars.m_original_spread.end()) { + m_vars.m_original_spread[weapon_info].first = weapon_info->m_batch_spread; + m_vars.m_original_spread[weapon_info].second = weapon_info->m_accuracy_spread; + } + + weapon_info->m_batch_spread = 0.f; + weapon_info->m_accuracy_spread = 0.f; + } + } + + if (m_vars.m_disable_recoil) { + rage::types::weapon_info* weapon_info = weapon::modifiers::vars::get_weapon_info(); + if (weapon_info) { + if (m_vars.m_original_recoil.find(weapon::modifiers::vars::get_weapon_info()) == m_vars.m_original_recoil.end()) { + m_vars.m_original_recoil[weapon_info] = weapon_info->m_recoil_shake_amptitude; + } + + weapon_info->m_recoil_shake_amptitude = 0.f; + } + } + + if (m_vars.m_disable_cooldown) { + if (menu::player::get_local_player().m_weapon_hash == 0x6d544c99 + || menu::player::get_local_player().m_weapon_hash == 0xaf3696a1 + || menu::player::get_local_player().m_weapon_hash == 0x3656c8c1) { + rage::types::weapon_info* weapon_info = weapon::modifiers::vars::get_weapon_info(); + if (weapon_info) { + if (m_vars.m_original_time_between_shots.find(weapon::modifiers::vars::get_weapon_info()) == m_vars.m_original_time_between_shots.end()) { + m_vars.m_original_time_between_shots[weapon_info] = weapon_info->m_time_between_shots; + } + + weapon_info->m_time_between_shots = 0.f; + } + } + } + + if (m_vars.m_disable_spin) { + if (menu::player::get_local_player().m_weapon_hash == 0x42bf8a85) { + rage::types::weapon_info* weapon_info = weapon::modifiers::vars::get_weapon_info(); + if (weapon_info) { + if (m_vars.m_original_instant_spin.find(weapon::modifiers::vars::get_weapon_info()) == m_vars.m_original_instant_spin.end()) { + m_vars.m_original_instant_spin[weapon_info].first = weapon_info->m_spin_up_time; + m_vars.m_original_instant_spin[weapon_info].second = weapon_info->m_spin_down_time; + } + + weapon_info->m_spin_up_time = 0.f; + weapon_info->m_spin_down_time = 0.f; + } + } + } + } +} + +weapon_disables_menu* g_instance; +weapon_disables_menu* weapon_disables_menu::get() { + if (g_instance == nullptr) { + g_instance = new weapon_disables_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/weapon_disables.h b/GTAV/src/menu/base/submenus/main/weapon/weapon_disables.h new file mode 100644 index 0000000..69e720c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/weapon_disables.h @@ -0,0 +1,38 @@ +#pragma once +#include "menu/base/submenu.h" + +class weapon_disables_menu : public menu::submenu::submenu { +public: + static weapon_disables_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + weapon_disables_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::disables::vars { + struct variables { + bool m_disable_vehicle_weapon_limits; + bool m_passive_weapons; + bool m_interior_weapons; + bool m_disable_orbital_cooldown; + bool m_disable_spread; + bool m_disable_spin; + bool m_disable_recoil; + bool m_disable_cooldown; + bool m_instant_reload; + + std::unordered_map m_original_anim_reload_rate; + std::unordered_map> m_original_spread; + std::unordered_map m_original_recoil; + std::unordered_map m_original_time_between_shots; + std::unordered_map> m_original_instant_spin; + std::vector> m_weapon_groups; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/weapon_modifiers.cpp b/GTAV/src/menu/base/submenus/main/weapon/weapon_modifiers.cpp new file mode 100644 index 0000000..4671567 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/weapon_modifiers.cpp @@ -0,0 +1,58 @@ +#include "weapon_modifiers.h" +#include "menu/base/submenu_handler.h" +#include "weapon_mods.h" +#include "modifiers/weapon_multipliers.h" +#include "modifiers/weapon_matrix.h" +#include "modifiers/ammo/ammo_modifier.h" + +using namespace weapon::modifiers::vars; + +namespace weapon::modifiers::vars { + variables m_vars; + + rage::types::weapon_info* get_weapon_info() { + rage::types::ped* ped = global::vars::g_ped_factory->m_local_ped; + if (ped) { + rage::types::ped_weapon_manager* weapon_manager = ped->m_ped_weapon_manager; + if (weapon_manager) { + return weapon_manager->m_weapon_info; + } + } + + return nullptr; + } +} + +void weapon_modifiers_menu::load() { + set_name("Modifiers"); + set_parent(); + + add_option(submenu_option("Ammo") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Multipliers") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Matrix") + .add_translate().add_hotkey() + .add_submenu()); +} + +void weapon_modifiers_menu::update() {} + +void weapon_modifiers_menu::update_once() {} + +void weapon_modifiers_menu::feature_update() {} + +weapon_modifiers_menu* g_instance; +weapon_modifiers_menu* weapon_modifiers_menu::get() { + if (g_instance == nullptr) { + g_instance = new weapon_modifiers_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/weapon_modifiers.h b/GTAV/src/menu/base/submenus/main/weapon/weapon_modifiers.h new file mode 100644 index 0000000..9e55983 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/weapon_modifiers.h @@ -0,0 +1,22 @@ +#pragma once +#include "menu/base/submenu.h" + +class weapon_modifiers_menu : public menu::submenu::submenu { +public: + static weapon_modifiers_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + weapon_modifiers_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::modifiers::vars { + struct variables {}; + + rage::types::weapon_info* get_weapon_info(); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/weapon/weapon_mods.cpp b/GTAV/src/menu/base/submenus/main/weapon/weapon_mods.cpp new file mode 100644 index 0000000..9e93187 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/weapon_mods.cpp @@ -0,0 +1,572 @@ +#include "weapon_mods.h" +#include "menu/base/submenu_handler.h" +#include "../../main.h" +#include "util/log.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "menu/base/util/timers.h" +#include "menu/base/util/raycast.h" +#include "menu/base/submenus/main/player/movement.h" +#include "menu/base/util/camera.h" +#include "menu/base/util/control.h" +#include "explosions/explosion_editor.h" +#include "explosions/explosion_gun.h" +#include "aimbot.h" +#include "weapon_modifiers.h" +#include "entity_gun.h" +#include "particle_gun.h" +#include "gravity_gun.h" +#include "weapon_disables.h" +#include "give_weapons_ammo.h" + +using namespace weapon::mods::vars; + +namespace weapon::mods::vars { + variables m_vars; + + scroll_struct targeting_mode[] = { + { localization("Traditional", true), 0, }, + { localization("Free Aim", true), 1, }, + { localization("Assisted Aim", true), 2, }, + { localization("Assisted Aim - Full", true), 3 }, + { localization("Assisted Aim - Partial", true), 4 } + }; +} + +void weapon_mods_menu::load() { + set_name("Weapon"); + set_parent(); + + add_option(submenu_option("Give Weapons and Ammo") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Aim Assist") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Modifiers") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Explosion Editor") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Explosion Gun") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Entity Gun") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Particle Gun") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Gravity Gun") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Disables") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Infinite Ammo") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_infinite_ammo) + .add_click([] { if (!m_vars.m_infinite_ammo) native::set_ped_infinite_ammo_clip(menu::player::get_local_player().m_ped, false); }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Instant Kill") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_instant_kill).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Rapid Fire") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rapid_fire).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Laser Sight") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_laser_sight).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Explosive Bullets") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_explosive_ammo).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Incendiary Bullets") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_incendiary_ammo).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Delete Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_delete_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Force Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_force_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Teleport Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_teleport_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Airstrike Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_airstrike_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Defibrillator Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_defibrillator_gun) + .add_click([] { if (m_vars.m_defibrillator_gun) native::give_weapon_to_ped(menu::player::get_local_player().m_ped, 0x3656c8c1, -1, true, true); }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Money Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_money_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Clown Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_clown_gun) + .add_click([] { + if (m_vars.m_clown_gun) { + native::request_named_ptfx_asset("scr_rcbarry2"); + native::use_particle_fx_asset_next_call("scr_rcbarry2"); + native::start_particle_fx_looped_at_coord("scr_clown_death", menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, 0, 0, 0, 0, true, true, true, true); + } else { + native::enable_clown_blood_vfx(false); + } + }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Shrink Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_shrink_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Dead Eye Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_deadeye_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Rope Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_rope_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Vehicle Stealer Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_vehicle_stealer_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Valkyrie Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_valkyrie_gun).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Hash Gun") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_hash_gun).add_savable(get_submenu_name_stack())); + + add_option(scroll_option(SCROLL, "Targeting Mode") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_targeting_mode, 0, NUMOF(targeting_mode), targeting_mode) + .add_click([] { native::set_player_targeting_mode(m_vars.m_targeting_mode); }).add_savable(get_submenu_name_stack())); + + add_option(button_option("Remove Weapons") + .add_translate().add_hotkey() + .add_click([] { native::remove_all_ped_weapons(menu::player::get_local_player().m_ped, true); })); +} + +void weapon_mods_menu::update() {} + +void weapon_mods_menu::update_once() { + m_vars.m_targeting_mode = native::_0xDFFA5BE8381C3314(); +} + +void weapon_mods_menu::feature_update() { + if (menu::player::get_local_player().m_has_weapon_in_hand) { + if (m_vars.m_hash_gun) { + static int timer = 0; + menu::timers::run_timed(&timer, 250, [] { + if (menu::player::get_local_player().m_is_aiming) { + menu::raycast cast = menu::raycast_infront(999.f); + if (cast.hit_something() && cast.hit_entity()) { + uint32_t model = native::get_entity_model(cast.get_entity()); + LOG_CUSTOM("Hash Gun", "Hash: %X (%u)", model, model); + } + } + }); + } + + if (m_vars.m_infinite_ammo) { + native::set_ped_infinite_ammo_clip(menu::player::get_local_player().m_ped, true); + } + + if (m_vars.m_instant_kill) { + native::set_player_melee_weapon_damage_modifier(menu::player::get_local_player().m_id, 99999.f, 1); + native::set_player_weapon_damage_modifier(menu::player::get_local_player().m_id, 99999.f); + } + + + if (m_vars.m_rapid_fire && !player::movement::vars::m_vars.m_no_clip_bind) { + if (!menu::player::get_local_player().m_in_vehicle) { + if (native::is_control_pressed(0, ControlAttack)) { + math::vector3 start = native::get_gameplay_cam_coord() + (menu::camera::get_direction()); + math::vector3 end = native::get_gameplay_cam_coord() + (menu::camera::get_direction() * 200.f); + native::shoot_single_bullet_between_coords_ignore_entity(start.x, start.y, start.z, end.x, end.y, end.z, native::get_weapon_damage_type(menu::player::get_local_player().m_weapon_hash), true, menu::player::get_local_player().m_weapon_hash, menu::player::get_local_player().m_ped, true, false, 500.0f, menu::player::get_local_player().m_entity, 0); + } + } + } + + if (m_vars.m_laser_sight) { + if (!menu::player::get_local_player().m_in_vehicle) { + if (menu::player::get_local_player().m_is_aiming) { + math::vector3 start_point = native::get_world_position_of_entity_bone(menu::player::get_local_player().m_ped, native::get_ped_bone_index(menu::player::get_local_player().m_ped, 0x6f06)); + math::vector3 updated_coords = { 0.0f, 200.0f, (native::tan(native::get_gameplay_cam_relative_pitch()) * 200.0f) }; + math::vector3 end_point = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_ped, updated_coords.x, updated_coords.y, updated_coords.z); + native::draw_line(start_point.x, start_point.y, start_point.z, end_point.x, end_point.y, end_point.z, 255, 0, 0, 255); + } + } + } + + if (m_vars.m_explosive_ammo) { + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_player_info) { + global::vars::g_ped_factory->m_local_ped->m_player_info->m_frame_flags |= 0x800; + } + } + } + } + + if (m_vars.m_incendiary_ammo) { + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_player_info) { + global::vars::g_ped_factory->m_local_ped->m_player_info->m_frame_flags |= 0x1000; + } + } + } + } + + if (m_vars.m_delete_gun) { + Entity entity; + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + if (native::get_entity_player_is_free_aiming_at(menu::player::get_local_player().m_id, &entity)) { + if (native::is_entity_a_ped(entity)) { + entity = native::is_ped_in_any_vehicle(entity, true) ? native::get_vehicle_ped_is_in(entity, false) : entity; + } + + if (native::does_entity_exist(entity)) { + menu::control::request_control(entity, [](Entity ent) { + native::set_entity_as_mission_entity(ent, true, true); + native::delete_entity(&ent); + }); + } + } + } + } + + if (m_vars.m_force_gun) { + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + menu::raycast cast = menu::raycast_infront(99999.0f); + if (cast.hit_entity()) { + menu::control::request_control(cast.get_entity(), [](Entity ent) { + math::vector3 velocity = ((menu::player::get_local_player().m_coords + (menu::camera::get_direction() * 9999.f)) - native::get_entity_coords(ent, false)) * 4.f; + native::set_entity_velocity(ent, velocity.x, velocity.y, velocity.z); + }, false); + } + } + } + + if (m_vars.m_teleport_gun) { + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + menu::raycast cast = menu::raycast_infront(99999.0f); + if (!cast.get_coords().is_null() && cast.get_coords().get_distance(menu::player::get_local_player().m_coords) > 3.5f) { + native::set_entity_coords(menu::player::get_local_player().m_entity, cast.get_coords().x, cast.get_coords().y, cast.get_coords().z, true, true, true, false); + } + } + } + + if (m_vars.m_airstrike_gun) { + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + menu::raycast cast = menu::raycast_infront(99999.0f); + if (!cast.get_coords().is_null() && cast.get_coords().get_distance(menu::player::get_local_player().m_coords) > 3.5f) { + menu::control::simple_request_weapon(0x47757124); + menu::control::simple_request_weapon(0xf8a3939f); + + math::vector3 hit_coords = cast.get_coords(); + native::shoot_single_bullet_between_coords_ignore_entity(hit_coords.x, hit_coords.y, hit_coords.z, hit_coords.x, hit_coords.y, hit_coords.z, native::get_weapon_damage_type(0x47757124), true, 0x47757124, menu::player::get_local_player().m_ped, true, false, 500.0f, menu::player::get_local_player().m_entity, 0); + native::shoot_single_bullet_between_coords_ignore_entity(hit_coords.x, hit_coords.y, hit_coords.z + 60.0f, hit_coords.x, hit_coords.y, hit_coords.z, native::get_weapon_damage_type(0xf8a3939f), true, 0xf8a3939f, menu::player::get_local_player().m_ped, true, false, 500.0f, menu::player::get_local_player().m_entity, 0); + } + } + } + + if (m_vars.m_defibrillator_gun) { + if (menu::player::get_local_player().m_weapon_hash == 0x3656c8c1) { + Entity aimed; + if (native::get_entity_player_is_free_aiming_at(menu::player::get_local_player().m_id, &aimed)) { + if (native::is_entity_a_ped(aimed) && native::is_entity_dead(aimed, 0)) { + native::resurrect_ped(aimed); + native::revive_injured_ped(aimed); + native::set_entity_health(aimed, 100); + } + } + } + } + + if (m_vars.m_money_gun) { + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + menu::raycast cast = menu::raycast_infront(99999.0f); + if (!cast.get_coords().is_null()) { + menu::control::simple_request_model(0x113fd533); + + math::vector3 hit_coords = cast.get_coords(); + native::create_ambient_pickup(0x1e9a99f8, hit_coords.x, hit_coords.y, hit_coords.z, 1, 2500, 0x113fd533, 1, 1); + } + } + } + + if (m_vars.m_clown_gun) { + native::enable_clown_blood_vfx(true); + } + + if (m_vars.m_shrink_gun) { + Entity aimed; + if (native::get_entity_player_is_free_aiming_at(menu::player::get_local_player().m_id, &aimed)) { + if (native::is_entity_a_ped(aimed)) { + native::set_ped_config_flag(aimed, 223, true); + } + } + } + + if (m_vars.m_deadeye_gun) { + if (!m_vars.m_deadeye_gun_internal) { + if (m_vars.m_deadeye_gun_timeout) { + m_vars.m_deadeye_gun_timeout_timer.start(2500); + if (m_vars.m_deadeye_gun_timeout_timer.is_ready()) { + m_vars.m_deadeye_gun_timeout_timer.reset(); + m_vars.m_deadeye_gun_timeout = false; + } + } + + if (menu::player::get_local_player().m_is_aiming) { + if (!m_vars.m_deadeye_gun_timeout) { + m_vars.m_deadeye_gun_internal = true; + } + } + } + + if (m_vars.m_deadeye_gun_internal) { + m_vars.m_deadeye_gun_timer.start(5000); + + if (!m_vars.m_deadeye_gun_peds.empty()) { + for (Ped ped : m_vars.m_deadeye_gun_peds) { + if (native::does_entity_exist(ped)) { + native::add_entity_icon(ped, "MP_Arrow"); + native::set_entity_icon_color(ped, 255, 0, 0, 255); + } + } + } + + if (!m_vars.m_deadeye_gun_timer.is_ready() && menu::player::get_local_player().m_is_aiming) { + native::start_screen_effect("explosionjosh3", -1, true); + native::set_time_scale(0.35f); + + Entity entity = 0; + if (native::get_entity_player_is_free_aiming_at(menu::player::get_local_player().m_id, &entity)) { + if (native::does_entity_exist(entity)) { + if (native::is_entity_a_vehicle(entity)) { + if (native::does_entity_exist(native::get_ped_in_vehicle_seat(entity, -1, 0))) { + entity = native::get_ped_in_vehicle_seat(entity, -1, 0); + } + } + + if (native::is_entity_a_ped(entity)) { + if (!native::is_ped_dead_or_dying(entity, true)) { + if (std::find(begin(m_vars.m_deadeye_gun_peds), end(m_vars.m_deadeye_gun_peds), entity) == end(m_vars.m_deadeye_gun_peds)) { + m_vars.m_deadeye_gun_peds.push_back(entity); + } + + native::set_timecycle_modifier("death"); + } + } + } + } + } else { + for (Ped ped : m_vars.m_deadeye_gun_peds) { + if (native::does_entity_exist(ped)) { + math::vector3 coords = native::get_entity_coords(ped, true); + native::add_explosion(coords.x, coords.y, coords.z, 1, FLT_MAX, true, false, 1.f, false); + } + } + + native::stop_screen_effect("explosionjosh3"); + native::clear_timecycle_modifier(); + native::set_time_scale(1.f); + + m_vars.m_deadeye_gun_timeout = true; + m_vars.m_deadeye_gun_timer.reset(); + m_vars.m_deadeye_gun_peds.clear(); + m_vars.m_deadeye_gun_internal = false; + } + } + } + + if (m_vars.m_rope_gun) { + Entity ent; + math::vector3 my_coords = menu::player::get_local_player().m_coords; + + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + if (!native::does_entity_exist(m_vars.m_rope_gun_entities[0]) && !native::does_entity_exist(m_vars.m_rope_gun_entities[1])) { + if (native::get_entity_player_is_free_aiming_at(menu::player::get_local_player().m_id, &ent)) { + m_vars.m_rope_gun_entities[0] = native::is_ped_in_any_vehicle(ent, true) ? ent = native::get_vehicle_ped_is_in(ent, false) : ent; + + math::vector3 entity_coords = native::get_entity_coords(m_vars.m_rope_gun_entities[0], true); + float rope_length = native::get_distance_between_coords(my_coords.x, my_coords.y, my_coords.z, entity_coords.x, entity_coords.y, entity_coords.z, true); + + m_vars.m_rope_gun_object = native::add_rope(my_coords.x, my_coords.y, my_coords.z, 0.f, 0.f, 0.f, rope_length, 4, rope_length, 0.5f, 0.5f, false, false, true, 1.f, false, 0); + native::rope_load_textures(); + native::activate_physics(m_vars.m_rope_gun_object); + } + } else { + if (native::does_entity_exist(m_vars.m_rope_gun_entities[0]) && !native::does_entity_exist(m_vars.m_rope_gun_entities[1])) { + if (native::get_entity_player_is_free_aiming_at(menu::player::get_local_player().m_id, &ent)) { + m_vars.m_rope_gun_entities[1] = native::is_ped_in_any_vehicle(ent, true) ? ent = native::get_vehicle_ped_is_in(ent, false) : ent; + + math::vector3 entity_coords = native::get_entity_coords(m_vars.m_rope_gun_entities[0], true); + menu::raycast cast = menu::raycast_infront(100.f); + if (!cast.get_coords().is_null()) { + native::attach_entities_to_rope(m_vars.m_rope_gun_object, m_vars.m_rope_gun_entities[0], m_vars.m_rope_gun_entities[1], entity_coords.x, entity_coords.y, entity_coords.z, cast.get_coords().x, cast.get_coords().y, cast.get_coords().z, native::get_distance_between_coords(entity_coords.x, entity_coords.y, entity_coords.z, cast.get_coords().x, cast.get_coords().y, cast.get_coords().z, true), 0, 0, 0, 0); + native::pin_rope_vertex(m_vars.m_rope_gun_object, native::get_rope_vertex_count(m_vars.m_rope_gun_object) - 1, cast.get_coords().x, cast.get_coords().y, cast.get_coords().z); + m_vars.m_rope_gun_entities[0] = 0; + m_vars.m_rope_gun_entities[1] = 0; + } + } + } + } + } + + if (native::does_entity_exist(m_vars.m_rope_gun_entities[0]) && !native::does_entity_exist(m_vars.m_rope_gun_entities[1])) { + math::vector3 right_hand = native::get_ped_bone_coords(menu::player::get_local_player().m_ped, 6286, 0, 0, 0); + math::vector3 entity_coords = native::get_entity_coords(m_vars.m_rope_gun_entities[0], true); + native::pin_rope_vertex(m_vars.m_rope_gun_object, 0, right_hand.x, right_hand.y, right_hand.z); + native::pin_rope_vertex(m_vars.m_rope_gun_object, native::get_rope_vertex_count(m_vars.m_rope_gun_object) - 1, entity_coords.x, entity_coords.y, entity_coords.z); + } + } + + if (m_vars.m_vehicle_stealer_gun) { + if (menu::player::get_local_player().m_in_vehicle) { + if (native::is_this_model_a_heli(menu::player::get_local_player().m_vehicle)) { + if (native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, -1, 0) == menu::player::get_local_player().m_ped) { + return; + } + } + } + + Entity ent; + if (native::get_entity_player_is_free_aiming_at(menu::player::get_local_player().m_id, &ent)) { + if (native::is_entity_a_vehicle(ent) || (native::is_entity_a_ped(ent) && native::is_ped_in_any_vehicle(ent, true))) { + if (native::is_ped_shooting(menu::player::get_local_player().m_ped)) { + bool was_player = false; + + if (native::is_entity_a_ped(ent)) { + Ped p = native::get_ped_in_vehicle_seat(native::get_vehicle_ped_is_in(ent, false), -1, 1); + if (native::does_entity_exist(p)) { + ent = native::get_vehicle_ped_is_in(ent, false); + + if (native::is_ped_a_player(p)) { + // do the nasty + was_player = true; + menu::control::request_control(ent, [](Entity) {}, true); + } + } + } + + if (!was_player) { + menu::control::simple_request_control(ent); + native::clear_ped_tasks_immediately(native::get_ped_in_vehicle_seat(ent, -1, 1)); + native::set_ped_into_vehicle(menu::player::get_local_player().m_ped, ent, -1); + native::set_vehicle_engine_on(ent, true, true, false); + } else { + util::fiber::pool::add([=] { + util::fiber::sleep(500); + native::set_ped_into_vehicle(menu::player::get_local_player().m_ped, ent, -1); + native::set_vehicle_engine_on(ent, true, true, false); + }); + } + } + } + } + } + + if (m_vars.m_valkyrie_gun) { + uint32_t rocket_hash = joaat("prop_ld_bomb_01_open"); + if (!native::has_model_loaded(rocket_hash)) { // temp + native::request_model(rocket_hash); + } + + if (native::is_ped_shooting(menu::player::get_local_player().m_ped) && !m_vars.m_valkryie_running) { + math::vector3 spawn_position = native::get_offset_from_entity_in_world_coords(menu::player::get_local_player().m_ped, 0.f, 2.f, 0.f); + m_vars.m_valkyrie_object = native::create_object(rocket_hash, spawn_position.x, spawn_position.y, spawn_position.z, true, true, false); + if (native::does_entity_exist(m_vars.m_valkyrie_object)) { + math::vector3 rotation = menu::player::get_local_player().m_rotation; + native::set_entity_rotation(m_vars.m_valkyrie_object, rotation.x, rotation.y, rotation.z, 2, true); + + m_vars.m_valkyrie_cam = native::create_cam_with_params("default_scripted_camera", spawn_position.x, spawn_position.y, spawn_position.z, rotation.x, rotation.y, rotation.z, 60.f, true, 2); + native::attach_cam_to_entity(m_vars.m_valkyrie_cam, m_vars.m_valkyrie_object, 0.f, 1.f, 0.f, true); + native::set_cam_active(m_vars.m_valkyrie_cam, true); + native::render_script_cams(true, false, 1000, true, false, 0); + + m_vars.m_valkyrie_timer = native::get_game_timer() + 10000; + m_vars.m_valkryie_running = true; + } + } + + if (m_vars.m_valkryie_running) { + float height = (m_vars.m_valkyrie_timer - native::get_game_timer()) / 20000.0f; + color_rgba col; + + if (height > 0.4f) { + col = color_rgba(0, 255, 0); + } else if (height <= 0.4f && height > 0.3f) { + col = color_rgba(255, 255, 0); + } else if (height <= 0.3f && height > 0.2f) { + col = color_rgba(255, 119, 0); + } else if (height <= 0.2f) { + col = color_rgba(255, 0, 0); + } + + menu::renderer::draw_rect({ 0.18f, 0.3f }, { 0.01f, 0.5f }, color_rgba(255, 255, 255, 150)); + menu::renderer::draw_rect({ 0.18f, 0.3f + (0.5f - height) }, { 0.01f, height }, col); + + math::vector3 gameplay_rotation = native::get_gameplay_cam_rot(2); + native::set_cam_rot(m_vars.m_valkyrie_cam, gameplay_rotation.x, gameplay_rotation.y, gameplay_rotation.z, 2); + + math::vector3 coords = native::get_offset_from_entity_in_world_coords(m_vars.m_valkyrie_object, 0.f, 0.4f, 0.f); + native::set_entity_coords(m_vars.m_valkyrie_object, coords.x, coords.y, coords.z, false, false, false, false); + + native::set_entity_rotation(m_vars.m_valkyrie_object, gameplay_rotation.x, gameplay_rotation.y, gameplay_rotation.z, 2, true); + + menu::raycast cast = menu::raycast_infront(25.f, native::get_cam_coord(m_vars.m_valkyrie_cam)); + if (native::get_game_timer() >= m_vars.m_valkyrie_timer || (!cast.get_coords().is_null() && cast.get_coords().get_distance(native::get_cam_coord(m_vars.m_valkyrie_cam)) < 3.f)) { + m_vars.m_valkryie_running = false; + + math::vector3 cam_coords = native::get_cam_coord(m_vars.m_valkyrie_cam); + native::add_owned_explosion(menu::player::get_local_player().m_ped, cam_coords.x, cam_coords.y, cam_coords.z, 27, 2.f, true, false, 0.5f); + + native::set_entity_as_mission_entity(m_vars.m_valkyrie_object, false, true); + native::delete_entity(&m_vars.m_valkyrie_object); + native::render_script_cams(false, false, 1000, true, false, 0); + native::destroy_cam(m_vars.m_valkyrie_cam, true); + } + } + + + } + } +} + +weapon_mods_menu* g_instance; +weapon_mods_menu* weapon_mods_menu::get() { + if (g_instance == nullptr) { + g_instance = new weapon_mods_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/weapon/weapon_mods.h b/GTAV/src/menu/base/submenus/main/weapon/weapon_mods.h new file mode 100644 index 0000000..c3211a0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/weapon/weapon_mods.h @@ -0,0 +1,60 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/timers.h" + +class weapon_mods_menu : public menu::submenu::submenu { +public: + static weapon_mods_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + weapon_mods_menu() + : menu::submenu::submenu() {} +}; + +namespace weapon::mods::vars { + struct variables { + bool m_infinite_ammo; + bool m_instant_kill; + bool m_rapid_fire; + bool m_laser_sight; + bool m_explosive_ammo; + bool m_incendiary_ammo; + bool m_delete_gun; + bool m_force_gun; + bool m_teleport_gun; + bool m_airstrike_gun; + bool m_defibrillator_gun; + bool m_money_gun; + bool m_clown_gun; + bool m_shrink_gun; + bool m_deadeye_gun; + bool m_deadeye_gun_internal; + bool m_deadeye_gun_timeout; + bool m_rope_gun; + bool m_vehicle_stealer_gun; + bool m_hash_gun; + bool m_valkyrie_gun; + bool m_valkryie_running; + + Object m_valkyrie_object; + Cam m_valkyrie_cam; + + int m_valkyrie_timer = 0; + int m_targeting_mode; + + std::vector> m_weapon_groups; + + Entity m_rope_gun_entities[2]; + Object m_rope_gun_object; + + menu::timers::timer m_deadeye_gun_timer; + menu::timers::timer m_deadeye_gun_timeout_timer; + std::vector m_deadeye_gun_peds; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world.cpp b/GTAV/src/menu/base/submenus/main/world.cpp new file mode 100644 index 0000000..411e858 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world.cpp @@ -0,0 +1,92 @@ +#include "world.h" +#include "menu/base/submenu_handler.h" +#include "menu/base/util/panels.h" +#include "util/memory/memory.h" +#include "../main.h" +#include "world/world_weather.h" +#include "world/world_time.h" +#include "world/bullet_tracers.h" +#include "world/world_waypoint.h" +#include "world/clear_area.h" +#include "world/ocean.h" +#include "world/game_fx.h" +#include "world/trains.h" +#include "world/local_entities.h" + +using namespace world::vars; + +namespace world::vars { + variables m_vars; +} + +void world_menu::load() { + set_name("World"); + set_parent(); + + add_option(submenu_option("Local Entities") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Game FX") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Weather") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Time") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Bullet Tracers") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("World Waypoint") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Clear Area") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Ocean") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Train") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(button_option("Interior Refresh") + .add_translate().add_hotkey() + .add_click([] { native::refresh_interior(native::get_interior_from_entity(menu::player::get_local_player().m_ped)); })); +} + +void world_menu::update() {} + +void world_menu::update_once() { + menu::panels::toggle_panel_render("PANEL_CLOCK", false); +} + +void world_menu::feature_update() { + if (m_vars.m_disable_lights) { + native::set_blackout(true); + } + + if (m_vars.m_render_water_on_map) { + memory::write(global::vars::g_render_water_on_map_intensity, 1.0f); + } +} + +world_menu* g_instance; +world_menu* world_menu::get() { + if (g_instance == nullptr) { + g_instance = new world_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/world.h b/GTAV/src/menu/base/submenus/main/world.h new file mode 100644 index 0000000..0f37240 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class world_menu : public menu::submenu::submenu { +public: + static world_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + world_menu() + : menu::submenu::submenu() {} +}; + +namespace world::vars { + struct variables { + bool m_disable_lights; + bool m_render_water_on_map; + bool m_disable_sky; + float m_fog; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/bullet_tracers.cpp b/GTAV/src/menu/base/submenus/main/world/bullet_tracers.cpp new file mode 100644 index 0000000..eee38e6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/bullet_tracers.cpp @@ -0,0 +1,177 @@ +#include "bullet_tracers.h" +#include "menu/base/submenu_handler.h" +#include "../world.h" +#include "global/lists.h" +#include "rage/engine.h" +#include "../helper/helper_color.h" + +using namespace world::tracers::vars; + +namespace world::tracers::vars { + variables m_vars; + + scroll_struct colors[] = { + { localization("NPC", true), 0 }, + { localization("Player", true), 1 }, + { localization("Self", true), 2 }, + }; +} + +void bullet_tracers_menu::load() { + set_name("Bullet Tracers"); + set_parent(); + + add_option(scroll_option(TOGGLE, "Toggle NPC") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_npc) + .add_scroll(m_vars.m_npc_timer, 1, NUMOF(global::lists::g_timers), global::lists::g_timers) + .add_tooltip("The max time a tracer will show up for NPCs")); + + add_option(scroll_option(TOGGLE, "Toggle Player") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_player) + .add_scroll(m_vars.m_player_timer, 1, NUMOF(global::lists::g_timers), global::lists::g_timers) + .add_tooltip("The max time a tracer will show up for players")); + + add_option(scroll_option(TOGGLE, "Toggle Self") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_self) + .add_scroll(m_vars.m_self_timer, 1, NUMOF(global::lists::g_timers), global::lists::g_timers) + .add_tooltip("The max time a tracer will show up for self")); + + add_option(break_option("Colors") + .add_translate()); + + add_option(scroll_option(SCROLL, "Selected Color") + .add_translate().add_hotkey() + .add_hover([] { menu::renderer::render_color_preview(m_vars.m_colors[m_vars.m_selected_color]); }) + .add_scroll(m_vars.m_selected_color, 0, NUMOF(colors), colors)); + + add_option(submenu_option("Edit Color") + .add_translate() + .add_submenu() + .add_click([this] { + helper_color_menu::get()->set_name(colors[m_vars.m_selected_color].m_name.get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = &m_vars.m_colors[m_vars.m_selected_color]; + helper::color::vars::m_vars.m_callback = [] {}; + }) + .add_update([] (submenu_option* option, int position) { + option->add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, &m_vars.m_colors[m_vars.m_selected_color]); + })); +} + +void bullet_tracers_menu::update() {} + +void bullet_tracers_menu::update_once() {} + +void bullet_tracers_menu::feature_update() { + if (m_vars.m_npc || m_vars.m_player || m_vars.m_self) { + for (int i = 0; i < NUMOF(m_vars.m_tracers); i++) { + tracer& trace = m_vars.m_tracers[i]; + + if (trace.m_populated) { + if (is_valid_ptr(trace.m_shooter) && is_valid_vtable(*(uint64_t*)((uint64_t)(trace.m_shooter)))) { + rage::types::ped* ped = (rage::types::ped*)trace.m_shooter; + rage::types::vehicle* vehicle = (rage::types::vehicle*)trace.m_shooter; + + if (m_vars.m_self) { + if (is_valid_ptr(global::vars::g_ped_factory) && is_valid_ptr(global::vars::g_ped_factory->m_local_ped)) { + if (trace.m_shooter == global::vars::g_ped_factory->m_local_ped || trace.m_shooter == global::vars::g_ped_factory->m_local_ped->m_vehicle) { + native::draw_line(trace.m_spawn_position.x, trace.m_spawn_position.y, trace.m_spawn_position.z, trace.m_end_position.x, trace.m_end_position.y, trace.m_end_position.z, m_vars.m_colors[2].r, m_vars.m_colors[2].g, m_vars.m_colors[2].b, m_vars.m_colors[2].a); + + if (GetTickCount() - trace.m_spawn_time > global::lists::g_timers[m_vars.m_self_timer].m_result) { + trace.m_populated = false; + } + + continue; + } + } + } + + Entity handle = rage::engine::get_entity_handle((uint64_t)trace.m_shooter); + if (m_vars.m_npc) { + if (native::does_entity_exist(handle)) { + Entity new_handle = handle; + if (native::is_entity_a_vehicle(handle)) { + Ped driver = native::get_ped_in_vehicle_seat(handle, -1, 0); + if (native::does_entity_exist(driver)) { + new_handle = driver; + } + } + + if (native::is_entity_a_ped(new_handle) && !native::is_ped_a_player(new_handle)) { + native::draw_line(trace.m_spawn_position.x, trace.m_spawn_position.y, trace.m_spawn_position.z, trace.m_end_position.x, trace.m_end_position.y, trace.m_end_position.z, m_vars.m_colors[0].r, m_vars.m_colors[0].g, m_vars.m_colors[0].b, m_vars.m_colors[0].a); + + if (GetTickCount() - trace.m_spawn_time > global::lists::g_timers[m_vars.m_npc_timer].m_result) { + trace.m_populated = false; + } + + continue; + } + } + } + + if (m_vars.m_player) { + bool run = false; + + if (is_valid_ptr(global::vars::g_ped_factory->m_local_ped)) { + if (trace.m_shooter == global::vars::g_ped_factory->m_local_ped) { + goto ex; + } + } + + if (is_valid_ptr(ped->get_net_obj())) { + if (ped->get_net_obj()->m_type == NetObjectPlayer) { + run = true; + goto ex; + } + + if (native::does_entity_exist(handle)) { + if (native::is_entity_a_vehicle(handle)) { + menu::player::for_each([&](menu::player::player_context& context) { + if (run) return; + + if (is_valid_ptr(context.m_ped_ptr)) { + if (is_valid_ptr(context.m_ped_ptr->m_ped_weapon_manager)) { + if (context.m_ped_ptr->m_ped_weapon_manager->get_vehicle_weapon() == trace.m_weapon_info) { + run = true; + } + } + } + }); + } + } + } + + ex: + if (run) { + native::draw_line(trace.m_spawn_position.x, trace.m_spawn_position.y, trace.m_spawn_position.z, trace.m_end_position.x, trace.m_end_position.y, trace.m_end_position.z, m_vars.m_colors[1].r, m_vars.m_colors[1].g, m_vars.m_colors[1].b, m_vars.m_colors[1].a); + + if (GetTickCount() - trace.m_spawn_time > global::lists::g_timers[m_vars.m_player_timer].m_result) { + trace.m_populated = false; + } + + continue; + } + } + + if (GetTickCount() - trace.m_spawn_time > 3000) { + trace.m_populated = false; + } + } + } + } + } +} + +bullet_tracers_menu* g_instance; +bullet_tracers_menu* bullet_tracers_menu::get() { + if (g_instance == nullptr) { + g_instance = new bullet_tracers_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/bullet_tracers.h b/GTAV/src/menu/base/submenus/main/world/bullet_tracers.h new file mode 100644 index 0000000..55fdfd9 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/bullet_tracers.h @@ -0,0 +1,49 @@ +#pragma once +#include "menu/base/submenu.h" +#include "rage/types/generic_types.h" + +class bullet_tracers_menu : public menu::submenu::submenu { +public: + static bullet_tracers_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + bullet_tracers_menu() + : menu::submenu::submenu() {} +}; + +namespace world::tracers::vars { + struct tracer { + uint32_t m_spawn_time; + math::vector3_ m_spawn_position; + math::vector3_ m_end_position; + void* m_shooter; + rage::types::weapon_info* m_weapon_info; + bool m_populated = false; + }; + + struct variables { + int m_tracer_current_index = 0; + tracer m_tracers[1000]; + + bool m_npc; + bool m_player; + bool m_self; + + int m_npc_timer = 1; + int m_player_timer = 1; + int m_self_timer = 1; + int m_selected_color; + + color_rgba m_colors[3] = { + color_rgba(255, 0, 0), + color_rgba(0, 255, 0), + color_rgba(0, 0, 255) + }; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/clear_area.cpp b/GTAV/src/menu/base/submenus/main/world/clear_area.cpp new file mode 100644 index 0000000..055cb4f --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/clear_area.cpp @@ -0,0 +1,61 @@ +#include "clear_area.h" +#include "menu/base/submenu_handler.h" +#include "../world.h" + +using namespace world::clear::vars; + +namespace world::clear::vars { + variables m_vars; +} + +void clear_area_menu::load() { + set_name("Clear Area"); + set_parent(); + + add_option(number_option(SCROLL, "Range") + .add_translate().add_hotkey() + .add_number(m_vars.m_range, "%.0f", 1.f).set_scroll_speed(20).add_min(0.f)); + + add_option(button_option("Clear Everything") + .add_translate().add_hotkey() + .add_click([] { native::clear_area(menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, m_vars.m_range, false, false, false, false); })); + + add_option(button_option("Clear Cops") + .add_translate().add_hotkey() + .add_click([] { native::clear_area_of_cops(menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, m_vars.m_range, 0); })); + + add_option(button_option("Clear Objects") + .add_translate().add_hotkey() + .add_click([] { native::clear_area_of_objects(menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, m_vars.m_range, 0); })); + + add_option(button_option("Clear Peds") + .add_translate().add_hotkey() + .add_click([] { native::clear_area_of_peds(menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, m_vars.m_range, 0); })); + + add_option(button_option("Clear Projectiles") + .add_translate().add_hotkey() + .add_click([] { native::clear_area_of_projectiles(menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, m_vars.m_range, 0); })); + + add_option(button_option("Clear Vehicles") + .add_translate().add_hotkey() + .add_click([] { native::clear_area_of_vehicles(menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, m_vars.m_range, false, false, false, false, false, 0); })); +} + +void clear_area_menu::update() { + native::draw_marker(28, menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, m_vars.m_range, m_vars.m_range, m_vars.m_range, global::ui::g_clear_area_range.r, global::ui::g_clear_area_range.g, global::ui::g_clear_area_range.b, global::ui::g_clear_area_range.a, 0, 0, 0, 0, 0, 0, 0); +} + +void clear_area_menu::update_once() {} + +void clear_area_menu::feature_update() {} + +clear_area_menu* g_instance; +clear_area_menu* clear_area_menu::get() { + if (g_instance == nullptr) { + g_instance = new clear_area_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/clear_area.h b/GTAV/src/menu/base/submenus/main/world/clear_area.h new file mode 100644 index 0000000..16862b0 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/clear_area.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class clear_area_menu : public menu::submenu::submenu { +public: + static clear_area_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + clear_area_menu() + : menu::submenu::submenu() {} +}; + +namespace world::clear::vars { + struct variables { + float m_range = 100.f; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_color.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_color.cpp new file mode 100644 index 0000000..5d5febc --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_color.cpp @@ -0,0 +1,118 @@ +#include "fx_color.h" +#include "menu/base/submenu_handler.h" +#include "menu/base/util/instructionals.h" +#include "../../helper/helper_color.h" +#include "../../helper/helper_rainbow.h" + +using namespace world::fx::color::vars; + +namespace world::fx::color::vars { + variables m_vars; + + void reset() { + if (m_vars.m_color != nullptr) { + m_vars.m_color->m_rainbow_toggle = false; + m_vars.m_color->m_rainbow.stop(); + + m_vars.m_selected_color->x = m_vars.m_color->m_default_color.x; + m_vars.m_selected_color->y = m_vars.m_color->m_default_color.y; + m_vars.m_selected_color->z = m_vars.m_color->m_default_color.z; + + m_vars.m_color->m_internal_color.r = (int)(m_vars.m_color->m_default_color.x * 255.f); + m_vars.m_color->m_internal_color.g = (int)(m_vars.m_color->m_default_color.y * 255.f); + m_vars.m_color->m_internal_color.b = (int)(m_vars.m_color->m_default_color.z * 255.f); + } else { + m_vars.m_color2->m_rainbow_toggle = false; + m_vars.m_color2->m_rainbow.stop(); + memcpy(m_vars.m_color2->m_color, &m_vars.m_color2->m_default_color, sizeof(rage::types::ui_element_color_struct)); + + m_vars.m_color2->m_internal_color.r = (int)(m_vars.m_color2->m_color->m_color.x * 255.f); + m_vars.m_color2->m_internal_color.g = (int)(m_vars.m_color2->m_color->m_color.y * 255.f); + m_vars.m_color2->m_internal_color.b = (int)(m_vars.m_color2->m_color->m_color.z * 255.f); + } + } +} + +void fx_color_menu::load() { + set_name("Color"); + set_default_instructionals(false); + + add_string("Edit Color"); + add_string("Toggle Rainbow"); + add_string("Reset to Default"); +} + +void fx_color_menu::update() {} + +void fx_color_menu::update_once() { + clear_options(0); + + static color_rgba* internal_color = nullptr; + + if (m_vars.m_color != nullptr) { + m_vars.m_selected_color = m_vars.m_color->m_color; + internal_color = &m_vars.m_color->m_internal_color; + } else { + m_vars.m_selected_color = &m_vars.m_color2->m_color->m_color; + internal_color = &m_vars.m_color2->m_internal_color; + } + + internal_color->r = (int)(m_vars.m_selected_color->x * 255.f); + internal_color->g = (int)(m_vars.m_selected_color->y * 255.f); + internal_color->b = (int)(m_vars.m_selected_color->z * 255.f); + internal_color->a = 255; + + add_option(submenu_option(get_string("Edit Color")) + .add_submenu() + .add_click([=] { + helper_color_menu::get()->set_name(get_name().get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = internal_color; + + helper::color::vars::m_vars.m_callback = [] { + m_vars.m_selected_color->x = internal_color->r / 255.f; + m_vars.m_selected_color->y = internal_color->g / 255.f; + m_vars.m_selected_color->z = internal_color->b / 255.f; + }; + }) + .add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, internal_color)); + + add_option(toggle_option(get_string("Toggle Rainbow")) + .add_toggle(m_vars.m_color != nullptr ? m_vars.m_color->m_rainbow_toggle : m_vars.m_color2->m_rainbow_toggle) + .add_click([] { + if (m_vars.m_color != nullptr) { + m_vars.m_color->m_rainbow.toggle(m_vars.m_color->m_rainbow_toggle); + if (m_vars.m_color->m_rainbow_toggle) { + m_vars.m_color->m_rainbow.add(internal_color); + } else { + m_vars.m_color->m_rainbow.remove(internal_color); + } + } else { + m_vars.m_color2->m_rainbow.toggle(m_vars.m_color2->m_rainbow_toggle); + if (m_vars.m_color2->m_rainbow_toggle) { + m_vars.m_color2->m_rainbow.add(internal_color); + } else { + m_vars.m_color2->m_rainbow.remove(internal_color); + } + } + })); + + add_option(button_option(get_string("Reset to Default")) + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click(reset)); +} + +void fx_color_menu::feature_update() {} + +fx_color_menu* g_instance; +fx_color_menu* fx_color_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_color_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_color.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_color.h new file mode 100644 index 0000000..7c149eb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_color.h @@ -0,0 +1,35 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/rainbow.h" +#include "fx_ui_color.h" + +class fx_color_menu : public menu::submenu::submenu { +public: + static fx_color_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_color_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::color::vars { + struct custom_color { + math::vector3_ m_default_color; + math::vector3_* m_color; + color_rgba m_internal_color; + bool m_rainbow_toggle; + menu::rainbow m_rainbow; + }; + + struct variables { + custom_color* m_color; + world::fx::ui::color::vars::custom_color* m_color2; + math::vector3_* m_selected_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_cross_multiplier.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_cross_multiplier.cpp new file mode 100644 index 0000000..0d28aae --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_cross_multiplier.cpp @@ -0,0 +1,69 @@ +#include "fx_cross_multiplier.h" +#include "menu/base/submenu_handler.h" +#include "../game_fx.h" + +using namespace world::fx::cross::vars; + +namespace world::fx::cross::vars { + variables m_vars; +} + +void fx_cross_multiplier_menu::load() { + set_name("Cross Multiplier"); + set_parent(); + + memcpy(&m_vars.m_rim_light, &global::vars::g_ui_visual_settings->m_rim_light, sizeof(variables)); + + add_option(number_option(SCROLL, "Rim Light") + .add_translate() + .add_number(global::vars::g_ui_visual_settings->m_rim_light, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Global Environment Reflection") + .add_translate() + .add_number(global::vars::g_ui_visual_settings->m_global_environment_reflection, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Gamma") + .add_translate() + .add_number(global::vars::g_ui_visual_settings->m_gamma, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Mid Blur") + .add_translate() + .add_number(global::vars::g_ui_visual_settings->m_mid_blur, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Far Blur") + .add_translate() + .add_number(global::vars::g_ui_visual_settings->m_far_blur, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Sky Multiplier") + .add_translate() + .add_number(global::vars::g_ui_visual_settings->m_sky_multiplier, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Desaturation") + .add_translate() + .add_number(global::vars::g_ui_visual_settings->m_desaturation, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(button_option(get_string("Reset to Default")) + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { + memcpy(&global::vars::g_ui_visual_settings->m_rim_light, &m_vars.m_rim_light, sizeof(variables)); + })); +} + +void fx_cross_multiplier_menu::update() {} + +void fx_cross_multiplier_menu::update_once() {} + +void fx_cross_multiplier_menu::feature_update() {} + +fx_cross_multiplier_menu* g_instance; +fx_cross_multiplier_menu* fx_cross_multiplier_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_cross_multiplier_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_cross_multiplier.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_cross_multiplier.h new file mode 100644 index 0000000..bd0b517 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_cross_multiplier.h @@ -0,0 +1,29 @@ +#pragma once +#include "menu/base/submenu.h" + +class fx_cross_multiplier_menu : public menu::submenu::submenu { +public: + static fx_cross_multiplier_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_cross_multiplier_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::cross::vars { + struct variables { + float m_rim_light; + float m_global_environment_reflection; + float m_gamma; + float m_mid_blur; + float m_far_blur; + float m_sky_multiplier; + float m_desaturation; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_liquid.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_liquid.cpp new file mode 100644 index 0000000..7c82dc3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_liquid.cpp @@ -0,0 +1,81 @@ +#include "fx_liquid.h" +#include "menu/base/submenu_handler.h" +#include "../game_fx.h" +#include "../../helper/helper_color.h" + +using namespace world::fx::liquid::vars; + +namespace world::fx::liquid::vars { + variables m_vars; + + scroll_struct liquid[] = { + { localization("Puddle", true), LIQUID_PUDDLE }, + { localization("Blood", true), LIQUID_BLOOD }, + { localization("Oil", true), LIQUID_OIL }, + { localization("Petrol", true), LIQUID_PETROL }, + { localization("Mud", true), LIQUID_MUD } + }; +} + +void fx_liquid_menu::load() { + set_name("Liquid"); + set_parent(); + + memcpy(m_vars.m_backup, global::vars::g_vfx_liquid, sizeof(m_vars.m_backup)); + + add_option(scroll_option(SCROLL, "Liquid Type") + .add_scroll(m_vars.m_selected, 0, NUMOF(liquid), liquid) + .add_click([this] { update_once(); })); + + add_string("Edit Color"); +} + +void fx_liquid_menu::update() {} + +void fx_liquid_menu::update_once() { + clear_options(1); + + m_vars.m_color = { + global::vars::g_vfx_liquid[m_vars.m_selected].r, + global::vars::g_vfx_liquid[m_vars.m_selected].g, + global::vars::g_vfx_liquid[m_vars.m_selected].b, + global::vars::g_vfx_liquid[m_vars.m_selected].a + }; + + add_option(submenu_option(get_string("Edit Color")) + .add_submenu() + .add_click([=] { + helper_color_menu::get()->set_name(get_name().get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = &m_vars.m_color; + + helper::color::vars::m_vars.m_callback = [] { + global::vars::g_vfx_liquid[m_vars.m_selected].r = m_vars.m_color.r; + global::vars::g_vfx_liquid[m_vars.m_selected].g = m_vars.m_color.g; + global::vars::g_vfx_liquid[m_vars.m_selected].b = m_vars.m_color.b; + global::vars::g_vfx_liquid[m_vars.m_selected].a = m_vars.m_color.a; + }; + }) + .add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, &m_vars.m_color)); + + add_option(button_option(get_string("Reset to Default")) + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { + memcpy(global::vars::g_vfx_liquid, &m_vars.m_backup, sizeof(m_vars.m_backup)); + })); +} + +void fx_liquid_menu::feature_update() {} + +fx_liquid_menu* g_instance; +fx_liquid_menu* fx_liquid_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_liquid_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_liquid.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_liquid.h new file mode 100644 index 0000000..46ea66c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_liquid.h @@ -0,0 +1,33 @@ +#pragma once +#include "menu/base/submenu.h" + +class fx_liquid_menu : public menu::submenu::submenu { +public: + static fx_liquid_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_liquid_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::liquid::vars { + enum eLiquid { + LIQUID_PUDDLE, + LIQUID_BLOOD, + LIQUID_OIL, + LIQUID_PETROL, + LIQUID_MUD + }; + + struct variables { + int m_selected; + rage::types::vfx_liquid m_backup[5]; + color_rgba m_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_load.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_load.cpp new file mode 100644 index 0000000..768580a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_load.cpp @@ -0,0 +1,392 @@ +#include "fx_load.h" +#include "menu/base/submenu_handler.h" +#include "../game_fx.h" +#include "util/log.h" +#include "util/dirs.h" +#include "fx_sky.h" +#include "fx_traffic.h" +#include "fx_cross_multiplier.h" +#include "fx_liquid.h" +#include "fx_puddles.h" +#include "fx_vehicle.h" +#include "fx_vehicle_neons.h" +#include + +using namespace world::fx::load::vars; + +namespace world::fx::load::vars { + variables m_vars; + + void save_ui_struct(nlohmann::json& json, std::string name, rage::types::ui_element_color_struct elem) { + json[name]["intensity"] = elem.m_intensity; + json[name]["radius"] = elem.m_radius; + json[name]["falloff"] = elem.m_falloff_exp; + json[name]["inner cone"] = elem.m_inner_cone_angle; + json[name]["outer cone"] = elem.m_outer_cone_angle; + json[name]["corona hdr"] = elem.m_corona_hdr; + json[name]["corona size"] = elem.m_corona_size; + json[name]["shadow blur"] = elem.m_shadow_blur; + json[name]["capsule length"] = elem.m_capsule_length; + json[name]["r"] = elem.m_color.x; + json[name]["g"] = elem.m_color.y; + json[name]["b"] = elem.m_color.z; + } + + void read_ui_struct(nlohmann::json& json, std::string name, rage::types::ui_element_color_struct* elem) { + elem->m_intensity = json[name]["intensity"]; + elem->m_radius = json[name]["radius"]; + elem->m_falloff_exp = json[name]["falloff"]; + elem->m_inner_cone_angle = json[name]["inner cone"]; + elem->m_outer_cone_angle = json[name]["outer cone"]; + elem->m_corona_hdr = json[name]["corona hdr"]; + elem->m_corona_size = json[name]["corona size"]; + elem->m_shadow_blur = json[name]["shadow blur"]; + elem->m_capsule_length = json[name]["capsule length"]; + elem->m_color.x = json[name]["r"]; + elem->m_color.y = json[name]["g"]; + elem->m_color.z = json[name]["b"]; + } + + void save_config(std::string name) { + try { + std::ofstream output(util::dirs::get_path(gamefx) + name + ".json"); + if (output.good()) { + nlohmann::json json; + + fx_sky_menu::get(); + fx_traffic_menu::get(); + fx_cross_multiplier_menu::get(); + fx_liquid_menu::get(); + fx_puddles_menu::get(); + fx_vehicle_menu::get(); + fx_vehicle_neons_menu::get(); + + json["blackout"] = world::fx::vars::m_vars.m_disable_lights; + json["dome"] = *(bool*)((uint64_t)global::vars::g_ui_weather - 0x60); + + json["water"]["enabled"] = world::fx::vars::m_vars.m_water_toggle; + json["water"]["value"] = world::fx::vars::m_vars.m_water; + + json["fog"]["enabled"] = world::fx::vars::m_vars.m_fog_toggle; + json["fog"]["value"] = world::fx::vars::m_vars.m_fog; + + nlohmann::json& sky = json["sky"]; + for (scroll_struct& n : world::fx::sky::vars::sky_colors) { + sky[n.m_name.get_original()]["rainbow"] = n.m_result->m_rainbow_toggle; + sky[n.m_name.get_original()]["r"] = n.m_result->m_color.x; + sky[n.m_name.get_original()]["g"] = n.m_result->m_color.y; + sky[n.m_name.get_original()]["b"] = n.m_result->m_color.z; + sky[n.m_name.get_original()]["luminance"] = n.m_result->m_luminance; + } + + nlohmann::json& traffic = json["traffic"]; + save_ui_struct(traffic, "near", *world::fx::traffic::vars::m_vars.m_near_color.m_color); + + traffic["far start"] = *world::fx::traffic::vars::m_vars.m_far_fade_start; + traffic["far end"] = *world::fx::traffic::vars::m_vars.m_far_fade_end; + traffic["near start"] = *world::fx::traffic::vars::m_vars.m_near_fade_start; + traffic["near end"] = *world::fx::traffic::vars::m_vars.m_near_fade_end; + + traffic["red"]["rainbow"] = world::fx::traffic::vars::m_vars.m_red_color.m_rainbow_toggle; + traffic["red"]["r"] = world::fx::traffic::vars::m_vars.m_red_color.m_color->x; + traffic["red"]["g"] = world::fx::traffic::vars::m_vars.m_red_color.m_color->y; + traffic["red"]["b"] = world::fx::traffic::vars::m_vars.m_red_color.m_color->z; + + traffic["green"]["rainbow"] = world::fx::traffic::vars::m_vars.m_green_color.m_rainbow_toggle; + traffic["green"]["r"] = world::fx::traffic::vars::m_vars.m_green_color.m_color->x; + traffic["green"]["g"] = world::fx::traffic::vars::m_vars.m_green_color.m_color->y; + traffic["green"]["b"] = world::fx::traffic::vars::m_vars.m_green_color.m_color->z; + + traffic["amber"]["rainbow"] = world::fx::traffic::vars::m_vars.m_amber_color.m_rainbow_toggle; + traffic["amber"]["r"] = world::fx::traffic::vars::m_vars.m_amber_color.m_color->x; + traffic["amber"]["g"] = world::fx::traffic::vars::m_vars.m_amber_color.m_color->y; + traffic["amber"]["b"] = world::fx::traffic::vars::m_vars.m_amber_color.m_color->z; + + traffic["walk"]["rainbow"] = world::fx::traffic::vars::m_vars.m_walk_color.m_rainbow_toggle; + traffic["walk"]["r"] = world::fx::traffic::vars::m_vars.m_walk_color.m_color->x; + traffic["walk"]["g"] = world::fx::traffic::vars::m_vars.m_walk_color.m_color->y; + traffic["walk"]["b"] = world::fx::traffic::vars::m_vars.m_walk_color.m_color->z; + + traffic["dont walk"]["rainbow"] = world::fx::traffic::vars::m_vars.m_dont_walk_color.m_rainbow_toggle; + traffic["dont walk"]["r"] = world::fx::traffic::vars::m_vars.m_dont_walk_color.m_color->x; + traffic["dont walk"]["g"] = world::fx::traffic::vars::m_vars.m_dont_walk_color.m_color->y; + traffic["dont walk"]["b"] = world::fx::traffic::vars::m_vars.m_dont_walk_color.m_color->z; + + nlohmann::json& cross_multiplier = json["cross"]; + cross_multiplier["rim light"] = global::vars::g_ui_visual_settings->m_rim_light; + cross_multiplier["reflection"] = global::vars::g_ui_visual_settings->m_global_environment_reflection; + cross_multiplier["gamma"] = global::vars::g_ui_visual_settings->m_gamma; + cross_multiplier["mid blur"] = global::vars::g_ui_visual_settings->m_mid_blur; + cross_multiplier["far blur"] = global::vars::g_ui_visual_settings->m_far_blur; + cross_multiplier["sky multiplier"] = global::vars::g_ui_visual_settings->m_sky_multiplier; + cross_multiplier["desaturation"] = global::vars::g_ui_visual_settings->m_desaturation; + + nlohmann::json& liquid = json["liquid"]; + liquid["puddle"]["r"] = global::vars::g_vfx_liquid[0].r; + liquid["puddle"]["g"] = global::vars::g_vfx_liquid[0].g; + liquid["puddle"]["b"] = global::vars::g_vfx_liquid[0].b; + liquid["puddle"]["a"] = global::vars::g_vfx_liquid[0].a; + + liquid["blood"]["r"] = global::vars::g_vfx_liquid[1].r; + liquid["blood"]["g"] = global::vars::g_vfx_liquid[1].g; + liquid["blood"]["b"] = global::vars::g_vfx_liquid[1].b; + liquid["blood"]["a"] = global::vars::g_vfx_liquid[1].a; + + liquid["oil"]["r"] = global::vars::g_vfx_liquid[2].r; + liquid["oil"]["g"] = global::vars::g_vfx_liquid[2].g; + liquid["oil"]["b"] = global::vars::g_vfx_liquid[2].b; + liquid["oil"]["a"] = global::vars::g_vfx_liquid[2].a; + + liquid["petrol"]["r"] = global::vars::g_vfx_liquid[3].r; + liquid["petrol"]["g"] = global::vars::g_vfx_liquid[3].g; + liquid["petrol"]["b"] = global::vars::g_vfx_liquid[3].b; + liquid["petrol"]["a"] = global::vars::g_vfx_liquid[3].a; + + liquid["mud"]["r"] = global::vars::g_vfx_liquid[4].r; + liquid["mud"]["g"] = global::vars::g_vfx_liquid[4].g; + liquid["mud"]["b"] = global::vars::g_vfx_liquid[4].b; + liquid["mud"]["a"] = global::vars::g_vfx_liquid[4].a; + + nlohmann::json& puddles = json["puddles"]; + puddles["scale"] = global::vars::g_ui_puddle->m_scale; + puddles["range"] = global::vars::g_ui_puddle->m_range; + puddles["depth"] = global::vars::g_ui_puddle->m_depth; + puddles["depth test"] = global::vars::g_ui_puddle->m_depth_test; + puddles["reflectivity"] = global::vars::g_ui_puddle->m_reflectivity; + puddles["ripple min size"] = global::vars::g_ui_puddle->m_ripples->m_ripple_min_size; + puddles["ripple max size"] = global::vars::g_ui_puddle->m_ripples->m_ripple_max_size; + puddles["ripple min duration"] = global::vars::g_ui_puddle->m_ripples->m_ripple_min_duration; + puddles["ripple max duration"] = global::vars::g_ui_puddle->m_ripples->m_ripple_max_duration; + puddles["ripple speed"] = global::vars::g_ui_puddle->m_ripples->m_ripple_speed; + puddles["ripple drop factor"] = global::vars::g_ui_puddle->m_ripples->m_ripple_drop_factor; + puddles["ripple wind strength"] = global::vars::g_ui_puddle->m_ripples->m_ripple_wind_strength; + puddles["ripple strength"] = global::vars::g_ui_puddle->m_ripples->m_ripple_strength; + puddles["ripple player speed"] = global::vars::g_ui_puddle->m_ripples->m_ripple_player_speed; + puddles["ripple player map size"] = global::vars::g_ui_puddle->m_ripples->m_ripple_player_map_size; + puddles["ripple wind damping"] = global::vars::g_ui_puddle->m_ripples->m_ripple_wind_damping; + + nlohmann::json& neons = json["neons"]; + neons["intensity"] = *world::fx::vehicle::neons::vars::m_vars.m_intensity; + neons["radius"] = *world::fx::vehicle::neons::vars::m_vars.m_radius; + neons["fall off exponent"] = *world::fx::vehicle::neons::vars::m_vars.m_fall_off_exponent; + neons["capsule extent sides"] = *world::fx::vehicle::neons::vars::m_vars.m_capsule_extent_sides; + neons["capsule extent front back"] = *world::fx::vehicle::neons::vars::m_vars.m_capsule_extent_front_back; + neons["clip plane height"] = *world::fx::vehicle::neons::vars::m_vars.m_clip_plane_height; + neons["bike clip plane height"] = *world::fx::vehicle::neons::vars::m_vars.m_bike_clip_plane_height; + + save_ui_struct(json["vehicle"], "interior", *world::fx::vehicle::vars::m_vars.m_interior_light_color.m_color); + + output << json.dump(4); + output.close(); + } + } catch (std::exception& E) { + LOG_WARN("[Json] %s", E.what()); + } + } + + void load_config(std::string name) { + try { + std::ifstream input(util::dirs::get_path(gamefx) + name + ".json"); + if (input.good()) { + nlohmann::json json; + input >> json; + input.close(); + + fx_sky_menu::get(); + fx_cross_multiplier_menu::get(); + fx_liquid_menu::get(); + fx_puddles_menu::get(); + fx_traffic_menu::get(); + fx_vehicle_menu::get(); + fx_vehicle_neons_menu::get(); + + world::fx::vars::m_vars.m_disable_lights = json["blackout"]; + *(bool*)((uint64_t)global::vars::g_ui_weather - 0x60) = json["dome"]; + + world::fx::vars::m_vars.m_water_toggle = json["water"]["enabled"]; + world::fx::vars::m_vars.m_water = json["water"]["value"]; + + world::fx::vars::m_vars.m_fog_toggle = json["fog"]["enabled"]; + world::fx::vars::m_vars.m_fog = json["fog"]["value"]; + + if (!json["sky"].is_null()) { + nlohmann::json& sky = json["sky"]; + + int index = 0; + for (scroll_struct& n : world::fx::sky::vars::sky_colors) { + if (!sky[n.m_name.get_original()].is_null()) { + n.m_result->m_rainbow_toggle = sky[n.m_name.get_original()]["rainbow"]; + n.m_result->m_color.x = sky[n.m_name.get_original()]["r"]; + n.m_result->m_color.y = sky[n.m_name.get_original()]["g"]; + n.m_result->m_color.z = sky[n.m_name.get_original()]["b"]; + n.m_result->m_luminance = sky[n.m_name.get_original()]["luminance"]; + world::fx::sky::vars::handle_patch(index); + } + + index++; + } + } + + if (!json["traffic"].is_null()) { + nlohmann::json& traffic = json["traffic"]; + read_ui_struct(traffic, "near", world::fx::traffic::vars::m_vars.m_near_color.m_color); + + *world::fx::traffic::vars::m_vars.m_far_fade_start = traffic["far start"]; + *world::fx::traffic::vars::m_vars.m_far_fade_end = traffic["far end"]; + *world::fx::traffic::vars::m_vars.m_near_fade_start = traffic["near start"]; + *world::fx::traffic::vars::m_vars.m_near_fade_end = traffic["near end"]; + + world::fx::traffic::vars::m_vars.m_red_color.m_rainbow_toggle = traffic["red"]["rainbow"]; + world::fx::traffic::vars::m_vars.m_red_color.m_color->x = traffic["red"]["r"]; + world::fx::traffic::vars::m_vars.m_red_color.m_color->y = traffic["red"]["g"]; + world::fx::traffic::vars::m_vars.m_red_color.m_color->z = traffic["red"]["b"]; + + world::fx::traffic::vars::m_vars.m_green_color.m_rainbow_toggle = traffic["green"]["rainbow"]; + world::fx::traffic::vars::m_vars.m_green_color.m_color->x = traffic["green"]["r"]; + world::fx::traffic::vars::m_vars.m_green_color.m_color->y = traffic["green"]["g"]; + world::fx::traffic::vars::m_vars.m_green_color.m_color->z = traffic["green"]["b"]; + + world::fx::traffic::vars::m_vars.m_amber_color.m_rainbow_toggle = traffic["amber"]["rainbow"]; + world::fx::traffic::vars::m_vars.m_amber_color.m_color->x = traffic["amber"]["r"]; + world::fx::traffic::vars::m_vars.m_amber_color.m_color->y = traffic["amber"]["g"]; + world::fx::traffic::vars::m_vars.m_amber_color.m_color->z = traffic["amber"]["b"]; + + world::fx::traffic::vars::m_vars.m_walk_color.m_rainbow_toggle = traffic["walk"]["rainbow"]; + world::fx::traffic::vars::m_vars.m_walk_color.m_color->x = traffic["walk"]["r"]; + world::fx::traffic::vars::m_vars.m_walk_color.m_color->y = traffic["walk"]["g"]; + world::fx::traffic::vars::m_vars.m_walk_color.m_color->z = traffic["walk"]["b"]; + + world::fx::traffic::vars::m_vars.m_dont_walk_color.m_rainbow_toggle = traffic["dont walk"]["rainbow"]; + world::fx::traffic::vars::m_vars.m_dont_walk_color.m_color->x = traffic["dont walk"]["r"]; + world::fx::traffic::vars::m_vars.m_dont_walk_color.m_color->y = traffic["dont walk"]["g"]; + world::fx::traffic::vars::m_vars.m_dont_walk_color.m_color->z = traffic["dont walk"]["b"]; + } + + if (!json["cross"].is_null()) { + nlohmann::json& cross_multiplier = json["cross"]; + global::vars::g_ui_visual_settings->m_rim_light = cross_multiplier["rim light"]; + global::vars::g_ui_visual_settings->m_global_environment_reflection = cross_multiplier["reflection"]; + global::vars::g_ui_visual_settings->m_gamma = cross_multiplier["gamma"]; + global::vars::g_ui_visual_settings->m_mid_blur = cross_multiplier["mid blur"]; + global::vars::g_ui_visual_settings->m_far_blur = cross_multiplier["far blur"]; + global::vars::g_ui_visual_settings->m_sky_multiplier = cross_multiplier["sky multiplier"]; + global::vars::g_ui_visual_settings->m_desaturation = cross_multiplier["desaturation"]; + } + + if (!json["liquid"].is_null()) { + nlohmann::json& liquid = json["liquid"]; + global::vars::g_vfx_liquid[0].r = liquid["puddle"]["r"]; + global::vars::g_vfx_liquid[0].g = liquid["puddle"]["g"]; + global::vars::g_vfx_liquid[0].b = liquid["puddle"]["b"]; + global::vars::g_vfx_liquid[0].a = liquid["puddle"]["a"]; + + global::vars::g_vfx_liquid[1].r = liquid["blood"]["r"]; + global::vars::g_vfx_liquid[1].g = liquid["blood"]["g"]; + global::vars::g_vfx_liquid[1].b = liquid["blood"]["b"]; + global::vars::g_vfx_liquid[1].a = liquid["blood"]["a"]; + + global::vars::g_vfx_liquid[2].r = liquid["oil"]["r"]; + global::vars::g_vfx_liquid[2].g = liquid["oil"]["g"]; + global::vars::g_vfx_liquid[2].b = liquid["oil"]["b"]; + global::vars::g_vfx_liquid[2].a = liquid["oil"]["a"]; + + global::vars::g_vfx_liquid[3].r = liquid["petrol"]["r"]; + global::vars::g_vfx_liquid[3].g = liquid["petrol"]["g"]; + global::vars::g_vfx_liquid[3].b = liquid["petrol"]["b"]; + global::vars::g_vfx_liquid[3].a = liquid["petrol"]["a"]; + + global::vars::g_vfx_liquid[4].r = liquid["mud"]["r"]; + global::vars::g_vfx_liquid[4].g = liquid["mud"]["g"]; + global::vars::g_vfx_liquid[4].b = liquid["mud"]["b"]; + global::vars::g_vfx_liquid[4].a = liquid["mud"]["a"]; + } + + if (!json["puddles"].is_null()) { + nlohmann::json& puddles = json["puddles"]; + global::vars::g_ui_puddle->m_scale = puddles["scale"]; + global::vars::g_ui_puddle->m_range = puddles["range"]; + global::vars::g_ui_puddle->m_depth = puddles["depth"]; + global::vars::g_ui_puddle->m_depth_test = puddles["depth test"]; + global::vars::g_ui_puddle->m_reflectivity = puddles["reflectivity"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_min_size = puddles["ripple min size"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_max_size = puddles["ripple max size"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_min_duration = puddles["ripple min duration"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_max_duration = puddles["ripple max duration"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_speed = puddles["ripple speed"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_drop_factor = puddles["ripple drop factor"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_wind_strength = puddles["ripple wind strength"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_strength = puddles["ripple strength"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_player_speed = puddles["ripple player speed"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_player_map_size = puddles["ripple player map size"]; + global::vars::g_ui_puddle->m_ripples->m_ripple_wind_damping = puddles["ripple wind damping"]; + } + + if (!json["vehicle"].is_null()) { + read_ui_struct(json["vehicle"], "interior", world::fx::vehicle::vars::m_vars.m_interior_light_color.m_color); + } + + if (!json["neons"].is_null()) { + nlohmann::json& neons = json["neons"]; + *world::fx::vehicle::neons::vars::m_vars.m_intensity = neons["intensity"]; + *world::fx::vehicle::neons::vars::m_vars.m_radius = neons["radius"]; + *world::fx::vehicle::neons::vars::m_vars.m_fall_off_exponent = neons["fall off exponent"]; + *world::fx::vehicle::neons::vars::m_vars.m_capsule_extent_sides = neons["capsule extent sides"]; + *world::fx::vehicle::neons::vars::m_vars.m_capsule_extent_front_back = neons["capsule extent front back"]; + *world::fx::vehicle::neons::vars::m_vars.m_clip_plane_height = neons["clip plane height"]; + *world::fx::vehicle::neons::vars::m_vars.m_bike_clip_plane_height = neons["bike clip plane height"]; + } + } + } catch (std::exception& E) { + LOG_WARN("[Json] %s", E.what()); + } + } +} + +void fx_load_menu::load() { + set_name("Save and Load"); + set_parent(); + + add_option(button_option("Save Game FX") + .add_translate() + .add_keyboard("Enter FX config name", 30, [](button_option* option, const char* result) { + save_config(result); + })); + + add_option(break_option("Game FXs") + .add_translate()); + + add_string("~m~None"); +} + +void fx_load_menu::update() {} + +void fx_load_menu::update_once() { + clear_options(2); + + try { + std::vector fxs = util::dirs::get_files_in_directory(util::dirs::get_path(gamefx), ".json"); + if (fxs.size()) { + for (std::string fx : fxs) { + add_option(button_option(fx) + .add_click([=] { load_config(fx); })); + } + } else { + add_option(button_option(get_string("~m~None")).ref()); + } + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } +} + +void fx_load_menu::feature_update() {} + +fx_load_menu* g_instance; +fx_load_menu* fx_load_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_load_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_load.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_load.h new file mode 100644 index 0000000..68b9fda --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_load.h @@ -0,0 +1,22 @@ +#pragma once +#include "menu/base/submenu.h" + +class fx_load_menu : public menu::submenu::submenu { +public: + static fx_load_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_load_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::load::vars { + struct variables { + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_puddles.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_puddles.cpp new file mode 100644 index 0000000..f71c5c3 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_puddles.cpp @@ -0,0 +1,111 @@ +#include "fx_puddles.h" +#include "menu/base/submenu_handler.h" +#include "../game_fx.h" + +using namespace world::fx::puddles::vars; + +namespace world::fx::puddles::vars { + variables m_vars; +} + +void fx_puddles_menu::load() { + set_name("Puddles"); + set_parent(); + + if (!is_valid_ptr(global::vars::g_ui_puddle) || !is_valid_ptr(global::vars::g_ui_puddle->m_ripples)) { + return; + } + + memcpy(&m_vars.m_original, global::vars::g_ui_puddle, sizeof(rage::types::ui_puddle)); + memcpy(&m_vars.m_original_ripple, global::vars::g_ui_puddle->m_ripples, sizeof(rage::types::ui_puddle_ripple)); + + add_option(number_option(SCROLL, "Scale") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_scale, "%.3f", 0.005f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Range") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_range, "%.2f", 0.05f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Depth") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_depth, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Depth Test") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_depth_test, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Reflectivity") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_reflectivity, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Min Size") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_min_size, "%.3f", 0.005f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Max Size") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_max_size, "%.3f", 0.005f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Min Duration") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_min_duration, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Max Duration") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_max_duration, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Speed") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_speed, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Drop Factor") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_drop_factor, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Wind Strength") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_wind_strength, "%.2f", 0.05f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Strength") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_strength, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Player Speed") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_player_speed, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Player Map Size") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_player_map_size, "%.1f", 0.1f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, "Ripple Wind Damping") + .add_translate() + .add_number(global::vars::g_ui_puddle->m_ripples->m_ripple_wind_damping, "%.2f", 0.05f).add_min(-1000.f).add_max(1000.f).set_scroll_speed(0)); + + add_option(button_option(get_string("Reset to Default")) + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { + memcpy(global::vars::g_ui_puddle, &m_vars.m_original, sizeof(rage::types::ui_puddle)); + memcpy(global::vars::g_ui_puddle->m_ripples, &m_vars.m_original_ripple, sizeof(rage::types::ui_puddle_ripple)); + })); +} + +void fx_puddles_menu::update() {} + +void fx_puddles_menu::update_once() {} + +void fx_puddles_menu::feature_update() {} + +fx_puddles_menu* g_instance; +fx_puddles_menu* fx_puddles_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_puddles_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_puddles.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_puddles.h new file mode 100644 index 0000000..4405f8a --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_puddles.h @@ -0,0 +1,24 @@ +#pragma once +#include "menu/base/submenu.h" + +class fx_puddles_menu : public menu::submenu::submenu { +public: + static fx_puddles_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_puddles_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::puddles::vars { + struct variables { + rage::types::ui_puddle m_original; + rage::types::ui_puddle_ripple m_original_ripple; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_sky.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_sky.cpp new file mode 100644 index 0000000..69176ef --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_sky.cpp @@ -0,0 +1,270 @@ +#include "fx_sky.h" +#include "menu/base/submenu_handler.h" +#include "../game_fx.h" +#include "util/memory/memory.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "../../helper/helper_color.h" +#include "../../helper/helper_rainbow.h" +#include "menu/base/util/instructionals.h" + +using namespace world::fx::sky::vars; + +namespace world::fx::sky::vars { + variables m_vars; + + scroll_struct sky_colors[] = { + { localization("Azimuth East Color", true), &m_vars.m_azimuth_east_color }, + { localization("Azimuth West Color", true), &m_vars.m_azimuth_west_color }, + { localization("Azimuth Transition Color", true), &m_vars.m_azimuth_transition_color }, + { localization("Cloud Base Minus Mid Color", true), &m_vars.m_cloud_base_minus_mid_colour }, + { localization("Cloud Mid Color", true), &m_vars.m_cloud_mid_color }, + { localization("Cloud Shadow Base Color", true), &m_vars.m_cloud_shadow_minus_base_colour_times_shadow_strength }, + { localization("Moon Color", true), &m_vars.m_moon_color }, + { localization("Sky Plane Color", true), &m_vars.m_sky_plane_color }, + { localization("Sun Color", true), &m_vars.m_sun_color }, + { localization("Zenith Color", true), &m_vars.m_zenith_color }, + { localization("Zenith Transition Color", true), &m_vars.m_zenith_transition_color } + }; + + std::pair offsets[] = { + { 1, 0x39 }, // [1] 0x39 + { 1, 0x6D }, // [1] 0x6D + { 1, 0xA1 }, // [1] 0xA1 + { 2, 0x2E1 }, // [2] 0x2E1 + { 1, 0x461 }, // [1] 0x461 + { 2, 0x2CA }, // [2] 0x2CA + { 1, 0x36B }, // [1] 0x36B + { 1, 0x19F }, // [1] 0x19F + { 1, 0x261 }, // [1] 0x261 + { 1, 0xE7 }, // [1] 0xE7 + { 1, 0x121 }, // [1] 0x121 + }; + + void handle_patch(int index, bool reset) { + if (reset) { + // Just patch back the cache, the game will auto-update for us + memory::write_vector(offsets[index].second, sky_colors[index].m_result->m_cache); + + util::fiber::sleep(1000); + + sky_colors[index].m_result->m_color.x = sky_colors[index].m_result->m_memory_color_cache.x; + sky_colors[index].m_result->m_color.y = sky_colors[index].m_result->m_memory_color_cache.y; + sky_colors[index].m_result->m_color.z = sky_colors[index].m_result->m_memory_color_cache.z; + + sky_colors[index].m_result->m_memory_color->x = sky_colors[index].m_result->m_memory_color_cache.x; + sky_colors[index].m_result->m_memory_color->y = sky_colors[index].m_result->m_memory_color_cache.y; + sky_colors[index].m_result->m_memory_color->z = sky_colors[index].m_result->m_memory_color_cache.z; + return; + } + + if (*(uint8_t*)(offsets[index].second) != 0x90) { + memory::nop(offsets[index].second, (int)sky_colors[index].m_result->m_cache.size()); + } + + math::vector3_ floats = sky_colors[index].m_result->m_color; + sky_colors[index].m_result->m_memory_color->x = floats.x * sky_colors[index].m_result->m_luminance; + sky_colors[index].m_result->m_memory_color->y = floats.y * sky_colors[index].m_result->m_luminance; + sky_colors[index].m_result->m_memory_color->z = floats.z * sky_colors[index].m_result->m_luminance; + } + + void reset() { + sky_colors[m_vars.m_selected].m_result->m_rainbow_toggle = false; + sky_colors[m_vars.m_selected].m_result->m_rainbow.stop(); + util::fiber::pool::add([] { handle_patch(m_vars.m_selected, true); }); + } +} + +void fx_sky_menu::load() { + set_name("Sky"); + set_parent(); + + set_default_instructionals(false); + + if (!is_valid_ptr(global::vars::g_ui_weather)) return; + + for (std::pair& offset : offsets) { + if (offset.first == 1) { + offset.second += global::vars::g_update_ui_values; + } else offset.second += global::vars::g_update_ui_values_2; + } + + for (int i = 0; i < 7; i++) { + uint64_t sevens = offsets[2].second; + sky_colors[2].m_result->m_cache.push_back(*(uint8_t*)(sevens + i)); + + sevens = offsets[3].second; + sky_colors[3].m_result->m_cache.push_back(*(uint8_t*)(sevens + i)); + + sevens = offsets[4].second; + sky_colors[4].m_result->m_cache.push_back(*(uint8_t*)(sevens + i)); + + sevens = offsets[5].second; + sky_colors[5].m_result->m_cache.push_back(*(uint8_t*)(sevens + i)); + + sevens = offsets[6].second; + sky_colors[6].m_result->m_cache.push_back(*(uint8_t*)(sevens + i)); + + sevens = offsets[7].second; + sky_colors[7].m_result->m_cache.push_back(*(uint8_t*)(sevens + i)); + + sevens = offsets[8].second; + sky_colors[8].m_result->m_cache.push_back(*(uint8_t*)(sevens + i)); + + sevens = offsets[9].second; + sky_colors[9].m_result->m_cache.push_back(*(uint8_t*)(sevens + i)); + + sevens = offsets[10].second; + sky_colors[10].m_result->m_cache.push_back(*(uint8_t*)(sevens + i)); + } + + for (int i = 0; i < 4; i++) { + uint64_t fours = offsets[0].second; + sky_colors[0].m_result->m_cache.push_back(*(uint8_t*)(fours + i)); + + fours = offsets[1].second; + sky_colors[1].m_result->m_cache.push_back(*(uint8_t*)(fours + i)); + } + + sky_colors[0].m_result->m_memory_color = &global::vars::g_ui_weather->m_azimuth_east_color.m_value; + sky_colors[1].m_result->m_memory_color = &global::vars::g_ui_weather->m_azimuth_west_color.m_value; + sky_colors[2].m_result->m_memory_color = &global::vars::g_ui_weather->m_azimuth_transition_color.m_value; + sky_colors[3].m_result->m_memory_color = &global::vars::g_ui_weather->m_cloud_base_minus_mid_colour.m_value; + sky_colors[4].m_result->m_memory_color = &global::vars::g_ui_weather->m_cloud_mid_color.m_value; + sky_colors[5].m_result->m_memory_color = &global::vars::g_ui_weather->m_cloud_shadow_minus_base_colour_times_shadow_strength.m_value; + sky_colors[6].m_result->m_memory_color = &global::vars::g_ui_weather->m_moon_color.m_value; + sky_colors[7].m_result->m_memory_color = &global::vars::g_ui_weather->m_sky_plane_color.m_value; + sky_colors[8].m_result->m_memory_color = &global::vars::g_ui_weather->m_sun_color.m_value; + sky_colors[9].m_result->m_memory_color = &global::vars::g_ui_weather->m_zenith_color.m_value; + sky_colors[10].m_result->m_memory_color = &global::vars::g_ui_weather->m_zenith_transition_color.m_value; + + for (scroll_struct c : sky_colors) { + if (is_valid_ptr(c.m_result)) { + if (is_valid_ptr(c.m_result->m_memory_color)) { + c.m_result->m_memory_color_cache = *c.m_result->m_memory_color; + + c.m_result->m_internal_color.r = (int)(c.m_result->m_memory_color->x * 255.f); + c.m_result->m_internal_color.g = (int)(c.m_result->m_memory_color->y * 255.f); + c.m_result->m_internal_color.b = (int)(c.m_result->m_memory_color->z * 255.f); + c.m_result->m_internal_color.a = 255; + + if (c.m_result->m_memory_color->x > 1.f) { + c.m_result->m_luminance = c.m_result->m_memory_color->x / 1.f; + c.m_result->m_internal_color.r /= (int)c.m_result->m_luminance; + } + + if(c.m_result->m_memory_color->y > 1.f) { + c.m_result->m_luminance = c.m_result->m_memory_color->y / 1.f; + c.m_result->m_internal_color.g /= (int)c.m_result->m_luminance; + } + + if (c.m_result->m_memory_color->z > 1.f) { + c.m_result->m_luminance = c.m_result->m_memory_color->z / 1.f; + c.m_result->m_internal_color.b /= (int)c.m_result->m_luminance; + } + + if (c.m_result->m_internal_color.r < 0) c.m_result->m_internal_color.r = 0; + if (c.m_result->m_internal_color.g < 0) c.m_result->m_internal_color.g = 0; + if (c.m_result->m_internal_color.b < 0) c.m_result->m_internal_color.b = 0; + + c.m_result->m_color.x = c.m_result->m_memory_color->x; + c.m_result->m_color.y = c.m_result->m_memory_color->y; + c.m_result->m_color.z = c.m_result->m_memory_color->z; + } + } + } + + add_option(scroll_option(SCROLLSELECT, "Element") + .add_translate() + .add_scroll(m_vars.m_selected, 0, NUMOF(sky_colors), sky_colors)); + + add_option(submenu_option("Edit Color") + .add_translate() + .add_submenu() + .add_click([=] { + helper_color_menu::get()->set_name(get_name().get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = &sky_colors[m_vars.m_selected].m_result->m_internal_color; + + helper::color::vars::m_vars.m_callback = [] { + sky_colors[m_vars.m_selected].m_result->m_color.x = sky_colors[m_vars.m_selected].m_result->m_internal_color.r / 255.f; + sky_colors[m_vars.m_selected].m_result->m_color.y = sky_colors[m_vars.m_selected].m_result->m_internal_color.g / 255.f; + sky_colors[m_vars.m_selected].m_result->m_color.z = sky_colors[m_vars.m_selected].m_result->m_internal_color.b / 255.f; + handle_patch(m_vars.m_selected); + }; + }) + .add_update([] (submenu_option* option, int pos) { + option->add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, &sky_colors[m_vars.m_selected].m_result->m_internal_color); + })); + + add_option(number_option(SCROLL, "Luminance") + .add_translate() + .add_number(sky_colors[m_vars.m_selected].m_result->m_luminance, "%.1f", 0.1f).add_min(0.1f).add_max(100.f) + .add_update([](number_option* option, int pos) { option->add_number(sky_colors[m_vars.m_selected].m_result->m_luminance, "%.1f", 0.1f); }) + .add_click([] { handle_patch(m_vars.m_selected); })); + + add_option(toggle_option("Rainbow") + .add_translate() + .add_toggle(sky_colors[m_vars.m_selected].m_result->m_rainbow_toggle) + .add_update([](toggle_option* option, int pos) { option->add_toggle(sky_colors[m_vars.m_selected].m_result->m_rainbow_toggle); }) + .add_click([] { + sky_colors[m_vars.m_selected].m_result->m_rainbow.toggle(sky_colors[m_vars.m_selected].m_result->m_rainbow_toggle); + if (sky_colors[m_vars.m_selected].m_result->m_rainbow_toggle) { + sky_colors[m_vars.m_selected].m_result->m_rainbow.add(&sky_colors[m_vars.m_selected].m_result->m_internal_color); + } else { + sky_colors[m_vars.m_selected].m_result->m_rainbow.remove(&sky_colors[m_vars.m_selected].m_result->m_internal_color); + handle_patch(m_vars.m_selected); + } + })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click(reset)); +} + +void fx_sky_menu::update() { + if (menu::base::get_current_option() == 3) { + instructionals::rainbow(); + + if (menu::input::is_just_pressed(false, ControlFrontendX)) { + helper::rainbow::vars::m_vars.m_rainbow = &sky_colors[m_vars.m_selected].m_result->m_rainbow; + helper_rainbow_menu::get()->set_parent(); + menu::submenu::handler::set_submenu(helper_rainbow_menu::get()); + } + } else instructionals::standard(false, false, false); +} + +void fx_sky_menu::update_once() {} + +void fx_sky_menu::feature_update() { + for (int i = 0; i < NUMOF(sky_colors); i++) { + scroll_struct& c = sky_colors[i]; + if (is_valid_ptr(c.m_result)) { + if (is_valid_ptr(c.m_result->m_memory_color)) { + if (c.m_result->m_rainbow_toggle) { + c.m_result->m_rainbow.run(); + + c.m_result->m_color.x = c.m_result->m_internal_color.r / 255.f; + c.m_result->m_color.y = c.m_result->m_internal_color.g / 255.f; + c.m_result->m_color.z = c.m_result->m_internal_color.b / 255.f; + + handle_patch(i); + } + } + } + } +} + +fx_sky_menu* g_instance; +fx_sky_menu* fx_sky_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_sky_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_sky.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_sky.h new file mode 100644 index 0000000..43b20eb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_sky.h @@ -0,0 +1,50 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/rainbow.h" + +class fx_sky_menu : public menu::submenu::submenu { +public: + static fx_sky_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_sky_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::sky::vars { + struct sky_color { + bool m_rainbow_toggle; + float m_luminance = 1.f; + color_rgba m_internal_color; + math::vector3_ m_color; + math::vector4* m_memory_color; + math::vector4 m_memory_color_cache; + menu::rainbow m_rainbow; + std::vector m_cache; + }; + + struct variables { + sky_color m_azimuth_east_color; + sky_color m_azimuth_west_color; + sky_color m_azimuth_transition_color; + sky_color m_cloud_base_minus_mid_colour; + sky_color m_cloud_mid_color; + sky_color m_cloud_shadow_minus_base_colour_times_shadow_strength; + sky_color m_moon_color; + sky_color m_sky_plane_color; + sky_color m_sun_color; + sky_color m_zenith_color; + sky_color m_zenith_transition_color; + + int m_selected; + bool m_cached; + }; + + void handle_patch(int index = 0, bool reset = false); + extern scroll_struct sky_colors[11]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_traffic.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_traffic.cpp new file mode 100644 index 0000000..66f6de9 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_traffic.cpp @@ -0,0 +1,139 @@ +#include "fx_traffic.h" +#include "menu/base/submenu_handler.h" +#include "../game_fx.h" +#include "util/memory/memory.h" + +using namespace world::fx::traffic::vars; + +namespace world::fx::traffic::vars { + variables m_vars; +} + +void fx_traffic_menu::load() { + set_name("Traffic Lights"); + set_parent(); + + m_vars.m_far_fade_start = (float*)memory::read_instruction(global::vars::g_update_traffic_lights + 0x149, 4, 8); + m_vars.m_far_fade_end = (float*)memory::read_instruction(global::vars::g_update_traffic_lights + 0x13D, 4, 8); + m_vars.m_near_fade_start = (float*)memory::read_instruction(global::vars::g_update_traffic_lights + 0x187, 4, 8); + m_vars.m_near_fade_end = (float*)memory::read_instruction(global::vars::g_update_traffic_lights + 0x17C, 4, 8); + + m_vars.m_near_color.m_color = (rage::types::ui_element_color_struct*)memory::read_instruction(global::vars::g_set_traffic_lights + 0x28, 3, 7); + m_vars.m_red_color.m_color = (math::vector3_*)memory::read_instruction(global::vars::g_set_traffic_light_colors + 0x63, 3, 7); + m_vars.m_green_color.m_color = (math::vector3_*)memory::read_instruction(global::vars::g_set_traffic_light_colors + 0xBD, 3, 7); + m_vars.m_amber_color.m_color = (math::vector3_*)memory::read_instruction(global::vars::g_set_traffic_light_colors + 0x8D, 3, 7); + m_vars.m_walk_color.m_color = (math::vector3_*)memory::read_instruction(global::vars::g_set_traffic_lights + 0x13F, 3, 7); + m_vars.m_dont_walk_color.m_color = (math::vector3_*)memory::read_instruction(global::vars::g_set_traffic_lights + 0x14E, 3, 7); + + m_vars.m_near_color.m_default_color = *m_vars.m_near_color.m_color; + m_vars.m_red_color.m_default_color = *m_vars.m_red_color.m_color; + m_vars.m_green_color.m_default_color = *m_vars.m_green_color.m_color; + m_vars.m_amber_color.m_default_color = *m_vars.m_amber_color.m_color; + m_vars.m_walk_color.m_default_color = *m_vars.m_walk_color.m_color; + m_vars.m_dont_walk_color.m_default_color = *m_vars.m_dont_walk_color.m_color; + + add_option(submenu_option("Near Color") + .add_translate() + .add_submenu() + .add_click([] { + world::fx::ui::color::vars::m_vars.m_color = &m_vars.m_near_color; + fx_ui_color_menu::get()->set_parent(); + })); + + add_option(submenu_option("Red Color") + .add_translate() + .add_submenu() + .add_click([] { + fx_color_menu::get()->set_parent(); + world::fx::color::vars::m_vars.m_color = &m_vars.m_red_color; + })); + + add_option(submenu_option("Amber Color") + .add_translate() + .add_submenu() + .add_click([] { + fx_color_menu::get()->set_parent(); + world::fx::color::vars::m_vars.m_color = &m_vars.m_amber_color; + })); + + add_option(submenu_option("Green Color") + .add_translate() + .add_submenu() + .add_click([] { + fx_color_menu::get()->set_parent(); + world::fx::color::vars::m_vars.m_color = &m_vars.m_green_color; + })); + + add_option(submenu_option("Walk Color") + .add_translate() + .add_submenu() + .add_click([] { + fx_color_menu::get()->set_parent(); + world::fx::color::vars::m_vars.m_color = &m_vars.m_walk_color; + })); + + add_option(submenu_option("Don't Walk Color") + .add_translate() + .add_submenu() + .add_click([] { + fx_color_menu::get()->set_parent(); + world::fx::color::vars::m_vars.m_color = &m_vars.m_dont_walk_color; + })); + + add_option(number_option(SCROLL, "Far Fade Start") + .add_translate() + .add_number(*m_vars.m_far_fade_start, "%.0f", 1.f).add_min(-100.f).add_max(1000000.f)); + + add_option(number_option(SCROLL, "Far Fade End") + .add_translate() + .add_number(*m_vars.m_far_fade_end, "%.0f", 1.f).add_min(-100.f).add_max(1000000.f)); + + add_option(number_option(SCROLL, "Near Fade Start") + .add_translate() + .add_number(*m_vars.m_near_fade_start, "%.0f", 1.f).add_min(-100.f).add_max(1000000.f)); + + add_option(number_option(SCROLL, "Near Fade End") + .add_translate() + .add_number(*m_vars.m_near_fade_end, "%.0f", 1.f).add_min(-100.f).add_max(1000000.f)); +} + +void fx_traffic_menu::update() {} + +void fx_traffic_menu::update_once() {} + +void fx_traffic_menu::feature_update() { + world::fx::color::vars::custom_color* list[] = { + &m_vars.m_red_color, + &m_vars.m_green_color, + &m_vars.m_amber_color, + &m_vars.m_walk_color, + &m_vars.m_dont_walk_color + }; + + for (world::fx::color::vars::custom_color* l : list) { + if (l->m_rainbow_toggle) { + l->m_rainbow.run(); + l->m_color->x = l->m_internal_color.r / 255.f; + l->m_color->y = l->m_internal_color.g / 255.f; + l->m_color->z = l->m_internal_color.b / 255.f; + } + } + + if (m_vars.m_near_color.m_rainbow_toggle) { + m_vars.m_near_color.m_rainbow.run(); + m_vars.m_near_color.m_color->m_color.x = m_vars.m_near_color.m_internal_color.r / 255.f; + m_vars.m_near_color.m_color->m_color.y = m_vars.m_near_color.m_internal_color.g / 255.f; + m_vars.m_near_color.m_color->m_color.z = m_vars.m_near_color.m_internal_color.b / 255.f; + } +} + +fx_traffic_menu* g_instance; +fx_traffic_menu* fx_traffic_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_traffic_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_traffic.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_traffic.h new file mode 100644 index 0000000..35b3788 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_traffic.h @@ -0,0 +1,35 @@ +#pragma once +#include "menu/base/submenu.h" +#include "fx_color.h" +#include "fx_ui_color.h" + +class fx_traffic_menu : public menu::submenu::submenu { +public: + static fx_traffic_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_traffic_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::traffic::vars { + struct variables { + float* m_far_fade_start; + float* m_far_fade_end; + float* m_near_fade_start; + float* m_near_fade_end; + + world::fx::color::vars::custom_color m_red_color; + world::fx::color::vars::custom_color m_green_color; + world::fx::color::vars::custom_color m_amber_color; + world::fx::color::vars::custom_color m_walk_color; + world::fx::color::vars::custom_color m_dont_walk_color; + world::fx::ui::color::vars::custom_color m_near_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_ui_color.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_ui_color.cpp new file mode 100644 index 0000000..619f574 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_ui_color.cpp @@ -0,0 +1,92 @@ +#include "fx_ui_color.h" +#include "menu/base/submenu_handler.h" +#include "fx_color.h" + +using namespace world::fx::ui::color::vars; + +namespace world::fx::ui::color::vars { + variables m_vars; +} + +void fx_ui_color_menu::load() { + set_name("Color"); + + add_string("Edit Color"); + add_string("Intensity"); + add_string("Radius"); + add_string("Falloff Exponent"); + add_string("Inner Cone Angle"); + add_string("Outer Cone Angle"); + add_string("Corona HDR"); + add_string("Corona Size"); + add_string("Shadow Blur"); + add_string("Capsule Length"); + add_string("Save to Config"); + add_string("Reset to Default"); +} + +void fx_ui_color_menu::update() {} + +void fx_ui_color_menu::update_once() { + clear_options(0); + + add_option(submenu_option(get_string("Edit Color")) + .add_translate() + .add_submenu() + .add_click([] { + fx_color_menu::get()->set_parent(); + world::fx::color::vars::m_vars.m_color = nullptr; + world::fx::color::vars::m_vars.m_color2 = m_vars.m_color; + })); + + add_option(number_option(SCROLL, get_string("Intensity")) + .add_number(m_vars.m_color->m_color->m_intensity, "%.2f", 0.05f).add_min(-100.f).add_max(10000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, get_string("Radius")) + .add_number(m_vars.m_color->m_color->m_radius, "%.2f", 0.05f).add_min(-100.f).add_max(10000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, get_string("Falloff Exponent")) + .add_number(m_vars.m_color->m_color->m_falloff_exp, "%.2f", 0.05f).add_min(-100.f).add_max(10000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, get_string("Inner Cone Angle")) + .add_number(m_vars.m_color->m_color->m_inner_cone_angle, "%.2f", 0.05f).add_min(-100.f).add_max(10000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, get_string("Outer Cone Angle")) + .add_number(m_vars.m_color->m_color->m_outer_cone_angle, "%.2f", 0.05f).add_min(-100.f).add_max(10000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, get_string("Corona HDR")) + .add_number(m_vars.m_color->m_color->m_corona_hdr, "%.2f", 0.05f).add_min(-100.f).add_max(10000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, get_string("Corona Size")) + .add_number(m_vars.m_color->m_color->m_corona_size, "%.2f", 0.05f).add_min(-100.f).add_max(10000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, get_string("Shadow Blur")) + .add_number(m_vars.m_color->m_color->m_shadow_blur, "%.2f", 0.05f).add_min(-100.f).add_max(10000.f).set_scroll_speed(0)); + + add_option(number_option(SCROLL, get_string("Capsule Length")) + .add_number(m_vars.m_color->m_color->m_capsule_length, "%.2f", 0.05f).add_min(-100.f).add_max(10000.f).set_scroll_speed(0)); + + add_option(button_option(get_string("Reset to Default")) + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { + m_vars.m_color->m_rainbow_toggle = false; + m_vars.m_color->m_rainbow.stop(); + + memcpy(m_vars.m_color->m_color, &m_vars.m_color->m_default_color, sizeof(rage::types::ui_element_color_struct)); + })); +} + +void fx_ui_color_menu::feature_update() {} + +fx_ui_color_menu* g_instance; +fx_ui_color_menu* fx_ui_color_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_ui_color_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_ui_color.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_ui_color.h new file mode 100644 index 0000000..3f52ba1 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_ui_color.h @@ -0,0 +1,32 @@ +#pragma once +#include "menu/base/submenu.h" +#include "menu/base/util/rainbow.h" + +class fx_ui_color_menu : public menu::submenu::submenu { +public: + static fx_ui_color_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_ui_color_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::ui::color::vars { + struct custom_color { + rage::types::ui_element_color_struct m_default_color; + rage::types::ui_element_color_struct* m_color; + color_rgba m_internal_color; + bool m_rainbow_toggle; + menu::rainbow m_rainbow; + }; + + struct variables { + custom_color* m_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle.cpp new file mode 100644 index 0000000..e50f58e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle.cpp @@ -0,0 +1,102 @@ +#include "fx_vehicle.h" +#include "menu/base/submenu_handler.h" +#include "../game_fx.h" +#include "util/memory/memory.h" + +using namespace world::fx::vehicle::vars; + +namespace world::fx::vehicle::vars { + variables m_vars; +} + +void fx_vehicle_menu::load() { + set_name("Vehicle"); + set_parent(); + + m_vars.m_interior_light_color.m_color = (rage::types::ui_element_color_struct*)memory::read_instruction(global::vars::g_set_vehicle_lights + 0x45, 3, 7); + m_vars.m_plate_light_color.m_color = (rage::types::ui_element_color_struct*)memory::read_instruction(global::vars::g_set_vehicle_lights + 0x90, 3, 7); + m_vars.m_dash_light_color.m_color = (rage::types::ui_element_color_struct*)memory::read_instruction(global::vars::g_set_vehicle_lights + 0xa9, 3, 7); + m_vars.m_door_light_color.m_color = (rage::types::ui_element_color_struct*)memory::read_instruction(global::vars::g_set_vehicle_lights + 0xc2, 3, 7); + + memcpy(&m_vars.m_interior_light_color.m_default_color, m_vars.m_interior_light_color.m_color, sizeof(rage::types::ui_element_color_struct)); + memcpy(&m_vars.m_plate_light_color.m_default_color, m_vars.m_plate_light_color.m_color, sizeof(rage::types::ui_element_color_struct)); + memcpy(&m_vars.m_dash_light_color.m_default_color, m_vars.m_dash_light_color.m_color, sizeof(rage::types::ui_element_color_struct)); + memcpy(&m_vars.m_door_light_color.m_default_color, m_vars.m_door_light_color.m_color, sizeof(rage::types::ui_element_color_struct)); + + add_option(submenu_option("Interior Light") + .add_translate() + .add_submenu() + .add_click([] { + world::fx::ui::color::vars::m_vars.m_color = &m_vars.m_interior_light_color; + fx_ui_color_menu::get()->set_parent(); + })); + + add_option(submenu_option("Plate Light") + .add_translate() + .add_submenu() + .add_click([] { + world::fx::ui::color::vars::m_vars.m_color = &m_vars.m_plate_light_color; + fx_ui_color_menu::get()->set_parent(); + })); + + add_option(submenu_option("Dash Light") + .add_translate() + .add_submenu() + .add_click([] { + world::fx::ui::color::vars::m_vars.m_color = &m_vars.m_dash_light_color; + fx_ui_color_menu::get()->set_parent(); + })); + + add_option(submenu_option("Door Light") + .add_translate() + .add_submenu() + .add_click([] { + world::fx::ui::color::vars::m_vars.m_color = &m_vars.m_door_light_color; + fx_ui_color_menu::get()->set_parent(); + })); +} + +void fx_vehicle_menu::update() {} + +void fx_vehicle_menu::update_once() {} + +void fx_vehicle_menu::feature_update() { + if (m_vars.m_interior_light_color.m_rainbow_toggle) { + m_vars.m_interior_light_color.m_rainbow.run(); + m_vars.m_interior_light_color.m_color->m_color.x = m_vars.m_interior_light_color.m_internal_color.r / 255.f; + m_vars.m_interior_light_color.m_color->m_color.y = m_vars.m_interior_light_color.m_internal_color.g / 255.f; + m_vars.m_interior_light_color.m_color->m_color.z = m_vars.m_interior_light_color.m_internal_color.b / 255.f; + } + + if (m_vars.m_plate_light_color.m_rainbow_toggle) { + m_vars.m_plate_light_color.m_rainbow.run(); + m_vars.m_plate_light_color.m_color->m_color.x = m_vars.m_plate_light_color.m_internal_color.r / 255.f; + m_vars.m_plate_light_color.m_color->m_color.y = m_vars.m_plate_light_color.m_internal_color.g / 255.f; + m_vars.m_plate_light_color.m_color->m_color.z = m_vars.m_plate_light_color.m_internal_color.b / 255.f; + } + + if (m_vars.m_dash_light_color.m_rainbow_toggle) { + m_vars.m_dash_light_color.m_rainbow.run(); + m_vars.m_dash_light_color.m_color->m_color.x = m_vars.m_dash_light_color.m_internal_color.r / 255.f; + m_vars.m_dash_light_color.m_color->m_color.y = m_vars.m_dash_light_color.m_internal_color.g / 255.f; + m_vars.m_dash_light_color.m_color->m_color.z = m_vars.m_dash_light_color.m_internal_color.b / 255.f; + } + + if (m_vars.m_door_light_color.m_rainbow_toggle) { + m_vars.m_door_light_color.m_rainbow.run(); + m_vars.m_door_light_color.m_color->m_color.x = m_vars.m_door_light_color.m_internal_color.r / 255.f; + m_vars.m_door_light_color.m_color->m_color.y = m_vars.m_door_light_color.m_internal_color.g / 255.f; + m_vars.m_door_light_color.m_color->m_color.z = m_vars.m_door_light_color.m_internal_color.b / 255.f; + } +} + +fx_vehicle_menu* g_instance; +fx_vehicle_menu* fx_vehicle_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_vehicle_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle.h new file mode 100644 index 0000000..2f85394 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" +#include "fx_ui_color.h" + +class fx_vehicle_menu : public menu::submenu::submenu { +public: + static fx_vehicle_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_vehicle_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::vehicle::vars { + struct variables { + world::fx::ui::color::vars::custom_color m_interior_light_color; + world::fx::ui::color::vars::custom_color m_plate_light_color; + world::fx::ui::color::vars::custom_color m_dash_light_color; + world::fx::ui::color::vars::custom_color m_door_light_color; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle_neons.cpp b/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle_neons.cpp new file mode 100644 index 0000000..8011b2d --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle_neons.cpp @@ -0,0 +1,90 @@ +#include "fx_vehicle_neons.h" +#include "menu/base/submenu_handler.h" +#include "../game_fx.h" +#include "util/memory/memory.h" + +using namespace world::fx::vehicle::neons::vars; + +namespace world::fx::vehicle::neons::vars { + variables m_vars; +} + +void fx_vehicle_neons_menu::load() { + set_name("Vehicle Neons"); + set_parent(); + + m_vars.m_intensity = (float*)(memory::read_instruction(global::vars::g_set_vehicle_neon_ui + 0x35, 4, 8)); + m_vars.m_radius = (float*)(memory::read_instruction(global::vars::g_set_vehicle_neon_ui + 0x57, 4, 8)); + m_vars.m_fall_off_exponent = (float*)(memory::read_instruction(global::vars::g_set_vehicle_neon_ui + 0x79, 4, 8)); + m_vars.m_capsule_extent_sides = (float*)(memory::read_instruction(global::vars::g_set_vehicle_neon_ui + 0x9B, 4, 8)); + m_vars.m_capsule_extent_front_back = (float*)(memory::read_instruction(global::vars::g_set_vehicle_neon_ui + 0xBD, 4, 8)); + m_vars.m_clip_plane_height = (float*)(memory::read_instruction(global::vars::g_set_vehicle_neon_ui + 0xDF, 4, 8)); + m_vars.m_bike_clip_plane_height = (float*)(memory::read_instruction(global::vars::g_set_vehicle_neon_ui + 0xFB, 4, 8)); + + m_vars.m_backup_intensity = *m_vars.m_intensity; + m_vars.m_backup_radius = *m_vars.m_radius; + m_vars.m_backup_fall_off_exponent = *m_vars.m_fall_off_exponent; + m_vars.m_backup_capsule_extent_sides = *m_vars.m_capsule_extent_sides; + m_vars.m_backup_capsule_extent_front_back = *m_vars.m_capsule_extent_front_back; + m_vars.m_backup_clip_plane_height = *m_vars.m_clip_plane_height; + m_vars.m_backup_bike_clip_plane_height = *m_vars.m_bike_clip_plane_height; + + add_option(number_option(SCROLL, "Intensity") + .add_translate() + .add_number(*m_vars.m_intensity, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Radius") + .add_translate() + .add_number(*m_vars.m_radius, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Falloff Exponent") + .add_translate() + .add_number(*m_vars.m_fall_off_exponent, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Capsule Extent Sides") + .add_translate() + .add_number(*m_vars.m_capsule_extent_sides, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Capsule Extent Front Back") + .add_translate() + .add_number(*m_vars.m_capsule_extent_front_back, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Clip Plane Height") + .add_translate() + .add_number(*m_vars.m_clip_plane_height, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Bike Clip Plane Height") + .add_translate() + .add_number(*m_vars.m_bike_clip_plane_height, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(button_option(get_string("Reset to Default")) + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([=] { + *m_vars.m_intensity = m_vars.m_backup_intensity; + *m_vars.m_radius = m_vars.m_backup_radius; + *m_vars.m_fall_off_exponent = m_vars.m_backup_fall_off_exponent; + *m_vars.m_capsule_extent_sides = m_vars.m_backup_capsule_extent_sides; + *m_vars.m_capsule_extent_front_back = m_vars.m_backup_capsule_extent_front_back; + *m_vars.m_clip_plane_height = m_vars.m_backup_clip_plane_height; + *m_vars.m_bike_clip_plane_height = m_vars.m_backup_bike_clip_plane_height; + })); +} + +void fx_vehicle_neons_menu::update() {} + +void fx_vehicle_neons_menu::update_once() {} + +void fx_vehicle_neons_menu::feature_update() {} + +fx_vehicle_neons_menu* g_instance; +fx_vehicle_neons_menu* fx_vehicle_neons_menu::get() { + if (g_instance == nullptr) { + g_instance = new fx_vehicle_neons_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle_neons.h b/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle_neons.h new file mode 100644 index 0000000..d9e40ca --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/fx/fx_vehicle_neons.h @@ -0,0 +1,37 @@ +#pragma once +#include "menu/base/submenu.h" + +class fx_vehicle_neons_menu : public menu::submenu::submenu { +public: + static fx_vehicle_neons_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + fx_vehicle_neons_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::vehicle::neons::vars { + struct variables { + float m_backup_intensity; + float m_backup_radius; + float m_backup_fall_off_exponent; + float m_backup_capsule_extent_sides; + float m_backup_capsule_extent_front_back; + float m_backup_clip_plane_height; + float m_backup_bike_clip_plane_height; + + float* m_intensity; + float* m_radius; + float* m_fall_off_exponent; + float* m_capsule_extent_sides; + float* m_capsule_extent_front_back; + float* m_clip_plane_height; + float* m_bike_clip_plane_height; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/game_fx.cpp b/GTAV/src/menu/base/submenus/main/world/game_fx.cpp new file mode 100644 index 0000000..a364526 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/game_fx.cpp @@ -0,0 +1,108 @@ +#include "game_fx.h" +#include "menu/base/submenu_handler.h" +#include "../world.h" +#include "util/memory/memory.h" +#include "fx/fx_sky.h" +#include "fx/fx_load.h" +#include "fx/fx_traffic.h" +#include "fx/fx_vehicle.h" +#include "fx/fx_vehicle_neons.h" +#include "fx/fx_puddles.h" +#include "fx/fx_cross_multiplier.h" +#include "fx/fx_liquid.h" + +using namespace world::fx::vars; + +namespace world::fx::vars { + variables m_vars; +} + +void game_fx_menu::load() { + set_name("Game FX"); + set_parent(); + + add_option(submenu_option("Save and Load") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Sky") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Traffic Lights") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Vehicle") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Vehicle Neons") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Puddles") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Cross Multiplier") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Liquid") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Disable Lights") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_lights) + .add_click([] { native::set_blackout(false); }).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Enable Sky") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_sky).add_savable(get_submenu_name_stack()) + .add_click([] { *(bool*)((uint64_t)global::vars::g_ui_weather - 0x60) = m_vars.m_disable_sky; })); + + add_option(number_option(TOGGLE, "Water on Map") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_water_toggle) + .add_number(m_vars.m_water, "%.2f", 0.01f).add_min(0.f).add_max(100.f).set_scroll_speed(10).add_savable(get_submenu_name_stack())); + + add_option(number_option(TOGGLE, "Fog on Map") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_fog_toggle) + .add_number(m_vars.m_fog, "%.4f", 0.0001f).add_min(0.f).add_max(10.f).set_scroll_speed(20).add_savable(get_submenu_name_stack())); +} + +void game_fx_menu::update() {} + +void game_fx_menu::update_once() { + m_vars.m_fog = *(float*)global::vars::g_map_fog_intensity; + m_vars.m_disable_sky = *(bool*)((uint64_t)global::vars::g_ui_weather - 0x60); + m_vars.m_water = *(float*)global::vars::g_render_water_on_map_intensity; +} + +void game_fx_menu::feature_update() { + if (m_vars.m_disable_lights) { + native::set_blackout(true); + } + + if (m_vars.m_water_toggle) { + *(float*)global::vars::g_render_water_on_map_intensity = m_vars.m_water; + } + + if (m_vars.m_fog_toggle) { + *(float*)global::vars::g_map_fog_intensity = m_vars.m_fog; + } +} + +game_fx_menu* g_instance; +game_fx_menu* game_fx_menu::get() { + if (g_instance == nullptr) { + g_instance = new game_fx_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/game_fx.h b/GTAV/src/menu/base/submenus/main/world/game_fx.h new file mode 100644 index 0000000..e24db33 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/game_fx.h @@ -0,0 +1,31 @@ +#pragma once +#include "menu/base/submenu.h" + +class game_fx_menu : public menu::submenu::submenu { +public: + static game_fx_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + game_fx_menu() + : menu::submenu::submenu() {} +}; + +namespace world::fx::vars { + struct variables { + bool m_disable_lights; + bool m_render_water_on_map; + bool m_disable_sky; + + float m_fog; + float m_water; + + bool m_fog_toggle; + bool m_water_toggle; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/local_entities.cpp b/GTAV/src/menu/base/submenus/main/world/local_entities.cpp new file mode 100644 index 0000000..1843b48 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/local_entities.cpp @@ -0,0 +1,346 @@ +#include "local_entities.h" +#include "menu/base/submenu_handler.h" +#include "../world.h" +#include "util/fiber_pool.h" +#include "global/lists.h" +#include "rage/engine.h" +#include "menu/base/submenus/main/spawner/vehicle/edit/spawner_vehicle_manage_edit.h" +#include "menu/base/submenus/main/spawner/object/edit/spawner_object_manage_edit.h" +#include "menu/base/submenus/main/spawner/ped/edit/spawner_ped_manage_edit.h" + +using namespace world::local::vars; + +namespace world::local::vars { + variables m_vars; + + scroll_struct type[] = { + { localization("Vehicle", true), 0 }, + { localization("Object", true), 0 }, + { localization("Ped", true), 0 }, + }; + + scroll_struct driver[] = { + { localization("Kick", true), 0 }, + { localization("Kill", true), 1 } + }; + + scroll_struct boost[] = { + { localization("Forwards", true), 100.f }, + { localization("Backwards", true), -100.f } + }; + + scroll_struct teleport[] = { + { localization("To Me", true), 0 }, + { localization("To Vehicle", true), 1 } + }; +} + +void local_entities_menu::load() { + set_name("Local Entities"); + set_parent(); + + add_option(scroll_option(SCROLL, "Entity Type") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(type), type) + .add_click([this] { update_once(); })); + + m_vars.m_object_esp.m_name_bg_color = { 87, 229, 87, 144 }; + m_vars.m_object_esp.m_snapline_color = { 87, 229, 87, 144 }; + m_vars.m_object_esp.m_2d_box_color = { 87, 229, 87, 144 }; + m_vars.m_object_esp.m_2d_corners_color = { 87, 229, 87, 144 }; + m_vars.m_object_esp.m_3d_box_color = { 87, 229, 87, 144 }; + + m_vars.m_ped_esp.m_name_bg_color = { 249, 159, 24, 180 }; + m_vars.m_ped_esp.m_snapline_color = { 249, 159, 24, 180 }; + m_vars.m_ped_esp.m_2d_box_color = { 249, 159, 24, 180 }; + m_vars.m_ped_esp.m_2d_corners_color = { 249, 159, 24, 180 }; + m_vars.m_ped_esp.m_3d_box_color = { 249, 159, 24, 180 }; + + m_vars.m_vehicle_esp.m_name_bg_color = { 229, 64, 64, 180 }; + m_vars.m_vehicle_esp.m_snapline_color = { 229, 64, 64, 180 }; + m_vars.m_vehicle_esp.m_2d_box_color = { 229, 64, 64, 180 }; + m_vars.m_vehicle_esp.m_2d_corners_color = { 229, 64, 64, 180 }; + m_vars.m_vehicle_esp.m_3d_box_color = { 229, 64, 64, 180 }; + + add_string("ESP"); + add_string("Driver"); + add_string("Boost"); + add_string("Acrobatics"); + add_string("Gravity"); + add_string("Teleport"); + add_string("Fix"); + add_string("Empty Vehicle Seats"); + add_string("Random Paint"); + add_string("Honk Horn"); + add_string("Drive to Me"); + add_string("Explode"); + add_string("Delete"); + add_string("Freeze Position"); + add_string("Revive"); + add_string("Kill"); + add_string("Clone"); +} + +void local_entities_menu::update() {} + +void local_entities_menu::update_once() { + clear_options(1); + + // vehicle + if (m_vars.m_type == 0) { + add_option(submenu_option(get_string("ESP")) + .add_submenu() + .add_click([] { + helper_esp_menu::get()->set_parent(); + helper::esp::vars::m_vars.m_current = &m_vars.m_vehicle_esp; + helper::esp::vars::m_vars.m_current->m_ped = false; + })); + + add_option(scroll_option(SCROLLSELECT, get_string("Driver")) + .add_scroll(m_vars.m_driver, 0, NUMOF(driver), driver) + .add_click([] { spawner::vehicle::manage::edit::vars::run(0, false, true, &m_vars.m_driver); })); + + add_option(scroll_option(SCROLLSELECT, get_string("Boost")) + .add_scroll(m_vars.m_boost, 0, NUMOF(boost), boost) + .add_click([] { spawner::vehicle::manage::edit::vars::run(1, false, true, &m_vars.m_boost); })); + + add_option(scroll_option, math::vector3_>>(SCROLLSELECT, get_string("Acrobatics")) + .add_scroll(m_vars.m_acrobatics, 0, NUMOF(global::lists::g_acrobatics), global::lists::g_acrobatics) + .add_click([] { spawner::vehicle::manage::edit::vars::run(2, false, true, &m_vars.m_acrobatics); })); + + add_option(scroll_option(SCROLLSELECT, get_string("Gravity")) + .add_scroll(m_vars.m_gravity, 0, NUMOF(global::lists::g_gravity), global::lists::g_gravity) + .add_click([] { spawner::vehicle::manage::edit::vars::run(3, false, true, &m_vars.m_gravity); })); + + add_option(scroll_option(SCROLLSELECT, get_string("Teleport")) + .add_scroll(m_vars.m_teleport, 0, 1, teleport) + .add_click([] { spawner::vehicle::manage::edit::vars::run(4, false, true, &m_vars.m_teleport); })); + + add_option(button_option(get_string("Fix")) + .add_click([] { spawner::vehicle::manage::edit::vars::run(5, false, true, nullptr); })); + + add_option(button_option(get_string("Empty Vehicle Seats")) + .add_click([] { spawner::vehicle::manage::edit::vars::run(6, false, true, nullptr); })); + + add_option(button_option(get_string("Random Paint")) + .add_click([] { spawner::vehicle::manage::edit::vars::run(7, false, true, nullptr); })); + + add_option(button_option(get_string("Honk Horn")) + .add_click([] { spawner::vehicle::manage::edit::vars::run(8, false, true, nullptr); })); + + add_option(button_option(get_string("Drive to Me")) + .add_click([] { spawner::vehicle::manage::edit::vars::run(9, false, true, nullptr); })); + + add_option(button_option(get_string("Explode")) + .add_click([] { spawner::vehicle::manage::edit::vars::run(10, false, true, nullptr); })); + + add_option(button_option(get_string("Delete")) + .add_click([] { + spawner::vehicle::manage::edit::vars::run(11, false, true, nullptr); + })); + + return; + } + + // object + if (m_vars.m_type == 1) { + add_option(submenu_option(get_string("ESP")) + .add_submenu() + .add_click([] { + helper_esp_menu::get()->set_parent(); + helper::esp::vars::m_vars.m_current = &m_vars.m_object_esp; + helper::esp::vars::m_vars.m_current->m_ped = false; + })); + + add_option(scroll_option(SCROLLSELECT, get_string("Teleport")) + .add_click([] { spawner::object::manage::edit::vars::run(0, false, true, &m_vars.m_teleport); }) + .add_scroll(m_vars.m_teleport, 0, 1, teleport)); + + add_option(button_option(get_string("Freeze Position")) + .add_click([] { spawner::object::manage::edit::vars::run(1, false, true, 0); })); + + add_option(button_option(get_string("Delete")) + .add_click([] { spawner::object::manage::edit::vars::run(2, false, true, nullptr); })); + + return; + } + + // ped + if (m_vars.m_type == 2) { + add_option(submenu_option(get_string("ESP")) + .add_submenu() + .add_click([] { + helper_esp_menu::get()->set_parent(); + helper::esp::vars::m_vars.m_current = &m_vars.m_ped_esp; + m_vars.m_ped_esp.m_ped = true; + })); + + add_option(scroll_option(SCROLLSELECT, get_string("Teleport")) + .add_click([] { spawner::ped::manage::edit::vars::run(0, false, true, &m_vars.m_teleport); }) + .add_scroll(m_vars.m_teleport, 0, NUMOF(teleport), teleport)); + + add_option(button_option(get_string("Revive")) + .add_click([] { spawner::ped::manage::edit::vars::run(2, false, true, nullptr); })); + + add_option(button_option(get_string("Kill")) + .add_click([] { spawner::ped::manage::edit::vars::run(3, false, true, nullptr); })); + + add_option(button_option(get_string("Explode")) + .add_click([] { spawner::ped::manage::edit::vars::run(4, false, true, nullptr); })); + + add_option(button_option(get_string("Clone")) + .add_click([] { spawner::ped::manage::edit::vars::run(5, false, true, nullptr); })); + + add_option(button_option(get_string("Delete")) + .add_click([] { spawner::ped::manage::edit::vars::run(1, false, true, nullptr); })); + } +} + +void local_entities_menu::feature_update() { + if (m_vars.m_vehicle_esp.m_name + || m_vars.m_vehicle_esp.m_snapline + || m_vars.m_vehicle_esp.m_2d_box + || m_vars.m_vehicle_esp.m_2d_corners + || m_vars.m_vehicle_esp.m_3d_box + || m_vars.m_vehicle_esp.m_3d_axis) { + global::vars::g_vehicle_pool->for_each([] (Entity entity, void* veh) { + if (entity == menu::player::get_local_player().m_vehicle) return; + + if (m_vars.m_vehicle_esp.m_name) { + helper::esp::vars::name_esp(m_vars.m_vehicle_esp, entity, native::get_label_text(native::get_display_name_from_vehicle_model(native::get_entity_model(entity)))); + } + + if (m_vars.m_vehicle_esp.m_snapline) { + helper::esp::vars::snapline_esp(m_vars.m_vehicle_esp, entity); + } + + if (m_vars.m_vehicle_esp.m_2d_box) { + helper::esp::vars::_2d_esp(m_vars.m_vehicle_esp, entity, 0); + } + + if (m_vars.m_vehicle_esp.m_2d_corners) { + helper::esp::vars::_2d_esp(m_vars.m_vehicle_esp, entity, 1); + } + + if (m_vars.m_vehicle_esp.m_3d_box) { + helper::esp::vars::_3d_esp(m_vars.m_vehicle_esp, entity, 0); + } + + if (m_vars.m_vehicle_esp.m_3d_axis) { + helper::esp::vars::_3d_esp(m_vars.m_vehicle_esp, entity, 1); + } + + if (m_vars.m_vehicle_esp.m_2d_box_rainbow.m_rainbow_toggle) m_vars.m_vehicle_esp.m_2d_box_rainbow.m_rainbow.run(); + if (m_vars.m_vehicle_esp.m_2d_corners_rainbow.m_rainbow_toggle) m_vars.m_vehicle_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (m_vars.m_vehicle_esp.m_3d_box_rainbow.m_rainbow_toggle) m_vars.m_vehicle_esp.m_3d_box_rainbow.m_rainbow.run(); + if (m_vars.m_vehicle_esp.m_name_bg_rainbow.m_rainbow_toggle) m_vars.m_vehicle_esp.m_name_bg_rainbow.m_rainbow.run(); + if (m_vars.m_vehicle_esp.m_name_text_rainbow.m_rainbow_toggle) m_vars.m_vehicle_esp.m_name_text_rainbow.m_rainbow.run(); + if (m_vars.m_vehicle_esp.m_snapline_rainbow.m_rainbow_toggle) m_vars.m_vehicle_esp.m_snapline_rainbow.m_rainbow.run(); + }); + } + + if (m_vars.m_object_esp.m_name + || m_vars.m_object_esp.m_snapline + || m_vars.m_object_esp.m_2d_box + || m_vars.m_object_esp.m_2d_corners + || m_vars.m_object_esp.m_3d_box + || m_vars.m_object_esp.m_3d_axis) { + global::vars::g_object_pool->for_each([] (Entity entity, void* object) { + if (m_vars.m_object_esp.m_name) { + helper::esp::vars::name_esp(m_vars.m_object_esp, entity); + } + + if (m_vars.m_object_esp.m_snapline) { + helper::esp::vars::snapline_esp(m_vars.m_object_esp, entity); + } + + if (m_vars.m_object_esp.m_2d_box) { + helper::esp::vars::_2d_esp(m_vars.m_object_esp, entity, 0); + } + + if (m_vars.m_object_esp.m_2d_corners) { + helper::esp::vars::_2d_esp(m_vars.m_object_esp, entity, 1); + } + + if (m_vars.m_object_esp.m_3d_box) { + helper::esp::vars::_3d_esp(m_vars.m_object_esp, entity, 0); + } + + if (m_vars.m_object_esp.m_3d_axis) { + helper::esp::vars::_3d_esp(m_vars.m_object_esp, entity, 1); + } + + if (m_vars.m_object_esp.m_2d_box_rainbow.m_rainbow_toggle) m_vars.m_object_esp.m_2d_box_rainbow.m_rainbow.run(); + if (m_vars.m_object_esp.m_2d_corners_rainbow.m_rainbow_toggle) m_vars.m_object_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (m_vars.m_object_esp.m_3d_box_rainbow.m_rainbow_toggle) m_vars.m_object_esp.m_3d_box_rainbow.m_rainbow.run(); + if (m_vars.m_object_esp.m_name_bg_rainbow.m_rainbow_toggle) m_vars.m_object_esp.m_name_bg_rainbow.m_rainbow.run(); + if (m_vars.m_object_esp.m_name_text_rainbow.m_rainbow_toggle) m_vars.m_object_esp.m_name_text_rainbow.m_rainbow.run(); + if (m_vars.m_object_esp.m_snapline_rainbow.m_rainbow_toggle) m_vars.m_object_esp.m_snapline_rainbow.m_rainbow.run(); + }); + } + + if (m_vars.m_ped_esp.m_name + || m_vars.m_ped_esp.m_snapline + || m_vars.m_ped_esp.m_2d_box + || m_vars.m_ped_esp.m_2d_corners + || m_vars.m_ped_esp.m_3d_box + || m_vars.m_ped_esp.m_3d_axis + || m_vars.m_ped_esp.m_skeleton_bones + || m_vars.m_ped_esp.m_skeleton_joints) { + global::vars::g_ped_pool->for_each([] (Entity entity, void* ped) { + if (entity == menu::player::get_local_player().m_ped) return; + + if (m_vars.m_ped_esp.m_name) { + helper::esp::vars::name_esp(m_vars.m_ped_esp, entity); + } + + if (m_vars.m_ped_esp.m_snapline) { + helper::esp::vars::snapline_esp(m_vars.m_ped_esp, entity); + } + + if (m_vars.m_ped_esp.m_2d_box) { + helper::esp::vars::_2d_esp(m_vars.m_ped_esp, entity, 0); + } + + if (m_vars.m_ped_esp.m_2d_corners) { + helper::esp::vars::_2d_esp(m_vars.m_ped_esp, entity, 1); + } + + if (m_vars.m_ped_esp.m_3d_box) { + helper::esp::vars::_3d_esp(m_vars.m_ped_esp, entity, 0); + } + + if (m_vars.m_ped_esp.m_3d_axis) { + helper::esp::vars::_3d_esp(m_vars.m_ped_esp, entity, 1); + } + + if (m_vars.m_ped_esp.m_skeleton_bones) { + helper::esp::vars::skeleton_esp(m_vars.m_ped_esp, entity, 0); + } + + if (m_vars.m_ped_esp.m_skeleton_joints) { + helper::esp::vars::skeleton_esp(m_vars.m_ped_esp, entity, 1); + } + + if (m_vars.m_ped_esp.m_2d_box_rainbow.m_rainbow_toggle) m_vars.m_ped_esp.m_2d_box_rainbow.m_rainbow.run(); + if (m_vars.m_ped_esp.m_2d_corners_rainbow.m_rainbow_toggle) m_vars.m_ped_esp.m_2d_corners_rainbow.m_rainbow.run(); + if (m_vars.m_ped_esp.m_3d_box_rainbow.m_rainbow_toggle) m_vars.m_ped_esp.m_3d_box_rainbow.m_rainbow.run(); + if (m_vars.m_ped_esp.m_name_bg_rainbow.m_rainbow_toggle) m_vars.m_ped_esp.m_name_bg_rainbow.m_rainbow.run(); + if (m_vars.m_ped_esp.m_name_text_rainbow.m_rainbow_toggle) m_vars.m_ped_esp.m_name_text_rainbow.m_rainbow.run(); + if (m_vars.m_ped_esp.m_snapline_rainbow.m_rainbow_toggle) m_vars.m_ped_esp.m_snapline_rainbow.m_rainbow.run(); + if (m_vars.m_ped_esp.m_skeleton_bones_rainbow.m_rainbow_toggle) m_vars.m_ped_esp.m_skeleton_bones_rainbow.m_rainbow.run(); + if (m_vars.m_ped_esp.m_skeleton_joints_rainbow.m_rainbow_toggle) m_vars.m_ped_esp.m_skeleton_joints_rainbow.m_rainbow.run(); + }); + } +} + +local_entities_menu* g_instance; +local_entities_menu* local_entities_menu::get() { + if (g_instance == nullptr) { + g_instance = new local_entities_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/local_entities.h b/GTAV/src/menu/base/submenus/main/world/local_entities.h new file mode 100644 index 0000000..569da97 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/local_entities.h @@ -0,0 +1,34 @@ +#pragma once +#include "menu/base/submenu.h" +#include "../helper/helper_esp.h" + +class local_entities_menu : public menu::submenu::submenu { +public: + static local_entities_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + local_entities_menu() + : menu::submenu::submenu() {} +}; + +namespace world::local::vars { + struct variables { + int m_type; + + int m_driver; + int m_boost; + int m_acrobatics; + int m_gravity; + int m_teleport; + + helper::esp::vars::esp_context m_vehicle_esp; + helper::esp::vars::esp_context m_object_esp; + helper::esp::vars::esp_context m_ped_esp; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/ocean.cpp b/GTAV/src/menu/base/submenus/main/world/ocean.cpp new file mode 100644 index 0000000..50ab3bd --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/ocean.cpp @@ -0,0 +1,145 @@ +#include "ocean.h" +#include "menu/base/submenu_handler.h" +#include "../world.h" +#include "ocean/ocean_tuning.h" +#include "ocean/ocean_quads.h" + +using namespace world::ocean::vars; + +namespace world::ocean::vars { + variables m_vars; + + void ocean_loop(eOceanTypes type, std::function callback) { + uint64_t quad_pool = 0; + short quad_count = 0; + + switch (type) { + case OCEAN_TYPE_OCEAN: + quad_pool = global::vars::g_ocean_quads.m_ocean->m_quad_pool; + quad_count = global::vars::g_ocean_quads.m_ocean->m_quad_count; + break; + + case OCEAN_TYPE_WAVE: + quad_pool = global::vars::g_ocean_quads.m_wave->m_quad_pool; + quad_count = global::vars::g_ocean_quads.m_wave->m_quad_count; + break; + + case OCEAN_TYPE_CALMING: + quad_pool = global::vars::g_ocean_quads.m_calming->m_quad_pool; + quad_count = global::vars::g_ocean_quads.m_calming->m_quad_count; + break; + } + + for (short i = 0; i < quad_count; i++) { + switch (type) { + case OCEAN_TYPE_OCEAN: + callback((quad_pool + (i * sizeof(rage::types::ocean_quad)))); + break; + + case OCEAN_TYPE_WAVE: + callback((quad_pool + (i * sizeof(rage::types::ocean_wave_quad)))); + break; + + case OCEAN_TYPE_CALMING: + callback((quad_pool + (i * sizeof(rage::types::ocean_calming_quad)))); + break; + } + } + } + + void ocean_task(eOceanTypes type, eOceanTasks task) { + ocean_loop(type, [=](uint64_t pool) { + switch (task) { + case OCEAN_DISABLE: { + rage::types::ocean_quad* quad = (rage::types::ocean_quad*)(pool); + + if (m_vars.m_disable_ocean && quad->m_height == 0.0f) { + quad->m_height = -10000.0f; + } else if (!m_vars.m_disable_ocean && quad->m_height == -10000.0f) { + quad->m_height = 0.0f; + } + + break; + } + + case OCEAN_CLEAR: { + rage::types::ocean_quad* quad = (rage::types::ocean_quad*)(pool); + quad->m_alpha = m_vars.m_clear_ocean ? 0x01010101 : 0x1A1A1A1A; + break; + } + + case OCEAN_FIERCE: { + rage::types::ocean_wave_quad* quad = (rage::types::ocean_wave_quad*)(pool); + quad->m_amplitude = m_vars.m_fierce_ocean ? quad->m_amplitude + 2000 : quad->m_amplitude - 2000; + break; + } + } + }); + } +} + +void ocean_menu::load() { + set_name("Ocean"); + set_parent(); + + add_option(submenu_option("Ocean Quads") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Ocean Tuning") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(toggle_option("Disable Ocean") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_disable_ocean) + .add_click([] { ocean_task(OCEAN_TYPE_OCEAN, OCEAN_DISABLE); })); + + add_option(toggle_option("Clear Ocean") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_clear_ocean) + .add_click([] { ocean_task(OCEAN_TYPE_OCEAN, OCEAN_CLEAR); })); + + add_option(toggle_option("Fierce Ocean") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_fierce_ocean) + .add_click([] { ocean_task(OCEAN_TYPE_WAVE, OCEAN_FIERCE); })); + + add_option(toggle_option("Part Water") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_part_water)); + + add_option(number_option(SCROLL, "Wave Intensity") + .add_translate().add_hotkey() + .add_number(m_vars.m_wave_intensity, "%.1f", 0.1f).add_min(0.f).add_max(10.f) + .add_click([] { native::set_waves_intensity(m_vars.m_wave_intensity); })); +} + +void ocean_menu::update() {} + +void ocean_menu::update_once() { + m_vars.m_wave_intensity = native::get_waves_intensity(); +} + +void ocean_menu::feature_update() { + if (m_vars.m_part_water) { + float offset[] = { -4, 4 }; + for (int i = 0; i < 5; i++) { + math::vector3 current_coords = menu::player::get_local_player().m_coords; + if (i < 2) current_coords.x += offset[(i % 2 == 0)]; + else if (i < 4) current_coords.y += offset[(i % 2 == 0)]; + native::modify_water(current_coords.x, current_coords.y, -500000.0f, 0.2f); + } + } +} + +ocean_menu* g_instance; +ocean_menu* ocean_menu::get() { + if (g_instance == nullptr) { + g_instance = new ocean_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/ocean.h b/GTAV/src/menu/base/submenus/main/world/ocean.h new file mode 100644 index 0000000..42fbccb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/ocean.h @@ -0,0 +1,42 @@ +#pragma once +#include "menu/base/submenu.h" + +class ocean_menu : public menu::submenu::submenu { +public: + static ocean_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + ocean_menu() + : menu::submenu::submenu() {} +}; + +namespace world::ocean::vars { + enum eOceanTasks { + OCEAN_DISABLE, + OCEAN_CLEAR, + OCEAN_FIERCE + }; + + enum eOceanTypes { + OCEAN_TYPE_OCEAN, + OCEAN_TYPE_WAVE, + OCEAN_TYPE_CALMING + }; + + struct variables { + bool m_disable_ocean; + bool m_clear_ocean; + bool m_fierce_ocean; + bool m_part_water; + + float m_wave_intensity; + }; + + void ocean_loop(eOceanTypes type, std::function callback); + void ocean_task(eOceanTypes type, eOceanTasks task); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads.cpp b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads.cpp new file mode 100644 index 0000000..0230522 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads.cpp @@ -0,0 +1,80 @@ +#include "ocean_quads.h" +#include "menu/base/submenu_handler.h" +#include "../ocean.h" +#include "ocean_quads_edit.h" + +using namespace world::ocean::quads::vars; + +namespace world::ocean::quads::vars { + variables m_vars; + + scroll_struct ocean_types[] = { + { localization("Ocean", true), world::ocean::vars::OCEAN_TYPE_OCEAN }, + { localization("Calming", true), world::ocean::vars::OCEAN_TYPE_CALMING }, + { localization("Wave", true), world::ocean::vars::OCEAN_TYPE_WAVE } + }; + + math::vector3 get_quad_coords(uint64_t address) { + rage::types::ocean_quad* water_quad_coords = (rage::types::ocean_quad*)address; + + math::vector3 coords = { 0.f, 0.f, 0.f }; + coords.x = (float)(water_quad_coords->m_min.x + water_quad_coords->m_max.x) / 2.0f; + coords.y = (float)(water_quad_coords->m_min.y + water_quad_coords->m_max.y) / 2.0f; + + if (m_vars.m_type == 0) { + coords.z = water_quad_coords->m_height; + } + + return coords; + } + + void cache_closest() { + m_vars.m_closest_quad = 0; + + float distance = std::numeric_limits::max(); + world::ocean::vars::ocean_loop(ocean_types[m_vars.m_type].m_result, [&](uint64_t pool) { + float d = get_quad_coords(pool).get_distance(menu::player::get_local_player().m_coords); + if (d < distance) { + distance = d; + m_vars.m_closest_quad = pool; + } + }); + } + + void quad_esp() { + if (m_vars.m_closest_quad) { + menu::renderer::draw_line(menu::player::get_local_player().m_coords, get_quad_coords(m_vars.m_closest_quad), { 255, 255, 255, 255 }); + } + } +} + +void ocean_quads_menu::load() { + set_name("Ocean Quads"); + set_parent(); + + add_option(scroll_option(SCROLL, "Quad Type") + .add_translate() + .add_scroll(m_vars.m_type, 0, NUMOF(ocean_types), ocean_types)); + + add_option(submenu_option("Edit Nearest Quad") + .add_translate().add_hotkey() + .add_submenu() + .add_hover([](submenu_option*) { cache_closest(); quad_esp(); })); +} + +void ocean_quads_menu::update() {} + +void ocean_quads_menu::update_once() {} + +void ocean_quads_menu::feature_update() {} + +ocean_quads_menu* g_instance; +ocean_quads_menu* ocean_quads_menu::get() { + if (g_instance == nullptr) { + g_instance = new ocean_quads_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads.h b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads.h new file mode 100644 index 0000000..9f43de2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads.h @@ -0,0 +1,25 @@ +#pragma once +#include "menu/base/submenu.h" + +class ocean_quads_menu : public menu::submenu::submenu { +public: + static ocean_quads_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + ocean_quads_menu() + : menu::submenu::submenu() {} +}; + +namespace world::ocean::quads::vars { + struct variables { + int m_type; + uint64_t m_closest_quad; + }; + + void quad_esp(); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads_edit.cpp b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads_edit.cpp new file mode 100644 index 0000000..100a56b --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads_edit.cpp @@ -0,0 +1,103 @@ +#include "ocean_quads_edit.h" +#include "menu/base/submenu_handler.h" +#include "ocean_quads.h" + +using namespace world::ocean::quads::edit::vars; + +namespace world::ocean::quads::edit::vars { + variables m_vars; +} + +void ocean_quads_edit_menu::load() { + set_name("Ocean Quads"); + set_parent(); + + add_string("Minimum - X"); + add_string("Minimum - Y"); + add_string("Maximum - X"); + add_string("Maximum - Y"); + add_string("Height"); + add_string("Clear"); + add_string("Dampening"); + add_string("Amplitude"); + add_string("Direction - X"); + add_string("Direction - Y"); +} + +void ocean_quads_edit_menu::update() { + world::ocean::quads::vars::quad_esp(); +} + +void ocean_quads_edit_menu::update_once() { + clear_options(0); + + m_vars.m_calming = (rage::types::ocean_calming_quad*)world::ocean::quads::vars::m_vars.m_closest_quad; + m_vars.m_wave = (rage::types::ocean_wave_quad*)world::ocean::quads::vars::m_vars.m_closest_quad; + m_vars.m_ocean = (rage::types::ocean_quad*)world::ocean::quads::vars::m_vars.m_closest_quad; + + add_option(number_option(SCROLL, get_string("Minimum - X")) + .add_number(m_vars.m_ocean->m_min.x, "%i", 1) + .add_min(std::numeric_limits::min()) + .add_max(std::numeric_limits::max()).set_scroll_speed(10)); + + add_option(number_option(SCROLL, get_string("Minimum - Y")) + .add_number(m_vars.m_ocean->m_min.y, "%i", 1) + .add_min(std::numeric_limits::min()) + .add_max(std::numeric_limits::max()).set_scroll_speed(10)); + + add_option(number_option(SCROLL, get_string("Maximum - X")) + .add_number(m_vars.m_ocean->m_max.x, "%i", 1) + .add_min(std::numeric_limits::min()) + .add_max(std::numeric_limits::max()).set_scroll_speed(10)); + + add_option(number_option(SCROLL, get_string("Maximum - Y")) + .add_number(m_vars.m_ocean->m_max.y, "%i", 1) + .add_min(std::numeric_limits::min()) + .add_max(std::numeric_limits::max()).set_scroll_speed(10)); + + /* Ocean */ + if (world::ocean::quads::vars::m_vars.m_type == 0) { + add_option(number_option(SCROLL, get_string("Height")) + .add_number(m_vars.m_ocean->m_height, "%.0f", 1.f) + .add_min(-10000.f).add_max(10000.f).set_scroll_speed(10)); + + m_vars.m_clear = m_vars.m_ocean->m_alpha != 0x1A1A1A1A; + + add_option(toggle_option(get_string("Clear")) + .add_toggle(m_vars.m_clear) + .add_click([] { m_vars.m_ocean->m_alpha = m_vars.m_clear ? 0x01010101 : 0x1A1A1A1A; })); + return; + } + + /* Calming */ + if (world::ocean::quads::vars::m_vars.m_type == 1) { + add_option(number_option(SCROLL, get_string("Dampening")) + .add_number(m_vars.m_calming->m_dampening, "%.1f", 0.1f).add_min(0.f).add_max(10000.f).set_scroll_speed(10)); + return; + } + + /* Wave */ + if (world::ocean::quads::vars::m_vars.m_type == 2) { + add_option(number_option(SCROLL, get_string("Amplitude")) + .add_number(m_vars.m_wave->m_amplitude, "%i", 1).add_min(0).add_max(10000).set_scroll_speed(10)); + + add_option(number_option(SCROLL, get_string("Direction - X")) + .add_number(m_vars.m_wave->m_direction.x, "%i", 1).add_min(0).add_max(255)); + + add_option(number_option(SCROLL, get_string("Direction - Y")) + .add_number(m_vars.m_wave->m_direction.y, "%i", 1).add_min(0).add_max(255)); + } +} + +void ocean_quads_edit_menu::feature_update() {} + +ocean_quads_edit_menu* g_instance; +ocean_quads_edit_menu* ocean_quads_edit_menu::get() { + if (g_instance == nullptr) { + g_instance = new ocean_quads_edit_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads_edit.h b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads_edit.h new file mode 100644 index 0000000..cfd06a6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_quads_edit.h @@ -0,0 +1,27 @@ +#pragma once +#include "menu/base/submenu.h" + +class ocean_quads_edit_menu : public menu::submenu::submenu { +public: + static ocean_quads_edit_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + ocean_quads_edit_menu() + : menu::submenu::submenu() {} +}; + +namespace world::ocean::quads::edit::vars { + struct variables { + rage::types::ocean_calming_quad* m_calming; + rage::types::ocean_wave_quad* m_wave; + rage::types::ocean_quad* m_ocean; + + bool m_clear; + }; + + extern variables m_vars; +} diff --git a/GTAV/src/menu/base/submenus/main/world/ocean/ocean_tuning.cpp b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_tuning.cpp new file mode 100644 index 0000000..416b9cb --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_tuning.cpp @@ -0,0 +1,128 @@ +#include "ocean_tuning.h" +#include "menu/base/submenu_handler.h" +#include "../ocean.h" + +using namespace world::ocean::tuning::vars; + +namespace world::ocean::tuning::vars { + variables m_vars; +} + +void ocean_tuning_menu::load() { + set_name("Ocean Tuning"); + set_parent(); + + add_option(number_option(SCROLL, "Ripple Scale") + .add_translate() + .add_number(m_vars.m_water_tune.m_ripple_scale, "%.2f", 0.01f).add_min(0.f).add_max(100.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_ripple_scale = m_vars.m_water_tune.m_ripple_scale; })); + + add_option(number_option(SCROLL, "Foam Scale") + .add_translate() + .add_number(m_vars.m_water_tune.m_ocean_foam_scale, "%.2f", 0.01f).add_min(0.f).add_max(100.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_ocean_foam_scale = m_vars.m_water_tune.m_ocean_foam_scale; })); + + add_option(number_option(SCROLL, "Specular Falloff") + .add_translate() + .add_number(m_vars.m_water_tune.m_specular_falloff, "%.0f", 1.f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_specular_falloff = m_vars.m_water_tune.m_specular_falloff; })); + + add_option(number_option(SCROLL, "Fog Pierce Intensity") + .add_translate() + .add_number(m_vars.m_water_tune.m_fog_pierce_intensity, "%.1f", 0.1f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_fog_pierce_intensity = m_vars.m_water_tune.m_fog_pierce_intensity; })); + + add_option(number_option(SCROLL, "Refraction Blend") + .add_translate() + .add_number(m_vars.m_water_tune.m_refraction_blend, "%.1f", 0.1f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_refraction_blend = m_vars.m_water_tune.m_refraction_blend; })); + + add_option(number_option(SCROLL, "Refraction Exponent") + .add_translate() + .add_number(m_vars.m_water_tune.m_refraction_exponent, "%.2f", 0.25f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_refraction_exponent = m_vars.m_water_tune.m_refraction_exponent; })); + + add_option(number_option(SCROLL, "Water Cycle Depth") + .add_translate() + .add_number(m_vars.m_water_tune.m_water_cycle_depth, "%.0f", 1.f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_water_cycle_depth = m_vars.m_water_tune.m_water_cycle_depth; })); + + add_option(number_option(SCROLL, "Water Cycle Fade") + .add_translate() + .add_number(m_vars.m_water_tune.m_water_cycle_fade, "%.0f", 1.f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_water_cycle_fade = m_vars.m_water_tune.m_water_cycle_fade; })); + + add_option(number_option(SCROLL, "Water Lightning Depth") + .add_translate() + .add_number(m_vars.m_water_tune.m_water_lightning_depth, "%.0f", 1.f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_water_lightning_depth = m_vars.m_water_tune.m_water_lightning_depth; })); + + add_option(number_option(SCROLL, "Water Lightning Fade") + .add_translate() + .add_number(m_vars.m_water_tune.m_water_lightning_fade, "%.0f", 1.f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_water_lightning_fade = m_vars.m_water_tune.m_water_lightning_fade; })); + + add_option(number_option(SCROLL, "Deep Water Mod Depth") + .add_translate() + .add_number(m_vars.m_water_tune.m_deep_water_mod_depth, "%.0f", 1.f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_deep_water_mod_depth = m_vars.m_water_tune.m_deep_water_mod_depth; })); + + add_option(number_option(SCROLL, "Deep Water Mod Fade") + .add_translate() + .add_number(m_vars.m_water_tune.m_deep_water_mod_fade, "%.0f", 1.f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_deep_water_mod_fade = m_vars.m_water_tune.m_deep_water_mod_fade; })); + + add_option(number_option(SCROLL, "God Rays Lerp Start") + .add_translate() + .add_number(m_vars.m_water_tune.m_god_rays_lerp_start, "%.0f", 1.f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_god_rays_lerp_start = m_vars.m_water_tune.m_god_rays_lerp_start; })); + + add_option(number_option(SCROLL, "God Rays Lerp End") + .add_translate() + .add_number(m_vars.m_water_tune.m_god_rays_lerp_end, "%.0f", 1.f).add_min(0.f).add_max(10000.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_god_rays_lerp_end = m_vars.m_water_tune.m_god_rays_lerp_end; })); + + add_option(number_option(SCROLL, "Disturb Foam Scale") + .add_translate() + .add_number(m_vars.m_water_tune.m_disturb_foam_scale, "%.2f", 0.01f).add_min(0.f).add_max(100.f).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_disturb_foam_scale = m_vars.m_water_tune.m_disturb_foam_scale; })); + + add_option(number_option(SCROLL, "Fog Minimum - X") + .add_translate() + .add_number(m_vars.m_water_tune.m_fog_min.x, "%.0f", 1.f).add_min(-std::numeric_limits::max()).add_max(std::numeric_limits::max()).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_fog_min.x = m_vars.m_water_tune.m_fog_min.x; })); + + add_option(number_option(SCROLL, "Fog Minimum - Y") + .add_translate() + .add_number(m_vars.m_water_tune.m_fog_min.y, "%.0f", 1.f).add_min(-std::numeric_limits::max()).add_max(std::numeric_limits::max()).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_fog_min.y = m_vars.m_water_tune.m_fog_min.y; })); + + add_option(number_option(SCROLL, "Fog Maximum - X") + .add_translate() + .add_number(m_vars.m_water_tune.m_fog_max.x, "%.0f", 1.f).add_min(-std::numeric_limits::max()).add_max(std::numeric_limits::max()).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_fog_max.x = m_vars.m_water_tune.m_fog_max.x; })); + + add_option(number_option(SCROLL, "Fog Maximum - Y") + .add_translate() + .add_number(m_vars.m_water_tune.m_fog_max.y, "%.0f", 1.f).add_min(-std::numeric_limits::max()).add_max(std::numeric_limits::max()).set_scroll_speed(10) + .add_click([] { global::vars::g_water_tune->m_fog_max.y = m_vars.m_water_tune.m_fog_max.y; })); +} + +void ocean_tuning_menu::update() {} + +void ocean_tuning_menu::update_once() { + memcpy(&m_vars.m_water_tune, global::vars::g_water_tune, sizeof(m_vars.m_water_tune)); +} + +void ocean_tuning_menu::feature_update() {} + +ocean_tuning_menu* g_instance; +ocean_tuning_menu* ocean_tuning_menu::get() { + if (g_instance == nullptr) { + g_instance = new ocean_tuning_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/world/ocean/ocean_tuning.h b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_tuning.h new file mode 100644 index 0000000..460fe9e --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/ocean/ocean_tuning.h @@ -0,0 +1,23 @@ +#pragma once +#include "menu/base/submenu.h" + +class ocean_tuning_menu : public menu::submenu::submenu { +public: + static ocean_tuning_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + ocean_tuning_menu() + : menu::submenu::submenu() {} +}; + +namespace world::ocean::tuning::vars { + struct variables { + rage::types::water_tune m_water_tune; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/time/time_preset.cpp b/GTAV/src/menu/base/submenus/main/world/time/time_preset.cpp new file mode 100644 index 0000000..b7a19e2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/time/time_preset.cpp @@ -0,0 +1,65 @@ +#include "time_preset.h" +#include "menu/base/submenu_handler.h" +#include "../world_time.h" +#include "rage/engine.h" +#include "../world_weather.h" + +using namespace world::time::preset::vars; + +namespace world::time::preset::vars { + variables m_vars; +} + +void time_preset_menu::load() { + set_name("Presets"); + set_parent(); + + add_option(button_option("Noon") + .add_translate().add_hotkey() + .add_update_this([=](button_option* option, int position) { + option->add_offset(0.0165f); + menu::renderer::draw_sprite({ "ozarktextures", "time_midday.png" }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.005f + 0.012f }, { 0.0136f, 0.0216f }, 0.f, { 222, 164, 38, 255 }); + }) + .add_click([] { world::time::vars::set_time(12, 0, 0); })); + + add_option(button_option("Midnight") + .add_translate().add_hotkey() + .add_update_this([=](button_option* option, int position) { + option->add_offset(0.0165f); + menu::renderer::draw_sprite({ "ozarktextures", "time_midnight.png" }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.005f + 0.012f }, { 0.0136f, 0.0216f }, 0.f, { 111, 51, 232, 255 }); + }) + .add_click([] { world::time::vars::set_time(0, 0, 0); })); + + add_option(button_option("Sunrise") + .add_translate().add_hotkey() + .add_update_this([=](button_option* option, int position) { + option->add_offset(0.0165f); + menu::renderer::draw_sprite({ "ozarktextures", "time_sunrise.png" }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.005f + 0.012f }, { 0.0136f, 0.0216f }, 0.f, { 250, 178, 22, 255 }); + }) + .add_click([] { world::time::vars::set_time(8, 0, 0); })); + + add_option(button_option("Sunset") + .add_translate().add_hotkey() + .add_update_this([=](button_option* option, int position) { + option->add_offset(0.0165f); + menu::renderer::draw_sprite({ "ozarktextures", "time_sunset.png" }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.005f + 0.012f }, { 0.0136f, 0.0216f }, 0.f, { 250, 109, 22, 255 }); + }) + .add_click([] { world::time::vars::set_time(20, 0, 0); })); +} + +void time_preset_menu::update() {} + +void time_preset_menu::update_once() {} + +void time_preset_menu::feature_update() {} + +time_preset_menu* g_instance; +time_preset_menu* time_preset_menu::get() { + if (g_instance == nullptr) { + g_instance = new time_preset_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/time/time_preset.h b/GTAV/src/menu/base/submenus/main/world/time/time_preset.h new file mode 100644 index 0000000..3936754 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/time/time_preset.h @@ -0,0 +1,22 @@ +#pragma once +#include "menu/base/submenu.h" + +class time_preset_menu : public menu::submenu::submenu { +public: + static time_preset_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + time_preset_menu() + : menu::submenu::submenu() {} +}; + +namespace world::time::preset::vars { + struct variables { + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/trains.cpp b/GTAV/src/menu/base/submenus/main/world/trains.cpp new file mode 100644 index 0000000..38b64d2 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/trains.cpp @@ -0,0 +1,235 @@ +#include "trains.h" +#include "menu/base/submenu_handler.h" +#include "../world.h" +#include "menu/base/util/control.h" + +using namespace world::train::vars; + +namespace world::train::vars { + variables m_vars; + + scroll_struct train_speeds[] = { + { localization("-500", false), -500.f }, + { localization("-250", false), -250.f }, + { localization("-100", false), -100.f }, + { localization("-50", false), -50.f }, + { localization("-25", false), -25.f }, + { localization("-10", false), -10.f }, + { localization("-1", false), -1.f }, + { localization("0", false), 0.f }, + { localization("1", false), 1.f }, + { localization("10", false), 10.f }, + { localization("25", false), 25.f }, + { localization("50", false), 50.f }, + { localization("100", false), 100.f }, + { localization("250", false), 250.f }, + { localization("500", false), 500.f } + }; + + scroll_struct train_paints[] = { + { localization("Chrome", true), 120 }, + { localization("Gold", true), 158 }, + { localization("Pink", true), 135 }, + { localization("Blue", true), 140 } + }; + + void enter_train() { + if (!native::is_vehicle_seat_free(m_vars.m_train, -1, 0)) { + Ped ped = native::get_ped_in_vehicle_seat(m_vars.m_train, -1, 0); + native::set_entity_as_mission_entity(ped, true, true); + native::delete_entity(&ped); + } + + native::set_ped_into_vehicle(menu::player::get_local_player().m_ped, m_vars.m_train, -1); + } + + void paint_train() { + menu::control::simple_request_control(m_vars.m_train); + if (native::get_is_vehicle_primary_colour_custom(m_vars.m_train)) { + native::clear_vehicle_custom_primary_colour(m_vars.m_train); + } + + if (native::get_is_vehicle_secondary_colour_custom(m_vars.m_train)) { + native::clear_vehicle_custom_secondary_colour(m_vars.m_train); + } + + native::set_vehicle_colours(m_vars.m_train, train_paints[m_vars.m_paint].m_result, train_paints[m_vars.m_paint].m_result); + + for (int i = 1; i < 50; i++) { + Vehicle carriage = native::get_train_carriage(m_vars.m_train, i); + if (native::does_entity_exist(carriage)) { + native::set_vehicle_colours(carriage, train_paints[m_vars.m_paint].m_result, train_paints[m_vars.m_paint].m_result); + } + } + } + + void delete_carriage() { + std::vector carriages; + + for (int i = 1; i < 50; i++) { + Vehicle carriage = native::get_train_carriage(m_vars.m_train, i); + if (native::does_entity_exist(carriage)) { + carriages.push_back(carriage); + } + } + + for (Vehicle& carriage : carriages) { + menu::control::simple_request_control(carriage); + native::set_entity_as_mission_entity(carriage, true, true); + native::delete_entity(&carriage); + } + } + + void delete_train() { + delete_carriage(); + menu::control::simple_request_control(m_vars.m_train); + native::set_entity_as_mission_entity(m_vars.m_train, true, true); + native::delete_mission_train(&m_vars.m_train); + } + + void find_train() { + float closest_distance = std::numeric_limits::max(); + Entity closest_entity = 0; + + global::vars::g_vehicle_pool->for_each([&](Entity handle, void* veh) { + if (native::get_entity_model(handle) == 0x3D6AAA9B) { + float distance = menu::player::get_local_player().m_coords.get_distance(native::get_entity_coords(handle, true)); + if (distance < closest_distance) { + closest_distance = distance; + closest_entity = handle; + } + } + }); + + if (closest_entity != 0) { + m_vars.m_train = closest_entity; + } else { + menu::notify::stacked(trains_menu::get()->get_string("Train"), trains_menu::get()->get_string("Couldn't find a train"), global::ui::g_error); + } + } + + bool requirement() { + return m_vars.m_train && native::does_entity_exist(m_vars.m_train); + } +} + +void trains_menu::load() { + set_name("Train"); + set_parent(); + + add_option(toggle_option("Allow Random Trains") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_allow_random) + .add_click([] { native::set_random_trains(m_vars.m_allow_random); })); + + add_option(button_option("Find Train") + .add_translate().add_hotkey() + .add_click(find_train) + .add_tooltip("Must be near train tracks")); + + add_option(button_option("Spawn Train") + .add_translate().add_hotkey() + .add_click([] { m_vars.m_spawn = true; }) + .add_tooltip("Must be near train tracks")); + + add_option(break_option("Spawned Train") + .add_translate() + .add_requirement(requirement)); + + add_option(button_option("Enter Train") + .add_translate() + .add_click(enter_train) + .add_requirement(requirement)); + + add_option(scroll_option(TOGGLE, "Speed") + .add_translate() + .add_toggle(m_vars.m_speed) + .add_scroll(m_vars.m_speed_val, 0, NUMOF(train_speeds), train_speeds) + .add_click([] { menu::control::simple_request_control(m_vars.m_train); }) + .add_requirement(requirement)); + + add_option(scroll_option(SCROLLSELECT, "Paint") + .add_translate() + .add_scroll(m_vars.m_paint, 0, NUMOF(train_paints), train_paints) + .add_click(paint_train) + .add_requirement(requirement)); + + add_option(toggle_option("Derail") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_derail) + .add_click([] { native::set_render_train_as_derailed(m_vars.m_train, m_vars.m_derail); }) + .add_requirement(requirement)); + + add_option(button_option("Delete carriages") + .add_translate().add_hotkey() + .add_click(delete_carriage) + .add_requirement(requirement)); + + add_option(button_option("Delete Train") + .add_translate().add_hotkey() + .add_click(delete_train) + .add_requirement(requirement)); + + add_string("Train"); + add_string("Couldn't find a train"); + add_string("Manager reset, cached train too far"); + add_string("You must delete the existing train first"); +} + +void trains_menu::update() { + if (requirement()) { + if (menu::player::get_local_player().m_coords.get_distance(native::get_entity_coords(m_vars.m_train, false)) > 100.f) { + m_vars.m_train = 0; + menu::notify::stacked(get_string("Train"), get_string("Manager reset, cached train too far"), global::ui::g_error); + } + } else { + if (menu::base::get_current_option() > 3) menu::base::set_current_option(0); + } +} + +void trains_menu::update_once() {} + +void trains_menu::feature_update() { + if (m_vars.m_spawn) { + m_vars.m_spawn = false; + + if (m_vars.m_train && native::does_entity_exist(m_vars.m_train)) { + menu::notify::stacked(get_string("Train"), get_string("You must delete the existing train first"), global::ui::g_error); + return; + } + + menu::control::simple_request_model(0x3D6AAA9B); + menu::control::simple_request_model(0x0AFD22A6); + menu::control::simple_request_model(0x36DCFF98); + menu::control::simple_request_model(0x0E512E79); + menu::control::simple_request_model(0x264D9262); + menu::control::simple_request_model(0xD1ABB666); + + m_vars.m_train = native::create_mission_train(15, menu::player::get_local_player().m_coords.x, menu::player::get_local_player().m_coords.y, menu::player::get_local_player().m_coords.z, true); + } + + if (m_vars.m_speed) { + if (m_vars.m_train) { + if (native::does_entity_exist(m_vars.m_train)) { + if (native::get_ped_in_vehicle_seat(m_vars.m_train, -1, 0) == menu::player::get_local_player().m_ped) { + native::set_train_speed(m_vars.m_train, train_speeds[m_vars.m_speed_val].m_result); + native::set_train_cruise_speed(m_vars.m_train, train_speeds[m_vars.m_speed_val].m_result); + return; + } + } + } + + m_vars.m_speed = false; + } +} + +trains_menu* g_instance; +trains_menu* trains_menu::get() { + if (g_instance == nullptr) { + g_instance = new trains_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} diff --git a/GTAV/src/menu/base/submenus/main/world/trains.h b/GTAV/src/menu/base/submenus/main/world/trains.h new file mode 100644 index 0000000..c1a4ace --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/trains.h @@ -0,0 +1,30 @@ +#pragma once +#include "menu/base/submenu.h" + +class trains_menu : public menu::submenu::submenu { +public: + static trains_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + trains_menu() + : menu::submenu::submenu() {} +}; + +namespace world::train::vars { + struct variables { + bool m_allow_random = true; + bool m_spawn; + bool m_derail; + bool m_speed; + + int m_speed_val = 9; + int m_paint; + Vehicle m_train = 0; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/weather/fx/weather_fx.cpp b/GTAV/src/menu/base/submenus/main/world/weather/fx/weather_fx.cpp new file mode 100644 index 0000000..1619df5 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/weather/fx/weather_fx.cpp @@ -0,0 +1,249 @@ +#include "weather_fx.h" +#include "menu/base/submenu_handler.h" +#include "../../world_weather.h" +#include "menu/base/submenus/main/helper/helper_color.h" +#include "menu/base/util/textures.h" + +using namespace world::weather::fx::vars; + +namespace world::weather::fx::vars { + variables m_vars; + + scroll_struct scroll_names[20]; + + std::pair names[] = { + { 0xE947723D, "Rainstorm Drop" }, + { 0xF4698119, "Thunder Drop" }, + { 0xB13E1842, "Snow Light Drop" }, + { 0x7F84E74E, "Snow Heavy Drop" }, + { 0xFA37E4E2, "Blizzard Drop" }, + { 0xC11D1EC6, "Underwater Drop" }, + { 0x69163FA7, "Lake Fog Drop" }, + { 0x91C32C69, "Woodland Pollen Drop" }, + { 0x8DE5FE6A, "Woodland Firefly Drop" }, + { 0x36196668, "Wetland Flies Drop" }, + }; + + std::string get_shader_name(uint32_t name_hash) { + auto vit = std::find_if(begin(names), end(names), [=] (std::pair e) { return e.first == name_hash; }); + if (vit != end(names)) { + return vit->second; + } + + return "Unknown"; + } +} + +void weather_fx_menu::load() { + set_name("Weather FX"); + set_parent(); + + for (std::pair str : names) { + add_string(str.second); + } + + add_option(scroll_option(SCROLL, "Weather Type") + .add_translate() + .add_scroll(m_vars.m_scroll, 0, 1, scroll_names) + .add_update([] (scroll_option* option, int pos) { + option->add_scroll(m_vars.m_scroll, 0, (int)m_vars.m_shaders.size(), scroll_names); + }) + .add_click([this] { + update_once(); + })); + + add_option(button_option("Reset to Default") + .add_translate().add_hotkey() + .add_sprite({ "ozarktextures", "spinner.png" }) + .add_sprite_scale({ 0.01232f, 0.02184f }) + .add_sprite_rotation() + .add_click([] { + uint32_t hash = m_vars.m_shaders[m_vars.m_scroll].m_drop->m_name_hash; + auto vit = std::find_if(begin(m_vars.m_originals), end(m_vars.m_originals), [=] (rage::types::drop_shader e) { return e.m_name_hash == hash; }); + if (vit != end(m_vars.m_originals)) { + memcpy(m_vars.m_shaders[m_vars.m_scroll].m_drop, &(*(vit)), sizeof(rage::types::drop_shader)); + } + })); +} + +void weather_fx_menu::update() {} + +void weather_fx_menu::update_once() { + clear_options(2); + m_vars.m_shaders.clear(); + + uint32_t drop_shader_count = *(uint32_t*)(global::vars::g_drop_shader_count); + rage::types::drop_shader* drop_shader_list = (rage::types::drop_shader*)(global::vars::g_drop_shaders); + + for (uint32_t i = 0; i < drop_shader_count; i++) { + rage::types::drop_shader* current = &drop_shader_list[i]; + if (!get_shader_name(current->m_name_hash).empty()) { + color_rgba internal_color; + float luminance = 1.f; + + internal_color.r = (int)(current->m_color.x * 255.f); + internal_color.g = (int)(current->m_color.y * 255.f); + internal_color.b = (int)(current->m_color.z * 255.f); + internal_color.a = (int)(current->m_color.w * 255.f); + + if (current->m_color.x > 1.f) { + luminance = current->m_color.x / 1.f; + internal_color.r /= (int)luminance; + } + + if (current->m_color.y > 1.f) { + luminance = current->m_color.y / 1.f; + internal_color.g /= (int)luminance; + } + + if (current->m_color.z > 1.f) { + luminance = current->m_color.z / 1.f; + internal_color.b /= (int)luminance; + } + + if (internal_color.r < 0) internal_color.r = 0; + if (internal_color.g < 0) internal_color.g = 0; + if (internal_color.b < 0) internal_color.b = 0; + + m_vars.m_shaders.push_back({ current, internal_color, luminance }); + scroll_names[i].m_name.set(get_string(get_shader_name(current->m_name_hash))); + scroll_names[i].m_result = 123; + + auto vit = std::find_if(begin(m_vars.m_originals), end(m_vars.m_originals), [=] (rage::types::drop_shader e) { return e.m_name_hash == current->m_name_hash; }); + if (vit == end(m_vars.m_originals)) { + rage::types::drop_shader shader; + memcpy(&shader, current, sizeof(shader)); + m_vars.m_originals.push_back(shader); + } + } + } + + if (!m_vars.m_shaders.empty()) { + add_option(submenu_option("Edit Color") + .add_submenu() + .add_click([=] { + helper_color_menu::get()->set_name(get_name().get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = &m_vars.m_shaders[m_vars.m_scroll].m_internal_color; + + helper::color::vars::m_vars.m_callback = [] { + m_vars.m_shaders[m_vars.m_scroll].m_drop->m_color.x = m_vars.m_shaders[m_vars.m_scroll].m_internal_color.r / 255.f; + m_vars.m_shaders[m_vars.m_scroll].m_drop->m_color.y = m_vars.m_shaders[m_vars.m_scroll].m_internal_color.g / 255.f; + m_vars.m_shaders[m_vars.m_scroll].m_drop->m_color.z = m_vars.m_shaders[m_vars.m_scroll].m_internal_color.b / 255.f; + m_vars.m_shaders[m_vars.m_scroll].m_drop->m_color.w = m_vars.m_shaders[m_vars.m_scroll].m_internal_color.a / 255.f; + }; + }) + .add_update([] (submenu_option* option, int pos) { + option->add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, &m_vars.m_shaders[m_vars.m_scroll].m_internal_color); + })); + + add_option(number_option(SCROLL, "Luminance") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_luminance, "%.1f", 0.1f).add_min(0.1f).add_max(100.f) + .add_click([] { + m_vars.m_shaders[m_vars.m_scroll].m_drop->m_color.x = (m_vars.m_shaders[m_vars.m_scroll].m_internal_color.r / 255.f) * m_vars.m_shaders[m_vars.m_scroll].m_luminance; + m_vars.m_shaders[m_vars.m_scroll].m_drop->m_color.y = (m_vars.m_shaders[m_vars.m_scroll].m_internal_color.g / 255.f) * m_vars.m_shaders[m_vars.m_scroll].m_luminance; + m_vars.m_shaders[m_vars.m_scroll].m_drop->m_color.z = (m_vars.m_shaders[m_vars.m_scroll].m_internal_color.b / 255.f) * m_vars.m_shaders[m_vars.m_scroll].m_luminance; + m_vars.m_shaders[m_vars.m_scroll].m_drop->m_color.w = (m_vars.m_shaders[m_vars.m_scroll].m_internal_color.a / 255.f) * m_vars.m_shaders[m_vars.m_scroll].m_luminance; + })); + + add_option(number_option(SCROLL, "Gravity") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_gravity, "%.1f", 0.1f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Box Centre Offset - X") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_box_centre_offset.x, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Box Centre Offset - Y") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_box_centre_offset.y, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Box Centre Offset - Z") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_box_centre_offset.z, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Box Size - X") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_box_size.x, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Box Size - Y") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_box_size.y, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Box Size - Z") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_box_size.z, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Life Minimum") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_life_min_max.x, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Life Maximum") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_life_min_max.y, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Velocity Minimum - X") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_velocity_min.x, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Velocity Minimum - Y") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_velocity_min.y, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Velocity Minimum - Z") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_velocity_min.z, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Velocity Maximum - X") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_velocity_max.x, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Velocity Maximum - Y") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_velocity_max.y, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Velocity Maximum - Z") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_velocity_max.z, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Size Minimum - X") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_size_min_max.x, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Size Minimum - Y") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_size_min_max.y, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Size Maximum - X") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_size_min_max.z, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Size Maximum - Y") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_size_min_max.w, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Fade In") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_fade_in_out.x, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Fade Out") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_fade_in_out.y, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Fade Near") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_fade_near_far.x, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Fade Far") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_fade_near_far.y, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Edge Softness") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_edge_softness, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Particle Color Percentage") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_particle_color_percentage, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Background Distortion Visibility Percentage") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_background_distortion_visibility_percentage, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Background Distortion Alpha Booster") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_background_distortion_alpha_booster, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Background Distortion Amount") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_background_distortion_amount, "%.2f", 0.01f).set_scroll_speed(10)); + + add_option(number_option(SCROLL, "Local Lights Multiplier") + .add_number(m_vars.m_shaders[m_vars.m_scroll].m_drop->m_local_lights_multiplier, "%.2f", 0.01f).set_scroll_speed(10)); + } +} + +void weather_fx_menu::feature_update() {} + +weather_fx_menu* g_instance; +weather_fx_menu* weather_fx_menu::get() { + if (g_instance == nullptr) { + g_instance = new weather_fx_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/weather/fx/weather_fx.h b/GTAV/src/menu/base/submenus/main/world/weather/fx/weather_fx.h new file mode 100644 index 0000000..2fb52c6 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/weather/fx/weather_fx.h @@ -0,0 +1,32 @@ +#pragma once +#include "menu/base/submenu.h" +#include "rage/types/generic_types.h" + +class weather_fx_menu : public menu::submenu::submenu { +public: + static weather_fx_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + weather_fx_menu() + : menu::submenu::submenu() {} +}; + +namespace world::weather::fx::vars { + struct shader { + rage::types::drop_shader* m_drop; + color_rgba m_internal_color; + float m_luminance = 1.f; + }; + + struct variables { + std::vector m_shaders; + std::vector m_originals; + int m_scroll = 0; + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/weather/weather_select.cpp b/GTAV/src/menu/base/submenus/main/world/weather/weather_select.cpp new file mode 100644 index 0000000..9605a19 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/weather/weather_select.cpp @@ -0,0 +1,101 @@ +#include "weather_select.h" +#include "menu/base/submenu_handler.h" +#include "../world_weather.h" +#include "util/memory/memory.h" +#include "rage/engine.h" +#include "menu/base/util/timers.h" + +using namespace world::weather::select::vars; + +namespace world::weather::select::vars { + variables m_vars; + + scroll_struct> weathers[] = { + { localization("Sunny", true), { "CLEAR", "weather_sunny.png" } }, + { localization("Extra Sunny", true), { "EXTRASUNNY", "weather_extrasunny.png" } }, + { localization("Rain", true), { "RAIN", "weather_rain.png" } },// + { localization("Clearing", true), { "CLEARING", "weather_clearing.png" } },// + { localization("Cloudy", true), { "CLOUDS", "weather_cloudy_overcast.png" } }, + { localization("Smoggy", true), { "SMOG", "weather_smoggy_foggy.png" } }, + { localization("Foggy", true), { "FOGGY", "weather_smoggy_foggy.png" } }, + { localization("Stormy", true), { "THUNDER", "weather_stormy.png" } }, + { localization("Overcast", true), { "OVERCAST", "weather_cloudy_overcast.png" } }, + { localization("Light Snow", true), { "SNOWLIGHT", "weather_lightsnow_snow_blizzard.png" } }, + { localization("Snow", true), { "SNOW", "weather_lightsnow_snow_blizzard.png" } }, + { localization("Blizzard", true), { "BLIZZARD", "weather_lightsnow_snow_blizzard.png" } }, + { localization("Christmas", true), { "XMAS", "weather_christmas.png" } }, + { localization("Neutral", true), { "NEUTRAL", "weather_nuetral.png" } }, + { localization("Halloween", true), { "HALLOWEEN", "weather_halloween.png" } } + }; + + void set_weather(const char* weather) { + // 0 = self only + // 1 = session only + // 2 = both + + if (m_vars.m_target == 0 || m_vars.m_target == 2) { + native::set_weather_type_now_persist(weather); + native::set_weather_type_now(weather); + native::set_override_weather(weather); + } + + if (m_vars.m_target == 1 || m_vars.m_target == 2) { + if (native::network_is_in_session()) { + rage::engine::send_weather_event(rage::engine::get_weather_id(weather)); + } + } + } + + void epilepsy() { + static int timer = 0; + menu::timers::run_timed(&timer, 100, [] { + set_weather(weathers[native::get_random_int_in_range(0, NUMOF(weathers) - 1)].m_result.first); + }); + } +} + +void weather_select_menu::load() { + set_name("Weather"); + set_parent(); + + /*add_option(scroll_option(SCROLL, "Target") + .add_translate() + .add_scroll(m_vars.m_target, 0, NUMOF(world::weather::vars::target_type), world::weather::vars::target_type));*/ + + add_option(toggle_option("Epilepsy") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_epilepsy)); + + add_option(break_option("Weathers") + .add_translate()); + + for (int i = 0; i < NUMOF(weathers); i++) { + add_option(button_option(weathers[i].m_name.get()) + .add_update_this([=](button_option* option, int position) { + option->add_offset(0.0165f); + menu::renderer::draw_sprite({ "ozarktextures", weathers[i].m_result.second }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (position * global::ui::g_option_scale) + 0.005f + 0.012f }, { 0.0136f, 0.0216f }, 0.f, { 255, 255, 255, 255 }); + }) + .add_click([=] { set_weather(weathers[i].m_result.first); })); + } +} + +void weather_select_menu::update() {} + +void weather_select_menu::update_once() {} + +void weather_select_menu::feature_update() { + if (m_vars.m_epilepsy) { + epilepsy(); + } +} + +weather_select_menu* g_instance; +weather_select_menu* weather_select_menu::get() { + if (g_instance == nullptr) { + g_instance = new weather_select_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/weather/weather_select.h b/GTAV/src/menu/base/submenus/main/world/weather/weather_select.h new file mode 100644 index 0000000..d6b0554 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/weather/weather_select.h @@ -0,0 +1,26 @@ +#pragma once +#include "menu/base/submenu.h" + +class weather_select_menu : public menu::submenu::submenu { +public: + static weather_select_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + weather_select_menu() + : menu::submenu::submenu() {} +}; + +namespace world::weather::select::vars { + struct variables { + int m_target; + bool m_epilepsy; + }; + + void set_weather(const char* weather); + extern scroll_struct> weathers[15]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/world_time.cpp b/GTAV/src/menu/base/submenus/main/world/world_time.cpp new file mode 100644 index 0000000..eb25e3c --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/world_time.cpp @@ -0,0 +1,209 @@ +#include "world_time.h" +#include "menu/base/submenu_handler.h" +#include "../world.h" +#include "time/time_preset.h" +#include "menu/base/util/panels.h" +#include "rage/engine.h" +#include "menu/base/util/timers.h" + +using namespace world::time::vars; + +namespace world::time::vars { + variables m_vars; + + scroll_struct lock_time[] = { + { localization("Freeze", true), 0 }, + { localization("Noon", true), 1 }, + { localization("Midnight", true), 2 }, + { localization("Sunrise", true), 3 }, + { localization("Sunset", true), 4 } + }; + + scroll_struct time_scales[] = { + { localization("Default", true), 1.f }, + { localization("Slow", true), 0.7f }, + { localization("Slower", true), 0.4f }, + { localization("Slowest", true), 0.f } + }; + + void set_time(int hour, int minute, int second, bool sync_override) { + native::set_clock_time(hour, minute, second); + + if (native::network_is_session_active()) { + native::network_override_clock_time(hour, minute, second); + + if (m_vars.m_sync && sync_override) { + rage::engine::send_clock_event(); + } + } + } + + void precision_time() { + if (menu::input::is_left_pressed() || menu::input::is_right_pressed()) { + m_vars.m_lock_time = false; + m_vars.m_accelerate_time = false; + m_vars.m_system_time = false; + m_vars.m_sync = false; + + if (menu::input::is_left_pressed()) { + rage::engine::add_to_clock_time(0, -1, 0); + } else { + rage::engine::add_to_clock_time(0, 1, 0); + } + + set_time(native::get_clock_hours(), native::get_clock_minutes(), native::get_clock_seconds()); + } + } +} + +void time_menu::load() { + set_name("Time"); + set_parent(); + + add_option(submenu_option("Presets") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(button_option("Advance Time") + .add_translate().add_hotkey() + .add_click([] { + int hour = native::get_clock_hours() + 1; + if (hour > 23) hour = 0; + set_time(hour, native::get_clock_minutes(), native::get_clock_seconds()); + })); + + add_option(button_option("Rewind Time") + .add_translate().add_hotkey() + .add_click([] { + int hour = native::get_clock_hours() - 1; + if (hour < 0) hour = 23; + set_time(hour, native::get_clock_minutes(), native::get_clock_seconds()); + })); + + add_option(button_option("Precision Time") + .add_translate() + .add_hover(precision_time) + .add_tooltip("Use LEFT & RIGHT, only works while hovering on this option")); + + add_option(scroll_option(TOGGLE, "Lock Time") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_lock_time) + .add_scroll(m_vars.m_lock_time_var, 0, NUMOF(lock_time), lock_time) + .add_click([] { + m_vars.m_accelerate_time = false; + m_vars.m_system_time = false; + + if (m_vars.m_lock_time && m_vars.m_lock_time_var == 0) { + m_vars.m_lock_time_freeze[0] = native::get_clock_hours(); + m_vars.m_lock_time_freeze[1] = native::get_clock_minutes(); + m_vars.m_lock_time_freeze[2] = native::get_clock_seconds(); + } + })); + + add_option(scroll_option(SCROLL, "Timescale") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_time_scale, 0, NUMOF(time_scales), time_scales) + .add_click([] { if (m_vars.m_time_scale == 0) native::set_time_scale(1.f); })); + + add_option(toggle_option("Accelerate Time") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_accelerate_time) + .add_click([] { + m_vars.m_system_time = false; + m_vars.m_lock_time = false; + })); + + add_option(toggle_option("Sync to System Time") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_system_time) + .add_click([] { + m_vars.m_accelerate_time = false; + m_vars.m_lock_time = false; + })); + + /*add_option(toggle_option("Sync to Session") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_sync) + .add_update([](toggle_option* option, int position) { + bool selected = menu::base::is_option_selected(position); + color_rgba color = selected ? global::ui::g_option_selected : global::ui::g_option; + + option->add_offset(0.0165f); + menu::renderer::draw_sprite({ "ozarktextures", "sync_cloud.png" }, { global::ui::g_position.x + 0.004f + 0.007f, global::ui::g_position.y + (position * 0.global::ui::g_option_scale) + 0.005f + 0.012f }, { 0.0132f, 0.0216f }, 0.f, color); + }));*/ +} + +void time_menu::update() {} + +void time_menu::update_once() { + menu::panels::toggle_panel_render("PANEL_CLOCK", true); +} + +void time_menu::feature_update() { + static int timer = 0; + static bool can_sync = true; + + menu::timers::run_timed(&timer, 1000, [] { + can_sync = true; + }); + + if (m_vars.m_time_scale != 0) { + native::set_time_scale(time_scales[m_vars.m_time_scale].m_result); + } + + if (m_vars.m_system_time) { + int day, month, year, hour, min, sec; + native::get_local_time(&year, &month, &day, &hour, &min, &sec); + + set_time(hour, min, sec, can_sync); + } + + if (m_vars.m_accelerate_time) { + rage::engine::add_to_clock_time(0, 2, 0); + + if (native::network_is_session_active()) { + native::network_override_clock_time(native::get_clock_hours(), native::get_clock_minutes(), native::get_clock_seconds()); + + if (m_vars.m_sync && can_sync) { + rage::engine::send_clock_event(); + } + } + } + + if (m_vars.m_lock_time) { + switch (m_vars.m_lock_time_var) { + case 0: // Freeze + set_time(m_vars.m_lock_time_freeze[0], m_vars.m_lock_time_freeze[1], m_vars.m_lock_time_freeze[2], can_sync); + break; + + case 1: // Noon + set_time(12, 0, 0, can_sync); + break; + + case 2: // Midnight + set_time(0, 0, 0, can_sync); + break; + + case 3: // Sunrise + set_time(8, 0, 0, can_sync); + break; + + case 4: // Sunset + set_time(20, 0, 0, can_sync); + break; + } + } + + can_sync = false; +} + +time_menu* g_instance; +time_menu* time_menu::get() { + if (g_instance == nullptr) { + g_instance = new time_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/world_time.h b/GTAV/src/menu/base/submenus/main/world/world_time.h new file mode 100644 index 0000000..a1fa1b9 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/world_time.h @@ -0,0 +1,31 @@ +#pragma once +#include "menu/base/submenu.h" + +class time_menu : public menu::submenu::submenu { +public: + static time_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + time_menu() + : menu::submenu::submenu() {} +}; + +namespace world::time::vars { + struct variables { + bool m_sync; + bool m_lock_time; + bool m_accelerate_time; + bool m_system_time; + + int m_time_scale; + int m_lock_time_var; + int m_lock_time_freeze[3]; + }; + + void set_time(int hour, int minute, int second, bool sync_override = true); + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/world_waypoint.cpp b/GTAV/src/menu/base/submenus/main/world/world_waypoint.cpp new file mode 100644 index 0000000..26f4460 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/world_waypoint.cpp @@ -0,0 +1,73 @@ +#include "world_waypoint.h" +#include "menu/base/submenu_handler.h" +#include "../world.h" +#include "global/lists.h" +#include "../helper/helper_color.h" + +using namespace world::waypoint::vars; + +namespace world::waypoint::vars { + variables m_vars; +} + +void world_waypoint_menu::load() { + set_name("World Waypoint"); + set_parent(); + + add_option(toggle_option("Toggle World Waypoint") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_toggle)); + + add_option(scroll_option(SCROLL, "Marker") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_marker, 0, NUMOF(global::lists::g_markers), global::lists::g_markers)); + + add_option(number_option(SCROLL, "Max Markers") + .add_translate().add_hotkey() + .add_number(m_vars.m_max, "%i", 1).add_min(1).add_max(50)); + + add_option(number_option(SCROLL, "Marker Scale") + .add_translate().add_hotkey() + .add_number(m_vars.m_scale, "%.2f", 0.01f).add_min(0.f).add_max(10.f).set_scroll_speed(10)); + + add_option(submenu_option("Edit Color") + .add_translate() + .add_submenu() + .add_click([this] { + helper_color_menu::get()->set_name(get_name().get(), false, false); + helper_color_menu::get()->set_parent(); + helper::color::vars::m_vars.m_color = &m_vars.m_color; + helper::color::vars::m_vars.m_callback = [] {}; + }) + .add_icon_override({ "randomha", "lol" }, { 0.2145f, 0.0055f }, { 0.011f, 0.02f }, &m_vars.m_color)); +} + +void world_waypoint_menu::update() {} + +void world_waypoint_menu::update_once() {} + +void world_waypoint_menu::feature_update() { + if (m_vars.m_toggle) { + if (global::vars::g_waypoint_data) { + if (global::vars::g_waypoint_data->m_points && global::vars::g_waypoint_data->m_count) { + for (uint32_t i = 0; i < global::vars::g_waypoint_data->m_count; i++) { + if (i >= (uint32_t)m_vars.m_max) break; + + math::vector4 point = global::vars::g_waypoint_data->m_points[i]; + native::draw_marker(m_vars.m_marker, point.x, point.y, point.z + m_vars.m_scale, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, m_vars.m_scale, m_vars.m_scale, m_vars.m_scale, m_vars.m_color.r, m_vars.m_color.g, m_vars.m_color.b, m_vars.m_color.a, 0, 0, 0, 0, 0, 0, 0); + } + } + } + } +} + +world_waypoint_menu* g_instance; +world_waypoint_menu* world_waypoint_menu::get() { + if (g_instance == nullptr) { + g_instance = new world_waypoint_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/world_waypoint.h b/GTAV/src/menu/base/submenus/main/world/world_waypoint.h new file mode 100644 index 0000000..c4a1efc --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/world_waypoint.h @@ -0,0 +1,28 @@ +#pragma once +#include "menu/base/submenu.h" + +class world_waypoint_menu : public menu::submenu::submenu { +public: + static world_waypoint_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + world_waypoint_menu() + : menu::submenu::submenu() {} +}; + +namespace world::waypoint::vars { + struct variables { + bool m_toggle; + int m_marker = 28; + int m_max = 40; + float m_scale = 0.5f; + + color_rgba m_color = color_rgba(255, 0, 255, 255); + }; + + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/world_weather.cpp b/GTAV/src/menu/base/submenus/main/world/world_weather.cpp new file mode 100644 index 0000000..e09c6f5 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/world_weather.cpp @@ -0,0 +1,133 @@ +#include "world_weather.h" +#include "menu/base/submenu_handler.h" +#include "../world.h" +#include "weather/weather_select.h" +#include "menu/base/util/global.h" +#include "weather/fx/weather_fx.h" +#include "rage/types/global_types.h" + +using namespace world::weather::vars; + +namespace world::weather::vars { + variables m_vars; + + scroll_struct target_type[] = { + { localization("Self", true), 0 }, + { localization("Session", true), 1 }, + { localization("Both", true), 2 } + }; + + scroll_struct clouds[] = { + { localization("Clear", true), 0 }, + { localization("Rain", true), 0 }, + { localization("Horizonband1", true), 0 }, + { localization("Horizonband2", true), 0 }, + { localization("Horizonband3", true), 0 }, + { localization("Puffs", true), 0 }, + { localization("Wispy", true), 0 }, + { localization("Horizon", true), 0 }, + { localization("Contrails", true), 0 }, + { localization("Altostratus", true), 0 }, + { localization("Nimbus", true), 0 }, + { localization("Cirrus", true), 0 }, + { localization("Cirrocumulus", true), 0 }, + { localization("Stratoscumulus", true), 0 }, + { localization("Stripey", true), 0 }, + { localization("Horsey", true), 0 }, + { localization("Shower", true), 0 }, + { localization("Cloudy 01", true), 0 }, + { localization("Clear 01", true), 0 }, + { localization("Snowy 01", true), 0 }, + { localization("Stormy 01", true), 0 } + }; + + scroll_struct rains[] = { + { localization("None", true), 0.f }, + { localization("Light", true), 0.3f }, + { localization("Heavy", true), 1.5f }, + { localization("Heavier", true), 3.5f }, + { localization("Insane", true), 5.5f }, + { localization("Off the Charts", true), 50.f }, + }; + + scroll_struct wind_speeds[] = { + { localization("None", true), 0.f }, + { localization("Light", true), 0.3f }, + { localization("Fast", true), 1.5f }, + { localization("Faster", true), 3.5f }, + { localization("Insane", true), 5.5f }, + { localization("Off the Charts", true), 50.f }, + }; + + void ground_snow() { + menu::script_global(rage::global::_155_tunables).at(4724).as() = m_vars.m_ground_snow; // 1.55 done + menu::script_global(rage::global::_155_tunables).at(9098).as() = !m_vars.m_ground_snow; // 1.55 done + menu::script_global(rage::global::_155_tunables).at(9099).as() = !m_vars.m_ground_snow;// 1.55 done + menu::script_global(rage::global::_155_tunables).at(9100).as() = !m_vars.m_ground_snow;// 1.55 done + menu::script_global(rage::global::_155_tunables).at(9101).as() = !m_vars.m_ground_snow;// 1.55 done + menu::script_global(rage::global::_155_tunables).at(9106).as() = m_vars.m_ground_snow ? 255 : 0;// 1.55 done + menu::script_global(rage::global::_155_tunables).at(9107).as() = m_vars.m_ground_snow ? 255 : 0;// 1.55 done + } +} + +void weather_menu::load() { + set_name("Weather"); + set_parent(); + + add_option(submenu_option("Weather") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(submenu_option("Weather FX") + .add_translate().add_hotkey() + .add_submenu()); + + add_option(scroll_option(SCROLL, "Clouds") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_clouds, 0, NUMOF(clouds), clouds) + .add_click([] { if (m_vars.m_clouds == 0) native::clear_cloud_hat(); else native::set_cloud_hat_transition(clouds[m_vars.m_clouds].m_name.get_original().c_str(), 0.5f); })); + + add_option(scroll_option(SCROLL, "Wind Speed") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_wind, 0, NUMOF(wind_speeds), wind_speeds) + .add_click([] { m_vars.m_wind_speed = wind_speeds[m_vars.m_wind].m_result; })); + + add_option(scroll_option(SCROLL, "Rain Intensity") + .add_translate().add_hotkey() + .add_scroll(m_vars.m_rain, 0, NUMOF(rains), rains) + .add_click([] { native::set_rain_fx_intensity(rains[m_vars.m_rain].m_result); })); + + add_option(toggle_option("Thunder and Lightning") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_lightning).add_savable(get_submenu_name_stack())); + + add_option(toggle_option("Ground Snow") + .add_translate().add_hotkey() + .add_toggle(m_vars.m_ground_snow) + .add_click(ground_snow).add_savable(get_submenu_name_stack())); +} + +void weather_menu::update() {} + +void weather_menu::update_once() {} + +void weather_menu::feature_update() { + if (m_vars.m_ground_snow) { + ground_snow(); + } + + if (m_vars.m_lightning) { + native::create_lightning_thunder(); + } +} + +weather_menu* g_instance; +weather_menu* weather_menu::get() { + if (g_instance == nullptr) { + g_instance = new weather_menu(); + g_instance->load(); + menu::submenu::handler::add_submenu(g_instance); + } + + return g_instance; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/submenus/main/world/world_weather.h b/GTAV/src/menu/base/submenus/main/world/world_weather.h new file mode 100644 index 0000000..ef5cb33 --- /dev/null +++ b/GTAV/src/menu/base/submenus/main/world/world_weather.h @@ -0,0 +1,31 @@ +#pragma once +#include "menu/base/submenu.h" + +class weather_menu : public menu::submenu::submenu { +public: + static weather_menu* get(); + + void load() override; + void update_once() override; + void update() override; + void feature_update() override; + + weather_menu() + : menu::submenu::submenu() {} +}; + +namespace world::weather::vars { + struct variables { + bool m_lightning; + bool m_ground_snow; + + int m_rain; + int m_wind; + int m_clouds; + + float m_wind_speed = 100000.f; + }; + + extern scroll_struct target_type[3]; + extern variables m_vars; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/camera.cpp b/GTAV/src/menu/base/util/camera.cpp new file mode 100644 index 0000000..76da641 --- /dev/null +++ b/GTAV/src/menu/base/util/camera.cpp @@ -0,0 +1,40 @@ +#include "camera.h" +#include "global/vars.h" +#include "util/caller.h" + +namespace menu::camera { + rage::network::player_angles* get_player_angles() { + if (is_valid_ptr(global::vars::g_game_camera_angles)) { + rage::network::game_camera_angles* camera_angles = global::vars::g_game_camera_angles; + if (is_valid_ptr(camera_angles)) { + rage::network::camera_manager_angles* camera_manager_angles = camera_angles->m_camera_manager_angles; + if (is_valid_ptr(camera_manager_angles)) { + rage::network::camera_angles* camera_angles = camera_manager_angles->m_camera_angles; + if (is_valid_ptr(camera_angles)) { + rage::network::player_angles* player_angles = caller::call(global::vars::g_get_third_person_camera, *(uint64_t*)(global::vars::g_third_person_camera), camera_angles->m_ped); + if (is_valid_ptr(player_angles)) { + return (rage::network::player_angles*)((uint64_t)player_angles + 0x390); + } + + if (is_valid_ptr(camera_angles)) { + if (is_valid_ptr(camera_angles->m_fps_player_angles)) { + return camera_angles->m_fps_player_angles; + } + } + } + } + } + } + + return nullptr; + } + + math::vector3 get_direction(math::vector3 rotation) { + math::vector3 tmp; + tmp.y = rotation.z * 0.0174532924f; + tmp.x = rotation.x * 0.0174532924f; + tmp.z = abs(cos(tmp.x)); + + return math::vector3((-sin(tmp.y)) * tmp.z, (cos(tmp.y)) * tmp.z, sin(tmp.x)); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/camera.h b/GTAV/src/menu/base/util/camera.h new file mode 100644 index 0000000..ce26c7b --- /dev/null +++ b/GTAV/src/menu/base/util/camera.h @@ -0,0 +1,8 @@ +#pragma once +#include "rage/invoker/natives.h" +#include "util/math.h" + +namespace menu::camera { + rage::network::player_angles* get_player_angles(); + math::vector3 get_direction(math::vector3 rotation = native::get_gameplay_cam_rot(0)); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/control.cpp b/GTAV/src/menu/base/util/control.cpp new file mode 100644 index 0000000..c81fc25 --- /dev/null +++ b/GTAV/src/menu/base/util/control.cpp @@ -0,0 +1,237 @@ +#include "control.h" +#include "rage/invoker/natives.h" +#include "menu/base/util/player_manager.h" +#include "util/fiber.h" +#include "util/log.h" +#include "rage/engine.h" + +namespace menu::control { + void control_manager::update() { + if (m_control.size()) { + request_control_context& request = m_control.front(); + + int old_owner = 0; + bool exists = native::does_entity_exist(request.m_entity); + + int network_id = 0; + if (exists) { + rage::types::ped* ptr = (rage::types::ped*)rage::engine::get_entity_address(request.m_entity); + if (ptr) { + if (ptr->get_net_obj()) { + network_id = ptr->get_net_obj()->m_network_id; + } + } + + if (network_id) { + if (request.m_take_owner) { + if (rage::engine::get_network_object_owner(request.m_entity) != menu::player::get_local_player().m_id) { + old_owner = rage::engine::get_network_object_owner(request.m_entity); + + uint64_t manager = *(uint64_t*)global::vars::g_network_object_manager; + if (manager) { + if (*(uint64_t*)(manager + 0x2710) > 0xFFFFFFFF) { + if (!native::is_ped_a_player(request.m_entity)) { + rage::engine::update_network_object_owner(request.m_entity, menu::player::get_local_player().m_id); + } + } + } + } + } + } + + if ((native::network_has_control_of_entity(request.m_entity) || (network_id > 0 && native::network_has_control_of_network_id(network_id))) || request.m_tries > 50) { + if (request.m_tries < 50) { + if (!request.m_callbacks.empty()) { + for (auto c : request.m_callbacks) { + if (c) { + c(request.m_entity); + } + } + } + + if (request.m_callback_with_owner) request.m_callback_with_owner(request.m_entity, old_owner); + } + + m_control.erase(m_control.begin()); + } else { + request.m_tries++; + native::network_request_control_of_entity(request.m_entity); + + if (network_id) { + native::set_network_id_can_migrate(network_id, true); + native::network_request_control_of_network_id(network_id); + } + } + } else { + m_control.erase(m_control.begin()); + } + } + + if (m_model.size()) { + request_model_context& request = m_model.front(); + if (native::has_model_loaded(request.m_model) || request.m_tries > 30) { + if (request.m_tries < 30) { + request.m_callback(request.m_model); + } + + m_model.pop(); + } else { + request.m_tries++; + native::request_model(request.m_model); + } + } + + if (m_particle.size()) { + request_particle_fx_context& request = m_particle.front(); + if (native::has_named_ptfx_asset_loaded(request.m_asset.first) || request.m_tries > 30) { + if (request.m_tries < 30) { + request.m_callback(request.m_asset); + } + + m_particle.pop(); + } else { + request.m_tries++; + native::request_named_ptfx_asset(request.m_asset.first); + } + } + + if (m_weapon.size()) { + request_weapon_asset_context& request = m_weapon.front(); + if (native::has_weapon_asset_loaded(request.m_model) || request.m_tries > 30) { + if (request.m_tries < 30) { + request.m_callback(request.m_model); + } + + m_weapon.pop(); + } else { + request.m_tries++; + native::request_weapon_asset(request.m_model, 31, 0); + } + } + + if (m_animation.size()) { + request_animation_context& request = m_animation.front(); + if (native::has_anim_dict_loaded(request.m_animation.c_str()) || request.m_tries > 30) { + if (request.m_tries < 30) { + request.m_callback(); + } + + m_animation.pop(); + } else { + request.m_tries++; + native::request_anim_dict(request.m_animation.c_str()); + } + } + } + + void control_manager::request_control(Entity entity, std::function callback, bool take_owner) { + if (!native::network_is_in_session()) { + callback(entity); + } else { + auto vit = std::find_if(begin(m_control), end(m_control), [=] (request_control_context& c) { return c.m_entity == entity; }); + + if (vit == end(m_control)) { + m_control.push_back({ entity, { callback }, nullptr, 0, take_owner }); + } else { + bool exists = false; + for (auto c : vit->m_callbacks) { + if ((uint64_t)&c == (uint64_t)&callback) { + exists = true; + break; + } + } + + if (!exists) { + vit->m_callbacks.push_back(callback); + } + } + } + } + + void control_manager::request_control(Entity entity, std::function callback, bool take_owner) { + m_control.push_back({ entity, { nullptr }, callback, 0, take_owner }); + } + + void control_manager::request_model(uint32_t model, std::function callback) { + m_model.push({ model, callback, 0 }); + } + + void control_manager::request_animation(std::string animation, std::function callback) { + m_animation.push({ animation, callback, 0 }); + } + + void control_manager::request_particle(std::pair asset, std::function)> callback) { + m_particle.push({ asset, callback, 0 }); + } + + void control_manager::request_weapon(uint32_t model, std::function callback) { + m_weapon.push({ model, callback, 0 }); + } + + void control_manager::simple_request_model(uint32_t model) { + int tries = 0; + while (!native::has_model_loaded(model) && tries < 25) { + native::request_model(model); + tries++; + util::fiber::go_to_main(); + } + } + + void control_manager::simple_request_control(Entity entity, bool take_owner) { + int tries = 0; + while (native::does_entity_exist(entity) && !native::network_has_control_of_entity(entity) && tries < 30 && native::network_is_session_active()) { + native::network_request_control_of_entity(entity); + + uint16_t network_id = 0; + rage::types::ped* ptr = (rage::types::ped*)rage::engine::get_entity_address(entity); + if (ptr) { + if (ptr->get_net_obj()) { + network_id = ptr->get_net_obj()->m_network_id; + } + } + + if (network_id) { + native::set_network_id_can_migrate(network_id, 1); + + if (take_owner) { + if (rage::engine::get_network_object_owner(entity) != menu::player::get_local_player().m_id) { + uint64_t manager = *(uint64_t*)global::vars::g_network_object_manager; + if (manager) { + if (*(uint64_t*)(manager + 0x2710) > 0xFFFFFFFF) { + if (!native::is_ped_a_player(entity)) { + rage::engine::update_network_object_owner(entity, menu::player::get_local_player().m_id); + } + } + } + } + } + } + + util::fiber::go_to_main(); + tries++; + } + } + + void control_manager::simple_request_weapon(uint32_t model) { + int tries = 0; + while (!native::has_weapon_asset_loaded(model) && tries < 30) { + native::request_weapon_asset(model, 31, 0); + tries++; + util::fiber::go_to_main(); + } + } + + void control_manager::simple_request_dictionary(std::string dictionary) { + int tries = 0; + while (!native::has_streamed_texture_dict_loaded(dictionary.c_str()) && tries < 30) { + native::request_streamed_texture_dict(dictionary.c_str(), false); + tries++; + util::fiber::go_to_main(); + } + } + + control_manager* get_control_manager() { + static control_manager instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/control.h b/GTAV/src/menu/base/util/control.h new file mode 100644 index 0000000..89ccff4 --- /dev/null +++ b/GTAV/src/menu/base/util/control.h @@ -0,0 +1,109 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/base_types.h" +#include +#include + +namespace menu::control { + struct request_control_context { + Entity m_entity; + std::vector> m_callbacks; + std::function m_callback_with_owner; + int m_tries; + bool m_take_owner; + + }; + + struct request_model_context { + uint32_t m_model; + std::function m_callback; + int m_tries; + }; + + struct request_particle_fx_context { + std::pair m_asset; + std::function)> m_callback; + int m_tries; + }; + + struct request_weapon_asset_context { + uint32_t m_model; + std::function m_callback; + int m_tries; + }; + + struct request_animation_context { + std::string m_animation; + std::function m_callback; + int m_tries; + }; + + class control_manager { + public: + void update(); + + void request_control(Entity entity, std::function callback, bool take_owner = false); + void request_control(Entity entity, std::function callback, bool take_owner = false); + void request_model(uint32_t model, std::function callback); + void request_animation(std::string animation, std::function callback); + void request_particle(std::pair asset, std::function)> callback); + void request_weapon(uint32_t weapon, std::function callback); + + void simple_request_model(uint32_t model); + void simple_request_control(Entity entity, bool take_owner = false); + void simple_request_weapon(uint32_t weapon); + void simple_request_dictionary(std::string dictionary); + private: + std::vector m_control; + std::queue m_model; + std::queue m_particle; + std::queue m_weapon; + std::queue m_animation; + }; + + control_manager* get_control_manager(); + + inline void update() { + get_control_manager()->update(); + } + + inline void request_control(Entity entity, std::function callback, bool take_owner = false) { + get_control_manager()->request_control(entity, callback, take_owner); + } + + inline void request_control(Entity entity, std::function callback, bool take_owner = false) { + get_control_manager()->request_control(entity, callback, take_owner); + } + + inline void request_model(uint32_t model, std::function callback) { + get_control_manager()->request_model(model, callback); + } + + inline void request_animation(std::string animation, std::function callback) { + get_control_manager()->request_animation(animation, callback); + } + + inline void request_particle(std::pair asset, std::function)> callback) { + get_control_manager()->request_particle(asset, callback); + } + + inline void request_weapon(uint32_t weapon, std::function callback) { + get_control_manager()->request_weapon(weapon, callback); + } + + inline void simple_request_model(uint32_t model) { + get_control_manager()->simple_request_model(model); + } + + inline void simple_request_control(Entity entity, bool take_owner = false) { + get_control_manager()->simple_request_control(entity, take_owner); + } + + inline void simple_request_weapon(uint32_t weapon) { + get_control_manager()->simple_request_weapon(weapon); + } + + inline void simple_request_dictionary(std::string dictionary) { + get_control_manager()->simple_request_dictionary(dictionary); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/fonts.cpp b/GTAV/src/menu/base/util/fonts.cpp new file mode 100644 index 0000000..0b9a236 --- /dev/null +++ b/GTAV/src/menu/base/util/fonts.cpp @@ -0,0 +1,114 @@ +#include "fonts.h" +#include "util/dirs.h" +#include "global/vars.h" +#include "global/ui_vars.h" +#include "rage/engine.h" +#include "util/log.h" + +namespace menu::fonts { + int get_next_font_id() { + uint64_t font_table = *(uint64_t*)(global::vars::g_font_table); + + int font_id = 0; + while (true) { + uint32_t font_ptr = 0x1E0 * font_id; + + if (*(uint32_t*)(font_table + font_ptr + 0x1B8) == 0) { + break; + } + + font_id++; + } + + return font_id; + } + + void fonts::update_queue() { + if (get_next_font_id() < 12) return; + + static bool set_default = false; + if (!set_default) { + int id = get_font_id("RDR"); + if (id > 0) { + global::ui::g_header_font = id; + set_default = true; + } + } + + for (font_context& font : m_fonts) { + if (font.m_asset_id == -1 || font.m_font_id == -1) { + rage::types::store_module* store = rage::engine::get_store_module_extension("gfx"); + if (store) { + if (font.m_asset_id == -1) { + std::string asset = font.m_font_name + ".gfx"; + font.m_asset_id = rage::engine::register_streaming_file((util::dirs::get_path(gfx) + asset).c_str(), asset.c_str()); + + if (font.m_asset_id) { + store->m_pool.get(font.m_asset_id - store->m_base_index)[50] = true; // create movie on load + } + } else { + if (font.m_font_id == -1) { + if ((global::vars::g_store_manager->m_entries[font.m_asset_id].m_flag & 3) == 1) { + uint64_t font_table = *(uint64_t*)(global::vars::g_font_table); + uint64_t memory_helper = *(uint64_t*)(global::vars::g_font_memory_helper); + uint64_t gfx_loader_impl = (*(uint64_t(**)(uint64_t))(**(uint64_t**)(memory_helper + 0x20)))(*(uint64_t*)(memory_helper + 0x20)); + uint64_t state_bag_impl = (*(uint64_t(**)(uint64_t))(*(uint64_t*)(gfx_loader_impl)))(gfx_loader_impl); + uint64_t state_impl = *(uint64_t*)(state_bag_impl + 0x20); + + font.m_font_id = rage::engine::create_id_for_font(font.m_font_name.c_str()); + if (font.m_font_id >= 0 && font.m_font_id < 50) { + int index = *(int*)(font_table + (0x1E0 * font.m_font_id) + 0xB0); + + rage::engine::add_font_lib(*(uint64_t*)(state_impl + 0x1E8), font.m_asset_id); + } + } else { + rage::engine::request_streaming_file(font.m_asset_id); + } + } + } + } + } + } + } + + int fonts::get_font_id(std::string name) { + auto vit = std::find_if(begin(m_fonts), end(m_fonts), [=](font_context& element) { return element.m_font_name == name; }); + if (vit != end(m_fonts)) { + if (vit->m_font_id > -1) { + return vit->m_font_id; + } + } + + return 0; // default + } + + void fonts::load() { + std::vector files = util::dirs::get_files_in_directory(util::dirs::get_path(gfx), ".gfx"); + + if (files.size()) { + for (std::string file : files) { + m_fonts.push_back({ file, -1, -1 }); + } + } + } + + void fonts::update() { + if (m_fonts.empty()) return load(); // if there's 0, attempt to load + + std::vector files = util::dirs::get_files_in_directory(util::dirs::get_path(gfx), ".gfx"); + + if (files.size()) { + for (std::string file : files) { + auto vit = std::find_if(begin(m_fonts), end(m_fonts), [=](font_context& element) { return element.m_font_name == file; }); + if (vit == end(m_fonts)) { + m_fonts.push_back({ file, -1, -1 }); + } + } + } + } + + fonts* get_fonts() { + static fonts instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/fonts.h b/GTAV/src/menu/base/util/fonts.h new file mode 100644 index 0000000..571d0fc --- /dev/null +++ b/GTAV/src/menu/base/util/fonts.h @@ -0,0 +1,46 @@ +#pragma once +#include "stdafx.h" +#include + +namespace menu::fonts { + struct font_context { + std::string m_font_name; + int m_font_id = -1; + int m_asset_id = -1; + }; + + class fonts { + public: + void load(); + void update(); + void update_queue(); + + int get_font_id(std::string name); + + std::vector& get_list() { return m_fonts; } + private: + std::vector m_fonts; + }; + + fonts* get_fonts(); + + inline void load() { + get_fonts()->load(); + } + + inline void update() { + get_fonts()->update(); + } + + inline void update_queue() { + get_fonts()->update_queue(); + } + + inline int get_font_id(std::string name) { + return get_fonts()->get_font_id(name); + } + + inline std::vector& get_list() { + return get_fonts()->get_list(); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/global.h b/GTAV/src/menu/base/util/global.h new file mode 100644 index 0000000..4856334 --- /dev/null +++ b/GTAV/src/menu/base/util/global.h @@ -0,0 +1,37 @@ +#pragma once +#include "stdafx.h" +#include "global/vars.h" + +namespace menu { + class script_global { + public: + script_global(int index) + : m_handle(&global::vars::g_global_cache[index >> 18 & 0x3F][index & 0x3FFFF]) + {} + + script_global(void* ptr) + : m_handle(ptr) + {} + + script_global at(int index) const { + return script_global((void**)(m_handle) + index); + } + + script_global at(int index, int size) const { + return at(1 + (index * size)); + } + + template + T* get() { + return (T*)(m_handle); + } + + template + T& as() { + return *get(); + } + + private: + void* m_handle; + }; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/helpers.cpp b/GTAV/src/menu/base/util/helpers.cpp new file mode 100644 index 0000000..201e924 --- /dev/null +++ b/GTAV/src/menu/base/util/helpers.cpp @@ -0,0 +1,1154 @@ +#include "helpers.h" +#include "util/util.h" +#include "rage/invoker/natives.h" +#include "rage/engine.h" +#include "util/caller.h" +#include "util/log.h" + +extern "C" LPSTR __cdecl __unDName(char* buffer, const char* mangled, int length, void* (*alloc_fn)(size_t), void(*free_fn)(void*), unsigned short flags); + +namespace menu::helpers { + struct sector_data_node { + math::vector3_ m_pos; + }; + + struct object_sector_data_node { + bool m_high_res; + math::vector3_ m_pos; + }; + + bool is_rockstar_ip(uint32_t ip) { + return (ip >= 0x68FF6800 && ip <= 0x68FF6BFF) + || (ip >= 0xC051F000 && ip <= 0xC051F7FF) + || (ip >= 0x8B8AE000 && ip <= 0x8B8AE5FF) + || (ip >= 0x8B8AE700 && ip <= 0x8B8AF6FF) + || (ip >= 0x8B8AFF00 && ip <= 0x8B8AFFFF) + || (ip >= 0xC7A83D00 && ip <= 0xC7A83EFF) + || (ip >= 0xC7E5E000 && ip <= 0xC7E5E0FF) + || (ip >= 0xD1CCF000 && ip <= 0xD1CCF6FF) + || (ip >= 0xD1CCF800 && ip <= 0xD1CCFAFF) + || (ip >= 0xD1CCFC00 && ip <= 0xD1CCFCFF) + || (ip >= 0xB9384000 && ip <= 0xB93843FF); + }; + + bool is_valid_net_player(rage::network::net_game_player* sender) { + return is_valid_ptr(sender) && is_valid_ptr(sender->m_player_info); + } + + void flag_modder(int id, menu::player::ePlayerReportReasons reason, bool blacklist) { + if (id == -1) return; + menu::player::get_player(id).m_modder_flags[reason] = true; + + if (blacklist) { + menu::player::get_player(id).m_blacklist = GetTickCount() + 15000; + } + } + + menu::player::player_context& get_player_from_ip(uint32_t ip) { + int id = -1; + + menu::player::for_each([&](menu::player::player_context& player) { + if (is_valid_net_player(player.m_net_player)) { + if (player.m_net_player->m_player_info->m_external_ip == ip) { + id = player.m_id; + } + } + }, true, true); + + static menu::player::player_context _static; + if (id == -1) return _static; + return menu::player::get_player(id); + } + + menu::player::player_context& get_player_from_peer(uint64_t peer) { + int id = -1; + + menu::player::for_each([&](menu::player::player_context& player) { + if (is_valid_net_player(player.m_net_player)) { + if (player.m_net_player->m_player_info->m_host_token == peer) { + id = player.m_id; + } + } + }, true, true); + + static menu::player::player_context _static; + if (id == -1) return _static; + return menu::player::get_player(id); + } + + menu::player::player_context& get_player_from_rid(uint64_t rid) { + int id = -1; + + menu::player::for_each([&](menu::player::player_context& player) { + if (is_valid_net_player(player.m_net_player)) { + if (player.m_net_player->m_player_info->m_identifier.m_rockstar_id == rid) { + id = player.m_id; + } + } + }, true, true); + + static menu::player::player_context _static; + _static.m_id = -1; + if (id == -1) return _static; + return menu::player::get_player(id); + } + + std::string get_net_obj_type_string(eNetObjectTypes type) { + switch (type) { + case NetObjectAutomobile: return TRANSLATE(t_type_automobile); + case NetObjectBike: return TRANSLATE(t_type_bike); + case NetObjectBoat: return TRANSLATE(t_type_boat); + case NetObjectDoor: return TRANSLATE(t_type_door); + case NetObjectHeli: return TRANSLATE(t_type_heli); + case NetObjectObject: return TRANSLATE(t_type_object); + case NetObjectPed: return TRANSLATE(t_type_ped); + case NetObjectPickup: return TRANSLATE(t_type_pickup); + case NetObjectPlane: return TRANSLATE(t_type_plane); + case NetObjectSubmarine: return TRANSLATE(t_type_submarine); + case NetObjectPlayer: return TRANSLATE(t_type_player); + case NetObjectTrailer: return TRANSLATE(t_type_trailer); + case NetObjectTrain: return TRANSLATE(t_type_train); + } + + return ""; + } + + std::string clean_name(std::string fixed) { + if (!fixed.empty()) { + if (strstr(fixed.c_str(), "~")) { + std::string alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<>0123456789��"; + + for (char c : alphabet) { + char b[2]; + snprintf(b, 2, "%c", c); + util::replace_string(fixed, (std::string("~") + b + std::string("~")), ""); + } + + util::replace_string(fixed, "~bold~", ""); + util::replace_string(fixed, "~italic~", ""); + util::replace_string(fixed, "~ws~", ""); + util::replace_char(fixed, '\n', ""); + } + } + + return fixed; + } + + std::string get_location_from_id(int id) { + const char* _return = ""; + switch (id) { + case 0: + _return = "MP_REP_PROP_1"; + break; + case 1: + _return = "MP_PROP_1"; + break; + + case 2: + _return = "MP_PROP_2"; + break; + + case 3: + _return = "MP_PROP_3"; + break; + + case 4: + _return = "MP_PROP_4"; + break; + + case 5: + _return = "MP_PROP_5"; + break; + + case 6: + _return = "MP_PROP_6"; + break; + + case 7: + _return = "MP_PROP_7"; + break; + + case 8: + _return = "MP_PROP_8"; + break; + + case 9: + _return = "MP_PROP_9"; + break; + + case 10: + _return = "MP_PROP_10"; + break; + + case 11: + _return = "MP_PROP_11"; + break; + + case 12: + _return = "MP_PROP_12"; + break; + + case 13: + _return = "MP_PROP_13"; + break; + + case 14: + _return = "MP_PROP_14"; + break; + + case 15: + _return = "MP_PROP_15"; + break; + + case 16: + _return = "MP_PROP_16"; + break; + + case 17: + _return = "MP_PROP_17"; + break; + + case 18: + _return = "MP_PROP_18"; + break; + + case 19: + _return = "MP_PROP_19"; + break; + + case 20: + _return = "MP_PROP_20"; + break; + + case 21: + _return = "MP_PROP_21"; + break; + + case 22: + _return = "MP_PROP_22"; + break; + + case 23: + _return = "MP_PROP_23"; + break; + + case 24: + _return = "MP_PROP_24"; + break; + + case 25: + _return = "MP_PROP_25"; + break; + + case 26: + _return = "MP_PROP_26"; + break; + + case 27: + _return = "MP_PROP_27"; + break; + + case 28: + _return = "MP_PROP_28"; + break; + + case 29: + _return = "MP_PROP_29"; + break; + + case 30: + _return = "MP_PROP_30"; + break; + + case 31: + _return = "MP_PROP_31"; + break; + + case 32: + _return = "MP_PROP_32"; + break; + + case 33: + _return = "MP_PROP_33"; + break; + + case 34: + _return = "MP_PROP_34"; + break; + + case 35: + _return = "MP_PROP_35"; + break; + + case 36: + _return = "MP_PROP_36"; + break; + + case 37: + _return = "MP_PROP_37"; + break; + + case 38: + _return = "MP_PROP_38"; + break; + + case 39: + _return = "MP_PROP_39"; + break; + + case 40: + _return = "MP_PROP_40"; + break; + + case 41: + _return = "MP_PROP_41"; + break; + + case 42: + _return = "MP_PROP_42"; + break; + + case 43: + _return = "MP_PROP_43"; + break; + + case 44: + _return = "MP_PROP_44"; + break; + + case 45: + _return = "MP_PROP_45"; + break; + + case 46: + _return = "MP_PROP_46"; + break; + + case 47: + _return = "MP_PROP_48"; + break; + + case 48: + _return = "MP_PROP_49"; + break; + + case 49: + _return = "MP_PROP_50"; + break; + + case 50: + _return = "MP_PROP_51"; + break; + + case 51: + _return = "MP_PROP_52"; + break; + + case 52: + _return = "MP_PROP_57"; + break; + + case 53: + _return = "MP_PROP_59"; + break; + + case 54: + _return = "MP_PROP_60"; + break; + + case 55: + _return = "MP_PROP_61"; + break; + + case 56: + _return = "MP_PROP_62"; + break; + + case 57: + _return = "MP_PROP_63"; + break; + + case 58: + _return = "MP_PROP_64"; + break; + + case 59: + _return = "MP_PROP_65"; + break; + + case 60: + _return = "MP_PROP_66"; + break; + + case 61: + _return = "MP_PROP_67"; + break; + + case 62: + _return = "MP_PROP_68"; + break; + + case 63: + _return = "MP_PROP_69"; + break; + + case 64: + _return = "MP_PROP_70"; + break; + + case 65: + _return = "MP_PROP_71"; + break; + + case 66: + _return = "MP_PROP_72"; + break; + + case 67: + _return = "MP_PROP_73"; + break; + + case 68: + _return = "MP_PROP_74"; + break; + + case 69: + _return = "MP_PROP_75"; + break; + + case 70: + _return = "MP_PROP_76"; + break; + + case 71: + _return = "MP_PROP_77"; + break; + + case 72: + _return = "MP_PROP_78"; + break; + + case 83: + _return = "MP_PROP_79"; + break; + + case 84: + _return = "MP_PROP_80"; + break; + + case 85: + _return = "MP_PROP_81"; + break; + + case 73: + _return = "MP_PROP_83"; + break; + + case 74: + _return = "MP_PROP_84"; + break; + + case 75: + _return = "MP_PROP_85"; + break; + + case 76: + _return = "MP_PROP_86"; + break; + + case 77: + _return = "MP_PROP_87"; + break; + + case 78: + _return = "MP_PROP_89"; + break; + + case 79: + _return = "MP_PROP_90"; + break; + + case 80: + _return = "MP_PROP_92"; + break; + + case 81: + _return = "MP_PROP_94"; + break; + + case 82: + _return = "MP_PROP_95"; + break; + + case 86: + _return = "PM_SPAWN_Y"; + break; + + case 87: + _return = "MP_PROP_OFF1"; + break; + + case 88: + _return = "MP_PROP_OFF2"; + break; + + case 89: + _return = "MP_PROP_OFF3"; + break; + + case 90: + _return = "MP_PROP_OFF4"; + break; + + case 91: + _return = "MP_PROP_CLUBH1"; + break; + + case 92: + _return = "MP_PROP_CLUBH2"; + break; + + case 93: + _return = "MP_PROP_CLUBH3"; + break; + + case 94: + _return = "MP_PROP_CLUBH4"; + break; + + case 95: + _return = "MP_PROP_CLUBH5"; + break; + + case 96: + _return = "MP_PROP_CLUBH6"; + break; + + case 97: + _return = "MP_PROP_CLUBH7"; + break; + + case 98: + _return = "MP_PROP_CLUBH8"; + break; + + case 99: + _return = "MP_PROP_CLUBH9"; + break; + + case 100: + _return = "MP_PROP_CLUBH10"; + break; + + case 101: + _return = "MP_PROP_CLUBH11"; + break; + + case 102: + _return = "MP_PROP_CLUBH12"; + break; + + case 103: + case 106: + case 109: + case 112: + _return = "MP_PROP_OFFG1"; + break; + + case 104: + case 107: + case 110: + case 113: + _return = "MP_PROP_OFFG2"; + break; + + case 105: + case 108: + case 111: + case 114: + _return = "MP_PROP_OFFG3"; + break; + + case 115: + _return = "IE_WARE_1"; + break; + } + + return native::get_label_text(_return); + } + + std::string get_vtable_name(uint64_t table) { + uint64_t object_locator = *(uint64_t*)(table - 8); + if (object_locator) { + uint32_t offset = *(uint32_t*)(object_locator + 0xC); + if (offset) { + const char* string = (const char*)(global::vars::g_game_address.first + offset + 0x10); + if (string) { + std::string str(string); + if (str.find(".?A") == 0) { + str = str.substr(4, str.length()); + } + + if (str.find("NodeCommonDataOperations") != std::string::npos) { + str = str.substr(2, str.length()); + + std::size_t at = str.find_first_of('@'); + if (at != std::string::npos) { + std::string base_class = str.substr(at + 1); + if (!base_class.empty()) { + at = base_class.find_first_of("@@"); + if (at != std::string::npos) { + str = base_class.substr(0, at); + if (!str.empty()) { + if (str.length() > 2) { + if (str[0] == 'V' && str[1] == 'C') { + str = "NodeCommonDataOperations<" + str.substr(1) + ">"; + } + } + } + } + } + } + + } else if (str.find("AutoIdDesc__") != std::string::npos) { + std::size_t at = str.find("AutoIdDesc__"); + if (at == 0) { + at = str.find_first_of('@'); + if (at != std::string::npos) { + str = str.substr(13); + str = str.substr(0, str.find('@')); + } + } else { + at = str.find("::AutoIdDesc__"); + if (at != std::string::npos) { + str = str.substr(0, at); + } + } + } else { + std::size_t at = str.find_first_of('@'); + if (at > 0 && at < 0xffff) { + str = str.substr(0, at); + } + } + + return str; + } + + return string; + } + } + + return ""; + } + + std::string get_vtable_name_full(uint64_t table) { + uint64_t object_locator = *(uint64_t*)(table - 8); + if (object_locator) { + uint32_t offset = *(uint32_t*)(object_locator + 0xC); + if (offset) { + const char* string = (const char*)(global::vars::g_game_address.first + offset + 0x10); + if (string) { + std::string str(string); + if (str[0] == '.') { + str = str.substr(1); + } + + char temp[512]; + return std::string(__unDName(temp, str.c_str(), sizeof(temp), malloc, free, 0xA800)); + } + + return string; + } + } + + return ""; + } + + bool is_crash_model(uint32_t model, eNetObjectTypes type) { + switch (model) { + case 0x3F039CBA: + case 0x856CFB02: + case 0x2D7030F3: + case 0x0703F106: + case 0x431d501c: + case 0x1CFC0E72: + case 0x1E15B3EC: + case 0x1CB5C0C3: + return true; + } + + if (type == NetObjectPickup) { + switch (model) { + case 0x5FC8A70: + case 0xB9402F87: + return true; + } + } + + return false; + } + + void detach_node(rage::network::data_node* node) { + std::unordered_map nodes; + node_foreach(node, [&] (std::string name, rage::network::data_node* ptr) { + nodes[name] = ptr; + }); + + auto [has_physical, physical_attach] = get_node_struct(nodes, "CPhysicalAttachDataNode"); + auto [has_ped, ped_attach] = get_node_struct(nodes, "CPedAttachDataNode"); + + if (has_physical) { + physical_attach->m_attached = false; + } + + if (has_ped) { + ped_attach->m_attached = false; + } + } + + void force_node_visible(rage::network::data_node* node) { + std::unordered_map nodes; + node_foreach(node, [&](std::string name, rage::network::data_node* ptr) { + nodes[name] = ptr; + }); + + struct physical_game_state_data_node { + char _0x0000[0xC0]; + bool m_visible; + }; + + auto [has_physical, physical] = get_node_struct(nodes, "CPhysicalGameStateDataNode"); + + if (has_physical) { + physical->m_visible = true; + } + + // CPhysicalScriptGameStateDataNode + } + + void node_foreach_tree(rage::network::sync_tree* tree, std::function callback) { + for (int i = 0; i < tree->m_data_node_count; i++) { + rage::network::data_node* node = tree->m_nodes[i]; + if (node) { + callback("", node); + } + } + } + + void node_foreach(rage::network::data_node* node, std::function callback) { + if (is_valid_ptr(node)) { + rage::network::data_node* current = node; + while (is_valid_ptr(current) && is_valid_ptr(*(uint64_t*)((uint64_t)current))) { + if (current->is_data_node()) { + if (current->m_data_node_common_operations) { + if (current->m_data_node_common_operations->m_data) { + std::string name = get_vtable_name(*(uint64_t*)((uint64_t)current)); + if (!name.empty()) { + callback(name, current); + } + } + } + } + + if (current->is_parent_node()) { + if (current->m_child_count > 0) { + rage::network::data_node* children = current->m_first_child; + if (is_valid_ptr(children)) { + node_foreach(children, callback); + } + } + } + + current = current->m_next; + } + } + } + + bool is_node_attached(rage::network::data_node* node, bool* veh, uint16_t* out_net_id) { + *veh = false; + + std::unordered_map nodes; + node_foreach(node, [&](std::string name, rage::network::data_node* ptr) { + nodes[name] = ptr; + }); + + auto [has_physical, physical_attach] = get_node_struct(nodes, "CPhysicalAttachDataNode"); + auto [has_ped, ped_attach] = get_node_struct(nodes, "CPedAttachDataNode"); + + if (has_physical) { + if (physical_attach->m_attached) { + LOG_DEV("ENTITY ATTACHED! NETID: %i", physical_attach->m_network_id); + if (out_net_id) *out_net_id = physical_attach->m_network_id; + + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr)) { + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr->get_net_obj())) { + if (menu::player::get_local_player().m_ped_ptr->get_net_obj()->m_network_id == physical_attach->m_network_id) { + return true; + } + } + } + + if (menu::player::get_local_player().m_in_vehicle) { + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr)) { + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr->m_vehicle)) { + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr->m_vehicle->get_net_obj())) { + LOG_DEV("MY VEH ID: %i", menu::player::get_local_player().m_ped_ptr->m_vehicle->get_net_obj()->m_network_id); + if (menu::player::get_local_player().m_ped_ptr->m_vehicle->get_net_obj()->m_network_id == physical_attach->m_network_id) { + *veh = true; + return true; + } + } + + for (int i = -1; i < native::get_vehicle_number_of_passengers(menu::player::get_local_player().m_vehicle); i++) { + Ped ped = native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, i, 0); + if (ped) { + rage::types::ped* p = (rage::types::ped*)rage::engine::get_entity_address(ped); + if (p) { + if (p->get_net_obj()) { + if (p->get_net_obj()->m_network_id == physical_attach->m_network_id) { + *veh = true; + return true; + } + } + } + } + } + } + } + } + } + } + + if (has_ped) { + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr)) { + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr->get_net_obj())) { + if (menu::player::get_local_player().m_ped_ptr->get_net_obj()->m_network_id == ped_attach->m_network_id) { + return true; + } + } + } + + if (menu::player::get_local_player().m_in_vehicle) { + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr)) { + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr->m_vehicle)) { + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr->m_vehicle->get_net_obj())) { + if (menu::player::get_local_player().m_ped_ptr->m_vehicle->get_net_obj()->m_network_id == ped_attach->m_network_id) { + *veh = true; + return true; + } + } + + for (int i = -1; i < native::get_vehicle_number_of_passengers(menu::player::get_local_player().m_vehicle); i++) { + Ped ped = native::get_ped_in_vehicle_seat(menu::player::get_local_player().m_vehicle, i, 0); + if (ped) { + rage::types::ped* p = (rage::types::ped*)rage::engine::get_entity_address(ped); + if (p) { + if (p->get_net_obj()) { + if (p->get_net_obj()->m_network_id == ped_attach->m_network_id) { + *veh = true; + return true; + } + } + } + } + } + } + } + } + } + + return false; + } + + bool get_node_creation(rage::network::data_node* node, rage::bit_buffer* buffer, uint32_t* hash, uint64_t* data) { + if (is_valid_ptr(node)) { + rage::network::data_node* current = node; + while (is_valid_ptr(current) && is_valid_ptr(*(uint64_t*)((uint64_t)current))) { + if (current->is_data_node()) { + if (current->m_data_node_common_operations) { + if (current->m_data_node_common_operations->m_data) { + std::string name = get_vtable_name(*(uint64_t*)((uint64_t)current)); + if (!name.empty()) { + if (strstr(name.c_str(), "CreationDataNode") && !strstr(name.c_str(), "CAutomobileCreation")) { + *data = current->m_data_node_common_operations->m_data; + switch (native::get_hash_key(name.c_str())) { + case joaat("CDoorCreationDataNode"): + case joaat("CPlayerCreationDataNode"): + case joaat("CVehicleCreationDataNode"): + return buffer->read_uint(hash, 0x20); + + case joaat("CObjectCreationDataNode"): { + uint32_t unk = 0; + if (buffer->read_uint(&unk, 5)) { + if ((unk & 0xFFFFFFFD) != 0) { + return buffer->read_uint(hash, 0x20); + } + } + + return false; + } + + case joaat("CPedCreationDataNode"): { + bool temp = false; + if (buffer->read_bool(&temp)) { + if (buffer->read_bool(&temp)) { + if (buffer->read_uint(hash, 4)) { + return buffer->read_uint(hash, 0x20); + } + } + } + + return false; + } + + case joaat("CPickupCreationDataNode"): { + rage::bit_buffer_sync_instance sync_reader = buffer->create_reader(); + + bool unk = false; + if (buffer->read_bool(&unk)) { + bool success = false; + uint32_t pickup_hash = 0; + uint32_t hash2 = 0; + uint8_t unk_data[0x200]; + + if (unk) { + success = caller::call(global::vars::g_read_pickup_from_bit_buffer, unk_data, &sync_reader); + pickup_hash = *(uint32_t*)&unk_data[0x8]; + } else { + success = buffer->read_uint(&pickup_hash, 0x20); + } + + if (success) { + unk = *(uint32_t*)(&unk_data[84]) > 0; + if (buffer->read_bool(&unk)) { + if (unk) { + success = buffer->read_uint(&hash2, 0x20); + } + + if (success) { + *hash = *(uint32_t*)(&unk_data[88]); + + unk = *(uint32_t*)(&unk_data[88]) != 0; + if (buffer->read_bool(&unk)) { + if (unk) { + return buffer->read_uint(hash, 0x20); + } + } + } + } + } + } + + return false; + } + } + } + } + } + } + } + + if (current->is_parent_node()) { + if (current->m_child_count > 0) { + rage::network::data_node* children = current->m_first_child; + if (is_valid_ptr(children)) { + if (get_node_creation(children, buffer, hash, data)) { + return true; + } + } + } + } + + current = current->m_next; + } + } + + return false; + } + + void get_node_position(rage::network::data_node* node, math::vector3* out) { + std::unordered_map nodes; + node_foreach(node, [&](std::string name, rage::network::data_node* ptr) { + if (strstr(name.c_str(), "Sector")) { + nodes[name] = ptr; + } + }); + + auto [has_sector_data, sector_data] = get_node_struct(nodes, "CSectorDataNode"); + auto [has_sector_position_data, sector_position_data] = get_node_struct(nodes, "CSectorPositionDataNode"); + auto [has_sector_player_data, sector_player_data] = get_node_struct(nodes, "CPlayerSectorPosNode"); + auto [has_sector_object_data, sector_object_data] = get_node_struct(nodes, "CObjectSectorPosNode"); + auto [has_sector_ped_data, sector_ped_data] = get_node_struct(nodes, "CPedSectorPosMapNode"); + + math::vector3_ sector; + sector.x = has_sector_data ? sector_data->m_pos.x : 512; + sector.y = has_sector_data ? sector_data->m_pos.y : 512; + sector.z = has_sector_data ? sector_data->m_pos.z : 0; + + math::vector3_ sector_pos; + sector_pos.x = + (has_sector_position_data) ? sector_position_data->m_pos.x : + (has_sector_player_data) ? sector_player_data->m_pos.x : + (has_sector_object_data) ? sector_object_data->m_pos.x : + (has_sector_ped_data) ? sector_ped_data->m_pos.x : + 0.0f; + sector_pos.y = + (has_sector_position_data) ? sector_position_data->m_pos.y : + (has_sector_player_data) ? sector_player_data->m_pos.y : + (has_sector_object_data) ? sector_object_data->m_pos.y : + (has_sector_ped_data) ? sector_ped_data->m_pos.y : + 0.0f; + sector_pos.z = + (has_sector_position_data) ? sector_position_data->m_pos.z : + (has_sector_player_data) ? sector_player_data->m_pos.z : + (has_sector_object_data) ? sector_object_data->m_pos.z : + (has_sector_ped_data) ? sector_ped_data->m_pos.z : + 0.0f; + + out->x = ((sector.x - 512.0f) * 54.0f) + sector_pos.x; + out->y = ((sector.y - 512.0f) * 54.0f) + sector_pos.y; + out->z = ((sector.z * 69.0f) + sector_pos.z) - 1700.0f; + } + + void trigger_script_event(std::vector args, int count, Player bitset) { + int bits = 0; + native::set_bit(&bits, bitset); + if (bits != 0) { + int64_t* _args = new int64_t[count]; + for (int i = 0; i < args.size(); i++) { + _args[i] = args[i]; + } + + native::trigger_script_event(1, _args, count, bits); + + delete[] _args; + } + } + + Player get_net_msg_sender(uint64_t raw_buffer) { + uint32_t id = -1; + uint8_t pattern[] = { 0xC9, 0x18 }; + + for (auto& buffer : global::vars::g_raw_buffer_translations) { + uint64_t start = buffer.first; + uint64_t end = start + buffer.second.second; + + if (raw_buffer >= start && raw_buffer <= end) { + id = buffer.second.first; + break; + } + } + + if (id != -1) { + rage::network::net_game_player* player = caller::call(global::vars::g_get_net_msg_net_player, id); + if (player) { + if (player->m_id >= 0 && player->m_id <= 31) { + if (menu::player::get_player(player->m_id).m_connected) { + return player->m_id; + } + } + } + } + + return -1; + } + + std::string get_gs_type(int type) { + switch (type) { + case 0: return "Invite Only"; + case 1: return "Friends Only"; + case 2: return "Crew Only"; + case 4: return "Heist"; + case 5: return "Public"; + } + + return "Unknown"; + } + + color_rgba get_color_from_blip(int id) { + switch (id) { + case 1: return { 0xe13b3bff }; + case 2: return { 0x79ce79ff }; + case 3: return { 0x65b9e7ff }; + case 4: return { 0xf1f1f1ff }; + case 5: return { 0xf0cb58ff }; + case 6: return { 0xc65859ff }; + case 7: return { 0xa175b4ff }; + case 8: return { 0xff81c8ff }; + case 9: return { 0xf7a580ff }; + case 10: return { 0xb6968bff }; + case 11: return { 0x92d0abff }; + case 12: return { 0x78adb3ff }; + case 13: return { 0xd5d3e8ff }; + case 14: return { 0x95859fff }; + case 15: return { 0x71c8c2ff }; + case 16: return { 0xd8c69eff }; + case 17: return { 0xec9359ff }; + case 18: return { 0x9ecdebff }; + case 19: return { 0xb6698dff }; + case 20: return { 0x95927fff }; + case 21: return { 0xaa7b67ff }; + case 22: return { 0xb4abacff }; + case 23: return { 0xe993a0ff }; + case 24: return { 0xbfd863ff }; + case 25: return { 0x17815dff }; + case 26: return { 0x80c7ffff }; + case 27: return { 0xaf45e7ff }; + case 28: return { 0xd0ac18ff }; + case 29: return { 0x4f6ab1ff }; + case 30: return { 0x35aabcff }; + case 31: return { 0xbda284ff }; + case 32: return { 0xcde2ffff }; + case 33: return { 0xf1f19bff }; + case 34: return { 0xee91a4ff }; + case 35: return { 0xf98f8fff }; + case 36: return { 0xfdf0aaff }; + case 37: return { 0xf1f1f1ff }; + case 38: return { 0x3776bdff }; + case 39: return { 0x9f9f9fff }; + case 40: return { 0x555555ff }; + case 41: return { 0xf29e9eff }; + case 42: return { 0x6db8d7ff }; + case 43: return { 0xb0eeafff }; + case 44: return { 0xffa75fff }; + case 45: return { 0xf1f1f1ff }; + case 46: return { 0xecf029ff }; + case 47: return { 0xff9a18ff }; + case 48: return { 0xf745a5ff }; + case 49: return { 0xe13b3bff }; + case 50: return { 0x8a6de3ff }; + case 51: return { 0xff8b5cff }; + case 52: return { 0x426d42ff }; + case 53: return { 0xb3ddf3ff }; + case 54: return { 0x3a647aff }; + case 55: return { 0xa0a0a0ff }; + case 56: return { 0x847232ff }; + case 57: return { 0x65b9e7ff }; + case 58: return { 0x4c4276ff }; + case 59: return { 0xe13b3bff }; + case 60: return { 0xf0cb58ff }; + case 61: return { 0xce3f99ff }; + case 62: return { 0xcfcfcfff }; + case 63: return { 0x286b9fff }; + case 64: return { 0xd87b1bff }; + case 65: return { 0x8e8393ff }; + case 66: return { 0xf0cb58ff }; + case 67: return { 0x65b9e7ff }; + case 68: return { 0x64b7e4ff }; + case 69: return { 0x79ce79ff }; + case 70: return { 0xf0cb58ff }; + case 71: return { 0xf0cb58ff }; + case 73: return { 0xf0cb58ff }; + case 74: return { 0x65b9e7ff }; + case 75: return { 0xe13b3bff }; + case 76: return { 0x782424ff }; + case 77: return { 0x65b9e7ff }; + case 78: return { 0x3a647aff }; + case 81: return { 0xf2a40cff }; + case 82: return { 0xa4ccaaff }; + case 83: return { 0xa854f2ff }; + } + + return { 255, 255, 255 }; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/helpers.h b/GTAV/src/menu/base/util/helpers.h new file mode 100644 index 0000000..80ff858 --- /dev/null +++ b/GTAV/src/menu/base/util/helpers.h @@ -0,0 +1,78 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/base_types.h" +#include "global/ui_vars.h" +#include "rage/types/network_types.h" +#include "menu/base/util/player_manager.h" +#include "rage/types/bit_buffer.h" + +static localization t_type_automobile("Automobile", true, true); +static localization t_type_bike("Bike", true, true); +static localization t_type_boat("Boat", true, true); +static localization t_type_door("Door", true, true); +static localization t_type_heli("Heli", true, true); +static localization t_type_object("Object", true, true); +static localization t_type_ped("Ped", true, true); +static localization t_type_pickup("Pickup", true, true); +static localization t_type_plane("Plane", true, true); +static localization t_type_submarine("Submarine", true, true); +static localization t_type_player("Player", true, true); +static localization t_type_trailer("Trailer", true, true); +static localization t_type_train("Train", true, true); +static localization t_clone("Clone", true, true); +static localization t_cage("Cage", true, true); +static localization t_attachment("Attachment", true, true); +static localization t_crash_outfit("Crash - Invalid Outfit", true, true); +static localization t_crash_nodes("Crash - Alignment", true, true); +static localization t_crash_tree("Crash - Sync Tree", true, true); +static localization t_crash_bad_node_count("Crash - Bad Node Count", true, true); +static localization t_crash_bad_model("Crash - Bad Model", true, true); +static localization t_crash_bad_type("Crash - Bad Type", true, true); +static localization t_crash_quantum("Crash - Quantum Paste", true, true); +static localization t_attachment_to(" to ", true, true); +static localization t_attachment_player("Player", true, true); +static localization t_attachment_vehicle("Vehicle", true, true); +static localization t_vehicle_owner_migration("Vehicle Owner Migration", true, true); +static localization t_ped_owner_migration("Ped Owner Migration", true, true); +static localization t_object_owner_migration("Object Owner Migration", true, true); + +namespace menu::helpers { + std::string get_net_obj_type_string(eNetObjectTypes type); + std::string clean_name(std::string fixed); + std::string get_location_from_id(int id); + std::string get_vtable_name(uint64_t table); + std::string get_vtable_name_full(uint64_t table); + bool is_valid_net_player(rage::network::net_game_player* sender); + bool is_rockstar_ip(uint32_t ip); + bool is_crash_model(uint32_t model, eNetObjectTypes type); + bool is_node_attached(rage::network::data_node* node, bool* veh, uint16_t* out_net_id = nullptr); + bool get_node_creation(rage::network::data_node* node, rage::bit_buffer* buffer, uint32_t* hash, uint64_t* data); + void get_node_position(rage::network::data_node* node, math::vector3* out); + void node_foreach(rage::network::data_node* node, std::function callback); + void node_foreach_tree(rage::network::sync_tree* tree, std::function callback); + void force_node_visible(rage::network::data_node* node); + void detach_node(rage::network::data_node* node); + void flag_modder(int id, menu::player::ePlayerReportReasons reason, bool blacklist = false); + menu::player::player_context& get_player_from_peer(uint64_t peer); + menu::player::player_context& get_player_from_ip(uint32_t ip); + menu::player::player_context& get_player_from_rid(uint64_t rid); + void trigger_script_event(std::vector args, int count, Player bitset); + Player get_net_msg_sender(uint64_t raw_buffer); + std::string get_gs_type(int type); + color_rgba get_color_from_blip(int id); + + template + std::pair get_node_struct(std::unordered_map nodes, std::string name) { + if (nodes[name]) { + if (nodes[name]->is_data_node()) { + if (nodes[name]->m_data_node_common_operations) { + if (nodes[name]->m_data_node_common_operations->m_data) { + return { true, (T*)nodes[name]->m_data_node_common_operations->m_data }; + } + } + } + } + + return { false, nullptr }; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/hotkeys.cpp b/GTAV/src/menu/base/util/hotkeys.cpp new file mode 100644 index 0000000..311cef5 --- /dev/null +++ b/GTAV/src/menu/base/util/hotkeys.cpp @@ -0,0 +1,107 @@ +#include "hotkeys.h" +#include "menu/base/base.h" +#include "rage/invoker/natives.h" +#include "Input.h" +#include "util/config.h" +#include "menu/base/submenu_handler.h" + +namespace menu::hotkey { + std::stack get_option_name_stack(base_option* parent) { + if (parent->get_submenu_name_stack()) { + return *parent->get_submenu_name_stack(); + } + + return {}; + } + + void hotkey::update() { + if (base::is_input_disabled()) return; + + std::unordered_map just_pressed; + std::unordered_map just_released; + + for (hotkey_context& key : m_registered_hotkeys) { + if (!native::is_text_chat_active()) { + if (key.m_type == 0) { + if (input::is_just_released(true, key.m_key) || just_released[key.m_key]) { + just_released[key.m_key] = true; + } + + if (just_released[key.m_key]) { + key.m_parent->invoke_hotkey(); + } + } else if (key.m_type == 1) { + if (input::is_just_pressed(true, key.m_key) || just_pressed[key.m_key]) { + just_pressed[key.m_key] = true; + } + + if (just_pressed[key.m_key]) { + key.m_parent->invoke_hotkey(); + } + } else { + if (input::is_pressed(true, key.m_key)) { + key.m_parent->invoke_hotkey(); + } + } + } + } + } + + void hotkey::change_type(int new_type, base_option* parent) { + for (std::size_t i = 0; i < m_registered_hotkeys.size(); i++) { + hotkey_context& hotkey = m_registered_hotkeys[i]; + if (hotkey.m_parent == parent) { + hotkey.m_type = new_type; + + std::stack name_stack = get_option_name_stack(parent); + if (name_stack.size()) { + util::config::write_int(name_stack, "Type", 0, { "Hotkeys", parent->get_name().get_original() }); + } + } + } + } + + void hotkey::read_hotkey(base_option* parent) { + std::stack name_stack = get_option_name_stack(parent); + if (name_stack.size()) { + bool toggled = util::config::read_bool(name_stack, "Toggled", false, { "Hotkeys", parent->get_name().get_original() }); + if (toggled) { + int key = util::config::read_int(name_stack, "Key", -1, { "Hotkeys", parent->get_name().get_original() }); + int type = util::config::read_int(name_stack, "Type", 0, { "Hotkeys", parent->get_name().get_original() }); + parent->set_hotkey(key); + m_registered_hotkeys.push_back({ key, parent, type }); + } + } + } + + void hotkey::register_hotkey(int key, base_option* parent) { + m_registered_hotkeys.push_back({ key, parent, 0 }); + + std::stack name_stack = get_option_name_stack(parent); + if (name_stack.size()) { + util::config::write_int(name_stack, "Key", key, { "Hotkeys", parent->get_name().get_original() }); + util::config::write_int(name_stack, "Type", 0, { "Hotkeys", parent->get_name().get_original() }); + util::config::write_bool(name_stack, "Toggled", true, { "Hotkeys", parent->get_name().get_original() }); + } + } + + void hotkey::unregister_hotkey(base_option* parent) { + for (std::size_t i = 0; i < m_registered_hotkeys.size(); i++) { + hotkey_context& hotkey = m_registered_hotkeys[i]; + if (hotkey.m_parent == parent) { + hotkey.m_parent->set_hotkey(-1); + m_registered_hotkeys.erase(begin(m_registered_hotkeys) + i); + } + } + + std::stack name_stack = get_option_name_stack(parent); + if (name_stack.size()) { + util::config::write_bool(name_stack, "Toggled", false, { "Hotkeys", parent->get_name().get_original() }); + } + } + + hotkey* get_hotkey() { + static hotkey instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/hotkeys.h b/GTAV/src/menu/base/util/hotkeys.h new file mode 100644 index 0000000..c784563 --- /dev/null +++ b/GTAV/src/menu/base/util/hotkeys.h @@ -0,0 +1,50 @@ +#pragma once +#include "stdafx.h" +#include "menu/base/options/option.h" + +namespace menu::hotkey { + struct hotkey_context { + int m_key; + base_option* m_parent; + int m_type = 0; // 0 = release, 1 = press, 2 = hold + }; + + class hotkey { + public: + void update(); + void read_hotkey(base_option* parent); + void register_hotkey(int key, base_option* parent); + void unregister_hotkey(base_option* parent); + void change_type(int new_type, base_option* parent); + + std::vector& get_hotkeys() { return m_registered_hotkeys; } + private: + std::vector m_registered_hotkeys; + }; + + hotkey* get_hotkey(); + + inline void update() { + get_hotkey()->update(); + } + + inline void read_hotkey(base_option* parent) { + get_hotkey()->read_hotkey(parent); + } + + inline void register_hotkey(int key, base_option* parent) { + get_hotkey()->register_hotkey(key, parent); + } + + inline void unregister_hotkey(base_option* parent) { + get_hotkey()->unregister_hotkey(parent); + } + + inline std::vector& get_hotkeys() { + return get_hotkey()->get_hotkeys(); + } + + inline void change_type(int new_type, base_option* parent) { + get_hotkey()->change_type(new_type, parent); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/input.cpp b/GTAV/src/menu/base/util/input.cpp new file mode 100644 index 0000000..da45f45 --- /dev/null +++ b/GTAV/src/menu/base/util/input.cpp @@ -0,0 +1,222 @@ +#include "Input.h" +#include "menu/base/base.h" +#include "menu/base/submenu_handler.h" +#include "global/vars.h" +#include "rage/invoker/natives.h" +#include "menu/base/submenus/main/misc/scripthook.h" + +namespace menu::input { + LRESULT APIENTRY input::window_process_callback(HWND hwnd, UINT msg, WPARAM param, LPARAM lparam) { + switch (msg) { + case WM_KEYDOWN: + case WM_KEYUP: + case WM_SYSKEYDOWN: + case WM_SYSKEYUP: { + if (param < 255) { + get_input()->m_key_states[param].m_time = GetTickCount(); + get_input()->m_key_states[param].m_is_with_alt = (msg == WM_SYSKEYDOWN || msg == WM_SYSKEYUP); + get_input()->m_key_states[param].m_was_down_before = (lparam >> 30) & 1; + get_input()->m_key_states[param].m_is_up_now = (msg == WM_SYSKEYUP || msg == WM_KEYUP); + if (!get_input()->m_key_states[param].m_was_down_before) get_input()->m_key_states[param].m_just_down = !(msg == WM_SYSKEYUP || msg == WM_KEYUP); + + if (get_input()->m_key_states[param].m_is_up_now) { + get_input()->set_last_key((int)param); + } + } + + for (auto function : misc::scripthook::vars::m_vars.m_keyboards) { + function((uint32_t)param, lparam & 0xFFFF, (lparam >> 16) & 0xFF, (lparam >> 24) & 1, (msg == WM_SYSKEYDOWN || msg == WM_SYSKEYUP), (lparam >> 30) & 1, (msg == WM_SYSKEYUP || msg == WM_KEYUP)); + } + + break; + } + } + + return CallWindowProc(get_input()->get_windows_process(), hwnd, msg, param, lparam); + } + + void input::update() { + if (!m_windows_process) { + m_windows_process = (WNDPROC)SetWindowLongPtrA(global::vars::g_window, GWLP_WNDPROC, (LONG_PTR)window_process_callback); + } + + if (menu::base::is_input_disabled()) return; + + static uint32_t counter = 0; + static int delay = 150; + + if (counter < GetTickCount()) { + if (is_open_bind_pressed()) { + native::play_sound_frontend(-1, "Back", "HUD_FRONTEND_DEFAULT_SOUNDSET", false); + menu::base::set_open(!menu::base::is_open()); + counter = GetTickCount() + 300; + } else { + if (menu::base::is_open()) { + if (is_pressed(true, VK_NUMPAD8) || is_pressed(false, ControlFrontendUp)) { + if (menu::base::get_current_option() == 0) { + scroll_bottom(); + } else { + scroll_up(); + } + + if (delay > 120) delay -= 15; + } else if (is_pressed(true, VK_NUMPAD2) || is_pressed(false, ControlFrontendDown)) { + if (menu::base::get_current_option() >= menu::submenu::handler::get_total_options() - 1) { + scroll_top(); + } else { + scroll_down(); + } + } else if (is_just_pressed(true, VK_NUMPAD0) || is_just_released(false, ControlFrontendCancel)) { + menu::submenu::handler::set_submenu_previous(false); + native::play_sound_frontend(-1, "Back", "HUD_FRONTEND_DEFAULT_SOUNDSET", false); + } else { + delay = 150; + return; + } + + if (delay > 80) delay -= 15; + counter = GetTickCount() + delay; + } + } + } + } + + void input::scroll_up(bool disable_sound) { + if (menu::submenu::handler::get_total_options() == 0) return; + menu::base::set_current_option(menu::base::get_current_option() - 1); + + if ((menu::base::get_scroll_offset() > 0 && menu::base::get_current_option() - menu::base::get_scroll_offset() == -1)) + menu::base::set_scroll_offset(menu::base::get_scroll_offset() - 1); + + if (!disable_sound) native::play_sound_frontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", false); + menu::base::set_break_scroll(1); + } + + void input::scroll_down(bool disable_sound) { + if (menu::submenu::handler::get_total_options() == 0) return; + menu::base::set_current_option(menu::base::get_current_option() + 1); + + if (menu::base::get_scroll_offset() < menu::submenu::handler::get_total_options() - menu::base::get_max_options() + && menu::base::get_current_option() - menu::base::get_scroll_offset() == menu::base::get_max_options()) + menu::base::set_scroll_offset(menu::base::get_scroll_offset() + 1); + + if (!disable_sound) native::play_sound_frontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", false); + menu::base::set_break_scroll(2); + } + + void input::scroll_bottom(bool disable_sound) { + if (menu::submenu::handler::get_total_options() == 0) return; + menu::base::set_current_option(menu::submenu::handler::get_total_options() - 1); + + if (menu::submenu::handler::get_total_options() >= menu::base::get_max_options()) menu::base::set_scroll_offset(menu::submenu::handler::get_total_options() - menu::base::get_max_options()); + + int current_option = base::get_current_option(); + int max_options = base::get_max_options(); + int scroll_offset = base::get_scroll_offset(); + int total_options = menu::submenu::handler::get_total_options(); + int scroller_position = math::clamp(current_option - scroll_offset > max_options ? max_options : current_option - scroll_offset, 0, max_options); + menu::renderer::set_smooth_scroll(global::ui::g_position.y + (scroller_position * global::ui::g_option_scale)); + + if (!disable_sound) native::play_sound_frontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", false); + menu::base::set_break_scroll(3); + } + + void input::scroll_top(bool disable_sound) { + if (menu::submenu::handler::get_total_options() == 0) return; + + menu::base::set_current_option(0); + menu::base::set_scroll_offset(0); + + int current_option = base::get_current_option(); + int max_options = base::get_max_options(); + int scroll_offset = base::get_scroll_offset(); + int total_options = menu::submenu::handler::get_total_options(); + int scroller_position = math::clamp(current_option - scroll_offset > max_options ? max_options : current_option - scroll_offset, 0, max_options); + menu::renderer::set_smooth_scroll(global::ui::g_position.y + (scroller_position * global::ui::g_option_scale)); + + if (!disable_sound) native::play_sound_frontend(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", false); + menu::base::set_break_scroll(4); + } + + bool input::is_just_released(bool keyboard, int key, bool override_input) { + if (menu::base::is_input_disabled() && !override_input) return false; + + if (keyboard) { + bool result = GetTickCount() < (m_key_states[key].m_time + 100) && m_key_states[key].m_is_up_now; + memset(&m_key_states[key], 0, sizeof(m_key_states[0])); + return result; + } + + return native::is_disabled_control_just_released(0, key); + } + + bool input::is_just_pressed(bool keyboard, int key, bool override_input) { + if (menu::base::is_input_disabled() && !override_input) return false; + + + if (keyboard) { + bool result = GetTickCount() - 100 < m_key_states[key].m_time && !m_key_states[key].m_is_up_now && m_key_states[key].m_just_down; + if (result) m_key_states[key].m_just_down = false; + return result; + + // return ((GetAsyncKeyState(key) & 0xFFFF) == 0x8001); + } + + return native::is_disabled_control_just_pressed(0, key); + } + + bool input::is_pressed(bool keyboard, int key, bool override_input) { + if (menu::base::is_input_disabled() && !override_input) return false; + + if (keyboard) { + return GetTickCount() < (m_key_states[key].m_time + 600000) && !m_key_states[key].m_is_up_now; + // return (GetAsyncKeyState(key) & 0x8000); + } + + return native::is_disabled_control_pressed(0, key); + } + + bool input::is_open_bind_pressed(bool override_input) { + return (is_pressed(false, ControlFrontendRb) && is_pressed(false, ControlFrontendRight)) || is_pressed(true, menu::base::get_open_key(), override_input); + } + + bool input::is_option_pressed(bool override_input) { + if (menu::base::is_input_disabled() && !override_input) return false; + + if (native::is_disabled_control_just_released(0, ControlFrontendAccept) || is_just_pressed(true, VK_NUMPAD5, override_input)) { + native::play_sound_frontend(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", FALSE); + return true; + } + + return false; + } + + bool input::is_left_just_pressed(bool override_input) { + if (menu::base::is_input_disabled() && !override_input) return false; + return is_just_pressed(false, ControlFrontendLeft) || is_just_pressed(true, VK_NUMPAD4, override_input); + } + + bool input::is_right_just_pressed(bool override_input) { + if (menu::base::is_input_disabled() && !override_input) return false; + return is_just_pressed(false, ControlFrontendRight) || is_just_pressed(true, VK_NUMPAD6, override_input); + } + + bool input::is_left_pressed(bool override_input) { + if (menu::base::is_input_disabled() && !override_input) return false; + return is_pressed(false, ControlFrontendLeft) || is_pressed(true, VK_NUMPAD4, override_input); + } + + bool input::is_right_pressed(bool override_input) { + if (menu::base::is_input_disabled() && !override_input) return false; + return is_pressed(false, ControlFrontendRight) || is_pressed(true, VK_NUMPAD6, override_input); + } + + void input::cleanup() { + SetWindowLongPtrA(global::vars::g_window, GWLP_WNDPROC, (LONG_PTR)m_windows_process); + } + + input* get_input() { + static input instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/input.h b/GTAV/src/menu/base/util/input.h new file mode 100644 index 0000000..fed45ed --- /dev/null +++ b/GTAV/src/menu/base/util/input.h @@ -0,0 +1,119 @@ +#pragma once +#include "stdafx.h" + +namespace menu::input { + class input { + public: + static LRESULT APIENTRY window_process_callback(HWND hwnd, UINT msg, WPARAM param, LPARAM lparam); + + void update(); + void scroll_up(bool disable_sound = false); + void scroll_down(bool disable_sound = false); + void scroll_bottom(bool disable_sound = false); + void scroll_top(bool disable_sound = false); + void cleanup(); + + bool is_just_released(bool keyboard, int key, bool override_input = false); + bool is_just_pressed(bool keyboard, int key, bool override_input = false); + bool is_pressed(bool keyboard, int key, bool override_input = false); + + bool is_open_bind_pressed(bool override_input = false); + bool is_option_pressed(bool override_input = false); + bool is_left_just_pressed(bool override_input = false); + bool is_right_just_pressed(bool override_input = false); + bool is_left_pressed(bool override_input = false); + bool is_right_pressed(bool override_input = false); + + void set_last_key(int key) { m_last_key = key; } + + WNDPROC get_windows_process() { return m_windows_process; } + int get_last_key() { return m_last_key; } + private: + struct KeyboardState { + uint32_t m_time; + bool m_is_with_alt; + bool m_was_down_before; + bool m_is_up_now; + bool m_just_up; + bool m_just_down; + }; + + KeyboardState m_key_states[255]; + WNDPROC m_windows_process; + int m_last_key; + }; + + input* get_input(); + + inline void update() { + get_input()->update(); + } + + inline void scroll_up(bool disable_sound = false) { + get_input()->scroll_up(disable_sound); + } + + inline void scroll_down(bool disable_sound = false) { + get_input()->scroll_down(disable_sound); + } + + inline void scroll_bottom(bool disable_sound = false) { + get_input()->scroll_bottom(disable_sound); + } + + inline void scroll_top(bool disable_sound = false) { + get_input()->scroll_top(disable_sound); + } + + inline void cleanup() { + get_input()->cleanup(); + } + + inline bool is_just_released(bool keyboard, int key, bool override_input = false) { + return get_input()->is_just_released(keyboard, key, override_input); + } + + inline bool is_just_pressed(bool keyboard, int key, bool override_input = false) { + return get_input()->is_just_pressed(keyboard, key, override_input); + } + + inline bool is_pressed(bool keyboard, int key, bool override_input = false) { + return get_input()->is_pressed(keyboard, key, override_input); + } + + inline bool is_open_bind_pressed(bool override_input = false) { + return get_input()->is_open_bind_pressed(override_input); + } + + inline bool is_option_pressed(bool override_input = false) { + return get_input()->is_option_pressed(override_input); + } + + inline bool is_left_just_pressed(bool override_input = false) { + return get_input()->is_left_just_pressed(override_input); + } + + inline bool is_right_just_pressed(bool override_input = false) { + return get_input()->is_right_just_pressed(override_input); + } + + inline bool is_left_pressed(bool override_input = false) { + return get_input()->is_left_pressed(override_input); + } + + inline bool is_right_pressed(bool override_input = false) { + return get_input()->is_right_pressed(override_input); + } + + inline void set_last_key(int key) { + get_input()->set_last_key(key); + } + + inline WNDPROC get_windows_process() { + return get_input()->get_windows_process(); + } + + inline int get_last_key() { + return get_input()->get_last_key(); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/instructionals.cpp b/GTAV/src/menu/base/util/instructionals.cpp new file mode 100644 index 0000000..bcccc99 --- /dev/null +++ b/GTAV/src/menu/base/util/instructionals.cpp @@ -0,0 +1,345 @@ +#include "instructionals.h" +#include "rage/invoker/natives.h" +#include "global/ui_vars.h" + +namespace instructionals { + static const char* g_key_names_instructional[254] = { + "F10", + "F10", + "F10", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "BACKSPACE", + "TAB", + "TAB", + "TAB", + "NUM 5", + "ENTER", + "ENTER", + "ENTER", + "SHIFT", + "CTRL", + "ALT", + "ALT", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "ESC", + "ESC", + "ESC", + "ESC", + "ESC", + "SPACE", + "NUM 9", + "NUM 3", + "NUM 1", + "NUM 7", + "LEFT", + "UP", + "RIGHT", + "DOWN", + "NUM 2", + "NUM 2", + "NUM 2", + "NUM 2", + "NUM 0", + "DELETE", + "NUM DECIMAL", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "9", + "9", + "9", + "9", + "9", + "9", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "Z", + "Z", + "Z", + "Z", + "Z", + "N0", + "N1", + "N2", + "N3", + "N4", + "N5", + "N6", + "N7", + "N8", + "N9", + "*", + "NUM PLUS", + "NUM PLUS", + "NUM SUB", + "NUM DECIMAL", + "/", + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "Pause", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SHIFT", + "RIGHT SHIFT", + "CTRL", + "CTRL", + "ALT", + "ALT", + "ALT", + "ALT", + "ALT", + "ALT", + "ALT", + "ALT", + "M", + "D", + "C", + "B", + "P", + "Q", + "J", + "G", + "G", + "G", + "G", + "F", + "F", + "F", + ";", + "=", + ",", + "-", + ".", + "/", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "[", + "null", + "]", + "ACUTE/CEDILLA", + "ACUTE/CEDILLA", + "ACUTE/CEDILLA", + "ACUTE/CEDILLA", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null" + }; + + void instructionals::setup() { + if (!native::has_scaleform_movie_loaded(m_handle)) { + m_handle = native::request_scaleform_movie("instructional_buttons"); + return; + } + + native::push_scaleform_movie_function(m_handle, "CLEAR_ALL"); + native::pop_scaleform_movie_function_void(); + + native::push_scaleform_movie_function(m_handle, "TOGGLE_MOUSE_BUTTONS"); + native::push_scaleform_movie_function_parameter_bool(1); + native::pop_scaleform_movie_function_void(); + + native::push_scaleform_movie_function(m_handle, "SET_MAX_WIDTH"); + native::push_scaleform_movie_function_parameter_float(1.f); + native::pop_scaleform_movie_function_void(); + } + + void instructionals::add_instructional(std::string text, eControls control) { + native::push_scaleform_movie_function(m_handle, "SET_DATA_SLOT"); + native::push_scaleform_movie_function_parameter_int(m_count++); + + native::_0xE83A3E3557A56640(native::get_control_instructional_button(0, control, true)); // problem! + + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(text.c_str()); + native::end_text_command_scaleform_string(); + + native::push_scaleform_movie_function_parameter_bool(true); + native::push_scaleform_movie_function_parameter_int(control); + + native::pop_scaleform_movie_function_void(); + } + + void instructionals::add_instructional(std::string text, eScaleformButtons button_option) { + native::push_scaleform_movie_function(m_handle, "SET_DATA_SLOT"); + native::push_scaleform_movie_function_parameter_int(m_count++); + + native::push_scaleform_movie_function_parameter_int(button_option); + + native::begin_text_command_scaleform_string("STRING"); + native::add_text_component_substring_player_name(text.c_str()); + native::end_text_command_scaleform_string(); + + native::push_scaleform_movie_function_parameter_bool(true); + native::push_scaleform_movie_function_parameter_int(button_option); + + native::pop_scaleform_movie_function_void(); + } + + void instructionals::add_instructional(std::string text, int vk) { + native::push_scaleform_movie_function(m_handle, "SET_DATA_SLOT"); + native::push_scaleform_movie_function_parameter_int(m_count++); + + native::_0xE83A3E3557A56640(("t_" + (std::string)g_key_names_instructional[vk]).c_str()); + native::push_scaleform_movie_function_parameter_string(text.c_str()); + native::push_scaleform_movie_function_parameter_bool(true); + native::push_scaleform_movie_function_parameter_int(vk); + + native::pop_scaleform_movie_function_void(); + } + + void instructionals::close() { + native::push_scaleform_movie_function(m_handle, "SET_BACKGROUND_COLOUR"); + native::push_scaleform_movie_function_parameter_int(global::ui::g_instructional_background.r); + native::push_scaleform_movie_function_parameter_int(global::ui::g_instructional_background.g); + native::push_scaleform_movie_function_parameter_int(global::ui::g_instructional_background.b); + native::push_scaleform_movie_function_parameter_int(80); + native::pop_scaleform_movie_function_void(); + + native::push_scaleform_movie_function(m_handle, "DRAW_INSTRUCTIONAL_BUTTONS"); + native::push_scaleform_movie_function_parameter_int(0); + native::pop_scaleform_movie_function_void(); + + native::draw_scaleform_movie_fullscreen(m_handle, 255, 255, 255, 255, 0); + m_count = 0; + } + + instructionals* get_instructionals() { + static instructionals instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/instructionals.h b/GTAV/src/menu/base/util/instructionals.h new file mode 100644 index 0000000..357c542 --- /dev/null +++ b/GTAV/src/menu/base/util/instructionals.h @@ -0,0 +1,85 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/base_types.h" +#include "util/localization.h" + +namespace instructionals { + static localization t_open_category("Open Category", true, true); + static localization t_close_menu("Close Menu", true, true); + static localization t_scroll("Scroll", true, true); + static localization t_select("Select", true, true); + static localization t_back("Back", true, true); + static localization t_rainbow_config("Rainbow Config", true, true); + static localization t_adjust("Adjust", true, true); + static localization t_input("Input", true, true); + static localization t_add_hotkey("Add Hotkey", true, true); + + class instructionals { + public: + void setup(); + void add_instructional(std::string text, eControls control); + void add_instructional(std::string text, eScaleformButtons button_option); + void add_instructional(std::string text, int vk); + void close(); + private: + int m_count = 0; + int m_handle = 0; + }; + + instructionals* get_instructionals(); + + inline void setup() { + get_instructionals()->setup(); + } + + inline void add_instructional(std::string text, eControls control) { + get_instructionals()->add_instructional(text, control); + } + + inline void add_instructional(std::string text, eScaleformButtons button_option) { + get_instructionals()->add_instructional(text, button_option); + } + + inline void add_instructional(std::string text, int vk) { + get_instructionals()->add_instructional(text, vk); + } + + inline void close() { + get_instructionals()->close(); + } + + inline void main_menu() { + get_instructionals()->setup(); + get_instructionals()->add_instructional(TRANSLATE(t_open_category), ControlFrontendAccept); + get_instructionals()->add_instructional(TRANSLATE(t_close_menu), ControlFrontendCancel); + get_instructionals()->add_instructional(TRANSLATE(t_scroll), ARROW_UP_DOWN); + get_instructionals()->close(); + } + + inline void standard(bool scroller, bool keyboard, bool hotkey) { + get_instructionals()->setup(); + get_instructionals()->add_instructional(TRANSLATE(t_select), ControlFrontendAccept); + get_instructionals()->add_instructional(TRANSLATE(t_back), ControlFrontendCancel); + get_instructionals()->add_instructional(TRANSLATE(t_scroll), ARROW_UP_DOWN); + + if (scroller) get_instructionals()->add_instructional(TRANSLATE(t_adjust), ARROW_LEFT_RIGHT); + if (keyboard) get_instructionals()->add_instructional(TRANSLATE(t_input), ControlPhoneSelect); + if (hotkey) get_instructionals()->add_instructional(TRANSLATE(t_add_hotkey), VK_F12); + + get_instructionals()->close(); + } + + inline void rainbow(bool scroller = false, bool keyboard = false, bool hotkey = false) { + get_instructionals()->setup(); + get_instructionals()->add_instructional(TRANSLATE(t_select), ControlFrontendAccept); + get_instructionals()->add_instructional(TRANSLATE(t_back), ControlFrontendCancel); + get_instructionals()->add_instructional(TRANSLATE(t_scroll), ARROW_UP_DOWN); + get_instructionals()->add_instructional(TRANSLATE(t_rainbow_config), ControlFrontendX); + + if (scroller) get_instructionals()->add_instructional(TRANSLATE(t_adjust), ARROW_LEFT_RIGHT); + if (keyboard) get_instructionals()->add_instructional(TRANSLATE(t_input), ControlPhoneSelect); + if (hotkey) get_instructionals()->add_instructional(TRANSLATE(t_add_hotkey), VK_F12); + + get_instructionals()->close(); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/menu_input.cpp b/GTAV/src/menu/base/util/menu_input.cpp new file mode 100644 index 0000000..c7ba23a --- /dev/null +++ b/GTAV/src/menu/base/util/menu_input.cpp @@ -0,0 +1,446 @@ +#include "menu_input.h" +#include "menu/base/base.h" +#include "util/fiber.h" +#include "util/va.h" +#include "menu/base/renderer.h" +#include "menu/base/util/input.h" +#include "menu/base/util/hotkeys.h" + +namespace menu::input { + localization t_enter_to_add("enter to add, escape to cancel", true, true); + + void menu_input::update() { + if (!base::is_open()) return; + + for (std::function function : m_queue) { + function(); + } + + m_queue.clear(); + } + + void menu_input::push(std::function function) { + m_queue.push_back(function); + } + + void menu_input::color(color_rgba* option) { + global::ui::g_input_open = true; + + bool exit = false; + bool accepted = false; + int selection_count = 50; + int grid_count = 50; + int alpha_slider = option->a; + + color_hsv original_hsv = menu::renderer::rgb_to_hsv(*option); + color_rgba original_rgb = *option; + + float hue_slider = original_hsv.h; + int slider_x = 50 - (int)(original_hsv.s * 50); + int slider_y = 50 - (int)(original_hsv.v * 50); + + bool slider_selected = false; + bool alpha_selected = false; + + while (!exit) { + util::fiber::go_to_main(); + menu::base::set_disable_input_this_frame(); + + static float w = 0.25f; + static float h = 0.675f; + static float x = 0.5f - (w * 0.5f); + static float y = 0.235f; + static float bezzel = 0.007875f / 2.f; + + // bar + menu::renderer::draw_rect({ x, y - bezzel }, { w, bezzel }, global::ui::g_color_grid_bar); // header + + // background + menu::renderer::draw_rect({ x, y }, { w, h }, global::ui::g_color_grid_background); + + // x * (1.f / grid_count) + // y * (1.f / grid_count) + + // hsv/alpha bar + for (int i = 0; i <= selection_count; i++) { + // hsv + float base_w = w / (selection_count + 3); + float base_x = x + base_w; + float base_y = y + 0.015f; + menu::renderer::draw_rect({ base_x + (base_w * i), base_y }, { base_w, base_w * 2.f }, menu::renderer::hsv_to_rgb(i * (360.f / selection_count), 1.f, 1.f)); + + // alpha + int alpha = (255 * i) / selection_count; + // 1.f - ((1.f / grid_count) * slider_x) + menu::renderer::draw_rect({ base_x + (base_w * i), base_y + (base_w * 3.f) }, { base_w, base_w * 2.f }, menu::renderer::hsv_to_rgb(hue_slider, 1.f - ((1.f / grid_count) * slider_x), 1.f - ((1.f / grid_count) * slider_y), alpha)); + } + + // hsv grid + for (int xx = 0; xx <= grid_count; xx++) { + for (int yy = 0; yy <= grid_count; yy++) { + float base_w = w / (grid_count + 3); + float base_x = x + base_w; + float base_y = y + 0.015f; + + menu::renderer::draw_rect({ base_x + (base_w * xx), base_y + (base_w * 6.f) + ((base_w * 2.f) * yy) }, { base_w, base_w * 2.f }, menu::renderer::hsv_to_rgb(hue_slider, 1.f - ((1.f / grid_count) * xx), 1.f - ((1.f / grid_count) * yy))); + } + } + + color_rgba selected_color = menu::renderer::hsv_to_rgb(hue_slider, 1.f - ((1.f / grid_count) * slider_x), 1.f - ((1.f / grid_count) * slider_y), alpha_slider); + color_hsv selected_hsv = menu::renderer::rgb_to_hsv(selected_color); + + float base_w = 0.0047f; + float box_width = 0.0768f; + float base_y = (y + 0.015f) + (base_w * 6.f) + ((base_w * 2.f) * 52); + + // R/H/A box + menu::renderer::draw_rect({ x + base_w, base_y }, { box_width, 0.036f }, { 255, 255, 255, 200 }); // r + menu::renderer::draw_rect({ x + base_w + (box_width * 1.f) + 0.005f, base_y }, { box_width, 0.036f }, { 255, 255, 255, 200 }); // h + menu::renderer::draw_rect({ x + base_w + (box_width * 2.f) + 0.01f, base_y }, { box_width, 0.036f }, { 255, 255, 255, 200 }); // a + + // R/H/A text + menu::renderer::draw_text("R", { x + base_w + 0.0025f, base_y + 0.006f }, 0.35f, 0, { 0, 0, 0, 255 }); // r identifier + menu::renderer::draw_text("H", { x + base_w + (box_width * 1.f) + 0.005f + 0.0025f, base_y + 0.006f }, 0.35f, 0, { 0, 0, 0, 255 }); // h identifier + menu::renderer::draw_text("A", { x + base_w + (box_width * 2.f) + 0.01f + 0.0025f, base_y + 0.006f }, 0.35f, 0, { 0, 0, 0, 255 }); // a identifier + + // R/H/A text box + menu::renderer::draw_rect({ x + base_w + 0.013f, base_y }, { 0.001f, 0.036f }, { 0, 0, 0, 180 }); // r + menu::renderer::draw_rect({ x + base_w + (box_width * 1.f) + 0.005f + 0.013f, base_y }, { 0.001f, 0.036f }, { 0, 0, 0, 180 }); // h + menu::renderer::draw_rect({ x + base_w + (box_width * 2.f) + 0.01f + 0.013f, base_y }, { 0.001f, 0.036f }, { 0, 0, 0, 180 }); // a + + // R/H/A values + menu::renderer::draw_text(std::to_string(selected_color.r), { x + base_w + ((box_width + 0.0125f) / 2.f), base_y + 0.008f }, 0.3f, 0, { 0, 0, 0, 255 }, JUSTIFY_CENTER); // r + menu::renderer::draw_text(util::va::va("%.2f", selected_hsv.h), { x + base_w + (box_width * 1.f) + 0.005f + ((box_width + 0.0125f) / 2.f), base_y + 0.008f }, 0.3f, 0, { 0, 0, 0, 255 }, JUSTIFY_CENTER); // h + menu::renderer::draw_text(std::to_string(selected_color.a), { x + base_w + (box_width * 2.f) + 0.01f + ((box_width + 0.0125f) / 2.f), base_y + 0.008f }, 0.3f, 0, { 0, 0, 0, 255 }, JUSTIFY_CENTER); // a + + base_y = (y + 0.015f) + (base_w * 6.f) + ((base_w * 2.f) * 57); + + // G/S/HEX box + menu::renderer::draw_rect({ x + base_w, base_y }, { box_width, 0.036f }, { 255, 255, 255, 200 }); // g + menu::renderer::draw_rect({ x + base_w + (box_width * 1.f) + 0.005f, base_y }, { box_width, 0.036f }, { 255, 255, 255, 200 }); // s + menu::renderer::draw_rect({ x + base_w + (box_width * 2.f) + 0.01f, base_y }, { box_width, 0.036f }, { 255, 255, 255, 200 }); // hex + + // G/S/HEX text + menu::renderer::draw_text("G", { x + base_w + 0.0025f, base_y + 0.006f }, 0.35f, 0, { 0, 0, 0, 255 }); // g identifier + menu::renderer::draw_text("S", { x + base_w + (box_width * 1.f) + 0.005f + 0.0025f, base_y + 0.006f }, 0.35f, 0, { 0, 0, 0, 255 }); // s identifier + + // G/S/HEX text box + menu::renderer::draw_rect({ x + base_w + 0.013f, base_y }, { 0.001f, 0.036f }, { 0, 0, 0, 180 }); // g + menu::renderer::draw_rect({ x + base_w + (box_width * 1.f) + 0.005f + 0.013f, base_y }, { 0.001f, 0.036f }, { 0, 0, 0, 180 }); // s + + // G/S/HEX values + menu::renderer::draw_text(std::to_string(selected_color.g), { x + base_w + ((box_width + 0.0125f) / 2.f), base_y + 0.008f }, 0.3f, 0, { 0, 0, 0, 255 }, JUSTIFY_CENTER); // g + menu::renderer::draw_text(util::va::va("%.2f", selected_hsv.s * 100.f), { x + base_w + (box_width * 1.f) + 0.005f + ((box_width + 0.0125f) / 2.f), base_y + 0.008f }, 0.3f, 0, { 0, 0, 0, 255 }, JUSTIFY_CENTER); // s + menu::renderer::draw_text(util::va::va("#%02X%02X%02X%02X", selected_color.r, selected_color.g, selected_color.b, selected_color.a), { x + base_w + (box_width * 2.f) + 0.01f + (box_width / 2.f), base_y + 0.008f }, 0.3f, 0, { 0, 0, 0, 255 }, JUSTIFY_CENTER); // hex + + base_y = (y + 0.015f) + (base_w * 6.f) + ((base_w * 2.f) * 62); + + // B/V box + menu::renderer::draw_rect({ x + base_w, base_y }, { box_width, 0.036f }, { 255, 255, 255, 200 }); // b + menu::renderer::draw_rect({ x + base_w + (box_width * 1.f) + 0.005f, base_y }, { box_width, 0.036f }, { 255, 255, 255, 200 }); // v + + // B/V text + menu::renderer::draw_text("B", { x + base_w + 0.0025f, base_y + 0.006f }, 0.35f, 0, { 0, 0, 0, 255 }); // g identifier + menu::renderer::draw_text("V", { x + base_w + (box_width * 1.f) + 0.005f + 0.0025f, base_y + 0.006f }, 0.35f, 0, { 0, 0, 0, 255 }); // s identifier + + // B/V text box + menu::renderer::draw_rect({ x + base_w + 0.013f, base_y }, { 0.001f, 0.036f }, { 0, 0, 0, 180 }); // g + menu::renderer::draw_rect({ x + base_w + (box_width * 1.f) + 0.005f + 0.013f, base_y }, { 0.001f, 0.036f }, { 0, 0, 0, 180 }); // s + menu::renderer::draw_rect({ x + base_w + (box_width * 2.f) + 0.01f, base_y }, { box_width, 0.036f }, selected_color); // preview + + // B/V values + menu::renderer::draw_text(std::to_string(selected_color.b), { x + base_w + ((box_width + 0.0125f) / 2.f), base_y + 0.008f }, 0.3f, 0, { 0, 0, 0, 255 }, JUSTIFY_CENTER); // b + menu::renderer::draw_text(util::va::va("%.2f", selected_hsv.v * 100.f), { x + base_w + (box_width * 1.f) + 0.005f + ((box_width + 0.0125f) / 2.f), base_y + 0.008f }, 0.3f, 0, { 0, 0, 0, 255 }, JUSTIFY_CENTER); // v + + base_w = w / (grid_count + 3); + float base_x = x + base_w; + base_y = y + 0.015f; + + // grid selector + menu::renderer::draw_outlined_rect({ base_x + (base_w * slider_x), base_y + (base_w * 6.f) + ((base_w * 2.f) * slider_y) }, { base_w, base_w * 2.f }, 0.001f, menu::renderer::hsv_to_rgb(hue_slider, 1.f - ((1.f / grid_count) * slider_x), 1.f - ((1.f / grid_count) * slider_y)), !((alpha_selected || slider_selected)) ? color_rgba(255, 255, 255, 255) : color_rgba(196, 196, 196, 255)); + + // hsv bar selector + base_w = w / (selection_count + 3); + base_x = x + base_w; + base_y = y + 0.015f; + menu::renderer::draw_outlined_rect({ base_x + (base_w * (hue_slider / 7.2f)), base_y }, { base_w, base_w * 2.f }, 0.001f, menu::renderer::hsv_to_rgb(hue_slider, 1.f, 1.f), slider_selected ? color_rgba(255, 255, 255, 255) : color_rgba(196, 196, 196, 255)); + + // alpha bar selector + menu::renderer::draw_outlined_rect({ base_x + (base_w * (alpha_slider / 5.1f)), base_y + (base_w * 3.f) }, { base_w, base_w * 2.f }, 0.001f, { 0, 0, 0, 0 }, alpha_selected ? color_rgba(255, 255, 255, 255) : color_rgba(196, 196, 196, 255)); + + // set the color + *option = menu::renderer::hsv_to_rgb(hue_slider, 1.f - ((1.f / grid_count) * slider_x), 1.f - ((1.f / grid_count) * slider_y), alpha_slider); + + // input + bool left_press = menu::input::is_left_just_pressed() + || menu::input::is_just_pressed(false, ControlFrontendLeft, true); + + bool right_press = menu::input::is_right_just_pressed() + || menu::input::is_just_pressed(false, ControlFrontendRight, true); + + bool up_press =menu::input::is_just_pressed(true, VK_NUMPAD8, true) + || menu::input::is_just_pressed(false, ControlFrontendUp, true); + + bool down_press = menu::input::is_just_pressed(true, VK_NUMPAD2, true) + || menu::input::is_just_pressed(false, ControlFrontendDown, true); + + bool left_held = menu::input::is_left_pressed() + || menu::input::is_pressed(false, ControlFrontendLeft, true); + + bool right_held = menu::input::is_right_pressed() + || menu::input::is_pressed(false, ControlFrontendRight, true); + + bool up_held = menu::input::is_pressed(true, VK_NUMPAD8, true) + || menu::input::is_pressed(false, ControlFrontendUp, true); + + bool down_held = menu::input::is_pressed(true, VK_NUMPAD2, true) + || menu::input::is_pressed(false, ControlFrontendDown, true); + + static bool m_left_disabled = false; + static bool m_right_disabled = false; + static int m_left_timer = 0; + static int m_right_timer = 0; + + static bool m_up_disabled = false; + static bool m_down_disabled = false; + static int m_up_timer = 0; + static int m_down_timer = 0; + + auto input_left = [&] { + if (slider_selected) { + hue_slider -= 1.5f; + if (hue_slider < 0.f) hue_slider = 360.f; + } else if (alpha_selected) { + alpha_slider--; + if (alpha_slider < 0) alpha_slider = 255; + } else { + if (slider_x > 0) slider_x--; + } + }; + + auto input_right = [&] { + if (slider_selected) { + hue_slider += 1.5f; + if (hue_slider > 360.f) hue_slider = 0.f; + } else if (alpha_selected) { + alpha_slider++; + if (alpha_slider > 255) alpha_slider = 0; + } else { + if (slider_x < grid_count) slider_x++; + } + }; + + auto input_up = [&] { + if (!slider_selected && !alpha_selected) { + if (slider_y == 0) { + alpha_selected = true; + } else { + if (slider_y > 0) slider_y--; + } + } else if (alpha_selected) { + alpha_selected = false; + slider_selected = true; + } + }; + + auto input_down = [&] { + if (slider_selected) { + slider_selected = false; + alpha_selected = true; + } else if (alpha_selected) { + alpha_selected = false; + } else { + if (slider_y < grid_count) slider_y++; + } + }; + + if (left_press) { + if (!m_left_disabled) { + input_left(); + } + + m_left_disabled = false; + m_left_timer = 0; + } + + if (right_press) { + if (!m_right_disabled) { + input_right(); + } + + m_right_disabled = false; + m_right_timer = 0; + } + + if (left_held) { + if (++m_left_timer > 20) { + m_left_disabled = true; + input_left(); + } + } + + if (right_held) { + if (++m_right_timer > 20) { + m_right_disabled = true; + input_right(); + } + } + + if (up_press) { + if (!m_up_disabled) { + input_up(); + } + + m_up_disabled = false; + m_up_timer = 0; + } + + if (down_press) { + if (!m_down_disabled) { + input_down(); + } + + m_down_disabled = false; + m_down_timer = 0; + } + + if (up_held) { + if (++m_up_timer > 20) { + m_up_disabled = true; + input_up(); + } + } + + if (down_held) { + if (++m_down_timer > 20) { + m_down_disabled = true; + input_down(); + } + } + + if (menu::input::is_option_pressed(true)) { + exit = true; + accepted = true; + } else if (menu::input::is_just_released(true, VK_ESCAPE, true) + || menu::input::is_just_released(true, VK_NUMPAD0, true) + || menu::input::is_just_pressed(false, ControlFrontendCancel, true)) { + accepted = false; + exit = true; + } + } + + if (!accepted) { + *option = original_rgb; + } + + global::ui::g_input_open = false; + } + + int menu_input::get_key(std::string name, int default_key) { + global::ui::g_input_open = true; + + char local_name[0x80]; + strcpy_s(local_name, name.c_str()); + + bool exit = false; + bool accepted = false; + int input_key = default_key; + + while (!exit) { + util::fiber::go_to_main(); + menu::base::set_disable_input_this_frame(); + + float w = 0.16f; + float h = 0.12f; + float x = 0.5f - (w * 0.5f); + float y = 0.5f - (h * 0.5f); + float bezzel = 0.007875f / 2.f; + + menu::renderer::draw_rect({ x, y }, { w, bezzel }, global::ui::g_hotkey_bar); // header + menu::renderer::draw_rect({ x, y + bezzel }, { w, h }, global::ui::g_hotkey_background); // bg + + menu::renderer::draw_text(local_name, { x + (w * 0.5f), y + bezzel + (h * 0.15f) }, global::ui::g_option_height, 0, color_rgba(255, 255, 255), JUSTIFY_CENTER); // option name + menu::renderer::draw_rect({ x + ((w * 0.1f) * 0.5f), y + bezzel + ((h * 0.7f) * 0.5f) + ((h * 0.2f) * 0.5f) }, { w * 0.9f, h * 0.3f }, global::ui::g_hotkey_input); // input box + + menu::renderer::draw_text(TRANSLATE(t_enter_to_add), { x + (w * 0.5f), y + bezzel + (h * 0.8f) }, 0.25f, 0, color_rgba(255, 255, 255), JUSTIFY_CENTER); // help test + + int last_key = menu::input::get_last_key(); + if (last_key != VK_RETURN && last_key != VK_ESCAPE && last_key != VK_BACK) { + input_key = last_key; + } + + menu::renderer::draw_text(g_key_names[input_key], { x + (w * 0.5f), y + bezzel + ((h * 0.7f) * 0.5f) + ((h * 0.3f) * 0.5f) }, 0.35f, 0, color_rgba(255, 255, 255), JUSTIFY_CENTER); + + if (menu::input::is_option_pressed(true)) { + accepted = true; + exit = true; + } else if (menu::input::is_just_released(true, VK_ESCAPE, true)) { + accepted = false; + exit = true; + } + } + + global::ui::g_input_open = false; + return input_key; + } + + void menu_input::hotkey(std::string name, base_option* option) { + global::ui::g_input_open = true; + + char local_name[0x80]; + strcpy_s(local_name, name.c_str()); + + bool exit = false; + bool accepted = false; + int input_key = option->has_hotkey() && option->get_hotkey() != -1 ? option->get_hotkey() : 0; + + while (!exit) { + util::fiber::go_to_main(); + menu::base::set_disable_input_this_frame(); + + float w = 0.16f; + float h = 0.12f; + float x = 0.5f - (w * 0.5f); + float y = 0.5f - (h * 0.5f); + float bezzel = 0.007875f / 2.f; + + menu::renderer::draw_rect({ x, y }, { w, bezzel }, global::ui::g_hotkey_bar); // header + menu::renderer::draw_rect({ x, y + bezzel }, { w, h }, global::ui::g_hotkey_background); // bg + + menu::renderer::draw_text(local_name, { x + (w * 0.5f), y + bezzel + (h * 0.15f) }, global::ui::g_option_height, 0, color_rgba(255, 255, 255), JUSTIFY_CENTER); // option name + menu::renderer::draw_rect({ x + ((w * 0.1f) * 0.5f), y + bezzel + ((h * 0.7f) * 0.5f) + ((h * 0.2f) * 0.5f) }, { w * 0.9f, h * 0.3f }, global::ui::g_hotkey_input); // input box + + menu::renderer::draw_text(TRANSLATE(t_enter_to_add), { x + (w * 0.5f), y + bezzel + (h * 0.8f) }, 0.25f, 0, color_rgba(255, 255, 255), JUSTIFY_CENTER); // help test + + int last_key = menu::input::get_last_key(); + if (last_key != VK_RETURN && last_key != VK_ESCAPE && last_key != VK_BACK && last_key != menu::base::get_open_key()) { + input_key = last_key; + } + + if (input_key != VK_F12) { + menu::renderer::draw_text(g_key_names[input_key], { x + (w * 0.5f), y + bezzel + ((h * 0.7f) * 0.5f) + ((h * 0.3f) * 0.5f) }, 0.35f, 0, color_rgba(255, 255, 255), JUSTIFY_CENTER); + } + + if (menu::input::is_option_pressed(true)) { + accepted = true; + exit = true; + } else if (menu::input::is_just_released(true, VK_ESCAPE, true)) { + accepted = false; + exit = true; + } + } + + if (accepted && input_key && input_key != VK_F12) { + menu::hotkey::unregister_hotkey(option); + option->set_hotkey(input_key); + menu::hotkey::register_hotkey(input_key, option); + } + + global::ui::g_input_open = false; + } + + menu_input* get_menu_input() { + static menu_input instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/menu_input.h b/GTAV/src/menu/base/util/menu_input.h new file mode 100644 index 0000000..b227d4a --- /dev/null +++ b/GTAV/src/menu/base/util/menu_input.h @@ -0,0 +1,298 @@ +#pragma once +#include "stdafx.h" +#include "menu/base/options/option.h" +#include "menu/base/options/color_option.h" +#include "global/ui_vars.h" + +namespace menu::input { + class menu_input { + public: + void update(); + + void push(std::function function); + void hotkey(std::string name, base_option* option); + void color(color_rgba* option); + int get_key(std::string name, int default_key); + private: + std::vector> m_queue; + }; + + menu_input* get_menu_input(); + + inline void mi_update() { + get_menu_input()->update(); + } + + inline void push(std::function function) { + get_menu_input()->push(function); + } + + inline void hotkey(std::string name, base_option* option) { + get_menu_input()->hotkey(name, option); + } + + inline void color(color_rgba* color) { + get_menu_input()->color(color); + } + + inline int get_key(std::string name, int default_key) { + return get_menu_input()->get_key(name, default_key); + } + + static const char* g_key_names[254] = { + "", + "F10", + "F10", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "BACKSPACE", + "TAB", + "TAB", + "TAB", + "NUM 5", + "ENTER", + "ENTER", + "ENTER", + "SHIFT", + "CTRL", + "ALT", + "ALT", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "CAPSLOCK", + "ESC", + "ESC", + "ESC", + "ESC", + "ESC", + "SPACE", + "NUM 9", + "NUM 3", + "NUM 1", + "NUM 7", + "LEFT", + "UP", + "RIGHT", + "DOWN", + "NUM 2", + "NUM 2", + "NUM 2", + "NUM 2", + "NUM 0", + "DELETE", + "NUM DECIMAL", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "9", + "9", + "9", + "9", + "9", + "9", + "9", + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z", + "Z", + "Z", + "Z", + "Z", + "Z", + "NUM 0", + "NUM 1", + "NUM 2", + "NUM 3", + "NUM 4", + "NUM 5", + "NUM 6", + "NUM 7", + "NUM 8", + "NUM 9", + "*", + "NUM PLUS", + "NUM PLUS", + "NUM SUB", + "NUM DECIMAL", + "/", + "F1", + "F2", + "F3", + "F4", + "F5", + "F6", + "F7", + "F8", + "F9", + "F10", + "F11", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "F12", + "Pause", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SCROLL LOCK", + "SHIFT", + "RIGHT SHIFT", + "CTRL", + "CTRL", + "ALT", + "ALT", + "ALT", + "ALT", + "ALT", + "ALT", + "ALT", + "ALT", + "M", + "D", + "C", + "B", + "P", + "Q", + "J", + "G", + "G", + "G", + "G", + "F", + "F", + "F", + ";", + "=", + ",", + "-", + ".", + "/", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "A", + "B", + "X", + "Y", + "Left Button", + "Right Button", + "Left Trigger", + "Right Trigger", + "Left Stick", + "Right Stick", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "GRAVE", + "[", + "null", + "]", + "ACUTE/CEDILLA", + "ACUTE/CEDILLA", + "ACUTE/CEDILLA", + "ACUTE/CEDILLA", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null", + "null" + }; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/notify.cpp b/GTAV/src/menu/base/util/notify.cpp new file mode 100644 index 0000000..93f7dd4 --- /dev/null +++ b/GTAV/src/menu/base/util/notify.cpp @@ -0,0 +1,242 @@ +#include "notify.h" +#include "rage/invoker/natives.h" +#include "menu/base/renderer.h" +#include "util/log.h" +#include "menu/base/util/helpers.h" + +namespace menu::notify { + localization t_blocked("Blocked", true, true); + localization t_incoming_event("Incoming Event", true, true); + localization t_event("Event", true, true); + localization t_from("From", true, true); + localization t_redirected("Redirected", true, true); + + void notify::update() { + if (global::ui::g_stop_rendering) { + for (auto& context = m_context.begin(); context != m_context.end(); context++) { + context->m_start_time = GetTickCount(); + } + + return; + } + + float current = 0.f; + for (auto& context = m_context.begin(); context != m_context.end(); context++) { + float wrap = 0.1362f; + float x_offset = 0.006f; + float text_height = 0.2f; + + if (context->m_has_init) { + continue; + } + + context->m_has_init = true; + + if (context->m_text.size() == 1) { + native::set_text_font(0); + native::set_text_scale(0.f, text_height); + native::set_text_wrap(context->x + x_offset, wrap); + native::begin_text_command_line_count("STRING"); + native::add_text_component_substring_player_name(context->m_text[0].c_str()); + + context->m_lines = native::end_text_command_get_line_count(context->x + x_offset, 0.015f); + current += (context->m_lines * native::get_text_scale_height(text_height, 0)) + (context->m_lines * x_offset) + (x_offset * 3.f); + } else { + context->m_max_width = menu::renderer::calculate_string_width(context->m_text[0], 0, text_height) + (x_offset * 2.f); + + for (std::size_t i = 0; i < context->m_text.size(); i++) { + std::string str = context->m_text[i]; + + float width = menu::renderer::calculate_string_width(str, 0, text_height) + (x_offset * 2.f); + if (context->m_max_width < width) { + context->m_max_width = width; + } + } + + context->m_lines = (int)context->m_text.size(); + current += (context->m_lines * native::get_text_scale_height(text_height, 0)) + (context->m_lines * x_offset) + (x_offset * 3.f); + } + + current += 0.004f; + context->m_y = -current; + } + + float y = 0.01f; + for (auto& context = m_context.rbegin(); context != m_context.rend(); context++) { + float x_offset = 0.006f; + float wrap = context->m_max_width + x_offset; + float text_height = 0.2f; + float height = (text_height / 10.f) + ((text_height * 1.1f) / 10.f); + bool death = false; + + float scaled_body_height = menu::renderer::get_normalized_font_scale(global::ui::g_notify_body_font, text_height); + float scaled_title_height = menu::renderer::get_normalized_font_scale(global::ui::g_notify_title_font, text_height * 1.1f); + + // nearing death, slide out + uint32_t end_time = context->m_start_time + context->m_time_limit; + if (end_time < GetTickCount() || end_time - GetTickCount() < 1000) { + death = true; + context->m_y = math::lerp(context->m_y, 1.2f, 5.f * global::ui::g_delta); + + if (context->m_alpha_start == 0) context->m_alpha_start = GetTickCount(); + context->m_alpha = 255 - (((GetTickCount() - context->m_alpha_start) * 255) / 1000); + } else { + if (context->m_title_width > context->m_max_width) { + wrap = context->m_title_width + x_offset; + } + } + + if (context->m_title_width == 0.f) { + context->m_title_width = menu::renderer::calculate_string_width("~bold~" + context->m_title, global::ui::g_notify_title_font, scaled_title_height) + (0.004f * 2.f); + } + + // if it has one bit of text, calculate the lines + if (context->m_text.size() == 1) { + native::set_text_font(global::ui::g_notify_body_font); + native::set_text_scale(scaled_body_height, scaled_body_height); + native::set_text_wrap(context->x, wrap - x_offset); + native::begin_text_command_line_count("STRING"); + native::add_text_component_substring_player_name(context->m_text[0].c_str()); + + context->m_lines = native::end_text_command_get_line_count(context->x, y + 0.005f); + context->m_rendering_text = context->m_text[0]; + + if (context->m_lines > 1) { + height = (context->m_lines * native::get_text_scale_height(scaled_body_height, global::ui::g_notify_body_font)) + 0.034f; + } else { + context->m_max_width = menu::renderer::calculate_string_width(context->m_text[0], global::ui::g_notify_body_font, scaled_body_height) + (x_offset * 2.f); + } + } else { + // its a list of lines, calculate the longest line and use that as the width + std::string full_line = ""; + context->m_max_width = menu::renderer::calculate_string_width(context->m_text[0], global::ui::g_notify_body_font, scaled_body_height) + (x_offset * 2.f); + + for (std::size_t i = 0; i < context->m_text.size(); i++) { + std::string str = context->m_text[i]; + + float width = menu::renderer::calculate_string_width(str, global::ui::g_notify_body_font, scaled_body_height) + (x_offset * 2.f); + if (context->m_max_width < width) { + context->m_max_width = width; + } + + full_line += str; + + if (i != (context->m_text.size() - 1)) { + full_line += '\n'; + } + } + + context->m_lines = (int)context->m_text.size(); + context->m_rendering_text = full_line; + height = (context->m_lines * native::get_text_scale_height(scaled_body_height, global::ui::g_notify_body_font)) + 0.034f; + } + + if (context->m_text.size() == 4) { + height += 0.002f; + } + + // lerp the Y position to account for new notifies + if (!death) { + context->m_y = math::lerp(context->m_y, y, 5.f * global::ui::g_delta); + } + + if (context->m_y + height > 0.7f) { + context->m_time_limit = 0; + } + + if (context->m_y <= 1.f) { + native::clear_help(true); + native::clear_all_help_messages(); + + int rect_alpha = context->m_alpha >= 35 ? context->m_alpha - 35 : 0; + std::pair texture = menu::renderer::get_texture(global::ui::m_notify_background); + menu::renderer::draw_sprite_aligned(texture, { context->x, context->m_y }, { context->m_max_width, height }, 0.f, global::ui::g_notify_background.opacity(rect_alpha)); + + texture = menu::renderer::get_texture(global::ui::m_notify_bar); + menu::renderer::draw_sprite_aligned(texture, { context->x, context->m_y }, { 0.002f, height }, 0.f, context->m_color.opacity(rect_alpha)); + + math::vector2 text_wrap = context->m_text.size() > 1 ? math::vector2(0.f, 1.f) : math::vector2(context->x, wrap); + menu::renderer::draw_text(context->m_rendering_text, { context->x + x_offset, context->m_y + 0.02f + 0.001f }, scaled_body_height, global::ui::g_notify_body_font, { 255, 255, 255, context->m_alpha }, JUSTIFY_LEFT, text_wrap); + menu::renderer::draw_text("~bold~" + context->m_title, { context->x + x_offset, context->m_y + 0.003f + 0.001f }, scaled_title_height, global::ui::g_notify_title_font, { 255, 255, 255, context->m_alpha }, JUSTIFY_LEFT); + y += height + 0.004f; + } + } + + for (auto& context = m_context.begin(); context != m_context.end();) { + if (context->m_start_time + context->m_time_limit < GetTickCount()) { + context = m_context.erase(context); + continue; + } + + context++; + } + } + + void notify::stacked(std::string title, std::string text, color_rgba color, uint32_t timeout) { + notify_context context; + context.m_text.push_back(text); + context.m_title = title; + context.m_color = color; + context.m_start_time = GetTickCount(); + context.m_time_limit = timeout; + + LOG_CUSTOM("Notify", "%s - %s", title.c_str(), text.c_str()); + m_context.push_back(context); + } + + void notify::stacked_lines(std::string title, std::vector text, color_rgba color) { + notify_context context; + for (std::string str : text) context.m_text.push_back(str); + + context.m_title = title; + context.m_color = color; + context.m_start_time = GetTickCount(); + context.m_time_limit = 6000; + + m_context.push_back(context); + } + + void notify::protection(std::string sender, std::string event, bool redirected, bool blocked) { + uint32_t hash = native::get_hash_key((sender + event + std::to_string(redirected) + std::to_string(blocked)).c_str()); + + if (m_protection_spam[hash] > GetTickCount()) { + return; + } + + m_protection_spam[hash] = GetTickCount() + 6000; + + if (!sender.empty()) { + if (sender.compare("LLLLLLLLLLLLLLLLLLLLLLLL")) { + sender = menu::helpers::clean_name(sender); + } + } + + std::vector lines; + if (blocked) lines.push_back(std::string(TRANSLATE(t_blocked)) + " " + TRANSLATE(t_incoming_event)); + else lines.push_back(TRANSLATE(t_incoming_event)); + + lines.push_back(std::string(TRANSLATE(t_event)) + ": " + event); + + if (sender.compare("LLLLLLLLLLLLLLLLLLLLLLLL")) { + lines.push_back(std::string(TRANSLATE(t_from)) + ": " + sender + "~w~"); + } + + if (redirected) { + lines.push_back(TRANSLATE(t_redirected)); + } + + LOG_CUSTOM("Notify", "%s from %s", event.c_str(), sender != "LLLLLLLLLLLLLLLLLLLLLLLL" ? sender.c_str() : "?"); + stacked_lines("Protection", lines, global::ui::g_error); + } + + void notify::subtitle(const char* msg) { + native::begin_text_command_print("STRING"); + native::add_text_component_substring_player_name(msg); + native::end_text_command_print(3000, true); + } + + notify* get_notify() { + static notify instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/notify.h b/GTAV/src/menu/base/util/notify.h new file mode 100644 index 0000000..2568cdb --- /dev/null +++ b/GTAV/src/menu/base/util/notify.h @@ -0,0 +1,65 @@ +#pragma once +#include "stdafx.h" +#include "global/ui_vars.h" +#include +#include + +namespace menu::notify { + struct notify_context { + std::vector m_text = {}; + std::string m_rendering_text = ""; + std::string m_title = ""; + int m_lines = 1; + color_rgba m_color = {}; + float m_max_width = 0.20f; + float x = 0.009f; + float m_y = 0.0f; + uint32_t m_start_time = 0; + uint32_t m_time_limit = 5000; + bool m_has_calculated = false; + bool m_has_init = false; + uint32_t m_alpha_start = 0; + int m_alpha = 255; + float m_title_width = 0.f; + }; + + class notify { + public: + void update(); + void stacked(std::string title, std::string text, color_rgba color = global::ui::g_notify_bar, uint32_t timeout = 6000); + void stacked_lines(std::string title, std::vector text, color_rgba color = global::ui::g_notify_bar); + void protection(std::string sender, std::string event, bool redirected, bool blocked); + void subtitle(const char* msg); + + std::vector& get_contexts() { return m_context; } + private: + std::vector m_context; + std::unordered_map m_protection_spam; + }; + + notify* get_notify(); + + inline void update() { + get_notify()->update(); + } + + inline void subtitle(const char* msg) { + get_notify()->subtitle(msg); + } + + inline void stacked(std::string title, std::string text, color_rgba color = global::ui::g_notify_bar, uint32_t timeout = 6000) { + get_notify()->stacked(title, text, color, timeout); + } + + inline void stacked_lines(std::string title, std::vector text, color_rgba color = global::ui::g_notify_bar) { + get_notify()->stacked_lines(title, text, color); + } + + inline void protection(std::string sender, std::string event, bool redirected, bool blocked) { + get_notify()->protection(sender, event, redirected, blocked); + } + + inline std::vector& get_contexts() { + return get_notify()->get_contexts(); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/on_screen_ped.cpp b/GTAV/src/menu/base/util/on_screen_ped.cpp new file mode 100644 index 0000000..f1bdf30 --- /dev/null +++ b/GTAV/src/menu/base/util/on_screen_ped.cpp @@ -0,0 +1,105 @@ +#include "on_screen_ped.h" +#include "rage/invoker/natives.h" +#include "util/caller.h" + +namespace menu::screen::ped { + struct scene_preset { + struct scene_preset_element { + char _0x0000[24]; + math::vector4 m_position; + math::vector4 m_position_43; + math::vector4 m_rotation_xyz; + math::vector4 m_bg_rect_xywh; + math::vector4 m_bg_rect_xywh_43; + uint32_t m_bg_rect_color; + uint32_t m_blend_color; + bool m_enabled; + char _0x0071[15]; + }; + + uint32_t m_name; + char _0x0004[4]; + scene_preset_element m_elements[5]; + char _0x0288[8]; + int32_t m_element_count; + char _0x0294[12]; + + void set_element_rot(uint32_t element, math::vector3 rot) { + if (element >= 0 && element < 5) { + m_elements[element].m_rotation_xyz.x = rot.x; + m_elements[element].m_rotation_xyz.y = rot.y; + m_elements[element].m_rotation_xyz.z = rot.z; + } + } + + void set_element_pos(uint32_t element, math::vector2 xy, math::vector2 wh) { + if (element >= 0 && element < 5) { + m_elements[element].m_bg_rect_xywh.z = wh.x; // make fullscreen + m_elements[element].m_bg_rect_xywh.w = wh.y; // make fullscreen + m_elements[element].m_bg_rect_xywh.x = xy.x; // convert and set pos + m_elements[element].m_bg_rect_xywh.y = xy.y; // convert and set pos + m_elements[element].m_bg_rect_xywh_43.z = wh.x; // make fullscreen + m_elements[element].m_bg_rect_xywh_43.w = wh.y; // make fullscreen + m_elements[element].m_bg_rect_xywh_43.x = xy.x; // convert and set pos + m_elements[element].m_bg_rect_xywh_43.y = xy.y; // convert and set pos + m_elements[element].m_bg_rect_color = 0x0; + } + } + }; + + scene_preset* get_scene_preset(__int64 a1, uint32_t* a2) { + unsigned int v2; // er8 + __int64 v3; // r9 + __int64 v4; // r10 + __int64 v5; // rcx + uint32_t v6; // edx + unsigned int* i; // rax + + v2 = 0; + v3 = 0; + + v4 = *(uint16_t*)(a1 + 0x810); + if (!v4) + return 0; + + v5 = *(uint64_t*)(a1 + 0x808); + v6 = *a2; + + for (i = (uint32_t*)v5; *i != v6; i += 0xA8) { + ++v3; + ++v2; + if (v3 >= v4) + return 0; + } + + return (scene_preset*)(v5 + 0x2A0 * v2); + } + + void draw_on_screen_ped(rage::types::ped* ped, math::vector2 pos, math::vector2 scale, math::vector3_ position_offset) { + uint32_t scene_hash = 0x390DCCF5; + + if (!native::is_pause_menu_active()) { + if (native::ui3dscene_is_available()) { + uint32_t element = 0; + + uintptr_t ui_3d_draw_manager = *(uint64_t*)(global::vars::g_ui_3d_draw_manager); + if (ui_3d_draw_manager) { + *(uint8_t*)((uint64_t)ped + 0x1163) |= 0x40u; + *(uint32_t*)((uint64_t)ped + 0x114C) |= 0xC0u; + + scene_preset* preset = get_scene_preset(ui_3d_draw_manager, &scene_hash); + if (preset) { + preset->m_elements[element].m_rotation_xyz.z = 0.0f; + preset->set_element_pos(element, pos, scale); + } + + if (caller::call(global::vars::g_push_scene_preset_to_manager, ui_3d_draw_manager, &scene_hash)) { // push_scene_preset_to_manager + if (caller::call(global::vars::g_add_element_to_scene, ui_3d_draw_manager, &scene_hash, element, ped, position_offset, 1.0f)) { // add_element_to_scene + caller::call(global::vars::g_set_scene_element_lighting, ui_3d_draw_manager, &scene_hash, element, 1.0f); // set_scene_element_lighting + } + } + } + } + } + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/on_screen_ped.h b/GTAV/src/menu/base/util/on_screen_ped.h new file mode 100644 index 0000000..caeea88 --- /dev/null +++ b/GTAV/src/menu/base/util/on_screen_ped.h @@ -0,0 +1,7 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/generic_types.h" + +namespace menu::screen::ped { + void draw_on_screen_ped(rage::types::ped* ped, math::vector2 pos, math::vector2 scale, math::vector3_ position_offset = { 0.00f, -2.00f, 0.40f }); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/panels.cpp b/GTAV/src/menu/base/util/panels.cpp new file mode 100644 index 0000000..b55eecf --- /dev/null +++ b/GTAV/src/menu/base/util/panels.cpp @@ -0,0 +1,1792 @@ +#include "panels.h" +#include "util/localization.h" +#include "util/va.h" +#include "menu/base/renderer.h" +#include "global/ui_vars.h" +#include "global/vars.h" +#include "global/lists.h" +#include "menu/base/base.h" +#include "menu/base/util/player_manager.h" +#include "menu/base/util/global.h" +#include "menu/base/util/textures.h" +#include "menu/base/util/helpers.h" +#include "rage/invoker/natives.h" +#include "rage/engine.h" +#include "menu/base/util/on_screen_ped.h" +#include "menu/base/submenus/main/network/spoofing/network_spoofing_ip.h" +#include "menu/base/submenus/main/network/spoofing/network_spoofing_rid.h" +#include "menu/base/submenus/main/network/network_spoofing.h" +#include "menu/base/submenus/main/settings/hide_info.h" +#include "rage/types/global_types.h" +#include +#include + +namespace menu::panels { +#undef DrawText + localization t_name("Name", true, true); + localization t_rank("Rank", true, true); + localization t_health("Health", true, true); + localization t_invalid("Invalid", true, true); + localization t_dead("Dead", true, true); + localization t_full("Full", true, true); + localization t_cash("Cash", true, true); + localization t_armor("Armor", true, true); + localization t_bank("Bank", true, true); + localization t_wanted_level("Wanted Level", true, true); + localization t_kd_ratio("K/D Ratio", true, true); + localization t_ammo("Ammo", true, true); + localization t_none("None", true, true); + localization t_weapon("Weapon", true, true); + localization t_unarmed("Unarmed", true, true); + localization t_unknown("Unknown", true, true); + localization t_zone("Zone", true, true); + localization t_street("Street", true, true); + localization t_coords("Coords", true, true); + localization t_heading("Heading", true, true); + localization t_north("North", true, true); + localization t_east("East", true, true); + localization t_south("South", true, true); + localization t_west("West", true, true); + localization t_distance("Distance", true, true); + localization t_speed("Speed", true, true); + localization t_passive("Passive", true, true); + localization t_invisible("Invisible", true, true); + localization t_yes("Yes", true, true); + localization t_no("No", true, true); + localization t_rid("Rockstar ID", true, true); + localization t_hidden("Hidden", true, true); + localization t_ip("IP", true, true); + localization t_vehicle("Vehicle", true, true); + localization t_crew("Crew", true, true); + localization t_crew_tag("Crew Tag", true, true); + localization t_crew_id("Crew ID", true, true); + localization t_crew_rank("Crew Rank", true, true); + localization t_using_controller("Using Controller", true, true); + localization t_using_keyboard("Using Keyboard", true, true); + localization t_badsport("Badsport", true, true); + localization t_cheater("Cheater", true, true); + localization t_toxic("Toxic", true, true); + localization t_muted_me("Muted Me", true, true); + localization t_off_the_radar("Off the Radar", true, true); + localization t_reveal_players("Reveal Players", true, true); + localization t_rdeveloper("R* Developer", true, true); + localization t_rqa_developer("R* QA Tester", true, true); + localization t_property("Property", true, true); + localization t_properties("Properties", true, true); + localization t_office_garage("Office Garage", true, true); + localization t_clubhouse("Clubhouse", true, true); + localization t_office("Office", true, true); + localization t_races_won("Races Won", true, true); + localization t_deathmatches_won("Deathmatches Won", true, true); + localization t_darts_won("Darts Won", true, true); + localization t_arm_wrestling_won("Arm Wrestling Won", true, true); + localization t_tennis_won("Tennis Won", true, true); + localization t_golf_won("Golf Won", true, true); + localization t_shooting_range_won("Shooting Range Won", true, true); + localization t_deaths("Deaths", true, true); + localization t_kills("Kills", true, true); + localization t_missions_created("Missions Created", true, true); + localization t_zip("Zip", true, true); + localization t_region("Region", true, true); + localization t_city("City", true, true); + localization t_country("Country", true, true); + localization t_timezone("Timezone", true, true); + localization t_isp("ISP", true, true); + localization t_org("Org", true, true); + localization t_station("Station", true, true); + localization t_song("Song", true, true); + localization t_artist("Artist", true, true); + localization t_placeholder("Placeholder", true, true); + localization t_some_time_ago("Some Time Ago", true, true); + localization t_online("Online", true, true); + localization t_in_session("In My Session?", true, true); + localization t_first_encountered("First Encounter", true, true); + localization t_last_encountered("Last Encounter", true, true); + localization t_session_type("Session Type", true, true); + localization t_preview("Preview", true, true); + localization t_enabled("Enabled", true, true); + localization t_manufacturer("Manufacturer", true, true); + localization t_max_speed("Max Speed", true, true); + localization t_max_braking("Max Braking", true, true); + localization t_max_traction("Max Traction", true, true); + localization t_max_seats("Max Seats", true, true); + localization t_blacklisted_players("Blacklisted Players", true, true); + localization t_clock("Clock", true, true); + localization t_outfit_preview("Outfit Preview", true, true); + localization t_outfit_preview_info("Outfit Preview", true, true); + localization t_clock_info("Clock Info", true, true); + localization t_next_session_host_queue("Next Session Host Queue", true, true); + localization t_peer("Peer", true, true); + localization t_second("Second", true, true); + localization t_minute("Minute", true, true); + localization t_hour("Hour", true, true); + localization t_ago("Ago", true, true); + localization t_added("Added", true, true); + localization t_generic("Generic", true, true); + localization t_geo("Geo", true, true); + localization t_flags("Flags", true, true); + localization t_kick_queue("Kick Queue", true, true); + localization t_stats("Stats", true, true); + localization t_radio("Radio", true, true); + localization t_station_info("Station Info", true, true); + localization t_recent_player("Recent Player", true, true); + localization t_player_info("Player Info", true, true); + localization t_friend("Friend", true, true); + localization t_friend_info("Friend Info", true, true); + localization t_overseer("Overseer", true, true); + localization t_overseer_info("Overseer Info", true, true); + localization t_vehicle_preview("Vehicle Preview", true, true); + localization t_vehicle_preview_info("Vehicle Preview Info", true, true); + localization t_session("Session", true, true); + localization t_host_queue_info("Host Queue Info", true, true); + localization t_blacklist_info("Blacklist Info", true, true); + localization t_session_browser("Session Browser", true, true); + localization t_player_search("Player Search", true, true); + localization t_session_browser_info("Session Browser Info", true, true); + localization t_player_search_info("Player Search Info", true, true); + localization t_blacklisted_players_info("Blacklisted Players Info", true, true); + localization t_local_ip("Local IP", true, true); + + math::vector2 panel::get_rendering_position() { + math::vector2 _return; + + if (m_child->m_column == 0) { + // base + if (global::ui::g_position.x >= 0.40f) { + _return.x = global::ui::g_position.x - 0.283f; + + if (!m_child->m_double_sided) { + _return.x += 0.14f; // size of half panel + } + } else { + _return.x = global::ui::g_position.x + global::ui::g_scale.x + 0.003f; + } + } else { + // Calculate x offsets + float calculated_offset = 0.f; + + for (int i = 0; i < m_child->m_column; i++) { + if (m_child->m_parent->m_column_offset.find(i) != m_child->m_parent->m_column_offset.end()) { + calculated_offset += m_child->m_parent->m_column_offset[i].x; + } + } + + if (global::ui::g_position.x >= 0.40f) { + _return.x = global::ui::g_position.x - 0.283f; + _return.x -= calculated_offset; + + if (m_child->m_double_sided && m_child->m_parent->m_column_offset[m_child->m_column - 1].x == 0.14f) { + _return.x -= 0.14f; + } + + if (!m_child->m_double_sided) { + _return.x += 0.14f; // size of half panel + } + } else { + _return.x = global::ui::g_position.x + global::ui::g_scale.x + 0.003f; + _return.x += calculated_offset; + } + } + + if (m_child->m_column != 0) { + if (global::ui::g_position.x >= 0.40f) _return.x -= (m_child->m_column * 0.002f); + else _return.x += (m_child->m_column * 0.002f); + } + + return _return; + } + + panel::panel(panel_child& child, color_rgba header_color) { + m_child = &child; + + int max_count = child.m_panel_option_count_left; + if (child.m_panel_option_count_right > max_count) { + max_count = child.m_panel_option_count_right; + } + + child.m_panel_option_count_left = child.m_panel_tick_left - 1; + child.m_panel_option_count_right = child.m_panel_option_count_right - 1; + + if (m_child->m_parent->m_column_offset.find(child.m_column) == m_child->m_parent->m_column_offset.end()) { + m_column_offset = 0.f; + } else { + m_column_offset = (m_child->m_parent->m_column_offset[child.m_column].y); + } + + // render bar & bg + m_column_adjustment = get_rendering_position(); + + float x = m_column_adjustment.x; + float width = child.m_double_sided ? 0.28f : 0.14f; + + // header + menu::renderer::draw_rect({ x, (global::ui::g_position.y - 0.08f) + m_column_offset }, { width, (0.007875f / 2.f) }, header_color); + + // bg + std::pair texture = menu::renderer::get_texture(global::ui::m_panel_background); + menu::renderer::draw_sprite_aligned(texture, { x, (global::ui::g_position.y - 0.08f) + (0.007875f / 2.f) + m_column_offset }, { width, (0.03f * max_count) }, 0.f, global::ui::g_panel_background); + + m_width = width; + m_height = (0.03f * max_count) + (0.007875f / 2.f) + 0.004f; + + child.m_panel_tick_left = 1; + child.m_panel_tick_right = 1; + } + + void panel::item(std::string name, std::string value, int font, float font_scale, color_rgba color) { + if (!m_child->m_double_sided) { + panel_left_item(name, value, font, font_scale, color); + return; + } + + if (m_child->m_panel_tick_left > m_child->m_panel_tick_right) { + panel_right_item(name, value, font, font_scale, color); + } else { + panel_left_item(name, value, font, font_scale, color); + } + } + + void panel::item(std::string name, std::string sprite_left, std::string sprite_right, int font, float font_scale, color_rgba color, math::vector2 scale) { + if (!m_child->m_double_sided) { + panel_left_sprite_item(name, sprite_left, sprite_right, font, font_scale, color, scale); + return; + } + + if (m_child->m_panel_tick_left > m_child->m_panel_tick_right) { + panel_right_sprite_item(name, sprite_left, sprite_right, font, font_scale, color, scale); + } else { + panel_left_sprite_item(name, sprite_left, sprite_right, font, font_scale, color, scale); + } + } + + void panel::item_full(std::string name, std::string value, int font, float font_scale, color_rgba color) { + if (font == 0) { + if (global::ui::g_panel_font != 0) { + font = global::ui::g_panel_font; + font_scale = menu::renderer::get_normalized_font_scale(font, font_scale); + } + } + + if (m_child->m_panel_tick_left != m_child->m_panel_tick_right) { + if (m_child->m_panel_tick_left > m_child->m_panel_tick_right) { + m_child->m_panel_tick_right = m_child->m_panel_tick_left; + } else { + m_child->m_panel_tick_left = m_child->m_panel_tick_right; + } + } + + float adjustment = m_column_adjustment.x; + float wrap = (adjustment + 0.28f - 0.004f);; + float x = adjustment + 0.003f; + + // draw name + menu::renderer::draw_text(name.c_str(), { x, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_left - 1) * 0.03f) + 0.006f + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, font_scale, font, color); + + // draw value + menu::renderer::draw_text(value.c_str(), { 0.f, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_left - 1) * 0.03f) + 0.006f + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, font_scale, font, color, JUSTIFY_RIGHT, { 0.f, wrap }); + + m_child->m_panel_tick_left++; + m_child->m_panel_tick_right++; + } + + void panel::item_full(std::string name, std::string sprite_left, std::string sprite_right, int font, float font_scale, color_rgba color, math::vector2 scale) { + if (font == 0) { + if (global::ui::g_panel_font != 0) { + font = global::ui::g_panel_font; + font_scale = menu::renderer::get_normalized_font_scale(font, font_scale); + } + } + + if (m_child->m_panel_tick_left != m_child->m_panel_tick_right) { + if (m_child->m_panel_tick_left > m_child->m_panel_tick_right) { + m_child->m_panel_tick_right = m_child->m_panel_tick_left; + } else { + m_child->m_panel_tick_left = m_child->m_panel_tick_right; + } + } + + float adjustment = m_column_adjustment.x; + float wrap = (adjustment + 0.28f - 0.004f);; + float x = adjustment + 0.003f; + + // sprite + menu::renderer::draw_sprite({ sprite_left, sprite_right }, { x + 0.006f, (global::ui::g_position.y - 0.08f) + 0.017f + ((m_child->m_panel_tick_left - 1) * 0.03f) + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, scale, 0.f, color); + + // draw name + menu::renderer::draw_text(name.c_str(), { x + 0.014f, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_left - 1) * 0.03f) + 0.006f + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, font_scale, font, color); + + m_child->m_panel_tick_left++; + m_child->m_panel_tick_right++; + } + + void panel::panel_left_item(std::string name, std::string value, int font, float font_scale, color_rgba color) { + if (font == 0) { + if (global::ui::g_panel_font != 0) { + font = global::ui::g_panel_font; + font_scale = menu::renderer::get_normalized_font_scale(font, font_scale); + } + } + + float x = m_column_adjustment.x; + float x2 = x + 0.003f; + float wrap = (x + 0.14f - 0.004f); + + // draw name + menu::renderer::draw_text(name.c_str(), { x2, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_left - 1) * 0.03f) + 0.006f + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, font_scale, font, color); + + // draw value + menu::renderer::draw_text(value.c_str(), { 0.f, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_left - 1) * 0.03f) + 0.006f + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, font_scale, font, color, JUSTIFY_RIGHT, { 0.f, wrap }); + + m_child->m_panel_tick_left++; + } + + void panel::panel_right_item(std::string name, std::string value, int font, float font_scale, color_rgba color) { + if (font == 0) { + if (global::ui::g_panel_font != 0) { + font = global::ui::g_panel_font; + font_scale = menu::renderer::get_normalized_font_scale(font, font_scale); + } + } + + float adjustment = m_column_adjustment.x; + float x = m_column_adjustment.x; + float wrap = (x + 0.28f - 0.004f); + + // draw divider + menu::renderer::draw_rect({ x + 0.14f, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_right - 1) * 0.03f) + (0.007875f / 2.f) + m_column_offset + 0.00525f }, { 0.001f, 0.021f }, { 255, 255, 255, 255 }); + + // draw name + menu::renderer::draw_text(name.c_str(), { x + 0.14f + 0.004f, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_right - 1) * 0.03f) + 0.006f + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, font_scale, font, color); + + // draw value + menu::renderer::draw_text(value.c_str(), { 0.f, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_right - 1) * 0.03f) + 0.006f + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, font_scale, font, color, JUSTIFY_RIGHT, { 0.f, wrap }); + + m_child->m_panel_tick_right++; + } + + void panel::panel_left_sprite_item(std::string name, std::string sprite_left, std::string sprite_right, int font, float font_scale, color_rgba color, math::vector2 scale) { + if (font == 0) { + if (global::ui::g_panel_font != 0) { + font = global::ui::g_panel_font; + font_scale = menu::renderer::get_normalized_font_scale(font, font_scale); + } + } + + float x = m_column_adjustment.x; + float x2 = x + 0.003f; + + if (m_child->m_double_sided) { + // draw divider + menu::renderer::draw_rect({ x + 0.14f, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_left - 1) * 0.03f) + (0.007875f / 2.f) + m_column_offset + 0.00525f }, { 0.001f, 0.021f }, { 255, 255, 255, 255 }); + } + + // sprite + menu::renderer::draw_sprite({ sprite_left, sprite_right }, { x2 + 0.006f, (global::ui::g_position.y - 0.08f) + 0.017f + ((m_child->m_panel_tick_left - 1) * 0.03f) + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, scale, 0.f, color); + + // draw name + menu::renderer::draw_text(name.c_str(), { x2 + 0.014f, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_left - 1) * 0.03f) + 0.006f + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, font_scale, font, color); + + m_child->m_panel_tick_left++; + } + + void panel::panel_right_sprite_item(std::string name, std::string sprite_left, std::string sprite_right, int font, float font_scale, color_rgba color, math::vector2 scale) { + if (font == 0) { + if (global::ui::g_panel_font != 0) { + font = global::ui::g_panel_font; + font_scale = menu::renderer::get_normalized_font_scale(font, font_scale); + } + } + + float adjustment = m_column_adjustment.x; + float x = m_column_adjustment.x; + float x2 = x + 0.14f + 0.003f; + + // sprite + menu::renderer::draw_sprite({ sprite_left, sprite_right }, { x2 + 0.009f, (global::ui::g_position.y - 0.08f) + 0.017f + ((m_child->m_panel_tick_right - 1) * 0.03f) + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, scale, 0.f, color); + + // draw name + menu::renderer::draw_text(name.c_str(), { x + 0.14f + 0.004f + 0.018f, (global::ui::g_position.y - 0.08f) + ((m_child->m_panel_tick_right - 1) * 0.03f) + 0.006f + ((0.007875f / 2.f) - 0.0017875f) + m_column_offset }, font_scale, font, color); + + m_child->m_panel_tick_right++; + } + + void panel_manager::update() { + if (global::vars::g_unloading || m_rearranging || !menu::base::is_open() || global::ui::g_input_open) return; + + for (panel_parent* panel : m_panels) { + if (global::vars::g_unloading || m_rearranging) return; + for (std::pair>& e : panel->m_column_offset) e.second = math::vector2(0.f, 0.f); + + if (panel->m_render) { + if (!panel->m_children_panels.empty()) { + for (int j = 0; j < 20; j++) { + for (std::size_t i = 0; i < panel->m_children_panels.size(); i++) { + if (global::vars::g_unloading || m_rearranging) return; + + auto& child = panel->m_children_panels[i]; + if (child.m_column == j) { + if (child.m_render) { + math::vector2 scale = child.m_update(child); + + if (panel->m_column_offset[child.m_column].x < scale.x) { + panel->m_column_offset[child.m_column].x = scale.x; + } + + panel->m_column_offset[child.m_column].y += scale.y; + } + } + } + } + } + } + } + } + + void panel_manager::cleanup() { + for (panel_parent* panel : m_panels) { + if (panel) delete panel; + } + } + + panel_parent* panel_manager::get_parent(std::string ID) { + auto Search = std::find_if(m_panels.begin(), m_panels.end(), [=](panel_parent* Element) { return Element->m_id == ID; }); + if (Search != m_panels.end()) { + return *(Search); + } + + return nullptr; + } + + panel_child& panel_manager::get_child(panel_parent* parent, std::string ID) { + static panel_child _static; + if (!parent) return _static; + + auto Search = std::find_if(parent->m_children_panels.begin(), parent->m_children_panels.end(), [=](panel_child& Element) { return Element.m_id == ID; }); + if (Search != parent->m_children_panels.end()) { + return *(Search); + } + + return _static; + } + + void panel_manager::toggle_panel_render(std::string parent_id, bool toggle) { + panel_parent* parent = get_parent(parent_id); + if (parent) { + parent->m_render = toggle; + } + } + + void panel_manager::rearrange(panel_parent* parent, std::string ID, int Column, int Position) { + if (!parent) return; + m_rearranging = true; + + panel_child& child = get_child(parent, ID); + + if (child.m_index != Position) { + child.m_index = Position; + } + + if (Column != child.m_column) { + int index = 0; + for (auto& Elem : parent->m_children_panels) { + if (Elem.m_column == Column) { + if (Elem.m_index > index) { + index = Elem.m_index; + } + } + } + + child.m_index = index + 1; + child.m_column = Column; + } + + std::sort(parent->m_children_panels.begin(), parent->m_children_panels.end(), [=](panel_child& left, panel_child& right) { + return left.m_index < right.m_index; + }); + + m_rearranging = false; + } + + void panel_manager::null_structure(panel_child& _this) { + memset(_this.m_custom_ptr, 0, sizeof(_this.m_custom_ptr)); + } + + void panel_manager::set_structure(panel_child& _this, void* data, int Size) { + memcpy(_this.m_custom_ptr, data, Size); + } + + math::vector2 panel_manager::render_panel_player_info_name(panel_child& _this) { + if (!menu::player::get_selected_player().m_connected) return math::vector2(0.f, 0.f); + if (menu::player::get_selected_player().m_name.empty()) return math::vector2(0.f, 0.f); + + panel panel(_this, global::ui::g_panel_bar); + + const char* name = menu::player::get_selected_player().m_name.c_str(); + if (menu::player::get_local_player().m_id == menu::player::get_selected_player().m_id) { + /*if (!NetworkSpoofingNameMenuVars::m_vars.m_SpoofedName.empty()) { + name = NetworkSpoofingNameMenuVars::m_vars.m_SpoofedName.c_str(); + }*/ + } + + if (native::is_pedheadshot_valid(menu::player::get_selected_player().m_ped_headshot)) { + const char* texture = native::get_pedheadshot_txd_string(menu::player::get_selected_player().m_ped_headshot); + panel.item_full(std::string(util::va::va("%s", name)), texture, texture, 1, 0.41f, { 255,255,255,255 }, { 0.0192f * 0.8f, 0.0336f * 0.8f }); + } else panel.item_full(std::string(util::va::va("%s", name)), "", 1, 0.41f); + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_player_info_generic(panel_child& _this) { + if (!menu::player::get_selected_player().m_connected) return math::vector2(0.f, 0.f); + + static char buffers[11][50]; + memset(buffers, 0, sizeof(buffers)); + + panel panel(_this, global::ui::g_panel_bar); + menu::player::player_context& selected = menu::player::get_selected_player(); + + panel.item(TRANSLATE(t_rank), std::string(util::va::vap(buffers[0], "%i", script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(6).as()))); // 1.55 done + + int health = native::get_entity_health(selected.m_ped); + int max_health = native::get_entity_max_health(selected.m_ped); + + if (health == 0 && max_health == 0) { + panel.item(TRANSLATE(t_health), "~m~" + std::string(TRANSLATE(t_invalid))); + } else if (health == 0 && max_health != 0) { + panel.item(TRANSLATE(t_health), "~r~" + std::string(TRANSLATE(t_dead))); + } else if (health == max_health) { + panel.item(TRANSLATE(t_health), "~g~" + std::string(TRANSLATE(t_full))); + } else { + panel.item(TRANSLATE(t_health), std::string(util::va::vap(buffers[1], "~o~%i%%", ((health * 100) / max_health))).c_str()); + } + + panel.item(TRANSLATE(t_cash), std::string(util::va::vap(buffers[2], "%i", script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(3).as())));// 1.55 done + panel.item(TRANSLATE(t_armor), std::string(util::va::vap(buffers[3], "%i", native::get_ped_armour(selected.m_ped)))); + panel.item(TRANSLATE(t_bank), std::string(util::va::vap(buffers[4], "%i", script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(56).as() - script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(3).as())));// 1.55 done + panel.item(TRANSLATE(t_wanted_level), std::string(util::va::vap(buffers[5], "%i/5", native::get_player_wanted_level(selected.m_id)))); + panel.item(TRANSLATE(t_kd_ratio), std::string(util::va::vap(buffers[6], "%.2f", script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(26).as())));// 1.55 done + + int ammo = native::get_ammo_in_ped_weapon(selected.m_ped, selected.m_weapon_hash); + panel.item(TRANSLATE(t_ammo), ammo > 0 ? std::to_string(ammo) : "~m~" + std::string(TRANSLATE(t_none))); + + bool rendered = false; + for (scroll_struct weapon : global::lists::g_weapons) { + if (selected.m_weapon_hash == weapon.m_result) { + rendered = true; + panel.item_full(TRANSLATE(t_weapon), weapon.m_name.get()); + break; + } + } + + if (!rendered) { + panel.item_full(TRANSLATE(t_weapon), "~m~" + std::string(TRANSLATE(t_unarmed))); + } + + panel.item_full(TRANSLATE(t_zone), native::get_label_text(native::get_name_of_zone(selected.m_coords.x, selected.m_coords.y, selected.m_coords.z))); + + uint32_t street, crossing; + native::get_street_name_at_coord(selected.m_coords.x, selected.m_coords.y, selected.m_coords.z, &street, &crossing); + + const char* street_label = native::get_street_name_from_hash_key(street); + const char* crossing_label = native::get_street_name_from_hash_key(crossing); + + const char* street_output = ""; + if (strlen(street_label) > 0) { + street_output = street_label; + } else if (strlen(crossing_label) > 0) { + street_output = crossing_label; + } else street_output = ("~m~" + std::string(TRANSLATE(t_unknown))).c_str(); + + panel.item_full(TRANSLATE(t_street), street_output); + panel.item(TRANSLATE(t_coords), std::string(util::va::vap(buffers[7], "[%.0f,%.0f,%.0f]", selected.m_coords.x, selected.m_coords.y, selected.m_coords.z))); + + float heading = selected.m_heading; + if (heading >= 0.f && heading <= 90.f) { + panel.item(TRANSLATE(t_heading), std::string(util::va::vap(buffers[8], "%s (%.0f)", TRANSLATE(t_north), heading)).c_str()); + } else if (heading >= 90.f && heading <= 180.f) { + panel.item(TRANSLATE(t_heading), std::string(util::va::vap(buffers[8], "%s (%.0f)", TRANSLATE(t_east), heading)).c_str()); + } else if (heading >= 180.f && heading <= 270.f) { + panel.item(TRANSLATE(t_heading), std::string(util::va::vap(buffers[8], "%s (%.0f)", TRANSLATE(t_south), heading)).c_str()); + } else if (heading >= 270.f && heading <= 360.f) { + panel.item(TRANSLATE(t_heading), std::string(util::va::vap(buffers[8], "%s (%.0f)", TRANSLATE(t_west), heading)).c_str()); + } else panel.item(TRANSLATE(t_heading), "~m~" + std::string(TRANSLATE(t_invalid))); + + panel.item(TRANSLATE(t_distance), std::string(util::va::vap(buffers[9], "%.2f", selected.m_coords.get_distance(menu::player::get_local_player().m_coords)))); + panel.item(TRANSLATE(t_speed), std::string(util::va::vap(buffers[10], "%.0f %s", native::get_entity_speed(selected.m_entity) * global::vars::g_selected_metric_system.first, global::vars::g_selected_metric_system.second.c_str()))); + panel.item(TRANSLATE(t_passive), native::get_blip_sprite(native::get_blip_from_entity(selected.m_ped)) == 163 ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + panel.item(TRANSLATE(t_invisible), !native::is_entity_visible_to_script(selected.m_ped) ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + + rendered = false; + if (is_valid_ptr(selected.m_net_player)) { + if (selected.m_net_player->m_player_info) { + if (!settings::hide::vars::m_vars.m_hide_rockstar_ids) { + uint64_t rockstar_id = selected.m_net_player->m_player_info->m_identifier.m_rockstar_id; + + if (selected.m_id == menu::player::get_local_player().m_id) { + if (network::spoofing::rid::vars::m_vars.m_spoofing_rid != rockstar_id) { + rockstar_id = network::spoofing::rid::vars::m_vars.m_spoofing_rid; + } + } + + panel.item(TRANSLATE(t_rid), std::to_string(rockstar_id)); + } else { + panel.item(TRANSLATE(t_rid), "~m~" + std::string(TRANSLATE(t_hidden))); + } + + rendered = true; + } + } + + if (!rendered) { + panel.item(TRANSLATE(t_rid), "~m~" + std::string(TRANSLATE(t_unknown))); + } + + rendered = false; + if (is_valid_ptr(selected.m_net_player)) { + if (selected.m_net_player->m_player_info) { + uint32_t IP = selected.m_net_player->m_player_info->m_external_ip; + + auto vit = std::find_if(global::vars::g_relay_usage.begin(), global::vars::g_relay_usage.end(), [=](relay_usage& Usage) { + return !strcmp(Usage.m_name, selected.m_name.c_str()) && Usage.m_rockstar_id == selected.m_net_player->m_player_info->m_identifier.m_rockstar_id; + }); + + if (vit != global::vars::g_relay_usage.end()) { + IP = vit->m_external_ip; + } + + char buffer[16]; + sprintf_s(buffer, "%i.%i.%i.%i", ((IP & 0xFF000000) >> 24), ((IP & 0xFF0000) >> 16), ((IP & 0xFF00) >> 8), (IP & 0xFF)); + + if (selected.m_id == menu::player::get_local_player().m_id) { + if (!network::spoofing::ip::vars::m_vars.m_spoofing_ip.empty() && network::spoofing::ip::vars::m_vars.m_spoofing_ip.compare(buffer)) { + strcpy(buffer, network::spoofing::ip::vars::m_vars.m_spoofing_ip.c_str()); + } + } + + if (!settings::hide::vars::m_vars.m_hide_ips) { + panel.item(TRANSLATE(t_ip), buffer); + } else { + panel.item(TRANSLATE(t_ip), "~m~" + std::string(TRANSLATE(t_hidden))); + } + + rendered = true; + } + } + + if (!rendered) { + panel.item("IP", "~m~" + std::string(TRANSLATE(t_unknown))); + } + + rendered = false; + if (is_valid_ptr(selected.m_net_player)) { + if (selected.m_net_player->m_player_info) { + std::stringstream stream; + stream << std::hex << selected.m_net_player->m_player_info->m_host_token; + + if (selected.m_id == menu::player::get_local_player().m_id) { + if (network::spoofing::vars::m_vars.m_spoofed_peer != network::spoofing::vars::m_vars.m_original_peer) { + stream = std::stringstream(); + stream << std::hex << network::spoofing::vars::m_vars.m_spoofed_peer; + } + } + + panel.item(TRANSLATE(t_peer), stream.str()); + rendered = true; + } + } + + if (!rendered) { + panel.item(TRANSLATE(t_peer), "~m~" + std::string(TRANSLATE(t_unknown))); + } + + panel.item("Device", script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(96).at(29).as() == 2 ? TRANSLATE(t_using_controller) : TRANSLATE(t_using_keyboard)); // 1.55 good + + if (selected.m_in_vehicle) { + panel.item_full(TRANSLATE(t_vehicle), native::get_label_text(native::get_display_name_from_vehicle_model(native::get_entity_model(selected.m_vehicle)))); + } + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_player_info_crew(panel_child& _this) { + if (!menu::player::get_selected_player().m_connected) return math::vector2(0.f, 0.f); + + menu::player::player_context& selected = menu::player::get_selected_player(); + if (selected.m_net_player && strlen(selected.m_net_player->get_crew_name()) > 0) { + panel panel(_this, global::ui::g_panel_bar); + + panel.item_full(TRANSLATE(t_crew), selected.m_net_player->get_crew_name()); + panel.item(TRANSLATE(t_crew_tag), selected.m_net_player->get_crew_tag()); + panel.item(TRANSLATE(t_crew_id), std::to_string(selected.m_net_player->get_crew_id())); + panel.item_full(TRANSLATE(t_crew_rank), selected.m_net_player->get_crew_rank()); + + return panel.get_render_scale(); + } + + return math::vector2(0.f, 0.f); + } + + math::vector2 panel_manager::render_panel_player_info_flags(panel_child& _this) { + if (!menu::player::get_selected_player().m_connected) return math::vector2(0.f, 0.f); + + _this.m_double_sided = false; + menu::player::player_context& selected = menu::player::get_selected_player(); + + bool rockstar_developer = false; + bool rockstar_qa_tester = false; + + if (is_valid_ptr(selected.m_net_player)) { + if (selected.m_net_player) { + rockstar_developer = selected.m_net_player->m_is_rockstar_developer; + rockstar_qa_tester = selected.m_net_player->m_is_rockstar_qa; + } + } + + if (!(rockstar_developer + || rockstar_qa_tester + || native::is_bit_set(script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(51).as(), 1) // 1.55 done + || native::is_bit_set(script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(51).as(), 4) // 1.55 done + || native::is_bit_set(script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(51).as(), 3) // 1.55 done + || native::network_am_i_muted_by_player(selected.m_id) + || script_global(rage::global::_155_property_base2).at(selected.m_id, rage::global::_155_property_base2_size).at(200).as() == 1// 1.55 done + || selected.m_is_modder)) { + return math::vector2(0.f, 0.f); + } + + panel panel(_this, global::ui::g_panel_bar); + + if (native::is_bit_set(script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(51).as(), 1)) {// 1.55 done + panel.item(TRANSLATE(t_badsport), "mpleaderboard", "leaderboard_deaths_icon"); + } + + if (native::is_bit_set(script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(51).as(), 4)) {// 1.55 done + panel.item(TRANSLATE(t_cheater), "mpleaderboard", "leaderboard_globe_icon"); + } + + if (native::is_bit_set(script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(51).as(), 3)) {// 1.55 done + panel.item(TRANSLATE(t_toxic), "mpleaderboard", "leaderboard_globe_icon"); + } + + if (native::network_am_i_muted_by_player(selected.m_id)) { + panel.item(TRANSLATE(t_muted_me), "mpleaderboard", "leaderboard_audio_3"); + } + + if (script_global(rage::global::_155_property_base2).at(selected.m_id, rage::global::_155_property_base2_size).at(200).as() == 1) {// 1.55 done + panel.item(TRANSLATE(t_off_the_radar), "mpleaderboard", "leaderboard_kd_icon"); + } + + if (script_global(rage::global::_155_property_base2).at(selected.m_id, rage::global::_155_property_base2_size).at(212).as() == 1) {// 1.55 done + panel.item(TRANSLATE(t_reveal_players), "mpleaderboard", "leaderboard_kd_icon"); + } + + if (rockstar_developer) { + panel.item(TRANSLATE(t_rdeveloper), "mpleaderboard", "leaderboard_star_icon"); + } + + if (rockstar_qa_tester) { + panel.item(TRANSLATE(t_rqa_developer), "mpleaderboard", "leaderboard_star_icon"); + } + + for (std::size_t i = 0; i < menu::player::REASON_END; i++) { + if (selected.m_modder_flags[(menu::player::ePlayerReportReasons)i]) { + panel.item("~r~" + menu::player::get_report_reason((menu::player::ePlayerReportReasons)i), "mpleaderboard", "leaderboard_players_icon"); + } + } + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_player_info_vote_kick_queue(panel_child& _this) { + if (!menu::player::get_selected_player().m_connected) return math::vector2(0.f, 0.f); + + menu::player::player_context& selected = menu::player::get_selected_player(); + + std::vector voting_to_kick; + menu::player::for_each([&](menu::player::player_context& Player) { + if (script_global(1619390).at(Player.m_id, 100).at(selected.m_id + 1).as() == 1) { // 1.55 done + voting_to_kick.push_back(Player.m_name); + } + }, true); + + if (voting_to_kick.size()) { + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + for (std::string client : voting_to_kick) { + panel.item(client, "mpleaderboard", "leaderboard_kick_icon"); + } + + return panel.get_render_scale(); + } + + return math::vector2(0.f, 0.f); + } + + math::vector2 panel_manager::render_panel_player_info_properties(panel_child& _this) { + if (!menu::player::get_selected_player().m_connected) return math::vector2(0.f, 0.f); + + menu::player::player_context& selected = menu::player::get_selected_player(); + + std::vector> apartments; + + for (int i = 0; i < 4; i++) { + int Val = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(267 + 7 + i).as(); + apartments.push_back({ Val, Val != 0 }); + } + + std::vector> garages; + for (int i = 0; i < 3; i++) { + int Val = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(275 + 7 + i).as(); + garages.push_back({ Val, Val != 0 }); + } + + std::pair office; + office.first = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(272 + 7).as(); + office.second = office.first != 0; + + std::pair clubhouse; + clubhouse.first = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(273 + 7).as(); + clubhouse.second = clubhouse.first != 0; + + bool owns_property = + apartments[0].second || apartments[1].second || apartments[2].second || apartments[3].second + || office.second || clubhouse.second; + + int property_count = + (int)apartments[0].second + (int)apartments[1].second + (int)apartments[2].second + (int)apartments[3].second + + (int)clubhouse.second + (int)clubhouse.second; + + if (owns_property) { + static char buffers[4][50]; + + panel panel(_this, global::ui::g_panel_bar); + + int count = 0; + for (std::pair e : garages) { + if (e.second) count++; + } + + if (property_count == 1) { + if (office.second && count > 0) { + panel.item("1 " + std::string(TRANSLATE(t_property)), "mpleaderboard", "leaderboard_rankshield_icon"); + } else { + panel.item_full("1 " + std::string(TRANSLATE(t_property)), "mpleaderboard", "leaderboard_rankshield_icon"); + } + } else { + if (office.second && count > 0) { + panel.item(std::string(util::va::vap(buffers[0], "%i %s", property_count, TRANSLATE(t_properties))), "mpleaderboard", "leaderboard_rankshield_icon"); + } else { + panel.item_full(std::string(util::va::vap(buffers[1], "%i %s", property_count, TRANSLATE(t_properties))), "mpleaderboard", "leaderboard_rankshield_icon"); + } + } + + if (office.second && count > 0) { + panel.item(std::string(util::va::vap(buffers[2], "%i %s%c", count, TRANSLATE(t_office_garage), count > 1 ? 's' : ' ')), "mpinventory", "mp_specitem_car", 0, 0.3f, { 255,255,255,255 }, { 0.0192f * 0.8f, 0.0336f * 0.8f }); + } + + for (int i = 0; i < 4; i++) { + if (apartments[i].second) { + panel.item_full(std::string(util::va::vap(buffers[3], "%s #%i", TRANSLATE(t_property), i + 1)), menu::helpers::get_location_from_id(apartments[i].first)); + } + } + + if (clubhouse.second) { + panel.item_full(TRANSLATE(t_clubhouse), menu::helpers::get_location_from_id(clubhouse.first)); + } + + if (office.second) { + panel.item_full(TRANSLATE(t_office), menu::helpers::get_location_from_id(office.first)); + } + + return panel.get_render_scale(); + } + + return math::vector2(0.f, 0.f); + } + + math::vector2 panel_manager::render_panel_player_info_stats(panel_child& _this) { + if (!menu::player::get_selected_player().m_connected) return math::vector2(0.f, 0.f); + + _this.m_double_sided = false; + + menu::player::player_context& selected = menu::player::get_selected_player(); + panel panel(_this, global::ui::g_panel_bar); + + int races_won = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(15).as(); // 1.55 done + int races_lost = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(16).as();// 1.55 done + + int deathmatches_won = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(20).as();// 1.55 done + int deathmatches_lost = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(21).as();// 1.55 done + + int darts_won = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(32).as();// 1.55 done + int darts_total = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(33).as();// 1.55 done + + int arm_wrestling_won = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(34).as();// 1.55 done + int arm_wrestling_total = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(35).as();// 1.55 done + + int tennis_won = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(36).as();// 1.55 done + int tennis_lost = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(37).as();// 1.55 done + + int golf_won = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(40).as();// 1.55 done + int golf_lost = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(41).as();// 1.55 done + + int shooting_range_won = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(42).as();// 1.55 done + int shooting_range_lost = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(43).as();// 1.55 done + + int deaths = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(29).as();// 1.55 done + int missions_created = script_global(rage::global::_155_player_stats_struct).at(selected.m_id, rage::global::_155_player_stats_size).at(rage::global::_155_player_stats_start).at(50).as();// 1.55 done + + static char buffers[9][50]; + + panel.item(TRANSLATE(t_races_won), std::string(util::va::vap(buffers[0], "%i/%i", races_won, races_won + races_lost))); + panel.item(TRANSLATE(t_deathmatches_won), std::string(util::va::vap(buffers[1], "%i/%i", deathmatches_won, deathmatches_won + deathmatches_lost))); + panel.item(TRANSLATE(t_darts_won), std::string(util::va::vap(buffers[2], "%i/%i", darts_won, darts_total))); + panel.item(TRANSLATE(t_arm_wrestling_won), std::string(util::va::vap(buffers[3], "%i/%i", arm_wrestling_won, arm_wrestling_total))); + panel.item(TRANSLATE(t_tennis_won), std::string(util::va::vap(buffers[4], "%i/%i", tennis_won, tennis_won + tennis_lost))); + panel.item(TRANSLATE(t_golf_won), std::string(util::va::vap(buffers[5], "%i/%i", golf_won, golf_won + golf_lost))); + panel.item(TRANSLATE(t_shooting_range_won), std::string(util::va::vap(buffers[6], "%i/%i", shooting_range_won, shooting_range_won + shooting_range_lost))); + panel.item(TRANSLATE(t_deaths), std::string(util::va::vap(buffers[7], "%i", deaths))); + panel.item(TRANSLATE(t_missions_created), std::string(util::va::vap(buffers[8], "%i", missions_created))); + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_player_info_geo(panel_child& _this) { + if (!menu::player::get_selected_player().m_connected) return math::vector2(0.f, 0.f); + menu::player::player_context& selected = menu::player::get_selected_player(); + + if (is_valid_ptr(selected.m_net_player)) { + if (selected.m_net_player && selected.m_net_player->m_player_info) { + auto vit = global::vars::g_geo.find(selected.m_net_player->m_player_info->m_external_ip); + if (vit != global::vars::g_geo.end()) { + panel panel(_this, global::ui::g_panel_bar); + + if (!vit->second.m_zip.empty()) panel.item(TRANSLATE(t_zip), vit->second.m_zip); + if (!vit->second.m_region_name.empty()) panel.item(TRANSLATE(t_region), vit->second.m_region_name); + if (!vit->second.m_city.empty()) panel.item(TRANSLATE(t_city), vit->second.m_city); + if (!vit->second.m_country.empty()) panel.item(TRANSLATE(t_country), vit->second.m_country); + if (!vit->second.m_timezone.empty()) panel.item_full(TRANSLATE(t_timezone), vit->second.m_timezone); + if (!vit->second.m_isp.empty()) panel.item_full(TRANSLATE(t_isp), vit->second.m_isp); + if (!vit->second.m_org.empty()) panel.item_full(TRANSLATE(t_org), vit->second.m_org); + + return panel.get_render_scale(); + } + } + } + + return math::vector2(0.f, 0.f); + } + + math::vector2 panel_manager::render_panel_radio(panel_child& _this) { + if (native::get_player_radio_station_index() != 255) { + panel panel(_this, global::ui::g_panel_bar); + + char local_20[500]; + int local_26 = native::get_audible_music_track_text_id(); + + strncpy_s(local_20, "", 64); + strncat_s(local_20, std::to_string(local_26).c_str(), 64); + strncat_s(local_20, "S", 64); + strncpy(&(local_20[16]), "", 32); + strncat(&(local_20[16]), std::to_string(local_26).c_str(), 32); + strncat(&(local_20[16]), "A", 32); + strncpy(&(local_20[25]), native::get_player_radio_station_name(), 24); + + panel.item_full(TRANSLATE(t_station), native::get_label_text(native::get_player_radio_station_name())); + if (native::get_hash_key(native::get_label_text(local_20)) != joaat("NULL")) { + panel.item_full(TRANSLATE(t_song), native::get_label_text(local_20)); + panel.item_full(TRANSLATE(t_artist), native::get_label_text(&local_20[16])); + } + + return panel.get_render_scale(); + } + + return math::vector2(0.f, 0.f); + } + + math::vector2 panel_manager::render_panel_recent_player(panel_child& _this) { + panel_custom_recent_player* data = (panel_custom_recent_player*)_this.m_custom_ptr; + + if (*(uint8_t*)(&data->m_name) == 0 || data->m_name[0] == 0) { + // Preview + data->m_has_stats = false; + data->m_in_session = false; + data->m_online = false; + data->m_rockstar_id = 0; + data->m_session_type = -1; + strcpy_s(data->m_name, TRANSLATE(t_placeholder)); + strcpy_s(data->m_ip, "1.1.1.1"); + strcpy_s(data->m_first_encountered, TRANSLATE(t_some_time_ago)); + strcpy_s(data->m_last_encountered, TRANSLATE(t_some_time_ago)); + } + + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + panel.item(TRANSLATE(t_name), settings::hide::vars::m_vars.m_hide_names ? TRANSLATE(t_hidden) : data->m_name); + panel.item(TRANSLATE(t_rid), settings::hide::vars::m_vars.m_hide_rockstar_ids ? TRANSLATE(t_hidden) : std::string(util::va::va("%i", data->m_rockstar_id))); + panel.item(TRANSLATE(t_ip), settings::hide::vars::m_vars.m_hide_ips ? TRANSLATE(t_hidden) : data->m_ip); + + if (data->m_rockstar_id == 0) { + panel.item(TRANSLATE(t_online), "~r~" + std::string(TRANSLATE(t_no))); + } else panel.item(TRANSLATE(t_online), (data->m_online || data->m_in_session) ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + + panel.item(TRANSLATE(t_in_session), data->m_in_session ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + panel.item(TRANSLATE(t_session_type), menu::helpers::get_gs_type(data->m_session_type)); + + if (data->m_has_stats) { + float kd = 0.f; + if (data->m_stats.m_deaths == 0) { + kd = (float)data->m_stats.m_kills; + } else { + kd = (float)data->m_stats.m_kills / (float)data->m_stats.m_deaths; + } + + panel.item(TRANSLATE(t_rank), (data->m_stats.m_rank > 2500 ? "~y~" : "") + std::to_string(data->m_stats.m_rank)); + panel.item(TRANSLATE(t_cash), (data->m_stats.m_wallet_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_wallet_balance)); + panel.item(TRANSLATE(t_bank), (data->m_stats.m_bank_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_bank_balance)); + panel.item(TRANSLATE(t_kills), std::to_string(data->m_stats.m_kills)); + panel.item(TRANSLATE(t_deaths), std::to_string(data->m_stats.m_deaths)); + panel.item(TRANSLATE(t_kd_ratio), util::va::va("%.2f", kd)); + } + + panel.item(TRANSLATE(t_first_encountered), data->m_first_encountered); + panel.item(TRANSLATE(t_last_encountered), data->m_last_encountered); + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_friend(panel_child& _this) { + panel_custom_friend* data = (panel_custom_friend*)_this.m_custom_ptr; + + if (*(uint8_t*)(&data->m_name) == 0 || data->m_name[0] == 0) { + // Preview + strcpy_s(data->m_name, TRANSLATE(t_preview)); + data->m_rockstar_id = 1337; + data->m_has_stats = false; + data->m_online = false; + data->m_in_session = false; + data->m_session_type = -1; + } + + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + panel.item(TRANSLATE(t_name), settings::hide::vars::m_vars.m_hide_names ? TRANSLATE(t_hidden) : data->m_name); + panel.item(TRANSLATE(t_rid), settings::hide::vars::m_vars.m_hide_rockstar_ids ? TRANSLATE(t_hidden) : std::to_string(data->m_rockstar_id)); + + if (data->m_rockstar_id == 0) { + panel.item(TRANSLATE(t_online), "~r~" + std::string(TRANSLATE(t_no))); + } else panel.item(TRANSLATE(t_online), data->m_online ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + + panel.item(TRANSLATE(t_in_session), data->m_in_session ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + panel.item(TRANSLATE(t_session_type), menu::helpers::get_gs_type(data->m_session_type)); + + if (data->m_has_stats) { + float kd = 0.f; + if (data->m_stats.m_deaths == 0) { + kd = (float)data->m_stats.m_kills; + } else { + kd = (float)data->m_stats.m_kills / (float)data->m_stats.m_deaths; + } + + panel.item(TRANSLATE(t_rank), (data->m_stats.m_rank > 2500 ? "~y~" : "") + std::to_string(data->m_stats.m_rank)); + panel.item(TRANSLATE(t_cash), (data->m_stats.m_wallet_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_wallet_balance)); + panel.item(TRANSLATE(t_bank), (data->m_stats.m_bank_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_bank_balance)); + panel.item(TRANSLATE(t_kills), std::to_string(data->m_stats.m_kills)); + panel.item(TRANSLATE(t_deaths), std::to_string(data->m_stats.m_deaths)); + panel.item(TRANSLATE(t_kd_ratio), util::va::va("%.2f", kd)); + } + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_overseer(panel_child& _this) { + panel_custom_overseer* data = (panel_custom_overseer*)_this.m_custom_ptr; + + if (data->m_name[0] == 0) { + strcpy_s(data->m_name, TRANSLATE(t_preview)); + data->m_flags = 0; + data->m_rockstar_id = 1337; + data->m_has_stats = false; + data->m_online = false; + data->m_in_session = false; + data->m_session_type = -1; + } + + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + panel.item(TRANSLATE(t_name), settings::hide::vars::m_vars.m_hide_names ? TRANSLATE(t_hidden) : data->m_name); + panel.item(TRANSLATE(t_rid), settings::hide::vars::m_vars.m_hide_rockstar_ids ? TRANSLATE(t_hidden) : std::string(util::va::va("%i", data->m_rockstar_id))); + + if (global::vars::g_online_rockstar_ids.find(data->m_rockstar_id) == global::vars::g_online_rockstar_ids.end()) { + panel.item(TRANSLATE(t_online), "~r~" + std::string(TRANSLATE(t_no))); + } else panel.item(TRANSLATE(t_online), global::vars::g_online_rockstar_ids[data->m_rockstar_id].first ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + + panel.item(TRANSLATE(t_in_session), data->m_in_session ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + panel.item(TRANSLATE(t_session_type), menu::helpers::get_gs_type(data->m_session_type)); + panel.item(TRANSLATE(t_enabled), (data->m_flags & 1) ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + + if (data->m_has_stats) { + float kd = 0.f; + if (data->m_stats.m_deaths == 0) { + kd = (float)data->m_stats.m_kills; + } else { + kd = (float)data->m_stats.m_kills / (float)data->m_stats.m_deaths; + } + + panel.item(TRANSLATE(t_rank), (data->m_stats.m_rank > 2500 ? "~y~" : "") + std::to_string(data->m_stats.m_rank)); + panel.item(TRANSLATE(t_cash), (data->m_stats.m_wallet_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_wallet_balance)); + panel.item(TRANSLATE(t_bank), (data->m_stats.m_bank_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_bank_balance)); + panel.item(TRANSLATE(t_kills), std::to_string(data->m_stats.m_kills)); + panel.item(TRANSLATE(t_deaths), std::to_string(data->m_stats.m_deaths)); + panel.item(TRANSLATE(t_kd_ratio), util::va::va("%.2f", kd)); + } + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_vehicle_preview(panel_child& _this) { + panel_custom_vehicle_preview* data = (panel_custom_vehicle_preview*)_this.m_custom_ptr; + + if (*(uint8_t*)(&data->m_name) == 0 || data->m_name[0] == 0) { + strcpy_s(data->m_name, TRANSLATE(t_preview)); + strcpy_s(data->m_dict, ""); + strcpy_s(data->m_name, ""); + + strcpy_s(data->m_manufacturer, TRANSLATE(t_preview)); + data->m_max_speed = 0.f; + data->m_max_braking = 0.f; + data->m_max_traction = 0.f; + data->m_seats = 0; + } + + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + float adjustment = panel.get_column_adjustment().x; + float x = adjustment; + + math::vector2 s = { 0.14f, 0.24f }; + float _x = x + (s.x * 0.5f); + float _y = ((global::ui::g_position.y - 0.08f) + (0.007875f / 2.f) + panel.get_column_offset()) + (s.y * 0.5f) - 0.011f; + + menu::renderer::draw_sprite({ data->m_dict, data->m_name }, { _x, _y }, { 0.12f, 0.18f }, 0.f, { 255, 255, 255, 255 }); + + panel.get_panel_child()->m_panel_tick_left = 8; + panel.get_panel_child()->m_panel_tick_right = 8; + + static char buffers[3][50]; + memset(buffers, 0, sizeof(buffers)); + + panel.item(TRANSLATE(t_manufacturer), data->m_manufacturer); + panel.item(TRANSLATE(t_max_speed), util::va::vap(buffers[0], "%.0f %s", data->m_max_speed, global::vars::g_selected_metric_system.second.c_str())); + panel.item(TRANSLATE(t_max_braking), util::va::vap(buffers[1], "%.2f", data->m_max_braking)); + panel.item(TRANSLATE(t_max_traction), util::va::vap(buffers[2], "%.2f", data->m_max_traction)); + panel.item(TRANSLATE(t_max_seats), std::to_string(data->m_seats)); + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_blacklist(panel_child& _this) { + _this.m_double_sided = false; + + std::vector players; + + if (global::vars::g_network_base_config) { + rage::network::network_base_config* real_config = global::vars::g_network_base_config; + if (global::vars::g_steam) { + real_config = (rage::network::network_base_config*)((uint64_t)global::vars::g_network_base_config + 0x70); + } + + rage::network::blacklisted_player* blacklisted_players = real_config->m_first_blacklisted_player; + if (is_valid_ptr(blacklisted_players)) { + for (; blacklisted_players; blacklisted_players = blacklisted_players->m_next) { + players.push_back(*blacklisted_players); + } + } + } + + if (players.size()) { + panel panel(_this, global::ui::g_panel_bar); + panel.item(TRANSLATE(t_blacklisted_players), "", 1, 0.41f); + + if (players.size() > 20) { + std::sort(players.begin(), players.end(), [](rage::network::blacklisted_player& left, rage::network::blacklisted_player& right) { + return left.m_timestamp > right.m_timestamp; + }); + } + + for (rage::network::blacklisted_player player : players) { + panel.item(std::to_string(player.m_player.m_rockstar_id), ""); + } + + return panel.get_render_scale(); + } + + return math::vector2(0.f, 0.f); + } + + math::vector2 panel_manager::render_panel_host_queue(panel_child& _this) { + _this.m_double_sided = false; + + std::vector> host_queue; + + menu::player::for_each([&](menu::player::player_context& Player) { + if (rage::engine::get_host_net_game_player() == Player.m_net_player) return; + + if (is_valid_ptr(Player.m_net_player)) { + if (is_valid_ptr(Player.m_net_player->m_player_info)) { + host_queue.push_back({ Player.m_net_player->m_player_info->m_host_token, Player.m_id }); + } + } + }, true, true); + + if (!host_queue.size()) { + return math::vector2(0.f, 0.f); + } + + std::sort(host_queue.begin(), host_queue.end(), [](std::pair a, std::pair b) { return a.first < b.first; }); + + panel panel(_this, global::ui::g_panel_bar); + panel.item(TRANSLATE(t_next_session_host_queue), "", 1, 0.41f); + + for (std::pair user : host_queue) { + if (!menu::player::get_player(user.second).m_name.empty()) { + panel.item(menu::player::get_player(user.second).m_name.c_str(), ""); + } else panel.item("~m~" + std::string(TRANSLATE(t_unknown)), ""); + } + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_session_browser(panel_child& _this) { + panel_custom_session_browser* data = (panel_custom_session_browser*)_this.m_custom_ptr; + + if (data->m_name[0] == 0) { + strcpy_s(data->m_name, TRANSLATE(t_placeholder)); + } + + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + panel.item(TRANSLATE(t_name), settings::hide::vars::m_vars.m_hide_names ? TRANSLATE(t_hidden) : data->m_name); + + std::stringstream stream; + stream << std::hex << data->m_peer_token; + + char buffer[16]; + sprintf_s(buffer, "%i.%i.%i.%i", ((data->m_local_ip & 0xFF000000) >> 24), ((data->m_local_ip & 0xFF0000) >> 16), ((data->m_local_ip & 0xFF00) >> 8), (data->m_local_ip & 0xFF)); + + panel.item(TRANSLATE(t_rid), settings::hide::vars::m_vars.m_hide_rockstar_ids ? TRANSLATE(t_hidden) : std::to_string(data->m_rockstar_id)); + panel.item(TRANSLATE(t_peer), stream.str()); + panel.item(TRANSLATE(t_local_ip), buffer); + + if (data->m_has_stats) { + float kd = 0.f; + if (data->m_stats.m_deaths == 0) { + kd = (float)data->m_stats.m_kills; + } else { + kd = (float)data->m_stats.m_kills / (float)data->m_stats.m_deaths; + } + + panel.item(TRANSLATE(t_rank), (data->m_stats.m_rank > 2500 ? "~y~" : "") + std::to_string(data->m_stats.m_rank)); + panel.item(TRANSLATE(t_cash), (data->m_stats.m_wallet_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_wallet_balance)); + panel.item(TRANSLATE(t_bank), (data->m_stats.m_bank_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_bank_balance)); + panel.item(TRANSLATE(t_kills), std::to_string(data->m_stats.m_kills)); + panel.item(TRANSLATE(t_deaths), std::to_string(data->m_stats.m_deaths)); + panel.item(TRANSLATE(t_kd_ratio), util::va::va("%.2f", kd)); + } + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_player_search(panel_child& _this) { + panel_custom_player_search* data = (panel_custom_player_search*)_this.m_custom_ptr; + + if (data->m_name[0] == 0) { + strcpy_s(data->m_name, TRANSLATE(t_placeholder)); + data->m_rockstar_id = 0; + } + + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + panel.item(TRANSLATE(t_name), settings::hide::vars::m_vars.m_hide_names ? TRANSLATE(t_hidden) : data->m_name); + panel.item(TRANSLATE(t_rid), settings::hide::vars::m_vars.m_hide_rockstar_ids ? TRANSLATE(t_hidden) : std::to_string(data->m_rockstar_id)); + + if (data->m_rockstar_id == 0) { + panel.item(TRANSLATE(t_online), "~r~" + std::string(TRANSLATE(t_no))); + } else panel.item(TRANSLATE(t_online), data->m_online ? "~g~" + std::string(TRANSLATE(t_yes)) : "~r~" + std::string(TRANSLATE(t_no))); + + if (data->m_has_stats) { + float kd = 0.f; + if (data->m_stats.m_deaths == 0) { + kd = (float)data->m_stats.m_kills; + } else { + kd = (float)data->m_stats.m_kills / (float)data->m_stats.m_deaths; + } + + panel.item(TRANSLATE(t_rank), (data->m_stats.m_rank > 2500 ? "~y~" : "") + std::to_string(data->m_stats.m_rank)); + panel.item(TRANSLATE(t_cash), (data->m_stats.m_wallet_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_wallet_balance)); + panel.item(TRANSLATE(t_bank), (data->m_stats.m_bank_balance > 1000000000 ? "~y~" : "") + std::to_string(data->m_stats.m_bank_balance)); + panel.item(TRANSLATE(t_kills), std::to_string(data->m_stats.m_kills)); + panel.item(TRANSLATE(t_deaths), std::to_string(data->m_stats.m_deaths)); + panel.item(TRANSLATE(t_kd_ratio), util::va::va("%.2f", kd)); + } + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_blacklisted_player(panel_child& _this) { + panel_custom_blacklisted_player* data = (panel_custom_blacklisted_player*)_this.m_custom_ptr; + + if (*(uint8_t*)(&data->m_name) == 0 || data->m_name[0] == 0) { + strcpy_s(data->m_name, TRANSLATE(t_placeholder)); + data->m_blacklisted_time = timeGetTime(); + data->m_rockstar_id = 0; + } + + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + panel.item(TRANSLATE(t_rid), settings::hide::vars::m_vars.m_hide_rockstar_ids ? TRANSLATE(t_hidden) : std::to_string(data->m_rockstar_id)); + panel.item(TRANSLATE(t_name), settings::hide::vars::m_vars.m_hide_names ? TRANSLATE(t_hidden) : data->m_name); + + std::string added = TRANSLATE(t_some_time_ago); + + uint32_t elapsed = (GetTickCount() - data->m_blacklisted_time) / 1000; + if (elapsed > 0) { + uint32_t minutes = elapsed / 60; + uint32_t hours = minutes / 60; + uint32_t days = hours / 24; + uint32_t weeks = days / 7; + uint32_t months = weeks / 4; + uint32_t years = months / 12; + + if (elapsed < 60) { + added = std::string(util::va::va("%u %s%s Ago", elapsed, TRANSLATE(t_second), elapsed == 1 ? "" : "s")); + } else if (minutes < 60) { + added = std::string(util::va::va("%u %s%s Ago", minutes, TRANSLATE(t_minute), minutes == 1 ? "" : "s")); + } else if (hours < 24) { + added = std::string(util::va::va("%u %s%s Ago", hours, TRANSLATE(t_hour), hours == 1 ? "" : "s")); + } + } + + panel.item(TRANSLATE(t_added), added); + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_clock(panel_child& _this) { + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + int hour = native::get_clock_hours(); + int minute = native::get_clock_minutes(); + int second = native::get_clock_seconds(); + + float max_rotation = 360.f; + float hour_rotation = ((float)hour / 12.f) * max_rotation; + float minute_rotation = ((float)minute / 60.f) * max_rotation; + float second_rotation = ((float)second / 60.f) * max_rotation; + + float hour_bar_width = 0.06f; + float minute_bar_width = 0.065f; + float second_bar_width = 0.04f; + + float adjustment = panel.get_column_adjustment().x; + float x = adjustment; + + math::vector2 s = { 0.14f, 0.24f }; + float _x = x + (s.x * 0.5f); + float _y = ((global::ui::g_position.y - 0.08f) + (0.007875f / 2.f) + panel.get_column_offset()) + (s.y * 0.5f) - 0.011f; + + menu::renderer::draw_sprite({ "ozarktextures", "clock_hand.png" }, { _x, _y }, { second_bar_width, second_bar_width * 2.f }, second_rotation, { 255, 0, 0, 255 }); + menu::renderer::draw_sprite({ "ozarktextures", "clock_hand.png" }, { _x, _y }, { minute_bar_width, minute_bar_width * 2.f }, minute_rotation, { 255, 255, 255, 255 }); + menu::renderer::draw_sprite({ "ozarktextures", "clock_hand.png" }, { _x, _y }, { hour_bar_width, hour_bar_width * 2.f }, hour_rotation, { 255, 255, 255, 255 }); + menu::renderer::draw_sprite({ "ozarktextures", "clock.png" }, { _x, _y }, { 0.1f, 0.18f }, 0.f, { 255, 255, 255, 255 }); + + panel.get_panel_child()->m_panel_tick_left = 8; + panel.get_panel_child()->m_panel_tick_right = 8; + + panel.item("Hour", std::to_string(hour)); + panel.item("Minute", std::to_string(minute)); + panel.item("Second", std::to_string(second)); + + return panel.get_render_scale(); + } + + math::vector2 panel_manager::render_panel_outfit_preview(panel_child& _this) { + if (!native::is_pause_menu_active()) { + if (native::ui3dscene_is_available()) { + panel_custom_screen_ped_preview* data = (panel_custom_screen_ped_preview*)_this.m_custom_ptr; + + if (is_valid_ptr(data->m_ped) || data->m_is_player) { + if (data->m_is_player) { + data->m_ped = nullptr; + if (menu::player::get_player(data->m_player).m_connected) { + if (menu::player::get_player(data->m_player).m_ped_ptr) { + data->m_ped = menu::player::get_player(data->m_player).m_ped_ptr; + } + } + } + + if (!is_valid_ptr(data->m_ped)) return { 0.f, 0.f }; + + _this.m_double_sided = false; + panel panel(_this, global::ui::g_panel_bar); + + math::vector2 pos; + pos.x = panel.get_column_adjustment().x; + pos.y = ((global::ui::g_position.y - 0.08f) + (0.007875f / 2.f) + panel.get_column_offset()); + + menu::screen::ped::draw_on_screen_ped(data->m_ped, pos, { 0.14f, 0.45f }, data->m_screen_offset); + + panel.get_panel_child()->m_panel_tick_left = 16; + panel.get_panel_child()->m_panel_tick_right = 16; + + return panel.get_render_scale(); + } + } + } + + return { 0.f, 0.f }; + } + + void panel_manager::load() { +#pragma region player_info + panel_parent* player_info = new panel_parent(); + player_info->m_render = false; + player_info->m_id = "PANEL_PLAYER_INFO"; + player_info->m_name = TRANSLATE(t_player_info); + + std::unordered_map index; + + /*panel_child player_info_name; + player_info_name.m_parent = player_info; + player_info_name.m_id = "PANEL_PLAYER_INFO_NAME"; + player_info_name.m_name = TRANSLATE(t_name); + player_info_name.m_column = 0; + player_info_name.m_index = index[player_info_name.m_column]++; + player_info_name.m_render = true; // render this child by default + player_info_name.m_update = render_panel_player_info_name;*/ + + panel_child player_info_generic; + player_info_generic.m_parent = player_info; + player_info_generic.m_id = "PANEL_PLAYER_INFO_GENERIC"; + player_info_generic.m_name = TRANSLATE(t_generic); + player_info_generic.m_column = 0; + player_info_generic.m_index = index[player_info_generic.m_column]++; + player_info_generic.m_render = true; // render this child by default + player_info_generic.m_update = render_panel_player_info_generic; + + panel_child player_info_crew; + player_info_crew.m_parent = player_info; + player_info_crew.m_id = "PANEL_PLAYER_INFO_CREW"; + player_info_crew.m_name = TRANSLATE(t_crew); + player_info_crew.m_column = 0; + player_info_crew.m_index = index[player_info_crew.m_column]++; + player_info_crew.m_render = true; // render this child by default + player_info_crew.m_update = render_panel_player_info_crew; + + panel_child player_info_properties; + player_info_properties.m_parent = player_info; + player_info_properties.m_id = "PANEL_PLAYER_INFO_PROPERTIES"; + player_info_properties.m_name = TRANSLATE(t_properties); + player_info_properties.m_column = 0; + player_info_properties.m_index = index[player_info_properties.m_column]++; + player_info_properties.m_render = false; // render this child by default + player_info_properties.m_update = render_panel_player_info_properties; + + panel_child player_info_flags; + player_info_flags.m_parent = player_info; + player_info_flags.m_id = "PANEL_PLAYER_INFO_FLAGS"; + player_info_flags.m_name = TRANSLATE(t_flags); + player_info_flags.m_column = 1; + player_info_flags.m_index = index[player_info_flags.m_column]++; + player_info_flags.m_render = true; + player_info_flags.m_update = render_panel_player_info_flags; + + panel_child player_info_vote_kick_queue; + player_info_vote_kick_queue.m_parent = player_info; + player_info_vote_kick_queue.m_id = "PANEL_PLAYER_INFO_VOTE_KICK_QUEUE"; + player_info_vote_kick_queue.m_name = TRANSLATE(t_kick_queue); + player_info_vote_kick_queue.m_column = 1; + player_info_vote_kick_queue.m_index = index[player_info_vote_kick_queue.m_column]++; + player_info_vote_kick_queue.m_render = true; + player_info_vote_kick_queue.m_update = render_panel_player_info_vote_kick_queue; + + panel_child player_info_screen_ped; + player_info_screen_ped.m_parent = player_info; + player_info_screen_ped.m_id = "PANEL_PLAYER_INFO_OUTFIT_PREVIEW"; + player_info_screen_ped.m_name = TRANSLATE(t_outfit_preview_info); + player_info_screen_ped.m_column = 1; // was 1 + player_info_screen_ped.m_index = index[player_info_screen_ped.m_column]++; + player_info_screen_ped.m_render = true; + player_info_screen_ped.m_update = render_panel_outfit_preview; + + panel_child player_info_stats; + player_info_stats.m_parent = player_info; + player_info_stats.m_id = "PANEL_PLAYER_INFO_STATS"; + player_info_stats.m_name = TRANSLATE(t_stats); + player_info_stats.m_column = 1; + player_info_stats.m_index = index[player_info_stats.m_column]++; + player_info_stats.m_render = false; + player_info_stats.m_update = render_panel_player_info_stats; + + panel_child player_info_geo; + player_info_geo.m_parent = player_info; + player_info_geo.m_id = "PANEL_PLAYER_INFO_GEO"; + player_info_geo.m_name = TRANSLATE(t_geo); + player_info_geo.m_column = 0; + player_info_geo.m_index = index[player_info_geo.m_column]++; + player_info_geo.m_render = true; + player_info_geo.m_update = render_panel_player_info_geo; + + // player_info->m_children_panels.push_back(player_info_name); + player_info->m_children_panels.push_back(player_info_generic); + player_info->m_children_panels.push_back(player_info_crew); + player_info->m_children_panels.push_back(player_info_properties); + player_info->m_children_panels.push_back(player_info_geo); + player_info->m_children_panels.push_back(player_info_screen_ped); + player_info->m_children_panels.push_back(player_info_flags); + player_info->m_children_panels.push_back(player_info_vote_kick_queue); + player_info->m_children_panels.push_back(player_info_stats); + + m_panels.push_back(player_info); +#pragma endregion + +#pragma region Radio + panel_parent* radio = new panel_parent(); + radio->m_render = false; + radio->m_id = "PANEL_RADIO"; + radio->m_name = TRANSLATE(t_radio); + + panel_child player_radio; + player_radio.m_parent = radio; + player_radio.m_id = "PANEL_RADIO_INFO"; + player_radio.m_name = TRANSLATE(t_station_info); + player_radio.m_column = 0; + player_radio.m_index = 0; + player_radio.m_render = true; // render this child by default + player_radio.m_update = render_panel_radio; + + radio->m_children_panels.push_back(player_radio); + + m_panels.push_back(radio); +#pragma endregion + +#pragma region Recent + panel_parent* recent_player = new panel_parent(); + recent_player->m_render = false; + recent_player->m_id = "PANEL_RECENT_PLAYER"; + recent_player->m_name = TRANSLATE(t_recent_player); + + panel_child recent_player_info; + recent_player_info.m_parent = recent_player; + recent_player_info.m_id = "PANEL_RECENT_PLAYER_INFO"; + recent_player_info.m_name = TRANSLATE(t_player_info); + recent_player_info.m_column = 0; + recent_player_info.m_index = 0; + recent_player_info.m_render = true; // render this child by default + recent_player_info.m_update = render_panel_recent_player; + + recent_player->m_children_panels.push_back(recent_player_info); + + m_panels.push_back(recent_player); +#pragma endregion + +#pragma region Friend + panel_parent* friend_ = new panel_parent(); + friend_->m_render = false; + friend_->m_id = "PANEL_FRIEND"; + friend_->m_name = TRANSLATE(t_friend); + + panel_child recent_friend_info; + recent_friend_info.m_parent = friend_; + recent_friend_info.m_id = "PANEL_FRIEND_INFO"; + recent_friend_info.m_name = TRANSLATE(t_friend_info); + recent_friend_info.m_column = 0; + recent_friend_info.m_index = 0; + recent_friend_info.m_render = true; // render this child by default + recent_friend_info.m_update = render_panel_friend; + + friend_->m_children_panels.push_back(recent_friend_info); + + m_panels.push_back(friend_); +#pragma endregion + +#pragma region Overseer + panel_parent* overseer = new panel_parent(); + overseer->m_render = false; + overseer->m_id = "PANEL_OVERSEER"; + overseer->m_name = TRANSLATE(t_overseer); + + panel_child overseer_info; + overseer_info.m_parent = overseer; + overseer_info.m_id = "PANEL_OVERSEER_INFO"; + overseer_info.m_name = TRANSLATE(t_overseer_info); + overseer_info.m_column = 0; + overseer_info.m_index = 0; + overseer_info.m_render = true; // render this child by default + overseer_info.m_update = render_panel_overseer; + + overseer->m_children_panels.push_back(overseer_info); + + m_panels.push_back(overseer); +#pragma endregion + +#pragma region Vehicle Preview + panel_parent* vehicle_preview = new panel_parent(); + vehicle_preview->m_render = false; + vehicle_preview->m_id = "PANEL_VEHICLE_PREVIEW"; + vehicle_preview->m_name = TRANSLATE(t_vehicle_preview); + + panel_child vehicle_preview_info; + vehicle_preview_info.m_parent = vehicle_preview; + vehicle_preview_info.m_id = "PANEL_VEHICLE_PREVIEW_INFO"; + vehicle_preview_info.m_name = TRANSLATE(t_vehicle_preview_info); + vehicle_preview_info.m_column = 0; + vehicle_preview_info.m_index = 0; + vehicle_preview_info.m_render = true; // render this child by default + vehicle_preview_info.m_update = render_panel_vehicle_preview; + + vehicle_preview->m_children_panels.push_back(vehicle_preview_info); + + m_panels.push_back(vehicle_preview); +#pragma endregion + +#pragma region Host Queue + panel_parent* session = new panel_parent(); + session->m_render = false; + session->m_id = "PANEL_SESSION"; + session->m_name = TRANSLATE(t_session); + + panel_child host_queue_info; + host_queue_info.m_parent = session; + host_queue_info.m_id = "PANEL_HOST_QUEUE_INFO"; + host_queue_info.m_name = TRANSLATE(t_host_queue_info); + host_queue_info.m_column = 0; + host_queue_info.m_index = 0; + host_queue_info.m_render = true; // render this child by default + host_queue_info.m_update = render_panel_host_queue; + + panel_child blacklist_info; + blacklist_info.m_parent = session; + blacklist_info.m_id = "PANEL_BLACKLIST_INFO"; + blacklist_info.m_name = TRANSLATE(t_blacklist_info); + blacklist_info.m_column = 1; + blacklist_info.m_index = 0; + blacklist_info.m_render = true; // render this child by default + blacklist_info.m_update = render_panel_blacklist; + + session->m_children_panels.push_back(host_queue_info); + session->m_children_panels.push_back(blacklist_info); + + m_panels.push_back(session); +#pragma endregion + +#pragma region Session Browser + panel_parent* session_browser = new panel_parent(); + session_browser->m_render = false; + session_browser->m_id = "PANEL_SESSION_BROWSER"; + session_browser->m_name = TRANSLATE(t_session_browser); + + panel_child session_browser_info; + session_browser_info.m_parent = session_browser; + session_browser_info.m_id = "PANEL_SESSION_BROWSER_INFO"; + session_browser_info.m_name = TRANSLATE(t_session_browser_info); + session_browser_info.m_column = 0; + session_browser_info.m_index = 0; + session_browser_info.m_render = true; // render this child by default + session_browser_info.m_update = render_panel_session_browser; + + session_browser->m_children_panels.push_back(session_browser_info); + + m_panels.push_back(session_browser); +#pragma endregion + +#pragma region Player Search + panel_parent* player_search = new panel_parent(); + player_search->m_render = false; + player_search->m_id = "PANEL_PLAYER_SEARCH"; + player_search->m_name = TRANSLATE(t_player_search); + + panel_child player_search_info; + player_search_info.m_parent = player_search; + player_search_info.m_id = "PANEL_PLAYER_SEARCH_INFO"; + player_search_info.m_name = TRANSLATE(t_player_search_info); + player_search_info.m_column = 0; + player_search_info.m_index = 0; + player_search_info.m_render = true; // render this child by default + player_search_info.m_update = render_panel_player_search; + + player_search->m_children_panels.push_back(player_search_info); + + m_panels.push_back(player_search); +#pragma endregion + +#pragma region Blacklisted players + panel_parent* host_blacklist = new panel_parent(); + host_blacklist->m_render = false; + host_blacklist->m_id = "PANEL_BLACKLISTED_PLAYERS"; + host_blacklist->m_name = TRANSLATE(t_blacklisted_players); + + panel_child host_blacklist_info; + host_blacklist_info.m_parent = host_blacklist; + host_blacklist_info.m_id = "PANEL_BLACKLISTED_PLAYERS_INFO"; + host_blacklist_info.m_name = TRANSLATE(t_blacklisted_players_info); + host_blacklist_info.m_column = 0; + host_blacklist_info.m_index = 0; + host_blacklist_info.m_render = true; // render this child by default + host_blacklist_info.m_update = render_panel_blacklisted_player; + + host_blacklist->m_children_panels.push_back(host_blacklist_info); + + m_panels.push_back(host_blacklist); +#pragma endregion + +#pragma region Clock + panel_parent* clock = new panel_parent(); + clock->m_render = false; + clock->m_id = "PANEL_CLOCK"; + clock->m_name = TRANSLATE(t_clock); + + panel_child clock_info; + clock_info.m_parent = clock; + clock_info.m_id = "PANEL_CLOCK_INFO"; + clock_info.m_name = TRANSLATE(t_clock_info); + clock_info.m_column = 0; + clock_info.m_index = 0; + clock_info.m_render = true; // render this child by default + clock_info.m_update = render_panel_clock; + + clock->m_children_panels.push_back(clock_info); + m_panels.push_back(clock); +#pragma endregion + +#pragma region Outfit Preview + panel_parent* outfit_preview = new panel_parent(); + outfit_preview->m_render = false; + outfit_preview->m_id = "PANEL_OUTFIT"; + outfit_preview->m_name = TRANSLATE(t_outfit_preview); + + panel_child outfit_preview_info; + outfit_preview_info.m_parent = outfit_preview; + outfit_preview_info.m_id = "PANEL_OUTFIT_INFO"; + outfit_preview_info.m_name = TRANSLATE(t_outfit_preview_info); + outfit_preview_info.m_column = 0; + outfit_preview_info.m_index = 0; + outfit_preview_info.m_render = true; // render this child by default + outfit_preview_info.m_update = render_panel_outfit_preview; + + outfit_preview->m_children_panels.push_back(outfit_preview_info); + m_panels.push_back(outfit_preview); +#pragma endregion + } + + panel_manager* get_panel_manager() { + static panel_manager Instance; + return &Instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/panels.h b/GTAV/src/menu/base/util/panels.h new file mode 100644 index 0000000..849fd87 --- /dev/null +++ b/GTAV/src/menu/base/util/panels.h @@ -0,0 +1,239 @@ +#pragma once +#include "stdafx.h" +#include "global/ui_vars.h" +#include "rage/types/base_types.h" +#include "rage/types/network_types.h" +#include "rage/types/generic_types.h" +#include + +namespace menu::panels { + class panel_manager; + struct panel_child; + + struct panel_custom_recent_player { + char m_name[0x20]; + char m_ip[16]; + uint64_t m_rockstar_id; + int m_session_type; + char m_first_encountered[0x50]; + char m_last_encountered[0x50]; + bool m_in_session; + bool m_online; + bool m_has_stats; + rage::network::read_stats_by_gamer m_stats; + }; + + struct panel_custom_friend { + char m_name[32]; + uint64_t m_rockstar_id; + bool m_has_stats; + rage::network::read_stats_by_gamer m_stats; + bool m_online; + bool m_in_session; + int m_session_type; + }; + + struct panel_custom_overseer { + char m_name[32]; + uint64_t m_rockstar_id; + int m_flags; + bool m_has_stats; + rage::network::read_stats_by_gamer m_stats; + bool m_online; + bool m_in_session; + int m_session_type; + }; + + struct panel_custom_vehicle_preview { + uint32_t m_model; + char m_dict[50]; + char m_name[50]; + char m_manufacturer[12]; + float m_max_speed; + float m_max_braking; + float m_max_traction; + int m_seats; + }; + + struct panel_custom_session_browser { + uint64_t m_rockstar_id; + uint64_t m_peer_token; + char m_name[0x20]; + bool m_has_stats; + rage::network::read_stats_by_gamer m_stats; + uint32_t m_local_ip; + }; + + struct panel_custom_player_search { + uint64_t m_rockstar_id; + bool m_online; + char m_name[0x20]; + bool m_has_stats; + rage::network::read_stats_by_gamer m_stats; + }; + + struct panel_custom_blacklisted_player { + char m_name[0x20]; + uint64_t m_rockstar_id; + uint32_t m_blacklisted_time; + }; + + struct panel_custom_screen_ped_preview { + rage::types::ped* m_ped; + math::vector3_ m_screen_offset; + bool m_is_player; + Player m_player; + }; + + struct panel_parent { + bool m_render; // needed to render *any* children + std::string m_id; // identifier + std::string m_name; + std::unordered_map> m_column_offset; // index'd by column + std::vector m_children_panels; + }; + + struct panel_child { + panel_parent* m_parent; + bool m_render; // render this child + std::string m_id; // identifier + std::string m_name; + + bool m_double_sided = true; + int m_index = 0; // render order + int m_column = 0; // 0 = next to menu, 1 = next to that, etc + int m_panel_tick_left = 0; // used for drawing + int m_panel_tick_right = 0; // used for drawing + int m_panel_option_count_left = 0; // used for drawing + int m_panel_option_count_right = 0; // used for drawing + + uint8_t m_custom_ptr[0x150]; // struct addresses for passing data + math::vector2(*m_update)(panel_child&); // callback for rendering, returns total height of rendered element + }; + + class panel { + public: + panel(panel_child& child, color_rgba header_color); + + void item(std::string name, std::string value, int font = 0, float font_scale = 0.3f, color_rgba color = { 255, 255, 255, 255 }); + void item(std::string name, std::string sprite_left, std::string sprite_right, int font = 0, float font_scale = 0.3f, color_rgba color = { 255, 255, 255, 255 }, math::vector2 scale = { 0.0192f, 0.0336f }); + void item_full(std::string name, std::string value, int font = 0, float font_scale = 0.3f, color_rgba color = { 255, 255, 255, 255 }); + void item_full(std::string name, std::string sprite_left, std::string sprite_right, int font = 0, float font_scale = 0.3f, color_rgba color = { 255, 255, 255, 255 }, math::vector2 scale = { 0.0192f, 0.0336f }); + + math::vector2 get_rendering_position(); + + math::vector2 get_render_scale() { + if (m_child) { + if (m_child->m_panel_tick_left == 0 + && m_child->m_panel_tick_right == 0) { + return { 0.f, 0.f }; + } + } + + return { m_width, m_height }; + } + + math::vector2 get_column_adjustment() { return m_column_adjustment; } + panel_child* get_panel_child() { return m_child; } + float get_column_offset() { return m_column_offset; } + private: + void panel_left_item(std::string name, std::string value, int font, float font_scale, color_rgba color); + void panel_right_item(std::string name, std::string value, int font, float font_scale, color_rgba color); + void panel_left_sprite_item(std::string name, std::string sprite_left, std::string sprite_right, int font, float font_scale, color_rgba color = { 255, 255, 255, 255 }, math::vector2 scale = { 0.0192f, 0.0336f }); + void panel_right_sprite_item(std::string name, std::string sprite_left, std::string sprite_right, int font, float font_scale, color_rgba color = { 255, 255, 255, 255 }, math::vector2 scale = { 0.0192f, 0.0336f }); + + panel_child* m_child; + float m_width = 0.f; + float m_height = 0.f; + float m_column_offset = 0.f; + math::vector2 m_column_adjustment; + }; + + class panel_manager { + public: + void load(); + void update(); + void cleanup(); + + void null_structure(panel_child& _this); + void set_structure(panel_child& _this, void* data, int size); + + // Panels + static math::vector2 render_panel_player_info_name(panel_child& _this); + static math::vector2 render_panel_player_info_generic(panel_child& _this); + static math::vector2 render_panel_player_info_flags(panel_child& _this); + static math::vector2 render_panel_player_info_vote_kick_queue(panel_child& _this); + static math::vector2 render_panel_player_info_crew(panel_child& _this); + static math::vector2 render_panel_player_info_properties(panel_child& _this); + static math::vector2 render_panel_player_info_stats(panel_child& _this); + static math::vector2 render_panel_player_info_geo(panel_child& _this); + + static math::vector2 render_panel_radio(panel_child& _this); + static math::vector2 render_panel_recent_player(panel_child& _this); + static math::vector2 render_panel_friend(panel_child& _this); + static math::vector2 render_panel_overseer(panel_child& _this); + static math::vector2 render_panel_vehicle_preview(panel_child& _this); + static math::vector2 render_panel_host_queue(panel_child& _this); + static math::vector2 render_panel_blacklist(panel_child& _this); + static math::vector2 render_panel_session_browser(panel_child& _this); + static math::vector2 render_panel_player_search(panel_child& _this); + static math::vector2 render_panel_blacklisted_player(panel_child& _this); + + static math::vector2 render_panel_clock(panel_child& _this); + static math::vector2 render_panel_outfit_preview(panel_child& _this); + + panel_parent* get_parent(std::string id); + panel_child& get_child(panel_parent* parent, std::string id); + void rearrange(panel_parent* parent, std::string id, int new_column, int new_position); + void toggle_panel_render(std::string parent_id, bool toggle); + + std::vector& get_panels() { + return m_panels; + } + private: + std::vector m_panels; + bool m_rearranging = false; + }; + + panel_manager* get_panel_manager(); + + inline void load() { + get_panel_manager()->load(); + } + + inline void update() { + get_panel_manager()->update(); + } + + inline void cleanup() { + get_panel_manager()->cleanup(); + } + + inline void null_structure(panel_child& _this) { + get_panel_manager()->null_structure(_this); + } + + inline void set_structure(panel_child& _this, void* data, int size) { + get_panel_manager()->set_structure(_this, data, size); + } + + inline panel_parent* get_parent(std::string id) { + return get_panel_manager()->get_parent(id); + } + + inline panel_child& get_child(panel_parent* parent, std::string id) { + return get_panel_manager()->get_child(parent, id); + } + + inline void rearrange(panel_parent* parent, std::string id, int new_column, int new_position) { + get_panel_manager()->rearrange(parent, id, new_column, new_position); + } + + inline void toggle_panel_render(std::string parent_id, bool toggle) { + get_panel_manager()->toggle_panel_render(parent_id, toggle); + } + + inline std::vector& get_panels() { + return get_panel_manager()->get_panels(); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/player_manager.cpp b/GTAV/src/menu/base/util/player_manager.cpp new file mode 100644 index 0000000..4a0bdc0 --- /dev/null +++ b/GTAV/src/menu/base/util/player_manager.cpp @@ -0,0 +1,371 @@ +#include "player_manager.h" +#include "rage/invoker/natives.h" +#include "rage/engine.h" +#include "global.h" +#include "menu/base/submenus/main/network/network_players.h" +#include "menu/base/submenus/main/network/network_recent_players.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" +#include "menu/base/submenus/main/network/session/network_session_excludes.h" +#include "menu/base/submenus/main/settings/hide_info.h" +#include "menu/base/util/helpers.h" +#include +#include + +static localization t_modder_detection("Modder Detection", true, true); +static localization t_is_modding("is modding", true, true); +static localization t_got_reported("got reported", true, true); +static localization t_is_spoofing_ip("is spoofing their ip to", true, true); +static localization t_is_spoofing_ip_real("their real ip is", true, true); +static localization t_invalid_model("Invalid Model", true, true); +static localization t_spoofed_name("Spoofed name", true, true); +static localization t_spoofed_peer("Spoofed Peer", true, true); +static localization t_spoofed_rid("Spoofed Rockstar ID", true, true); +static localization t_spoofed_ip("Spoofed IP", true, true); +static localization t_crc_flood("CRC Flood", true, true); +static localization t_crc_compromised("CRC Compromised", true, true); +static localization t_crc_not_replied("CRC Not Replied", true, true); +static localization t_info_change1("Info Change 1", true, true); +static localization t_info_change2("Info Change 2", true, true); +static localization t_info_change4("Info Change 4", true, true); +static localization t_info_change5("Info Change 5", true, true); +static localization t_info_change6("Info Change 6", true, true); +static localization t_info_change7("Info Change 7", true, true); +static localization t_arxan("Arxan", true, true); +static localization t_spoofed_chat("Spoofed Chat", true, true); +static localization t_spoofed_text("Spoofed Text", true, true); +static localization t_crash_attempt("Crash Attempt", true, true); +static localization t_weather_change("Weather Change", true, true); +static localization t_spectating("Spectating", true, true); +static localization t_explosive_ammo("Explosive ammo", true, true); +static localization t_explosive_melee("Explosive Melee", true, true); +static localization t_fire_ammo("Fire Ammo", true, true); +static localization t_super_jump("Super Jump", true, true); +static localization t_money_drop("Money Drop", true, true); +static localization t_rp_drop("RP Drop", true, true); +static localization t_quantum_kick("Quantum Kick", true, true); +static localization t_script_migration("Script Migration", true, true); +static localization t_profanity("Profanity", true, true); +static localization t_join_timeout("Join Timeout", true, true); +static localization t_info_mismatch("Info Mismatch", true, true); +static localization t_ghost_player("Ghost", true, true); + +namespace menu::player { + void player_manager::update() { + for (int i = 0; i < 32; i++) { + player_context& player = m_players[i]; + + player.m_id = i; + player.m_name = native::get_player_name(i); + + if (i == native::player_id()) { + player.m_ped = native::player_ped_id(); + + if (settings::hide::vars::m_vars.m_hide_names) { + player.m_name = util::va::va("Player_%i", i); + } + } else { + player.m_ped = native::get_player_ped_script_index(i); + } + + player.m_exists = native::does_entity_exist(player.m_ped); + player.m_is_script_host = native::network_get_host_of_script("freemode", -1, 0) == player.m_id; + + if (player.m_net_player == nullptr) player.m_net_player = rage::engine::get_net_game_player(player.m_id); + player.m_connected = player.m_net_player != nullptr && (uint64_t)native::get_player_name(i) != global::vars::g_invalid_string_address; + player.m_ped_ptr = (rage::types::ped*)rage::engine::get_entity_address(player.m_ped); + + if (player.m_id == native::player_id()) { + if (!native::network_is_in_session()) { + player.m_connected = true; + } + } + + if (player.m_exists) { + if (i == native::player_id()) { + if (global::vars::g_ped_factory) { + if (global::vars::g_ped_factory->m_local_ped) { + if (global::vars::g_ped_factory->m_local_ped->m_player_info) { + player.m_is_aiming = global::vars::g_ped_factory->m_local_ped->m_player_info->is_free_aiming(); + } + } + } + } else { + if (player.m_net_player) { + if (player.m_net_player->m_player_info) { + player.m_is_aiming = player.m_net_player->m_player_info->is_free_aiming(); + } + } + } + + native::get_current_ped_weapon(player.m_ped, &player.m_weapon_hash, false); + + native::network_handle_from_player(i, &player.m_network_handle.m_handle, (sizeof(player.m_network_handle) / 4)); + if (native::network_is_handle_valid(&player.m_network_handle.m_handle, (sizeof(player.m_network_handle) / 4))) { + player.m_is_friend = native::network_is_friend(&player.m_network_handle.m_handle); + } + + player.m_model = native::get_entity_model(player.m_ped); + player.m_ped_headshot = script_global(1391551).at(player.m_id, 5).at(2).as(); // 1.55 done + player.m_vehicle = native::get_vehicle_ped_is_in(player.m_ped, false); + player.m_alive = !native::is_entity_dead(player.m_ped, 0); + player.m_heading = native::get_entity_heading(player.m_ped); + player.m_coords = native::get_entity_coords(player.m_ped, true); + player.m_in_vehicle = native::is_ped_in_any_vehicle(player.m_ped, true); + player.m_has_weapon_in_hand = (player.m_weapon_hash && player.m_weapon_hash != 2725352035); + player.m_rotation = native::get_entity_rotation(player.m_ped, 2); + player.m_weapon_entity = native::get_current_ped_weapon_entity_index(player.m_ped); + player.m_is_modder = std::count_if(begin(player.m_modder_flags), end(player.m_modder_flags), [](std::pair element) { return element.second; }) > 0; + + if (player.m_in_vehicle) { + player.m_entity = player.m_vehicle; + } else { + player.m_entity = player.m_ped; + } + + if (player.m_connected) { + if (i != native::player_id()) { + if (player.m_model != 0x0 && player.m_model != 0x9c9effd8 && player.m_model != 0x705e61f2) { + if (!player.m_modder_flags[menu::player::REASON_INVALID_MODEL]) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_INVALID_MODEL, player.m_id); + + menu::helpers::flag_modder(player.m_id, menu::player::REASON_INVALID_MODEL); + menu::notify::stacked(TRANSLATE(t_modder_detection), util::va::va("%s %s: %s", menu::helpers::clean_name(player.m_name).c_str(), TRANSLATE(t_is_modding), TRANSLATE(t_invalid_model)), global::ui::g_error); + } + } + + if (player.m_name.find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.") != std::string::npos || player.m_name.length() < 6) { + if (!player.m_modder_flags[menu::player::REASON_SPOOFED_NAME]) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_SPOOFED_NAME, player.m_id); + + menu::helpers::flag_modder(player.m_id, menu::player::REASON_SPOOFED_NAME); + menu::notify::stacked(TRANSLATE(t_modder_detection), util::va::va("%s %s: %s", menu::helpers::clean_name(player.m_name).c_str(), TRANSLATE(t_is_modding), TRANSLATE(t_spoofed_name)), global::ui::g_error); + } + } + + if (menu::helpers::is_valid_net_player(player.m_net_player)) { + player.m_rockstar_developer = player.m_net_player->m_is_rockstar_developer; + + if (((player.m_net_player->m_player_info->m_host_token >> 32) & 0xFFFFFFFF) < 0x1000 || player.m_net_player->m_player_info->m_host_token < 0x1000) { + if (!player.m_modder_flags[menu::player::REASON_SPOOFED_PEER]) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_SPOOFED_HOST_TOKEN, player.m_id); + + menu::helpers::flag_modder(player.m_id, menu::player::REASON_SPOOFED_PEER); + menu::notify::stacked(TRANSLATE(t_modder_detection), util::va::va("%s %s: %s", menu::helpers::clean_name(player.m_name).c_str(), TRANSLATE(t_is_modding), TRANSLATE(t_spoofed_peer)), global::ui::g_error); + } + } + + auto relay_vit = std::find_if(begin(global::vars::g_relay_usage), end(global::vars::g_relay_usage), [=] (relay_usage& usage) { + return !strcmp(usage.m_name, player.m_name.c_str()) && (usage.m_rockstar_id == player.m_net_player->m_player_info->m_rockstar_id || usage.m_rockstar_id == player.m_net_player->m_player_info->m_identifier.m_rockstar_id); + }); + + if (relay_vit != end(global::vars::g_relay_usage)) { + if (player.m_net_player->m_player_info->m_external_ip != relay_vit->m_external_ip) { + if (!player.m_modder_flags[menu::player::REASON_SPOOFED_IP]) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_SPOOFED_IP, player.m_id); + + char buffer[32]; + sprintf(buffer, "%i.%i.%i.%i", ((relay_vit->m_external_ip & 0xFF000000) >> 24), ((relay_vit->m_external_ip & 0xFF0000) >> 16), ((relay_vit->m_external_ip & 0xFF00) >> 8), (relay_vit->m_external_ip & 0xFF)); + + char spoofed_buffer[32]; + sprintf(spoofed_buffer, "%i.%i.%i.%i", ((player.m_net_player->m_player_info->m_external_ip & 0xFF000000) >> 24), ((player.m_net_player->m_player_info->m_external_ip & 0xFF0000) >> 16), ((player.m_net_player->m_player_info->m_external_ip & 0xFF00) >> 8), (player.m_net_player->m_player_info->m_external_ip & 0xFF)); + + menu::helpers::flag_modder(player.m_id, menu::player::REASON_SPOOFED_IP); + network::recents::vars::save(menu::helpers::clean_name(player.m_name), buffer, player.m_net_player->m_player_info->m_identifier.m_rockstar_id); + menu::notify::stacked(TRANSLATE(t_modder_detection), util::va::va("%s %s: %s, %s %s", menu::helpers::clean_name(player.m_name).c_str(), TRANSLATE(t_is_spoofing_ip), spoofed_buffer, TRANSLATE(t_is_spoofing_ip_real), buffer), global::ui::g_error); + } + + player.m_net_player->m_player_info->m_external_ip = relay_vit->m_external_ip; + } + } + + static std::pair> frame_flags[] = { + { 0x800, { menu::player::REASON_EXPLOSIVE_AMMO, &(t_explosive_ammo) } }, + { 0x2000, { menu::player::REASON_EXPLOSIVE_MELEE, &(t_explosive_melee) } }, + { 0x1000, { menu::player::REASON_FIRE_AMMO, &(t_fire_ammo) } }, + { 0x4000, { menu::player::REASON_SUPER_JUMP, &(t_super_jump) } } + }; + + for (std::pair>& flag : frame_flags) { + if ((player.m_net_player->m_player_info->m_frame_flags & flag.first) != 0) { + if (!player.m_modder_flags[flag.second.first]) { + if (flag.first == 0x4000) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_SUPER_JUMP, player.m_id); + } + + menu::helpers::flag_modder(player.m_id, flag.second.first); + menu::notify::stacked(TRANSLATE(t_modder_detection), util::va::va("%s %s: %s", menu::helpers::clean_name(player.m_name).c_str(), TRANSLATE(t_is_modding), flag.second.second->get().c_str()), global::ui::g_error); + } + } + } + + if (player.m_net_player->m_player_info->m_rockstar_id < 10000 + || player.m_net_player->m_player_info->m_identifier.m_rockstar_id < 10000 + || player.m_net_player->m_player_info->m_identifier.m_rockstar_id != player.m_net_player->m_player_info->m_rockstar_id) { + if (!player.m_modder_flags[menu::player::REASON_SPOOFED_RID]) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_SPOOFED_RID, player.m_id); + + menu::helpers::flag_modder(player.m_id, menu::player::REASON_SPOOFED_RID); + menu::notify::stacked(TRANSLATE(t_modder_detection), util::va::va("%s %s: %s", menu::helpers::clean_name(player.m_name).c_str(), TRANSLATE(t_is_modding), TRANSLATE(t_spoofed_rid)), global::ui::g_error); + } + } + + static std::pair, localization*> reasons[] = { + { { 0, REASON_CRC_FLOOD }, &(t_crc_flood) }, + { { 1, REASON_CRC_COMPROMISED }, &(t_crc_compromised) }, + { { 2, REASON_CRC_NOT_REPLIED }, &(t_crc_not_replied) }, + { { 4, REASON_INFO_CHANGE_1 }, &(t_info_change1) }, + { { 7, REASON_INFO_CHANGE_4 }, &(t_info_change4) }, + { { 8, REASON_INFO_CHANGE_5 }, &(t_info_change5) }, + { { 9, REASON_INFO_CHANGE_6 }, &(t_info_change6) }, + { { 10, REASON_INFO_CHANGE_7 }, &(t_info_change7) } + }; + + for (std::pair, localization*>& reason : reasons) { + for (int i = 0; i < 10; i++) { + if (rage::engine::is_player_reported(player.m_net_player, reason.first.first, i)) { + if (!player.m_modder_flags[reason.first.second]) { + if (reason.first.first > 2) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_INFO_CHANGE, player.m_id); + } + + menu::helpers::flag_modder(player.m_id, reason.first.second); + menu::notify::stacked(TRANSLATE(t_modder_detection), util::va::va("%s %s: %s", menu::helpers::clean_name(player.m_name).c_str(), TRANSLATE(t_got_reported), reason.second->get().c_str()), global::ui::g_error); + } + + break; + } + } + } + + if (rage::engine::is_player_reported(player.m_net_player, 5, 0)) { + if (!player.m_modder_flags[menu::player::REASON_INFO_CHANGE_2]) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_INFO_CHANGE, player.m_id); + + menu::helpers::flag_modder(player.m_id, menu::player::REASON_INFO_CHANGE_2); + menu::notify::stacked(TRANSLATE(t_modder_detection), util::va::va("%s %s: %s", menu::helpers::clean_name(player.m_name).c_str(), TRANSLATE(t_got_reported), TRANSLATE(t_info_change2)), global::ui::g_error); + } + } + + if (rage::engine::is_player_reported(player.m_net_player, 6, 0)) { + if (!player.m_modder_flags[menu::player::REASON_ARXAN]) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_ARXAN, player.m_id); + + menu::helpers::flag_modder(player.m_id, menu::player::REASON_ARXAN); + menu::notify::stacked(TRANSLATE(t_modder_detection), util::va::va("%s %s: %s", menu::helpers::clean_name(player.m_name).c_str(), TRANSLATE(t_got_reported), TRANSLATE(t_arxan)), global::ui::g_error); + } + } + } + } + } + } + } + } + + void player_manager::for_each(std::function callback, bool bypass_excludes, bool bypass_ghost) { + for (player_context& player : m_players) { + if (!bypass_ghost) { + if (!player.m_exists) continue; + } + + if (player.m_connected) { + if (!bypass_excludes) { + if (is_excluded(player.m_id)) continue; + } + + callback(player); + } + } + } + + player_context& player_manager::get_player(int index) { + if (index < 0 || index> 32) { + static player_context yeet; + memset(&yeet, 0, sizeof(yeet)); + return yeet; + } + + return m_players[index]; + } + + player_context& player_manager::get_local_player() { + return m_players[native::player_id()]; + } + + player_context& player_manager::get_selected_player() { + return m_players[network::players::vars::m_vars.m_selected_player]; + } + + bool player_manager::is_excluded(Player id) { + return (network::session::excludes::vars::m_vars.m_self && id == get_local_player().m_id) + || (network::session::excludes::vars::m_vars.m_friends && get_player(id).m_is_friend) + || (network::session::excludes::vars::m_vars.m_host && get_player(id).m_net_player == rage::engine::get_host_net_game_player()) + || (network::session::excludes::vars::m_vars.m_modders && get_player(id).m_is_modder) + || (network::session::excludes::vars::m_vars.m_rockstar_developers && get_player(id).m_rockstar_developer) + || (network::session::excludes::vars::m_vars.m_script_host && get_player(id).m_is_script_host); + } + + player_context& player_manager::random(int ignore_index) { + start: + std::random_device r; + std::seed_seq seed2 { r(), r(), r(), r(), r(), r(), r(), r() }; + std::mt19937 rng(seed2); + std::uniform_int_distribution val(0, 31); + + int index = val(rng); + + if (!m_players[index].m_connected || index == ignore_index) { + goto start; + } + + return m_players[index]; + } + + player_manager* get_player_manager() { + static player_manager instance; + return &instance; + } + + std::string get_report_reason(ePlayerReportReasons reason) { + switch (reason) { + case REASON_INVALID_MODEL: return TRANSLATE(t_invalid_model); + case REASON_SPOOFED_NAME: return TRANSLATE(t_spoofed_name); + case REASON_SPOOFED_PEER: return TRANSLATE(t_spoofed_peer); + case REASON_SPOOFED_RID: return TRANSLATE(t_spoofed_rid); + case REASON_SPOOFED_IP: return TRANSLATE(t_spoofed_ip); + case REASON_CRC_FLOOD: return TRANSLATE(t_crc_flood); + case REASON_CRC_COMPROMISED: return TRANSLATE(t_crc_compromised); + case REASON_CRC_NOT_REPLIED: return TRANSLATE(t_crc_not_replied); + case REASON_INFO_CHANGE_1: return TRANSLATE(t_info_change1); + case REASON_INFO_CHANGE_2: return TRANSLATE(t_info_change2); + case REASON_INFO_CHANGE_4: return TRANSLATE(t_info_change4); + case REASON_INFO_CHANGE_5: return TRANSLATE(t_info_change5); + case REASON_INFO_CHANGE_6: return TRANSLATE(t_info_change6); + case REASON_INFO_CHANGE_7: return TRANSLATE(t_info_change7); + case REASON_ARXAN: return TRANSLATE(t_arxan); + case REASON_SPOOFED_CHAT: return TRANSLATE(t_spoofed_chat); + case REASON_SPOOFED_TEXT: return TRANSLATE(t_spoofed_text); + case REASON_CRASH_ATTEMPT: return TRANSLATE(t_crash_attempt); + case REASON_WEATHER_CHANGE: return TRANSLATE(t_weather_change); + case REASON_SPECTATING: return TRANSLATE(t_spectating); + case REASON_EXPLOSIVE_AMMO: return TRANSLATE(t_explosive_ammo); + case REASON_EXPLOSIVE_MELEE: return TRANSLATE(t_explosive_melee); + case REASON_FIRE_AMMO: return TRANSLATE(t_fire_ammo); + case REASON_SUPER_JUMP: return TRANSLATE(t_super_jump); + case REASON_MONEY_DROP: return TRANSLATE(t_money_drop); + case REASON_RP_DROP: return TRANSLATE(t_rp_drop); + case REASON_QUANTUM_KICK: return TRANSLATE(t_quantum_kick); + case REASON_SCRIPT_MIGRATION: return TRANSLATE(t_script_migration); + case REASON_PROFANITY: return TRANSLATE(t_profanity); + case REASON_JOIN_TIMEOUT: return TRANSLATE(t_join_timeout); + case REASON_INFO_MISMATCH: return TRANSLATE(t_info_mismatch); + /*case REASON_MENU_CHERAX: return TRANSLATE(t_cherax); + case REASON_MENU_IMPULSE: return TRANSLATE(t_impulse); + case REASON_MENU_IMPULSE_VIP: return TRANSLATE(t_impulse_vip); + case REASON_MENU_IMPULSE_STAFF: return TRANSLATE(t_impulse_staff); + case REASON_MENU_IMPULSE_BLOCK: return TRANSLATE(t_impulse_block);*/ + case REASON_GHOST: return TRANSLATE(t_ghost_player); + } + + return "None"; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/player_manager.h b/GTAV/src/menu/base/util/player_manager.h new file mode 100644 index 0000000..1420424 --- /dev/null +++ b/GTAV/src/menu/base/util/player_manager.h @@ -0,0 +1,278 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/base_types.h" +#include "rage/types/network_types.h" +#include "rage/types/generic_types.h" +#include "menu/base/submenus/main/helper/helper_esp.h" +#include + +namespace menu::player { + enum ePlayerReportReasons { + REASON_INVALID_MODEL, + REASON_SPOOFED_NAME, + REASON_SPOOFED_PEER, + REASON_SPOOFED_RID, + REASON_SPOOFED_IP, + REASON_CRC_FLOOD, + REASON_CRC_COMPROMISED, + REASON_CRC_NOT_REPLIED, + REASON_INFO_CHANGE_1, + REASON_INFO_CHANGE_2, + REASON_INFO_CHANGE_4, + REASON_INFO_CHANGE_5, + REASON_INFO_CHANGE_6, + REASON_INFO_CHANGE_7, + REASON_ARXAN, + REASON_SPOOFED_CHAT, + REASON_SPOOFED_TEXT, + REASON_CRASH_ATTEMPT, + REASON_WEATHER_CHANGE, + REASON_SPECTATING, + REASON_EXPLOSIVE_AMMO, + REASON_EXPLOSIVE_MELEE, + REASON_FIRE_AMMO, + REASON_SUPER_JUMP, + REASON_MONEY_DROP, + REASON_RP_DROP, + REASON_QUANTUM_KICK, + REASON_SCRIPT_MIGRATION, + REASON_PROFANITY, + REASON_JOIN_TIMEOUT, + REASON_INFO_MISMATCH, + REASON_MENU_CHERAX, + REASON_MENU_IMPULSE, + REASON_MENU_IMPULSE_VIP, + REASON_MENU_IMPULSE_STAFF, + REASON_MENU_IMPULSE_BLOCK, + REASON_GHOST, + REASON_END + }; + + std::string get_report_reason(ePlayerReportReasons reason); + +#pragma pack(push) +#pragma pack(1) + struct player_context { + std::string m_name = ""; + std::unordered_map m_modder_flags; + std::string m_text_message_msg = ""; + std::unordered_map m_chat_command; + + Player m_id = 0; + Ped m_ped = 0; + Entity m_entity = 0; + Entity m_weapon_entity = 0; + Vehicle m_vehicle = 0; + + rage::network::net_game_player* m_net_player = nullptr; + rage::types::ped* m_ped_ptr = nullptr; + rage::network::network_handle m_network_handle; + helper::esp::vars::esp_context m_esp; + + bool m_ozark = false; + bool m_ran_ozark = false; + bool m_cached_model = false; + bool m_exists = false; + bool m_connected = false; + bool m_alive = false; + bool m_in_vehicle = false; + bool m_has_weapon_in_hand = false; + bool m_is_aiming = false; + bool m_is_modder = false; + bool m_is_friend = false; + bool m_is_script_host = false; + bool m_rockstar_developer = false; + + math::vector3 m_coords = {}; + math::vector3 m_rotation = {}; + + uint32_t m_weapon_hash = 0; + uint32_t m_model = 0; + float m_heading = 0.f; + int m_ped_headshot = 0; + + uint32_t m_blacklist = 0; + bool m_ghost[14]; + bool m_block_entities[2][14]; + char m_text_message_final[100]; + + float m_explosion_radius; + float m_explosion_camera_shake; + + bool m_gift_vehicle = false; + bool m_chat_target = false; + bool m_sync_interval_toggle = false; + bool m_spectate = false; + bool m_demi_godmode = false; + bool m_off_the_radar = false; + bool m_disable_police = false; + bool m_kill_killers = false; + bool m_force_visible = false; + bool m_chat_commands = false; + bool m_drop_toggle = false; + bool m_drop_stealth = false; + bool m_freeze = false; + bool m_simple_explode = false; + bool m_kick_from_vehicle = false; + bool m_taze = false; + bool m_ragdoll = false; + bool m_glitch_physics = false; + bool m_forcefield = false; + bool m_rain_rockets = false; + bool m_always_wanted = false; + bool m_block_passive = false; + bool m_cage = false; + bool m_ceo = false; + bool m_set_on_fire = false; + bool m_blame = false; + bool m_send_to_island = false; + bool m_vehicle_ram = false; + bool m_clone = false; + bool m_hostile_peds = false; + bool m_hostile_vehicles = false; + bool m_show_message = false; + bool m_attacker_invincibility = false; + bool m_attacker_invisibility = false; + bool m_explosion_sound = false; + bool m_explosion_loop = false; + bool m_fake_money_drop = false; + bool m_attachment_randomize_bone = false; + bool m_attachment_randomize_rotation = false; + bool m_vehicle_godmode = false; + bool m_vehicle_disable_collision = false; + bool m_vehicle_slippy_wheels = false; + bool m_vehicle_freeze = false; + + int m_drop_type; + int m_drop_pickup; + int m_drop_weapon; + int m_drop_money_model; + int m_drop_money_style; + int m_drop_money_delay; + int m_drop_money_timer; + int m_sync_interval; + int m_demi_godmode_timer; + int m_off_the_radar_timer; + int m_disable_police_timer; + int m_bodyguard_count = 1; + int m_commend; + int m_outfit; + int m_text_message_color; + int m_text_message_font; + int m_text_message_size; + int m_text_message_count; + int m_kick_from_vehicle_timer; + int m_taze_timer; + int m_ragdoll_timer; + int m_glitch_physics_timer; + int m_rain_rockets_timer; + int m_always_wanted_timer; + int m_cage_type; + int m_cage_timer; + int m_ceo_type; + int m_ceo_timer; + int m_set_on_fire_timer; + int m_blame_timer; + int m_send_to_island_timer; + int m_vehicle_ram_timer; + int m_vehicle_ram_type; + int m_clone_type; + int m_clone_timer; + int m_hostile_peds_timer; + int m_hostile_vehicles_timer; + int m_show_message_type; + int m_show_message_timer; + int m_attacker_type; + int m_attacker_count = 1; + int m_explosion_type; + int m_explosion_visual; + int m_fake_money_drop_timer; + int m_remove_weapon_group_type; + int m_attachment_bone; + int m_attachment_custom; + int m_attachment_peds; + int m_attachment_vehicles; + int m_attachment_objects; + int m_attachment_flags; + int m_vehicle_upgrades; + int m_vehicle_downgrades; + int m_vehicle_acrobatics; + int m_vehicle_boost_forwards; + int m_vehicle_boost_backwards; + int m_vehicle_rotate; + + void reset() { + uint64_t base = (uint64_t)this; + memset((void*)(base + offsetof(player_context, m_id)), 0, sizeof(player_context) - offsetof(player_context, m_id)); + + m_name = std::string(""); + m_text_message_msg = ""; + m_chat_command.clear(); + m_modder_flags.clear(); + + m_esp.m_ped = true; + m_esp.m_name_text_color = color_rgba(255, 255, 255, 255); + m_esp.m_name_bg_color = color_rgba(0, 0, 0, 180); + m_esp.m_snapline_color = color_rgba(255, 0, 255, 255); + m_esp.m_2d_box_color = color_rgba(255, 0, 255, 255); + m_esp.m_2d_corners_color = color_rgba(255, 0, 255, 255); + m_esp.m_3d_box_color = color_rgba(255, 0, 255, 255); + m_esp.m_skeleton_bones_color = color_rgba(255, 0, 255, 255); + m_esp.m_skeleton_joints_color = color_rgba(255, 0, 255, 255); + m_esp.m_weapon_color = color_rgba(255, 255, 255, 255); + + m_bodyguard_count = 1; + m_text_message_size = 1; + m_attacker_count = 1; + m_ozark = false; + m_ran_ozark = false; + + m_drop_money_delay = 6; + } + }; +#pragma pack(pop) + + class player_manager { + public: + void update(); + void for_each(std::function callback, bool bypass_excludes = false, bool bypass_ghost = false); + player_context& random(int ignore_index = -1); + + player_context& get_player(int index); + player_context& get_local_player(); + player_context& get_selected_player(); + bool is_excluded(Player id); + private: + player_context m_players[32]; + }; + + player_manager* get_player_manager(); + + inline player_context& get_player(int index) { + return get_player_manager()->get_player(index); + } + + inline player_context& get_local_player() { + return get_player_manager()->get_local_player(); + } + + inline player_context& get_selected_player() { + return get_player_manager()->get_selected_player(); + } + + inline player_context& random(int ignore_index = -1) { + return get_player_manager()->random(ignore_index); + } + + inline void for_each(std::function callback, bool bypass_excludes = false, bool bypass_ghost = false) { + get_player_manager()->for_each(callback, bypass_excludes, bypass_ghost); + } + + inline void update() { + get_player_manager()->update(); + } + + inline bool is_excluded(Player id) { + return get_player_manager()->is_excluded(id); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/rainbow.cpp b/GTAV/src/menu/base/util/rainbow.cpp new file mode 100644 index 0000000..4a9bba6 --- /dev/null +++ b/GTAV/src/menu/base/util/rainbow.cpp @@ -0,0 +1,126 @@ +#include "rainbow.h" + +namespace menu { + rainbow::rainbow(int min, int max, int steps) { + m_min = min; + m_max = max; + m_steps = steps; + } + + void rainbow::add(color_rgba* color) { + m_colors.push_back(color); + m_default_colors.push_back({ color, *color }); + } + + void rainbow::remove(color_rgba* color) { + auto vit = std::find(begin(m_colors), end(m_colors), color); + if (vit != end(m_colors)) { + *color = get_default(color); + m_colors.erase(vit); + + auto vit2 = std::find_if(begin(m_default_colors), end(m_default_colors), [=] (std::pair elem) { + return elem.first == color; + }); + + if (vit2 != end(m_default_colors)) { + m_default_colors.erase(vit2); + } + } + } + + void rainbow::run() { + if (m_enabled) { + int step = (m_max - m_min) / (m_steps == 0 ? 1 : m_steps); + + switch (m_increment) { + case 0: + m_color.g += step; + if (m_color.g >= m_max) { + m_color.g = m_max; + m_increment++; + } + + break; + + case 1: + m_color.r -= step; + if (m_color.r <= m_min) { + m_color.r = m_min; + m_increment++; + } + + break; + + case 2: + m_color.b += step; + if (m_color.b >= m_max) { + m_color.b = m_max; + m_increment++; + } + + break; + + case 3: + m_color.g -= step; + if (m_color.g <= m_min) { + m_color.g = m_min; + m_increment++; + } + + break; + + case 4: + m_color.r += step; + if (m_color.r >= m_max) { + m_color.r = m_max; + m_increment++; + } + + break; + + case 5: + m_color.b -= step; + if (m_color.b <= m_min) { + m_color.b = m_min; + m_increment = 0; + } + + break; + } + + m_color.a = 255; + + for (color_rgba* color : m_colors) { + *color = m_color; + } + } + } + + void rainbow::start() { + m_enabled = true; + } + + void rainbow::stop() { + m_enabled = false; + + for (color_rgba* color : m_colors) { + *color = get_default(color); + } + } + + void rainbow::toggle(bool toggle) { + if (toggle) { + start(); + } else stop(); + } + + color_rgba rainbow::get_default(color_rgba* color) { + for (auto [ptr, col] : m_default_colors) { + if (ptr == color) { + return col; + } + } + + return {}; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/rainbow.h b/GTAV/src/menu/base/util/rainbow.h new file mode 100644 index 0000000..8e1360d --- /dev/null +++ b/GTAV/src/menu/base/util/rainbow.h @@ -0,0 +1,29 @@ +#pragma once +#include "stdafx.h" +#include "global/ui_vars.h" + +namespace menu { + class rainbow { + public: + rainbow(int min = 25, int max = 250, int steps = 80); + + void add(color_rgba* color); + void remove(color_rgba* color); + void run(); + void start(); + void stop(); + void toggle(bool toggle); + + color_rgba get_default(color_rgba* color); + + bool m_enabled = false; + int m_increment = 0; + int m_min = 0; + int m_max = 0; + int m_steps = 0; + color_rgba m_color; + private: + std::vector m_colors; + std::vector> m_default_colors; + }; +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/raycast.cpp b/GTAV/src/menu/base/util/raycast.cpp new file mode 100644 index 0000000..e54033e --- /dev/null +++ b/GTAV/src/menu/base/util/raycast.cpp @@ -0,0 +1,31 @@ +#include "raycast.h" +#include "menu/base/util/player_manager.h" +#include "camera.h" + +namespace menu { + raycast::raycast(int handle) { + Entity hit_entity; + native::get_shape_test_result(handle, &m_hit, &m_coords, &m_normals, &hit_entity); + + if (m_hit) { + if (native::does_entity_exist(hit_entity)) { + int type = native::get_entity_type(hit_entity); + if (hit_entity != menu::player::get_local_player().m_ped + && (type == 1 || type == 2 || type == 3)) { + m_entity = hit_entity; + } else m_entity = 0; + } + + m_hit_entity = m_entity != 0; + } + } + + raycast raycast_infront(float length, math::vector3 cam_coords, int flag) { + math::vector3 target = cam_coords + (camera::get_direction() * length); + return raycast(native::start_shape_test_ray(cam_coords.x, cam_coords.y, cam_coords.z, target.x, target.y, target.z, flag, menu::player::get_local_player().m_ped, 0)); + } + + raycast raycast_point(math::vector3 points[2], int flag) { + return raycast(native::start_shape_test_ray(points[0].x, points[0].y, points[0].z, points[1].x, points[1].y, points[1].z, flag, menu::player::get_local_player().m_ped, 0)); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/raycast.h b/GTAV/src/menu/base/util/raycast.h new file mode 100644 index 0000000..0c3a5d0 --- /dev/null +++ b/GTAV/src/menu/base/util/raycast.h @@ -0,0 +1,37 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/base_types.h" +#include "util/math.h" +#include "rage/invoker/natives.h" + +namespace menu { + class raycast { + public: + raycast(int handle); + + bool hit_entity() { + return m_entity != 0; + } + + bool hit_something() { + return m_hit; + } + + Entity get_entity() { + return m_entity; + } + + math::vector3 get_coords() { + return m_coords; + } + private: + Entity m_entity = 0; + bool m_hit = false; + bool m_hit_entity = false; + math::vector3 m_coords; + math::vector3 m_normals; + }; + + raycast raycast_infront(float length = 25.f, math::vector3 cam_coords = native::get_gameplay_cam_coord(), int flag = -1); + raycast raycast_point(math::vector3 points[2], int flag = -1); +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/stacked_display.cpp b/GTAV/src/menu/base/util/stacked_display.cpp new file mode 100644 index 0000000..5f3bb49 --- /dev/null +++ b/GTAV/src/menu/base/util/stacked_display.cpp @@ -0,0 +1,90 @@ +#include "stacked_display.h" +#include "menu/base/renderer.h" +#include "rage/invoker/natives.h" +#include +#include + +namespace menu::display { + void stacked_display::render() { + int draw_index = 0; + int draw_count = 0; + + for (stacked_display_context item : m_messages) { + std::string str_key = item.m_key; + std::string str_value = item.m_value; + + if (item.m_rendering && !str_key.empty() && !str_value.empty()) { + draw_count++; + } + } + + if (draw_count > 0) { + float x = global::ui::g_stacked_display_position.x; + float y = global::ui::g_stacked_display_position.y; + float w = global::ui::g_stacked_display_scale.x; + float h = global::ui::g_stacked_display_scale.y; + float bezzel = 0.007875f / 2.f; + + // header + std::pair texture = menu::renderer::get_texture(global::ui::m_stacked_display_bar); + menu::renderer::draw_sprite_aligned(texture, { x, y }, { w, bezzel }, 0.f, global::ui::g_stacked_display_bar); + + // bg + texture = menu::renderer::get_texture(global::ui::m_stacked_display_background); + menu::renderer::draw_sprite_aligned(texture, { x, y + bezzel }, { w, (h * draw_count) + 0.0065f }, 0.f, global::ui::g_stacked_display_background); + + std::sort(begin(m_messages), end(m_messages), [](stacked_display_context left, stacked_display_context right) { return left.m_add_time < right.m_add_time; }); + + for (stacked_display_context item : m_messages) { + std::string str_key = item.m_key; + std::string str_value = item.m_value; + + if (item.m_rendering && !str_key.empty() && !str_value.empty()) { + native::hide_hud_component_this_frame(1); + native::hide_hud_component_this_frame(2); + native::hide_hud_component_this_frame(3); + native::hide_hud_component_this_frame(4); + + menu::renderer::draw_text(item.m_key, { x + 0.002f, y + (draw_index * h) + bezzel + 0.003f }, menu::renderer::get_normalized_font_scale(global::ui::g_stacked_display_font, 0.20f), global::ui::g_stacked_display_font, { 255, 255, 255, 255 }); + menu::renderer::draw_text(item.m_value, { 0.f, y + (draw_index * h) + bezzel + 0.003f }, menu::renderer::get_normalized_font_scale(global::ui::g_stacked_display_font, 0.20f), global::ui::g_stacked_display_font, { 255, 255, 255, 255 }, JUSTIFY_RIGHT, { 0.f, x + w - 0.002f }); + draw_index++; + } + } + } + } + + void stacked_display::update(std::string id, std::string key, std::string value) { + auto& vit = std::find_if(begin(m_messages), end(m_messages), [=](stacked_display_context& element) { return element.m_id == id; }); + if (vit == end(m_messages)) { + stacked_display_context add; + add.m_rendering = true; + add.m_add_time = std::chrono::duration_cast(std::chrono::system_clock::now().time_since_epoch()).count(); + add.m_id = id; + add.m_key = key; + add.m_value = value; + + m_messages.push_back(add); + vit = std::find_if(begin(m_messages), end(m_messages), [=](stacked_display_context& element) { return element.m_id == id; }); + } + + if (vit != end(m_messages)) { + vit->m_rendering = true; + vit->m_key = key; + vit->m_value = value; + } + } + + void stacked_display::disable(std::string id) { + auto vit = std::find_if(begin(m_messages), end(m_messages), [=](stacked_display_context& element) { return element.m_id == id; }); + if (vit != end(m_messages)) { + vit->m_rendering = false; + vit->m_key = ""; + vit->m_value = ""; + } + } + + stacked_display* get_stacked_display() { + static stacked_display instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/stacked_display.h b/GTAV/src/menu/base/util/stacked_display.h new file mode 100644 index 0000000..7920a5d --- /dev/null +++ b/GTAV/src/menu/base/util/stacked_display.h @@ -0,0 +1,36 @@ +#pragma once +#include "stdafx.h" +#include + +namespace menu::display { + struct stacked_display_context { + bool m_rendering = false; + std::string m_id; + std::string m_key; + std::string m_value; + long long m_add_time = 0; + }; + + class stacked_display { + public: + void render(); + void update(std::string id, std::string key, std::string value); + void disable(std::string id); + private: + std::vector m_messages; + }; + + stacked_display* get_stacked_display(); + + inline void render() { + get_stacked_display()->render(); + } + + inline void update(std::string id, std::string key, std::string value) { + get_stacked_display()->update(id, key, value); + } + + inline void disable(std::string id) { + get_stacked_display()->disable(id); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/stats.cpp b/GTAV/src/menu/base/util/stats.cpp new file mode 100644 index 0000000..6c980e2 --- /dev/null +++ b/GTAV/src/menu/base/util/stats.cpp @@ -0,0 +1,68 @@ +#include "stats.h" +#include "rage/invoker/natives.h" +#include "menu/base/submenus/main/network/network_account.h" + +template +void stats::set(const char* stat_name, T value) { + bool use_character = strstr(stat_name, "MPPLY") == NULL && strstr(stat_name, "MP_PLAYING_TIM") == NULL; + + char stat[100]; + sprintf_s(stat, "%s%s", use_character ? ("MP" + std::to_string(network::account::vars::m_vars.m_selected_character) + "_").c_str() : "", stat_name); + + if (std::is_same::value) { + native::stat_set_int(native::get_hash_key(stat), (int)value, true); + } else if (std::is_same::value) { + native::stat_set_float(native::get_hash_key(stat), (float)value, true); + } else if (std::is_same::value) { + native::stat_set_bool(native::get_hash_key(stat), (bool)value, true); + } +} + +template +T stats::get(const char* stat_name) { + T _return; + bool use_character = strstr(stat_name, "MPPLY") == NULL && strstr(stat_name, "MP_PLAYING_TIM") == NULL; + + char stat[100]; + sprintf_s(stat, "%s%s", use_character ? ("MP" + std::to_string(network::account::vars::m_vars.m_selected_character) + "_").c_str() : "", stat_name); + + if (std::is_same::value) { + native::stat_get_int(native::get_hash_key(stat), (int*)&_return, true); + } else if (std::is_same::value) { + native::stat_get_float(native::get_hash_key(stat), (float*)&_return, true); + } else if (std::is_same::value) { + native::stat_get_bool(native::get_hash_key(stat), (bool*)&_return, true); + } + + return _return; +} + +template +void stats::set(uint32_t stat_hash, T value) { + if (std::is_same::value) { + native::stat_set_int(stat_hash, (int)value, true); + } else if (std::is_same::value) { + native::stat_set_float(stat_hash, (float)value, true); + } else if (std::is_same::value) { + native::stat_set_bool(stat_hash, (bool)value, true); + } +} + +template +T stats::get(uint32_t stat_hash) { + T _return; + + if (std::is_same::value) { + native::stat_get_int(stat_hash, (int*)&_return, true); + } else if (std::is_same::value) { + native::stat_get_float(stat_hash, (float*)&_return, true); + } else if (std::is_same::value) { + native::stat_get_bool(stat_hash, (bool*)&_return, true); + } + + return _return; +} + +template class stats; +template class stats; +template class stats; diff --git a/GTAV/src/menu/base/util/stats.h b/GTAV/src/menu/base/util/stats.h new file mode 100644 index 0000000..40eb82e --- /dev/null +++ b/GTAV/src/menu/base/util/stats.h @@ -0,0 +1,12 @@ +#pragma once +#include "stdafx.h" + +template +class stats { +public: + static void set(const char* stat_name, T value); + static T get(const char* stat_name); + + static void set(uint32_t stat_hash, T value); + static T get(uint32_t stat_hash); +}; \ No newline at end of file diff --git a/GTAV/src/menu/base/util/textures.cpp b/GTAV/src/menu/base/util/textures.cpp new file mode 100644 index 0000000..dae4082 --- /dev/null +++ b/GTAV/src/menu/base/util/textures.cpp @@ -0,0 +1,176 @@ +#include "textures.h" +#include "util/wic/wic_texture_loader.h" +#include "util/dirs.h" +#include "util/log.h" +#include "util/caller.h" +#include "rage/engine.h" +#include "global/vars.h" +#include "menu/base/util/notify.h" +#include "rage/invoker/natives.h" + +namespace menu::textures { + void textures::load_player_img(uint8_t* img, uint32_t rid) { + if (std::find_if(begin(m_textures), end(m_textures), [=](texture_context& elem) {return elem.m_name == std::string("playerimg_" + std::to_string(rid)); }) != end(m_textures)) return; + + ID3D11Resource* resource = nullptr; + ID3D11ShaderResourceView* shader = nullptr; + + if (create_dds_texture_from_memory((ID3D11Device*)global::vars::g_d3d11_device, img, 16512, &resource, &shader) != ERROR_SUCCESS) { + menu::notify::stacked("Texture", "Failed loading player image texture for rid " + std::to_string(rid), global::ui::g_error); + return; + } + + uint64_t vtable = *(uint64_t*)global::vars::g_grc_texture_factory_dx11; + rage::types::grc_texture_dx11* texture = caller::call(*(uint64_t*)(vtable + 0x20), global::vars::g_grc_texture_factory_dx11, std::string("playerimg_" + std::to_string(rid)).c_str(), 0); + if (texture) { + ID3D11Texture2D* texture_interface = nullptr; + resource->QueryInterface(&texture_interface); + + D3D11_TEXTURE2D_DESC desc; + texture_interface->GetDesc(&desc); + + texture->m_width = desc.Width; + texture->m_height = desc.Height; + texture->m_depth = 1; + texture->m_shader = shader; + texture->m_texture = resource; + + std::string key = std::string("playerimg_" + std::to_string(rid)); + texture->m_name = new char[key.length() + 1]; + strcpy(texture->m_name, key.c_str()); + + rage::engine::add_grc_texture_to_dictionary(global::vars::g_player_img_dictionary, native::get_hash_key(key.c_str()), texture); + + // LOG_CUSTOM("Textures", "Loaded player texture for rid %i", rid); + m_textures.push_back({ key, texture }); + } + } + + std::wstring Str2Wstr(const std::string& str) { + int size_needed = MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), NULL, 0); + std::wstring wstrTo(size_needed, 0); + MultiByteToWideChar(CP_UTF8, 0, &str[0], (int)str.size(), &wstrTo[0], size_needed); + return wstrTo; + } + + void textures::load_image(std::string file) { + ID3D11Resource* resource = nullptr; + ID3D11ShaderResourceView* shader = nullptr; + + std::string n = util::dirs::get_path(textures) + file; + if (create_wic_texture_from_file((ID3D11Device*)global::vars::g_d3d11_device, Str2Wstr(n).c_str(), &resource, &shader) != ERROR_SUCCESS) { + menu::notify::stacked("Texture", "Failed loading texture " + file, global::ui::g_error); + return; + } + + uint64_t vtable = *(uint64_t*)global::vars::g_grc_texture_factory_dx11; + + rage::types::grc_texture_dx11* texture = caller::call(*(uint64_t*)(vtable + 0x20), global::vars::g_grc_texture_factory_dx11, file.c_str(), 0); + if (texture) { + ID3D11Texture2D* texture_interface = nullptr; + resource->QueryInterface(&texture_interface); + + D3D11_TEXTURE2D_DESC desc; + texture_interface->GetDesc(&desc); + + texture->m_width = desc.Width; + texture->m_height = desc.Height; + texture->m_depth = 1; + texture->m_shader = shader; + texture->m_texture = resource; + + texture->m_name = new char[file.length() + 1]; + strcpy(texture->m_name, file.c_str()); + + rage::engine::add_grc_texture_to_dictionary(global::vars::g_custom_dictionary, native::get_hash_key(file.c_str()), texture); + + LOG_CUSTOM("Textures", "Loaded texture %s", file.c_str()); + m_textures.push_back({ file, texture }); + } + } + + void textures::load() { + std::vector files; + + for (std::string str : util::dirs::get_files_in_directory(util::dirs::get_path(textures), ".png")) files.push_back(str + ".png"); + for (std::string str : util::dirs::get_files_in_directory(util::dirs::get_path(textures), ".jpg")) files.push_back(str + ".jpg"); + for (std::string str : util::dirs::get_files_in_directory(util::dirs::get_path(textures), ".jpeg")) files.push_back(str + ".jpeg"); + for (std::string str : util::dirs::get_files_in_directory(util::dirs::get_path(textures), ".bmp")) files.push_back(str + ".bmp"); + + if (files.size()) { + if (!global::vars::g_custom_dictionary) { + global::vars::g_custom_dictionary = (rage::types::dictionary*)rage::engine::thread_alloc(0x40); + if (global::vars::g_custom_dictionary) { + global::vars::g_custom_dictionary = rage::engine::setup_dictionary(global::vars::g_custom_dictionary, (int)files.size() * 2); + + uint32_t dictionary_hash = joaat("ozarktextures"); + + uint32_t out = 0; + uint32_t index = *rage::engine::setup_store_item((uint64_t)global::vars::g_texture_store, &out, &dictionary_hash); + + if (rage::engine::is_valid_pool_slot((uint64_t)global::vars::g_texture_store, index)) { + rage::engine::add_dictionary_to_pool((uint64_t)global::vars::g_texture_store, index, global::vars::g_custom_dictionary); + } + } + } + + for (std::string file : files) { + load_image(file); + } + } + + if (!global::vars::g_player_img_dictionary) { + global::vars::g_player_img_dictionary = (rage::types::dictionary*)rage::engine::thread_alloc(0x40); + if (global::vars::g_player_img_dictionary) { + global::vars::g_player_img_dictionary = rage::engine::setup_dictionary(global::vars::g_player_img_dictionary, 5000); + + uint32_t dictionary_hash = joaat("ozarkplayerimg"); + + uint32_t out = 0; + uint32_t index = *rage::engine::setup_store_item((uint64_t)global::vars::g_texture_store, &out, &dictionary_hash); + + if (rage::engine::is_valid_pool_slot((uint64_t)global::vars::g_texture_store, index)) { + rage::engine::add_dictionary_to_pool((uint64_t)global::vars::g_texture_store, index, global::vars::g_player_img_dictionary); + } + } + } + } + + void textures::update() { + if (m_textures.empty()) return load(); // if there's 0, attempt to load + + std::vector files; + + for (std::string str : util::dirs::get_files_in_directory(util::dirs::get_path(textures), ".png")) files.push_back(str + ".png"); + for (std::string str : util::dirs::get_files_in_directory(util::dirs::get_path(textures), ".jpg")) files.push_back(str + ".jpg"); + for (std::string str : util::dirs::get_files_in_directory(util::dirs::get_path(textures), ".jpeg")) files.push_back(str + ".jpeg"); + for (std::string str : util::dirs::get_files_in_directory(util::dirs::get_path(textures), ".bmp")) files.push_back(str + ".bmp"); + + if (files.size()) { + for (std::string file : files) { + auto vit = std::find_if(begin(m_textures), end(m_textures), [=](texture_context& element) { return element.m_name == file; }); + if (vit == end(m_textures)) { + load_image(file); + } + } + } + } + + bool textures::get_texture(std::string name, texture_context* out) { + std::vector& list = get_list(); + if (!list.empty()) { + auto vit = std::find_if(begin(list), end(list), [=](texture_context& context) { return context.m_name == name; }); + if (vit != end(list)) { + *out = *(vit); + return true; + } + } + + return false; + } + + textures* get_textures() { + static textures instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/textures.h b/GTAV/src/menu/base/util/textures.h new file mode 100644 index 0000000..1829b3a --- /dev/null +++ b/GTAV/src/menu/base/util/textures.h @@ -0,0 +1,45 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/generic_types.h" + +namespace menu::textures { + struct texture_context { + std::string m_name; + rage::types::grc_texture_dx11* m_texture; + }; + + class textures { + public: + void load(); + void load_image(std::string file); + void load_player_img(uint8_t* img, uint32_t rid); + void update(); + bool get_texture(std::string name, texture_context* out); + + std::vector& get_list() { return m_textures; } + private: + std::vector m_textures; + }; + + textures* get_textures(); + + inline void load() { + get_textures()->load(); + } + + inline void load_player_img(uint8_t* img, uint32_t rid) { + get_textures()->load_player_img(img, rid); + } + + inline void update() { + get_textures()->update(); + } + + inline bool get_texture(std::string name, texture_context* out) { + return get_textures()->get_texture(name, out); + } + + inline std::vector& get_list() { + return get_textures()->get_list(); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/timers.cpp b/GTAV/src/menu/base/util/timers.cpp new file mode 100644 index 0000000..214aecd --- /dev/null +++ b/GTAV/src/menu/base/util/timers.cpp @@ -0,0 +1,26 @@ +#include "timers.h" +#include "rage/invoker/natives.h" + +namespace menu::timers { + void run_timed(int* timer, int ms, std::function callback) { + if (*timer < native::get_game_timer()) { + *timer = native::get_game_timer() + ms; + callback(); + } + } + + void timer::start(unsigned long long ticks) { + if (m_tick) { + m_ready_at = GetTickCount64() + ticks; + m_tick = false; + } + } + + bool timer::is_ready() { + return GetTickCount64() > m_ready_at; + } + + void timer::reset() { + m_tick = true; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/base/util/timers.h b/GTAV/src/menu/base/util/timers.h new file mode 100644 index 0000000..be37658 --- /dev/null +++ b/GTAV/src/menu/base/util/timers.h @@ -0,0 +1,17 @@ +#pragma once +#include "stdafx.h" +#include + +namespace menu::timers { + class timer { + public: + void start(unsigned long long ticks); + bool is_ready(); + void reset(); + private: + unsigned long long m_ready_at; + bool m_tick; + }; + + void run_timed(int* timer, int ms, std::function callback); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/apply_player_physical_index.cpp b/GTAV/src/menu/hooks/apply_player_physical_index.cpp new file mode 100644 index 0000000..8ce903b --- /dev/null +++ b/GTAV/src/menu/hooks/apply_player_physical_index.cpp @@ -0,0 +1,88 @@ +#include "hooks.h" +#include "menu/base/util/helpers.h" +#include "menu/base/util/player_manager.h" +#include "rage/invoker/natives.h" +#include "util/log.h" +#include "util/va.h" +#include "menu/base/util/notify.h" +#include "menu/base/submenus/main/network/network_recent_players.h" +#include "menu/base/submenus/main/network/session/network_session_overseer.h" +#include "menu/base/submenus/main/network.h" +#include "menu/base/submenus/main/settings/hide_info.h" +#include "rage/api/api.h" + +#include "rage/engine.h" + +static localization t_player_joining("Player Joining", true, true); +static localization t_player_leaving("Player Leaving", true, true); +static localization t_joining_into_slot("is joining into slot", true, true); +static localization t_leaving_slot("is leaving slot", true, true); + +void clean_allocations() { + LOG("Cleaning allocations created from the previous session"); + global::vars::g_online_rockstar_ids_queue.clear(); + global::vars::g_online_rockstar_ids.clear(); + global::vars::g_relay_usage.clear(); + global::vars::g_geo.clear(); + global::vars::g_alignment_tests.clear(); + global::vars::g_desyncs_host.clear(); + global::vars::g_desyncs.clear(); + global::vars::g_join_timeout_fix.clear(); + global::vars::g_host_desync_logs.clear(); + global::vars::g_last_synced_player_models.clear(); + global::vars::g_spoofed_data_join_requests.clear(); + global::vars::g_gs_info_requests.clear(); + global::vars::g_sync_real_ip.clear(); + global::vars::g_sync_peer_corruption.clear(); + + menu::player::for_each([](menu::player::player_context& player) { + player.reset(); + }, true, true); +} + +void menu::hooks::apply_player_physical_index(uint64_t network_player_manager, rage::network::net_game_player* player, uint8_t slot) { + if (menu::helpers::is_valid_net_player(player)) { + if (player != *(rage::network::net_game_player**)(*(uint64_t*)(global::vars::g_network_player_manager) + 0xE8)) { + if (slot != 0xFF) { + if (settings::hide::vars::m_vars.m_hide_names) { + settings::hide::vars::m_vars.m_cached[player->m_player_info->m_identifier.m_rockstar_id] = player->m_player_info->m_name; + strcpy(player->m_player_info->m_name, util::va::va("Player_%i", slot)); + } + } + + auto vit = std::find_if(begin(global::vars::g_join_timeout_fix), end(global::vars::g_join_timeout_fix), [=](join_timeout_fix& element) { + return element.m_id == (slot == 0xff ? player->m_id : slot); + }); + + if (vit != end(global::vars::g_join_timeout_fix)) { + global::vars::g_join_timeout_fix.erase(vit); + } + + if (network::vars::m_vars.m_join_notifications) { + std::string cleaned = menu::helpers::clean_name(player->m_player_info->m_name); + if (slot == 0xFF) { + // leaving + menu::notify::stacked(TRANSLATE(t_player_leaving), util::va::va("%s %s %i", cleaned.c_str(), TRANSLATE(t_leaving_slot), player->m_id)); + } else { + // joining + menu::notify::stacked(TRANSLATE(t_player_joining), util::va::va("%s %s %i", cleaned.c_str(), TRANSLATE(t_joining_into_slot), slot)); + } + } + + if (slot != 0xFF) { + uint32_t ip = player->m_player_info->m_external_ip; + + char buffer[32]; + sprintf_s(buffer, "%i.%i.%i.%i", ((ip & 0xff000000) >> 24), ((ip & 0xff0000) >> 16), ((ip & 0xff00) >> 8), (ip & 0xff)); + + network::recents::vars::save(menu::helpers::clean_name(player->m_player_info->m_name), buffer, player->m_player_info->m_identifier.m_rockstar_id); + network::session::overseer::vars::process_join_notify(player->m_player_info->m_identifier.m_rockstar_id, menu::helpers::clean_name(player->m_player_info->m_name)); + } + } else { + clean_allocations(); + } + } + + menu::player::get_player(slot == 0xFF ? player->m_id : slot).reset(); + return apply_player_physical_index_t(network_player_manager, player, slot); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/apply_weather_meta.cpp b/GTAV/src/menu/hooks/apply_weather_meta.cpp new file mode 100644 index 0000000..fa9550a --- /dev/null +++ b/GTAV/src/menu/hooks/apply_weather_meta.cpp @@ -0,0 +1,13 @@ +#include "hooks.h" +#include "menu/base/submenus/main/world/world_weather.h" + +void menu::hooks::apply_weather_meta(uint64_t meta) { + apply_weather_meta_t(meta); + + if (world::weather::vars::m_vars.m_wind_speed == 100000.f) { + world::weather::vars::m_vars.m_wind_speed = *(float*)(meta + 0xEA8); + } + + *(float*)(meta + 0xEB4) = world::weather::vars::m_vars.m_wind_speed * 12.f; + *(float*)(meta + 0xEA8) = world::weather::vars::m_vars.m_wind_speed; +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/arxan_integrity.cpp b/GTAV/src/menu/hooks/arxan_integrity.cpp new file mode 100644 index 0000000..87cfe28 --- /dev/null +++ b/GTAV/src/menu/hooks/arxan_integrity.cpp @@ -0,0 +1,71 @@ +#include "hooks.h" + +void menu::hooks::arxan_integrity_start1(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[0] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][0], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][0], 25); + return arxan_integrity_start1_t(rcx, rdx, r8, r9); +} + +void menu::hooks::arxan_integrity_end1(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[1] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][1], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][1], 25); + return arxan_integrity_end1_t(rcx, rdx, r8, r9); +} + +void menu::hooks::arxan_integrity_start2(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[2] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][0], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][0], 25); + return arxan_integrity_start2_t(rcx, rdx, r8, r9); +} + +void menu::hooks::arxan_integrity_end2(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[3] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][1], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][1], 25); + return arxan_integrity_end2_t(rcx, rdx, r8, r9); +} + +void menu::hooks::arxan_integrity_start3(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[4] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][0], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][0], 25); + return arxan_integrity_start3_t(rcx, rdx, r8, r9); +} + +void menu::hooks::arxan_integrity_end3(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[5] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][1], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][1], 25); + return arxan_integrity_end3_t(rcx, rdx, r8, r9); +} + +void menu::hooks::arxan_integrity_start4(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[6] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][0], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][0], 25); + return arxan_integrity_start4_t(rcx, rdx, r8, r9); +} + +void menu::hooks::arxan_integrity_end4(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[7] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][1], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][1], 25); + return arxan_integrity_end4_t(rcx, rdx, r8, r9); +} + +void menu::hooks::arxan_integrity_start5(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[8] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][0], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][0], 25); + return arxan_integrity_start5_t(rcx, rdx, r8, r9); +} + +void menu::hooks::arxan_integrity_end5(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + global::vars::g_arxan_called[9] = true; + memcpy((void*)global::vars::g_arxan_restore_addresses[0], global::vars::g_arxan_restore_bytes[0][1], 25); + memcpy((void*)global::vars::g_arxan_restore_addresses[1], global::vars::g_arxan_restore_bytes[1][1], 25); + return arxan_integrity_end5_t(rcx, rdx, r8, r9); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/crash.cpp b/GTAV/src/menu/hooks/crash.cpp new file mode 100644 index 0000000..2f53168 --- /dev/null +++ b/GTAV/src/menu/hooks/crash.cpp @@ -0,0 +1,257 @@ +#include "hooks.h" +#include "util/log.h" +#include "util/caller.h" +#include "util/util.h" + +namespace util { + uint64_t sub_140F14DF4(uint64_t a1) { + uint64_t v1; // rdx + uint64_t v2; // rcx + uint64_t v3; // rdx + uint64_t result; // rax + + v1 = *(uint64_t*)(a1 + 80); + v2 = 0; + + if (v1) { + v3 = *(uint64_t*)(v1 + 72); + } else { + v3 = 0; + } + + if (v3 && (*(uint32_t*)(v3 + 92) & 0xFu) >= 2) + result = *(uint64_t*)v3; + else + result = 0; + if (result) { + if (*(uint8_t*)(result + 40) == 3) + v2 = result; + result = v2; + } + + return result; + } +} + +// added +int menu::hooks::apply_vehicle_data__crash(rage::network::net_object* object, uint64_t node_data) { + if (*(bool*)(node_data + 0x119)) { + uint64_t net_obj = *(uint64_t*)((uint64_t)object - 0x1B0); + if (!is_valid_ptr(net_obj)) { + LOG("Someone may have just tried to crash you"); + return 0; + } + + uint64_t vtable = *(uint64_t*)net_obj; + if (is_valid_vtable(vtable)) { + if (caller::call(*(uint64_t*)(vtable + 0x620), net_obj) == 0) { + LOG("Someone may have just tried to crash you"); + return 0; + } + } + } + + return apply_vehicle_data__crash_t(object, node_data); +} + +// added +eThreadState menu::hooks::tick_script_thread__crash(rage::script::gta_thread* _this, uint32_t instruction_count) { + if (_this->m_is_paused) + return _this->m_context.m_state; + + eThreadState state = _this->m_context.m_state; + + static uint8_t stack_backup[0xFFFF]; + static uint8_t thread_backup[sizeof(rage::script::gta_thread)]; + static uint8_t handler_backup[sizeof(rage::script::game_script_handler)]; + + if (state == STATE_RUNNING && !global::vars::g_freemode_terminated && _this->m_script_hash == joaat("freemode")) { + memcpy(thread_backup, _this, sizeof(rage::script::gta_thread)); + memcpy(stack_backup, _this->m_stack, _this->m_context.m_stack_size); + + if (_this->m_context.m_stack_size >= 0xFFFF) { + LOG("BAD STACK SIZE: %i", _this->m_context.m_stack_size); + } + + if (_this->m_handler) { + memcpy(handler_backup, _this->m_handler, sizeof(rage::script::game_script_handler)); + } + } + + eThreadState tick_state = tick_script_thread__crash_t(_this, instruction_count); + + if (tick_state == STATE_KILLED && state == STATE_RUNNING && _this->m_script_hash == joaat("freemode")) { + if (!global::vars::g_freemode_terminated) { + tick_state = STATE_RUNNING; + + memcpy(_this, thread_backup, sizeof(rage::script::gta_thread)); + memcpy(_this->m_stack, stack_backup, _this->m_context.m_stack_size); + + if (_this->m_handler) { + memcpy(_this->m_handler, handler_backup, sizeof(rage::script::game_script_handler)); + } + } else { + global::vars::g_freemode_terminated = false; + } + } + + return tick_state; +} + +// added +uint64_t menu::hooks::attach_trailer__crash(uint64_t trailer, uint16_t flag) { + uint64_t entity = *(uint64_t*)(trailer + 0x50); + if (!is_valid_ptr(entity)) { + LOG("Someone may have just tried to crash you"); + return 0; + } + + uint64_t draw_handler = *(uint64_t*)(entity + 0x48); + if (!is_valid_ptr(draw_handler)) { + LOG("Someone may have just tried to crash you"); + return 0; + } + + if ((*(uint32_t*)(draw_handler + 0x5C) & 0xF) >= 2) { + uint64_t trailer_info = *(uint64_t*)draw_handler; + if (!trailer_info) { + LOG("Someone may have just tried to crash you"); + return 0; + } + + uint64_t table = *(uint64_t*)(trailer_info + 0xC48); + if (!is_valid_ptr(table)) { + LOG("Someone may have just tried to crash you"); + return 0; + } + + if (*(uint16_t*)(trailer_info + 0xC50)) { + for (uint16_t i = 0; i < *(uint16_t*)(trailer_info + 0xC50); i++) { + uint64_t address = *(uint64_t*)(table + (i * 8)); + if (!is_valid_ptr(address)) { + LOG("Someone may have just tried to crash you"); + return 0; + } + } + } + } + + return attach_trailer__crash_t(trailer, flag); +} + +// added +uint64_t menu::hooks::attach_trailer_audio__crash(uint64_t audio_entity, uint64_t rdx) { + if (!is_valid_ptr(audio_entity)) { + LOG("Someone just tried to crash you with a pasted crash from last gen LOL"); + return 0; + } + + uint64_t entity = util::sub_140F14DF4(*(uint64_t*)(audio_entity + 0x6C8)); + if (is_valid_ptr(entity)) { + uint64_t ptr = *(uint64_t*)(entity + 0x970); + if (!is_valid_ptr(ptr)) { + LOG("Someone just tried to crash you with a pasted crash from last gen LOL"); + return 0; + } + } + + return attach_trailer_audio__crash_t(audio_entity, rdx); +} + +// added +void menu::hooks::destruct_script_handler__crash(uint64_t _this) { + if (global::vars::g_game_script_handler_manager && *(uint64_t*)(global::vars::g_game_script_handler_manager)) { + if (*(uint8_t*)(*(uint64_t*)(global::vars::g_game_script_handler_manager) + 0x32)) { + destruct_script_handler__crash_t(_this); + return; + } + } + + LOG("Someone may have just tried to crash you"); +} + +// added +bool menu::hooks::shit_scripts2__crash(uint64_t rcx, uint16_t dx, uint32_t r8d, bool r9b) { + uint64_t* v5; // rcx + uint64_t i; // rbx + + if (!is_valid_ptr(rcx)) { + LOG("Someone may have just tried to crash you"); + return false; + } + + v5 = (uint64_t*)(rcx + 0x30); + if (!is_valid_ptr(v5)) + return false; + + for (i = *v5; i && (*(uint16_t*)(i + 8) != dx || *(uint32_t*)(i + 16) != r8d); i = *(uint64_t*)(i + 24)) + ; + + if (!is_valid_ptr(i)) + return false; + + return shit_scripts2__crash_t(rcx, dx, r8d, r9b); +} + +// added +uint64_t menu::hooks::shit_scripts__crash(uint64_t rcx, uint64_t rdx) { + if (!is_valid_ptr(rcx)) { + LOG("Someone may have just tried to crash you"); + return 0; + } + + if (*(uint64_t*)rcx != rdx) { + if (*(uint64_t*)(rcx + 8) != rdx) { + if (!is_valid_ptr(*(uint64_t*)(rdx + 0x18))) { + LOG("Someone may have just tried to crash you"); + return 0; + } + + if (!is_valid_ptr(*(uint64_t*)(rdx + 0x20))) { + LOG("Someone may have just tried to crash you"); + return 0; + } + } else { + if (!is_valid_ptr(*(uint64_t*)(rcx + 8))) { + LOG("Someone may have just tried to crash you"); + return 0; + } + } + } + + return shit_scripts__crash_t(rcx, rdx); +} + +// added +uint64_t menu::hooks::rid0__crash(uint64_t rcx, uint64_t rdx) { + if (rdx) { + rage::network::player_info* player = (rage::network::player_info*)(rdx - 0x20); + + if (player->m_rockstar_id == 0) { + player->m_rockstar_id = 69420; + } + + if (player->m_identifier.m_rockstar_id == 0) { + player->m_identifier.m_rockstar_id = 69420; + } + } + + return rid0__crash_t(rcx, rdx); +} + +// added +uint64_t menu::hooks::sub_140AD8424__crash(uint64_t rcx, int edx, uint32_t r8d) { + if (!is_valid_ptr(rcx) || !is_valid_ptr(*(uint64_t*)(rcx + 0x100))) { + LOG("Someone may have just tried to crash you"); + return 0; + } + + if (edx == 2) { + if ((*(uint16_t*)(rcx + 0x204) >> 8) == 0xFF && (*(uint16_t*)(rcx + 0x204) & 0xFF) != 0xFF) { + LOG("Someone may have just tried to crash you"); + return 0; + } + } + + return sub_140AD8424__crash_t(rcx, edx, r8d); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/format_engine_string.cpp b/GTAV/src/menu/hooks/format_engine_string.cpp new file mode 100644 index 0000000..89a9f89 --- /dev/null +++ b/GTAV/src/menu/hooks/format_engine_string.cpp @@ -0,0 +1,72 @@ +#include "hooks.h" +#include "global/ui_vars.h" +#include "menu/base/util/notify.h" +#include + +uint64_t menu::hooks::format_engine_string(uint64_t rcx, uint64_t rdx, uint32_t r8d, const char* r9, uint32_t stack) { + if (r9) { + if (strlen(r9) >= 98) { + for (int i = 0; i < 100; i++) { + if (strstr(global::ui::g_render_queue[i].c_str(), r9)) { + return format_engine_string_t(rcx, rdx, r8d, global::ui::g_render_queue[i].c_str(), stack); + } + } + + if (!global::ui::g_rendering_tooltip.empty()) { + if (strstr(global::ui::g_rendering_tooltip.c_str(), r9)) { + return format_engine_string_t(rcx, rdx, r8d, global::ui::g_rendering_tooltip.c_str(), stack); + } + } + + std::vector& contexts = menu::notify::get_notify()->get_contexts(); + if (!contexts.empty()) { + for (menu::notify::notify_context& text : contexts) { + if (text.m_text.size() > 1) { + for (std::string line : text.m_text) { + if (strstr(line.c_str(), r9)) { + return format_engine_string_t(rcx, rdx, r8d, line.c_str(), stack); + } + } + } else { + if (strstr(text.m_text[0].c_str(), r9)) { + return format_engine_string_t(rcx, rdx, r8d, text.m_text[0].c_str(), stack); + } + } + } + } + } + } + + return format_engine_string_t(rcx, rdx, r8d, r9, stack); +} + +int menu::hooks::get_engine_string_line_count(uint64_t rcx, const char* rdx, float xmm2, uint64_t r9, bool stack) { + if (rdx) { + if (strlen(rdx) >= 98) { + if (!global::ui::g_rendering_tooltip.empty()) { + if (strstr(global::ui::g_rendering_tooltip.c_str(), rdx)) { + return get_engine_string_line_count_t(rcx, global::ui::g_rendering_tooltip.c_str(), xmm2, r9, stack); + } + } + + std::vector& contexts = menu::notify::get_notify()->get_contexts(); + if (!contexts.empty()) { + for (menu::notify::notify_context& text : contexts) { + if (text.m_text.size() > 1) { + for (std::string line : text.m_text) { + if (strstr(line.c_str(), rdx)) { + return get_engine_string_line_count_t(rcx, line.c_str(), xmm2, r9, stack); + } + } + } else { + if (strstr(text.m_text[0].c_str(), rdx)) { + return get_engine_string_line_count_t(rcx, text.m_text[0].c_str(), xmm2, r9, stack); + } + } + } + } + } + } + + return get_engine_string_line_count_t(rcx, rdx, xmm2, r9, stack); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/game_chat.cpp b/GTAV/src/menu/hooks/game_chat.cpp new file mode 100644 index 0000000..6ff4437 --- /dev/null +++ b/GTAV/src/menu/hooks/game_chat.cpp @@ -0,0 +1,265 @@ +#include "hooks.h" +#include "menu/base/submenus/main/protection/protection_limits.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/submenus/main/misc/misc_disables.h" +#include "menu/base/submenus/main/network/network_global_chat.h" +#include "menu/base/submenus/main/network/chat/network_global_chat_ozark.h" +#include "menu/base/submenus/main/network/players/network_players_commands.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" +#include "menu/base/util/helpers.h" +#include "util/caller.h" +#include "util/util.h" +#include "util/log.h" +#include "util/memory/memory.h" +#include "global/lists.h" +#include "util/fiber_pool.h" +#include "util/fiber.h" +#include + +static localization t_spoofing_chat_to("Spoofing chat message to", true, true); +static localization t_spoofing_text_to("Spoofing text message to", true, true); + +Player get_player_id_from_chat_token(uint64_t token) { + Player id = -1; + + menu::player::for_each([&](menu::player::player_context& player) { + if (menu::helpers::is_valid_net_player(player.m_net_player)) { + if (player.m_connected) { + if (player.m_net_player->m_player_info->m_chat_token == token) { + id = player.m_id; + } + } + } + }, true, true); + + return id; +} + +bool menu::hooks::read_chat_message(rage::network::global_msg_context* context, rage::bit_buffer* bit_buffer) { + bool _return = read_chat_message_t(context, bit_buffer); + if (!_return) return _return; + + if (protection::limits::vars::m_vars.m_chat_message.m_block_all) { + context->m_sender_chat_token = 0; + return true; + } + + bool spoofed = false; + uint64_t real_token = 0; + + Player sender_id = menu::helpers::get_net_msg_sender(bit_buffer->m_raw_buffer); + if (sender_id != -1) { + Player token_id = get_player_id_from_chat_token(context->m_sender_chat_token); + if (token_id != -1) { + if (sender_id != token_id) { + spoofed = true; + + menu::player::player_context& player = menu::player::get_player(sender_id); + if (protection::events::vars::m_vars.m_show_real_chat_sender) { + if (menu::helpers::is_valid_net_player(player.m_net_player)) { + context->m_sender_chat_token = player.m_net_player->m_player_info->m_chat_token; + real_token = player.m_net_player->m_player_info->m_chat_token; + } + } + + if (protection::events::vars::m_vars.m_spoofed_messages.notify()) { + menu::notify::protection(player.m_name, util::va::va("%s %s", TRANSLATE(t_spoofing_chat_to), menu::player::get_player(token_id).m_name.c_str()), false, protection::limits::vars::m_vars.m_chat_message.m_block_spoofed); + } + + if (protection::limits::vars::m_vars.m_chat_message.m_block_spoofed) { + context->m_sender_chat_token = 0; + return true; + } + } + } + + static std::unordered_map limits; + if ((GetTickCount() - limits[sender_id]) < global::lists::g_timers[protection::limits::vars::m_vars.m_chat_message.m_delay].m_result) { + context->m_sender_chat_token = 0; + return true; + } + + limits[sender_id] = GetTickCount(); + + // OZARK + /*if (context->m_message[0] == 1 && context->m_message[1] == 2) { + if (menu::player::get_player(sender_id).m_ozark) { + if (!spoofed) { + real_token = context->m_sender_chat_token; + } else { + if (real_token == 0) { + context->m_sender_chat_token = 0; + return true; + } + } + + rage::network::chat_config* config = *(rage::network::chat_config**)global::vars::g_chat_config; + config->m_override_gxt = joaat("ozark"); + + global::vars::g_hack_patches["CHAT"].m_patch[1] = context->m_message[2]; + memory::write_vector(global::vars::g_hack_patches["CHAT"].m_address, global::vars::g_hack_patches["CHAT"].m_patch); + + caller::call(global::vars::g_add_chat_message, config, config, &real_token, context->m_message + 3, true); + + config->m_override_gxt = 0; + + global::vars::g_hack_patches["CHAT"].m_patch[1] = 1; + memory::write_vector(global::vars::g_hack_patches["CHAT"].m_address, global::vars::g_hack_patches["CHAT"].m_patch); + } + + context->m_sender_chat_token = 0; + return true; + }*/ + + std::string spoof = ""; + if (spoofed) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_SPOOFED_CHAT, sender_id); + spoof = "[Spoofed to " + menu::player::get_player(token_id).m_name + "]"; + } else { + std::istringstream buffer(context->m_message); + std::istream_iterator begin(buffer), end; + std::vector tokens(begin, end); + + if (!tokens.empty()) { + if (tokens.at(0).at(0) == '?' && tokens.at(0).length() > 1) { + network::players::commands::vars::call_command((tokens.at(0).data() + 1), menu::player::get_player(sender_id).m_net_player, tokens); + } + } + } + + LOG_CUSTOM("Chat", "[%s]%s %s", menu::player::get_player(sender_id).m_name.c_str(), spoof.c_str(), context->m_message); + + if (network::gchat::vars::m_vars.m_mocking) { + rage::network::global_chat_raw* data = (rage::network::global_chat_raw*)(*(uint64_t*)(global::vars::g_global_chat_ptr) + 0x78); + rage::network::chat_config* config = *(rage::network::chat_config**)global::vars::g_chat_config; + + rage::network::global_msg_context* new_context = new rage::network::global_msg_context(); + memcpy(new_context, context, sizeof(rage::network::global_msg_context)); + + new_context->m_sender_chat_token = menu::player::get_local_player().m_net_player->m_player_info->m_chat_token; + strcpy_s(new_context->m_message, util::mock_string(new_context->m_message).c_str()); + + if (network::gchat::vars::m_vars.m_mocking_type == 0) { + send_global_chat_message(data->m_manager_ptr, network::gchat::vars::get_key_from_player(sender_id), new_context, 0, 0); + } else { + menu::player::for_each([=] (menu::player::player_context& player) { + if (player.m_id == menu::player::get_local_player().m_id) return; + send_global_chat_message(data->m_manager_ptr, network::gchat::vars::get_key_from_player(player.m_id), new_context, 0, 0); + }, true, true); + } + + util::fiber::pool::add([=] { + util::fiber::sleep(250); + caller::call(global::vars::g_add_chat_message, config, config, &new_context->m_sender_chat_token, new_context->m_message, false); + delete new_context; + }); + } + } + + if (misc::disables::vars::m_vars.m_disable_chat_on_open) { + if (menu::base::is_open()) { + context->m_sender_chat_token = 0; + return true; + } + } + + return _return; +} + +bool menu::hooks::receive_text_message(rage::network::net_msg_text_message* identifier, rage::bit_buffer* bit_buffer) { + bool _return = receive_text_message_t(identifier, bit_buffer); + if (!_return) + return _return; + + if (protection::limits::vars::m_vars.m_text_message.m_block_all) + return false; + + bool spoofed = false; + uint64_t real_rid = 0; + + Player sender_id = menu::helpers::get_net_msg_sender(bit_buffer->m_raw_buffer); + if (sender_id != -1) { + Player token_id = menu::helpers::get_player_from_rid(identifier->m_sender.m_rockstar_id).m_id; + if (token_id != -1) { + if (sender_id != token_id) { + spoofed = true; + + menu::player::player_context& player = menu::player::get_player(sender_id); + if (protection::events::vars::m_vars.m_show_real_chat_sender) { + if (menu::helpers::is_valid_net_player(player.m_net_player)) { + identifier->m_sender.m_rockstar_id = player.m_net_player->m_player_info->m_identifier.m_rockstar_id; + real_rid = player.m_net_player->m_player_info->m_identifier.m_rockstar_id; + } + } + + if (protection::events::vars::m_vars.m_spoofed_messages.notify()) { + menu::notify::protection(player.m_name, util::va::va("%s %s", TRANSLATE(t_spoofing_text_to), menu::player::get_player(token_id).m_name.c_str()), false, protection::limits::vars::m_vars.m_text_message.m_block_spoofed); + } + + if (protection::limits::vars::m_vars.m_text_message.m_block_spoofed) + return false; + } + } + + static std::unordered_map limits; + if ((GetTickCount() - limits[sender_id]) < global::lists::g_timers[protection::limits::vars::m_vars.m_text_message.m_delay].m_result) { + return false; + } + + limits[sender_id] = GetTickCount(); + + std::string spoof = ""; + if (spoofed) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_SPOOFED_TEXT, sender_id); + spoof = "[Spoofed to " + menu::player::get_player(token_id).m_name + "]"; + } + + LOG_CUSTOM("Text", "[%s]%s %s", menu::player::get_player(sender_id).m_name.c_str(), spoof.c_str(), identifier->m_message); + } + + return _return; +} + +void menu::hooks::send_global_chat_message(uint64_t manager, int key, rage::network::global_msg_context* context, uint64_t unk1, uint64_t unk2) { + /*if (network::gchat::ozark::vars::m_vars.m_enabled) { + if (!network::gchat::ozark::vars::m_vars.m_prefix.empty()) { + if ((context->m_message[0] == 1 && context->m_message[1] == 2) || std::string(context->m_message).find(network::gchat::ozark::vars::m_vars.m_prefix + " ") == 0) { + Player id = network::gchat::vars::get_player_from_key(key); + if (id != -1) { + if (network::gchat::vars::can_send_to_player(id)) { + if (menu::player::get_player(id).m_ozark) { + if (!(context->m_message[0] == 1 && context->m_message[1] == 2)) { + char msg[0x100]; + strcpy_s(msg, std::string(context->m_message + network::gchat::ozark::vars::m_vars.m_prefix.size() + 1).c_str()); + + context->m_message[0] = 1; + context->m_message[1] = 2; + context->m_message[2] = network::gchat::ozark::vars::colors[network::gchat::ozark::vars::m_vars.m_color].m_result; + strcpy(context->m_message + 3, msg); + LOG(XOR("Sending Ozark chat - %s"), msg); + } + + return send_global_chat_message_t(manager, key, context, unk1, unk2); + } + } + } + + return; + } + } + }*/ + + LOG_DEV("Sending chat message to %i", key); + context->m_sender_chat_token = network::gchat::vars::get_sender_chat_token(context->m_sender_chat_token); + LOG_DEV("Chat token: %llx", context->m_sender_chat_token); + + Player id = network::gchat::vars::get_player_from_key(key); + if (id != -1) { + if (!network::gchat::vars::can_send_to_player(id)) { + LOG_DEV("Preventing message send"); + return; + } + } + + return send_global_chat_message_t(manager, key, context, unk1, unk2); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/get_font_id.cpp b/GTAV/src/menu/hooks/get_font_id.cpp new file mode 100644 index 0000000..72cc188 --- /dev/null +++ b/GTAV/src/menu/hooks/get_font_id.cpp @@ -0,0 +1,15 @@ +#include "hooks.h" +#include "util/caller.h" +#include "menu/base/util/fonts.h" +#include "util/log.h" + +void* menu::hooks::get_font_id(uint64_t font, int id) { + std::vector fonts = menu::fonts::get_list(); + for (menu::fonts::font_context font_ : fonts) { + if (font_.m_font_id == id) { + return caller::call(global::vars::g_get_font_id_table, font, font_.m_font_name.c_str()); + } + } + + return get_font_id_t(font, id); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/get_gxt_label.cpp b/GTAV/src/menu/hooks/get_gxt_label.cpp new file mode 100644 index 0000000..191253b --- /dev/null +++ b/GTAV/src/menu/hooks/get_gxt_label.cpp @@ -0,0 +1,20 @@ +#include "hooks.h" +#include "menu/base/base.h" +#include "util/util.h" +#include "util/log.h" + +const char* menu::hooks::get_gxt_label(uint64_t table, const char* label) { + if (label && !strcmp(label, "Ozark")) { + return menu::base::get_keyboard_title().c_str(); + } + + return get_gxt_label_t(table, label); +} + +const char* menu::hooks::get_gxt_label_from_hash(uint64_t table, uint32_t label_hash) { + if (label_hash == joaat("Ozark")) { + return "Ozark"; + } + + return get_gxt_label_from_hash_t(table, label_hash); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/get_peer_address.cpp b/GTAV/src/menu/hooks/get_peer_address.cpp new file mode 100644 index 0000000..a805a21 --- /dev/null +++ b/GTAV/src/menu/hooks/get_peer_address.cpp @@ -0,0 +1,13 @@ +#include "hooks.h" +#include "menu/base/submenus/main/network/network_spoofing.h" + +bool menu::hooks::get_peer_address(uint64_t* peer) { + if (peer) { + if (network::spoofing::vars::m_vars.m_spoofed_peer) { + *peer = network::spoofing::vars::m_vars.m_spoofed_peer; + return true; + } + } + + return get_peer_address_t(peer); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/get_proc_address.cpp b/GTAV/src/menu/hooks/get_proc_address.cpp new file mode 100644 index 0000000..8f5c7b6 --- /dev/null +++ b/GTAV/src/menu/hooks/get_proc_address.cpp @@ -0,0 +1,79 @@ +#include "hooks.h" +#include "menu/base/submenus/main/misc/scripthook.h" +#include "util/log.h" + +FARPROC menu::hooks::get_proc_address(HMODULE mod, LPCSTR name) { + if (mod == (HMODULE)0x63686970) { + if (!strcmp(name, "scriptRegister")) { + return (FARPROC)&misc::scripthook::vars::proxy::script_register; + } + + if (!strcmp(name, "scriptRegisterAdditionalThread")) { + return (FARPROC)&misc::scripthook::vars::proxy::script_register_additional_thread; + } + + if (!strcmp(name, "scriptUnregister")) { + return (FARPROC)&misc::scripthook::vars::proxy::script_unregister; + } + + if (!strcmp(name, "nativeInit")) { + return (FARPROC)&misc::scripthook::vars::proxy::native_init; + } + + if (!strcmp(name, "nativePush64")) { + return (FARPROC)&misc::scripthook::vars::proxy::native_push_64; + } + + if (!strcmp(name, "nativeCall")) { + return (FARPROC)&misc::scripthook::vars::proxy::native_call; + } + + if (!strcmp(name, "getGlobalPtr")) { + return (FARPROC)&misc::scripthook::vars::proxy::get_global_ptr; + } + + if (!strcmp(name, "scriptWait")) { + return (FARPROC)&misc::scripthook::vars::proxy::script_wait; + } + + if (!strcmp(name, "keyboardHandlerRegister")) { + return (FARPROC)&misc::scripthook::vars::proxy::keyboard_handler_register; + } + + if (!strcmp(name, "keyboardHandlerUnregister")) { + return (FARPROC)&misc::scripthook::vars::proxy::keyboard_handler_unregister; + } + + if (!strcmp(name, "getScriptHandleBaseAddress")) { + return (FARPROC)&misc::scripthook::vars::proxy::get_script_handle_base_address; + } + + if (!strcmp(name, "presentCallbackRegister")) { + return (FARPROC)&misc::scripthook::vars::proxy::present_callback_register; + } + + if (!strcmp(name, "presentCallbackUnregister")) { + return (FARPROC)&misc::scripthook::vars::proxy::present_callback_unregister; + } + + if (!strcmp(name, "worldGetAllVehicles")) { + return (FARPROC)&misc::scripthook::vars::proxy::world_get_all_vehicles; + } + + if (!strcmp(name, "worldGetAllPeds")) { + return (FARPROC)&misc::scripthook::vars::proxy::world_get_all_peds; + } + + if (!strcmp(name, "worldGetAllObjects")) { + return (FARPROC)&misc::scripthook::vars::proxy::world_get_all_objects; + } + + if (!strcmp(name, "worldGetAllPickups")) { + return (FARPROC)&misc::scripthook::vars::proxy::world_get_all_pickups; + } + + LOG_CUSTOM_WARN("ScriptHook", "Failed to verify %s", name); + } + + return get_proc_address_t(mod, name); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/has_ros_privilege.cpp b/GTAV/src/menu/hooks/has_ros_privilege.cpp new file mode 100644 index 0000000..cd4c517 --- /dev/null +++ b/GTAV/src/menu/hooks/has_ros_privilege.cpp @@ -0,0 +1,12 @@ +#include "hooks.h" +#include "menu/base/submenus/main/misc.h" + +bool menu::hooks::has_ros_privilege(uint64_t ros_table, int privilege) { + if (misc::vars::m_vars.m_rockstar_developer_perks) { + if (privilege == 12) { + return true; + } + } + + return has_ros_privilege_t(ros_table, privilege); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/hooks.cpp b/GTAV/src/menu/hooks/hooks.cpp new file mode 100644 index 0000000..536b7e9 --- /dev/null +++ b/GTAV/src/menu/hooks/hooks.cpp @@ -0,0 +1,1551 @@ +#include "hooks.h" +#include "util/memory/pattern.h" +#include "util/memory/memory.h" +#include "util/hooking/hooking.h" +#include "util/log.h" +#include "util/caller.h" +#include "global/vars.h" +#include "rage/invoker/natives.h" +#include "menu/base/util/helpers.h" +#include "util/util.h" +#include "util/threads.h" +#include +#include "menu/base/submenus/main/network/network_host_toolkit.h" +#include "menu/base/submenus/main/network/network_spoofing.h" +#include "menu/base/submenus/main/network/spoofing/network_spoofing_rid.h" +#include "menu/base/submenus/main/network/spoofing/network_spoofing_name.h" +#include "menu/base/submenus/main/network/spoofing/network_spoofing_ip.h" +#include "menu/base/submenus/main.h" +#include "menu/base/util/global.h" + +namespace menu::hooks { + bool spoofing() { + bool set = false; + + std::stack name_stack; + name_stack.push("Spoofing"); + name_stack.push("Network"); + name_stack.push("Ozark"); + + LOG_DEV("1"); + uint64_t peer = util::config::read_uint64(name_stack, "Peer", 0); + if (peer > 0) { + set = true; + network::spoofing::vars::do_peer_spoof(peer); + } + + name_stack = std::stack(); + name_stack.push("Rockstar ID"); + name_stack.push("Spoofing"); + name_stack.push("Network"); + name_stack.push("Ozark"); + + LOG_DEV("2"); + if (util::config::read_bool(name_stack, "Save to Config", false)) { + set = true; + network::spoofing::rid::vars::m_vars.m_spoofing_rid + = network::spoofing::rid::vars::m_vars.m_temp_spoofing_rid + = util::config::read_uint64(name_stack, "Rockstar ID", network::spoofing::rid::vars::m_vars.m_spoofing_rid); + + network::spoofing::rid::vars::spoof(false, network::spoofing::rid::vars::m_vars.m_spoofing_rid); + } + + name_stack = std::stack(); + name_stack.push("Name"); + name_stack.push("Spoofing"); + name_stack.push("Network"); + name_stack.push("Ozark"); + + LOG_DEV("3"); + if (util::config::read_bool(name_stack, "Save to Config", false)) { + set = true; + network::spoofing::name::vars::m_vars.m_spoofed_name = util::config::read_string(name_stack, "Name", network::spoofing::name::vars::m_vars.m_spoofed_name); + + for (int i = 1; i < NUMOF(network::spoofing::name::vars::text_settings); i++) { + if (strstr(network::spoofing::name::vars::m_vars.m_spoofed_name.c_str(), network::spoofing::name::vars::text_settings[i].m_result)) { + network::spoofing::name::vars::m_vars.m_style = i; + util::replace_string(network::spoofing::name::vars::m_vars.m_spoofed_name, network::spoofing::name::vars::text_settings[i].m_result, ""); + break; + } + } + + for (int i = 1; i < NUMOF(network::spoofing::name::vars::text_colors); i++) { + if (strstr(network::spoofing::name::vars::m_vars.m_spoofed_name.c_str(), network::spoofing::name::vars::text_colors[i].m_result)) { + network::spoofing::name::vars::m_vars.m_color = i; + util::replace_string(network::spoofing::name::vars::m_vars.m_spoofed_name, network::spoofing::name::vars::text_colors[i].m_result, ""); + break; + } + } + + for (int i = 1; i < NUMOF(network::spoofing::name::vars::text_icons); i++) { + if (strstr(network::spoofing::name::vars::m_vars.m_spoofed_name.c_str(), network::spoofing::name::vars::text_icons[i].m_result)) { + network::spoofing::name::vars::m_vars.m_icon = i; + util::replace_string(network::spoofing::name::vars::m_vars.m_spoofed_name, network::spoofing::name::vars::text_icons[i].m_result, ""); + break; + } + } + + network::spoofing::name::vars::m_vars.m_temp_name = network::spoofing::name::vars::m_vars.m_spoofed_name; + network::spoofing::name::vars::spoof(false, network::spoofing::name::vars::m_vars.m_temp_name.c_str()); + } + + name_stack = std::stack(); + name_stack.push("IP Address"); + name_stack.push("Spoofing"); + name_stack.push("Network"); + name_stack.push("Ozark"); + + LOG_DEV("4"); + if (util::config::read_bool(name_stack, "Save to Config", false)) { + set = true; + network::spoofing::ip::vars::m_vars.m_spoofing_ip = network::spoofing::ip::vars::m_vars.m_temp_spoofing_ip = util::config::read_string(name_stack, "IP", network::spoofing::ip::vars::m_vars.m_spoofing_ip.c_str()); + network::spoofing::ip::vars::spoof(false, network::spoofing::ip::vars::m_vars.m_spoofing_ip); + } + + LOG_DEV("5"); + return set; + } + + bool bypass() { + bool successful = true; + return successful; + } + + bool globals() { + bool successful = true; + + memory::scan(XOR("socialclub.dll"), { XOR("48 8D 05 ? ? ? ? 48 03 F8 44 8B 47 14 48 8D 57 20 E8 ? ? ? ? 85"), 0, XOR("SCGIT"), true }, [](uint64_t address) { + global::vars::g_social_club_game_info_table = memory::read_instruction(address); + return true; + }, successful); + + memory::scan(XOR("socialclub.dll"), { XOR("E8 ? ? ? ? 85 C0 78 27 3B 47 14 7D 1E 48 98 48 8B D6 48 69 C8"), 0, XOR("SCGGIT"), true }, [](uint64_t address) { + global::vars::g_social_club_get_game_info_table = memory::read_instruction(address, 1, 5); + return true; + }, successful); + + memory::scan({ XOR("8B 05 ? ? ? ? 85 C0 0F 84 ? ? ? ? 83 F8 06 74 08 83 C0 F8"), 0, XOR("GS"), true }, [](uint64_t address) { + global::vars::g_game_state = (game_state*)memory::read_instruction(address, 2, 6); + return (uint64_t)global::vars::g_game_state > 0; + }, successful); + + memory::scan(XOR("NRT"), [](uint64_t address) { + global::vars::g_native_registration = (rage::invoker::native_registration**)memory::read_instruction(address); + global::vars::g_translate_native = memory::read_instruction(address + 0xB, 1, 5); + return (uint64_t)global::vars::g_native_registration > 0; + }, successful); + + memory::scan(XOR("GSME"), [](uint64_t address) { + global::vars::g_get_store_module_extension = address; + return true; + }, successful); + + memory::scan(XOR("RSF"), [](uint64_t address) { + global::vars::g_request_streaming_file = address; + return true; + }, successful); + + memory::scan(XOR("CGFXF"), [](uint64_t address) { + global::vars::g_construct_gfx_font = address; + return true; + }, successful); + + memory::scan(XOR("D"), [](uint64_t address) { + global::vars::g_destruct = address; + return true; + }, successful); + + memory::scan(XOR("CIDFF"), [](uint64_t address) { + global::vars::g_create_id_for_font = address; + return true; + }, successful); + + memory::scan(XOR("AFL"), [](uint64_t address) { + global::vars::g_add_font_lib = address; + return true; + }, successful); + + memory::scan(XOR("VERTEX"), [](uint64_t address) { + global::vars::g_vertex_begin = memory::read_instruction(address, 1, 5); + global::vars::g_vertex_add = memory::read_instruction(address + 0x4D, 1, 5); // good + global::vars::g_vertex_end = memory::read_instruction(address + 0x5C, 1, 5); // good + return true; + }, successful); + + memory::scan(XOR("RST"), [](uint64_t address) { + global::vars::g_render_script_texture = address; + return true; + }, successful); + + memory::scan(XOR("FT"), [](uint64_t address) { + global::vars::g_font_table = memory::read_instruction(address); + return true; + }, successful); + + memory::scan(XOR("FMH"), [](uint64_t address) { + global::vars::g_font_memory_helper = memory::read_instruction(address); + return true; + }, successful); + + memory::scan(XOR("GFIDT"), [](uint64_t address) { + global::vars::g_get_font_id_table = address; + return true; + }, successful); + + memory::scan(XOR("MH"), [](uint64_t address) { + global::vars::g_memory_heap = *(rage::types::memory_heap_pt**)(memory::read_instruction(address)); + return true; + }, successful); + + memory::scan(XOR("SM"), [](uint64_t address) { + global::vars::g_store_manager = (rage::types::store_manager*)(memory::read_instruction(address)); + return true; + }, successful); + + memory::scan(XOR("D3DDEV"), [](uint64_t address) { + global::vars::g_d3d11_device = *(uint64_t*)memory::read_instruction(address); + return true; + }, successful); + + memory::scan(XOR("GRCTFDX"), [](uint64_t address) { + global::vars::g_grc_texture_factory_dx11 = *(uint64_t*)memory::read_instruction(address); + return true; + }, successful); + + memory::scan(XOR("TLSA"), [](uint64_t address) { + global::vars::g_thread_alloc = memory::read_instruction(address, 1, 5); + return true; + }, successful); + + memory::scan(XOR("SD"), [](uint64_t address) { + global::vars::g_setup_dictionary = address; + return true; + }, successful); + + memory::scan(XOR("SSI"), [](uint64_t address) { + global::vars::g_setup_store_item = memory::read_instruction(address, 1, 5); + return true; + }, successful); + + memory::scan(XOR("IVPS"), [](uint64_t address) { + global::vars::g_is_valid_pool_slot = address; + return true; + }, successful); + + memory::scan(XOR("ADTP"), [](uint64_t address) { + global::vars::g_add_dictionary_to_pool = address; + return true; + }, successful); + + memory::scan(XOR("AGRCTD"), [](uint64_t address) { + global::vars::g_add_grc_texture_to_dictionary = address; + return true; + }, successful); + + memory::scan(XOR("WEATHER"), [](uint64_t address) { + global::vars::g_get_weather_id = memory::read_instruction(address + 7, 1, 5); + global::vars::g_weather_table = memory::read_instruction(address); + return true; + }, successful); + + memory::scan(XOR("socialclub.dll"), { XOR("48 8D 05 ? ? ? ? 48 03 F8 44 8B 47 14 48 8D 57 20 E8 ? ? ? ? 85"), 0, XOR("SCGIT"), false }, [](uint64_t address) { + global::vars::g_sc_game_info_table = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_sc_game_info_table); + }, successful); + + memory::scan(XOR("socialclub.dll"), { XOR("E8 ? ? ? ? 85 C0 78 27 3B 47 14 7D 1E 48 98 48 8B D6 48 69 C8"), 0, XOR("SCGGIT"), false }, [](uint64_t address) { + global::vars::g_sc_get_game_info_table = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_sc_get_game_info_table); + }, successful); + + memory::scan(XOR("GSS"), [](uint64_t address) { + global::vars::g_game_streamed_scripts = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_game_streamed_scripts); + }, successful); + + memory::scan(XOR("GSS_G"), [](uint64_t address) { + global::vars::g_get_streamed_script = address; + return is_valid_ptr(global::vars::g_get_streamed_script); + }, successful); + + memory::scan(XOR("CPF"), [](uint64_t address) { + global::vars::g_ped_factory = *(rage::types::ped_factory**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_ped_factory); + }, successful); + + memory::scan(XOR("GCP"), [](uint64_t address) { + global::vars::g_global_cache = (uint64_t**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_global_cache); + }, successful); + + memory::scan(XOR("WCHL"), [](uint64_t address) { + global::vars::g_weapon_components = { memory::read_instruction(address, 2, 6), memory::read_instruction(address + 0x14) }; // good + return is_valid_ptr(global::vars::g_weapon_components.m_count) && is_valid_ptr(global::vars::g_weapon_components.m_list); + }, successful); + + memory::scan(XOR("WIHL"), [](uint64_t address) { + global::vars::g_weapon_info = { memory::read_instruction(address, 4, 8), memory::read_instruction(address + 0x10) }; // good + return is_valid_ptr(global::vars::g_weapon_info.m_count) && is_valid_ptr(global::vars::g_weapon_info.m_list); + }, successful); + + memory::scan(XOR("GCA"), [](uint64_t address) { + global::vars::g_game_camera_angles = (rage::network::game_camera_angles*)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_game_camera_angles); + }, successful); + + memory::scan(XOR("GTPC"), [](uint64_t address) { + global::vars::g_get_third_person_camera = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_get_third_person_camera); + }, successful); + + memory::scan(XOR("TPCP"), [](uint64_t address) { + global::vars::g_third_person_camera = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_third_person_camera); + }, successful); + + memory::scan(XOR("GEA"), [](uint64_t address) { + global::vars::g_get_entity_address = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_get_entity_address); + }, successful); + + memory::scan(XOR("GEH"), [](uint64_t address) { + global::vars::g_get_entity_handle_from_address = address; + return is_valid_ptr(global::vars::g_get_entity_handle_from_address); + }, successful); + + memory::scan(XOR("GCNGPFI"), [](uint64_t address) { + global::vars::g_get_net_game_player_from_index = address; + return is_valid_ptr(global::vars::g_get_net_game_player_from_index); + }, successful); + + memory::scan(XOR("GMI"), [](uint64_t address) { + global::vars::g_get_model_info = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_get_model_info); + }, successful); + + memory::scan(XOR("SVG"), [](uint64_t address) { + global::vars::g_set_vehicle_gravity = address; + return is_valid_ptr(global::vars::g_set_vehicle_gravity); + }, successful); + + memory::scan(XOR("GVPA"), [](uint64_t address) { + global::vars::g_get_vehicle_paint_array = address; + return is_valid_ptr(global::vars::g_get_vehicle_paint_array); + }, successful); + + memory::scan(XOR("DOI"), [](uint64_t address) { + global::vars::g_draw_origin_index = memory::read_instruction(address, 2, 6); + return is_valid_ptr(global::vars::g_draw_origin_index); + }, successful); + + memory::scan(XOR("ATCT"), [](uint64_t address) { + global::vars::g_add_to_clock_time = address; + return is_valid_ptr(global::vars::g_add_to_clock_time); + }, successful); + + memory::scan(XOR("DST"), [](uint64_t address) { + global::vars::g_dispatch_service_table = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_dispatch_service_table); + }, successful); + + // TODO: Verify weather and time are gone + /*memory::scan(XOR("SCT"), [](uint64_t address) { + global::vars::g_sync_clock_time = address; + return is_valid_ptr(global::vars::g_sync_clock_time); + }, successful); + + memory::scan(XOR("SWU"), [](uint64_t address) { + global::vars::g_send_weather_update = address; + return is_valid_ptr(global::vars::g_send_weather_update); + }, successful);*/ + + memory::scan(XOR("GHNGP"), [](uint64_t address) { + global::vars::g_get_host_net_game_player = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_get_host_net_game_player); + }, successful); + + memory::scan(XOR("SISE"), [](uint64_t address) { + global::vars::g_send_increment_stat_event = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_send_increment_stat_event); + }, successful); + + memory::scan(XOR("UNOO"), [](uint64_t address) { + global::vars::g_update_net_object_owner = address; + return is_valid_ptr(global::vars::g_update_net_object_owner); + }, successful); + + memory::scan(XOR("NOM"), [](uint64_t address) { + global::vars::g_network_object_manager = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_network_object_manager); + }, successful); + + memory::scan(XOR("NPM"), [](uint64_t address) { + global::vars::g_network_player_manager = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_network_player_manager); + }, successful); + + memory::scan(XOR("HROFV"), [](uint64_t address) { + global::vars::g_handle_rotation_values_from_order = address; + return is_valid_ptr(global::vars::g_handle_rotation_values_from_order); + }, successful); + + memory::scan(XOR("GNGPFH"), [](uint64_t address) { + global::vars::g_get_net_game_player_from_handle = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_get_net_game_player_from_handle); + }, successful); + + memory::scan(XOR("GST"), [](uint64_t address) { + global::vars::g_get_sprite_texture = address; + return is_valid_ptr(global::vars::g_get_sprite_texture); + }, successful); + + memory::scan(XOR("STMNM"), [](uint64_t address) { + global::vars::g_send_text_message_net_msg = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_send_text_message_net_msg); + }, successful); + + memory::scan(XOR("STL"), [](uint64_t address) { + global::vars::g_set_traffic_lights = address; + return is_valid_ptr(global::vars::g_set_traffic_lights); + }, successful); + + memory::scan(XOR("UTL"), [](uint64_t address) { + global::vars::g_update_traffic_lights = address; + return is_valid_ptr(global::vars::g_update_traffic_lights); + }, successful); + + memory::scan(XOR("STLC"), [](uint64_t address) { + global::vars::g_set_traffic_light_colors = address; + return is_valid_ptr(global::vars::g_set_traffic_light_colors); + }, successful); + + memory::scan(XOR("SVLC"), [](uint64_t address) { + global::vars::g_set_vehicle_lights = address; + return is_valid_ptr(global::vars::g_set_vehicle_lights); + }, successful); + + memory::scan(XOR("GSTFCT"), [](uint64_t address) { + global::vars::g_get_sync_tree_from_clone_type = address; + return is_valid_ptr(global::vars::g_get_sync_tree_from_clone_type); + }, successful); + + memory::scan(XOR("GNOFNI"), [](uint64_t address) { + global::vars::g_get_network_object_from_network_id = address; + return is_valid_ptr(global::vars::g_get_network_object_from_network_id); + }, successful); + + memory::scan(XOR("RBFBB"), [](uint64_t address) { + global::vars::g_read_bool_from_bit_buffer = address; + global::vars::g_read_uint_from_bit_buffer = memory::read_instruction(address + 0x1F, 1, 5); // good + return true; + }, successful); + + memory::scan(XOR("RIFBB"), [](uint64_t address) { + global::vars::g_read_int_from_bit_buffer = memory::read_instruction(address, 1, 5); + return true; + }, successful); + + memory::scan(XOR("RV3FBB"), [](uint64_t address) { + global::vars::g_read_vector3_from_bit_buffer = address; + return true; + }, successful); + + memory::scan(XOR("RAFBB"), [](uint64_t address) { + global::vars::g_read_array_from_bit_buffer = address; + return true; + }, successful); + + memory::scan(XOR("RSFBB"), [](uint64_t address) { + global::vars::g_read_short_from_bit_buffer = address; + return true; + }, successful); + + memory::scan(XOR("RULLFBB"), [](uint64_t address) { + global::vars::g_read_ulonglong_from_bit_Buffer = address; + return true; + }, successful); + + memory::scan(XOR("RNMHFBB"), [](uint64_t address) { + global::vars::g_read_msg_header_from_bit_buffer = address; + return true; + }, successful); + + memory::scan(XOR("WUITBB"), [](uint64_t address) { + global::vars::g_write_uint_to_bit_buffer = address; + return true; + }, successful); + + memory::scan(XOR("RPFBB"), [](uint64_t address) { + global::vars::g_read_pickup_from_bit_buffer = address; + return true; + }, successful); + + memory::scan(XOR("GCFP"), [](uint64_t address) { + global::vars::g_get_network_config_from_peer = address; + return is_valid_ptr(global::vars::g_get_network_config_from_peer); + }, successful); + + memory::scan(XOR("NER"), [](uint64_t address) { + global::vars::g_network_event_registration = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_network_event_registration); + }, successful); + + memory::scan(XOR("WAYP"), [](uint64_t address) { + global::vars::g_waypoint_data = (rage::types::waypoint_data*)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_waypoint_data); + }, successful); + + memory::scan(XOR("NSQ"), [](uint64_t address) { + global::vars::g_net_shop_queue = *(rage::network::net_shop_queue**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_net_shop_queue); + }, successful); + + memory::scan(XOR("UUIV1"), [](uint64_t address) { + global::vars::g_update_ui_values = address; + return true; + }, successful); + + memory::scan(XOR("UUIV2"), [](uint64_t address) { + global::vars::g_update_ui_values_2 = address; + return true; + }, successful); + + memory::scan(XOR("UIVS"), [](uint64_t address) { + global::vars::g_ui_visual_settings = (rage::types::ui_visual_settings*)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_ui_visual_settings); + }, successful); + + memory::scan(XOR("SVNUI"), [](uint64_t address) { + global::vars::g_set_vehicle_neon_ui = address; + return true; + }, successful); + + memory::scan(XOR("VFXL"), [](uint64_t address) { + global::vars::g_vfx_liquid = (rage::types::vfx_liquid*)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_vfx_liquid); + }, successful); + + memory::scan(XOR("HVBO"), [](uint64_t address) { + global::vars::g_set_seethrough = address; + return true; + }, successful); + + memory::scan(XOR("NS_ABTQ"), [](uint64_t address) { + global::vars::g_add_basket_to_queue = address; + return true; + }, successful); + + memory::scan(XOR("NS_AITB"), [](uint64_t address) { + global::vars::g_add_item_to_basket = address; + return true; + }, successful); + + memory::scan(XOR("SSIR"), [](uint64_t address) { + global::vars::g_send_session_info_request = address; + return true; + }, successful); + + memory::scan(XOR("RSINFO"), [](uint64_t address) { + global::vars::g_rs_info = (rage::network::rs_info*)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_rs_info); + }, successful); + + memory::scan(XOR("GSIFGS"), [](uint64_t address) { + global::vars::g_get_session_info_from_gs = address; + return true; + }, successful); + + memory::scan(XOR("SNER"), [](uint64_t address) { + global::vars::g_send_network_event_reply = address; + return true; + }, successful); + + memory::scan(XOR("SNEA"), [](uint64_t address) { + global::vars::g_send_network_event_ack = address; + return true; + }, successful); + + memory::scan(XOR("SGCE"), [](uint64_t address) { + global::vars::g_setup_give_control_event = address; + return true; + }, successful); + + memory::scan(XOR("SFR"), [](uint64_t address) { + global::vars::g_send_friend_request = address; + return true; + }, successful); + + memory::scan({ XOR("E8 ? ? ? ? 89 03 85 C0 78 21 8B 13 48 8B 8F ? ? ? ? 4C 8D 84 24 ? ? ? ? 41 B9 ? ? ? ? 4C 89 6C 24 ? E8"), 0x0, XOR("GCPK"), true }, [](uint64_t address) { + global::vars::g_get_client_player_key = memory::read_instruction(address, 1, 5); + return true; + }, successful); + + memory::scan(XOR("RWOM"), [](uint64_t address) { + global::vars::g_render_water_on_map_intensity = memory::read_instruction(address, 4, 8); + return is_valid_ptr(global::vars::g_render_water_on_map_intensity); + }, successful); + + memory::scan(XOR("MFI"), [](uint64_t address) { + global::vars::g_map_fog_intensity = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_map_fog_intensity); + }, successful); + + memory::scan(XOR("VFXW"), [](uint64_t address) { + global::vars::g_vfx_wheel = { (rage::types::vfx_wheel*)memory::read_instruction(address), *(uint8_t*)(address + 0xA) }; // good + return is_valid_ptr(global::vars::g_vfx_wheel.first); + }, successful); + + memory::scan(XOR("FL"), [](uint64_t address) { + global::vars::g_friends = *(rage::network::friends**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_friends); + }, successful); + + memory::scan(XOR("SPE"), [](uint64_t address) { + global::vars::g_send_presence_event = address; + return true; + }, successful); + + memory::scan(XOR("MSH"), [](uint64_t address) { + global::vars::g_migrate_script_host = address; + return true; + }, successful); + + memory::scan(XOR("HPBR"), [](uint64_t address) { + global::vars::g_is_reported_for_reason = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_is_reported_for_reason); + }, successful); + + memory::scan(XOR("GCRASH"), [](uint64_t address) { + HANDLE thread_id = *(HANDLE*)memory::read_instruction(address); + if (thread_id) { + LOG_DEV("Suspending game crasher thread -> ID: %i", GetThreadId(thread_id)); + SuspendThread(thread_id); + } + + return true; + }, successful); + + memory::scan(XOR("CHATINF"), [](uint64_t address) { + global::vars::g_chat_info = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_chat_info); + }, successful); + + memory::scan(XOR("TEXS"), [](uint64_t address) { + global::vars::g_texture_store = (rage::types::texture_store*)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_texture_store); + }, successful); + + memory::scan(XOR("SMMR"), [](uint64_t address) { + global::vars::g_send_matchmaking_request = address; + return true; + }, successful); + + memory::scan(XOR("RXMLS"), [](uint64_t address) { + global::vars::g_read_xml_string = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_read_xml_string); + }, successful); + + memory::scan(XOR("RXMLNS"), [](uint64_t address) { + global::vars::g_read_xml_node_string = memory::read_instruction(address, 1, 5); + return is_valid_ptr(global::vars::g_read_xml_node_string); + }, successful); + + memory::scan(XOR("RYTD"), [](uint64_t address) { + global::vars::g_register_streaming_file = address; + return true; + }, successful); + + memory::scan(XOR("CGIP"), [](uint64_t address) { + global::vars::g_create_game_invite_presence = address; + return true; + }, successful); + + memory::scan(XOR("SGIP"), [](uint64_t address) { + global::vars::g_send_game_invite_presence = address; + return true; + }, successful); + + memory::scan(XOR("SGIPT"), [](uint64_t address) { + global::vars::g_send_game_invite_presence_table = memory::read_instruction(address); + return is_valid_ptr(global::vars::g_send_game_invite_presence_table); + }, successful); + + memory::scan(XOR("SRE"), [](uint64_t address) { + global::vars::g_send_ragdoll_event = address; + return true; + }, successful); + + memory::scan(XOR("NODES_1"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 11 }); + return true; + }, successful); + + memory::scan(XOR("NODES_2"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 2 }); + return true; + }, successful); + + memory::scan(XOR("NODES_3"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 10 }); + return true; + }, successful); + + memory::scan(XOR("NODES_4"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 32 }); + return true; + }, successful); + + memory::scan(XOR("NODES_5"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 11 }); + global::vars::g_return_address_node_iterations.push_back({ address + 0xBB, 3 }); + return true; + }, successful); + + memory::scan(XOR("NODES_6"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 32 }); + return true; + }, successful); + + memory::scan(XOR("NODES_7"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 30 }); + return true; + }, successful); + + memory::scan(XOR("NODES_8"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 3 }); + return true; + }, successful); + + memory::scan(XOR("NODES_9"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 105 }); + global::vars::g_return_address_node_iterations.push_back({ address + 0x4D, 65 }); // good + return true; + }, successful); + + memory::scan(XOR("NODES_10"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 10 }); + return true; + }, successful); + + memory::scan(XOR("NODES_11"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 3 }); + return true; + }, successful); + + memory::scan(XOR("NODES_12"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 11 }); + return true; + }, successful); + + memory::scan(XOR("NODES_13"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 10 }); + return true; + }, successful); + + memory::scan(XOR("NODES_14"), [](uint64_t address) { + global::vars::g_return_address_node_iterations.push_back({ address, 16 }); + return true; + }, successful); + + memory::scan(XOR("GCHP"), [](uint64_t address) { + global::vars::g_global_chat_ptr = *(uint64_t*)memory::read_instruction(address); + return true; + }, successful); + + memory::scan(XOR("APCM"), [](uint64_t address) { + global::vars::g_add_chat_message = address; + + global::vars::g_hack_patches["CHAT"].m_address = address + 0x211; + global::vars::g_hack_patches["CHAT"].m_patch = { 0xBF, 0x01, 0x00, 0x00, 0x00 }; + global::vars::g_hack_patches["CHAT"].read(5); + + return true; + }, successful); + + memory::scan(XOR("PRESFIX"), [](uint64_t address) { + global::vars::g_hack_patches["JOINP"].m_address = address; + global::vars::g_hack_patches["JOINP"].m_patch = { 0xB0, 0x01, 0x90, 0x90, 0x90 }; + global::vars::g_hack_patches["JOINP"].read(5); + return true; + }, successful); + + memory::scan(XOR("GCHATS"), [](uint64_t address) { + global::vars::g_chat_config = memory::read_instruction(address); + return true; + }, successful); + + memory::scan(XOR("GPIFNM"), [] (uint64_t address) { + global::vars::g_get_player_info_from_net_msg = address; + return true; + }, successful); + + memory::scan(XOR("GDROPS"), [] (uint64_t address) { + global::vars::g_drop_shaders = memory::read_instruction(address); + global::vars::g_drop_shader_count = memory::read_instruction(address + 0x15, 2, 6); // good + return true; + }, successful); + + memory::scan(XOR("GNMNP"), [] (uint64_t address) { + global::vars::g_get_net_msg_net_player = memory::read_instruction(address, 1, 5); + return true; + }, successful); + + memory::scan(XOR("3DPED"), [] (uint64_t address) { + global::vars::g_ui_3d_draw_manager = memory::read_instruction(address); + global::vars::g_push_scene_preset_to_manager = memory::read_instruction(address + 0x5D, 1, 5);// good + global::vars::g_add_element_to_scene = memory::read_instruction(address + 0x9F, 1, 5);// good + global::vars::g_set_scene_element_lighting = memory::read_instruction(address + 0xE4, 1, 5);// good + return true; + }, successful); + + memory::scan(XOR("INVALIDS"), [] (uint64_t address) { + global::vars::g_invalid_string_address = memory::read_instruction(address + 0x18);// good + return true; + }, successful); + + memory::scan(XOR("BB_RTOK"), [] (uint64_t address) { + global::vars::g_read_token_from_bit_buffer = address; + return true; + }, successful); + + memory::scan(XOR("BB_RST"), [] (uint64_t address) { + global::vars::g_read_string_from_bit_buffer = address; + return true; + }, successful); + + // patches + memory::scan({ XOR("48 89 5C 24 ? 57 48 83 EC 20 8B D9 E8 ? ? ? ? 84 C0 75 6A 8B CB E8"), 0xC, XOR("SPECP"), false }, [] (uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(5); + global::vars::g_patches.push_back(patch); + + memory::write_vector(address, { 0xB0, 0x00, 0x90, 0x90, 0x90 }); + return true; + }, successful); + + memory::scan(XOR("PMSP"), [](uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(2); + global::vars::g_patches.push_back(patch); + + memory::write_vector(address, { 0xEB, 0x02 }); + return true; + }, successful); + + memory::scan(XOR("MSP"), [](uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(24); + global::vars::g_patches.push_back(patch); + + memory::nop(address, 24); + return true; + }, successful); + + memory::scan(XOR("RSTRB"), [](uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(3); + global::vars::g_patches.push_back(patch); + + memory::nop(address, 3); + return true; + }, successful); + + memory::scan(XOR("RSTEB"), [](uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(3); + global::vars::g_patches.push_back(patch); + + memory::nop(address, 3); + return true; + }, successful); + + memory::scan(XOR("AOEB"), [](uint64_t address) { + patches patch; + patch.m_address = memory::read_instruction(address); + patch.read(1); + global::vars::g_patches.push_back(patch); + + memory::write(memory::read_instruction(address), (uint8_t)0x1); + return true; + }, successful); + + // added + memory::scan(XOR("NARRCF3"), [](uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(5); + global::vars::g_patches.push_back(patch); + + memory::write_vector(address, { 0xE9, 0x7C, 0x01, 0x00, 0x00 }); // cherax crash fix + return true; + }, successful); + + // added + memory::scan(XOR("CKL"), [](uint64_t address) { + patches patch; + patch.m_address = memory::read_instruction(address, 1, 5); + patch.read(3); + global::vars::g_patches.push_back(patch); + + memory::write_vector(memory::read_instruction(address, 1, 5), { 0xB0, 0x00, 0xC3 }); + return true; + }, successful); + + // added + memory::scan(XOR("CKK"), [](uint64_t address) { + patches patch; + patch.m_address = memory::read_instruction(address, 1, 5); + patch.read(3); + global::vars::g_patches.push_back(patch); + + memory::write_vector(memory::read_instruction(address, 1, 5), { 0xB0, 0x00, 0xC3 }); + return true; + }, successful); + + memory::scan(XOR("PMDN"), [](uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(1); + global::vars::g_patches.push_back(patch); + + memory::write_vector(address, { 0xC3 }); + return true; + }, successful); + + memory::scan(XOR("SPH"), [](uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(1); + global::vars::g_patches.push_back(patch); + + memory::write_vector(address, { 0xC3 }); + global::vars::g_ped_orientation_writer = address; + return true; + }, successful); + + memory::scan(XOR("SEM"), [](uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(1); + global::vars::g_patches.push_back(patch); + + memory::write_vector(address, { 0xC3 }); + global::vars::g_entity_orientation_writer = address; + return true; + }, successful); + + // added + memory::scan({ XOR("44 38 3D ? ? ? ? 74 0E B1 01 E8 ? ? ? ? 33 C9 E8"), 0x12, XOR("TCRASH"), false }, [] (uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(5); + global::vars::g_patches.push_back(patch); + + memory::nop(address, 5); + return true; + }, successful); + + memory::scan({ XOR("E8 ? ? ? ? EB 61 E8 ? ? ? ? 48 8B 0D ? ? ? ? 8B 51 20 8B 41 10 C1 E2 02 C1 FA 02 2B C2 85 C0 7E 30 E8"), 0x0, XOR("ARRC2"), false }, [] (uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(5); + global::vars::g_patches.push_back(patch); + + memory::nop(address, 5); + return true; + }, successful); + + /*memory::scan(XOR("C8"), [] (uint64_t address) { + memory::write_vector(address, { 0xB0, 0x00, 0xC3 }); + return true; + }, successful);*/ + + memory::scan({ XOR("E8 ? ? ? ? 48 8B 03 8B 97 ? ? ? ? 48 8B CB FF 90 ? ? ? ? 0F B7 83 ? ? ? ? 48 8B CB"), 0, XOR("UCRASH"), false }, [] (uint64_t address) { + patches patch; + patch.m_address = address; + patch.read(5); + global::vars::g_patches.push_back(patch); + + uint32_t jump_size = (uint32_t)((address + 0x1CF) - address - 5); + memory::write_vector(address, { 0xE9, (uint8_t)(jump_size & 0xFF), (uint8_t)(jump_size >> 8 & 0xFF), (uint8_t)(jump_size >> 16 & 0xFF), (uint8_t)(jump_size >> 24 & 0xFF) }); + + return true; + }, successful); + + return successful; + } + + bool globals_in_game() { + bool successful = true; + + /*memory::scan(XOR("RI"), [](uint64_t address) { + global::vars::g_replay_interface = *(rage::types::replay_interface**)memory::read_instruction(address, 3, 7); + return is_valid_ptr(global::vars::g_replay_interface); + }, successful);*/ + + memory::scan({ XOR("48 8B 05 ? ? ? ? 8B 78 10 85 FF"), 0, XOR("POOL_1"), true }, [] (uint64_t address) { + global::vars::g_object_pool = *(guid_pool**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_object_pool); + }, successful); + + memory::scan({ XOR("48 8B 05 ? ? ? ? 41 0F BF C8 0F BF 40 10"), 0, XOR("POOL_2"), true }, [] (uint64_t address) { + global::vars::g_ped_pool = *(guid_pool**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_ped_pool); + }, successful); + + memory::scan({ XOR("48 8B 0D ? ? ? ? 45 33 C9 44 8B C5 BA ? ? ? ? E8 ? ? ? ? 48"), 0, XOR("POOL_3"), true }, [] (uint64_t address) { + global::vars::g_vehicle_pool = *(vehicle_pool**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_vehicle_pool); + }, successful); + + memory::scan({ XOR("48 8B 05 ? ? ? ? 0F B7 48 10 66 03 CA 66 44 03 C1 41 80 F9 04"), 0, XOR("POOL_4"), true }, [] (uint64_t address) { + global::vars::g_pickup_pool = *(guid_pool**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_pickup_pool); + }, successful); + + memory::scan(XOR("EXPD"), [](uint64_t address) { + global::vars::g_explosion_data = *(rage::types::explosion_data**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_explosion_data); + }, successful); + + memory::scan(XOR("EXPFX"), [](uint64_t address) { + global::vars::g_explosion_fx = *(rage::types::explosion_fx**)(memory::read_instruction(address) + 0x10); + return is_valid_ptr(global::vars::g_explosion_fx); + }, successful); + + memory::scan(XOR("NBC"), [](uint64_t address) { + global::vars::g_network_base_config = *(rage::network::network_base_config**)(memory::read_instruction(address)); + return is_valid_ptr(global::vars::g_network_base_config); + }, successful); + + memory::scan(XOR("OQ"), [](uint64_t address) { + global::vars::g_ocean_quads.m_ocean = (rage::types::ocean_quad_info*)memory::read_instruction(address); + global::vars::g_ocean_quads.m_calming = (rage::types::ocean_quad_info*)memory::read_instruction(address + 0xC); + global::vars::g_ocean_quads.m_wave = (rage::types::ocean_quad_info*)memory::read_instruction(address + 0x25); + return true; + }, successful); + + memory::scan(XOR("WT"), [](uint64_t address) { + global::vars::g_water_tune = (rage::types::water_tune*)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_water_tune); + }, successful); + + memory::scan(XOR("VFX-S"), [](uint64_t address) { + global::vars::g_ui_weather = (rage::types::ui_weather*)(memory::read_instruction(address) + 0x60); + return is_valid_ptr(global::vars::g_ui_weather); + }, successful); + + memory::scan(XOR("VFX-P"), [](uint64_t address) { + global::vars::g_ui_puddle = *(rage::types::ui_puddle**)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_ui_puddle); + }, successful); + + memory::scan(XOR("RESOL"), [](uint64_t address) { + uint64_t info = memory::read_instruction(address); + if (info) { + RECT desktop; + GetWindowRect(GetDesktopWindow(), &desktop); + global::vars::g_resolution = { *(int*)(info), *(int*)(info + 4) }; + global::vars::g_desktop_resolution = { (int)desktop.right, (int)desktop.bottom }; + + LOG_WARN("Game Resolution: %ix%i, Screen Resolution: %ix%i", + global::vars::g_resolution.x, global::vars::g_resolution.y, + global::vars::g_desktop_resolution.x, global::vars::g_desktop_resolution.y); + } + + return true; + }, successful); + + memory::scan(XOR("BL"), [](uint64_t address) { + global::vars::g_blip_list = (rage::types::blip_list*)memory::read_instruction(address); + return is_valid_ptr(global::vars::g_blip_list); + }, successful); + + memory::scan(XOR("SHP"), [](uint64_t address) { + global::vars::g_script_handlers = { memory::read_instruction(address), *(uint64_t*)(memory::read_instruction(address) - 8) }; + return true; + }, successful); + + memory::scan(XOR("INVPLY"), [] (uint64_t address) { + global::vars::g_invite_player = address; + return true; + }, successful); + + return successful; + } + + bool hooks() { + bool successful = true; + uint64_t host_join_request_from = 0; + uint64_t host_join_request_to = 0; + + if (global::vars::g_steam) { + memory::scan({ XOR("E8 ? ? ? ? 44 8B E0 85 C0 0F 84 ? ? ? ? 49 8B 8D ? ? ? ? E8 ? ? ? ? 84 C0 0F 85 ? ? ? ? 49 8B 8D"), 0x0, XOR("TIMELOLSF"), true }, [] (uint64_t address) { + g_timeout_fix_funcs[5] = memory::read_instruction(address, 1, 5); + return true; + }, successful); + + memory::scan({ XOR("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B D9 48 8B 89 ? ? ? ? E8 ? ? ? ? 84 C0 75 07 32 C0 E9 ? ? ? ? 48 8B 05"), 0x0, XOR("TIMELOLS"), true }, [] (uint64_t address) { + g_timeout_fix_funcs[0] = memory::read_instruction(address + 0x1E, 1, 5); + g_timeout_fix_funcs[1] = memory::read_instruction(address + 0x2E); + g_timeout_fix_funcs[2] = memory::read_instruction(address + 0x3C); + g_timeout_fix_funcs[3] = memory::read_instruction(address + 0x55, 1, 5); + + return hooking::detour(XOR("TIMELOLS"), address, &join_timeout_fix, &join_timeout_fix_t); + }, successful); + } else { + memory::scan({ XOR("E8 ? ? ? ? 44 8B E0 85 C0 0F 84 ? ? ? ? 49 8B 4D 20 E8 ? ? ? ? 84 C0 0F 85 ? ? ? ? 49 8B 4D 20 E8 ? ? ? ? 84 C0"), 0x0, XOR("TIMELOLSF"), true }, [] (uint64_t address) { + g_timeout_fix_funcs[5] = memory::read_instruction(address, 1, 5); + return true; + }, successful); + + memory::scan({ XOR("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B D9 48 8B 49 20 E8 ? ? ? ? 84 C0 75 07 32 C0 E9 ? ? ? ? 48 8B 05 ? ? ? ? 48 83"), 0x0, XOR("TIMELOL"), true }, [] (uint64_t address) { + g_timeout_fix_funcs[0] = memory::read_instruction(address + 0x1B, 1, 5); + g_timeout_fix_funcs[1] = memory::read_instruction(address + 0x2B); + g_timeout_fix_funcs[2] = memory::read_instruction(address + 0x39); + g_timeout_fix_funcs[3] = memory::read_instruction(address + 0x52, 1, 5); + + return hooking::detour(XOR("TIMELOL"), address, &join_timeout_fix, &join_timeout_fix_t); + }, successful); + } + + memory::scan(XOR("RUTDRB"), [] (uint64_t address) { + global::vars::g_sync_data_reader_vtable = memory::read_instruction(address); + + return hooking::vmt(XOR("BB_1"), global::vars::g_sync_data_reader_vtable, 1, &read_unsigned_int_from_buffer, &read_unsigned_int_from_buffer_t) + && hooking::vmt(XOR("BB_2"), global::vars::g_sync_data_reader_vtable, 2, &read_unsigned_short_from_buffer, &read_unsigned_short_from_buffer_t) + && hooking::vmt(XOR("BB_3"), global::vars::g_sync_data_reader_vtable, 3, &read_unsigned_char_from_buffer, &read_unsigned_char_from_buffer_t) + && hooking::vmt(XOR("BB_4"), global::vars::g_sync_data_reader_vtable, 4, &read_int_from_buffer, &read_int_from_buffer_t) + && hooking::vmt(XOR("BB_5"), global::vars::g_sync_data_reader_vtable, 5, &read_short_from_buffer, &read_short_from_buffer_t) + && hooking::vmt(XOR("BB_6"), global::vars::g_sync_data_reader_vtable, 6, &read_char_from_buffer, &read_char_from_buffer_t) + && hooking::vmt(XOR("BB_7"), global::vars::g_sync_data_reader_vtable, 7, &read_bool_from_buffer, &read_bool_from_buffer_t) + && hooking::vmt(XOR("BB_8"), global::vars::g_sync_data_reader_vtable, 8, &read_long_long_from_buffer, &read_long_long_from_buffer_t) + && hooking::vmt(XOR("BB_9"), global::vars::g_sync_data_reader_vtable, 9, &read_int_from_buffer, &read_int_from_buffer_t) + && hooking::vmt(XOR("BB_10"), global::vars::g_sync_data_reader_vtable, 10, &read_short_from_buffer, &read_short_from_buffer_t) + && hooking::vmt(XOR("BB_11"), global::vars::g_sync_data_reader_vtable, 11, &read_char_from_buffer, &read_char_from_buffer_t) + && hooking::vmt(XOR("BB_12"), global::vars::g_sync_data_reader_vtable, 12, &read_unsigned_long_long_from_buffer, &read_unsigned_long_long_from_buffer_t) + && hooking::vmt(XOR("BB_13"), global::vars::g_sync_data_reader_vtable, 13, &read_unsigned_int_from_buffer, &read_unsigned_int_from_buffer_t) + && hooking::vmt(XOR("BB_14"), global::vars::g_sync_data_reader_vtable, 14, &read_unsigned_short_from_buffer, &read_unsigned_short_from_buffer_t) + && hooking::vmt(XOR("BB_15"), global::vars::g_sync_data_reader_vtable, 15, &read_unsigned_char_from_buffer, &read_unsigned_char_from_buffer_t) + && hooking::vmt(XOR("BB_16"), global::vars::g_sync_data_reader_vtable, 16, &read_float_from_buffer, &read_float_from_buffer_t) + && hooking::vmt(XOR("BB_17"), global::vars::g_sync_data_reader_vtable, 17, &read_unsigned_float_from_buffer, &read_unsigned_float_from_buffer_t) + && hooking::vmt(XOR("BB_18"), global::vars::g_sync_data_reader_vtable, 18, &read_network_id_from_buffer, &read_network_id_from_buffer_t) + && hooking::vmt(XOR("BB_19"), global::vars::g_sync_data_reader_vtable, 23, &read_array_from_buffer, &read_array_from_buffer_t) + && hooking::vmt(XOR("BB_20"), global::vars::g_sync_data_reader_vtable, 24, &read_string_from_buffer, &read_string_from_buffer_t); + }, successful); + + memory::scan({ XOR("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 E8 ? ? ? ? 48 8B B8 ? ? ? ? 48"), 0x0, XOR("BROADVAR"), false }, [] (uint64_t address) { + g_get_current_gta_thread = memory::read_instruction(address + 0x14, 1, 5); + return hooking::detour(XOR("BROADVAR"), address, &network_has_received_host_broadcast_data, &network_has_received_host_broadcast_data_t); + }, successful); + + memory::scan(XOR("PCC"), [] (uint64_t address) { + return hooking::detour(XOR("PCC"), address, &pack_clone_create, &pack_clone_create_t); + }, successful); + + memory::scan(XOR("PCS"), [] (uint64_t address) { + return hooking::detour(XOR("PCS"), address, &pack_clone_sync, &pack_clone_sync_t); + }, successful); + + memory::scan(XOR("PLPSOM"), [] (uint64_t address) { + return hooking::detour(XOR("PLPSOM"), address, &player_peer_something, &player_peer_something_t); + }, successful); + + memory::scan(XOR("RJRESP"), [] (uint64_t address) { + return hooking::detour(XOR("RJRESP"), memory::read_instruction(address, 1, 5), &read_join_response, &read_join_response_t); + }, successful); + + memory::scan(XOR("SJRESP"), [] (uint64_t address) { + return hooking::detour(XOR("SJRESP"), memory::read_instruction(address, 1, 5), &send_join_response, &send_join_response_t); + }, successful); + + memory::scan(XOR("GPT"), [] (uint64_t address) { + return hooking::detour(XOR("GPT"), address, &get_peer_address, &get_peer_address_t); + }, successful); + + memory::scan(XOR("RCS"), [](uint64_t address) { + global::vars::g_parse_nodes = memory::read_instruction(address + 0x4C, 1, 5); + + patches patch; + patch.m_address = address + 0x4C; + patch.read(5); + global::vars::g_patches.push_back(patch); + + memory::nop(patch.m_address, 5); + + receive_clone_sync_t = (decltype(receive_clone_sync_t))address; + return true; + }, successful); + + memory::scan({ XOR("48 89 5C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 45 33 E4 4C 8B F2 4C 8B F9 4C 39 22 0F 84"), 0x0, XOR("RCSCA"), false }, [] (uint64_t address) { + g_rcs_caller_functions[0] = memory::read_instruction(address + 0x84, 1, 5); + g_rcs_caller_functions[1] = memory::read_instruction(address + 0x12F, 1, 5); + g_rcs_caller_functions[2] = memory::read_instruction(address + 0x36E, 1, 5); + g_rcs_caller_functions[3] = memory::read_instruction(address + 0x1E6, 1, 5); + g_rcs_caller_functions[4] = memory::read_instruction(address + 0x1CA, 2, 6); + global::vars::g_read_byte_from_bit_buffer = memory::read_instruction(address + 0x25B, 1, 5); + + return hooking::detour(XOR("RCSC"), address, &receive_clone_sync_caller, &receive_clone_sync_caller_t); + }, successful); + + memory::scan(XOR("RCC"), [](uint64_t address) { + patches patch; + patch.m_address = address + 0x180; + patch.read(5); + global::vars::g_patches.push_back(patch); + + memory::nop(patch.m_address, 5); + + return hooking::detour(XOR("RCC"), address, &receive_clone_create, &receive_clone_create_t); + }, successful); + + memory::scan(XOR("RCR"), [](uint64_t address) { + return hooking::detour(XOR("RCR"), address, &receive_clone_remove, &receive_clone_remove_t); + }, successful); + + memory::scan(XOR("RBV"), [](uint64_t address) { + return hooking::detour(XOR("RBV"), address, &receive_broadcast, &receive_broadcast_t); + }, successful); + + memory::scan(XOR("HNE"), [](uint64_t address) { + return hooking::detour(XOR("HNE"), address, &receive_network_event, &receive_network_event_t); + }, successful); + + memory::scan(XOR("RCMBB"), [](uint64_t address) { + patches patch; + patch.m_address = address + 0x3C; + patch.read(9); + global::vars::g_patches.push_back(patch); + + memory::nop(address + 0x3C, 9); + + return hooking::detour(XOR("RCMBB"), memory::read_instruction(address, 1, 5), &read_chat_message, &read_chat_message_t); + }, successful); + + memory::scan(XOR("RSIR"), [](uint64_t address) { + return hooking::detour(XOR("RSIR"), address, &receive_session_info, &receive_session_info_t); + }, successful); + + memory::scan(XOR("HHJR_1"), [&](uint64_t address) { + host_join_request_from = address; + return is_valid_ptr(address); + }, successful); + + memory::scan(XOR("HHJR_2"), [&](uint64_t address) { + host_join_request_to = address; + return is_valid_ptr(address); + }, successful); + + memory::scan(XOR("SJRM"), [](uint64_t address) { + return hooking::detour(XOR("SJRM"), memory::read_instruction(address, 1, 5), &send_join_request_message, &send_join_request_message_t); + }, successful); + + memory::scan(XOR("HNGE"), [](uint64_t address) { + return hooking::detour(XOR("HNGE"), address, &process_game_event, &process_game_event_t); + }, successful); + + memory::scan(XOR("HMNSH"), [](uint64_t address) { + global::vars::g_read_new_script_host_message = memory::read_instruction(address, 1, 5); + return hooking::detour(XOR("HMNSH"), address - 0x6D, &read_new_script_host_message, &read_new_script_host_message_t); // good + }, successful); + + memory::scan(XOR("UPSS"), [](uint64_t address) { + return hooking::detour(XOR("UPSS"), address, &update_player_script_status, &update_player_script_status_t); + }, successful); + + memory::scan(XOR("RTMBB"), [] (uint64_t address) { + return hooking::detour(XOR("RTMBB"), memory::read_instruction(address, 1, 5), &receive_text_message, &receive_text_message_t); + }, successful); + + memory::scan(XOR("HPE"), [] (uint64_t address) { + return hooking::detour(XOR("HPE"), memory::read_instruction(address, 1, 5), &receive_presence_event, &receive_presence_event_t); + }, successful); + + memory::scan(XOR("RBLM"), [] (uint64_t address) { + return hooking::detour(XOR("RBLM"), address, &read_blacklist_message, &read_blacklist_message_t); + }, successful); + + memory::scan(XOR("GFI"), [](uint64_t address) { + return hooking::detour(XOR("GFI"), address, &get_font_id, &get_font_id_t); + }, successful); + + memory::scan(XOR("RSTS"), [](uint64_t address) { + return hooking::detour(XOR("RSTS"), address, &render_script_textures, &render_script_textures_t); + }, successful); + + memory::scan(XOR("GNGRCT"), [](uint64_t address) { + return hooking::detour(XOR("GNGRCT"), address, &get_next_grc_texture, &get_next_grc_texture_t); + }, successful); + + memory::scan(XOR("RSRP"), [] (uint64_t address) { + global::vars::g_reset_script_render_params[0] = memory::read_instruction(address, 2, 6);// good + global::vars::g_reset_script_render_params[1] = memory::read_instruction(address + 6, 2, 6);// good + return hooking::detour(XOR("RSRP"), address, &reset_script_render_params, &reset_script_render_params_t); + }, successful); + + memory::scan(XOR("GNMTI"), [](uint64_t address) { + return hooking::detour(XOR("GNMTI"), address, &get_next_marker_texture_index, &get_next_marker_texture_index_t); + }, successful); + + memory::scan(XOR("TMTS"), [](uint64_t address) { + return hooking::detour(XOR("TMTS"), address, &translate_marker_to_screen, &translate_marker_to_screen_t); + }, successful); + + memory::scan(XOR("RMTS"), [](uint64_t address) { + return hooking::detour(XOR("RMTS"), address, &render_markers_to_screen, &render_markers_to_screen_t); + }, successful); + + memory::scan(XOR("AMTT"), [](uint64_t address) { + return hooking::detour(XOR("AMTT"), address, &add_marker_to_table, &add_marker_to_table_t); + }, successful); + + memory::scan(XOR("FGES"), [](uint64_t address) { + return hooking::detour(XOR("FGES"), address, &format_engine_string, &format_engine_string_t); + }, successful); + + memory::scan(XOR("GGESLC"), [](uint64_t address) { + return hooking::detour(XOR("GGESLC"), address, &get_engine_string_line_count, &get_engine_string_line_count_t); + }, successful); + + memory::scan(XOR("SBULLET"), [](uint64_t address) { + return hooking::detour(XOR("SBULLET"), address, &shoot_bullet, &shoot_bullet_t); + }, successful); + + memory::scan(XOR("PRU"), [](uint64_t address) { + return hooking::detour(XOR("PRU"), address, &process_relay_usage, &process_relay_usage_t); + }, successful); + + memory::scan(XOR("APPI"), [](uint64_t address) { + return hooking::detour(XOR("APPI"), address, &apply_player_physical_index, &apply_player_physical_index_t); + }, successful); + + memory::scan(XOR("WPGDN"), [](uint64_t address) { + return hooking::detour(XOR("WPGDN"), address, &write_player_game_state_data_node, &write_player_game_state_data_node_t); + }, successful); + + memory::scan(XOR("WPHDN"), [](uint64_t address) { + return hooking::detour(XOR("WPHDN"), address, &write_ped_health_data_node, &write_ped_health_data_node_t); + }, successful); + + memory::scan(XOR("SPROJ"), [](uint64_t address) { + return hooking::detour(XOR("SPROJ"), memory::read_instruction(address, 1, 5), &shoot_projectile, &shoot_projectile_t); + }, successful); + + memory::scan(XOR("WGSITEM"), [](uint64_t address) { + global::vars::g_write_gs_item = address; + return hooking::detour(XOR("WGSITEM"), address, &write_gs_item, &write_gs_item_t); + }, successful); + + memory::scan(XOR("RMMR"), [](uint64_t address) { + return hooking::detour(XOR("RMMR"), address, &read_matchmaking_response, &read_matchmaking_response_t); + }, successful); + + memory::scan(XOR("WMMR"), [](uint64_t address) { + return hooking::detour(XOR("WMMR"), address, &write_matchmaking_request, &write_matchmaking_request_t); + }, successful); + + memory::scan(XOR("WESTR"), [](uint64_t address) { + return hooking::detour(XOR("WESTR"), memory::read_instruction(address, 1, 5), &write_encrypted_string_to_request, &write_encrypted_string_to_request_t); + }, successful); + + memory::scan(XOR("SGCM"), [](uint64_t address) { + global::vars::g_send_global_chat_message = memory::read_instruction(address, 1, 5); + return hooking::detour(XOR("SGCM"), global::vars::g_send_global_chat_message, &send_global_chat_message, &send_global_chat_message_t); + }, successful); + + memory::scan(XOR("GGXTL"), [](uint64_t address) { + return hooking::detour(XOR("GGXTL"), address, &get_gxt_label, &get_gxt_label_t); + }, successful); + + // + memory::scan(XOR("GGXTLFH"), [](uint64_t address) { + return hooking::detour(XOR("GGXTLFH"), address, &get_gxt_label_from_hash, &get_gxt_label_from_hash_t); + }, successful); + + memory::scan(XOR("SCPCSC"), [](uint64_t address) { + return hooking::detour(XOR("SCPCSC"), address, &check_chat_profanity, &check_chat_profanity_t); + }, successful); + + memory::scan(XOR("SCPCS"), [](uint64_t address) { + return hooking::detour(XOR("SCPCS"), address, &check_string_profanity, &check_string_profanity_t); + }, successful); + + memory::scan(XOR("SAGTSC"), [](uint64_t address) { + return hooking::detour(XOR("SAGTSC"), address, &send_add_gamer_to_session, &send_add_gamer_to_session_t); + }, successful); + + memory::scan(XOR("HRP"), [](uint64_t address) { + return hooking::detour(XOR("HRP"), address, &has_ros_privilege, &has_ros_privilege_t); + }, successful); + + memory::scan(XOR("PDN1"), [](uint64_t address) { + return hooking::detour(XOR("PDN1"), address, &compress_data_node, &compress_data_node_t); + }, successful); + + memory::scan(XOR("PDN2"), [](uint64_t address) { + return hooking::detour(XOR("PDN2"), address, &compress_data_node2, &compress_data_node2_t); + }, successful); + + memory::scan(XOR("PGDN"), [](uint64_t address) { + return hooking::detour(XOR("PGDN"), address, &write_player_gamer_data_node, &write_player_gamer_data_node_t); + }, successful); + + memory::scan(XOR("AWM"), [](uint64_t address) { + return hooking::detour(XOR("AWM"), address, &apply_weather_meta, &apply_weather_meta_t); + }, successful); + + memory::scan(XOR("HMKP"), [](uint64_t address) { + return hooking::detour(XOR("HMKP"), address, &read_kick_player_message, &read_kick_player_message_t); + }, successful); + + memory::scan({ "48 8D 05 ? ? ? ? 48 8D 54 24 ? 48 8B CB 48 89 44 24 ? 48 89 7C 24 ? C6 44 24 ? ? E8 ? ? ? ? 48 8B", 0, XOR("WUTDRB"), true }, [] (uint64_t address) { + global::vars::g_sync_data_writer_vtable = memory::read_instruction(address); + + return hooking::vmt(XOR("BBW_1"), global::vars::g_sync_data_writer_vtable, 1, &write_unsigned_int_from_buffer, &write_unsigned_int_from_buffer_t) + && hooking::vmt(XOR("BBW_19"), global::vars::g_sync_data_writer_vtable, 23, &write_array_from_buffer, &write_array_from_buffer_t); + }, successful); + + memory::scan(XOR("BB_C"), [](uint64_t address) { + uint64_t _class = memory::read_instruction(address + 0x7B); + + return hooking::detour(XOR("BB_C"), address, &construct_in_frame, &construct_in_frame_t) + && hooking::detour(XOR("BB_D"), *(uint64_t*)_class, &destruct_in_frame, &destruct_in_frame_t); + }, successful); + + hooking::detour(XOR("GPADDR"), (uint64_t)&GetProcAddress, &get_proc_address, &get_proc_address_t); + + memory::scan(XOR("STT"), [](uint64_t address) { + return hooking::detour(XOR("STT"), address, &tick_script_thread__crash, &tick_script_thread__crash_t); + }, successful); + + memory::scan(XOR("C1"), [](uint64_t address) { + return hooking::detour(XOR("C1"), address, &apply_vehicle_data__crash, &apply_vehicle_data__crash_t); + }, successful); + + memory::scan(XOR("C2"), [](uint64_t address) { + return hooking::detour(XOR("C2"), address, &attach_trailer__crash, &attach_trailer__crash_t); + }, successful); + + memory::scan(XOR("C3"), [](uint64_t address) { + return hooking::detour(XOR("C3"), address, &attach_trailer_audio__crash, &attach_trailer_audio__crash_t); + }, successful); + + memory::scan(XOR("RID0"), [](uint64_t address) { + return hooking::detour(XOR("RID0"), address, &rid0__crash, &rid0__crash_t); + }, successful); + + memory::scan(XOR("C4"), [](uint64_t address) { + global::vars::g_game_script_handler_manager = memory::read_instruction(address + 0x1F); + return hooking::detour(XOR("C4"), address, &destruct_script_handler__crash, &destruct_script_handler__crash_t); + }, successful); + + memory::scan(XOR("C5"), [](uint64_t address) { + return hooking::detour(XOR("C5"), address, &shit_scripts__crash, &shit_scripts__crash_t); + }, successful); + + memory::scan(XOR("C6"), [] (uint64_t address) { + return hooking::detour(XOR("C6"), address, &shit_scripts2__crash, &shit_scripts2__crash_t); + }, successful); + + memory::scan(XOR("C7"), [] (uint64_t address) { + return hooking::detour(XOR("C7"), address, &sub_140AD8424__crash, &sub_140AD8424__crash_t); + }, successful); + + memory::scan(XOR("SULL"), [](uint64_t address) { + global::vars::g_arxan_restore_addresses[0] = address; + memcpy(global::vars::g_arxan_restore_bytes[0][0], (void*)address, sizeof(global::vars::g_arxan_restore_bytes[0][0])); + hooking::detour(XOR("SULL"), address, &write_net_msg_identifier, &write_net_msg_identifier_t); + memcpy(global::vars::g_arxan_restore_bytes[0][1], (void*)address, sizeof(global::vars::g_arxan_restore_bytes[0][1])); + return true; + }, successful); + + memory::scan(XOR("WDD"), [](uint64_t address) { + global::vars::g_arxan_restore_addresses[1] = address; + memcpy(global::vars::g_arxan_restore_bytes[1][0], (void*)address, sizeof(global::vars::g_arxan_restore_bytes[1][0])); + hooking::detour(XOR("WDD"), address, &write_ulonglong_to_bit_buffer, &write_ulonglong_to_bit_buffer_t); + memcpy(global::vars::g_arxan_restore_bytes[1][1], (void*)address, sizeof(global::vars::g_arxan_restore_bytes[1][1])); + return true; + }, successful); + + if (global::vars::g_steam) { + memory::scan({ XOR("E9 03 9C 89 FF"), 0, XOR("ARXAN1-1"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN1-1"), address, &arxan_integrity_start1, &arxan_integrity_start1_t); + }, successful); + + memory::scan({ XOR("E9 1C 99 4F FF"), 0, XOR("ARXAN1-2"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN1-2"), address, &arxan_integrity_end1, &arxan_integrity_end1_t); + }, successful); + + memory::scan({ XOR("E9 25 4A FA FF"), 0, XOR("ARXAN2-1"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN2-1"), address, &arxan_integrity_start2, &arxan_integrity_start2_t); + }, successful); + + memory::scan({ XOR("E9 26 AB 6F FE"), 0, XOR("ARXAN2-2"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN2-2"), address, &arxan_integrity_end2, &arxan_integrity_end2_t); + }, successful); + + memory::scan({ XOR("E9 AA F9 06 01"), 0, XOR("ARXAN3-1"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN3-1"), address, &arxan_integrity_start3, &arxan_integrity_start3_t); + }, successful); + + memory::scan({ XOR("E9 5E 69 62 FD"), 0, XOR("ARXAN3-2"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN3-2"), address, &arxan_integrity_end3, &arxan_integrity_end3_t); + }, successful); + + memory::scan({ XOR("E9 01 BC F2 02"), 0, XOR("ARXAN4-1"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN4-1"), address, &arxan_integrity_start4, &arxan_integrity_start4_t); + }, successful); + + memory::scan({ XOR("E9 04 E2 00 00"), 0, XOR("ARXAN4-2"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN4-2"), address, &arxan_integrity_end4, &arxan_integrity_end4_t); + }, successful); + + memory::scan({ XOR("E9 08 46 FD FF"), 0, XOR("ARXAN5-1"), true }, [] (uint64_t address) { + return hooking::detour(XOR("ARXAN5-1"), address, &arxan_integrity_start5, &arxan_integrity_start5_t); + }, successful); + + memory::scan({ XOR("E9 33 FF FF FF 48 89 5C 24 18"), 0, XOR("ARXAN5-2"), true }, [] (uint64_t address) { + return hooking::detour(XOR("ARXAN5-2"), address, &arxan_integrity_end5, &arxan_integrity_end5_t); + }, successful); + } else { + memory::scan({ XOR("E9 01 57 5A FF"), 0, XOR("ARXAN1-1"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN1-1"), address, &arxan_integrity_start1, &arxan_integrity_start1_t); + }, successful); + + memory::scan({ XOR("E9 DE B2 E0 00"), 0, XOR("ARXAN1-2"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN1-2"), address, &arxan_integrity_end1, &arxan_integrity_end1_t); + }, successful); + + memory::scan({ XOR("E9 E2 17 36 00"), 0, XOR("ARXAN2-1"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN2-1"), address, &arxan_integrity_start2, &arxan_integrity_start2_t); + }, successful); + + memory::scan({ XOR("E9 BA 1F 08 FD"), 0, XOR("ARXAN2-2"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN2-2"), address, &arxan_integrity_end2, &arxan_integrity_end2_t); + }, successful); + + memory::scan({ XOR("E9 2B 48 3D FF"), 0, XOR("ARXAN3-1"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN3-1"), address, &arxan_integrity_start3, &arxan_integrity_start3_t); + }, successful); + + memory::scan({ XOR("E9 4B 1D 8E 00"), 0, XOR("ARXAN3-2"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN3-2"), address, &arxan_integrity_end3, &arxan_integrity_end3_t); + }, successful); + + memory::scan({ XOR("E9 07 A5 25 00"), 0, XOR("ARXAN4-1"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN4-1"), address, &arxan_integrity_start4, &arxan_integrity_start4_t); + }, successful); + + memory::scan({ XOR("E9 C2 A7 7A 00"), 0, XOR("ARXAN4-2"), true }, [](uint64_t address) { + return hooking::detour(XOR("ARXAN4-2"), address, &arxan_integrity_end4, &arxan_integrity_end4_t); + }, successful); + } + + return successful; + } +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/hooks.h b/GTAV/src/menu/hooks/hooks.h new file mode 100644 index 0000000..72dbcac --- /dev/null +++ b/GTAV/src/menu/hooks/hooks.h @@ -0,0 +1,358 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/network_types.h" +#include "rage/invoker/invoker.h" + +namespace menu::hooks { + extern uint64_t g_rcs_caller_functions[5]; + + void wait(rage::invoker::native_context*); + void stat_get_int(rage::invoker::native_context*); + void set_current_ped_weapon(rage::invoker::native_context*); + void disable_control_action(rage::invoker::native_context*); + void set_warning_message_2(rage::invoker::native_context*); + void terminate_this_thread(rage::invoker::native_context*); + + // anti-cheat start + void add_metric_to_json_array(uint32_t ecx, uint64_t rdx, uint64_t r8, rage::network::metric* metric); + inline decltype(&add_metric_to_json_array) add_metric_to_json_array_t; + + void rockstar_integrity(uint64_t rcx); + inline decltype(&rockstar_integrity) rockstar_integrity_t; + + void send_network_event(uint64_t table, uint64_t event); + inline decltype(&send_network_event) send_network_event_t; + + bool process_transaction_id(uint64_t manager, int id, uint64_t table); + inline decltype(&process_transaction_id) process_transaction_id_t; + + BOOL get_thread_context(HANDLE thread, LPCONTEXT context); + inline decltype(&get_thread_context) get_thread_context_t; + // anti-cheat end + + void pack_clone_create(uint64_t _this, rage::network::net_object* net_obj, rage::network::net_game_player* player, uint64_t sync_data); + inline decltype(&pack_clone_create) pack_clone_create_t; + + bool pack_clone_sync(uint64_t _this, rage::network::net_object* net_obj, rage::network::net_game_player* net_game_player); + inline decltype(&pack_clone_sync) pack_clone_sync_t; + + void* get_font_id(uint64_t font, int id); + inline decltype(&get_font_id) get_font_id_t; + + uint64_t format_engine_string(uint64_t rcx, uint64_t rdx, uint32_t r8d, const char* r9, uint32_t stack); + inline decltype(&format_engine_string) format_engine_string_t; + + int get_engine_string_line_count(uint64_t rcx, const char* rdx, float xmm2, uint64_t r9, bool stack); + inline decltype(&get_engine_string_line_count) get_engine_string_line_count_t; + + FARPROC get_proc_address(HMODULE mod, LPCSTR name); + inline decltype(&get_proc_address) get_proc_address_t; + + bool shoot_bullet(rage::types::weapon* weapon, uint64_t shooter_info, math::vector3_* start_pos, math::vector3_* end_pos); + inline decltype(&shoot_bullet) shoot_bullet_t; + + bool shoot_projectile(rage::types::weapon* weapon, uint64_t shooter_info, math::vector3_* start_pos, math::vector3_* end_pos); + inline decltype(&shoot_projectile) shoot_projectile_t; + + bool render_script_textures(uint64_t table, uint32_t edx, uint32_t r8d); + inline decltype(&render_script_textures) render_script_textures_t; + + uint64_t get_next_grc_texture(uint64_t table); + inline decltype(&get_next_grc_texture) get_next_grc_texture_t; + + void reset_script_render_params(); + inline decltype(&reset_script_render_params) reset_script_render_params_t; + + int get_next_marker_texture_index(rage::types::marker_table* table); + inline decltype(&get_next_marker_texture_index) get_next_marker_texture_index_t; + + void translate_marker_to_screen(rage::types::marker_table* table); + inline decltype(&translate_marker_to_screen) translate_marker_to_screen_t; + + void render_markers_to_screen(rage::types::marker_table* table); + inline decltype(&render_markers_to_screen) render_markers_to_screen_t; + + int add_marker_to_table(rage::types::marker_table* table, uint64_t marker); + inline decltype(&add_marker_to_table) add_marker_to_table_t; + + bool read_unsigned_int_from_buffer(rage::bit_buffer_sync_instance* _this, uint32_t* output, int count); + inline decltype(&read_unsigned_int_from_buffer) read_unsigned_int_from_buffer_t; + + bool read_unsigned_short_from_buffer(rage::bit_buffer_sync_instance* _this, uint16_t* output, int count); + inline decltype(&read_unsigned_short_from_buffer) read_unsigned_short_from_buffer_t; + + bool read_unsigned_char_from_buffer(rage::bit_buffer_sync_instance* _this, uint8_t* output, int count); + inline decltype(&read_unsigned_char_from_buffer) read_unsigned_char_from_buffer_t; + + bool read_int_from_buffer(rage::bit_buffer_sync_instance* _this, int* output, int count); + inline decltype(&read_int_from_buffer) read_int_from_buffer_t; + + bool read_short_from_buffer(rage::bit_buffer_sync_instance* _this, short* output, int count); + inline decltype(&read_short_from_buffer) read_short_from_buffer_t; + + bool read_char_from_buffer(rage::bit_buffer_sync_instance* _this, char* output, int count); + inline decltype(&read_char_from_buffer) read_char_from_buffer_t; + + bool read_bool_from_buffer(rage::bit_buffer_sync_instance* _this, bool* output); + inline decltype(&read_bool_from_buffer) read_bool_from_buffer_t; + + bool read_long_long_from_buffer(rage::bit_buffer_sync_instance* _this, long long* output, int count); + inline decltype(&read_long_long_from_buffer) read_long_long_from_buffer_t; + + bool read_unsigned_long_long_from_buffer(rage::bit_buffer_sync_instance* _this, uint64_t* output, int count); + inline decltype(&read_unsigned_long_long_from_buffer) read_unsigned_long_long_from_buffer_t; + + bool read_float_from_buffer(rage::bit_buffer_sync_instance* _this, float* output, float mod, int count); + inline decltype(&read_float_from_buffer) read_float_from_buffer_t; + + bool read_unsigned_float_from_buffer(rage::bit_buffer_sync_instance* _this, float* output, float mod, int count); + inline decltype(&read_unsigned_float_from_buffer) read_unsigned_float_from_buffer_t; + + bool read_network_id_from_buffer(rage::bit_buffer_sync_instance* _this, short* output); + inline decltype(&read_network_id_from_buffer) read_network_id_from_buffer_t; + + bool read_array_from_buffer(rage::bit_buffer_sync_instance* _this, int* output, int count, int unk); + inline decltype(&read_array_from_buffer) read_array_from_buffer_t; + + bool read_string_from_buffer(rage::bit_buffer_sync_instance* _this, char* output, int length); + inline decltype(&read_string_from_buffer) read_string_from_buffer_t; + + bool write_unsigned_int_from_buffer(rage::bit_buffer_sync_instance* _this, uint32_t* output, int count); + inline decltype(&write_unsigned_int_from_buffer) write_unsigned_int_from_buffer_t; + + bool write_unsigned_short_from_buffer(rage::bit_buffer_sync_instance* _this, uint16_t* output, int count); + inline decltype(&write_unsigned_short_from_buffer) write_unsigned_short_from_buffer_t; + + bool write_unsigned_char_from_buffer(rage::bit_buffer_sync_instance* _this, uint8_t* output, int count); + inline decltype(&write_unsigned_char_from_buffer) write_unsigned_char_from_buffer_t; + + bool write_int_from_buffer(rage::bit_buffer_sync_instance* _this, int* output, int count); + inline decltype(&write_int_from_buffer) write_int_from_buffer_t; + + bool write_short_from_buffer(rage::bit_buffer_sync_instance* _this, short* output, int count); + inline decltype(&write_short_from_buffer) write_short_from_buffer_t; + + bool write_char_from_buffer(rage::bit_buffer_sync_instance* _this, char* output, int count); + inline decltype(&write_char_from_buffer) write_char_from_buffer_t; + + bool write_bool_from_buffer(rage::bit_buffer_sync_instance* _this, bool* output); + inline decltype(&write_bool_from_buffer) write_bool_from_buffer_t; + + bool write_long_long_from_buffer(rage::bit_buffer_sync_instance* _this, long long* output, int count); + inline decltype(&write_long_long_from_buffer) write_long_long_from_buffer_t; + + bool write_unsigned_long_long_from_buffer(rage::bit_buffer_sync_instance* _this, uint64_t* output, int count); + inline decltype(&write_unsigned_long_long_from_buffer) write_unsigned_long_long_from_buffer_t; + + bool write_float_from_buffer(rage::bit_buffer_sync_instance* _this, float* output, float mod, int count); + inline decltype(&write_float_from_buffer) write_float_from_buffer_t; + + bool write_unsigned_float_from_buffer(rage::bit_buffer_sync_instance* _this, float* output, float mod, int count); + inline decltype(&write_unsigned_float_from_buffer) write_unsigned_float_from_buffer_t; + + bool write_network_id_from_buffer(rage::bit_buffer_sync_instance* _this, short* output); + inline decltype(&write_network_id_from_buffer) write_network_id_from_buffer_t; + + bool write_array_from_buffer(rage::bit_buffer_sync_instance* _this, int* output, int count, int unk); + inline decltype(&write_array_from_buffer) write_array_from_buffer_t; + + bool write_string_from_buffer(rage::bit_buffer_sync_instance* _this, char* output, int length); + inline decltype(&write_string_from_buffer) write_string_from_buffer_t; + + uint64_t construct_in_frame(uint64_t in_frame, uint64_t rdx, uint64_t r8, uint64_t r9d, uint64_t s_rbp, uint64_t s_rsi, uint16_t s_r15w, uint64_t s_rax); + inline decltype(&construct_in_frame) construct_in_frame_t; + + uint64_t destruct_in_frame(uint64_t in_frame, uint8_t dl); + inline decltype(&destruct_in_frame) destruct_in_frame_t; + + bool receive_clone_create(uint64_t _this, rage::network::net_game_player* sender, uint64_t r8, eNetObjectTypes type, uint16_t network_id, uint16_t flag, rage::bit_buffer* bit_buffer, uint32_t timestamp); + inline decltype(&receive_clone_create) receive_clone_create_t; + + int receive_clone_sync(uint64_t _this, rage::network::net_game_player* sender, uint64_t r8, eNetObjectTypes type, uint16_t network_id, rage::bit_buffer* bit_buffer, uint16_t sequence_id, int timestamp); + inline decltype(&receive_clone_sync) receive_clone_sync_t; + + bool receive_clone_sync_caller(uint64_t _this, uint64_t rdx); + inline decltype(&receive_clone_sync_caller) receive_clone_sync_caller_t; + + bool receive_clone_remove(uint64_t _this, rage::network::net_game_player* sender, uint64_t r8, uint16_t network_id, uint64_t unk); + inline decltype(&receive_clone_remove) receive_clone_remove_t; + + bool receive_broadcast(uint64_t _this, rage::network::net_game_player* sender, rage::bit_buffer* bit_buffer, uint32_t bit_count, uint16_t network_id); + inline decltype(&receive_broadcast) receive_broadcast_t; + + void receive_network_event(uint64_t _this, rage::network::net_game_player* sender, rage::network::net_game_player* receiver, uint16_t event_id, int event_index, int event_bitset, uint32_t bit_buffer_size, rage::bit_buffer* bit_buffer); + inline decltype(&receive_network_event) receive_network_event_t; + + bool read_chat_message(rage::network::global_msg_context* context, rage::bit_buffer* bit_buffer); + inline decltype(&read_chat_message) read_chat_message_t; + + bool receive_text_message(rage::network::net_msg_text_message* identifier, rage::bit_buffer* bit_buffer); + inline decltype(&receive_text_message) receive_text_message_t; + + bool receive_session_info(uint64_t rcx); + inline decltype(&receive_session_info) receive_session_info_t; + + bool receive_presence_event(uint64_t rcx, uint64_t rdx, const char** payload, uint64_t r9); + inline decltype(&receive_presence_event) receive_presence_event_t; + + uint64_t process_game_event(uint64_t _this); + inline decltype(&process_game_event) process_game_event_t; + + uint64_t handle_desync_negotiation(uint64_t rcx, uint64_t rdx, uint64_t r8); + inline decltype(&handle_desync_negotiation) handle_desync_negotiation_t; + + bool host_handle_desync_request(uint64_t rcx, uint64_t rdx, rage::network::list_kick_peers* peers, uint32_t r9d); + inline decltype(&host_handle_desync_request) host_handle_desync_request_t; + + bool read_blacklist_message(uint64_t rcx, uint64_t rdx); + inline decltype(&read_blacklist_message) read_blacklist_message_t; + + bool read_new_script_host_message(uint64_t rcx, uint64_t rdx); + inline decltype(&read_new_script_host_message) read_new_script_host_message_t; + + void update_player_script_status(rage::script::game_script_handler_network_component* component, uint64_t rdx, uint64_t r8); + inline decltype(&update_player_script_status) update_player_script_status_t; + + void process_relay_usage(uint8_t cl, uint64_t rdx, rage::network::event_added_gamer* gamer, uint32_t r9d, uint64_t stack); + inline decltype(&process_relay_usage) process_relay_usage_t; + + void apply_player_physical_index(uint64_t network_player_manager, rage::network::net_game_player* player, uint8_t slot); + inline decltype(&apply_player_physical_index) apply_player_physical_index_t; + + bool write_player_game_state_data_node(uint64_t rcx, uint64_t rdx); + inline decltype(&write_player_game_state_data_node) write_player_game_state_data_node_t; + + void write_ped_health_data_node(uint64_t rcx, uint64_t rdx); + inline decltype(&write_ped_health_data_node) write_ped_health_data_node_t; + + void write_gs_item(int index, rage::network::gs_session* data, const char* type); + inline decltype(&write_gs_item) write_gs_item_t; + + bool read_matchmaking_response(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&read_matchmaking_response) read_matchmaking_response_t; + + bool write_matchmaking_request(uint64_t rcx, uint32_t rs_index, uint32_t available_slots, uint64_t filter_info, uint32_t max_results, uint64_t stack_20, uint64_t stack_18); + inline decltype(&write_matchmaking_request) write_matchmaking_request_t; + + bool write_encrypted_string_to_request(uint64_t rcx, const char* name, char* value, bool encrypted, uint64_t stack_3C8, uint64_t stack_3C0); + inline decltype(&write_encrypted_string_to_request) write_encrypted_string_to_request_t; + + void send_global_chat_message(uint64_t manager, int key, rage::network::global_msg_context* context, uint64_t unk1, uint64_t unk2); + inline decltype(&send_global_chat_message) send_global_chat_message_t; + + const char* get_gxt_label(uint64_t table, const char* label); + inline decltype(&get_gxt_label) get_gxt_label_t; + + const char* get_gxt_label_from_hash(uint64_t table, uint32_t label_hash); + inline decltype(&get_gxt_label_from_hash) get_gxt_label_from_hash_t; + + int check_chat_profanity(uint64_t rcx, uint64_t rdx, uint64_t r8); + inline decltype(&check_chat_profanity) check_chat_profanity_t; + + int check_string_profanity(uint64_t rcx, uint64_t rdx, uint64_t r8); + inline decltype(&check_string_profanity) check_string_profanity_t; + + bool send_join_request_message(rage::network::join_request* rcx, uint64_t rdx, uint32_t r8d, uint64_t r9); + inline decltype(&send_join_request_message) send_join_request_message_t; + + bool get_peer_address(uint64_t* peer); + inline decltype(&get_peer_address) get_peer_address_t; + + bool send_add_gamer_to_session(uint64_t rcx, rage::network::network_gamer_cmd* gamer); + inline decltype(&send_add_gamer_to_session) send_add_gamer_to_session_t; + + bool has_ros_privilege(uint64_t ros_table, int privilege); + inline decltype(&has_ros_privilege) has_ros_privilege_t; + + bool compress_data_node(rage::network::data_node* node, uint32_t flag1, uint64_t flag2, rage::network::net_object* object, rage::bit_buffer* buffer, uint32_t bitsize, uint64_t unk1, bool unk2, uint64_t unk3); + inline decltype(&compress_data_node) compress_data_node_t; + + bool compress_data_node2(rage::network::data_node* node, rage::network::net_object* object); + inline decltype(&compress_data_node2) compress_data_node2_t; + + bool write_player_gamer_data_node(rage::network::player_gamer_data_node* node, rage::bit_buffer_sync_instance* buffer); + inline decltype(&write_player_gamer_data_node) write_player_gamer_data_node_t; + + void apply_weather_meta(uint64_t meta); + inline decltype(&apply_weather_meta) apply_weather_meta_t; + + bool read_kick_player_message(uint64_t rcx, uint64_t rdx); + inline decltype(&read_kick_player_message) read_kick_player_message_t; + + bool write_net_msg_identifier(rage::bit_buffer* buffer, uint64_t rdx, int r8d); + inline decltype(&write_net_msg_identifier) write_net_msg_identifier_t; + + bool write_ulonglong_to_bit_buffer(rage::bit_buffer* buffer, uint64_t rdx, int r8); + inline decltype(&write_ulonglong_to_bit_buffer) write_ulonglong_to_bit_buffer_t; + + // crash start + int apply_vehicle_data__crash(rage::network::net_object* object, uint64_t node_data); + inline decltype(&apply_vehicle_data__crash) apply_vehicle_data__crash_t; + + eThreadState tick_script_thread__crash(rage::script::gta_thread* _this, uint32_t instruction_count); + inline decltype(&tick_script_thread__crash) tick_script_thread__crash_t; + + uint64_t attach_trailer__crash(uint64_t trailer, uint16_t flag); + inline decltype(&attach_trailer__crash) attach_trailer__crash_t; + + uint64_t attach_trailer_audio__crash(uint64_t audio_entity, uint64_t rdx); + inline decltype(&attach_trailer_audio__crash) attach_trailer_audio__crash_t; + + // resource_streamed_script* load_script_resource__crash(resource_streamed_script_handler* handler, uint16_t resource_id); + // inline decltype(&load_script_resource__crash) load_script_resource__crash_t; + + void destruct_script_handler__crash(uint64_t _this); + inline decltype(&destruct_script_handler__crash) destruct_script_handler__crash_t; + + bool shit_scripts2__crash(uint64_t rcx, uint16_t dx, uint32_t r8d, bool r9b); + inline decltype(&shit_scripts2__crash) shit_scripts2__crash_t; + + uint64_t shit_scripts__crash(uint64_t rcx, uint64_t rdx); + inline decltype(&shit_scripts__crash) shit_scripts__crash_t; + + uint64_t rid0__crash(uint64_t rcx, uint64_t rdx); + inline decltype(&rid0__crash) rid0__crash_t; + + uint64_t sub_140AD8424__crash(uint64_t rcx, int edx, uint32_t r8d); // previously sub_140AFB59C + inline decltype(&sub_140AD8424__crash) sub_140AD8424__crash_t; + // crash end + + // arxan start + void arxan_integrity_start1(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_start1) arxan_integrity_start1_t; + + void arxan_integrity_end1(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_end1) arxan_integrity_end1_t; + + void arxan_integrity_start2(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_start2) arxan_integrity_start2_t; + + void arxan_integrity_end2(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_end2) arxan_integrity_end2_t; + + void arxan_integrity_start3(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_start3) arxan_integrity_start3_t; + + void arxan_integrity_end3(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_end3) arxan_integrity_end3_t; + + void arxan_integrity_start4(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_start4) arxan_integrity_start4_t; + + void arxan_integrity_end4(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_end4) arxan_integrity_end4_t; + + void arxan_integrity_start5(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_start5) arxan_integrity_start5_t; + + void arxan_integrity_end5(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9); + inline decltype(&arxan_integrity_end5) arxan_integrity_end5_t; + // arxan end + + bool spoofing(); + bool ros(); + bool bypass(); + bool globals(); + bool globals_in_game(); + bool hooks(); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/matchmaking.cpp b/GTAV/src/menu/hooks/matchmaking.cpp new file mode 100644 index 0000000..ac1b31c --- /dev/null +++ b/GTAV/src/menu/hooks/matchmaking.cpp @@ -0,0 +1,115 @@ +#include "hooks.h" +#include "menu/base/submenus/main/network/network_session_finder.h" +#include "menu/base/submenu_handler.h" +#include "rage/engine.h" + +#include "util/threads.h" +#include + +bool menu::hooks::read_matchmaking_response(uint64_t rcx, uint64_t rdx, uint64_t r8, uint64_t r9) { + if (rcx) { + if (*(uint32_t*)(rcx + 0xE00) > 15) { + uint64_t xml_context = rage::engine::read_xml_string(r8, "Results", 0, 1); + if (xml_context) { + std::vector rockstar_ids; + + rage::types::xml_node* node = *(rage::types::xml_node**)(xml_context + 0x30); + while (node) { + if (node->m_name) { + if (!_stricmp(node->m_name, "R")) { + const char* attribute_string = rage::engine::read_xml_attribute_string(node, "Data", 0); + if (attribute_string) { + if (*attribute_string) { + std::vector& sessions = network::sfinder::vars::m_vars.m_sessions; + + rage::network::gs_session session; + if (rage::engine::get_session_info_from_gs(&session, attribute_string)) { + if (std::find_if(begin(sessions), end(sessions), [=](session_browser& element) { return element.m_rockstar_id == session.m_rockstar_id.m_rockstar_id; }) == end(sessions)) { + sessions.push_back({ session.m_rockstar_id.m_rockstar_id, session.m_peer_token, "", false, session.get_local_ip(), session.m_peer_token2, session.m_peer_token3 }); + rockstar_ids.push_back(session.m_rockstar_id.m_rockstar_id); + } + } + } + } + } + } + + node = node->m_next; + } + + if (!rockstar_ids.empty()) { + uint32_t* rids = new uint32_t[rockstar_ids.size()]; + + for (std::size_t i = 0; i < rockstar_ids.size(); i++) { + rids[i] = (uint32_t)rockstar_ids[i]; + } + + uint64_t* info = new uint64_t[2]; + *(uint64_t*)((uint64_t)info) = (uint64_t)rockstar_ids.size(); + *(uint64_t*)((uint64_t)info + 8) = (uint64_t)rids; + + util::threads::add_job([](void* lp) { + uint64_t count = *(uint64_t*)((uint64_t)lp); + uint32_t* ridss = (uint32_t*)*(uint64_t*)((uint64_t)lp + 8); + + rage::ros::send_stat_requests(ridss, (int)count); + + for (uint64_t i = 0; i < count; i++) { + if (global::vars::g_unloading) return; + + if (menu::submenu::handler::get_current() != network_session_finder_menu::get()) { + if (std::find_if(begin(network::sfinder::vars::m_vars.m_image_queue), end(network::sfinder::vars::m_vars.m_image_queue), [=](uint64_t rid) { return (uint32_t)rid == ridss[i]; }) == end(network::sfinder::vars::m_vars.m_image_queue)) network::sfinder::vars::m_vars.m_image_queue.push_back(ridss[i]); + return; + } + + rage::ros::download_player_image(ridss[i]); + } + + delete[] ridss; + delete[] lp; + }, info); + } + } + + return true; + } + } + + return read_matchmaking_response_t(rcx, rdx, r8, r9); +} + +bool menu::hooks::write_matchmaking_request(uint64_t rcx, uint32_t rs_index, uint32_t available_slots, uint64_t filter_info, uint32_t max_results, uint64_t stack_20, uint64_t stack_18) { + if (network::sfinder::vars::m_vars.m_populate) { + if (menu::submenu::handler::get_current() == network_session_finder_menu::get()) { + return write_matchmaking_request_t(rcx, rs_index, network::sfinder::vars::m_vars.m_minimum_slots, filter_info, 1600, stack_20, stack_18); + } + } + + return write_matchmaking_request_t(rcx, rs_index, available_slots, filter_info, max_results, stack_20, stack_18); +} + +bool menu::hooks::write_encrypted_string_to_request(uint64_t rcx, const char* name, char* value, bool encrypted, uint64_t stack_3C8, uint64_t stack_3C0) { + if (name && network::sfinder::vars::m_vars.m_populate) { + if (menu::submenu::handler::get_current() == network_session_finder_menu::get()) { + if (!strcmp(name, "filterName")) { + value = "Group"; + } + + if (!strcmp(name, "filterParamsJson")) { + std::random_device r; + std::seed_seq seed2 { r(), r(), r(), r(), r(), r(), r(), r() }; + std::mt19937 rng(seed2); + std::uniform_int_distribution val(0, 8); + + nlohmann::json json; + json["GAME_MODE"] = 0; + json["MMATTR_DISCRIMINATOR"] = nlohmann::json::parse(value)["MMATTR_DISCRIMINATOR"]; + json["MMATTR_MM_GROUP_2"] = 30; + json["MMATTR_REGION"] = val(rng); + strcpy(value, json.dump().c_str()); + } + } + } + + return write_encrypted_string_to_request_t(rcx, name, value, encrypted, stack_3C8, stack_3C0); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/pack_clone_create.cpp b/GTAV/src/menu/hooks/pack_clone_create.cpp new file mode 100644 index 0000000..74f314a --- /dev/null +++ b/GTAV/src/menu/hooks/pack_clone_create.cpp @@ -0,0 +1,66 @@ +#include "hooks.h" +#include "menu/base/util/player_manager.h" +#include "rage/engine.h" +#include "menu/base/util/helpers.h" +#include "menu/base/submenus/main/network/players/network_players_removals.h" +#include "menu/base/submenus/main/protection/entity/protection_entity_blocking.h" +#include "util/log.h" + +void menu::hooks::pack_clone_create(uint64_t _this, rage::network::net_object* net_obj, rage::network::net_game_player* net_game_player, uint64_t sync_data) { + if (net_obj) { + if (net_obj->m_type >= NetObjectAutomobile && net_obj->m_type < INVALID) { + if (protection::entity::blocking::vars::m_vars.m_toggled[net_obj->m_type]) { + LOG_DEV("pack clone create blocked - 1"); + return; + } + + if (net_game_player->m_id >= 0 && net_game_player->m_id < 34) { + if (menu::player::get_player(net_game_player->m_id).m_ghost[net_obj->m_type]) { + LOG_DEV("pack clone create blocked - 2"); + return; + } + + if (net_obj->m_type == NetObjectPickup) { + std::vector dropping_stealth; + menu::player::for_each([&] (menu::player::player_context& player) { + if (player.m_drop_toggle && player.m_drop_stealth) { + dropping_stealth.push_back(player.m_id); + } + }, true); + + bool bad = false; + if (dropping_stealth.size()) { + for (int ID : dropping_stealth) { + if (ID != net_game_player->m_id) { + bad = true; + break; + } + } + } + + if (bad) return; + } + + auto& vars = network::players::removals::vars::m_vars; + if (vars.m_session_crash) { + return pack_clone_create_t(_this, net_obj, net_game_player, sync_data); + } + + if (vars.m_targeted_crash) { + if (vars.m_broken_entities.find(net_obj) != vars.m_broken_entities.end()) { + auto p = menu::helpers::get_player_from_rid(vars.m_broken_entities[net_obj]); + if (p.m_connected && p.m_net_player) { + LOG_DEV("Packing clone create crash"); + return pack_clone_create_t(_this, net_obj, p.m_net_player, sync_data); + } + + LOG_DEV("pack clone create blocked - 3"); + return; + } + } + } + } + } + + return pack_clone_create_t(_this, net_obj, net_game_player, sync_data); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/pack_clone_sync.cpp b/GTAV/src/menu/hooks/pack_clone_sync.cpp new file mode 100644 index 0000000..6542332 --- /dev/null +++ b/GTAV/src/menu/hooks/pack_clone_sync.cpp @@ -0,0 +1,66 @@ +#include "hooks.h" +#include "menu/base/util/player_manager.h" +#include "rage/engine.h" +#include "menu/base/util/helpers.h" +#include "menu/base/submenus/main/network/players/network_players_removals.h" +#include "menu/base/submenus/main/protection/entity/protection_entity_blocking.h" +#include "util/log.h" + +bool menu::hooks::pack_clone_sync(uint64_t _this, rage::network::net_object* net_obj, rage::network::net_game_player* net_game_player) { + if (net_obj) { + if (net_obj->m_type >= NetObjectAutomobile && net_obj->m_type < INVALID) { + if (protection::entity::blocking::vars::m_vars.m_toggled[net_obj->m_type]) { + LOG_DEV("pack clone sync blocked - 1"); + return false; + } + + if (net_game_player->m_id >= 0 && net_game_player->m_id < 34) { + if (menu::player::get_player(net_game_player->m_id).m_ghost[net_obj->m_type]) { + LOG_DEV("pack clone sync blocked - 2"); + return false; + } + + if (net_obj->m_type == NetObjectPickup) { + std::vector dropping_stealth; + menu::player::for_each([&] (menu::player::player_context& player) { + if (player.m_drop_toggle && player.m_drop_stealth) { + dropping_stealth.push_back(player.m_id); + } + }, true); + + bool bad = false; + if (dropping_stealth.size()) { + for (int ID : dropping_stealth) { + if (ID != net_game_player->m_id) { + bad = true; + break; + } + } + } + + if (bad) return false; + } + + auto& vars = network::players::removals::vars::m_vars; + if (vars.m_session_crash) { + return pack_clone_sync_t(_this, net_obj, net_game_player); + } + + if (vars.m_targeted_crash) { + if (vars.m_broken_entities.find(net_obj) != vars.m_broken_entities.end()) { + auto p = menu::helpers::get_player_from_rid(vars.m_broken_entities[net_obj]); + if (p.m_connected && p.m_net_player) { + LOG_DEV("Packing clone sync crash"); + return pack_clone_sync_t(_this, net_obj, p.m_net_player); + } + + LOG_DEV("pack clone sync blocked - 3"); + return false; + } + } + } + } + } + + return pack_clone_sync_t(_this, net_obj, net_game_player); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/process_game_event.cpp b/GTAV/src/menu/hooks/process_game_event.cpp new file mode 100644 index 0000000..b0e9ceb --- /dev/null +++ b/GTAV/src/menu/hooks/process_game_event.cpp @@ -0,0 +1,62 @@ +#include "hooks.h" +#include "util/caller.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/util/notify.h" +#include "util/log.h" +#include "util/util.h" +#include "menu/base/util/helpers.h" + +struct event_player_spawn { + char _0x0000[0x18]; + char m_name[0x20]; +}; + +struct event_player_collected_ambient_pickup { + char _0x0000[0x18]; + uint32_t m_pickup_hash; + char _0x001c[0x4]; + int m_value; + char _0x0024[0xc]; + uint32_t m_model; +}; + +static localization t_player_spawn("Player Spawn", true, true); +static localization t_just_spawned("just spawned", true, true); +static localization t_pickup_processing("Pickup Processing", true, true); + +uint64_t menu::hooks::process_game_event(uint64_t _this) { + uint64_t vtable = *(uint64_t*)_this; + uint32_t id = caller::call(*(uint64_t*)(vtable + 0x18), _this); + + switch (id) { + case 164: { // CEventNetworkPlayerSpawn + event_player_spawn* _event = (event_player_spawn*)_this; + + if (protection::events::vars::m_vars.m_player_spawns.notify()) { + menu::notify::stacked(TRANSLATE(t_player_spawn), menu::helpers::clean_name(_event->m_name) + " " + TRANSLATE(t_just_spawned)); + } + + break; + } + + case 166: { // CEventNetworkPlayerCollectedAmbientPickup + event_player_collected_ambient_pickup* _event = (event_player_collected_ambient_pickup*)_this; + + if (protection::events::vars::m_vars.m_pickup_processing.enabled()) { + if (protection::events::vars::m_vars.m_pickup_processing.notify()) { + menu::notify::protection("LLLLLLLLLLLLLLLLLLLLLLLL", TRANSLATE(t_pickup_processing), false, protection::events::vars::m_vars.m_pickup_processing.block()); + } + + if (protection::events::vars::m_vars.m_pickup_processing.block()) { + _event->m_value = 0; + _event->m_pickup_hash = 0; + _event->m_model = 0; + } + } + + break; + } + } + + return process_game_event_t(_this); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/process_relay_usage.cpp b/GTAV/src/menu/hooks/process_relay_usage.cpp new file mode 100644 index 0000000..2cc1771 --- /dev/null +++ b/GTAV/src/menu/hooks/process_relay_usage.cpp @@ -0,0 +1,51 @@ +#include "hooks.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/util/helpers.h" +#include "util/log.h" + +static localization t_rockstar_staff("Rockstar Staff", true, true); +static localization t_detected_rockstar_staff("has been detected as R* staff!", true, true); + +void menu::hooks::process_relay_usage(uint8_t cl, uint64_t rdx, rage::network::event_added_gamer* gamer, uint32_t r9d, uint64_t stack) { + if (*(uint8_t*)(stack + 0x1E) == 1 || *(uint8_t*)(stack + 0x1E) == 2) { + uint32_t ip = *(uint32_t*)(stack + 8); + if (ip != 0xFFFFFFFF) { + uint32_t my_ip = *(uint32_t*)(stack); + + LOG_DEV("%i.%i.%i.%i -> %i.%i.%i.%i", + ((ip & 0xFF000000) >> 24), ((ip & 0xFF0000) >> 16), ((ip & 0xFF00) >> 8), (ip & 0xFF), + ((my_ip & 0xFF000000) >> 24), ((my_ip & 0xFF0000) >> 16), ((my_ip & 0xFF00) >> 8), (my_ip & 0xFF)); + + bool insert = true; + for (relay_usage& usage : global::vars::g_relay_usage) { + if (!strcmp(usage.m_name, gamer->m_name) && usage.m_rockstar_id == gamer->m_rockstar_id) { + usage.m_external_ip = ip; + insert = false; + break; + } + } + + if (menu::helpers::is_rockstar_ip(ip)) { + if (protection::events::vars::m_vars.m_rockstar_staff.notify()) { + menu::notify::stacked(TRANSLATE(t_rockstar_staff), util::va::va("%s %s", gamer->m_name, TRANSLATE(t_detected_rockstar_staff)), global::ui::g_error); + } + } + + if (insert) { + global::vars::g_geo_queue.push(ip); + + relay_usage relay; + relay.m_external_ip = ip; + relay.m_rockstar_id = gamer->m_rockstar_id; + strcpy_s(relay.m_name, gamer->m_name); + global::vars::g_relay_usage.push_back(relay); + + char buffer[32]; + sprintf_s(buffer, "%i.%i.%i.%i", ((ip & 0xFF000000) >> 24), ((ip & 0xFF0000) >> 16), ((ip & 0xFF00) >> 8), (ip & 0xFF)); + LOG("[%s:%i] IP=%s", gamer->m_name, gamer->m_rockstar_id, buffer); + } + } + } + + process_relay_usage_t(cl, rdx, gamer, r9d, stack); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/profanity.cpp b/GTAV/src/menu/hooks/profanity.cpp new file mode 100644 index 0000000..bf05eb2 --- /dev/null +++ b/GTAV/src/menu/hooks/profanity.cpp @@ -0,0 +1,26 @@ +#include "hooks.h" +#include "menu/base/submenus/main/misc/misc_disables.h" + +enum eProfanity { + PROFANITY_CHAT_CLEAN = -1, + PROFANITY_CLEAN, + PROFANITY_DIRTY, + PROFANITY_UNK, + PROFANITY_ERROR +}; + +int menu::hooks::check_chat_profanity(uint64_t rcx, uint64_t rdx, uint64_t r8) { + if (misc::disables::vars::m_vars.m_disable_profanity_filter) { + return PROFANITY_CHAT_CLEAN; + } + + return check_chat_profanity_t(rcx, rdx, r8); +} + +int menu::hooks::check_string_profanity(uint64_t rcx, uint64_t rdx, uint64_t r8) { + if (misc::disables::vars::m_vars.m_disable_profanity_filter) { + return PROFANITY_CLEAN; + } + + return check_string_profanity_t(rcx, rdx, r8); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/read_blacklist_message.cpp b/GTAV/src/menu/hooks/read_blacklist_message.cpp new file mode 100644 index 0000000..6e30452 --- /dev/null +++ b/GTAV/src/menu/hooks/read_blacklist_message.cpp @@ -0,0 +1,26 @@ +#include "hooks.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/util/helpers.h" +#include "rage/engine.h" + +static localization t_host_kicking("Host Kicking", true, true); + +bool menu::hooks::read_blacklist_message(uint64_t rcx, uint64_t rdx) { + bool _return = read_blacklist_message_t(rcx, rdx); + + if (_return) { + if (protection::events::vars::m_vars.m_host_kicks.notify()) { + uint64_t rockstar_id = *(uint64_t*)(rcx + 0x8); + if (rockstar_id) { + menu::player::player_context& player = menu::helpers::get_player_from_rid(rockstar_id); + if (player.m_connected && !player.m_name.empty()) { + if (menu::helpers::is_valid_net_player(rage::engine::get_host_net_game_player())) { + menu::notify::protection(rage::engine::get_host_net_game_player()->m_player_info->m_name, t_host_kicking.get() + " " + player.m_name, false, false); + } + } + } + } + } + + return _return; +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/read_kick_player_message.cpp b/GTAV/src/menu/hooks/read_kick_player_message.cpp new file mode 100644 index 0000000..7bcb978 --- /dev/null +++ b/GTAV/src/menu/hooks/read_kick_player_message.cpp @@ -0,0 +1,26 @@ +#include "hooks.h" +#include "menu/base/util/notify.h" +#include "util/va.h" +#include "rage/engine.h" + +static localization t_kicked("Kicked", true, true); +static localization t_kicked_by_host("You were kick by the host", true, true); +static localization t_kicked_by_desync("You were desynced from the session", true, true); + +bool menu::hooks::read_kick_player_message(uint64_t rcx, uint64_t rdx) { + if (read_kick_player_message_t(rcx, rdx)) { + uint32_t type = *(uint32_t*)(rdx + 0x10); + switch (type) { + case 0: + case 4: + menu::notify::stacked(TRANSLATE(t_kicked), util::va::va("%s (%s)", TRANSLATE(t_kicked_by_host), rage::engine::get_host_net_game_player()->m_player_info->m_name), global::ui::g_error); + break; + + case 1: + menu::notify::stacked(TRANSLATE(t_kicked), TRANSLATE(t_kicked_by_desync), global::ui::g_error); + break; + } + } + + return false; +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/read_new_script_host_message.cpp b/GTAV/src/menu/hooks/read_new_script_host_message.cpp new file mode 100644 index 0000000..ede3ac8 --- /dev/null +++ b/GTAV/src/menu/hooks/read_new_script_host_message.cpp @@ -0,0 +1,45 @@ +#include "hooks.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" +#include "menu/base/util/helpers.h" +#include "rage/engine.h" +#include "util/caller.h" + +static localization t_script_host_migration("Script Host Migration", true, true); +static localization t_forced_script_host_migration("Forced Script Host Migration", true, true); + +bool menu::hooks::read_new_script_host_message(uint64_t rcx, uint64_t rdx) { + uint8_t data[0x50]; + memset(data, 0, 0x50); + + uint64_t script_table = *(uint64_t*)rcx; + *(uint64_t*)&data[0] = caller::call(*(uint64_t*)(script_table + 0x78), rcx); + + if (caller::call(global::vars::g_read_new_script_host_message, data, *(uint64_t*)(rdx), *(uint32_t*)(rdx + 0x8), 0)) { + rage::network::net_game_player* new_host = *(rage::network::net_game_player**)(rdx + 0x10); + if (menu::helpers::is_valid_net_player(new_host)) { + bool forced = false; + uint16_t host_token = *(uint16_t*)&data[0x8]; + if (host_token == 0xFFFF) { + forced = true; + menu::helpers::flag_modder(new_host->m_id, menu::player::REASON_SCRIPT_MIGRATION); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_SCRIPT_MIGRATION, new_host->m_id); + } + + if (protection::events::vars::m_vars.m_sh_migration.notify()) { + rage::script::game_script_handler* script_handler = caller::call(*(uint64_t*)(script_table + 0x48), rcx, *(uint64_t*)(&data[0])); + if (is_valid_ptr(script_handler)) { + if (is_valid_ptr(script_handler->m_thread)) { + if (!strcmp(script_handler->m_thread->m_name, "freemode")) { + if (new_host->m_id != native::network_get_host_of_script("freemode", -1, 0)) { + menu::notify::protection(new_host->m_player_info->m_name, forced ? TRANSLATE(t_forced_script_host_migration) : TRANSLATE(t_script_host_migration), false, false); + } + } + } + } + } + } + } + + return read_new_script_host_message_t(rcx, rdx); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/receive_broadcast.cpp b/GTAV/src/menu/hooks/receive_broadcast.cpp new file mode 100644 index 0000000..05fb7ae --- /dev/null +++ b/GTAV/src/menu/hooks/receive_broadcast.cpp @@ -0,0 +1,172 @@ +#include "hooks.h" +#include "menu/base/util/helpers.h" +#include "rage/types/global_types.h" +#include "util/caller.h" +#include "util/log.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" + +static localization t_drop_kick("Drop Kick", true, true); +static localization t_is_being_drop_kicked_by("is being drop kicked by", true, true); +static localization t_array_crash1("Array Crash 1", true, true); +static localization t_array_crash2("Array Crash 2", true, true); +static localization t_array_crash3("Array Crash 3", true, true); +static localization t_array_crash4("Array Crash 4", true, true); +static localization t_array_crash5("Array Crash 5", true, true); + +bool notify_crash(localization str, rage::network::net_game_player* sender) { + if (menu::helpers::is_valid_net_player(sender)) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(str), false, true); + } + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + } + + return false; +} + +bool menu::hooks::receive_broadcast(uint64_t _this, rage::network::net_game_player* sender, rage::bit_buffer* bit_buffer, uint32_t bit_count, uint16_t network_id) { + if (menu::helpers::is_valid_net_player(sender)) { + if (menu::player::get_player(sender->m_id).m_blacklist > GetTickCount()) { + return false; + } + } + + bool drop_kick = false; + uint64_t drop_kick_backup[33]; + + void* drop_kick_ptr = &global::vars::g_global_cache[rage::global::host_drop_kick >> 18 & 0x3F][rage::global::host_drop_kick & 0x3FFFF]; + if (*(uint64_t*)(_this + 0x108) == (uint64_t)drop_kick_ptr) { + drop_kick = true; + memcpy(drop_kick_backup, drop_kick_ptr, sizeof(drop_kick_backup)); + } + + uint32_t cached_next_bit = bit_buffer->m_next_bit; + uint32_t next = 0; + uint32_t v20 = 0; + bool v10 = true; + + uint64_t vtable = *(uint64_t*)_this; + bool unk = caller::call(*(uint64_t*)(vtable + 0x158), _this); + + for (uint32_t i = bit_buffer->m_next_bit - cached_next_bit; i < bit_count; i = next - cached_next_bit) { + uint32_t v14 = bit_buffer->m_next_bit; + + // read nodes and test alignment + global::vars::g_alignment_tests["RB"].m_block = false; + global::vars::g_alignment_tests["RB"].m_monitor = true; + global::vars::g_alignment_tests["RB"].m_thread_id = GetCurrentThreadId(); + + caller::call(*(uint64_t*)(vtable + 0x178), _this, bit_buffer, &v20); // reads + + global::vars::g_alignment_tests["RB"].m_monitor = false; + if (global::vars::g_alignment_tests["RB"].m_block) { + return notify_crash(t_array_crash5, sender); + } + + if (!caller::call(*(uint64_t*)(vtable + 0x180), _this, v20)) { + return notify_crash(t_array_crash1, sender); + } + + bool v23 = false; + bool v16 = false; + + if (unk) { + if (!bit_buffer->read_bool(&v23)) { + return notify_crash(t_array_crash2, sender); + } + + v16 = v23; + } else { + v16 = false; + v23 = false; + } + + if (!v16) { + // read nodes and test alignment + global::vars::g_alignment_tests["RB"].m_block = false; + global::vars::g_alignment_tests["RB"].m_monitor = true; + global::vars::g_alignment_tests["RB"].m_thread_id = GetCurrentThreadId(); + + caller::call(*(uint64_t*)(vtable + 0x1C0), _this, bit_buffer, v20, 0); // reads + + global::vars::g_alignment_tests["RB"].m_monitor = false; + if (global::vars::g_alignment_tests["RB"].m_block) { + return notify_crash(t_array_crash5, sender); + } + + v16 = v23; + } + + if (caller::call(*(uint64_t*)(vtable + 0x1A8), _this, v20, sender, v16)) { + if (v23) { + caller::call(*(uint64_t*)(vtable + 0x168), _this, v20); + caller::call(*(uint64_t*)(vtable + 0x190), _this, v20); + } else { + if (caller::call(*(uint64_t*)(vtable + 0x130), _this)) { + uint64_t v17 = caller::call(*(uint64_t*)(vtable + 0x130), _this); + if (v17) { + uint64_t VTable2 = *(uint64_t*)v17; + caller::call(*(uint64_t*)(VTable2 + 0xA0), v17, v20); + } else { + return notify_crash(t_array_crash3, sender); + } + } + + caller::call(*(uint64_t*)(vtable + 0x1D8), _this, v20, sender); + caller::call(*(uint64_t*)(vtable + 0x1A0), _this, v20); + } + } else { + v10 = false; + } + + if (v14 == bit_buffer->m_next_bit) { + return notify_crash(t_array_crash4, sender); + } + + next = bit_buffer->m_next_bit; + } + + caller::call(*(uint64_t*)(vtable + 0x198), _this); + if (v10 && sender->m_id != -1) { + *(uint16_t*)(_this + 0x6C + (sender->m_id * 2)) = network_id; + } + + if (drop_kick) { + if (protection::events::vars::m_vars.m_sh_kick.enabled()) { + for (int i = 1; i < 33; i++) { + uint64_t index = (uint64_t)drop_kick_ptr + (i * 8); + if (*(int*)(index) != *(int*)&drop_kick_backup[i]) { + if (*(int*)(index) == 1) { + if (i - 1 == menu::player::get_local_player().m_id) { + if (protection::events::vars::m_vars.m_sh_kick.block()) { + *(int*)(index) = *(int*)&drop_kick_backup[i]; + } + + if (protection::events::vars::m_vars.m_sh_kick.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_drop_kick), false, true); + } + } + } else { + if (protection::events::vars::m_vars.m_sh_kick.notify()) { + if (native::network_is_session_active() && native::network_is_in_session()) { + menu::player::player_context& p = menu::player::get_player(i - 1); + if (p.m_connected && !p.m_name.empty()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::stacked(TRANSLATE(t_drop_kick), util::va::va("%s %s %s", p.m_name.c_str(), TRANSLATE(t_is_being_drop_kicked_by), sender->m_player_info->m_name), global::ui::g_error); + } + } + } + } + } + } + } + } + } + } + + return v10; +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/receive_clone_create.cpp b/GTAV/src/menu/hooks/receive_clone_create.cpp new file mode 100644 index 0000000..00bca54 --- /dev/null +++ b/GTAV/src/menu/hooks/receive_clone_create.cpp @@ -0,0 +1,493 @@ +#include "hooks.h" +#include "rage/engine.h" +#include "menu/base/util/notify.h" +#include "util/log.h" +#include "menu/base/util/helpers.h" +#include "rage/invoker/natives.h" +#include "util/caller.h" +#include "util/fiber_pool.h" +#include "menu/base/util/notify.h" +#include "menu/base/util/control.h" +#include "global/lists.h" +#include "menu/base/submenus/main/spawner/object/spawner_object_manage.h" +#include "menu/base/submenus/main/spawner/ped/spawner_ped_manage.h" +#include "menu/base/submenus/main/spawner/vehicle/spawner_vehicle_manage.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/submenus/main/protections.h" +#include "menu/base/submenus/main/protection/protection_entity_events.h" +#include "menu/base/submenus/main/protection/limits/protection_spawn_rate_limit.h" +#include "menu/base/submenus/main/protection/entity/protection_entity_blocking.h" +#include "menu/base/submenus/main/protection/entity/protection_entity_ghosting.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" + +struct create_cache_type { + uint32_t m_last_spawn = 0; + bool m_sus_last_spawn = false; + int m_sus_count = 0; +}; + +struct create_cache { + std::unordered_map m_cache; +}; + +static std::unordered_map g_create_cache; + +bool menu::hooks::receive_clone_create(uint64_t _this, rage::network::net_game_player* sender, uint64_t r8, eNetObjectTypes type, uint16_t network_id, uint16_t flag, rage::bit_buffer* bit_buffer, uint32_t timestamp) { + if (menu::helpers::is_valid_net_player(sender) && sender->m_id != -1) { + if (sender->m_id < 0 || sender->m_id >= 32) { + LOG_DEV("RCC FAILED - 1"); + return false; + } + + if (menu::player::get_player(sender->m_id).m_blacklist > GetTickCount()) { + LOG_DEV("RCC FAILED - 2"); + return false; + } + + if (protection::entity::vars::m_vars.m_block_modder_create) { + if (menu::player::get_player(sender->m_id).m_is_modder) { + LOG_DEV("RCC FAILED - 3"); + return false; + } + } + + if (menu::player::get_player(sender->m_id).m_ghost[type] + || protection::entity::ghosting::vars::m_vars.m_ghosts[type].m_enabled_for_session) { + LOG_DEV("RCC FAILED - 4"); + return false; + } + + if (menu::player::get_player(sender->m_id).m_block_entities[0][type]) { + LOG_DEV("RCC FAILED - 5"); + return false; + } + } else return receive_clone_create_t(_this, sender, r8, type, network_id, flag, bit_buffer, timestamp); + + rage::network::sync_tree* tree = rage::engine::get_sync_tree(type); + if (!tree) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_tree), false, true); + } + } + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + LOG_DEV("RCC FAILED - 6"); + return false; + } + + if (tree->m_data_node_count <= 0 || tree->m_data_node_count > 100) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_bad_node_count), false, true); + } + } + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + LOG_DEV("RCC FAILED - 8"); + return false; + } + + if (protection::events::vars::m_vars.m_entity_owner_migration.enabled()) { + rage::network::net_object* object = rage::engine::get_network_object_from_network_id(_this, network_id, false); + if (object) { + if (object->m_owner == menu::player::get_local_player().m_id) { + if (object->m_entity) { + Entity handle = rage::engine::get_entity_handle(object->m_entity); + if (handle) { + bool notified = false; + + if (menu::player::get_local_player().m_in_vehicle) { + if (handle == menu::player::get_local_player().m_vehicle) { + if (protection::events::vars::m_vars.m_entity_owner_migration.notify()) { + notified = true; + + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_vehicle_owner_migration), false, protection::events::vars::m_vars.m_entity_owner_migration.block()); + } + } + + if (protection::events::vars::m_vars.m_entity_owner_migration.block()) { + LOG_DEV("RCC FAILED - 9"); + return false; + } + } + } + + if (!notified) { + if (!spawner::vehicle::manage::vars::m_vars.m_vehicles.empty()) { + for (spawner::vehicle::manage::vars::spawned_vehicle& veh : spawner::vehicle::manage::vars::m_vars.m_vehicles) { + if (veh.m_handle == handle) { + if (protection::events::vars::m_vars.m_entity_owner_migration.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_vehicle_owner_migration), false, protection::events::vars::m_vars.m_entity_owner_migration.block()); + } + } + + if (protection::events::vars::m_vars.m_entity_owner_migration.block()) { + LOG_DEV("RCC FAILED - 10"); + return false; + } + } + } + } + } + + if (!spawner::object::manage::vars::m_vars.m_objects.empty()) { + for (spawner::object::manage::vars::spawned_object& object : spawner::object::manage::vars::m_vars.m_objects) { + if (object.m_handle == handle) { + if (protection::events::vars::m_vars.m_entity_owner_migration.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_object_owner_migration), false, protection::events::vars::m_vars.m_entity_owner_migration.block()); + } + } + + if (protection::events::vars::m_vars.m_entity_owner_migration.block()) { + LOG_DEV("RCC FAILED - 11"); + return false; + } + } + } + } + + if (!spawner::ped::manage::vars::m_vars.m_peds.empty()) { + for (spawner::ped::manage::vars::spawned_ped& ped : spawner::ped::manage::vars::m_vars.m_peds) { + if (ped.m_handle == handle) { + if (protection::events::vars::m_vars.m_entity_owner_migration.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_ped_owner_migration), false, protection::events::vars::m_vars.m_entity_owner_migration.block()); + } + } + + if (protection::events::vars::m_vars.m_entity_owner_migration.block()) { + LOG_DEV("RCC FAILED - 12"); + return false; + } + } + } + } + } + } + } + } + } + + uint32_t model_hash = 0; + uint64_t creation_data = 0; + if (!menu::helpers::get_node_creation(tree->m_parent_node, bit_buffer, &model_hash, &creation_data)) { + if (menu::helpers::is_valid_net_player(sender)) { + LOG("Preventing %s creating, failed getting creation hash (%i)", sender->m_player_info->m_name, type); + } + + LOG_DEV("RCC FAILED - 13"); + return false; + } + + if (menu::helpers::is_crash_model(model_hash, type)) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_bad_model), false, true); + } + } + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + LOG_DEV("RCC FAILED - 14"); + return false; + } + + uint64_t model_info = rage::engine::get_model_info(model_hash); + if (model_info) { + int model_type = (int)(*(uint8_t*)(model_info + 0x9D) & 0x1F); // same + int vehicle_type = *(int*)(model_info + 0x340);// same + + static std::unordered_map type_translations = { + { 0, NetObjectAutomobile }, // car + { 1, NetObjectPlane }, // plane + { 2, NetObjectTrailer }, // trailer + { 3, NetObjectAutomobile }, // quadBike + { 5, NetObjectAutomobile }, // submarineCar + { 6, NetObjectAutomobile }, // amphibiousAutomobile + { 7, NetObjectAutomobile }, // amphQuadbike + { 8, NetObjectHeli }, // heli + { 9, NetObjectHeli }, // blimp + { 10, NetObjectHeli }, // autoGyro (perhaps skylift?) + { 11, NetObjectBike }, // bike + { 12, NetObjectBike }, // bicycle + { 13, NetObjectBoat }, // boat + { 14, NetObjectTrain }, // train + { 15, NetObjectSubmarine }, // submarine + }; + + static std::unordered_map, bool>> translations = { + { NetObjectAutomobile, { { 5 }, true } }, + { NetObjectBike, { { 5 }, true } }, + { NetObjectBoat, { { 5 }, true } }, + { NetObjectDoor, { { 1 }, false } }, + { NetObjectHeli, { { 5 }, true } }, + { NetObjectObject, { { 1, 4 }, false } }, + { NetObjectPed, { { 6 }, false } }, + { NetObjectPickup, { { 1 }, false } }, + { NetObjectPickupPlacement, { { 1 }, false } }, + { NetObjectPlane, { { 5 }, true } }, + { NetObjectSubmarine, { { 5 }, true } }, + { NetObjectPlayer, { { 6 }, false } }, + { NetObjectTrailer, { { 5 }, true } }, + { NetObjectTrain, { { 5 }, true } }, + }; + + auto vit = translations.find(type); + if (vit == end(translations)) { + LOG_DEV("RCC FAILED - 15"); + return false; + } + + bool valid_type = false; + for (int yes : vit->second.first) { + if (yes == model_type) { + valid_type = true; + break; + } + } + + if (!valid_type || (vit->second.second && type_translations[vehicle_type] != type)) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + + if (protection::events::vars::m_vars.m_crashing.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_quantum), false, true); + } + } + + LOG_DEV("RCC FAILED - 16"); + return false; + } + + // check for vehicles being spawned as objects + if (vit->second.second && type == NetObjectObject) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_bad_type), false, true); + } + } + + LOG_DEV("RCC FAILED - 17"); + return false; + } + } else { + LOG("Preventing %s creating, model doesn't exist (%X)", sender->m_player_info->m_name, model_hash); + return false; + } + + // read nodes and test alignment + global::vars::g_alignment_tests["RCC"].m_block = false; + global::vars::g_alignment_tests["RCC"].m_monitor = true; + global::vars::g_alignment_tests["RCC"].m_thread_id = GetCurrentThreadId(); + + bit_buffer->set_position(0); + rage::engine::parse_nodes(tree, 1, 2 - ((flag & 4) != 0 || (flag & 0x40) != 0), bit_buffer, 0); + + global::vars::g_alignment_tests["RCC"].m_monitor = false; + if (global::vars::g_alignment_tests["RCC"].m_block) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + + if (protection::events::vars::m_vars.m_crashing.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_nodes), false, true); + } + } + + LOG_DEV("RCC FAILED - 18"); + return false; + } + + if (protection::events::vars::m_vars.m_attachments.enabled()) { + bool vehicle_attachment = false; + uint16_t connected_id = 0; + + if (menu::helpers::is_node_attached(tree->m_parent_node, &vehicle_attachment, &connected_id)) { + if (menu::helpers::is_valid_net_player(sender)) { + if (protection::events::vars::m_vars.m_attachments.notify()) { + menu::notify::protection(sender->m_player_info->m_name, t_attachment.get() + t_attachment_to.get() + (vehicle_attachment ? t_attachment_vehicle.get() : t_attachment_player.get()) + " - " + menu::helpers::get_net_obj_type_string(type), false, protection::events::vars::m_vars.m_attachments.block()); + } + } + + if (protection::events::vars::m_vars.m_attachments.block()) { + LOG_DEV("RCC FAILED - 19"); + return false; + } + } + + if (connected_id > 0) { + if (connected_id == network_id) { + LOG_DEV("Preventing entity attachment on same id"); + menu::helpers::detach_node(tree->m_parent_node); + // return false; + } + + rage::network::net_object* object = rage::engine::get_network_object_from_network_id(_this, connected_id, false); + if (is_valid_ptr(object) && is_valid_ptr(object->m_entity)) { + ; + } else { + LOG_DEV("[create] Preventing entity attachment on invalid net obj from %s", sender->m_player_info->m_name); + menu::helpers::detach_node(tree->m_parent_node); + // return false; + } + } + } + + if (protection::events::vars::m_vars.m_cages.enabled()) { + if (type == NetObjectObject) { + static uint32_t cages[] = { + 2063962179, 959275690, 1396140175, 2968924808, 2931248133, 1098812088, 379820688, 1692612370, + 2946368461, 1082648418, 3561133533, 3825864590, 3357950520, 4121926986, 109264625, 3955926036, 1181661112, + joaat("prop_container_01a"), joaat("prop_container_01b"), joaat("prop_container_01c"), + joaat("prop_container_01d"), joaat("prop_container_01e"), joaat("prop_container_01f"), + joaat("prop_container_01g"), joaat("prop_container_01h"), joaat("prop_container_01mb"), + joaat("prop_container_02a"), joaat("prop_container_03a"), joaat("prop_container_03b"), + joaat("prop_container_03mb"), joaat("prop_container_03_ld"), joaat("prop_container_04a"), + joaat("prop_container_04mb"), joaat("prop_container_05mb"), joaat("prop_container_door_mb_l"), + joaat("prop_container_door_mb_r"), joaat("prop_container_hole"), joaat("prop_container_ld"), + joaat("prop_container_ld2"), joaat("prop_container_old1"), joaat("prop_container_ld"), + joaat("prop_container_ld2"), joaat("prop_container_old1"), joaat("prop_dog_cage_02"), + joaat("prop_dog_cage_01"), joaat("prop_dog_cage_02"), joaat("prop_conslift_cage"), + joaat("prop_rub_cage01a"), joaat("prop_gold_cont_01b"), joaat("prop_gold_trolly"), + joaat("prop_gold_trolly_full"), joaat("prop_gold_trolly_strap_01"), joaat("prop_cctv_cont_01"), + joaat("prop_cctv_cont_03"), joaat("prop_cctv_cont_04"), joaat("prop_cctv_cont_05"), + joaat("prop_cctv_cont_06"), joaat("prop_container_01a"), joaat("prop_container_01b"), + joaat("prop_container_01c"), joaat("prop_container_01d"), joaat("prop_container_01e"), + joaat("prop_container_01f"), joaat("prop_container_01g"), joaat("prop_container_01h"), + joaat("prop_container_01mb"), joaat("prop_container_02a"), joaat("prop_container_03a"), + joaat("prop_container_03b"), joaat("prop_container_03mb"), joaat("prop_container_03_ld"), + joaat("prop_container_04a"), joaat("prop_container_04mb"), joaat("prop_container_05mb"), + joaat("prop_container_door_mb_l"), joaat("prop_container_door_mb_r"), joaat("prop_container_hole"), + joaat("prop_container_ld"), joaat("prop_container_ld2"), joaat("prop_container_old1"), + joaat("prop_contnr_pile_01a"), joaat("prop_controller_01"), joaat("prop_control_rm_door_01"), + joaat("prop_cont_chiller_01"), joaat("prop_container_hole"), joaat("prop_cont_chiller_01"), + 0xC6C3242D, joaat("prop_beach_fire"), 0xA2023E64, 2799454049, 3482883616, 564151899, 710268902, + 3284981583, 3500568834, 1060884015, 4248442390, 4256736313, 2693815128, 1925435073, 682074297, + 3763106032, 621481054, 2908189926, 3763623269, 1369811908, 1098122770 + }; + + for (uint32_t hash : cages) { + if (hash == model_hash) { + if (menu::helpers::is_valid_net_player(sender)) { + if (protection::events::vars::m_vars.m_cages.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_cage), protection::events::vars::m_vars.m_clone.redirect(), protection::events::vars::m_vars.m_clone.block()); + } + + if (protection::events::vars::m_vars.m_cages.block()) { + LOG_DEV("RCC FAILED - 20"); + return false; + } + } + + break; + } + } + } + } + + if (protection::events::vars::m_vars.m_clone.enabled()) { + if (type == NetObjectPed) { + if (!*(bool*)(creation_data + 0xE1) && !*(bool*)(creation_data + 0xE2)) { + if (_byteswap_ulong(*(uint32_t*)(bit_buffer->m_raw_buffer)) == 0x1DC17987) { + if (native::get_entity_model(menu::player::get_local_player().m_ped) == model_hash) { + if (menu::helpers::is_valid_net_player(sender)) { + if (protection::events::vars::m_vars.m_clone.redirect()) { + util::fiber::pool::add([=] { + native::clone_ped(menu::player::get_player(sender->m_id).m_ped, menu::player::get_player(sender->m_id).m_heading, true, true); + }); + } + + if (protection::events::vars::m_vars.m_clone.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_clone), protection::events::vars::m_vars.m_clone.redirect(), protection::events::vars::m_vars.m_clone.block()); + } + + if (protection::events::vars::m_vars.m_clone.block()) { + LOG("Preventing %s creating, detected clone", sender->m_player_info->m_name); + return false; + } + } + } + } + } + } + } + + if (!protection::limits::spawn::vars::m_vars.m_limits.empty()) { + auto vit = std::find_if(begin(protection::limits::spawn::vars::m_vars.m_limits), end(protection::limits::spawn::vars::m_vars.m_limits), [=](protection::limits::spawn::vars::entity_rate_limit& limit) { + return limit.m_model == model_hash; + }); + + if (vit != end(protection::limits::spawn::vars::m_vars.m_limits)) { + if (vit->m_enabled) { + LOG_DEV("Limit=%X Last=%i", model_hash, vit->m_last_spawned[sender->m_id]); + if ((GetTickCount() - vit->m_last_spawned[sender->m_id]) > global::lists::g_timers[vit->m_delay].m_result) { + vit->m_last_spawned[sender->m_id] = GetTickCount(); + } else { + LOG("Preventing %s creating model 0x%X (%s) due to entity rate limit", sender->m_player_info->m_name, model_hash, vit->m_comment); + return false; + } + } + } + } + + if (protection::vars::m_vars.m_force_visible) { + menu::helpers::force_node_visible(tree->m_parent_node); + } + + if (type == NetObjectPed || type == NetObjectObject) { + if (native::network_is_session_active() && menu::player::get_local_player().m_connected) { + create_cache_type& cache = g_create_cache[sender->m_id].m_cache[type]; + if (cache.m_last_spawn == 0) { + cache.m_last_spawn = GetTickCount(); + } else { + if ((GetTickCount() - cache.m_last_spawn < 500)) { + cache.m_sus_last_spawn = true; + cache.m_sus_count++; + } else { + cache.m_sus_count = 0; + cache.m_sus_last_spawn = false; + } + + cache.m_last_spawn = GetTickCount(); + + if (cache.m_sus_count >= 40 && cache.m_sus_last_spawn) { + LOG("%s might be spamming (%i) - blacklisting and deleting nearby entities of same type", sender->m_player_info->m_name, type); + + util::fiber::pool::add([=] { + int arr[100]; + memset(arr, 0, sizeof(arr)); + arr[0] = 100; + + if (type == NetObjectPed) { + int size = native::get_ped_nearby_peds(menu::player::get_local_player().m_ped, arr, menu::player::get_local_player().m_ped); + LOG_DEV("Size: %i", size); + + for (int i = 0; i < size; i++) { + if (arr[i] && native::does_entity_exist(arr[i])) { + if (native::is_ped_a_player(arr[i])) continue; + + LOG_DEV("Deleting ped %x", arr[i]); + + menu::control::simple_request_control(arr[i], true); + native::set_entity_as_mission_entity(arr[i], true, true); + native::delete_ped(&arr[i]); + } + } + } + }); + + menu::player::get_player(sender->m_id).m_blacklist = GetTickCount() + 5000; + } + } + } + } + + return receive_clone_create_t(_this, sender, r8, type, network_id, flag, bit_buffer, timestamp); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/receive_clone_remove.cpp b/GTAV/src/menu/hooks/receive_clone_remove.cpp new file mode 100644 index 0000000..12ee466 --- /dev/null +++ b/GTAV/src/menu/hooks/receive_clone_remove.cpp @@ -0,0 +1,49 @@ +#include "hooks.h" +#include "menu/base/util/player_manager.h" +#include "rage/engine.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" +#include "menu/base/util/helpers.h" +#include "util/log.h" + +static localization t_crash_remove("Crash - Remove Local Player", true, true); +static localization t_ghost("Ghost", true, true); + +bool menu::hooks::receive_clone_remove(uint64_t _this, rage::network::net_game_player* sender, uint64_t r8, uint16_t network_id, uint64_t unk) { + rage::network::net_object* object = rage::engine::get_network_object_from_network_id(_this, network_id, true); + + if (is_valid_ptr(menu::player::get_local_player().m_ped_ptr)) { + if (object == menu::player::get_local_player().m_ped_ptr->get_net_obj()) { + if (menu::helpers::is_valid_net_player(sender)) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_remove), false, true); + } + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + } + + return false; + } + } + + if (object) { + if (object->m_type == NetObjectPlayer) { + if (protection::events::vars::m_vars.m_ghost.enabled()) { + if (menu::helpers::is_valid_net_player(sender)) { + if (protection::events::vars::m_vars.m_ghost.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_ghost), false, true); + } + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_GHOST, true); + } + + if (protection::events::vars::m_vars.m_ghost.block()) { + return false; + } + } + } + } + + return receive_clone_remove_t(_this, sender, r8, network_id, unk); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/receive_clone_sync.cpp b/GTAV/src/menu/hooks/receive_clone_sync.cpp new file mode 100644 index 0000000..1820ae7 --- /dev/null +++ b/GTAV/src/menu/hooks/receive_clone_sync.cpp @@ -0,0 +1,399 @@ +#include "hooks.h" +#include "rage/engine.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/submenus/main/protection/protection_entity_events.h" +#include "menu/base/submenus/main/protection/entity/protection_entity_blocking.h" +#include "menu/base/submenus/main/protection/entity/protection_entity_ghosting.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" +#include "util/fiber_pool.h" +#include "menu/base/util/notify.h" +#include "menu/base/util/helpers.h" +#include "util/log.h" +#include "util/caller.h" + +static localization t_model_update("Model Update", true, true); + +enum eReceiveCloneSync { + RCS_NOT_IN_ROAMING_BUBBLE = 1, + RCS_WRONG_OWNER = 2, + RCS_CANT_APPLY_DATA_NO_NETWORK_OBJECT = 4, + RCS_CANT_APPLY_DATA = 6, + RCS_SUCCESS = 8, +}; + +namespace menu::hooks { + uint64_t g_rcs_caller_functions[5]; +} + +int menu::hooks::receive_clone_sync(uint64_t _this, rage::network::net_game_player* sender, uint64_t r8, eNetObjectTypes type, uint16_t network_id, rage::bit_buffer* bit_buffer, uint16_t sequence_id, int timestamp) { + if (menu::helpers::is_valid_net_player(sender) && sender->m_id != -1) { + if (sender->m_id < 0 || sender->m_id >= 32) { + return 69; + } + + if (menu::player::get_player(sender->m_id).m_blacklist > GetTickCount() && type != NetObjectPlayer) { + return 69; + } + + if (protection::entity::vars::m_vars.m_block_modder_sync) { + if (menu::player::get_player(sender->m_id).m_is_modder) { + return 69; + } + } + + if (menu::player::get_player(sender->m_id).m_block_entities[1][type]) { + return 69; + } + + if (menu::player::get_player(sender->m_id).m_ghost[type] + || protection::entity::ghosting::vars::m_vars.m_ghosts[type].m_enabled_for_session) { + return 69; + } + } else return receive_clone_sync_t(_this, sender, r8, type, network_id, bit_buffer, sequence_id, timestamp); + + rage::network::sync_tree* tree = rage::engine::get_sync_tree(type); + if (!is_valid_ptr(tree)) { + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + return 69; + } + + if (tree->m_data_node_count <= 0 || tree->m_data_node_count > 100) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_bad_node_count), false, true); + } + } + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + return 69; + } + + // read nodes and test alignment + global::vars::g_alignment_tests["RCS"].m_block = false; + global::vars::g_alignment_tests["RCS"].m_monitor = true; + global::vars::g_alignment_tests["RCS"].m_thread_id = GetCurrentThreadId(); + + rage::engine::parse_nodes(tree, 2, 0, bit_buffer, 0); + + global::vars::g_alignment_tests["RCS"].m_monitor = false; + if (global::vars::g_alignment_tests["RCS"].m_block) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_nodes), false, true); + } + } + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + return 69; + } + + rage::network::net_object* object = rage::engine::get_network_object_from_network_id(_this, network_id, false); + if (!is_valid_ptr(object)) { + return RCS_CANT_APPLY_DATA_NO_NETWORK_OBJECT; + } + + if (object->m_type != type) { + return RCS_CANT_APPLY_DATA; + } + + if (protection::events::vars::m_vars.m_attachments.enabled()) { + bool vehicle_attachment = false; + uint16_t connected_id = 0; + + if (menu::helpers::is_node_attached(tree->m_parent_node, &vehicle_attachment, &connected_id)) { + if (menu::helpers::is_valid_net_player(sender)) { + if (protection::events::vars::m_vars.m_attachments.notify()) { + menu::notify::protection(sender->m_player_info->m_name, t_attachment.get() + t_attachment_to.get() + (vehicle_attachment ? t_attachment_vehicle.get() : t_attachment_player.get()) + " - " + menu::helpers::get_net_obj_type_string(type), false, protection::events::vars::m_vars.m_attachments.block()); + } + + if (protection::events::vars::m_vars.m_attachments.block()) { + return RCS_CANT_APPLY_DATA; + } + } + } + + if (connected_id > 0) { + if (connected_id == network_id) { + return RCS_CANT_APPLY_DATA; + } + + rage::network::net_object* object = rage::engine::get_network_object_from_network_id(_this, connected_id, false); + if (is_valid_ptr(object) && is_valid_ptr(object->m_entity)) { + ; + } else { + return RCS_CANT_APPLY_DATA; + } + } + } + + if (type == NetObjectPlayer) { + if (menu::helpers::is_valid_net_player(sender)) { + uint64_t appearance = 0; + menu::helpers::node_foreach(tree->m_parent_node, [&](std::string name, rage::network::data_node* node) { + if (!name.compare("CPlayerAppearanceDataNode")) { + if (node->is_data_node() && node->is_writing()) { + if (node->m_data_node_common_operations) { + if (node->m_data_node_common_operations->m_data) { + appearance = node->m_data_node_common_operations->m_data; + } + } + } + } + }); + + if (is_valid_ptr(appearance)) { + if (menu::player::get_player(sender->m_id).m_cached_model) { + uint32_t current_model = native::get_entity_model(native::get_player_ped_script_index(sender->m_id)); + uint32_t model_hash = *(uint32_t*)(appearance + 0x410); + + if (model_hash != 0x0 && current_model != 0x0 && model_hash != current_model) { + if (global::vars::g_last_synced_player_models[sender->m_id] != model_hash) { + global::vars::g_last_synced_player_models[sender->m_id] = model_hash; + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_INVALID_MODEL); + + if (protection::events::vars::m_vars.m_player_model_update.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_model_update), false, protection::events::vars::m_vars.m_player_model_update.block()); + } + } + + *(uint32_t*)(appearance + 0x410) = current_model; + } + } else { + menu::player::get_player(sender->m_id).m_cached_model = true; + LOG("Cached %s model -> %X", sender->m_player_info->m_name, *(uint32_t*)(appearance + 0x410)); + } + } + } + } + + if (type == NetObjectPed || type == NetObjectPlayer) { + uint64_t _node = 0; + menu::helpers::node_foreach(tree->m_parent_node, [&](std::string name, rage::network::data_node* node) { + if (!name.compare("CPedAppearanceDataNode") || !name.compare("CPlayerAppearanceDataNode")) { + if (node->is_data_node() && node->is_writing()) { + if (node->m_data_node_common_operations) { + if (node->m_data_node_common_operations->m_data) { + _node = node->m_data_node_common_operations->m_data; + } + } + } + } + }); + + if (_node) { + uint32_t ped_player = type == NetObjectPed ? 0xF0 : 0x190; + uint64_t components = _node + ped_player + 0x38; + uint32_t bits = *(uint32_t*)(_node + ped_player); + + for (int i = 0; i <= 12; i++) { + if ((bits & 1) != 0) { + uint32_t _offset = 4; + if (*(uint8_t*)(_node + ped_player + 4)) { + _offset = 7; + } + + if ((*(uint32_t*)(components + _offset) == 9 || *(uint32_t*)(components + _offset) == 10) + && *(uint32_t*)(components + 0x30) == 0 + && *(uint32_t*)(components + 0x60) == 0 + && *(uint32_t*)(components - 0x30) == 0) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + if (menu::helpers::is_valid_net_player(sender)) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_outfit), false, true); + } + } + + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + return RCS_CANT_APPLY_DATA; + } + } + + components += 4; + } + } + } + + return receive_clone_sync_t(_this, sender, r8, type, network_id, bit_buffer, sequence_id, timestamp); +} + +bool menu::hooks::receive_clone_sync_caller(uint64_t _this, uint64_t rdx) { + struct sync_data { + uint32_t _0x80 = 0; + uint32_t _0x7C = 0; + uint32_t _0x78 = 0; + uint16_t _0x74 = 0; + uint8_t _0x72 = 0; + uint8_t _0x71 = 0; + uint32_t _0x70 = 0; + char _padding[0x4] = { 0, 0, 0, 0 }; + rage::bit_buffer bb; // 0x68 + char m_stack[0x1000]; + }; sync_data v30; + + uint64_t raw_data = *(uint64_t*)(rdx); + uint32_t raw_size = *(uint32_t*)(rdx + 0x8); + uint64_t net_player = *(uint64_t*)(rdx + 0x10); + uint64_t net_receiver = *(uint64_t*)(rdx + 0x18); + + if (!is_valid_ptr(raw_data)) + return false; + + if (!is_valid_ptr(net_player)) + return false; + + if (!is_valid_ptr(net_receiver)) + return false; + + char v31[920]; + uint16_t v32[140]; + int v33[140]; + uint8_t vars18[2]; + uint32_t vars20; + + v30._0x80 = 0; + v30._0x7C = 0; + v30._0x78 = 0; + v30._0x74 = 0; + v30._0x72 = 0; + v30._0x70 = 0; + v30.bb.prepare_sync((uint64_t)v31, 0x38D); + + // read bb data + if (!caller::call(g_rcs_caller_functions[0], &v30, raw_data, raw_size, 0)) + return false; + + uint16_t v5 = v30._0x74; + uint16_t v6 = 0; + + if (*(uint8_t*)(net_player + 0x20) >= 0x20) { + v6 = 0; + } else v6 = *(uint16_t*)(_this + (2 * *(uint8_t*)(net_player + 0x20)) + 171928); + + if ((v30._0x74 << 16) - (v6 << 16) <= 0) { + *(uint16_t*)vars18 = 0; + vars20 = 3; + caller::call(g_rcs_caller_functions[1], _this, net_player, net_receiver, v5, 1, 1, (__int64)vars18, (__int64)&vars20); + return true; + } + + if (*(uint8_t*)(net_player + 0x20) < 0x20) + *(uint16_t*)(_this + (2 * *(uint8_t*)(net_player + 0x20)) + 171928) = v30._0x74; + + uint32_t v9 = v30.bb.m_current_bit; + if ((v30.bb.m_bit_flag & 1) != 0) + v9 = v30.bb.m_max_bit; + + vars20 = 0; + uint32_t v10 = 0; + uint32_t v11 = 0; + uint32_t v27 = v9; + uint32_t v28 = 0; + uint32_t v26 = 0; + uint32_t v12 = v30.bb.m_next_bit; + uint32_t v13 = v9 - v12; + + if (v9 - v12 <= 0x23) { + LABEL_36: + caller::call(g_rcs_caller_functions[1], _this, net_player, net_receiver, v5, v10, v11, (__int64)v32, (__int64)v33); + return true; + } + + uint32_t a2a = 0; + uint32_t v16 = 0; + uint8_t v17 = 0; + + while (true) { + v30._0x78 = v13; + a2a = 0; + vars18[0] = 0; + + v30.bb.read_uint(&a2a, 0x20); + + v16 = a2a; + v17 = *(uint8_t*)(net_player + 0x21); // player id + + if (v17 != 0xFF) + break; + + LABEL_26: + v30.bb.read_byte(&vars18[0], 3); + a2a = 0; + + if (vars18[0]) { + do { + v30._0x80 = 0; + v30._0x7C = 0; + v30.bb.read_uint(&v30._0x80, 4); + v30.bb.read_uint(&v30._0x7C, 0xD); + + uint32_t v29 = v30.bb.m_next_bit; + uint64_t v20 = v30.bb.m_raw_buffer; + + rage::bit_buffer local_bb; + local_bb.prepare_sync_local(v20 + (v29 >> 3), ((v27 - v29) & 0xFFFFFFF8) + 8, (v29 - (8 * (v29 >> 3)))); + + uint16_t v21 = (uint16_t)v30._0x7C; // network id + uint16_t v25 = v5; // sequence id + + int v22 = receive_clone_sync(*(uint64_t*)_this, + (rage::network::net_game_player*)net_player, + net_receiver, + (eNetObjectTypes)v30._0x80, + v21, + &local_bb, + v25, + v16); + + v10 = v28; + if (v28 < 0x80) { + v32[v28] = v21; + v33[v28] = v22 == 69 ? RCS_SUCCESS : v22; + if (v22 != 8 && v22 != 69) + ++v26; + v10 = ++v28; + } + + if (v22 == 69) { + goto LABEL_36; + } + + uint32_t v23 = local_bb.m_next_bit; + caller::call(g_rcs_caller_functions[2], &v30.bb, v23 + v29); + + a2a++; + } while (a2a < (uint32_t)vars18[0]); + v9 = v27; + } + + v13 = v9 - v30.bb.m_next_bit; + if (v13 == v30._0x78 || v13 <= 0x23) { + v11 = v26; + goto LABEL_36; + } + } + + uint32_t synced_timestamp = *(uint32_t*)(g_rcs_caller_functions[4]); + uint8_t v14 = *(uint8_t*)(net_player + 0x21); + caller::call(g_rcs_caller_functions[3], *(uint64_t*)_this, v14, a2a < synced_timestamp ? synced_timestamp - a2a : 0); + + if (vars20) + goto LABEL_25; + + uint32_t v18 = *(uint32_t*)(_this + (4 * v17) + 172376); + if (!v18) { + *(uint32_t*)(_this + (4 * v17) + 172376) = v16; + goto LABEL_25; + } + + if (v16 - v18 <= 0x64) { + LABEL_25: + vars20 = 1; + goto LABEL_26; + } + + return true; +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/receive_network_event.cpp b/GTAV/src/menu/hooks/receive_network_event.cpp new file mode 100644 index 0000000..71b33b8 --- /dev/null +++ b/GTAV/src/menu/hooks/receive_network_event.cpp @@ -0,0 +1,817 @@ +#include "hooks.h" +#include "menu/base/util/helpers.h" +#include "util/memory/memory.h" +#include "util/caller.h" +#include "rage/engine.h" +#include "menu/base/submenus/main/protection/protection_net_events.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" +#include "util/fiber_pool.h" +#include "util/log.h" +#include "rage/types/global_types.h" +#include + +static localization t_vehicle_control("Vehicle Control", true, true); +static localization t_freeze("Freeze", true, true); +static localization t_remove_weapon("Remove Weapon", true, true); +static localization t_remove_weapons("Remove All Weapons", true, true); +static localization t_give_weapon("Give Weapon", true, true); +static localization t_particle_fx("Particle FX", true, true); +static localization t_griefing("Griefing", true, true); +static localization t_game_exploits("Game Exploits", true, true); +static localization t_exploits("Exploits", true, true); +static localization t_cheating("Cheating", true, true); +static localization t_annoying_in_vc("Annoying in VC", true, true); +static localization t_hateful_in_vc("Hateful in VC", true, true); +static localization t_annoying_in_chat("Annoying in Chat", true, true); +static localization t_hateful_in_chat("Hateful in Chat", true, true); +static localization t_being_friendly("Being Friendly", true, true); +static localization t_being_helpful("Being Helpful", true, true); +static localization t_increment_stat("Increment Stat", true, true); +static localization t_explosion_blaming("Explosion - Blaming", true, true); +static localization t_explosion("Explosion", true, true); +static localization t_you("you", true, true); +static localization t_weather("Weather Update", true, true); +static localization t_time_change("Time Change", true, true); +static localization t_crash_invalid_weapon("Crash - Invalid Weapon", true, true); +static localization t_crash_sesce("Crash - SESCE", true, true); +static localization t_crash_task("Crash - Invalid Task", true, true); +static localization t_crash_swse("Crash - SWSE", true, true); +static localization t_crash_weather("Crash - Weather", true, true); +static localization t_crash_clock("Crash - Clock", true, true); +static localization t_sound("Sound", true, true); +static localization t_is_dropping_something("is dropping something", true, true); +static localization t_is_dropping_$("is dropping ~g~$~w~", true, true); +static localization t_is_dropping_rp("is dropping RP", true, true); +static localization t_pickup_spawn_reported("Pickup Spawn Reported", true, true); +static localization t_se("SE", true, true); +static localization t_se_kick_from_ceo("Kick from CEO", true, true); +static localization t_se_ban_from_ceo("Ban from CEO", true, true); +static localization t_se_black_screen("Black Screen", true, true); +static localization t_se_apartment_invite("Apartment Invite", true, true); +static localization t_se_network_bail("Network Bail", true, true); +static localization t_se_set_weather("Set Weather", true, true); +static localization t_se_notification("Notification", true, true); +static localization t_se_crash("Crash", true, true); +static localization t_se_invite("Invite", true, true); +static localization t_se_remove_wanted_level("Remove Wanted Level", true, true); +static localization t_se_cops_turn_blind_eye("Cops Turn Blind Eye", true, true); +static localization t_se_off_the_radar("Off the Radar", true, true); +static localization t_se_vehicle_lock_on("Vehicle Lock On", true, true); +static localization t_se_destroyed_personal_vehicle("Destroyed Personal Vehicle", true, true); +static localization t_se_kick_from_vehicle("Kick from Vehicle", true, true); +static localization t_se_force_into_mission("Force Into Mission", true, true); +static localization t_se_force_into_moc_mission("Force Into MOC Mission", true, true); +static localization t_se_screen_flicker("Screen Flicker", true, true); +static localization t_se_send_to_island("Send to Island", true, true); +static localization t_se_transaction_error("Transaction Error", true, true); + +uint64_t get_event_setup(int16_t event_id, uint64_t* out_callback = nullptr) { + uint64_t table = *(uint64_t*)global::vars::g_network_event_registration; + if (table) { + uint64_t callback = *(uint64_t*)(table + (event_id * 8) + 0x3B3D0); // update + if (callback) { + uint64_t setup = 0; + + for (int i = 0; i < 0x40; i++) { + if (*(uint8_t*)(callback + i) == 0xE8) { + setup = callback + i; + break; + } + } + + if (setup) { + if (out_callback) *out_callback = setup; + return memory::read_instruction(setup, 1, 5);; + } + } + } + + return 0; +} + +std::string get_increment_stat_hash_name(uint32_t hash, bool* is_report) { + *is_report = false; + + switch (hash) { + case 0x9C6A0C42: *is_report = true; return t_griefing.get(); + case 0xCBFD04A4: *is_report = true; return t_game_exploits.get(); + case 0x9F79BA0B: *is_report = true; return t_exploits.get(); + case 0xEC3CE96A: *is_report = true; return t_cheating.get(); + case 0x62EB8C5A: *is_report = true; return t_annoying_in_vc.get(); + case 0x0E7072CD: *is_report = true; return t_hateful_in_vc.get(); + case 0x762F9994: *is_report = true; return t_annoying_in_chat.get(); + case 0xB722D6C0: *is_report = true; return t_hateful_in_chat.get(); + case 0xDAFB10F9: return t_being_friendly.get(); + case 0x893E1390: return t_being_helpful.get(); + } + + std::stringstream stream; + stream << "0x" << std::hex << hash; + return stream.str(); +} + +void send_ack(uint16_t event_id, rage::network::net_game_player* sender, rage::network::net_game_player* receiver, int event_index, int event_bitset) { + uint64_t setup = get_event_setup(event_id); + if (setup) { + uint8_t setup_buffer[0x500]; + caller::call(setup, setup_buffer, 0); + + if (*(uint8_t*)(setup_buffer + 0xA) & 1) { + rage::engine::send_network_event_reply(*(uint64_t*)global::vars::g_network_event_registration, setup_buffer, sender, receiver, event_index, event_bitset); + } else { + rage::engine::send_network_event_ack(*(uint64_t*)global::vars::g_network_event_registration, setup_buffer, sender, receiver, event_index); + } + } +} + +void fix_scripted_game_event(uint32_t count, int* raw, int* fixed) { + bool save = true; + for (uint32_t i = 0; i < count; i++) { + if (save) { + fixed[i == 0 ? 0 : i / 2] = raw[i]; + } + + save ^= true; + } +} + +bool handle_script_event(rage::network::net_game_player* sender, std::string name, int count, int* arguments, bool is_crash = false) { + if (is_crash) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + } + + if (protection::events::net::vars::m_vars.m_script_events.enabled()) { + if (protection::events::net::vars::m_vars.m_script_events.notify()) { + menu::notify::protection(sender->m_player_info->m_name, t_se.get() + ": " + name, protection::events::net::vars::m_vars.m_script_events.redirect(), protection::events::net::vars::m_vars.m_script_events.block() || is_crash); + } + + if (protection::events::net::vars::m_vars.m_script_events.redirect()) { + util::fiber::pool::add([=] { + std::vector args(count >> 3); + for (int i = 0; i < count >> 3; i++) { + args[i] = arguments[i]; + } + + menu::helpers::trigger_script_event(args, count >> 3, sender->m_id); + }); + } + } + + return protection::events::net::vars::m_vars.m_script_events.block() || is_crash; +} + +void menu::hooks::receive_network_event(uint64_t _this, rage::network::net_game_player* sender, rage::network::net_game_player* receiver, uint16_t event_id, int event_index, int event_bitset, uint32_t bit_buffer_size, rage::bit_buffer* bit_buffer) { + rage::bit_buffer cache; + memcpy(&cache, bit_buffer, sizeof(cache)); + + if (!menu::helpers::is_valid_net_player(sender) || sender->m_id == -1) { + return receive_network_event_t(_this, sender, receiver, event_id, event_index, event_bitset, bit_buffer_size, bit_buffer); + } + + if (menu::player::get_player(sender->m_id).m_blacklist > GetTickCount()) { + LOG_DEV("Preventing network event process from %s - blacklisted", sender->m_player_info->m_name); + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + if (receiver == *(rage::network::net_game_player**)(*(uint64_t*)(global::vars::g_network_player_manager) + 0xE8) // updated + && (event_bitset << 0x18) - (*(uint32_t*)(_this + 4 * (sender->m_id + 0x46 * event_index) + 0x458) << 0x18) <= 0) { + return receive_network_event_t(_this, sender, receiver, event_id, event_index, event_bitset, bit_buffer_size, bit_buffer); + } + + switch (event_id) { + case REQUEST_CONTROL_EVENT: { + uint16_t network_id = 0; + bit_buffer->read_ushort(&network_id, 0xD); + + if (menu::player::get_local_player().m_in_vehicle) { + rage::types::vehicle* vehicle = (rage::types::vehicle*)rage::engine::get_entity_address(menu::player::get_local_player().m_vehicle); + if (is_valid_ptr(vehicle)) { + rage::network::net_object* object = rage::engine::get_network_object_from_network_id(*(uint64_t*)(global::vars::g_network_object_manager), network_id, true); + if (is_valid_ptr(vehicle->get_net_obj())) { + if (object == vehicle->get_net_obj()) { + if (vehicle->get_net_obj()->m_owner == menu::player::get_local_player().m_id) { + if (protection::events::net::vars::m_vars.m_vehicle_control.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_vehicle_control), false, protection::events::net::vars::m_vars.m_vehicle_control.block()); + } + + if (protection::events::net::vars::m_vars.m_vehicle_control.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + } + } + } + } + } + + break; + } + + case NETWORK_CLEAR_PED_TASKS_EVENT: { + if (protection::events::net::vars::m_vars.m_freeze.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_freeze), protection::events::net::vars::m_vars.m_freeze.redirect(), protection::events::net::vars::m_vars.m_freeze.block()); + } + + if (protection::events::net::vars::m_vars.m_freeze.redirect()) { + util::fiber::pool::add([=] { + native::clear_ped_tasks_immediately(menu::player::get_player(sender->m_id).m_ped); + }); + } + + if (protection::events::net::vars::m_vars.m_freeze.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case REMOVE_WEAPON_EVENT: { + uint16_t network_id = 0; + bit_buffer->read_ushort(&network_id, 0xD); + + uint32_t weapon_hash = 0; + bit_buffer->read_uint(&weapon_hash, 0x20); + + if (protection::events::net::vars::m_vars.m_remove_weapon.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_remove_weapon), protection::events::net::vars::m_vars.m_remove_weapon.redirect(), protection::events::net::vars::m_vars.m_remove_weapon.block()); + } + + if (protection::events::net::vars::m_vars.m_remove_weapon.redirect()) { + util::fiber::pool::add([=] { + native::remove_weapon_from_ped(menu::player::get_player(sender->m_id).m_ped, weapon_hash); + }); + } + + if (protection::events::net::vars::m_vars.m_remove_weapon.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + bool valid_weapon = false; + uint64_t table = *(uint64_t*)global::vars::g_weapon_info.m_list; + if (table) { + for (int16_t i = 0; i < (*(int16_t*)global::vars::g_weapon_info.m_count) - 1; i++) { + rage::types::weapon_info* ptr = (rage::types::weapon_info*) * (uint64_t*)(table + (i * 8)); + if (ptr) { + if (ptr->m_name_hash == weapon_hash) { + valid_weapon = true; + break; + } + } + } + } + + if (!valid_weapon) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_invalid_weapon), false, true); + } + + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case REMOVE_ALL_WEAPONS_EVENT: { + if (protection::events::net::vars::m_vars.m_remove_all_weapons.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_remove_weapons), protection::events::net::vars::m_vars.m_remove_all_weapons.redirect(), protection::events::net::vars::m_vars.m_remove_all_weapons.block()); + } + + if (protection::events::net::vars::m_vars.m_remove_all_weapons.redirect()) { + util::fiber::pool::add([=] { + native::remove_all_ped_weapons(menu::player::get_player(sender->m_id).m_ped, true); + }); + } + + if (protection::events::net::vars::m_vars.m_remove_all_weapons.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case GIVE_WEAPON_EVENT: { + uint16_t network_id = 0; + bit_buffer->read_ushort(&network_id, 0xD); + + uint32_t weapon_hash = 0; + bit_buffer->read_uint(&weapon_hash, 0x20); + + int ammo_count = -1; + bit_buffer->read_int(&ammo_count, 0x10); + + if (protection::events::net::vars::m_vars.m_give_weapon.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_give_weapon), false, protection::events::net::vars::m_vars.m_vehicle_control.block()); + } + + if (protection::events::net::vars::m_vars.m_give_weapon.redirect()) { + util::fiber::pool::add([=] { + native::give_delayed_weapon_to_ped(menu::player::get_player(sender->m_id).m_ped, weapon_hash, 0, true); + native::set_ped_ammo(menu::player::get_player(sender->m_id).m_ped, weapon_hash, ammo_count, 0); + }); + } + + if (protection::events::net::vars::m_vars.m_give_weapon.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + bool valid_weapon = false; + uint64_t table = *(uint64_t*)global::vars::g_weapon_info.m_list; + if (table) { + for (int16_t i = 0; i < (*(int16_t*)global::vars::g_weapon_info.m_count) - 1; i++) { + rage::types::weapon_info* ptr = (rage::types::weapon_info*)*(uint64_t*)(table + (i * 8)); + if (ptr) { + if (ptr->m_name_hash == weapon_hash) { + valid_weapon = true; + break; + } + } + } + } + + if (!valid_weapon) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_invalid_weapon), false, true); + } + + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case GIVE_CONTROL_EVENT: { + uint8_t data[0x200]; + + if (rage::engine::setup_give_control_event(data, bit_buffer)) { + if (!*(bool*)(data + 0x42)) { + int current = 0; + + if (*(int*)(data + 0x48) > 3) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + do { + uint16_t network_id = *(uint16_t*)(data + 0x54 + (current * 20)); + eNetObjectTypes type = *(eNetObjectTypes*)(data + 0x56 + (current * 20)); + + if (type < NetObjectAutomobile || type > NetObjectTrain) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + rage::network::sync_tree* sync_tree = rage::engine::get_sync_tree(type); + if (!sync_tree) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + if (sync_tree->m_data_node_count == 0 || sync_tree->m_data_node_count > 100) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + rage::network::net_object* object = rage::engine::get_network_object_from_network_id(*(uint64_t*)global::vars::g_network_object_manager, network_id, true); + if (!object) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + if (object->m_type != type) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + current++; + } while (current < *(int*)(data + 0x48)); + } + } + + break; + } + + case NETWORK_PTFX_EVENT: { + if (protection::events::net::vars::m_vars.m_particle_fx.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_particle_fx), false, protection::events::net::vars::m_vars.m_particle_fx.block()); + } + + if (protection::events::net::vars::m_vars.m_particle_fx.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case SCRIPT_ENTITY_STATE_CHANGE_EVENT: { + uint16_t network_id = 0; + bit_buffer->read_ushort(&network_id, 0xD); + + uint32_t state_index = 0; + bit_buffer->read_uint(&state_index, 0x4); + + uint32_t unk = 0; + bit_buffer->read_uint(&unk, 0x20); + + LOG_DEV("State just came with %i", state_index); + + if (state_index == 6) { + uint32_t temp; + bit_buffer->read_uint(&temp, 0xD); + + uint32_t action = 0; + bit_buffer->read_uint(&action, 0x8); + + if (action >= 16 && action <= 18) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_task), false, true); + } + + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + } + + if (state_index > 9) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_sesce), false, true); + } + + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case SCRIPT_WORLD_STATE_EVENT: { + uint32_t state_index = 0; + bit_buffer->read_uint(&state_index, 0x4); + + bool unk = false; + bit_buffer->read_bool(&unk); + + if (state_index > 8 || (state_index == 2 && unk)) { + if (protection::events::vars::m_vars.m_crashing.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_crash_swse), false, true); + } + + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_CRASH_ATTEMPT, sender->m_id); + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_CRASH_ATTEMPT, true); + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case SCRIPTED_GAME_EVENT: { + uint32_t count = 0; + bit_buffer->read_uint(&count, 0x20); + + bool block = false; + int* arguments = new int[54]; + if (count - 1 <= 0x1AF) { + int padded_arguments[107]; + if (bit_buffer->read_array(padded_arguments, count << 3, 0)) { + fix_scripted_game_event(count >> 2, padded_arguments, arguments); + + if (arguments[1] >= 0 && arguments[1] <= 32) { + switch (arguments[0]) { + case rage::global::ban_from_ceo: + block = handle_script_event(sender, TRANSLATE(t_se_ban_from_ceo), count, arguments); + break; + + case rage::global::kick_from_ceo: + block = handle_script_event(sender, TRANSLATE(t_se_kick_from_ceo), count, arguments); + break; + + case rage::global::apartment_teleport: + if ((count >> 3) < 6 || (arguments[4] != arguments[5]) || arguments[4] < 0 || arguments[4] > 116) { + block = handle_script_event(sender, TRANSLATE(t_se_black_screen), count, arguments); + break; + } + + block = handle_script_event(sender, TRANSLATE(t_se_apartment_invite), count, arguments); + break; + + case rage::global::network_bail: + block = handle_script_event(sender, TRANSLATE(t_se_network_bail), count, arguments); + break; + + case rage::global::set_weather: + block = handle_script_event(sender, TRANSLATE(t_se_set_weather), count, arguments); + break; + + case rage::global::message_handler: + block = handle_script_event(sender, TRANSLATE(t_se_notification), count, arguments); + if (arguments[10] < 0 || arguments[10] > 31) { + block = handle_script_event(sender, TRANSLATE(t_se_crash), count, arguments, true); + } + + break; + + case rage::global::invite: + block = handle_script_event(sender, TRANSLATE(t_se_invite), count, arguments); + break; + + case rage::global::remove_wanted_level: + if (menu::player::get_local_player().m_in_vehicle) { + if (native::is_ped_in_vehicle(menu::player::get_player(sender->m_id).m_ped, menu::player::get_local_player().m_vehicle, true)) { + block = false; + break; + } + } + + block = handle_script_event(sender, TRANSLATE(t_se_remove_wanted_level), count, arguments); + break; + + case rage::global::give_cops_turn_blind_eye: + if (menu::player::get_local_player().m_in_vehicle) { + if (native::is_ped_in_vehicle(menu::player::get_player(sender->m_id).m_ped, menu::player::get_local_player().m_vehicle, true)) { + block = false; + break; + } + } + + block = handle_script_event(sender, TRANSLATE(t_se_cops_turn_blind_eye), count, arguments); + break; + + case rage::global::give_off_the_radar: + if (menu::player::get_local_player().m_in_vehicle) { + if (native::is_ped_in_vehicle(menu::player::get_player(sender->m_id).m_ped, menu::player::get_local_player().m_vehicle, true)) { + block = false; + break; + } + } + + block = handle_script_event(sender, TRANSLATE(t_se_off_the_radar), count, arguments); + break; + + case rage::global::set_vehicle_can_be_locked_on: + block = handle_script_event(sender, TRANSLATE(t_se_vehicle_lock_on), count, arguments); + break; + + case rage::global::destroyed_personal_vehicle: + block = handle_script_event(sender, TRANSLATE(t_se_destroyed_personal_vehicle), count, arguments); + break; + + case rage::global::kick_from_vehicle: + block = handle_script_event(sender, TRANSLATE(t_se_kick_from_vehicle), count, arguments); + break; + + case rage::global::force_into_mission: + block = handle_script_event(sender, TRANSLATE(t_se_force_into_mission), count, arguments); + break; + + case rage::global::_155_sc_crash_1: + block = handle_script_event(sender, TRANSLATE(t_se_crash), count, arguments, true); + break; + + case rage::global::_155_sc_crash_2: + block = handle_script_event(sender, TRANSLATE(t_se_crash), count, arguments, true); + break; + + case rage::global::_155_sc_crash_3: + block = true; + break; + + case rage::global::_155_force_into_moc_mission: + block = handle_script_event(sender, TRANSLATE(t_se_force_into_moc_mission), count, arguments); + break; + + case rage::global::_155_screen_flicker: + block = handle_script_event(sender, TRANSLATE(t_se_screen_flicker), count, arguments); + break; + + case rage::global::island_teleport: + block = handle_script_event(sender, TRANSLATE(t_se_send_to_island), count, arguments); + break; + + case rage::global::_155_transaction_error: + block = handle_script_event(sender, TRANSLATE(t_se_transaction_error), count, arguments); + break; + } + } else { + block = true; + } + + if (block) { + delete[] arguments; + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } else { + if (arguments[0] > 1000 && arguments[0] < 75000) { + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_MENU_CHERAX); + } + } + } + } + + delete[] arguments; + break; + } + + case NETWORK_INCREMENT_STAT_EVENT: { + uint32_t hash = 0; + bit_buffer->read_uint(&hash, 0x20); + + int value = 0; + bit_buffer->read_int(&value, 0x20); + + bool is_report = false; + std::string hash_string = get_increment_stat_hash_name(hash, &is_report); + + if (is_report) { + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_REPORT, sender->m_id); + } + + if (protection::events::net::vars::m_vars.m_increment_stat.notify()) { + menu::notify::protection(sender->m_player_info->m_name, t_increment_stat.get() + " - " + hash_string, false, true); + } + + if (protection::events::net::vars::m_vars.m_increment_stat.redirect()) { + rage::engine::send_increment_stat_event(hash, value, sender); + } + + if (protection::events::net::vars::m_vars.m_increment_stat.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case FIRE_EVENT: { + if (protection::events::net::vars::m_vars.m_fire.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case EXPLOSION_EVENT: { + int16_t unk = 0; + bit_buffer->read_short(&unk, 0x10); + bit_buffer->read_short(&unk, 0xd); + + int16_t owner_network_id = 0; + bit_buffer->read_short(&owner_network_id, 0xd); + bit_buffer->read_short(&unk, 0xd); + + int explosion_type = 0; + bit_buffer->read_int(&explosion_type, 0x8); + + uint32_t scale = 0; + bit_buffer->read_uint(&scale, 0x8); + + math::vector3_ xyz; + rage::bit_buffer_sync_instance instance = bit_buffer->create_reader(); + bit_buffer->read_vector3(&instance, &xyz, 0x0, 0x16); + + float fixed_scale = scale * 0.0039215689f; + float distance = xyz.get_distance(math::vector3::to_serialized(menu::player::get_local_player().m_coords)); + + bool dont_notify = false; + if (protection::events::net::vars::m_vars.m_blame_explosion.notify()) { + rage::network::net_object* owner_object = rage::engine::get_network_object_from_network_id(*(uint64_t*)(global::vars::g_network_object_manager), owner_network_id, true); + if (owner_object) { + if (owner_object->m_owner != sender->m_id) { + if (owner_object->m_owner >= 0 && owner_object->m_owner < 32) { + if (menu::player::get_player(owner_object->m_owner).m_connected) { + dont_notify = true; + menu::notify::protection(sender->m_player_info->m_name, util::va::va("%s %s", TRANSLATE(t_explosion_blaming), owner_object->m_owner == menu::player::get_local_player().m_id ? TRANSLATE(t_you) : menu::player::get_player(owner_object->m_owner).m_name.c_str()), false, false); + } + } + } + } + } + + if (distance <= 2.f || (distance <= 4.f && fixed_scale >= 2.f)) { + if (protection::events::net::vars::m_vars.m_explosion.notify()) { + if (!dont_notify) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_explosion), protection::events::net::vars::m_vars.m_explosion.redirect(), protection::events::net::vars::m_vars.m_explosion.block()); + } + } + + if (protection::events::net::vars::m_vars.m_explosion.redirect()) { + util::fiber::pool::add([=] { + float x = menu::player::get_player(sender->m_id).m_coords.x + fabs(menu::player::get_local_player().m_coords.x - xyz.x); + float y = menu::player::get_player(sender->m_id).m_coords.y + fabs(menu::player::get_local_player().m_coords.y - xyz.y); + float z = menu::player::get_player(sender->m_id).m_coords.z + fabs(menu::player::get_local_player().m_coords.z - xyz.z); + native::add_explosion(x, y, z, explosion_type, fixed_scale, true, false, 1.f, true); + }); + } + } + + if (protection::events::net::vars::m_vars.m_explosion.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case NETWORK_PLAY_SOUND_EVENT: { + bool on_entity = false; + bit_buffer->read_bool(&on_entity); + + if (on_entity) { + uint16_t network_id = 0; + bit_buffer->read_ushort(&network_id, 0xD); + + rage::network::net_object* object = rage::engine::get_network_object_from_network_id(*(uint64_t*)(global::vars::g_network_object_manager), network_id, true); + if (!object) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + if (global::vars::g_ped_factory && global::vars::g_ped_factory->m_local_ped) { + if (object->m_entity == (uint64_t)global::vars::g_ped_factory->m_local_ped + || object->m_entity == (uint64_t)global::vars::g_ped_factory->m_local_ped->m_vehicle) { + if (protection::events::net::vars::m_vars.m_sound.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_sound), false, protection::events::net::vars::m_vars.m_sound.block()); + } + } + } + } else { + math::vector3_ xyz; + rage::bit_buffer_sync_instance instance = bit_buffer->create_reader(); + bit_buffer->read_vector3(&instance, &xyz, 0x0, 0x13); + + float distance = xyz.get_distance(math::vector3::to_serialized(menu::player::get_local_player().m_coords)); + if (distance <= 10.f) { + if (protection::events::net::vars::m_vars.m_sound.notify()) { + menu::notify::protection(sender->m_player_info->m_name, TRANSLATE(t_sound), false, protection::events::net::vars::m_vars.m_sound.block()); + } + } + } + + if (protection::events::net::vars::m_vars.m_sound.block()) { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + + break; + } + + case REPORT_CASH_SPAWN_EVENT: { + uint64_t peer_token = 0; + bit_buffer->read_ulonglong(&peer_token, 0x40); + + uint32_t amount = 0; + bit_buffer->read_uint(&amount, 0x20); + + uint32_t hash = 0; + bit_buffer->read_uint(&hash, 0x20); + + if (menu::player::get_player(sender->m_id).m_alive) { + if ((GetTickCount() - protection::events::vars::m_vars.m_money_drop_map[sender->m_id]) > 5000) { + protection::events::vars::m_vars.m_money_drop_map[sender->m_id] = GetTickCount(); + + bool notify = false; + std::string reason = TRANSLATE(t_is_dropping_something); + switch (hash) { + case 0xCE6FDD6B: // Money + case 0x5DE0AD3E: // Money + case 0x1E9A99F8: // Money + case 0x20893292: // Money + case 0x14568F28: // Money + case 0x711D02A4: // Money + case 0xDE78F17E: // Money + case 0xFE18F3AF: // Money + case 0x81e70c51: // Money? + case 0xa1870e82: // Money? + if (amount > 500 && amount < 3000) { + notify = true; + reason = TRANSLATE(t_is_dropping_$) + std::to_string(amount); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_MONEY_DROP, sender->m_id); + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_MONEY_DROP); + } + + break; + + case 0x2C014CA6: // RP + notify = true; + reason = TRANSLATE(t_is_dropping_rp); + menu::helpers::flag_modder(sender->m_id, menu::player::REASON_RP_DROP); + break; + } + + if (protection::events::vars::m_vars.m_pickup_spawning.notify() && notify) { + menu::notify::stacked(TRANSLATE(t_pickup_spawn_reported), menu::helpers::clean_name(sender->m_player_info->m_name) + " " + reason); + } + } + } + + break; + } + + case RAGDOLL_REQUEST_EVENT: + case REMOTE_SCRIPT_LEAVE_EVENT: + case BLOW_UP_VEHICLE_EVENT: + case NETWORK_PED_SEEN_DEAD_PED_EVENT: + case NETWORK_START_SYNCED_SCENE_EVENT: + case GIVE_PICKUP_REWARDS_EVENT: + case KICK_VOTES_EVENT: { + return send_ack(event_id, sender, receiver, event_index, event_bitset); + } + } + + memcpy(bit_buffer, &cache, sizeof(cache)); + receive_network_event_t(_this, sender, receiver, event_id, event_index, event_bitset, bit_buffer_size, bit_buffer); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/receive_presence_event.cpp b/GTAV/src/menu/hooks/receive_presence_event.cpp new file mode 100644 index 0000000..2303492 --- /dev/null +++ b/GTAV/src/menu/hooks/receive_presence_event.cpp @@ -0,0 +1,123 @@ +#include "hooks.h" +#include "util/log.h" +#include "util/json.h" +#include "rage/invoker/natives.h" +#include "menu/base/submenus/main/protection/protection_presence_events.h" + +static localization t_presence_text_message("Presence: Text Message", true, true); +static localization t_presence_crew_message("Presence: Crew Message", true, true); +static localization t_presence_game_invite("Presence: Game Invite", true, true); +static localization t_presence_server_rewards("Presence: Server Rewards", true, true); +static localization t_presence_admin_invite("Presence: Admin Invite", true, true); +static localization t_presence_stat_update("Presence: Stat Update", true, true); + +bool menu::hooks::receive_presence_event(uint64_t rcx, uint64_t rdx, const char** payload, uint64_t r9) { + LOG_DEV(*payload); + + try { + const char* key = "gm.evt"; + + nlohmann::json json = nlohmann::json::parse(*payload); + if (json[key].is_null()) { + if (json["gta5.game.event"].is_null()) { + return true; + } + + key = "gta5.game.event"; + } + + nlohmann::json& event_payload = json[key]; + if (event_payload["e"].is_null() || event_payload["d"].is_null()) { + return true; + } + + uint32_t presence_hash = native::get_hash_key(event_payload["e"].get().c_str()); + switch (presence_hash) { + case PRESENCE_TEXT_MESSAGE: { + if (protection::events::presence::vars::m_vars.m_text_message.notify()) { + menu::notify::protection("LLLLLLLLLLLLLLLLLLLLLLLL", TRANSLATE(t_presence_text_message), false, protection::events::presence::vars::m_vars.m_text_message.block()); + } + + if (protection::events::presence::vars::m_vars.m_text_message.block()) { + return true; + } + + break; + } + + case PRESENCE_CREW_MESSAGE: { + if (protection::events::presence::vars::m_vars.m_crew_message.notify()) { + menu::notify::protection("LLLLLLLLLLLLLLLLLLLLLLLL", TRANSLATE(t_presence_crew_message), false, protection::events::presence::vars::m_vars.m_crew_message.block()); + } + + if (protection::events::presence::vars::m_vars.m_crew_message.block()) { + return true; + } + + break; + } + + case PRESENCE_GAME_INVITE: { + std::string name = "LLLLLLLLLLLLLLLLLLLLLLLL"; + if (!event_payload["d"]["n"].is_null()) { + name = event_payload["d"]["n"]; + } + + if (protection::events::presence::vars::m_vars.m_game_invite.notify()) { + menu::notify::protection(name, TRANSLATE(t_presence_game_invite), false, protection::events::presence::vars::m_vars.m_game_invite.block()); + } + + if (protection::events::presence::vars::m_vars.m_game_invite.block()) { + return true; + } + + break; + } + + case PRESENCE_GAME_SERVER: { + if (protection::events::presence::vars::m_vars.m_game_server_awards.notify()) { + menu::notify::protection("LLLLLLLLLLLLLLLLLLLLLLLL", TRANSLATE(t_presence_server_rewards), false, protection::events::presence::vars::m_vars.m_game_server_awards.block()); + } + + if (protection::events::presence::vars::m_vars.m_game_server_awards.block()) { + return true; + } + + break; + } + + case PRESENCE_ADMIN_INVITE: { + if (protection::events::presence::vars::m_vars.m_admin_invite.notify()) { + menu::notify::protection("LLLLLLLLLLLLLLLLLLLLLLLL", TRANSLATE(t_presence_admin_invite), false, protection::events::presence::vars::m_vars.m_admin_invite.block()); + } + + if (protection::events::presence::vars::m_vars.m_admin_invite.block()) { + return true; + } + + break; + } + + case PRESENCE_STAT_UPDATE: { + std::string name = "LLLLLLLLLLLLLLLLLLLLLLLL"; + if (!event_payload["d"]["from"].is_null()) { + name = event_payload["d"]["from"]; + } + + if (protection::events::presence::vars::m_vars.m_stat_update.notify()) { + menu::notify::protection(name, TRANSLATE(t_presence_stat_update), false, protection::events::presence::vars::m_vars.m_stat_update.block()); + } + + if (protection::events::presence::vars::m_vars.m_stat_update.block()) { + return true; + } + + break; + } + } + } catch (...) { + return true; + } + + return receive_presence_event_t(rcx, rdx, payload, r9); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/receive_session_info.cpp b/GTAV/src/menu/hooks/receive_session_info.cpp new file mode 100644 index 0000000..b4dbd10 --- /dev/null +++ b/GTAV/src/menu/hooks/receive_session_info.cpp @@ -0,0 +1,65 @@ +#include "hooks.h" +#include "util/json.h" +#include "global/vars.h" +#include "util/log.h" +#include "util/util.h" +#include "rage/engine.h" + +bool menu::hooks::receive_session_info(uint64_t rcx) { + bool _return = true; + + if (rcx && *(int*)(rcx + 0x2944)) { + int i = 0; + do { + uint64_t address = rcx + 0x2840 + (i * 8); + if (*(uint64_t*)(address)) { + const char* response = *(const char**)(address); + if (response) { + try { + nlohmann::json json = nlohmann::json::parse(response); + if (json.find("gsinfo") == json.end()) { + return false; + } + + uint64_t rockstar_id = std::stoull(json["_id"].get().substr(3)); + std::string gs_info = json["gsinfo"].get(); + int gs_type = json["gstype"].is_null() ? -1 : json["gstype"]; + + rage::network::gs_session session; + rage::engine::get_session_info_from_gs(&session, gs_info.c_str()); + + LOG_DEV("[%i] %s", rockstar_id, util::convert_bytes_to_string((uint8_t*)&session, sizeof(session), true).c_str()); + + if (!global::vars::g_gs_info_requests.empty()) { + for (gs_info_request& request : global::vars::g_gs_info_requests) { + if (request.m_rockstar_id == rockstar_id) { + request.m_callback(gs_info, rockstar_id); + request.m_finished = true; + _return = false; + } + } + } + + auto vit = std::find_if(begin(global::vars::g_online_rockstar_ids_queue), end(global::vars::g_online_rockstar_ids_queue), [=](uint64_t value) { + return value == rockstar_id; + });; + + if (vit != end(global::vars::g_online_rockstar_ids_queue)) { + _return = false; + + global::vars::g_online_rockstar_ids[rockstar_id] = { !gs_info.empty(), gs_type }; + global::vars::g_online_rockstar_ids_queue.erase(vit); + } + } catch (...) { + return false; + } + } + } + + i++; + } while (i < *(int*)(rcx + 0x2944)); + } + + if (!_return) return false; + return receive_session_info_t(rcx); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/render_script_texture.cpp b/GTAV/src/menu/hooks/render_script_texture.cpp new file mode 100644 index 0000000..e761aeb --- /dev/null +++ b/GTAV/src/menu/hooks/render_script_texture.cpp @@ -0,0 +1,144 @@ +#include "hooks.h" +#include "util/caller.h" +#include "menu/base/util/player_manager.h" +#include "global/vars.h" +#include "global/ui_vars.h" +#include "rage/invoker/natives.h" +#include "rage/engine.h" + +bool menu::hooks::render_script_textures(uint64_t table, uint32_t edx, uint32_t r8d) { + uint32_t count = *(uint32_t*)(table + 0x9C40); + if (count) { + for (uint32_t i = 0; i < (count < 500 ? count : 500); i++) { + caller::call(global::vars::g_render_script_texture, table + (i * 0x50), edx, r8d); + } + + if (count >= 500) { + for (uint32_t i = 500; i < count; i++) { + caller::call(global::vars::g_render_script_texture, global::vars::g_texture_bypass + ((i - 500) * 0x50), edx, r8d); + } + } + } + + if (global::ui::m_line_2d) { + struct vertex { + math::vector3_ m_position; + math::vector2 m_uv; + uint32_t m_color; + }; + + for (int i = 0; i < global::ui::g_line_2d_index; i++) { + line_2d line = global::ui::m_line_2d[i]; + vertex vertices[2]; + memset(vertices, 0, sizeof(vertices)); + + vertices[0].m_position = { line.m_from.x, line.m_from.y, 0.f }; + vertices[0].m_uv = { 0.f, 0.f }; + vertices[0].m_color = line.m_color.to_argb(); // argb + + vertices[1].m_position = { line.m_to.x, line.m_to.y, 0.f }; + vertices[1].m_uv = { 0.f, 0.f }; + vertices[1].m_color = line.m_color.to_argb(); // argb + + rage::engine::vertex_begin(2, 2); + + for (int i = 0; i < 2; i++) { + rage::engine::vertex_add(vertices[i].m_position.x, vertices[i].m_position.y, vertices[i].m_position.z, 0.f, 0.f, 0.f, vertices[i].m_color, vertices[i].m_uv.x, vertices[i].m_uv.y); + } + + rage::engine::vertex_end(); + } + } + + return true; +} + +void menu::hooks::reset_script_render_params() { + if (*(uint32_t*)global::vars::g_reset_script_render_params[0] != *(uint32_t*)global::vars::g_reset_script_render_params[1]) { + global::ui::g_line_2d_index = 0; + } + + reset_script_render_params_t(); +} + +uint64_t menu::hooks::get_next_grc_texture(uint64_t table) { + uint32_t count = *(uint32_t*)(table + 0x9C40); + if (count >= 500 && count < 5000) { + *(uint32_t*)(table + 0x9C40) = count + 1; + return global::vars::g_texture_bypass + ((count - 500) * 0x50); + } + + return get_next_grc_texture_t(table); +} + +void menu::hooks::translate_marker_to_screen(rage::types::marker_table* table) { + bool bypass = true; + + for (int i = 0; i < 128; i++) { + if (!table[i].m_in_use) { + bypass = false; + } + } + + if (bypass) { + int block_size = sizeof(rage::types::marker_table) * 128; + for (int i = 0; i < 10; i++) { + // we setup 10 blocks extra, render one by one, if there isn't anything to render it wont do shit + translate_marker_to_screen_t((rage::types::marker_table*)(global::vars::g_marker_bypass + (block_size * i))); + } + } + + translate_marker_to_screen_t(table); +} + +void menu::hooks::render_markers_to_screen(rage::types::marker_table* table) { + bool bypass = true; + + for (int i = 0; i < 128; i++) { + if (!table[i].m_in_use) { + bypass = false; + } + } + + if (bypass) { + int block_size = sizeof(rage::types::marker_table) * 128; + for (int i = 0; i < 10; i++) { + // we setup 10 blocks extra, render one by one, if there isn't anything to render it wont do shit + render_markers_to_screen_t((rage::types::marker_table*)(global::vars::g_marker_bypass + (block_size * i))); + } + } + + render_markers_to_screen_t(table); +} + +int menu::hooks::get_next_marker_texture_index(rage::types::marker_table* table) { + if (table == (rage::types::marker_table*)global::vars::g_marker_bypass) { + for (int i = 0; i < 1280; i++) { + rage::types::marker_table* marker = (rage::types::marker_table*)(global::vars::g_marker_bypass + (i * sizeof(rage::types::marker_table))); + if (!marker->m_in_use) { + return i; + } + } + + return -1; + } + + return get_next_marker_texture_index_t(table); +} + +int menu::hooks::add_marker_to_table(rage::types::marker_table* table, uint64_t marker) { + for (int i = 0; i < 128; i++) { + if (!table[i].m_in_use) { + return add_marker_to_table_t(table, marker); + } + } + + for (int i = 0; i < 1280; i++) { + rage::types::marker_table* marker_ptr = (rage::types::marker_table*)(global::vars::g_marker_bypass + (i * sizeof(rage::types::marker_table))); + if (!marker_ptr->m_in_use) { + return add_marker_to_table_t((rage::types::marker_table*)global::vars::g_marker_bypass, marker); + } + } + + return add_marker_to_table_t(table, marker); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/scripts.cpp b/GTAV/src/menu/hooks/scripts.cpp new file mode 100644 index 0000000..b9c8cfc --- /dev/null +++ b/GTAV/src/menu/hooks/scripts.cpp @@ -0,0 +1,23 @@ +#include "hooks.h" +#include "menu/base/submenus/main/weapon/weapon_disables.h" + +void menu::hooks::set_current_ped_weapon(rage::invoker::native_context* context) { + if (!weapon::disables::vars::m_vars.m_interior_weapons && !weapon::disables::vars::m_vars.m_passive_weapons) { + native::set_current_ped_weapon(context->get_argument(0), context->get_argument(1), context->get_argument(2)); + } +} + +void menu::hooks::disable_control_action(rage::invoker::native_context* context) { + if (!weapon::disables::vars::m_vars.m_interior_weapons && !weapon::disables::vars::m_vars.m_passive_weapons) { + native::disable_control_action(context->get_argument(0), context->get_argument(1), context->get_argument(2)); + } +} + +void menu::hooks::set_warning_message_2(rage::invoker::native_context*) { + return; +} + +void menu::hooks::terminate_this_thread(rage::invoker::native_context*) { + global::vars::g_freemode_terminated = true; + native::terminate_this_thread(); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/shoot_bullet.cpp b/GTAV/src/menu/hooks/shoot_bullet.cpp new file mode 100644 index 0000000..3b5e8a9 --- /dev/null +++ b/GTAV/src/menu/hooks/shoot_bullet.cpp @@ -0,0 +1,71 @@ +#include "hooks.h" +#include "menu/base/submenus/main/world/bullet_tracers.h" +#include "menu/base/submenus/main/weapon/entity_gun.h" +#include "menu/base/submenus/main/protections.h" +#include + +std::mutex g_tracer_mutex; + +__declspec(noinline) void add_tracer(math::vector3_ start_pos, math::vector3_ end_pos, void* shooter, rage::types::weapon_info* info) { + using namespace world::tracers::vars; + + g_tracer_mutex.lock(); + + tracer trace; + trace.m_spawn_time = GetTickCount(); + trace.m_spawn_position = start_pos; + trace.m_end_position = end_pos; + trace.m_shooter = shooter; + trace.m_weapon_info = info; + trace.m_populated = true; + + m_vars.m_tracers[m_vars.m_tracer_current_index] = trace; + m_vars.m_tracer_current_index++; + m_vars.m_tracer_current_index %= 1000; + + g_tracer_mutex.unlock(); +} + +bool menu::hooks::shoot_bullet(rage::types::weapon* weapon, uint64_t shooter_info, math::vector3_* start_pos, math::vector3_* end_pos) { + if (start_pos && end_pos && shooter_info) { + add_tracer(*start_pos, *end_pos, *(void**)shooter_info, weapon->m_weapon_info); + + if (protection::vars::m_vars.m_disable_bullets) { + void* shooter = *(void**)shooter_info; + if (shooter) { + if (is_valid_ptr(global::vars::g_ped_factory) && is_valid_ptr(global::vars::g_ped_factory->m_local_ped)) { + if (shooter == global::vars::g_ped_factory->m_local_ped + || shooter == global::vars::g_ped_factory->m_local_ped->m_vehicle) { + return shoot_bullet_t(weapon, shooter_info, start_pos, end_pos); + } + } + } + + return true; + } + } + + return shoot_bullet_t(weapon, shooter_info, start_pos, end_pos); +} + +bool menu::hooks::shoot_projectile(rage::types::weapon* weapon, uint64_t shooter_info, math::vector3_* start_pos, math::vector3_* end_pos) { + if (start_pos && end_pos && shooter_info) { + add_tracer(*start_pos, *end_pos, *(void**)shooter_info, weapon->m_weapon_info); + + if (protection::vars::m_vars.m_disable_projectiles) { + void* shooter = *(void**)shooter_info; + if (shooter) { + if (is_valid_ptr(global::vars::g_ped_factory) && is_valid_ptr(global::vars::g_ped_factory->m_local_ped)) { + if (shooter == global::vars::g_ped_factory->m_local_ped + || shooter == global::vars::g_ped_factory->m_local_ped->m_vehicle) { + return shoot_projectile_t(weapon, shooter_info, start_pos, end_pos); + } + } + } + + return true; + } + } + + return shoot_projectile_t(weapon, shooter_info, start_pos, end_pos); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/stat_get_int.cpp b/GTAV/src/menu/hooks/stat_get_int.cpp new file mode 100644 index 0000000..32bcf2a --- /dev/null +++ b/GTAV/src/menu/hooks/stat_get_int.cpp @@ -0,0 +1,140 @@ +#include "hooks.h" +#include "global/ui_vars.h" +#include "global/vars.h" +#include "rage/invoker/natives.h" +#include "rage/engine.h" +#include "util/dirs.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "util/caller.h" +#include "util/log.h" +#include "util/va.h" +#include "menu/base/renderer.h" +#include "menu/base/submenu_handler.h" +#include "menu/base/base.h" +#include "menu/base/util/input.h" +#include "menu/base/util/menu_input.h" +#include "menu/base/util/player_manager.h" +#include "menu/base/util/hotkeys.h" +#include "menu/base/util/control.h" +#include "menu/base/util/notify.h" +#include "menu/base/util/panels.h" +#include "menu/base/util/stacked_display.h" +#include "menu/base/util/textures.h" +#include "menu/base/util/fonts.h" +#include "menu/init.h" +#include "menu/base/submenus/main/network/network_session_finder.h" +#include +#include +#include +#include "menu/base/util/timers.h" + +localization t_asset_error("Asset Error", true, true); +localization t_failed_loading("Failed loading", true, true); + +void menu::hooks::wait(rage::invoker::native_context* context) { + menu::control::update(); + native::wait(context->get_argument(0)); +} + +void menu::hooks::stat_get_int(rage::invoker::native_context* context) { + static bool call_once_loaded = false; + +#ifdef DEV_MODE + if (menu::input::is_pressed(true, VK_DELETE)) { + global::vars::g_unloading_queue = true; + } +#endif + + if (global::vars::g_unloading_queue) { + global::vars::g_unloading_queue = false; + menu::init::unload(); + return; + } + + static int frame_cache = 0; + static uint32_t this_frame = 0; + static uint32_t last_frame = 0; + + if (frame_cache < native::get_frame_count()) { + frame_cache = native::get_frame_count(); + + this_frame = timeGetTime(); + global::ui::g_delta = (float)(this_frame - last_frame) / 1000; + last_frame = this_frame; + + if (!call_once_loaded) { + try { + menu::player::update(); + + util::fiber::load(); + util::fiber::load_shv(); + util::fiber::pool::load(); + + menu::textures::load(); + menu::submenu::handler::load(); + menu::fonts::load(); + + util::fiber::add("F_UI", [] { + menu::notify::update(); + menu::panels::update(); + menu::display::render(); + menu::base::update(); + menu::fonts::update_queue(); + }); + + util::fiber::add("F_INPUT", [] { + menu::hotkey::update(); + menu::input::mi_update(); + menu::input::update(); + }); + + util::fiber::add("F_FEATURE", [] { + menu::submenu::handler::feature_update(); + }); + + util::fiber::add("F_BASE", [] { + menu::player::update(); + menu::control::update(); + }); + + util::fiber::add("F_MM", [] { + if (network::sfinder::vars::m_vars.m_populate) { + if (menu::submenu::handler::get_current() == network_session_finder_menu::get()) { + rage::engine::send_matchmaking_request(); + } + } + }); + + util::fiber::add("F_PIP", [] { + if (!global::vars::g_player_image_queue.empty()) { + for (std::size_t i = 0; i < global::vars::g_player_image_queue.size(); i++) { + menu::textures::load_player_img(global::vars::g_player_image_queue[i].second, global::vars::g_player_image_queue[i].first); + delete[] global::vars::g_player_image_queue[i].second; + global::vars::g_player_image_queue.erase(begin(global::vars::g_player_image_queue) + i); + util::fiber::sleep(100); + } + } + }); + + if (!std::filesystem::exists(util::dirs::create_string(util::dirs::get_path(ozark), "OzarkBlips.ytd").c_str()) || rage::engine::register_streaming_file(util::dirs::create_string(util::dirs::get_path(ozark), "OzarkBlips.ytd").c_str(), "OzarkBlips.ytd") == -1) { + menu::notify::stacked(TRANSLATE(t_asset_error), util::va::va("%s \"%s\"", TRANSLATE(t_failed_loading), util::dirs::create_string(util::dirs::get_path(ozark), "OzarkBlips.ytd").c_str()), global::ui::g_error); + } else native::request_streamed_texture_dict("OzarkBlips", false); + + native::request_streamed_texture_dict("commonmenu", false); + native::request_streamed_texture_dict("ozarktextures", false); + + call_once_loaded = true; + } catch (std::exception& exception) { + LOG("Exception initializing menu: %s", exception.what()); + } + } + + if (!global::vars::g_unloading && call_once_loaded) { + util::fiber::update(); + util::fiber::update_shv(); + } + } + + context->set_return(0, native::stat_get_int(context->get_argument(0), context->get_argument(1), context->get_argument(2))); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/update_player_script_status.cpp b/GTAV/src/menu/hooks/update_player_script_status.cpp new file mode 100644 index 0000000..0ef98a5 --- /dev/null +++ b/GTAV/src/menu/hooks/update_player_script_status.cpp @@ -0,0 +1,80 @@ +#include "hooks.h" +#include "menu/base/util/helpers.h" +#include "menu/base/submenus/main/protection/protection_events.h" +#include "menu/base/submenus/main/protection/protection_reactions.h" +#include "menu/base/submenus/main/network/network_host_toolkit.h" +#include "util/log.h" + +enum eUpdatePlayerScriptStatus { + REMOVE_BITSET, + SCRIPT_ADD_CANDIDATE, + SCRIPT_ADDED_CANDIDATE, + SCRIPT_RETRY_JOIN, +}; + +struct script_status { + char _0x0000[0x8]; + eUpdatePlayerScriptStatus m_status; +}; + +static localization t_join_timeout("Join Timeout", true, true); +static localization t_prevented_join_timeout("Prevented join timeout from", true, true); + +void menu::hooks::update_player_script_status(rage::script::game_script_handler_network_component* component, uint64_t rdx, uint64_t r8) { + script_status* status = (script_status*)rdx; + if (!is_valid_ptr(component)) { + LOG_DEV("BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD BAD"); + return; + } + + if (component->m_state == 2) { +#ifdef DEV_MODE + std::string state = ""; + switch (status->m_status) { + case 0: state = "REMOVE_BITSET"; break; + case 1: state = "SCRIPT_ADD_CANDIDATE"; break; + case 2: state = "SCRIPT_ADDED_CANDIDATE"; break; + case 3: state = "SCRIPT_RETRY_JOIN"; break; + } +#endif + + rage::network::net_game_player* player = *(rage::network::net_game_player**)(r8 + 0x10); + if (menu::helpers::is_valid_net_player(player)) { + if (is_valid_ptr(component->m_component)) { + if (is_valid_ptr(component->m_component->m_thread)) { + LOG_DEV("[%s][%s] State=%s", player->m_player_info->m_name, component->m_component->m_thread->m_name, state.c_str()); + + if (status->m_status == SCRIPT_RETRY_JOIN) { + auto vit = std::find_if(begin(global::vars::g_join_timeout_fix), end(global::vars::g_join_timeout_fix), [=](join_timeout_fix& element) { + return element.m_id == player->m_id && element.m_script_hash == component->m_component->m_thread->m_script_hash; + }); + + if (vit == end(global::vars::g_join_timeout_fix)) { + global::vars::g_join_timeout_fix.push_back({ player->m_id, component->m_component->m_thread->m_script_hash, 1 }); + goto end; + } + + vit->m_retry_count++; + if (vit->m_retry_count >= 5) { + status->m_status = SCRIPT_ADD_CANDIDATE; + + network::htoolkit::vars::force_host_of_script(component->m_component->m_thread->m_name); + + //if (!strcmp(component->m_component->m_thread->m_name, "freemode")) { + menu::helpers::flag_modder(player->m_id, menu::player::REASON_JOIN_TIMEOUT); + protection::reactions::vars::process_event(protection::reactions::vars::EVENT_JOIN_TIMEOUT, player->m_id); + + if (protection::events::vars::m_vars.m_join_timeout.notify()) { + menu::notify::stacked(TRANSLATE(t_join_timeout), util::va::va("%s %s (%s)", TRANSLATE(t_prevented_join_timeout), menu::helpers::clean_name(player->m_player_info->m_name).c_str(), component->m_component->m_thread->m_name)); + } + //} + } + } + } + } + } + } + +end: + update_player_script_status_t(component, rdx, r8); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/write_gs_item.cpp b/GTAV/src/menu/hooks/write_gs_item.cpp new file mode 100644 index 0000000..1b9f969 --- /dev/null +++ b/GTAV/src/menu/hooks/write_gs_item.cpp @@ -0,0 +1,17 @@ +#include "hooks.h" +#include "menu/base/submenus/main/protection/protection_join_blocking.h" +#include "util/log.h" + +void menu::hooks::write_gs_item(int index, rage::network::gs_session* data, const char* type) { + if (protection::joining::vars::m_vars.m_block) { + memset(data, 0, sizeof(rage::network::gs_session)); + } + + if (protection::joining::vars::m_vars.m_spoof) { + if (protection::joining::vars::m_vars.m_spoof_info.m_peer_token) { + memcpy(data, &protection::joining::vars::m_vars.m_spoof_info, sizeof(rage::network::gs_session)); + } + } + + write_gs_item_t(index, data, type); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/write_ped_health_data_node.cpp b/GTAV/src/menu/hooks/write_ped_health_data_node.cpp new file mode 100644 index 0000000..cb5fa44 --- /dev/null +++ b/GTAV/src/menu/hooks/write_ped_health_data_node.cpp @@ -0,0 +1,29 @@ +#include "hooks.h" +#include "menu/base/submenus/main/protection/protection_anti_detection.h" + +void menu::hooks::write_ped_health_data_node(uint64_t rcx, uint64_t rdx) { + write_ped_health_data_node_t(rcx, rdx); + + if (global::vars::g_ped_factory) { + rage::types::ped* ped = *(rage::types::ped**)(rcx - 0x1b0); + if (ped) { + if (ped == global::vars::g_ped_factory->m_local_ped) { + if (protection::detection::vars::m_vars.m_health) { + if (*(int*)(rdx + 0xC4) > 328) { + *(int*)(rdx + 0xC4) = 328; + } + } + + if (protection::detection::vars::m_vars.m_armor) { + if (*(int*)(rdx + 0xC8) > 50) { + *(int*)(rdx + 0xC8) = 50; + } else { + if ((*(int*)(rdx + 0xC8) % 50) != 0) { + *(int*)(rdx + 0xC8) = 0; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/write_player_game_state_data_node.cpp b/GTAV/src/menu/hooks/write_player_game_state_data_node.cpp new file mode 100644 index 0000000..093f347 --- /dev/null +++ b/GTAV/src/menu/hooks/write_player_game_state_data_node.cpp @@ -0,0 +1,22 @@ +#include "hooks.h" +#include "menu/base/submenus/main/protection/protection_anti_detection.h" +#include "util/log.h" + +bool menu::hooks::write_player_game_state_data_node(uint64_t rcx, uint64_t rdx) { + bool _return = write_player_game_state_data_node_t(rcx, rdx); + + if (protection::detection::vars::m_vars.m_super_jump) { + *(bool*)(rdx + 0x1B7) = false; + } + + if (protection::detection::vars::m_vars.m_godmode) { + *(bool*)(rdx + 0xD5) = false; + } + + if (protection::detection::vars::m_vars.m_spectate) { + *(bool*)(rdx + 0xC7) = false; + *(uint16_t*)(rdx + 0x128) = 0; + } + + return _return; +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/write_player_gamer_data_node.cpp b/GTAV/src/menu/hooks/write_player_gamer_data_node.cpp new file mode 100644 index 0000000..5b368bd --- /dev/null +++ b/GTAV/src/menu/hooks/write_player_gamer_data_node.cpp @@ -0,0 +1,42 @@ +#include "hooks.h" +#include "menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_name.h" +#include "menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_tag.h" +#include "menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_motto.h" +#include "menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_rank.h" +#include "menu/base/submenus/main/network/spoofing/crew/network_spoofing_crew_icon.h" +#include "menu/base/util/player_manager.h" +#include "util/log.h" + +bool menu::hooks::write_player_gamer_data_node(rage::network::player_gamer_data_node* node, rage::bit_buffer_sync_instance* buffer) { + if (buffer->m_type == 2) { + rage::network::sync_tree* player_sync_tree = *(rage::network::sync_tree**)((uint64_t)node + 0x18); + if (player_sync_tree) { + rage::network::net_object* object = player_sync_tree->m_object; + if (object) { + if (object->m_owner == menu::player::get_local_player().m_id) { + if (!network::spoofing::crew::name::vars::m_vars.m_spoofed_name.empty()) { + strcpy(node->m_crew_name, network::spoofing::crew::name::vars::m_vars.m_spoofed_name.c_str()); + } + + if (!network::spoofing::crew::tag::vars::m_vars.m_spoofed_name.empty()) { + strcpy(node->m_crew_abbr, network::spoofing::crew::tag::vars::m_vars.m_spoofed_name.c_str()); + } + + if (!network::spoofing::crew::motto::vars::m_vars.m_spoofed_name.empty()) { + strcpy(node->m_crew_motto, network::spoofing::crew::motto::vars::m_vars.m_spoofed_name.c_str()); + } + + if (!network::spoofing::crew::rank::vars::m_vars.m_spoofed_name.empty()) { + strcpy(node->m_crew_rank, network::spoofing::crew::rank::vars::m_vars.m_spoofed_name.c_str()); + } + + if (network::spoofing::crew::icon::vars::m_vars.m_spoofed_icon != -1) { + node->m_crew_id = network::spoofing::crew::icon::vars::m_vars.m_spoofed_icon; + } + } + } + } + } + + return write_player_gamer_data_node_t(node, buffer); +} \ No newline at end of file diff --git a/GTAV/src/menu/hooks/write_rid.cpp b/GTAV/src/menu/hooks/write_rid.cpp new file mode 100644 index 0000000..1723cbb --- /dev/null +++ b/GTAV/src/menu/hooks/write_rid.cpp @@ -0,0 +1,32 @@ +#include "hooks.h" +#include "menu/base/submenus/main/network/spoofing/network_spoofing_rid.h" +#include "util/log.h" +#include "util/util.h" + +bool menu::hooks::write_net_msg_identifier(rage::bit_buffer* buffer, uint64_t rdx, int r8d) { + if (global::vars::g_rs_info) { + if (global::vars::g_rs_info->m_rockstar_id) { + if (rdx == global::vars::g_rs_info->m_rockstar_id) { + if (network::spoofing::rid::vars::m_vars.m_loaded || network::spoofing::rid::vars::m_vars.m_spoofing_rid > 0) { + rdx = network::spoofing::rid::vars::m_vars.m_spoofing_rid; + } + } + } + } + + return write_net_msg_identifier_t(buffer, rdx, r8d); +} + +bool menu::hooks::write_ulonglong_to_bit_buffer(rage::bit_buffer* buffer, uint64_t rdx, int r8d) { + if (global::vars::g_rs_info) { + if (global::vars::g_rs_info->m_rockstar_id) { + if (rdx == global::vars::g_rs_info->m_rockstar_id) { + if (network::spoofing::rid::vars::m_vars.m_loaded || network::spoofing::rid::vars::m_vars.m_spoofing_rid > 0) { + rdx = network::spoofing::rid::vars::m_vars.m_spoofing_rid; + } + } + } + } + + return write_ulonglong_to_bit_buffer_t(buffer, rdx, r8d); +} \ No newline at end of file diff --git a/GTAV/src/menu/init.cpp b/GTAV/src/menu/init.cpp new file mode 100644 index 0000000..f4941f6 --- /dev/null +++ b/GTAV/src/menu/init.cpp @@ -0,0 +1,308 @@ +#include "init.h" +#include "global/vars.h" +#include "util/dirs.h" +#include "util/log.h" +#include "util/threads.h" +#include "util/va.h" +#include "util/wmi.h" +#include "util/util.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "util/hooking/hooking.h" +#include "menu/auth.h" +#include "menu/hooks/hooks.h" +#include "menu/base/util/input.h" +#include "menu/base/submenu_handler.h" +#include "rage/api/api.h" +#include "menu/base/util/textures.h" +#include +#include +#include + +namespace menu::init { + LONG WINAPI exception_filter(struct _EXCEPTION_POINTERS* ExceptionInfoPtr) { +#undef exception_code +#undef exception_info + + DWORD exception_code = ExceptionInfoPtr->ExceptionRecord->ExceptionCode; + ULONG_PTR exception_info = ExceptionInfoPtr->ExceptionRecord->ExceptionInformation[0]; + ULONG_PTR exception_info1 = ExceptionInfoPtr->ExceptionRecord->ExceptionInformation[1]; + ULONG_PTR exception_info2 = ExceptionInfoPtr->ExceptionRecord->ExceptionInformation[2]; + + uint64_t exception_address = (uint64_t)ExceptionInfoPtr->ExceptionRecord->ExceptionAddress; + + LOG_CUSTOM_ERROR("Crash", "Game crashed with code 0x%X", exception_code); + LOG_CUSTOM_ERROR("Crash", "Crashed @ 0x%llx (game=%llx cheat=%llx)", exception_address, global::vars::g_game_address.first, global::vars::g_module_handle); + // LOG_DEV("Game Script: %s", *(const char**)(global::vars::g_game_address.first + 0x2D59018)); + + switch (exception_code) { + case EXCEPTION_ACCESS_VIOLATION: + LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_ACCESS_VIOLATION"); + if (exception_info == 0) { + LOG_CUSTOM_ERROR("Crash", "Attempted to read from: 0x%llx", exception_info1); + } else if (exception_info == 1) { + LOG_CUSTOM_ERROR("Crash", "Attempted to write to: 0x%llx", exception_info1); + } else if (exception_info == 8) { + LOG_CUSTOM_ERROR("Crash", "Data Execution Prevention (DEP) at: 0x%llx", exception_info1); + } else { + LOG_CUSTOM_ERROR("Crash", "Unknown access violation at: 0x%llx", exception_info1); + } + break; + + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_ARRAY_BOUNDS_EXCEEDED"); break; + case EXCEPTION_BREAKPOINT: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_BREAKPOINT"); break; + case EXCEPTION_DATATYPE_MISALIGNMENT: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_DATATYPE_MISALIGNMENT"); break; + case EXCEPTION_FLT_DENORMAL_OPERAND: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_FLT_DENORMAL_OPERAND"); break; + case EXCEPTION_FLT_DIVIDE_BY_ZERO: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_FLT_DIVIDE_BY_ZERO"); break; + case EXCEPTION_FLT_INEXACT_RESULT: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_FLT_INEXACT_RESULT"); break; + case EXCEPTION_FLT_INVALID_OPERATION: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_FLT_INVALID_OPERATION"); break; + case EXCEPTION_FLT_OVERFLOW: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_FLT_OVERFLOW"); break; + case EXCEPTION_FLT_STACK_CHECK: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_FLT_STACK_CHECK"); break; + case EXCEPTION_FLT_UNDERFLOW: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_FLT_UNDERFLOW"); break; + case EXCEPTION_ILLEGAL_INSTRUCTION: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_ILLEGAL_INSTRUCTION"); break; + case EXCEPTION_IN_PAGE_ERROR: + LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_IN_PAGE_ERROR"); + if (exception_info == 0) { + LOG_CUSTOM_ERROR("Crash", "Attempted to read from: 0x%llx", exception_info1); + } else if (exception_info == 1) { + LOG_CUSTOM_ERROR("Crash", "Attempted to write to: 0x%llx", exception_info1); + } else if (exception_info == 8) { + LOG_CUSTOM_ERROR("Crash", "Data Execution Prevention (DEP) at: 0x%llx", exception_info1); + } else { + LOG_CUSTOM_ERROR("Crash", "Unknown access violation at: 0x%llx", exception_info1); + } + + LOG_CUSTOM_ERROR("Crash", "NTSTATUS: 0x%llx", exception_info2); + break; + + case EXCEPTION_INT_DIVIDE_BY_ZERO: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_INT_DIVIDE_BY_ZERO"); break; + case EXCEPTION_INT_OVERFLOW: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_INT_OVERFLOW"); break; + case EXCEPTION_INVALID_DISPOSITION: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_INVALID_DISPOSITION"); break; + case EXCEPTION_NONCONTINUABLE_EXCEPTION: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_NONCONTINUABLE_EXCEPTION"); break; + case EXCEPTION_PRIV_INSTRUCTION: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_PRIV_INSTRUCTION"); break; + case EXCEPTION_SINGLE_STEP: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_SINGLE_STEP"); break; + case EXCEPTION_STACK_OVERFLOW: LOG_CUSTOM_ERROR("Crash", "Cause: EXCEPTION_STACK_OVERFLOW"); break; + case DBG_CONTROL_C: LOG_CUSTOM_ERROR("Crash", "Cause: DBG_CONTROL_C"); break; + default: LOG_CUSTOM_ERROR("Crash", "Cause: 0x%08x", exception_code); + } + + LOG_CUSTOM_ERROR("Crash", "Dumping ASM registers:"); + LOG_CUSTOM_ERROR("Crash", "RAX: 0x%llx || RSI: 0x%llx", ExceptionInfoPtr->ContextRecord->Rax, ExceptionInfoPtr->ContextRecord->Rsi); + LOG_CUSTOM_ERROR("Crash", "RBX: 0x%llx || RDI: 0x%llx", ExceptionInfoPtr->ContextRecord->Rbx, ExceptionInfoPtr->ContextRecord->Rdi); + LOG_CUSTOM_ERROR("Crash", "RCX: 0x%llx || RBP: 0x%llx", ExceptionInfoPtr->ContextRecord->Rcx, ExceptionInfoPtr->ContextRecord->Rbp); + LOG_CUSTOM_ERROR("Crash", "RDX: 0x%llx || RSP: 0x%llx", ExceptionInfoPtr->ContextRecord->Rdx, ExceptionInfoPtr->ContextRecord->Rsp); + LOG_CUSTOM_ERROR("Crash", "R8: 0x%llx || R9: 0x%llx", ExceptionInfoPtr->ContextRecord->R8, ExceptionInfoPtr->ContextRecord->R9); + LOG_CUSTOM_ERROR("Crash", "R10: 0x%llx || R11: 0x%llx", ExceptionInfoPtr->ContextRecord->R10, ExceptionInfoPtr->ContextRecord->R11); + LOG_CUSTOM_ERROR("Crash", "R12: 0x%llx || R13: 0x%llx", ExceptionInfoPtr->ContextRecord->R12, ExceptionInfoPtr->ContextRecord->R13); + LOG_CUSTOM_ERROR("Crash", "R14: 0x%llx || R15: 0x%llx", ExceptionInfoPtr->ContextRecord->R14, ExceptionInfoPtr->ContextRecord->R15); + LOG_CUSTOM_ERROR("Crash", util::get_stack_trace().c_str()); + + return EXCEPTION_CONTINUE_SEARCH; + } + + void unload() { + if (!global::vars::g_unloading) { + global::vars::g_unloading = true; + + util::threads::add_job([](void*) { +#ifndef DEV_MODE + security::relink((HMODULE)global::vars::g_module_handle); +#endif + + for (patches& patch : global::vars::g_patches) { + memory::write_vector(patch.m_address, patch.m_bytes); + } + + for (auto& hack_patch : global::vars::g_hack_patches) { + memory::write_vector(hack_patch.second.m_address, hack_patch.second.m_bytes); + } + + hooking::cleanup(); + util::threads::cleanup(); + util::fiber::cleanup(); + menu::input::cleanup(); + menu::submenu::handler::cleanup(); + util::va::cleanup(); + util::log::cleanup(); + + free((void*)global::vars::g_texture_bypass); + free((void*)global::vars::g_marker_bypass); + free((void*)global::ui::m_line_2d); + + PostMessage(GetConsoleWindow(), WM_CLOSE, 0, 0); + FreeConsole(); + +#ifdef DEV_MODE + Sleep(2000); + FreeLibraryAndExitThread(global::vars::g_module_handle, 0); +#endif + }); + } + } + + void entry(void* handle) { + SetUnhandledExceptionFilter(exception_filter); + srand(GetTickCount()); + + MODULEINFO module_info; + GetModuleInformation(GetCurrentProcess(), GetModuleHandleA(0), &module_info, sizeof(module_info)); + + global::vars::g_steam = (uint64_t)GetModuleHandleA(XOR("steam_api64.dll")) > 0; + global::vars::g_game_address = { (uint64_t)module_info.lpBaseOfDll, module_info.SizeOfImage }; + + std::copy((uint8_t*)handle, (uint8_t*)((uint64_t)handle + 0x1000), std::back_inserter(global::auth::g_pe_header)); + +#ifndef DEV_MODE + security::unlink((HMODULE)handle); +#endif + + if (!util::dirs::load()) { + unload(); + return; + } + + util::log::load(); + + LOG_DEV("Base: %llx", handle); + LOG(XOR("Welcome to Ozark! Version V%i"), VERSION); + + if (!security::load()) { + unload(); + return; + } + + if (!(global::vars::g_window = FindWindowA(XOR("grcWindow"), NULL))) { + int timeout = 0; + while (!global::vars::g_window && !global::vars::g_unloading) { + if (timeout >= 20) { + LOG_ERROR(XOR("Failed to find window!")); + unload(); + return; + } + + global::vars::g_window = FindWindowA(XOR("grcWindow"), NULL); + + timeout++; + Sleep(1000); + } + } + + if (!menu::hooks::bypass()) { + unload(); + return; + } + + global::vars::g_texture_bypass = (uint64_t)malloc(5000 * 0x50); + global::vars::g_marker_bypass = (uint64_t)malloc(1280 * sizeof(rage::types::marker_table)); + global::ui::m_line_2d = (line_2d*)malloc(5000 * sizeof(line_2d)); + + memset((void*)global::vars::g_texture_bypass, 0, 5000 * 0x50); + memset((void*)global::vars::g_marker_bypass, 0, 1280 * sizeof(rage::types::marker_table)); + memset((void*)global::ui::m_line_2d, 0, 5000 * sizeof(line_2d)); + + util::threads::add_thread(XOR("T_HB"), [](void*) { + if (!auth::run_heartbeat()) { + unload(); + return; + } + + // 5 minutes + Sleep(300000); + }); + + if (!menu::hooks::globals()) { + unload(); + return; + } + + if (!menu::hooks::hooks()) { + unload(); + return; + } + + menu::hooks::spoofing(); + + while (*global::vars::g_game_state != GameStatePlaying) Sleep(500); + + if (!menu::hooks::globals_in_game()) { + unload(); + return; + } + + hooking::script(XOR("SGI"), XOR("main_persistent"), 0x767FBC2AC802EF3D, hooks::stat_get_int); + + util::threads::add_thread(XOR("T_SH"), [](void*) { + Sleep(1500); + + hooking::script(XOR("SCPW_P"), XOR("am_mp_property_int"), 0xADF692B254977C0C, &hooks::set_current_ped_weapon); + hooking::script(XOR("DCA_P"), XOR("am_mp_property_int"), 0xFE99B66D079CF6BC, &hooks::disable_control_action); + + hooking::script(XOR("SCPW_C"), XOR("am_mp_smpl_interior_int"), 0xADF692B254977C0C, &hooks::set_current_ped_weapon); + hooking::script(XOR("DCA_C"), XOR("am_mp_smpl_interior_int"), 0xFE99B66D079CF6BC, &hooks::disable_control_action); + + hooking::script(XOR("SCPW_F"), XOR("freemode"), 0xADF692B254977C0C, &hooks::set_current_ped_weapon); + hooking::script(XOR("DCA_F"), XOR("freemode"), 0xFE99B66D079CF6BC, &hooks::disable_control_action); + hooking::script(XOR("TTT"), XOR("freemode"), 0x1090044AD1DA76FA, &hooks::terminate_this_thread); + // hooking::script(XOR("WAIT"), XOR("freemode"), 0x4EDE34FBADD967A6, &hooks::wait); + + hooking::script(XOR("SWM2"), XOR("shop_controller"), 0xDC38CC1E35B6A5D7, &hooks::set_warning_message_2); + }); + + util::threads::add_thread(XOR("T_SC"), [](void*) { + rage::api::update(); + }); + + util::threads::add_thread(XOR("T_GEO"), [](void*) { + Sleep(1000); + + if (!global::vars::g_geo_queue.empty()) { + if (!native::network_is_session_active()) { + global::vars::g_geo_queue.pop(); + return; + } + + uint32_t item = global::vars::g_geo_queue.front(); + + if (global::vars::g_geo.find(item) == global::vars::g_geo.end()) { + char str[16]; + sprintf_s(str, "%i.%i.%i.%i", ((item & 0xFF000000) >> 24), ((item & 0xFF0000) >> 16), ((item & 0xFF00) >> 8), item & 0xFF); + LOG_CUSTOM(XOR("Geo"), XOR("Sending request for %s"), str); + + curl::request_state context(nullptr, 0); + curl::setup_context(&context); + curl::set_url(&context, XOR("https://ozarkengine.cc/geo.php?ip=") + std::string(str)); + + CURLcode code = curl::send(&context); + if (code == CURLE_OK) { + try { + nlohmann::json json = nlohmann::json::parse(context.m_write_chunk); + if (!json.empty()) { + if (!json["status"].is_null()) { + if (json["status"].get() == "success") { + geo_ip ip; + ip.m_country = json["country"].get(); + ip.m_country_code = json["countryCode"].get(); + ip.m_region_name = json["regionName"].get(); + ip.m_city = json["city"].get(); + ip.m_zip = json["zip"].get(); + ip.m_timezone = json["timezone"].get(); + ip.m_isp = json["isp"].get(); + ip.m_org = json["org"].get(); + global::vars::g_geo[item] = ip; + } + } + } + + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + } + } else { + LOG_DEV("CURL Error: %i", code); + } + } + + global::vars::g_geo_queue.pop(); + } + }); + } +} \ No newline at end of file diff --git a/GTAV/src/menu/init.h b/GTAV/src/menu/init.h new file mode 100644 index 0000000..c89102e --- /dev/null +++ b/GTAV/src/menu/init.h @@ -0,0 +1,7 @@ +#pragma once +#include "stdafx.h" + +namespace menu::init { + void unload(); + void entry(void* handle); +} \ No newline at end of file diff --git a/GTAV/src/rage/api/api.cpp b/GTAV/src/rage/api/api.cpp new file mode 100644 index 0000000..411587d --- /dev/null +++ b/GTAV/src/rage/api/api.cpp @@ -0,0 +1,164 @@ +#include "api.h" +#include "util/fiber.h" +#include "util/fiber_pool.h" +#include "util/json.h" +#include "util/log.h" +#include "util/va.h" +#include "util/util.h" +#include "global/vars.h" +#include "rage/invoker/natives.h" +#include + +namespace rage::api { + void social_club::update() { + if (m_clear_queue) { + m_clear_queue = false; + m_queue.clear(); + return; + } + + if (!m_queue.empty()) { + queue_item& item = m_queue.front(); + LOG_DEV("URL: %s", item.m_endpoint.c_str()); + + std::unordered_map headers; + headers[XOR("User-Agent")] = util::create_random_string(10); + headers[XOR("X-Requested-With")] = XOR("XMLHttpRequest"); + headers[XOR("Authorization")] = util::va::va(XOR("SCAUTH val=\"%s\""), global::vars::g_rs_info->m_scs_ticket); + headers[XOR("Content-Type")] = XOR("application/json; charset=utf-8"); + headers[XOR("Content-Length")] = std::to_string(item.m_data.size()); + + curl::request_state context((uint8_t*)item.m_data.c_str(), item.m_data.size()); + curl::setup_context(&context); + curl::set_url(&context, item.m_endpoint); + curl::set_headers(&context, headers); + + CURLcode code = curl::send(&context); + if (code == CURLE_OK) { + if (item.m_callback) { + item.m_callback(context.m_write_chunk.c_str(), item.m_custom); + } else { + LOG_DEV("No callback!"); + } + } else { + LOG_DEV("CURL Error: %i", code); + } + + m_queue.erase(m_queue.begin()); + + Sleep(1000); + } + } + + void social_club::send(std::string endpoint, std::string data, std::function callback, void* custom_data) { + LOG("Adding request to api pool..."); + m_queue.push_back({ endpoint, data, callback, custom_data, 0 }); + } + + void social_club::get_profiles_from_rid(uint64_t rockstar_id, std::function, void*)> callback, void* custom_data) { + if (rockstar_id < 0x1000) { + util::fiber::pool::add([=] { + callback(false, {}, custom_data); + }); + + return; + } + + send("https://scui.rockstargames.com/api/friend/getprofile", + nlohmann::json({ { "RockstarId", rockstar_id } }).dump(), [=](const char* jresponse, void* data) { + if (!nlohmann::json::accept(jresponse)) { + LOG_DEV("BAD JSON"); + util::fiber::pool::add([=] { + callback(false, {}, data); + }); + + return; + } + + try { + nlohmann::json json = nlohmann::json::parse(jresponse); + if ((json["Status"].is_null() || !json["Status"].get()) || (json["Accounts"].is_null() || json["Accounts"].get().size() == 0)) { + LOG_DEV("BAD STATUS"); + + util::fiber::pool::add([=] { + callback(false, {}, data); + }); + + return; + } + + std::vector accounts; + + int total = json["Total"].is_null() ? 1 : json["Total"]; + for (int i = 0; i < total; i++) { + accounts.push_back({ json["Accounts"][i]["RockstarAccount"]["Name"], json["Accounts"][i]["RockstarAccount"]["RockstarId"] }); + } + + util::fiber::pool::add([=] { + callback(true, accounts, data); + }); + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + + util::fiber::pool::add([=] { + callback(false, {}, data); + }); + } + }, custom_data); + } + + void social_club::get_profiles_from_name(std::string name, std::function, result_info*)> callback, void* custom_data, int page_offset) { + send("https://scui.rockstargames.com/api/friend/accountsearch", + nlohmann::json({ + { "env", "prod" }, + { "title", "gta5" }, + { "version", 11 }, + { "searchNickname", name }, + { "pageIndex", page_offset } + }).dump(), [=](const char* jresponse, void* data) { + if (!nlohmann::json::accept(jresponse)) { + util::fiber::pool::add([=] { + callback(false, {}, nullptr); + }); + + return; + } + + try { + nlohmann::json json = nlohmann::json::parse(jresponse); + if ((json["Status"].is_null() || !json["Status"].get()) || (json["Accounts"].is_null() || json["Accounts"].get().size() == 0)) { + util::fiber::pool::add([=] { + callback(false, {}, nullptr); + }); + + return; + } + + std::vector accounts; + + for (nlohmann::json& account : json["Accounts"]) { + accounts.push_back({ account["Nickname"], account["RockstarId"] }); + } + + result_info* out_info = new result_info(); + out_info->m_next_offset = json["NextOffset"]; + out_info->m_total = json["Total"]; + + util::fiber::pool::add([=] { + callback(true, accounts, out_info); + }); + } catch (std::exception& e) { + LOG_WARN("[Json] %s", e.what()); + + util::fiber::pool::add([=] { + callback(false, {}, nullptr); + }); + } + }, custom_data); + } + + social_club* get_social_club() { + static social_club instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/rage/api/api.h b/GTAV/src/rage/api/api.h new file mode 100644 index 0000000..9680f67 --- /dev/null +++ b/GTAV/src/rage/api/api.h @@ -0,0 +1,54 @@ +#pragma once +#include "stdafx.h" +#include +#include + +namespace rage::api { + struct rockstar_account { + std::string m_name; + uint64_t m_rockstar_id; + }; + + struct result_info { + int m_total = 0; + int m_next_offset = 0; + }; + + struct queue_item { + std::string m_endpoint; + std::string m_data; + std::function m_callback; + void* m_custom; + uint32_t m_data_hash; + }; + + class social_club { + public: + void update(); + void send(std::string endpoint, std::string data, std::function callback, void* custom_data); + void get_profiles_from_rid(uint64_t rockstar_id, std::function, void*)> callback, void* custom_data); + void get_profiles_from_name(std::string name, std::function, result_info*)> callback, void* custom_data, int page_offset = 0); + + bool m_clear_queue = false; + private: + std::vector m_queue; + }; + + social_club* get_social_club(); + + inline void update() { + get_social_club()->update(); + } + + inline void send(std::string endpoint, std::string data, std::function callback, void* custom_data) { + get_social_club()->send(endpoint, data, callback, custom_data); + } + + inline void get_profiles_from_rid(uint64_t rockstar_id, std::function, void*)> callback, void* custom_data) { + get_social_club()->get_profiles_from_rid(rockstar_id, callback, custom_data); + } + + inline void get_profiles_from_name(std::string name, std::function, result_info*)> callback, void* custom_data, int page_offset = 0) { + get_social_club()->get_profiles_from_name(name, callback, custom_data, page_offset); + } +} \ No newline at end of file diff --git a/GTAV/src/rage/engine.cpp b/GTAV/src/rage/engine.cpp new file mode 100644 index 0000000..4dc0873 --- /dev/null +++ b/GTAV/src/rage/engine.cpp @@ -0,0 +1,333 @@ +#include "engine.h" +#include "global/vars.h" +#include "util/caller.h" +#include "invoker/natives.h" +#include "menu/base/util/player_manager.h" + +namespace rage::engine { + rage::script::script_header* get_script_program(uint64_t table, int index) { + return caller::call(*(uint64_t*)(table + 0x68), global::vars::g_game_streamed_scripts, index); + } + + rage::types::store_module* get_store_module_extension(const char* extension) { + return caller::call(global::vars::g_get_store_module_extension, &global::vars::g_store_manager->m_module, extension); + } + + rage::network::net_game_player* get_net_game_player(int index) { + return caller::call(global::vars::g_get_net_game_player_from_index, index); + } + + rage::network::net_game_player* get_host_net_game_player() { + return caller::call(global::vars::g_get_host_net_game_player); + } + + void get_streamed_script_index(int* index, const char* script_name) { + caller::call(global::vars::g_get_streamed_script, global::vars::g_game_streamed_scripts, index, script_name); + } + + void request_streaming_file(int index) { + caller::call(global::vars::g_request_streaming_file, global::vars::g_store_manager, index, 7); + } + + int register_streaming_file(const char* file_path, const char* asset_name) { + int index = -1; + caller::call(global::vars::g_register_streaming_file, &index, file_path, true, asset_name, false); + + return index; + } + + uint64_t construct_gfx_font(uint64_t allocation) { + return caller::call(global::vars::g_construct_gfx_font, allocation); + } + + void destruct(uint64_t allocation) { + caller::call(global::vars::g_destruct, allocation); + } + + int create_id_for_font(const char* asset_name) { + static uint8_t junk[2][0x100]; + memset(junk, 0, sizeof(junk)); + + return caller::call(global::vars::g_create_id_for_font, asset_name, junk[0], junk[1], 0, -1, -1, 1, 2, 0, 0); + } + + void add_font_lib(uint64_t allocation, int index) { + rage::types::store_module* store = get_store_module_extension("gfx"); + caller::call(global::vars::g_add_font_lib, store, allocation, index - store->m_base_index); + } + + rage::network::net_object* get_network_object(Entity entity) { + uint64_t address = get_entity_address(entity); + if (address) { + return *(rage::network::net_object**)(address + 0xD0); + } + + return 0; + } + + int get_network_object_owner(Entity entity) { + rage::network::net_object* object = get_network_object(entity); + if (object) { + return object->m_owner; + } + + return 0; + } + + bool update_network_object_owner(Entity entity, int new_owner) { + rage::network::net_object* object = get_network_object(entity); + if (object) { + return caller::call(global::vars::g_update_net_object_owner, *(uint64_t*)global::vars::g_network_object_manager, object, get_net_game_player(new_owner), 0); + } + + return false; + } + + uint64_t get_entity_address(Entity entity) { + if (entity <= 0) return 0; + return caller::call(global::vars::g_get_entity_address, entity); + } + + Entity get_entity_handle(uint64_t address) { + return caller::call(global::vars::g_get_entity_handle_from_address, address, 0); + } + + bool process_basket_transaction(int category, int action, int destination, std::vector items) { + if (native::network_shop_basket_end()) + _i(0xFA336E7F40C0A0D0); + +#undef max + int transaction_id = std::numeric_limits::max(); + + bool result = caller::call(global::vars::g_add_basket_to_queue, global::vars::g_net_shop_queue, &transaction_id, category, action, destination); + if (!result || !transaction_id) { + return false; + } + + for (std::size_t i = 0; i < items.size(); i++) { + rage::network::transaction item = items[i]; + caller::call(global::vars::g_add_item_to_basket, global::vars::g_net_shop_queue, (int*)&item); + } + + if (!caller::call(global::vars::g_process_transaction_id, global::vars::g_net_shop_queue, transaction_id, 1337)) { + return false; + } + + return true; + } + + std::vector get_hash_list_from_hash_table(uint32_t count, uint64_t table) { + std::vector hashes; + + if (count && table) { + uint64_t* ptr = (uint64_t*)table; + + for (uint32_t i = 0; i < count; i++) { + if (ptr[i]) { + uint32_t hash = *(uint32_t*)(ptr[i] + 0x10); + + if (hash) { + hashes.push_back(hash); + } + } + } + } + + return hashes; + } + + bool is_basket_transaction_queue_busy() { + return global::vars::g_net_shop_queue->m_is_busy1 || global::vars::g_net_shop_queue->m_is_busy2 || global::vars::g_net_shop_queue->m_is_busy3; + } + + uint64_t thread_alloc(uint32_t size) { + return caller::call(global::vars::g_thread_alloc, size); + } + + rage::types::dictionary* setup_dictionary(rage::types::dictionary* dictionary, int count) { + return caller::call(global::vars::g_setup_dictionary, dictionary, count); + } + + uint32_t* setup_store_item(uint64_t store, uint32_t* out, uint32_t* dictionary_hash) { + return caller::call(global::vars::g_setup_store_item, store, out, dictionary_hash); + } + + bool is_valid_pool_slot(uint64_t pool, uint32_t slot) { + return caller::call(global::vars::g_is_valid_pool_slot, pool, slot); + } + + void add_dictionary_to_pool(uint64_t pool, uint32_t index, rage::types::dictionary* dictionary) { + caller::call(global::vars::g_add_dictionary_to_pool, pool, index, dictionary); + } + + void add_grc_texture_to_dictionary(rage::types::dictionary* dictionary, uint32_t hash, rage::types::grc_texture_dx11* texture) { + caller::call(global::vars::g_add_grc_texture_to_dictionary, dictionary, hash, texture); + } + + rage::types::grc_texture_dx11* get_sprite_texture(const char* dictionary, const char* asset) { + return caller::call(global::vars::g_get_sprite_texture, dictionary, asset); + } + + void send_weather_event(int id, rage::network::net_game_player* target) { + caller::call(global::vars::g_send_weather_update, true, id, 0, target); + } + + int get_weather_id(const char* weather) { + return caller::call(global::vars::g_get_weather_id, global::vars::g_weather_table, weather); + } + + void send_clock_event(rage::network::net_game_player* target) { + caller::call(global::vars::g_sync_clock_time, 0, target); + } + + void add_to_clock_time(int hour, int minute, int second) { + caller::call(global::vars::g_add_to_clock_time, hour, minute, second); + } + + uint64_t get_model_info(uint32_t model) { + int offset = 0xFFFF; + return caller::call(global::vars::g_get_model_info, model, &offset); + } + + void set_vehicle_gravity(uint64_t address, float gravity) { + caller::call(global::vars::g_set_vehicle_gravity, address, gravity); + } + + void vertex_begin(int mode, int count) { + caller::call(global::vars::g_vertex_begin, mode, count); + } + + void vertex_end() { + caller::call(global::vars::g_vertex_end); + } + + void vertex_add(float x, float y, float z, float nx, float ny, float mod, uint32_t color, float u, float v) { + caller::call(global::vars::g_vertex_add, x, y, z, nx, ny, mod, color, u, v); + } + + uint64_t get_vehicle_paint(int cat) { + return caller::call(global::vars::g_get_vehicle_paint_array, cat, true); + } + + rage::network::sync_tree* get_sync_tree(eNetObjectTypes type) { + return caller::call(global::vars::g_get_sync_tree_from_clone_type, 0, type); + } + + void parse_nodes(rage::network::sync_tree* tree, int type_bit, int flag, rage::bit_buffer* buffer, uint64_t log_interface) { + caller::call(global::vars::g_parse_nodes, tree, type_bit, flag, buffer, log_interface); + } + + rage::network::net_object* get_network_object_from_network_id(uint64_t player_manager, uint16_t network_id, bool unk) { + return caller::call(global::vars::g_get_network_object_from_network_id, player_manager, network_id, unk); + } + + void send_network_event_ack(uint64_t table, uint8_t* setup_buffer, rage::network::net_game_player* sender, rage::network::net_game_player* receiver, int event_index) { + caller::call(global::vars::g_send_network_event_ack, table, setup_buffer, sender, receiver, event_index); + } + + void send_network_event_reply(uint64_t table, uint8_t* setup_buffer, rage::network::net_game_player* sender, rage::network::net_game_player* receiver, int event_index, int event_bitset) { + caller::call(global::vars::g_send_network_event_reply, table, setup_buffer, sender, receiver, event_index, event_bitset); + } + + bool setup_give_control_event(uint8_t* data, rage::bit_buffer* buffer) { + return caller::call(global::vars::g_setup_give_control_event, data, buffer); + } + + void send_increment_stat_event(uint32_t hash, int value, rage::network::net_game_player* player) { + caller::call(global::vars::g_send_increment_stat_event, hash, value, player); + } + + void set_gsinfo(rage::network::gs_session* gsinfo) { + caller::call(global::vars::g_write_gs_item, 0, gsinfo, "gsinfo"); + } + + bool get_session_info_from_gs(rage::network::gs_session* gs, const char* str) { + return caller::call(global::vars::g_get_session_info_from_gs, gs, str, 0, 0); + } + + void send_session_info_request(rage::network::rockstar_identifier* targets, int count) { + caller::call(global::vars::g_send_session_info_request, targets, count); + } + + uint64_t read_xml_string(uint64_t context, const char* name, int unk1, int unk2) { + return caller::call(global::vars::g_read_xml_string, context, name, unk1, unk2); + } + + const char* read_xml_attribute_string(rage::types::xml_node* node, const char* name, int unk1) { + return caller::call(global::vars::g_read_xml_node_string, node, name, unk1); + } + + void send_matchmaking_request() { + caller::call(global::vars::g_send_matchmaking_request, global::vars::g_network_base_config, 1, 1, 1, 1); + } + + void send_friend_request(uint64_t rockstar_id) { + rage::network::net_msg_identifier id; + id.m_rockstar_id = rockstar_id; + id.m_type = 3; + + caller::call(global::vars::g_send_friend_request, &id, ""); + } + + void migrate_script_host(rage::script::game_script_handler_network_component* comp, rage::network::net_game_player* player) { + caller::call(global::vars::g_migrate_script_host, comp, player); + } + + void send_global_chat_message(uint64_t manager, int key, rage::network::global_msg_context* context) { + uint16_t out_id = 0; + caller::call(global::vars::g_send_global_chat_message, manager, key, context, 1, &out_id); + } + + void handle_rotation_values_from_order(math::matrix* matrix, math::vector3_* rotation, int order) { + caller::call(global::vars::g_handle_rotation_values_from_order, matrix, rotation, order); + } + + void invite_player(uint64_t rockstar_id) { + rage::network::net_msg_identifier identifier; + memset(&identifier, 0, sizeof(identifier)); + + identifier.m_rockstar_id = rockstar_id; + identifier.m_type = 3; + + caller::call(global::vars::g_invite_player, global::vars::g_network_base_config, &identifier, 1, "Invite", "join me pwease", 0); + } + + uint64_t sc_get_info(const char* identifier) { + if (global::vars::g_social_club_game_info_table && global::vars::g_social_club_get_game_info_table) { + int index = caller::call(global::vars::g_social_club_get_game_info_table, identifier, global::vars::g_social_club_game_info_table + 0x20, *(uint32_t*)(global::vars::g_social_club_game_info_table + 0x14)); + if (index >= 0) { + return (((global::vars::g_social_club_game_info_table + 0x20) + (index * 0x148))); + } + } + + return 0; + } + + const char* sc_get_string(const char* identifier) { + uint64_t table = sc_get_info(identifier); + if (table) { + const char* name = (char*)(table + 0x40); + if (name && *name != 0xff) { + return name; + } + } + + return nullptr; + } + + bool is_player_reported(rage::network::net_game_player* player, int category, int reason) { + return caller::call(global::vars::g_is_reported_for_reason, player, category, reason); + } + + void send_text_message_net_msg(rage::network::net_msg_identifier* target, rage::network::net_msg_text_message* identifier) { + caller::call(global::vars::g_send_text_message_net_msg, global::vars::g_network_base_config, target, identifier); + } + + void send_ragdoll_event(int player) { + if (menu::player::get_player(player).m_ped_ptr) { + if (menu::player::get_player(player).m_ped_ptr->get_net_obj()) { + caller::call(global::vars::g_send_ragdoll_event, menu::player::get_player(player).m_ped_ptr->get_net_obj()->m_network_id); + } + } + } +} \ No newline at end of file diff --git a/GTAV/src/rage/engine.h b/GTAV/src/rage/engine.h new file mode 100644 index 0000000..a8e051e --- /dev/null +++ b/GTAV/src/rage/engine.h @@ -0,0 +1,68 @@ +#pragma once +#include "stdafx.h" +#include "rage/types/script_types.h" +#include "rage/types/generic_types.h" +#include "rage/types/network_types.h" + +namespace rage::engine { + rage::script::script_header* get_script_program(uint64_t table, int index); + rage::types::store_module* get_store_module_extension(const char* extension); + rage::network::net_game_player* get_net_game_player(int index); + rage::network::net_game_player* get_host_net_game_player(); + rage::network::net_object* get_network_object(Entity entity); + rage::types::grc_texture_dx11* get_sprite_texture(const char* dictionary, const char* asset); + + void get_streamed_script_index(int* index, const char* script_name); + void request_streaming_file(int index); + int register_streaming_file(const char* file_path, const char* asset_name); + uint64_t construct_gfx_font(uint64_t allocation); + void destruct(uint64_t allocation); + int create_id_for_font(const char* asset_name); + void add_font_lib(uint64_t allocation, int index); + int get_network_object_owner(Entity entity); + bool update_network_object_owner(Entity entity, int new_owner); + uint64_t get_entity_address(Entity entity); + Entity get_entity_handle(uint64_t address); + bool process_basket_transaction(int category, int action, int destination, std::vector items); + std::vector get_hash_list_from_hash_table(uint32_t count, uint64_t table); + bool is_basket_transaction_queue_busy(); + uint64_t thread_alloc(uint32_t size); + rage::types::dictionary* setup_dictionary(rage::types::dictionary* dictionary, int count); + uint32_t* setup_store_item(uint64_t store, uint32_t* out, uint32_t* dictionary_hash); + bool is_valid_pool_slot(uint64_t pool, uint32_t slot); + void add_dictionary_to_pool(uint64_t pool, uint32_t index, rage::types::dictionary* dictionary); + void add_grc_texture_to_dictionary(rage::types::dictionary* dictionary, uint32_t hash, rage::types::grc_texture_dx11* texture); + void send_weather_event(int id, rage::network::net_game_player* target = nullptr); + int get_weather_id(const char* weather); + void send_clock_event(rage::network::net_game_player* target = nullptr); + void add_to_clock_time(int hour, int minute, int second); + uint64_t get_model_info(uint32_t model); + void set_vehicle_gravity(uint64_t address, float gravity); + void vertex_begin(int mode, int count); + void vertex_end(); + void vertex_add(float x, float y, float z, float nx, float ny, float mod, uint32_t color, float u, float v); + uint64_t get_vehicle_paint(int cat); + rage::network::sync_tree* get_sync_tree(eNetObjectTypes type); + void parse_nodes(rage::network::sync_tree* tree, int type_bit, int flag, rage::bit_buffer* buffer, uint64_t log_interface); + rage::network::net_object* get_network_object_from_network_id(uint64_t player_manager, uint16_t network_id, bool unk); + void send_network_event_ack(uint64_t table, uint8_t* setup_buffer, rage::network::net_game_player* sender, rage::network::net_game_player* receiver, int event_index); + void send_network_event_reply(uint64_t table, uint8_t* setup_buffer, rage::network::net_game_player* sender, rage::network::net_game_player* receiver, int event_index, int event_bitset); + bool setup_give_control_event(uint8_t* data, rage::bit_buffer* buffer); + void send_increment_stat_event(uint32_t hash, int value, rage::network::net_game_player* player); + void set_gsinfo(rage::network::gs_session* gsinfo); + bool get_session_info_from_gs(rage::network::gs_session* gs, const char* str); + void send_session_info_request(rage::network::rockstar_identifier* targets, int count); + uint64_t read_xml_string(uint64_t context, const char* name, int unk1, int unk2); + const char* read_xml_attribute_string(rage::types::xml_node* node, const char* name, int unk1); + void send_matchmaking_request(); + void send_friend_request(uint64_t rockstar_id); + void migrate_script_host(rage::script::game_script_handler_network_component* comp, rage::network::net_game_player* player); + void send_global_chat_message(uint64_t manager, int key, rage::network::global_msg_context* context); + void handle_rotation_values_from_order(math::matrix* matrix, math::vector3_* rotation, int order); + void invite_player(uint64_t rockstar_id); + uint64_t sc_get_info(const char* identifier); + const char* sc_get_string(const char* identifier); + bool is_player_reported(rage::network::net_game_player* player, int category, int reason); + void send_text_message_net_msg(rage::network::net_msg_identifier* target, rage::network::net_msg_text_message* identifier); + void send_ragdoll_event(int player); +} \ No newline at end of file diff --git a/GTAV/src/rage/invoker/invoker.cpp b/GTAV/src/rage/invoker/invoker.cpp new file mode 100644 index 0000000..0b1d092 --- /dev/null +++ b/GTAV/src/rage/invoker/invoker.cpp @@ -0,0 +1,6373 @@ +#include "invoker.h" +#include "util/log.h" +#include "global/vars.h" +#include + +namespace rage::invoker { + namespace crossmap { + static const uint64_t g_crossmap_data[] = { + 0x4ede34fbadd967a6,0x4ede34fbadd967a6, + 0x8D32347D6D4C40A2, 0xF99B8860747709DD, + 0x876928DDDFCCC9CD, 0xB6A5BFA5BC7CFB32, + 0x9D75795B9DC6EBBF, 0x86256494797305DE, + 0x8DFCED7A656F8802, 0x66AE54CE92457FEE, + 0x532CFF637EF80148, 0xA05BF24B3F194FD6, + 0x7767DD9D65E91319, 0xBEFD43FFE65C9B6F, + 0xF79F9DEF0AADE61A, 0xE5E2E9A5C005A8E9, + 0x6F60E89A7B64EE1D, 0x1371BE9AFC38ECD4, + 0x615D3925E87A3B26, 0x872FE1408217492B, + 0x42A4BEB35D372407, 0x736F95037A0CF876, + 0xDAD029E187A2BEB4, 0x040CCF00053DBCB0, + 0x271401846BD26E92, 0x8719C17522DB60A7, + 0xECB41AC6AB754401, 0xE48F17AFBADF9C3E, + 0xA7A1127490312C36, 0x95A8119F6330B980, + 0x8CAAB2BD3EA58BD4, 0x991953A4A5B671D2, + 0x1F47B55093A92FE4, 0xF3A15EFD12A624B9, + 0x9C30613D50A6ADEF, 0x2E31485162C12C99, + 0xFC52E0F37E446528, 0xF5BE45B871F13822, + 0x498218259FB7C72D, 0x8F1B7208917EB0C6, + 0xFCC75460ABA29378, 0xEDA1E269A9237146, + 0xE54E209C35FFA18D, 0x7175011ED29304EE, + 0x25FBB336DF1804CB, 0xE5A80C83FA218963, + 0xE8718FAF591FD224, 0x2BC1A32FB52E8B77, + 0x5D7B620DAE436138, 0xC1A425C6F3193A36, + 0x1509C089ADC208BF, 0x04F95AB31C381DDF, + 0xE6CC9F3BA0FB9EF1, 0x79CDCC8ABB331B8C, + 0x722F5D28B61C5EA8, 0x7C48D91103669719, + 0xD7CCCBA28C4ECAF0, 0xC2C8A8BBAE3080D8, + 0xB24F0944DA203D9E, 0x4D51377BFFA53BFA, + 0xB9854DFDE0D833D6, 0xA5C4806DE775E4F4, + 0x49E50BDB8BA4DAB2, 0xA880F40656CC1779, + 0x40F7E66472DF3E5C, 0x08A4891BD2FD2401, + 0xF3365489E0DD50F9, 0x08F1CE1B6173FA3B, + 0xD6A86331A537A7B9, 0x28E91B800C85243D, + 0x428AD3E26C8D9EB0, 0xC5EBFB4722B9119D, + 0xD2209BE128B5418C, 0x63FE833BC1A4730C, + 0x5CAE833B0EE0C500, 0x28A509D5BF7A5A65, + 0xCBF12D65F95AD686, 0x84C39F568C7207FE, + 0xC7F29CA00F46350E, 0x17B67CB0B24870EA, + 0xAC6D445B994DF95E, 0x29642054AD9A795B, + 0x2047C02158D6405A, 0xC10D9E25620C39E9, + 0xC13C38E47EA5DF31, 0xA2D922F2CCC4D880, + 0x35AD299F50D91B24, 0x10778BD5721242A4, + 0x0E46A3FCBDE2A1B1, 0xED103B8F7F8FFD20, + 0xFC695459D4D0E219, 0x8E01EA82E83CAEF2, + 0xAE99FB955581844A, 0x451AB475C3CD97F2, + 0x065D2AACAD8CF7A4, 0xDC1E5B0740D8950C, + 0x16469284DB8C62B5, 0xF706462DA6137097, + 0xC669EEA5D031B7DE, 0x613925795D4E454B, + 0x0A794A5A57F8DF91, 0x557C9CA8FCC667DF, + 0x0205F5365292D2EB, 0xC9B92219B8901A09, + 0x5B6010B3CBC29095, 0x3C6FEAF85D29DD20, + 0xC32EA7A2F6CA7557, 0xF8C84EE292202A42, + 0xEB4A0C2D56441717, 0x6F679DA224529C6B, + 0x62A456AA4769EF34, 0x12AD8B3D8C576769, + 0xA9575F812C6A7997, 0x2A028CECB5C52BB2, + 0x3E200C2BCF4164EB, 0x9AA45EB0997539A2, + 0x589F80B325CC82C5, 0x43AF54C532A80D3E, + 0xEB6FB9D48DDE23EC, 0x9D0A9219AC2C6A1F, + 0x812F5488B1B2A299, 0xC840E17BAEADAE54, + 0xA6E7F1CEB523E171, 0x1A46D74ECB10E7F8, + 0xA31FD6A0865B6D14, 0xCF2F63354B41E550, + 0x5FBD7095FE7AE57F, 0xB35FEF5CE3334BE4, + 0xAD73CE5A09E42D12, 0x13C224A1EF4C4CEF, + 0xB4F47213DF45A64C, 0x9982FE3B4C236AFB, + 0xCF463D1E9A0AECB1, 0xECE27E90547055F8, + 0xC0173D6BFF4E0348, 0xE2E4F643CD8332E6, + 0x8A7A40100EDFEC58, 0x41227A976EBB4380, + 0x94495889E22C6479, 0x57605ED0D405D759, + 0x0A50A1EEDAD01E65, 0xCE1DD60A1DF5A973, + 0xDC16122C7A20C933, 0x0AF4DB9B23D44B88, + 0xFFE5C16F402D851D, 0x9BAE075B594C3908, + 0x3B6405E8AB34A907, 0xACF48634C49FCE07, + 0xC9BF75D28165FF77, 0x3FC3A4D55785B566, + 0x36C6984C3ED0C911, 0xA7F68A5A461FBF31, + 0x3B3CAD6166916D87, 0x4257A5C2A5815772, + 0x44CD1F493DB2A0A6, 0x0CFC169655AA2A7F, + 0xC313379AF0FCEDA7, 0xAB094CF7B5290A58, + 0x797F9C5E661D920E, 0x3402985954953C67, + 0x751B70C3D034E187, 0xD406352E21A7E1D0, + 0xA5E41FD83AD6CEF0, 0xF8D4180996FA0FA7, + 0x0C92BA89F1AF26F8, 0x8AE52F3841E687E1, + 0x7F8F65877F88783B, 0xE41AAE444A244039, + 0x464D8E1427156FE4, 0x23AD9DB85DF0B50D, + 0x9A62EC95AE10E011, 0x704159D6B427B3B6, + 0xAB31EF4DE6800CE9, 0xC40477DAC3B70EC3, + 0xCF708001E1E536DD, 0xAA18C87A1A6C1FAE, + 0xF86AA3C56BA31381, 0x3856AB98BC7D2687, + 0x5EF37013A6539C9D, 0xBE38DC36E2DFB246, + 0x03EA03AF85A85CB7, 0x457AC9431DB1D1F1, + 0x8DECB02F88F428BC, 0x6CEA35622FBD9702, + 0x14F19A8782C8071E, 0x795A49E70BD3B699, + 0x5407B7288D0478B7, 0xA937637D5E35176E, + 0x13B350B8AD0EEE10, 0x70AF89C832F8738C, + 0x1654F24A88A8E3FE, 0xF5750F4BE463C4A9, + 0xA41B6A43642AC2CF, 0x1C40FECD2B1ADC72, + 0xB138AAB8A70D3C69, 0x3DF34AABABC07A1C, + 0x1086127B3A63505E, 0xDB6B96C1574C049D, + 0x447C1E9EF844BC0F, 0xC27B75C8D0D50C8B, + 0xB569F41F3E7E83A4, 0x174AAF83A70E9120, + 0x77B612531280010D, 0x3840DB3ECC7D0818, + 0x684A41975F077262, 0xE66B466234930799, + 0xA468E0BE12B12C70, 0xAF5775C15638F52C, + 0xB4AC7D0CF06BFE8F, 0x664B48C95FFB7FF8, + 0x50276EF8172F5F12, 0x8B7AB56D7C36EF28, + 0xCB82A0BF0E3E3265, 0xF5915A8BF7232809, + 0x7FEAD38B326B9F74, 0x91C1CD6EFA5763DF, + 0xCD9CC7E200A52A6F, 0x84EEE2C0E652D707, + 0xD46923FC481CA285, 0xBD35EB504610C23C, + 0x6CE50E47F5543D0C, 0x1901AF1CA00D0954, + 0x577599CCED639CA2, 0x08ADA18D30E0391E, + 0x1F4ED342ACEFE62D, 0xFC4706297CB9D7D2, + 0x132F52BBA570FE92, 0x74F971D19CAD1757, + 0x015A522136D7F951, 0x0F6DF91234DB95B0, + 0xDD6BCF9E94425DF9, 0x94DD3780B7D84CA9, + 0x2707AAE9D9297D89, 0x77D94117A41AFFD3, + 0x055BF0AC0C34F4FD, 0x787921FC6CF37367, + 0xBB062B2B5722478E, 0x195733224245A760, + 0xB365FC0C4E27FFA7, 0x44893A0E1444C28B, + 0x4740D62BC1B4EBEA, 0x3FD5FFDC264253C3, + 0xAD6B3148A78AE9B6, 0xB76EE71E771BDAA1, + 0x85F6C9ABA1DE2BCF, 0x57A8438ADEDB40A6, + 0x1E0B4DC0D990A4E7, 0x095290E662CE0E24, + 0xA6575914D2A0B450, 0xC4D907B00C2E8368, + 0x52D59AB61DDC05DD, 0x7BC3A9305442B7FD, + 0xEB0F4468467B4528, 0x607FBE975E99DADB, + 0xE81B7D2A3DAB2D81, 0x1B50D12638E95382, + 0x3C4487461E9B0DCB, 0xC42310672940C348, + 0x1A330D297AAC6BC1, 0x6C81257137D588C1, + 0x92AEFB5F6E294023, 0x61918AA39871DD2B, + 0x367A09DED4E05B99, 0x314B0D9D224ABE3A, + 0x498C1E05CE5F7877, 0x637CBC94E1E37AB1, + 0xF9C1681347C8BD15, 0x93323F20DA525630, + 0x58E2E0F23F6B76C3, 0x2D64BC4D301915C2, + 0x426141162EBE5CDB, 0x2866F13E46EAAE03, + 0x530071295899A8C6, 0x2B0DB0BDB2C7B28B, + 0x3A87E44BB9A01D54, 0xBDC364B886846D11, + 0x433DDFFE2044B636, 0x47C862EFFFD62085, + 0x82E4A58BABC15AE7, 0xE66F26A182E10848, + 0xE9DCE62981455B13, 0x3426919DAACA100C, + 0x198F77705FA0931D, 0x1BA55A6F1412C5CB, + 0x697157CED63F18D4, 0xD193745144D2934C, + 0x0999F3F090EC5012, 0x1DE4639F7473667B, + 0xCC97B29285B1DC3B, 0x7664412B8506D57A, + 0x1090044AD1DA76FA, 0x4BFE89D21F9885DC, + 0x90B6DA738A9A25DA, 0x252DBD884DA853D6, + 0xB215AAC32D25D019, 0x3FCA3350E87E4DB8, + 0x7D7D2B47FA788E85, 0x3D7BB320AD56D5E3, + 0xED34C0C02C098BB7, 0x9D446943D43E1808, + 0xA549131166868ED3, 0xE8FB31BE3B899DD3, + 0xE44A982368A4AF23, 0xC23FEF0920023BA2, + 0xEC6935EBE0847B90, 0x4DE0AF634E3E79C3, + 0xC3287EE3050FB74C, 0xD17465D40BEBC86E, + 0xFB92A102F1C4DFA3, 0x480609C7D10E7F3E, + 0x5096FD9CCB49056D, 0xD24E3E0C2BE88D1F, + 0xC38DC1E90D22547C, 0xE4210DA3CA1E3CF5, + 0x170910093218C8B9, 0x80CD4100306AA671, + 0x425AECF167663F48, 0xD89C790202174B38, + 0x68F8BE6AF5CDF8A6, 0xD061D76A4EADBFB4, + 0xDB89EF50FF25FCE9, 0x560FF74A61A33415, + 0x08DA95E8298AE772, 0x41D7811563AAD1B1, + 0xEE01041D559983EA, 0x494E8A58F41F5F54, + 0x7F0DD2EBBB651AFF, 0xD85A85B7D6067722, + 0x89049A84065CE68E, 0xC2EDFED41912E6EF, + 0xAEDF1BC1C133D6E3, 0x473ADBEA1ACFBD8C, + 0x04701832B739DCE5, 0xE6C453E57B22072B, + 0xC912AF078AF19212, 0x3141A840BD2418CD, + 0x278F76C3B0A8F109, 0x534A9B3C6415526C, + 0xA34CB6E6F0DF4A0B, 0x2A29B783B2BA8D5C, + 0x11D1E53A726891FE, 0x869BEFAB207A06B2, + 0x9D64D7405520E3D3, 0x05D0B763CEEA9ABD, + 0xD302E99EDF0449CF, 0xF345244F8311AF6F, + 0x26F49BF3381D933D, 0x20A3CA9A2D6719B0, + 0x2902843FCD2B2D79, 0x53858F1E03A88AE1, + 0xEA7F0AD7E9BA676F, 0x32AE32C4B55F206B, + 0x9FF447B6B6AD960A, 0x871872B056B950EB, + 0xBC0CE682D4D05650, 0x8C3297F8440069FA, + 0x451294E859ECC018, 0xEABC48138FE58714, + 0xC69BB1D832A710EF, 0xDD411D78E523A5A9, + 0x2B949A1E6AEC8F6A, 0xF456597C04E3D543, + 0xF10B44FD479D69F3, 0x1D48FFFF00BE8B38, + 0x625B774D75C87068, 0x8473A1F68B5B0B4C, + 0x6BC97F4F4BB3C04B, 0x480217AACC9C34FB, + 0xA586FBEB32A53DBB, 0x29A3C2E3AADC562F, + 0x77B21BE7AC540F07, 0x79C3AEC4C7C91A54, + 0x5615E0C5EB2BC6E2, 0xF0E158F9A3E43AC3, + 0x845FFC3A4FEEFA3E, 0x3F6818D0434C1E9E, + 0x22B0D0E37CCB840D, 0x1DC2BF231DE6A016, + 0xAFE24E4D29249E4A, 0x98AD79233F986FD9, + 0x64F62AFB081E260D, 0x0456854479F13C29, + 0xEDF7F927136C224B, 0xE6EB4EA4F38D5532, + 0xCFF869CBFA210D82, 0xBC28F9DB06EBE19C, + 0xF314CF4F0211894E, 0x39D1B4720FE6DF76, + 0x2DCB19ABAB0380A8, 0xC9E146D63A42EC00, + 0x63F58F7C80513AAD, 0x1D7A4E9E23D306D6, + 0x126EF75F1E17ABE5, 0x3121C04DAAA58886, + 0x80E3357FDEF45C21, 0x040C47F5DFA52DB2, + 0x2C2E3DC128F44309, 0xFDBDF42FEA7F8BA1, + 0xB8F87EAD7533B176, 0xC96986F1796C024A, + 0xCEE4490CD57BB3C2, 0xC5C459033A48B1E4, + 0x239528EACDC3E7DE, 0x03903A362E41A74F, + 0x2A86A0475B6A1434, 0x02BFD17FEAA86FEF, + 0x1153FA02A659051C, 0x27043726EEB687AF, + 0x17330EBF2F2124A8, 0x369E9EC08F57DF02, + 0x9060A8CA9EAD46E3, 0xD2F10974DB302219, + 0xB8A850F20A067EB6, 0x53CE6C5893F65093, + 0xF49B58631D9E22D9, 0x8EF43D7DBE009D96, + 0x2FAB6614CE22E196, 0x305DB0B7FFE4E1A1, + 0x7D2708796355B20B, 0x57FB3D94D590E8BC, + 0x6FE601A64180D423, 0xEC31745B182C0B6E, + 0xDCE4334788AF94EA, 0xE267416B80E7921F, + 0xC5BE134EC7BA96A0, 0x58DEE6B926B69906, + 0xA85A21582451E951, 0x93CC9B5D8F7A326F, + 0xDDF3CB5A0A4C0B49, 0xDDF3CB5A0A4C0B49, + 0x06EAF70AE066441E, 0xF221287F6EEA0312, + 0x1A8E2C8B9CF4549C, 0xCB0971F8681D6363, + 0x56CE820830EF040B, 0xECEFCCAF4C7B9BD0, + 0xA3A9299C4F2ADB98, 0x36F39CF94E443B84, + 0x9F0C0A981D73FA56, 0x2758917A814C20F8, + 0x560A43136EB58105, 0xF1A4298C3391F2DD, + 0x1216E0BFA72CC703, 0x6B3F2762256EBA78, + 0x9CD00497CB11D468, 0x9DC79AAB50D9E16A, + 0xB45085B721EFD38C, 0xE8081CA6DEA50F3A, + 0xD8122C407663B995, 0xEAEE6569A168D023, + 0x7303E27CC6532080, 0x488A4A7305C96635, + 0x5F0F3F56635809EF, 0x8FC9EEB5362BDFA8, + 0x56E3B78C5408D9F4, 0xB79C89B220BFC1FD, + 0x3C06B8786DD94CD1, 0x4CAB5D76DA27816C, + 0x7813E8B8C4AE4799, 0xBA4A3CA0044D7B57, + 0xA808AA1D79230FC2, 0x2C10A11A684CFE96, + 0xF92691AED837A5FC, 0xC96B0C85BE0E0287, + 0x5CBF7BADE20DB93E, 0xA14789297F71F875, + 0xEE47635F352DA367, 0xB3E2CBD7C8448401, + 0x50B56988B170AFDF, 0xC10C84A8F8D6A4BB, + 0x96B1361D9B24C2FF, 0x2311DD7B841CBAB0, + 0x3F892CAF67444AE7, 0x966FF0999887A469, + 0x46399A7895957C0E, 0xF5A3E4A97D6F6DD4, + 0x3EBEAC6C3F81F6BD, 0xC672361A39460775, + 0x0B3E35AC043707D9, 0x7AA174D955FD1B35, + 0xF6E48914C7A8694E, 0x704F8697BB515627, + 0x131D401334815E94, 0x73E0CF006385B59C, + 0x2F9A292AD0A3BD89, 0x286AD817F094A7FB, + 0x4AF92ACD3141D96C, 0x0442C8191F96301B, + 0xC4BB08EE7907471E, 0x20CEBFA2EEC4CA42, + 0x5D35ECF3A81A0EE0, 0x5DE3BAC60A3F44C5, + 0xDEB6D52126E7D640, 0xE196738BFC6C83A6, + 0x25D39B935A038A26, 0xEEC203A73BC92E7E, + 0xD1C55B110E4DF534, 0xAE57E698E5255D74, + 0xE9EA16D6E54CDCA4, 0x8F930983ABB3ABAF, + 0xB5D7B26B45720E05, 0x27869FB030A5470E, + 0xDADFADA5A20143A8, 0xD8BF75DDE51AF918, + 0xC8B46D7727D864AA, 0x8AF0BDDAE129FD69, + 0xAFAF86043E5874E9, 0x890F0EFD8389B8CD, + 0x28B022A17B068A3A, 0xB094210A61D4E6C4, + 0x5DDFE2FF727F3CA3, 0x5C2873BB67A4CC22, + 0xE620FD3512A04F18, 0xA00C9347A682DC8C, + 0x65482BFD0923C8A1, 0x4D840F1546BC9E99, + 0x4BF54C16EC8FEC03, 0x05BA99098C9BE70A, + 0x2BB9230590DA5E8A, 0x91A6237658B4DA68, + 0x1DD55701034110E5, 0x19C069DE0C1DFF87, + 0xBAA2F0490E146BE8, 0x9F40BBDBC30EBB13, + 0x2CDA538C44C6CCE5, 0x3E5BA73CEA34D768, + 0xC27009422FCCA88D, 0xB4D939A0198820EF, + 0x109E99373F290687, 0x56732EC826840EC3, + 0x300504B23BD3B711, 0x788A8B142314D1E9, + 0x32C62AA929C2DA6A, 0x987940DFD4A807FF, + 0x9B0BB33B04405E7A, 0x7C0C012482836EE9, + 0x75262FD12D0A1C84, 0x879C5D9B5CD209C5, + 0x34C9EE5986258415, 0xB9CAD409CA056D50, + 0xED7F7EFE9FABF340, 0x83B972AB639B4420, + 0x551DF99658DB6EE8, 0xAF70AE55A89271D7, + 0x14D8518E9760F08F, 0x6B59D1A09BAE26DF, + 0x301A42153C9AD707, 0xF55761292A0FA0E8, + 0xA3D0E54541D9A5E5, 0x46F4AB5A03B1D05B, + 0x252BDC06B73FA6EA, 0x09FCE4B90C450212, + 0x4FBACCE3B4138EE8, 0xEDE161DE4F39475B, + 0x889DEC4AFD690B8F, 0x1CD5D6E16F5BD950, + 0x8C0D57EA686FAD87, 0x7971D171527232FB, + 0xD8050E0EB60CF274, 0x299235509A76E8C0, + 0x073CA26B079F956E, 0xF4F27FECC8BEA824, + 0x711327CD09C8F162, 0x155BA90FAEAE7861, + 0x21A1684A25C2867F, 0xDB93FF2530D06BBA, + 0x137BBD05230DB22D, 0x770D31B59A5D1518, + 0x8C18E0F9080ADD73, 0xD955F1CC0BCABC78, + 0xC17AD0E5752BECDA, 0xBEEBC440559223F7, + 0x799017F9E3B10112, 0xCD974ADEB6D19C75, + 0xAF35D0D2583051B0, 0x170478CC84C8AE2F, + 0xFD75DABC0957BF33, 0xF768C88EEA16F61D, + 0x8F5EBAB1F260CFCE, 0x42CE5ADA1F65840C, + 0x2107A3773771186D, 0xE099401678A80E13, + 0x848B66100EE33B05, 0x0EA7AC7704C7C2FA, + 0x8B32ACE6326A7546, 0x88F676C35100CFCA, + 0x5BA652A0CD14DF2F, 0x71DEE06C5468FEE1, + 0x2708FC083123F9FF, 0x9EAD4E901F56D0BC, + 0xEF4CED81CEBEDC6D, 0xFC832BB48EA293B3, + 0x8A4986851C4EF6E7, 0xF848D3A62815E44F, + 0x1514FB24C02C2322, 0xF586F680988B2CE6, + 0x7118E83EEB9F7238, 0x8E2A1D3E583ACD57, + 0x81592BE4E3878728, 0x78738F6D30171534, + 0x5C29F698D404C5E1, 0x6322ED685F2E1703, + 0x973A9781A34F8DEB, 0x1E48DEAB605ED9B6, + 0x7EE53118C892B513, 0xC4D136140D260163, + 0x84D32B3BEC531324, 0x199AF8DA5732869E, + 0x58A850EAEE20FAA3, 0x76A57C4C92ACF2A8, + 0xE95C8A1875A02CA4, 0x3979475A1D72F224, + 0xDA07819E452FFE8F, 0x43CF5FF3CAFC3ECB, + 0x3ED1438C1F5C6612, 0xAF65FA80D1AD087D, + 0xB81CF134AEB56FFB, 0xCFA42DB3D64713A4, + 0xBBB6AD006F1BBEA3, 0x897CB20A03D8656E, + 0x8ABA6AF54B942B95, 0x84AD61D029E3B23C, + 0x31D16B74C6E29D66, 0xE6B53A6E51AAA49F, + 0x0B919E1FB47CC4E0, 0x51DFBD0C8F08B01C, + 0xE135A9FF3F5D05D8, 0xA97EFD0124D68AB9, + 0x801879A9B4F4B2FB, 0xADD34CCE8418988E, + 0xBD4D7EAF8A30F637, 0x14D8BAC5AEFB49EB, + 0x068E835A1D0DC0E3, 0xBAF2F13FE4D19AA9, + 0xE50E52416CCF948B, 0x9FB743331EC18DF4, + 0xEE2476B9EE4A094F, 0x06962D58E9B7C026, + 0xD9D0E694C8282C96, 0xD62D8214DFB07FC1, + 0xEFBE71898A993728, 0xDA872572A987B2AD, + 0xC2B82527CA77053E, 0xC6DE48EC77387A40, + 0x921CE12C489C4C41, 0x32E225D6BB070AFA, + 0x547237AA71AB44DE, 0x3BAC5DD5FCC905A5, + 0x8C4F3BF23B6237DB, 0xEC609B71FAC841DC, + 0xE59343E9E96529E7, 0xFCB06C02E5066F58, + 0xF45352426FF3A4F0, 0xDE25303DF0CA8E75, + 0xFF1BED81BFDC0FE0, 0xB3B3B53C2C3D8F6A, + 0xDA66D2796BA33F12, 0x79B648063E94A67F, + 0x54318C915D27E4CE, 0x7A4C054D66609AD2, + 0x18C1270EA7F199BC, 0xFDC069EFB77AEBE9, + 0xA2C9AC24B4061285, 0x85ADAF0E704499F4, + 0xD9D620E0AC6DC4B0, 0x0DD9259ADC92B51F, + 0x6A03BF943D767C93, 0x95FE169250CF288F, + 0xA98FCAFD7893C834, 0x14A3ACF8165A5524, + 0xB1CC1B9EC3007A2A, 0xAD3F93454D28E8D2, + 0x9689123E3F213AA5, 0x8062E43B81472915, + 0x3BC4245933A166F7, 0x39A17B456BB9800A, + 0xEAD42DE3610D0721, 0xFEB4680FABA8B160, + 0x158BB33F920D360C, 0x81305B339C5AFA4A, + 0x7285951DBF6B5A51, 0x46C952E7556557FA, + 0xBB8DE8CF6A8DD8BB, 0x403528BF4750B175, + 0x164C5FF663790845, 0xB213F3D908ADBB5E, + 0x098760C7461724CD, 0x431B25DB75B9FF4C, + 0x2F3C3D9F50681DE4, 0x61C47C6F50394A92, + 0x67AA4D73F0CFA86B, 0x32603258E090BD7E, + 0x3DC52677769B4AE0, 0x2F4A7A59A01DB353, + 0xA5F377B175A699C5, 0x090BD08D742ADEAA, + 0x279F08B1A4B29B7E, 0x07C2962447C9CA2A, + 0x078EBE9809CCD637, 0x55A70F08F08A3A71, + 0x59D421683D31835A, 0x14C34FDB158E927E, + 0xCA7DC8329F0A1E9E, 0x7BFD277DA739DB2B, + 0xC79196DCB36F6121, 0x3992DEA26952B93A, + 0x5CD3CB88A7F8850D, 0x24FAD4EF67DE59EB, + 0x4282E08174868BE3, 0x86CD3AEC95187C53, + 0x971DA0055324D033, 0x5769513D3886F5DC, + 0x247F0F73A182EA0B, 0x92F2FDB7CAFB0FD0, + 0x99C82F8A139F3E4E, 0x5D7982186D74515E, + 0x595B5178E412E199, 0x6F95CD9FC5F2A76A, + 0x4FCD976DA686580C, 0x12AB0EE619CD5E97, + 0x5E5E99285AE812DB, 0xEA155EBCDF7E6617, + 0x33DF47CC0642061B, 0x71FAFF15EB0A3D4B, + 0x25B99872D588A101, 0x18053F2777264B9A, + 0xC2F7FE5309181C7D, 0xF233234A48D1B109, + 0x6B83617E04503888, 0x0B072CF0711C653F, + 0x261E97AD7BCF3D40, 0x8637DF0F5FF1B467, + 0x171DF6A0C07FB3DC, 0x171DF6A0C07FB3DC, + 0xEF6212C2EFEF1A23, 0xDBDB21C248924305, + 0x357B152EF96C30B6, 0x3CAE77775C5C2063, + 0xA635C11B8C44AFC2, 0x8195B06184F649D7, + 0x54972ADAF0294A93, 0x43D93129BD1AD792, + 0xD9F692D349249528, 0x3F58F6F78C526ED8, + 0xE143FA2249364369, 0xB219A5BFF547852F, + 0x8EE6B53CE13A9794, 0xF829AB4233B77423, + 0x500873A45724C863, 0xF1F0F4AF4E158CE8, + 0xF44A5456AC3F4F97, 0xBECC57B147F32FEC, + 0xAF514CABE74CBF15, 0x498685EB9132AF88, + 0xD565F438137F0E10, 0xBA24FB310A0AF4B6, + 0x35124302A556A325, 0x52EDECAF527E73AA, + 0x73040398DFF9A4A6, 0x759904FB0E7974BE, + 0x2E2F4240B3F24647, 0x83EE723351E8C641, + 0x701FDA1E82076BA4, 0xAA1CD31BF328BDCF, + 0x4F5212C7AD880DF8, 0x0860A43DF88D64B1, + 0xDF993EE5E90ABA25, 0x1EB6C2E7D90CD82E, + 0x186FC4BE848E1C92, 0x6EE46314283D3C7D, + 0x6E0EB3EB47C8D7AA, 0xA538221C7FC0DE1C, + 0x5776ED562C134687, 0x92DFCD1A586E7748, + 0x5DB8010EE71FDEF2, 0xE3D43E568F45340A, + 0x4455517B28441E60, 0x5AB6E4148E3408A3, + 0x7350823473013C02, 0x9038A2103B9BFD38, + 0xFBE20329593DEC9D, 0x4A60853A3E0D183D, + 0x920D853F3E17F1DA, 0x2470509C0B93ACD8, + 0xA6FCECCF4721D679, 0xF7C860BB63820258, + 0x2DD39BF3E2F9C47F, 0x38684A9B76A50D6A, + 0xCFD115B373C0DF63, 0x85FE2F0993512111, + 0x1E8E5E20937E3137, 0x9442B8AA55165151, + 0x8C71288AE68EDE39, 0x3B58BC4F38776A1E, + 0x2EB41072B4C1E4C0, 0x2ECFC62169E31C4B, + 0x279D50DE5652D935, 0x058C28579D81FB08, + 0x6731DE84A38BFAD0, 0x05FBC8C35F2541BD, + 0x4C4D6B2644F458CB, 0xF8A80F26627AA333, + 0x2A7CEC72C3443BCC, 0xDAB070D70D427AFD, + 0x9F1935CA1F724008, 0x8FF6FBC657F0141D, + 0x3E9B2F01C50DF595, 0xF784CE07ED70869A, + 0x1D408577D440E81E, 0x36BB8F00E3205417, + 0x7CCE5C737A665701, 0xC9CDDA3F4021A8AE, + 0x11579D940949C49E, 0xFCFF477238F043A9, + 0xEA47FE3719165B94, 0x4261814A9A26E86F, + 0xE0A0AEC214B1FABA, 0xAAC9F0E4D9150FD9, + 0xA651443F437B1CE6, 0xE1AE18333ED5F859, + 0x1F1F957154EC51DF, 0xC1E412BF2D1D6DA1, + 0x7C2AC9CA66575FBF, 0xB9B9B15BD0EA06BE, + 0x4055E40BD2DBEC1D, 0x6E0A609EBFD3A99A, + 0xCF38DAFBB49EDE5E, 0x9215150B836F97A0, + 0xCCA4318E1AB03F1F, 0x7BDE1A720800B09A, + 0x108BE26959A9D9BB, 0xA7DC59699AB1A38F, + 0x4C61B39930D045DA, 0x619CF8E05DFA3325, + 0x46494A2475701343, 0x2584D4E60993D679, + 0xE65F427EB70AB1ED, 0xE2D24A37AFCF27BF, + 0x2B320CF14146B69A, 0x6691A8C1740779A7, + 0x31125FD509D9043F, 0xE0A7320046776A9D, + 0xC593212475FAE340, 0x2B8CB30532811E62, + 0xB282749D5E028163, 0x26CF1BA7E1C21871, + 0x840F03E9041E2C9C, 0xF6FBE0229ABAB0A8, + 0xBA0127DA25FD54C9, 0xAEA6B3DBCDF60D8E, + 0xA6F312FCCE9C1DFE, 0x49B69E9FEE7538E7, + 0xBB6E6FEE99D866B2, 0xA81D28792171A977, + 0xF25D331DC2627BBC, 0x5B99D5C0DE301BD3, + 0x260EE4FDBDF4DB01, 0x2989D778A6DE2491, + 0x8EF07E15701D61ED, 0x6DA51A6C96AD7E4A, + 0x17FFC1B2BA35A494, 0x83B12E293561B796, + 0x0D0A9F0E7BD91E3C, 0x5F80FF59AFD5E62D, + 0xF4FF020A08BC8863, 0xB457BE331CE019C6, + 0x24CB2137731FFE89, 0x3921ADAA229028DA, + 0xB8B52E498014F5B0, 0xCB5052E71B900099, + 0xD69736AAE04DB51A, 0x82D42F43BE26EB72, + 0x4750FC27570311EC, 0xCACBA9CC51268B9C, + 0x66E0276CC5F6B9DA, 0x57BF57F8A1C8167A, + 0x34616828CD07F1A1, 0x7F716EA884E75E49, + 0x15CFA549788D35EF, 0x2785FE2E1CBFF018, + 0x9E3B3E6D66F6E22F, 0x24C72D5D30336473, + 0x1BBAC99C0BC53656, 0xFCCDF4525B0FD2D6, + 0xE7D267EC6CA966C3, 0x01BC261FABFB54C1, + 0xC30338E8088E2E21, 0x62D18D65FE22FF39, + 0x0A24DA3A41B718F5, 0x4A4799828818A508, + 0xE3E5A7C64CA2C6ED, 0x04F3056B70C6A3D8, + 0x83F7E01C7B769A26, 0x88C9919A1451692C, + 0x85535ACF97FC0969, 0xEA84BCAF575D23A2, + 0x085BF80FA50A39D1, 0x0CFC15DCCFB1DD8E, + 0xDA62027C8BDB326E, 0x55A2E6FFFE7F7725, + 0xFA4EFC79F69D4F07, 0x3C20070426E380C1, + 0x50969B9B89ED5738, 0xF1B29AC1D252AE2E, + 0xD49F9B0955C367DE, 0x0FDCFECB2EF2BC1C, + 0x9DE5D2F723575ED0, 0x4F4CDBEAA08BA6F7, + 0x7A983AA9DA2659ED, 0xA3F889616F181A2F, + 0x30785D90C956BF35, 0x8E8EB6E4CE93A156, + 0xCB0360EFEFB2580D, 0x75AA4A2F7BB7CEB3, + 0xC45CCDAAC9221CA8, 0xB0307F369363B547, + 0xF53E48461B71EECB, 0x7FE1AC33036F744C, + 0x8A876A65283DD7D7, 0xF153D8DD47F1DEBD, + 0xAB58C27C2E6123C6, 0x4FC4B4B6AA7B8FEB, + 0x25E68244B0177686, 0xA895817A0CF4BE9D, + 0x9222F300BF8354FE, 0xFAAC937BD592488D, + 0xD7D0B00177485411, 0x2980F994F20D094C, + 0xFB199266061F820A, 0x7F7C4140C3E76991, + 0xD8515F5FEA14CB3F, 0xBD11ACD80727BD31, + 0x52BBA29D5EC69356, 0x26DC5F26E903E3F8, + 0xA1E5E0204A6FCC70, 0x12B0E19A2C17175F, + 0x513403FB9C56211F, 0x75AE23FD9355C8A0, + 0x1DDA078D12879EEE, 0x78683FED1CF3DDE3, + 0x19E00D7322C6F85B, 0xA94D73025A15AA96, + 0xDAADFC590E370AD4, 0x1E05A25F13C496A6, + 0x172F75B6EE2233BA, 0x9BF92537E6D082DB, + 0x7660C6E75D3A078E, 0xEA1C75B13466424E, + 0x17E0198B3882C2CB, 0xB6F16D6A27B1F6AB, + 0xE0130B41D3CF4574, 0x0FB1E3F3937FA202, + 0xFB3272229A82C759, 0xB2C86D56B1F1A1A2, + 0x4E096588B13FFECA, 0xD7BF3EFD7B2022EC, + 0xBC5115A5A939DD15, 0x4296541F2A4F9BF5, + 0x0395CB47B022E62C, 0x6F3336192F4A3B92, + 0x49733E92263139D1, 0x47D0DDD8833C5E5F, + 0xC14BD9F5337219B2, 0x42923E7C99D8B62E, + 0x7A73D05A607734C7, 0x41B962F38B0DF531, + 0xEC0C1D4922AF9754, 0xEC0C1D4922AF9754, + 0xBCEDB009461DA156, 0xF0783EAFA8892870, + 0xDA488F299A5B164E, 0x5FCF063A203DAE86, + 0xCF61D4B4702EE9EB, 0xC1C987F7EC21C39A, + 0x7FFCBFEE44ECFABF, 0xBCDB5523C94266B4, + 0x977CA98939E82E4B, 0x23AC95D6423AF731, + 0x70FDA869F3317EA9, 0x7F827BDD9A88B58D, + 0x692D808C34A82143, 0xD794C72FE1D7D033, + 0x3669F1B198DCAA4F, 0x803158F310875408, + 0x387EAD7EE42F6685, 0x32A0EF990D0A65D5, + 0xA018A12E5C5C2FA6, 0x7807AB191CD252A2, + 0x8C338E0263E4FD19, 0x09BE126FE9C3EC70, + 0xD414BE129BB81B32, 0xCBDDFD4D849C7D23, + 0x92D6A88E64A94430, 0x6BED7510491CAF98, + 0x9A9112A0FE9A4713, 0x75B58B38E45C6F9A, + 0x96A05E4FB321B1BA, 0x9A7A47D4742E250E, + 0x0F1A4B45B7693B95, 0x36BD33135ACDDB37, + 0xA66C71C98D5F2CFB, 0x33B36D543F6B18A6, + 0x6A60E43998228229, 0x34ECA449F778AD6E, + 0x0A6DB4965674D243, 0xE5113E3AD074FF61, + 0x831E0242595560DF, 0x6178A36ADE734254, + 0x7F08E26039C7347C, 0x1CEC5D2C507199F5, + 0x3CF48F6F96E749DC, 0x189082ABE7049A9F, + 0x499EF20C5DB25C59, 0x40C9B7E088D3DB1E, + 0x6E192E33AD436366, 0x79A5F44F7E7FA63F, + 0x480142959D337D00, 0x0509CE092AC81B7C, + 0x48F44967FA05CC1E, 0xB7EDA69A6A5C7562, + 0xBEC0816FF5ACBCDA, 0x8C30521E66F119C1, + 0xF41B5D290C99A3D6, 0xBF8779A4D7A9658A, + 0x127DE7B20C60A6A3, 0xC41D8536E6C7AB54, + 0x66B59CFFD78467AF, 0x37612007604356A6, + 0xA75CCF58A60A5FD1, 0xA4A4F19A5475EDFE, + 0xDE81239437E8C5A8, 0x7DCCFB89D354AD2E, + 0x632A689BF42301B1, 0xEACCD2237F51AEFD, + 0x46E9AE36D8FA6417, 0x4BE697D014536271, + 0x6D8EAC07506291FB, 0x953D651268784E4E, + 0x07116E24E9D1929D, 0xD72C3BA5CDFD4574, + 0x7167371E8AD747F7, 0x55789862F4706059, + 0xA135AC892A58FC07, 0xB2714F704FF7BE6C, + 0xB1577667C3708F9B, 0x5738B4835C9D6C70, + 0x3F9F16F8E65A7ED7, 0x074C52E93785CBDD, + 0xDAF80797FC534BEC, 0x0509093E7710E322, + 0xFA932DE350266EF8, 0xAFA5A65F1B3A31F5, + 0x6C60394CB4F75E9A, 0xE88D22E4AD97F56F, + 0xE28E54788CE8F12D, 0x6C9038EC46DA62DE, + 0xAAA34F8A7CB32098, 0x16D66F11FE644901, + 0x418DC16FAE452C1C, 0xE9602D5637436A51, + 0x88BC673CA9E0AE99, 0xCD468C04A2A0BBE6, + 0x5DCF6C5CAB2E9BF7, 0x16134AB5E733EA6A, + 0x27040C25DE6CB2F4, 0x8706A6A3C7549518, + 0x113750538FA31298, 0xAF18C5D546F1B022, + 0xF9F2922717B819EC, 0x1C0BEC67EF1D80E1, + 0xF06A6F41CB445443, 0x9EC494C67ED8E15F, + 0x9F243D3919F442FE, 0x9AAA60D60CB4E5C7, + 0x781B3D62BB013EF5, 0x77CF3E92F49E693E, + 0x8BB4EF4214E0E6D5, 0x64093E028DB051CB, + 0x80EC48E6679313F9, 0x21C88062F3ECEF83, + 0x74A0FD0688F1EE45, 0xDB0EA6C57DA7FBB6, + 0xB096419DF0D06CE7, 0x1012C4215A037B41, + 0x534AEBA6E5ED4CAB, 0x95BE01470232BFD7, + 0x3D42B92563939375, 0x1780951D345B980F, + 0x5983BB449D7FDB12, 0xE0EFEBF2703510DB, + 0x1CF38D529D7441D9, 0x9FC896A54C21FBA1, + 0x5B0316762AFD4A64, 0xFD59FF1730640DCC, + 0x5CCE68DBD5FE93EC, 0xE02F00A88DEA7AF8, + 0xD718A22995E2B4BC, 0x4D63B727F53E09E9, + 0x2F41D51BA3BCD1F1, 0xEC7B86CCE3CCED42, + 0xE12ABE5E3A389A6C, 0x4901776E8778845E, + 0xD9B86B9872039763, 0xB8A6B45D80C435DE, + 0x61F95E5BB3E0A8C6, 0xCAE314FB12D13AF3, + 0x673966A0C0FD7171, 0xD4D9128A76AEFA14, + 0xAAE7CE1D63167423, 0xA944664D6E32BDF8, + 0x13D2B8ADD79640F2, 0x942C8DFFBBCB3EB4, + 0x397DC58FF00298D1, 0x091D6114DC63264E, + 0xC6941B4A3A8FBBB9, 0x06ED0D3AF6A366B2, + 0x0BB5CBDDD0F25AE3, 0x0BB5CBDDD0F25AE3, + 0x32F34FF7F617643B, 0x84474F93DEB68E33, + 0xCD5003B097200F36, 0x4A94160BCA2AA1B0, + 0x90370EBE0FEE1A3D, 0xECFB0C5E2DC55F26, + 0x494C8FB299290269, 0x645283A19E3F497A, + 0xDFFCEF48E511DB48, 0x9ED081CA20FD427B, + 0xF2E1A7133DD356A6, 0x8AEC745BBA26810E, + 0x758A5C1B3B1E1990, 0x6C2486BC5ECDDA14, + 0x89215EC747DF244A, 0x7B679A34CBECDEE2, + 0x1017582BCD3832DC, 0x4EB3ECD73955E6CC, + 0xDB172424876553F4, 0xF310607047A538D0, + 0xA9D1795CD5043663, 0x022439E5AA6F1B87, + 0x9C51349BE6CDFE2C, 0x07AB8C53F0D76F02, + 0xFDDB234CF74073D9, 0x81BD72C1DB83D0B0, + 0xE36A25322DC35F42, 0xDE09F11B6B75E1D3, + 0x452419CBD838065B, 0x3B94A91989B44823, + 0xC7848EFCCC545182, 0xCD29B8E8A95DC63C, + 0x8C95333CFC3340F3, 0xA1515A94D43946F1, + 0xBD605B8E0E18B3BB, 0x1171BCC1B3C492F9, + 0x5F048334B4A4E774, 0x369CEC5433299F67, + 0xAA76052DDA9BFC3E, 0x1DE4F7D5C80DF527, + 0xC0AA53F866B3134D, 0xA31E36AA85AAB180, + 0xC64A06D939F826F5, 0x07272A9E5B67C603, + 0x36AD3E690DA5ACEB, 0x3BBDAC5E9B0709B1, + 0xD0917A423314BBA8, 0x34CA26F4ED7992F0, + 0xAE51BC858F32BA66, 0x0EA07962994F9247, + 0x14D6F5678D8F1B37, 0xEE77BC5A16EEF2B4, + 0xA0FD21BED61E5C4C, 0x90E8CF462ABCC154, + 0xFEAD16FC8F9DFC0F, 0x77C93760E03360B2, + 0xD972E4BD7AEB235F, 0xD77442BF501ECF27, + 0xA60EF3B6461A4D43, 0x7549990B242DCE04, + 0x82377B65E943F72D, 0x921B6565C9D63463, + 0x8B6817B71B85EBF0, 0xE0B94A3AB208A624, + 0xB9CFD27A5D578D83, 0xE4AD5A7B544DD431, + 0xB1D2BB1E1631F5B1, 0x78309CE3B999A279, + 0x0A46AF8A78DC5E0A, 0xC791F56B98D3D9D6, + 0x5EE2CAFF7F17770D, 0xC7D3E81BB22FE187, + 0x4A7D6E727F941747, 0x145AC4C26461DAE7, + 0x869DAACBBE9FA006, 0x538212CD1F16D9F3, + 0x72EB7BA9B69BF6AB, 0x25C60E2F2C151A81, + 0xA628A745E2275C5D, 0x4370D48F809E512A, + 0xE6CA85E7259CE16B, 0x4F040A5AA81F7745, + 0x8A7391690F5AFD81, 0xE34405F82AAC89BC, + 0x5AAB586FFEC0FD96, 0xAA87C426DC96454A, + 0x1A6478B61C6BDC3B, 0xC7D18C6E194A37FF, + 0x9E6542F0CE8E70A3, 0x3BD7A59B7421B60A, + 0xA7862BC5ED1DFD7E, 0x8B3C0E7E0A6C36DD, + 0x1C186837D0619335, 0x37A2D5DD137657EB, + 0xB203913733F27884, 0xD42C61FB1ED0D399, + 0x83CD99A1E6061AB5, 0x443E2CA72E118E64, + 0xCF511840CEEDE0CC, 0x5DB36020C0F8121D, + 0xA72CD9CA74A5ECBA, 0xA5030CC1B9A0FDA6, + 0x5ED0356A0CE3A34F, 0x1053A983A6454EF7, + 0xC8E1071177A23BE5, 0x085C8DBA86EA7B0B, + 0xD821490579791273, 0x34F105C2014A6155, + 0x72C896464915D1B1, 0xDF10EF4F35BE7004, + 0xC514825C507E3736, 0x17952AC4A5BDDC32, + 0xF75B0D629E1C063D, 0xB1D85A6C23F2F945, + 0xEBD3205A207939ED, 0xF061544983150CF6, + 0x047CBED6F6F8B63C, 0xD6AEC66068602CB3, + 0xEE51858FFA863B3C, 0xF131DD59E5659796, + 0xB13DCB4C6FAAD238, 0x69C541DE38607868, + 0xB17BC6453F6CF5AC, 0x9D4D8A6D8528088D, + 0x0E5173C163976E38, 0x8EA85492561F6FCB, + 0x8C8D2739BA44AF0F, 0xC01832EFF7679D9E, + 0x160AA1B32F6139B8, 0x8E492A20859BE285, + 0x9DD368BF06983221, 0x9B25F77587646D08, + 0xCE2F5FC3AF7E8C1E, 0xE4A55359AA2D44C0, + 0x6C38AF3693A69A91, 0x1AB30A19F1212DFB, + 0xA1C996C2A744262E, 0x9A4D66075F24B29B, + 0xB2AFF10216DEFA2F, 0x8DCD395092231395, + 0x9E5B5E4D2CCD2259, 0xECF7E98DC0299BA8, + 0xFFC24B988B938B38, 0xB6E26A0DD88BE958, + 0x973D76AA760A6CB6, 0xBCDDCD95181334DA, + 0x583BE370B1EC6EB4, 0x056B105D1C09BC44, + 0xA7A932170592B50E, 0x0E8572B08CEB6A11, + 0x11E79CAB7183B6F5, 0xFCD817ABBD55A233, + 0xE369A5783B866016, 0xA4ED480797ACC4C3, + 0x34AD89078831A4BC, 0x3A28409F83158983, + 0x7D304C1C955E3E12, 0x864557F89941B870, + 0x7FB17BA2E7DECA5B, 0x07F86241B74C1BE9, + 0x629BFA74418D6239, 0x795957CD3A0042C8, + 0x405DC2AEF6AF95B9, 0xBF23B723720BC1A6, + 0x77A5B103C87F476E, 0xC51E8EBEB2F5DF46, + 0x7651BC64AE59E128, 0x7468E50BB8E0B26C, + 0x85796B0549DDE156, 0x54BB19ED9F90E1E9, + 0xE2A99A9B524BEFFF, 0x9046783C7B581580, + 0xFC481C641EBBD27D, 0x1225E24ED5B83AA1, + 0xB98236CAAECEF897, 0xAE9FE38DB6527FDA, + 0x4D79439A6B55AC67, 0xE8FFE38E2BA32BD6, + 0x8D7A43EC6A5FEA45, 0xC1E358FAE889B078, + 0x5F6DF3D92271E8A1, 0x9DB0FF48173505E9, + 0x810E8431C0614BF9, 0xD699DB7515D82955, + 0x4C815EB175086F84, 0x57266BDC016595EC, + 0xE4E6DD5566D28C82, 0x3E60BEF5F2687403, + 0x7E17BE53E1AAABAF, 0x0AEF9B8AE42AA0CC, + 0x9B62392B474F44A0, 0x83119D7B5F26F8EE, + 0x1CDD6BADC297830D, 0xE66018878024055F, + 0x46E56A7CD1D63C3F, 0xA3C18D59CCECF120, + 0xB251E0B33E58B424, 0xD75F380668C5172A, + 0xF9D9F7F2DB8E2FA0, 0x6C971F137BD53E13, + 0x433083750C5E064A, 0x1A1227D4CEE3DA07, + 0x425A44533437B64D, 0xB868E2BCD1CF7446, + 0x8C33220C8D78CA0D, 0x3758C0A3D7DAE8E8, + 0x5DEBD9C4DC995692, 0x0F262E4A13AF8A17, + 0x2DB492222FB21E26, 0x2802DE2B1DABE4B3, + 0xE03B3F2D3DC59B64, 0xBF779C7C48AED2CE, + 0x6A445B64ED7ABEB5, 0xA7F637471B836C1C, + 0xB6E6FBA95C7324AC, 0x9A347B86DBED8192, + 0x282B6739644F4347, 0x264CC3ACB3E22302, + 0xB1906895227793F3, 0x06D9D408BCA67107, + 0x595F028698072DD9, 0x68E0E843A17D2933, + 0x76A18844E743BF91, 0x19DBE2713450D968, + 0x43D3807C077261E3, 0x90ED32458AC2D129, + 0xC59F528E9AB9F339, 0x3E2C7717C449F4CB, + 0x02AC28F3A01FA04A, 0xD66C7D8F6AD07EFF, + 0xD8295AF639FD9CB8, 0xD0F7511EBF198472, + 0xBAC7FC81A75EC1A1, 0x94B9C0AF4E5E520F, + 0xF82D8F1926A02C3D, 0x863490667AD88563, + 0xBF29516833893561, 0x9F0A7609F6A33139, + 0x2F9D3834AEB9EF79, 0x357A0E3F30F7405C, + 0xFEDDF04D62B8D790, 0x57213F964A9AED0A, + 0x16350528F93024B3, 0x513390158FC17713, + 0x10FE3F1B79F9B071, 0xE51D1C588E8D869E, + 0xA4A9A4C40E615885, 0xFDE82B356E763855, + 0x01A898D26E2333DD, 0x297D19A25D01587C, + 0x9A294B2138ABB884, 0x0358AFF5157FE26F, + 0xD05A3241B9A86F19, 0xE9EC64F61CDF2865, + 0xE7FFAE5EBF23D890, 0xDDD5C8D7152E128F, + 0xF35425A4204367EC, 0x8628E9EF9EAE6605, + 0x5FFBDEEC3E8E2009, 0x9327D4C0D6DF2D4A, + 0xF14878FC50BEC6EE, 0xDFC8D37CDA945F87, + 0x1B857666604B1A74, 0x319666C195174A88, + 0x12782CE0A636E9F0, 0xB56EB37D7F914E06, + 0x0E7E72961BA18619, 0x2286C0F02D4FC21C, + 0xDE0F6D7450D37351, 0x75DAF61259A91F38, + 0x2E8D9498C56DD0D1, 0x6F88E7102828619D, + 0xF0210268DB0974B1, 0x3A27345E11FEC62C, + 0x71862B1D855F32E1, 0x551AA2E1D1F02037, + 0x68D353AB88B97E0C, 0xF83A44987BB6723B, + 0xD0AFAFF5A51D72F7, 0x718D7E2874638F6E, + 0xCE5AA445ABA8DEE0, 0x484BAECBAC8BB2D6, + 0x2FDFF4107B8C1147, 0xD92AD5D288AE7AEF, + 0xDCD2A934D65CB497, 0x184595D8795BDAB7, + 0xB282DC6EBD803C75, 0xFA13CA7EC498AD09, + 0x32C27A11307B01CC, 0x32C27A11307B01CC, + 0xAF754F20EB5CD51A, 0x782123551A887409, + 0xFC859E2374407556, 0x4AA05D0E8631839E, + 0x40FCE03E50E8DBE8, 0x218EFF05BEB64B10, + 0xEB9DC3C7D8596C46, 0xED4E91A1FC7ABBF6, + 0xFA336E7F40C0A0D0, 0x2BC717FE20953774, + 0x3311E47B91EDCBBC, 0xF8CB06E00EDBA43B, + 0xD4A7A435B3710D05, 0xFB44C7751B8C01F3, + 0xA200EB1EE790F448, 0x684B55BC7BEF0475, + 0x71A5C1DBA060049E, 0xD8F926AF2B16BC6E, + 0x4BA4E2553AFEDC2C, 0xFB72730C92FB0683, + 0xEBA5AD3A0EAF7121, 0xC38B8359D17794CF, + 0x075F1D57402C93BA, 0x420B496D49AF95B0, + 0x41CA5A33160EA4AB, 0x68DF9672F12076C3, + 0xF2CA003F167E21D2, 0x38299A1DE43667DF, + 0xB33E291AFA6BD03A, 0x6C4C1F2A776606FB, + 0x8DC39368BDD57755, 0x2510DA2AA9F929F2, + 0xD76B57B44F1E6F8B, 0x28A5BAF912B4E14D, + 0x1F7BC3539F9E0224, 0xB516D9D28E68D0CC, + 0x629526ABA383BCAA, 0xF866AAA65C534174, + 0x57A995FD75D37F56, 0x23079539E0E789AB, + 0xE7E4C198B0185900, 0x29686D628C8C6B94, + 0x113E6E3E50E286B0, 0x86686BE9A54544B3, + 0x35A1B3E1D1315CFA, 0xCFB7E771D1F36AB9, + 0x373EF409B82697A3, 0x93E4B869B1365F01, + 0xA01B8075D8B92DF4, 0x51735DC66B23289F, + 0xB721981B2B939E07, 0x224DC27751363908, + 0xCA2C8073411ECDB6, 0xC803417D7BA5DA46, + 0xD8F66A3A60C62153, 0x5F0847A02025CAB5, + 0xC449EDED9D73009C, 0x9065E9E298F1BC11, + 0xE404BFB981665BF0, 0xA1F8BFE155D4C8AE, + 0x6F361B8889A792A3, 0x02F0A29E75BCFD89, + 0x120C48C614909FA4, 0xF1CD03C04C960208, + 0x3288D8ACAECD2AB2, 0xDB5C5980B9AE89B9, + 0x613F125BA3BD2EB9, 0x6426BCD3A73D86E3, + 0xC4EA073D86FB29B0, 0xD8DCEA7B6A249141, + 0x5AE99C571D5BBE5D, 0xA5C82A39FF8ED272, + 0x816F6981C60BF53B, 0x1EADA8BA12D47EAB, + 0xDF6CA0330F2E737B, 0x2B2F5E069710703D, + 0xBE509B0A3693DE8B, 0x714E1F9244049E13, + 0x6FA46612594F7973, 0xDDFB0D5F3D3B74AA, + 0x6E16BC2503FF1FF0, 0xEFC7485122683888, + 0xA328A24AAA6B7FDC, 0xEAB32453944897D7, + 0x9AC92EED5E4793AB, 0xF2317BDAE5CFE9EC, + 0xFCBDCE714A7C88E5, 0x964C4D363AF812CB, + 0x1072F115DAB0717E, 0x09B576C6F15481A9, + 0x272E4723B56A3B96, 0xADAE2D0345EF09F9, + 0xCA97246103B63917, 0x930F75DAF7DE892B, + 0x107E5CC7CA942BC1, 0x37B1DA354EEDBB19, + 0x0C82D21A77C22D49, 0x0715F98C82D7804C, + 0x70DB57649FA8D0D8, 0xAFB5FBF26893A713, + 0x851CD923176EBA7C, 0xB2694775B9BB370A, + 0x0AD9710CEE2F590F, 0xBF6FC7E8EB3AD582, + 0x577D1284D6873711, 0x543F5B2D3F90CA6D, + 0x3B4BF5F0859204D9, 0x24E69EBB41C92968, + 0xBC0ED94165A48BC2, 0x2EB33FFA32BC9E49, + 0xC7034807558DDFCA, 0xD7A2BD167E26DCBD, + 0x2D95C7E2D7E07307, 0xE49D47C4978CFEDA, + 0x4962CC4AA2F345B7, 0x464CBD2030324A08, + 0x377906D8A31E5586, 0x3876E9B099B1F669, + 0xE39B4FF4FDEBDE27, 0x1BA17238F2579830, + 0x9A5BD1D0000B339C, 0xA03008C535D954D1, + 0x1A9205C1B9EE827F, 0x3CBE9F07524C242D, + 0x75816577FEA6DAD5, 0x851159CB723550FF, + 0xDB34E8D56FC13B08, 0x61B8401CFD1B9F42, + 0x23789E777D14CE44, 0x8699E32382F19A35, + 0xD3DBCE61A490BE02, 0xEDC0317C5B604BB1, + 0x2ED7843F8F801023, 0x02B23FCAC192C764, + 0x6E4361FF3E8CD7CA, 0x493C7A4C8597F9AA, + 0x897433D292B44130, 0xB4989F41D2C06478, + 0x92CCC17A7A2285DA, 0xCFAAA15106D94EBA, + 0x1CBA05AE7BD7EE05, 0xF88028E143C04565, + 0x75627043C6AA90AD, 0x75627043C6AA90AD, + 0xDFA80CB25D0A19B3, 0xF4F292B695BB4A6B, + 0xC219887CA3E65C41, 0xC219887CA3E65C41, + 0x0BD04E29640C9C12, 0xEEA5947010767C07, + 0x7792424AA0EAC32E, 0xD6FD02EB2524EF2E, + 0x5E29243FB56FC6D4, 0xC14EEEFD0DE24816, + 0x57D9C12635E25CE3, 0xDEAC76DD3EF26CF5, + 0xD8D19675ED5FBDCE, 0x461AA308E0671334, + 0x965FEC691D55E9BF, 0x183EFFB68DDB82B8, + 0x8B05F884CF7E8020, 0x02CB367B94919576, + 0xC0296A2EDF545E92, 0x3F1DFD4C1BC6827A, + 0x2605663BD4F23B5D, 0x2851A0E816B8224D, + 0x219C7B8D53E429FD, 0xD1F051AA4563F197, + 0xCD17B554996A8D9E, 0xC1C1DD50A15984ED, + 0x350AA5EBC03D3BD2, 0x7397CA13EB94D4F8, + 0x6856EC3D35C81EA4, 0x2A4792B4A5345767, + 0x86255B1FC929E33E, 0x79BAE55E12B4166F, + 0x102E68B2024D536D, 0x817486F19ADBF54A, + 0x83F969AA1EE2A664, 0xC6F40BA22FFB861E, + 0xC3981DCE61D9E13F, 0xE862092047FB4664, + 0xE6D2CEDD370FF98E, 0xE6D2CEDD370FF98E, + 0x69DEA3E9DB727B4C, 0xCD3872DF8178C437, + 0x5E9DAF5A20F15908, 0x861F6CF5737A25A0, + 0x0F804F1DB19B9689, 0x880C7B361C9651EE, + 0x47EFA040EBB8E2EA, 0x1D8D6C003EA41000, + 0x9C6A6C19B6C0C496, 0x8BC66E032ABE9917, + 0x125494B98A21AAF7, 0xA20DDC56BA00F4CF, + 0x60DFD0691A170B88, 0xFBDBB3A9CC11C141, + 0x97A770BEEF227E2B, 0x0BF83D0ECFA5E8B3, + 0x57E457CD2C0FC168, 0xB800560AF60FDD2E, + 0x85E5F8B9B898B20A, 0xFB401B1506713938, + 0x338E7EF52B6095A9, 0x1386F8ED2538D9AD, + 0xEA61CA8E80F09E4D, 0x0D3D2F85785A0774, + 0x265559DA40B3F327, 0x55F27BAC7AA4268A, + 0x1F2AA07F00B3217A, 0x7D867CDA26E248C7, + 0x30100FFEDBF27149, 0x8DDFBD421A77B08D, + 0xD2936CAB8B58FCBD, 0x192BE90F907C8B59, + 0xDA1F1B7BE1A8766F, 0x5A285FA439798845, + 0x539E0AE3E6634B9F, 0x04F4D55F2C0C756D, + 0x163F8B586BC95F2A, 0x8247BBE4CAEA2EB0, + 0x65499865FCA6E5EC, 0x5699E9B3CCDEC570, + 0xF28965D04F570DCA, 0xEE90D1369E1800A2, + 0x03E8D3D5F549087A, 0xC78A38E5FBC66080, + 0x53E0DF1A2A3CF0CA, 0xF544C3F7E668A8C9, + 0x5D5479D115290C3F, 0x428E53309485BE70, + 0x99AD4CCCB128CBC9, 0x9A4BAAC703AD5640, + 0x595583281858626E, 0x188CBF668898CFC7, + 0xA9DA48FAB8A76C12, 0x70A98716ED8DB49D, + 0x428EAF89E24F6C36, 0x98973035271812B9, + 0x6EF54AB721DC6242, 0x41D48F6479D67520, + 0x845333B3150583AB, 0xD747F45FE077D093, + 0xE86051786B66CD8E, 0x738A74C5899697B7, + 0x5D511E3867C87139, 0xC1FCB6CC23926AD5, + 0x814C9D19DFD69679, 0x565B81E7D0A1F131, + 0xBE70724027F85BCD, 0x70B2AB1977EB9053, + 0x43D1680C6D19A8E9, 0x0A724CB5F1AFE50B, + 0xF943A28F544BC6B9, 0x1707C9122D9B277E, + 0x1888694923EF4591, 0x9BB49B018CCD0998, + 0xB3F64A6A91432477, 0x866C393BDBFEC349, + 0xEAF4CD9EA3E7E922, 0x0E497F28E1A4E3F6, + 0x9B9039DBF2D258C1, 0x7C2C92774A8AB751, + 0x1B1E2A40A65B8521, 0xE7CB037D79E07953, + 0x25FC3E33A31AD0C9, 0xAE318EBBA4884F73, + 0xA80AE305E0A3044F, 0x1D43372AC14C8C87, + 0x9E30E91FB03A2CAF, 0x1DC8EAC8393169D4, + 0xD4C4642CB7F50B5D, 0x480621E4B2C11985, + 0xD0F64B265C8C8B33, 0x0A0EDA6028815477, + 0x6058665D72302D3F, 0xE8BB55C193F7573E, + 0x02C8E5B49848664E, 0xC1085DC8A8C1737B, + 0x659F9D71F52843F8, 0x639B7CD72B9C2F9C, + 0xD3A10FC7FD8D98CD, 0x929A5581EA45D584, + 0xDBC86D85C5059461, 0x788D7D07A306D99B, + 0xA65568121DF2EA26, 0x04C87DD342542625, + 0x8421EB4DA7E391B9, 0x7386EC6B0DA99122, + 0x8AC862B0B32C5B80, 0x10AB34B5B238C288, + 0x364DF566EC833DE2, 0x7979149EE8FE954D, + 0xB335F761606DB47C, 0x18CE049BD4711A52, + 0x058F43EC59A8631A, 0x7E133D180E939D29, + 0x9414E18B9434C2FE, 0x759AC27BF6C1426E, + 0x11FE353CF9733E6F, 0x065C4AC221E84405, + 0xD8B9A8AC5608FF94, 0x52A935C3774D2C0B, + 0xD1C7CB175E012964, 0x5D681A62E4D4BEB9, + 0x8204DA7934DF3155, 0xA4015D867CFA0B80, + 0xB0034A223497FFCB, 0xA300BD5F71A8C704, + 0x26324F33423F3CC3, 0x50751F8ED009F5FC, + 0xD16C2AD6B8E32854, 0x83F92F0DDD94A22D, + 0x6EB5F71AA68F2E8E, 0xA7988ABD4140D469, + 0xFB18DF9CB95E0105, 0xCBA7D7A5D703143B, + 0xF2385935BFFD4D92, 0xCB2C157C106EA694, + 0x9438F7AD68771A20, 0x2978CEBD6EE3E821, + 0xB7C6D80FB371659A, 0xD2C7B0F3AA22F180, + 0x61BB1D9B3A95D802, 0x0F33095580A670CE, + 0xDD9B9B385AAC7F5B, 0xBA7E979B202649F9, + 0xC63CD5D2920ACBE7, 0x1896EC0B030A48A2, + 0x7F0E8FAD9EC61A38, 0x60FB75D734CAB145, + 0x2365C388E393BBE2, 0x684B6B15CF038F1E, + 0x1C6CD14A876FFE39, 0xFD232B7DCAA5A304, + 0x0F71DE29AB2258F1, 0x4320DEC8E1D74759, + 0x533A7D1EA58DF958, 0xAFE59F6531929B82, + 0xADD95C7005C4A197, 0x643921BAF5EADA1B, + 0x8A1C8B1738FFE87E, 0xC34DC2DC2423B647, + 0x0653B735BFBDFE87, 0x2AB80D913B690C27, + 0xF30980718C8ED876, 0x4DF58B7B15FFA2F7, + 0xE6F13851780394DA, 0x4A18D92E274BE981, + 0x62D2916F56B9CD2D, 0x17C9AF23E4A99F84, + 0xAA5A7ECE2AA8FE70, 0xB8446EB9A449F64A, + 0x8483E98E8B888AE2, 0x0EB79601C726307D, + 0x7F8F6405F4777AF6, 0xB021B000E378B72D, + 0x1DCCACDCFC569362, 0x5BC0C4A5DB4DFC65, + 0x5389D48EFA2F079A, 0x94A1140124AB6A5A, + 0x82FDE6A57EE4EE44, 0xACDE87C3A0618AF7, + 0xFC4BD125DE7611E4, 0x7540DF45175FFA02, + 0xE1A0450ED46A7812, 0xC01E6A01232A4FF6, + 0x600048C60D5C2C51, 0x7AD551F717F3C168, + 0xAB935175B22E822B, 0x8C6BE3ED9638F314, + 0x27F76CC6C55AD30E, 0x54E8D3B72833CEDA, + 0x28157D43CF600981, 0x2D89F1A81B73377C, + 0xBF0FD6E56C964FCB, 0xD82D50E4AC0D46B9, + 0xD76632D99E4966C8, 0xEB3F4ADC1A80B5E9, + 0x0ABF535877897560, 0x3D55DF95FF454E8C, + 0x27B926779DEB502D, 0x7495432563B8C64A, + 0x5DBF05DB5926D089, 0xE5C58DD2B9D4966D, + 0x0AFCE529F69B21FF, 0x69D3ED93E8C0766C, + 0x6D14CCEE1B40381A, 0x3A08AB79DA7D6927, + 0x61B6775E83C0DB6F, 0x701F3D7B93A13EA2, + 0x9219857D21F0E842, 0xC235CF6E7936831B, + 0x0C0C4E81E1AC60A0, 0x3D68A2625439C18E, + 0x5324A0E3E4CE3570, 0x49D6F062128E1528, + 0xF04FF1EC16ABAE33, 0x79F3DD090B3A464A, + 0xD0EE05FE193646EA, 0x5F39CC95028D4F8F, + 0xDF97CDD4FC08FD34, 0x244F4A3B2437CE54, + 0x2F0661C155AEEEAA, 0x631862A7849C6139, + 0x192547247864DFDD, 0x0D8475829632C03A, + 0x827A5BA1A44ACA6D, 0x7623605A465B68C4, + 0x7033EEFD9B28088E, 0x6268ECE592AA8224, + 0x0BE4BE946463F917, 0xD203997ABEB59ECB, + 0xCC9AA18DCC7084F4, 0xC5C646198F437230, + 0x20B711662962B472, 0xA6060ABCEB1A894C, + 0x39BE7CEA8D9CC8E6, 0xDA727DD48FB63842, + 0xAA74EC0CB0AAEA2C, 0x87FB9C4434EDF1A5, + 0x88E32DB8C1A4AA4B, 0xFABD443EB9AADBC9, + 0xB3B1CB349FF9C75D, 0xDFF488BF6A8FE05F, + 0x79923CD21BECE14E, 0x0466DAD8CA6C1EAD, + 0x4A3DC7ECCC321032, 0xAE44DC80465AC177, + 0x4D982ADB1978442D, 0x2322DD4FBF5E4E2F, + 0x43A66C31C68491C0, 0xD56332194D622ECE, + 0x9BAE5AD2508DF078, 0x71897B7BA7AE4A1C, + 0x247ACBC4ABBC9D1C, 0xB8528B6943DD6AB3, + 0x182F266C2D9E2BEB, 0x8FE37689D07B40FF, + 0x9F65DBC537E59AD5, 0x18576AEDEBDE9DB0, + 0x2C83A9DA6BFFC4F9, 0x636F1F53CC61D2C9, + 0x112942C6E708F70B, 0x902B17700357F3C1, + 0x1FF6BF9A63E5757F, 0x01E24137A29CD670, + 0x6BFB12CE158E3DD4, 0x010AFEBA6F4188A5, + 0x75B18E49607874C7, 0xF3A0482F10C70FDC, + 0x92F0CF722BC4202F, 0xD4DF29F3D7B97053, + 0x6558AC7C17BFEF58, 0x586E414780C0FE78, + 0xA3C53804BDB68ED2, 0xEEAD86874F1030B0, + 0x488043841BBE156F, 0x7A10122733DF87D3, + 0x6EA318C91C1A8786, 0xCE129600BF7EBDC0, + 0xD3A58A12C77D9D4B, 0xCCF741A37BD0CAB3, + 0x7FD8F3BE76F89422, 0x3FEE45D087950D76, + 0x3C5FD37B5499582E, 0x9FAA2C7154E262DA, + 0x570389D1C3DE3C6B, 0x7F11626F2B7E7356, + 0x8E2A065ABDAE6994, 0xFD16A17C144D4EA9, + 0xF3638DAE8C4045E1, 0x1A19852065CF1420, + 0x098AB65B9ED9A9EC, 0x2787E44897C8C57E, + 0xFDF3D97C674AFB66, 0xE7C79E1B8D592E06, + 0x639431E895B9AA57, 0x5F1B1AFB0CA1586A, + 0xD2A207EEBDF9889B, 0x518361F4513E9D45, + 0xCCE94EFAFE5A3D71, 0x57CE058547D78C25, + 0x7CAEC29ECB5DFEBB, 0xF0F58D33BC1F078C, + 0xE9B99B6853181409, 0x40630B05BF423B04, + 0xB80CA294F2F26749, 0x6402BE1719F8FFAF, + 0x5343532C01A07234, 0x86C9FC78CFA91BFF, + 0x60734CC207C9833C, 0x31A156D3D6590299, + 0xFA7C7F0AADF25D09, 0xAB8040759C003B09, + 0x112CEF1615A1139F, 0xD46E3047D3CB2873, + 0xE84EB93729C5F36A, 0x582FED7D44038F71, + 0x16FFE42AB2D2DC59, 0x8A3B6FD2C690C3CA, + 0x11FF1C80276097ED, 0x94F7E80BDFF33F26, + 0x08C2D6C52A3104BB, 0x70B374FDD9EBC3B8, + 0xEFF296097FF1E509, 0xD0C8CC76E86F6B1B, + 0x78015C9B4B3ECC9D, 0x88E684C517DDFD83, + 0x8507BCB710FA6DC0, 0x077B4D0A7F830A6F, + 0x7AFE8FDC10BC07D2, 0x48B81126E2894666, + 0x51F1A8E48C3D2F6D, 0x44608AFE6B9DA594, + 0x6F44CBF56D79FAC0, 0xE645AA05B575167F, + 0xEC52C631A1831C03, 0x9CA39884C2E4F612, + 0x4A9923385BDB9DAD, 0xB967AFE724ADAEB1, + 0xB5074DB804E28CE7, 0x1F0230A9743E2AD3, + 0x826AA586EDB9FEF8, 0x530FB711AE9CF518, + 0x661B5C8654ADD825, 0xF82D990162AFC768, + 0x54CE8AC98E120CAB, 0xF942A67633C39BF7, + 0x995A65F15F581359, 0x976B76120FC198D3, + 0x158EC424F35EC469, 0x198604F484075216, + 0x38C1CB1CB119A016, 0xA5D4FD0055638340, + 0xC906A7DAB05C8D2B, 0x7956E831D8C0C17C, + 0x75DBEC174AEEAD10, 0x4B7B525F9E13CE0C, + 0xBBDF066252829606, 0x44D7AC8A9361B455, + 0x7DDAB28D31FAC363, 0x774CCE68DBB39057, + 0xAC253D7842768F48, 0xEAC90109645AFF9D, + 0x761B0E69AC4D007E, 0x0D703FCA27F27186, + 0x4319E335B71FFF34, 0xFBDFCB1FEA54B885, + 0x428CA6DBD1094446, 0xA2C015B68CE01357, + 0x3D10BC92A4DB1D35, 0x9E6858A319A1F6F2, + 0xEEB7E5D1FEB20869, 0xEEB7E5D1FEB20869, + 0xC6ED9D5092438D91, 0x9783B77820E7F699, + 0xA19435F193E081AC, 0x63316D59F2B56D9A, + 0x66460DEDDD417254, 0x0DC4BDBECF43BAAB, + 0x0150B6FF25A9E2E5, 0xA57E87581B32C62E, + 0x1A6CBB06E2D0D79D, 0x097DCA9DA223A91B, + 0x6A071245EB0D1882, 0xF0ED372419FE0E70, + 0x6D9F5FAA7488BA46, 0x9B9082138A642C14, + 0x9B12F9A24FABEDB0, 0xE4A6748E7882C71D, + 0x7CFBA6A80BDF3874, 0xA74E37218BD2AF3E, + 0x6F72CD94F7B5B68C, 0xEFF16721991BE3B5, + 0x0A6D923DFFC9BD89, 0x9CA5C07B44FF55D3, + 0x340F1415B68AEADE, 0x2CC47791FA2EA37F, + 0x6E0A5253375C4584, 0x3F4ADDCE584ED2DE, + 0x1DD1F58F493F1DA5, 0xD7295BAFDDC65BFE, + 0x51210CED3DA1C78A, 0x8954E9D0A9F6F8CF, + 0xC8A9481A01E63C28, 0xD30B1DC5605A4D93, + 0x6671F3EEC681BDA1, 0x6D2DD90EB5862871, + 0x5BC448CB78FA3E88, 0x3C3DD4D53CF82FCD, + 0xFDD85225B2DEA55E, 0x17D3BC66D3879B6F, + 0x6F1554B0CC2089FA, 0x32DECC1CF6F6C11B, + 0xBAC038F7459AE5AE, 0x0D9118860A976DFD, + 0xE8854A4326B9E12B, 0x5C679902079A7E80, + 0x442E0A7EDE4A738A, 0x471C98FD94C0A5FD, + 0x5BC62EC1937B9E5B, 0x10788D224B2A2D63, + 0x2622E35B77D3ACA2, 0xBCF9CFE51F223AF8, + 0x8BDC7BFC57A81E76, 0xF3E259C0E75D235A, + 0x39A5FB7EAF150840, 0xEFCBADCBD14F960F, + 0xDA947AE8880D5C18, 0x397219826D0D02DF, + 0x4008EDF7D6E48175, 0x6B7AE4941C468BBD, + 0xBEF34B1D9624D5DD, 0xF526B32566D0BEA2, + 0xA9B61A329BFDCBEA, 0x2A239992287F3DF9, + 0xB195FFA8042FC5C3, 0xA46C42B60F7890E9, + 0xAA135F9482C82CC3, 0x0031CE6ACFF2F400, + 0x3795688A307E1EB6, 0x10BF53672C1492AB, + 0x98D18905BF723B99, 0xF4E9E5E4909D05A9, + 0x91EF34584710BE99, 0xE7C19BED624A12EA, + 0xF1B760881820C952, 0x0BABEFEA577FCFA4, + 0x1CCC708F0F850613, 0x9872617EBA0D15F2, + 0xDCE97BDF8A0EABC8, 0xD5F61E0ED1580516, + 0xD9175F941610DB54, 0xA1916C23737EC7FF, + 0x5B9E023DC6EBEDC0, 0x1765E713ADD81F0C, + 0x9D1224004B3A6707, 0xE1D1E88EEC7965DA, + 0xDC64D2C53493ED12, 0xD6B5F39048985638, + 0xCA4CEA6AE0000A7E, 0x116DFE5AFF3A45E3, + 0xCCF71CBDDF5B6CB9, 0xB6A0570F8911B3C1, + 0x8A7B3952DD64D2B5, 0x0A211164C5B26846, + 0x659427E0EF36BCDE, 0x7B5530AB21BFC748, + 0x07C61676E5BB52CD, 0xC7FE3513E8973BA0, + 0x668FD40BCBA5DE48, 0xA501C57DEC0914D4, + 0xB1252E3E59A82AAF, 0x3F54E610A389A589, + 0x28004F88151E03E0, 0x971223096C6B5513, + 0x48F069265A0E4BEC, 0xE80AB666DDD7D1CB, + 0x06EE9048FD080382, 0x1F860979C9E7CD1B, + 0x4334BC40AA0CB4BB, 0x01214190405F438E, + 0x6D38F1F04CBB37EA, 0xFD1CE2B6AA9C0F57, + 0x28D3FED7190D3A0B, 0x2AB8EC6521549BAD, + 0x7FB218262B810701, 0xFFE2CF1579FA5C68, + 0x6D03BFBD643B2A02, 0xA290AC8692B13D89, + 0xDC2BACD920D0A0DD, 0x98BC84B983FF3EDB, + 0x2B5E102E4A42F2BF, 0xE450CBBDD189D96D, + 0x88B588B41FF7868E, 0x22744DB3013A8452, + 0x6CD79468A1E595C6, 0x0C7C436873368EDB, + 0x4E209B2C1EAD5159, 0x97AEEA04505AFDC3, + 0x77FE3402004CD1B0, 0x892F548509B863A9, + 0x80EAD8E2E1D5D52E, 0x3B17295029166399, + 0x2D34FC3BC4ADB780, 0x7D9E9A30FEC1F2A4, + 0x2E0BF682CC778D49, 0x4182F8A88224D46E, + 0x9FDA1B3D7E7028B3, 0x1ADBF00B482AFCC6, + 0xD821056B9ACF8052, 0x590609DBAADF5EEE, + 0xBDB6F89C729CF388, 0x8BE945146B77ECBA, + 0xD47A2C1BA117471D, 0xC2261AD438CE2145, + 0x14E56BC5B5DB6A19, 0xE63C77B605D7BE3D, + 0x44A0870B7E92D7C0, 0x93500360FCCB65F3, + 0x52B4829281364649, 0xC30772A137E70C2B, + 0xDC53FD41B4ED944C, 0x10B310C43BDDC8CF, + 0xED640017ED337E45, 0x470F5D93F0C35D3D, + 0xC2DB6B6708350ED8, 0xEDAF90EB98D31F52, + 0xD68A5FF8A3A89874, 0xB27207FBF41B1AE6, + 0xFCCAE5B92A830878, 0x4131C705AAC1EA0D, + 0x16B5E274BDE402F8, 0x5F6CA9A305DB6C65, + 0x919B3C98ED8292F9, 0xF7B1039C59A035F5, + 0xCF3A965906452031, 0xB99E3F8D18D17364, + 0x9EBC85ED0FFFE51C, 0x158745943C39F680, + 0xD1065D68947E7B6E, 0xF29D7F0377E8D386, + 0xDDDF64C91BFCF0AA, 0xEB27A097A9B4195A, + 0x280C7E3AC7F56E90, 0x919DE5BCBF7BAC08, + 0xD3F2FFEB8D836F52, 0x0F0BCF26721C4DE1, + 0x071E2A839DE82D90, 0x48B2358C160F2533, + 0x00A9010CFE1E3533, 0x507B30DD5CDF782F, + 0x784002A632822099, 0x6955634A1A4BB89E, + 0x9C8C6504B5B63D2C, 0xF0DE13DB9B2BD066, + 0x60FE567DF1B1AF9D, 0x4DD24B5EA0757B4E, + 0x6D4CB481FAC835E8, 0xB179F0A65AB74F77, + 0x19F21E63AE6EAE4E, 0x4F62815699141072, + 0xA6A12939F16D85BE, 0xDE7660E77D02EA2E, + 0xEA16670E7BA4743C, 0x91509933324EFFD0, + 0x930F504203F561C9, 0x3C604D8BA54FECB4, + 0xA6EEF01087181EDD, 0xD95F912C71AE3EB5, + 0x1EAE0A6E978894A2, 0xE039C0DD246588FF, + 0x406137F8EF90EAF5, 0x3B3F13C4C5844979, + 0x2555CF7DA5473794, 0xF10E06A6E08B5A07, + 0x46F3ADD1E2D5BAF2, 0x21AEF98387495FF9, + 0xF0077C797F66A355, 0xA874EE24A902E1FB, + 0xE64A3CA08DFA37A9, 0x120FD3F0779D3C4C, + 0x8D2064E5B64A628A, 0xD455094EC5178A83, + 0x9507D4271988E1AE, 0xC547D58DB56BD8E8, + 0x5FFF4CFC74D8FB80, 0x8599CD37AE5778BB, + 0x9541D3CF0D398F36, 0xB04D76ED3835CFA3, + 0x8F8C0E370AE62F5C, 0x47E8C764787EF133, + 0x9FF28D88C766E3E8, 0x9F3372D1D2CEB7FC, + 0xF0B67A4DE6AB5F98, 0x13520157939D4329, + 0x0BF3B3BD47D79C08, 0xA85574BA219BA185, + 0x9A8D700A51CB7B0D, 0x5675C422E6519C64, + 0x2DD7C1DEF56C26C3, 0xE95526D22B02B8A9, + 0x64D779659BC37B19, 0x020339F3DE147B78, + 0x0E4299C549F0D1F1, 0x065D5E228ED256F2, + 0xC5BC038960E9DB27, 0x41BE3F722FC386CD, + 0x39D22031557946C1, 0xC9F09853CEEF29AE, + 0x5C48B75732C8456C, 0xF1E454844FB9EE42, + 0xD9A897A4C6C2974F, 0xB9314D20143CEED3, + 0xAC8C7B9B88C4A668, 0x75DE9525403A4622, + 0x9BECD4B9FEF3F8A6, 0xD1FCDB1A80175C89, + 0xC90D2DCACD56184C, 0xFC3890D22570A26E, + 0x0AD973CA1E077B60, 0xA2C0B5CCE07D44EE, + 0x59BF8C3D52C92F66, 0x510B8B2F51ECC627, + 0xB8EB95E5B4E56978, 0xE0BF3CFAB30C64FB, + 0xDA05194260CDCDF9, 0xACA0E8B0BEF50DAD, + 0x6B76DC1F3AE6E6A3, 0xC595907BB71C921D, + 0xCEDA60A74219D064, 0x4C045B2B5CA92D41, + 0x8269816F6CFD40F8, 0xA9F8B5FD5FFB34DF, + 0xE2892E7E55D7073A, 0x9113A3C615625C95, + 0x9C720776DAA43E7E, 0x6E88C3DDF38550FA, + 0x41BD2A6B006AF756, 0xC502CD39B4994F3A, + 0x52923C4710DD9907, 0x5CD78A8003B19DB8, + 0x393BD2275CEB7793, 0xB0A93880ADC04AC6, + 0xF9B83B77929D8863, 0xD04E96070420D684, + 0x997ABD671D25CA0B, 0xC49311A2A500FF09, + 0xD4D7B033C3AA243C, 0xD1ABD511D9C326A3, + 0x30B4FA1C82DD4B9F, 0xEF13346F42FA56B2, + 0xD705740BB0A1CF4C, 0x5341D6E317032628, + 0xEB2BF817463DFA28, 0x9375EF7AB51DEF54, + 0xD76EEEF746057FD6, 0xAFD4554ABD55837D, + 0x6F972C1AB75A1ED0, 0x6AFD64BDD2C5FBD7, + 0xD2D57F1D764117B1, 0x5E9AD12CB585F23D, + 0xF284AC67940C6812, 0x2C38570AF66E3CE2, + 0xF9B8F91AAD3B953E, 0x62343A428C158522, + 0x796D90EFB19AA332, 0x16D329E799CE6084, + 0xF7DDEBEC43483C43, 0xBF5C5F5AE019E25E, + 0xC6F8AB8A4189CF3A, 0x8DE868D61BE35FF3, + 0xFC04745FBE67C19A, 0x9E75EF59FA74838C, + 0x5A7F62FDA59759BD, 0x2345501EA102B3A0, + 0xF11BC2DD9A3E7195, 0x8F77FF37B3B66EE9, + 0x814FA8BE5449445D, 0x73B97DAD1A2DF572, + 0x4D1CB8DC40208A17, 0x6AA21A3FEB33033B, + 0x7F6DB52EEFC96DF8, 0xB480C9C35514775A, + 0x31F924B53EADDF65, 0x6260E778915933D8, + 0x5063F92F07C2A316, 0xED1997D855A9D9CE, + 0x5D2BFAAB8D956E0E, 0xF830EDF157093631, + 0xA943FD1722E11EFD, 0x0D26761593FC9CAD, + 0x50F940259D3841E6, 0x609EEF618F8CC869, + 0x936E6168A9BCEDB5, 0x7B95B829DF1701E0, + 0x3F0CF9CB7E589B88, 0xE63B3D028FEC1F1D, + 0x477D5D63E63ECA5D, 0x8F00E6BF3D6A18D3, + 0x39E72BC99E6360CB, 0x1BBD0A5729AB1226, + 0xC5A35C73B68F3C49, 0x04C73F4E6576C85A, + 0x91C8E617F64188AC, 0x906F86AA0011D5F8, + 0xDB6708C0B46F56D8, 0x35883A331320C6B6, + 0xFA1E2BF8B10598F9, 0xD8CCA4EAA59D74BF, + 0xEE08C992D238C5D1, 0xD89D6925FE9F861C, + 0x9D3AF56E94C9AE98, 0xD5381DFC7ACB5A30, + 0xA1750FFAFA181661, 0xC79ADA0735BAACC0, + 0xD62A67D26D9653E6, 0x5B99C7B716657782, + 0x846AA8E7D55EE5B6, 0xDC875D459D4CDDB0, + 0x0CB1BE0633C024A8, 0x08D3EECA50D3697F, + 0x2F25D9AEFA34FBA2, 0x4CF7DA5CD93E7323, + 0xE952D6431689AD9A, 0x6120C3E46EE41B09, + 0x0525A2C2562F3CD4, 0x83CB54755AC56E84, + 0x1E5185B72EF5158A, 0x8A54885A635DC8D1, + 0xD8C3BE3EE94CAF2D, 0x514DAB4C526F2621, + 0xF7B79A50B905A30D, 0xA1CB00B61C47B900, + 0xB14552383D39CE3E, 0x89936830A493350F, + 0x60EEDC12AF66E846, 0xACDCD19B6E8446FD, + 0x63DAB4CCB3273205, 0xEC27950CC851C709, + 0x5A039BB0BCA604B6, 0x27E44C95E1D1461C, + 0xB8FEAEEBCC127425, 0x2CA2C0C258EB10C5, + 0xE1CD1E48E025E661, 0xE1AA8B5D9066529D, + 0x892B6AB8F33606F5, 0x4882599D8FCD4BB7, + 0xD1110739EEADB592, 0x668CFBA07226E387, + 0x6D0DE6A7B5DA71F8, 0xF04DBC0AC5A2AB23, + 0xB629A298081F876F, 0x92A5E0D2B7BD5451, + 0x7DD959874C1FD534, 0x42F3C85A00B4FC7B, + 0x5EAD2BF6484852E4, 0x1EF9DC8B17474DD4, + 0x9243BAC96D64C050, 0x5B2BDC877F7E8802, + 0x5F0F0C783EB16C04, 0xD3419C924F3692F7, + 0xE4A84ABF135EF91A, 0x4AD2CDBE66925AA9, + 0xC8B189ED9138BCD4, 0xC22F348FFBDC037A, + 0xAE8CE82A4219AC8C, 0x7000793AEEFB1099, + 0x4A39DB43E47CF3AA, 0x4530B960307C999E, + 0x5527B8246FEF9B11, 0x84D40903BD31E81F, + 0xBBCCE00B381F8482, 0x11DBA82F76F3C4C2, + 0x260BE8F09E326A20, 0x101C61FF49B27BB8, + 0xFE54B92A344583CA, 0x4E03D7611B6A5601, + 0x45F6D8EEF34ABEF1, 0xEBF08082D648C482, + 0x68103E2247887242, 0xEC463E6F546DB91D, + 0xD9B71952F78A2640, 0x8F01898C54A1602F, + 0x05A42BA9FC8DA96B, 0x006C21F24C520D6E, + 0xB9C54555ED30FBC4, 0xFD1C1BB538EEE113, + 0x02E93C796ABD3A97, 0xB68A38B956197963, + 0xDCFE42068FE0135A, 0xC20BB39C63DCB725, + 0x02A8BEC6FD9AF660, 0xBAE8F9A04BDDFED4, + 0xF7F26C6E9CC9EBB8, 0x39880245189173A7, + 0x535E97E1F7FC0C6A, 0x1AD04A88A892EDEA, + 0x6C8BC1488527AAAB, 0x3E283984CDC33195, + 0x418EF2A1BCE56685, 0x45283B23AB7F1DC8, + 0xC7ABAC5DE675EE3B, 0xFFF9CD8D5D1BBB58, + 0xB5CC40FBCB586380, 0x0DB260AA7E5F3D1F, + 0xA921AA820C25702F, 0x234B68AC2E35ED5A, + 0x1374ABB7C15BAB92, 0x820D4C0D8BFBB91C, + 0xCB7553CDCEF4A735, 0x40671AC8453D6B26, + 0x8F7156A3142A6BAD, 0x1887979EFA1D3BF6, + 0x189E955A8313E298, 0x48A41E0B6D206A79, + 0x9F8AA94D6D97DBF4, 0xBE91B077ADADE97F, + 0x15C86013127CE63F, 0x33E81EAD05166B1B, + 0x9D48A1001FD8F6D4, 0x01917B67950B6C54, + 0xEF01D36B9C9D0C7B, 0xCF26A8DD70C67A83, + 0xD6781E42755531F7, 0x5A6DF6C4E8E9F3E4, + 0x74E559B3BC910685, 0x3E1FA5E1B524EA03, + 0x2DE6C5E2E996F178, 0x59972012E3D2E83C, + 0xBB0527EC6341496D, 0x521CB5F4B6379029, + 0xC080FF658B2E41DA, 0x6F85190262F12BB5, + 0xAA5DC05579D60BD9, 0x05D4B551C8E9C1B5, + 0x0F6F1EBBC4E1D5E6, 0x991CF2AEB568FE0C, + 0xCCF1E97BEFDAE480, 0xC83252B7627E1711, + 0xFEE4A5459472A9F8, 0x06BB7EF620BA36F7, + 0xFE466162C4401D18, 0x9626157791916A72, + 0x30CF4BDA4FCB1905, 0x928E0D7BE0057D1C, + 0xF2F6A2FA49278625, 0x172956A7D630B49F, + 0xD0BDA9ED9695FEAD, 0x2317CDC7678071D9, + 0x0E1E2FF3F4EC11AA, 0x047F38D3F607E726, + 0xC22B40579A498CA4, 0x2039D7B22C1C05E5, + 0xB385523325077210, 0x2ABA9D185AB7BCEF, + 0x0510A13B33DD63CB, 0xFDD7C7A51B609A5B, + 0xEB354E5376BC81A7, 0x795DF3C9512FD2E7, + 0xA7BAB11E7C9C6C5A, 0x8958785164025E6B, + 0x7E9DFE24AC1E58EF, 0xAE6D88ADF91EE5A4, + 0x1C86D8AEF8254B78, 0x14EE58C04CEAE6C4, + 0x53E8CB4F48BFE623, 0xC9A943CD366A1769, + 0x643E26EA6E024D92, 0x1ABAC06F18F431AA, + 0xE4F6E8D07A2F0F51, 0xE64A3AE07D1531B6, + 0xD45DC2893621E1FE, 0xEE91D595F0A7D056, + 0x158C16F5E4CF41F8, 0x706FE563BE202EC9, + 0xE5B302114D8162EE, 0x236EA170FCCA79D0, + 0x5F92A689A06620AA, 0x1131A9F5A725F45A, + 0x2B16A3BFF1FBCE49, 0x57E768AC24E0E82E, + 0x853648FD1063A213, 0x40542ED8EFC7D2D7, + 0x2595DD4236549CE3, 0x0F3BD19FF11738D3, + 0x4AFE3690D7E0B5AC, 0x899A0EA2C21F473F, + 0x26695EC767728D84, 0x36E99F43D00365FE, + 0x0A1CB9094635D1A6, 0xAA464864BA733E26, + 0x120364DE2845DAF8, 0xE416D3D828D471B0, + 0x451D05012CCEC234, 0xB2EC584744D195A7, + 0x2D4259F1FEB81DA9, 0x84869B5AD568009D, + 0x7A276EB2C224D70F, 0x506C1C518C4938F0, + 0x7524B431B2E6F7EE, 0x5BA9A5893D113CBC, + 0xED34AB6C5CB36520, 0x123C411C32F7469C, + 0x808519373FD336A3, 0xDE33861EB625F2E8, + 0x222FF6A823D122E2, 0x51620248CB43B6AF, + 0x33D47E85B476ABCD, 0x34EC7057108BF059, + 0x5262CC1995D07E09, 0xA82C5CF50055A1B4, + 0xF1620ECB50E01DE7, 0xDB2FADDC0DF0CE66, + 0x81AA517FBBA05D39, 0xC8A2BEBDA1E2ABEA, + 0x2AFE52F782F25775, 0x697CE202EE472EF8, + 0xFAE628F1E9ADB239, 0x2307C91BA218443A, + 0x9251B6ABF2D0A5B4, 0xD562FC24F9E9EC41, + 0x5FC472C501CCADB3, 0x13405A363FD706BB, + 0xF7D82B0D66777611, 0xB2983177C3DDC168, + 0x0B0CC10720653F3B, 0x49DDC54BE461D657, + 0x47D3DFF823AC5CF4, 0x58889650AD8A22C7, + 0xFF071FB798B803B0, 0x8A60906D0693350F, + 0x54F157E0336A3822, 0x6D4CA05FBF4554E4, + 0x55F5A5F07134DE60, 0x689C55D3F547BD97, + 0xD6A953C6D1492057, 0x06DFF0CF48AB014E, + 0xFAEE099C6F890BB8, 0x3A653D4F5FA4B665, + 0x8423541E8B3A1589, 0xD0A831CA83D07846, + 0x203F1CFD823B27A4, 0x3C475AF50685F9DC, + 0x80ECBC0C856D3B0B, 0x57C1B8A4131913BA, + 0x35736EE65BD00C11, 0x345540F6D1175D5D, + 0x102D125411A7B6E6, 0x663D87E695D9A60A, + 0xFA0675AB151073FA, 0x718B410D2D92C542, + 0xC1F6EBF9A3D55538, 0xC91B5F87CDBA7CA8, + 0xA09F896CE912481F, 0x7346ED3FBAB95B50, + 0x6E575D6A898AB852, 0xD2D71C54782FDE2A, + 0x00DC833F2568DBF6, 0xAFA3FBBB98412389, + 0xF0BC12401061DEA0, 0xBAC42F93514F98CC, + 0x5D6160275CAEC8DD, 0x6F6F7115068877E4, + 0x7C99101F7FCE2EE5, 0x86CDF11CD7B32DF1, + 0x0A60017F841A54F2, 0x396692348E07BEED, + 0x399D2D3B33F1B8EB, 0xCDF87F9AAD28040F, + 0x8EC74CEB042E7CFF, 0x2AC25F1D790316ED, + 0xF162E133B4E7A675, 0xAB3F3E477AF4C4CF, + 0xC505036A35AFD01B, 0x78C4D915ABA04036, + 0xA5EDC40EF369B48D, 0x638BDC79E655C1C2, + 0x2A893980E96B659A, 0x546A7040214736BA, + 0xEDC1A5B84AEF33FF, 0x3D8A7DEC4408D591, + 0xBCC29F935ED07688, 0xB5DE65EF9E2339FE, + 0x9D277B76D1D12222, 0x9679436B1B435522, + 0xA5FFE9B05F199DE7, 0x7E776581CBD86516, + 0xF2D0E6A75CC05597, 0xB308BB047985D47A, + 0x07E5B515DB0636FC, 0x09F9466B03D29D2D, + 0x03C27E13B42A0E82, 0x11D091AE156E1653, + 0xE04B48F2CC926253, 0x7B57ACCEBD44824A, + 0x1218E6886D3D8327, 0x67091B7523DD301D, + 0x706B5EDCAA7FA663, 0xE6E77D31048A4CC0, + 0x0B40ED49D7D6FF84, 0xC2CA68A647DFDEE7, + 0x28477EC23D892089, 0x22B88F4BA785575E, + 0x9245E81072704B8A, 0xE02AE07F73875C15, + 0x71BDB63DBAF8DA59, 0x299C89D661DD8E00, + 0x0E98F88A24C5F4B8, 0x016A1CC645698BBB, + 0xFFFBA1B1F7C0B6F4, 0xAB8F52137CA9B44B, + 0xC69EDA28699D5107, 0x28914D795612530C, + 0x836B62713E0534CA, 0xE7C0F556AF74C6A7, + 0x8F390AC4155099BA, 0xCA5AA44C07CFA59A, + 0x8362B09B91893647, 0xA4F21DE332CDC75D, + 0x397C38AA7B4A5F83, 0x0C99F8B27C6A995C, + 0x94DD7888C10A979E, 0xEFE8081075F37187, + 0x760910B49D2B98EA, 0x426AA65B681ABCC2, + 0xA9C8960E8684C1B5, 0xEC7D41CF790FC6FB, + 0x6F259F82D873B8B8, 0x6F75D3BB2E4578CE, + 0xE2587F8CBBD87B1D, 0x51794501073F0A33, + 0x8339643499D1222E, 0x8339643499D1222E, + 0xEB2104E905C6F2E9, 0x7B27D6EF79661F50, + 0xAF8A443CCC8018DC, 0x65664FBD953871D5, + 0x24409FC4C55CB22D, 0x3CD6741718F9F697, + 0x318516E02DE3ECE2, 0xA001DD19C62DFABE, + 0xE63D7C6EECECB66B, 0x7B0CA23228D276E7, + 0xF1B84178F8674195, 0x7E3F5EFDB625041D, + 0x9F3480FE65DB31B5, 0x4B75B1FF20EA3A22, + 0xE0031D3C8F36AB82, 0xD6CC8E0FECE4BC9E, + 0xE30CF56F1EFA5F43, 0x5794A6C92F4E1572, + 0x77F33F2CCF64B3AA, 0x0E0A6D38926C4DD2, + 0x15803FEC3B9A872B, 0x15803FEC3B9A872B, + 0x8A75CE2956274ADD, 0x9124C2E75A27AB77, + 0x9FCB3CBFB3EAD69A, 0xE8F28CAE1A1438AB, + 0x585847C5E4E11709, 0x6751E02F374B4CFC, + 0x0DB57B41EC1DB083, 0x0F2D318764C61F56, + 0x891B5B39AC6302AF, 0x8BA9BCDD56AA7115, + 0x1312F4B242609CE3, 0x6CD3852764E3EC60, + 0xD220BDD222AC4A1E, 0x642F37FB2C12C776, + 0xF49E9A9716A04595, 0xE2EF8DE478A37752, + 0x450819D8CF90C416, 0x174665E23A066EFA, + 0x0725A4CCFDED9A70, 0x347C46AF4CDBDFF9, + 0x4EEBC3694E49C572, 0xAB169BCF05A054BA, + 0x3F52E880AAF6C8CA, 0xCFA3AB7623DE1B3A, + 0xB158DFCCC56E5C5B, 0x0FEC0A416D9B29FA, + 0x8DCA505A5C196F05, 0xEFC0248830DA402C, + 0xF489B44DD5AF4BD9, 0x35EC44D3BF89291C, + 0x6FD992C4A1C1B986, 0x6AE0CF4996476F1C, + 0x056E0FE8534C2949, 0x76E35164CB4968C4, + 0x2FA2494B47FDD009, 0x2FA2494B47FDD009, + 0x36F1B38855F2A8DF, 0xC8ADE97D5EA74CC8, + 0xC6E74CF8C884C880, 0x2AD545D31026C271, + 0x641F272B52E2F0F8, 0xDF9412D4FA5AA434, + 0xD839450756ED5A80, 0x02E166B5C96465D2, + 0xBFFE53AE7E67FCDC, 0xC1644DBBF6036E80, + 0x7CDC8C3B89F661B3, 0x2BECAC1144990347, + 0xE88DA0751C22A2AD, 0xCFEBDCA6E4CFE408, + 0x2D537BA194896636, 0xC77621DA349D52A6, + 0xE00F2AB100B76E89, 0xFD38851DC971D9F2, + 0x1F0B79228E461EC9, 0x698F51FB33ADAF7B, + 0xB604A2942ADED0EE, 0x9EBC1183D6EE08A2, + 0xD2C5AA0C0E8D0F1E, 0xD450719EFB7CE3C0, + 0xB1FA61371AF7C4B7, 0x96C7681CE7E3763A, + 0x7E08924259E08CE0, 0xB2D4457D10260C59, + 0xDAB963831DBFD3F4, 0x0F8A91E68BC727E2, + 0xD33DAA36272177C4, 0xB0BFD6C5F97F4E08, + 0x9C93764223E29C50, 0x9C93764223E29C50, + 0x0E21D3DF1051399D, 0xA42938A8392B09A8, + 0x4BC2854478F3A749, 0xBFC84C3B484F3AFB, + 0x55598D21339CB998, 0x643A5EAD42A4060C, + 0x1D6650420CEC9D3B, 0x44095C938FBA7E09, + 0xA4822F1CF23F4810, 0xE5FE8BEEDAF58134, + 0x45BBCBA77C29A841, 0x2B28BAEB9F9FF900, + 0x39FF19C64EF7DA5B, 0xD63E470D46B4F8A5, + 0x8EB2F69076AF7053, 0x4F43E4CBAEE198B7, + 0x539DE94D44FDFD0D, 0xC73B12660CD0935B, + 0x032A116663A4D5AC, 0xAAA8AEA16357B80B, + 0xCB6A7C3BB17A0C67, 0xE27D9296FC2AC036, + 0x9483AF821605B1D8, 0x96637387D970AEFC, + 0xE6A877C64CAF1BC5, 0x0A3F828EF6B366AD, + 0xD0837058AE2E4BEE, 0x587426517A26C00B, + 0x1E34710ECD4AB0EB, 0xE907BE2B8D7631B3, + 0x9FD452BFBE7A7A8B, 0x3FCD41FDB4395083, + 0x74DE2E8739086740, 0x99A8BD51FA9613BC, + 0x4B5CFC83122DF602, 0x361F388EB9753ED1, + 0x9D5A25BADB742ACD, 0x33C1AE8188AAA1A0, + 0x76BBA2CEE66D47E9, 0x0E27405DD251B46C, + 0x82E0AC411E41A5B4, 0x683C02382ABD9018, + 0xA7B2458D0AD6DED8, 0x603ABA046B239722, + 0xE058175F8EAFE79A, 0xA48BB492FB0B77E1, + 0x870B8B7A766615C8, 0xE9927A89AC80C868, + 0x5F68520888E69014, 0x5F14E9A3543AFD0E, + 0xD7360051C885628B, 0x79BE7AE86A6ED38A, + 0x2206BF9A37B7F724, 0x9673FB069F90F6B9, + 0x1178E104409FE58C, 0xCD252220138E0935, + 0x82EBB79E258FA2B7, 0x5F9C583F796C0E96, + 0x5CE62918F8D703C7, 0x6AF11BBCEDB5C27D, + 0x01BB4D577D38BD9E, 0xCED79B498016B0EA, + 0x475768A975D5AD17, 0x24A466C655E8588A, + 0x1D9D45004C28C916, 0xC5A8CDC38A5DC151, + 0x5270A8FBC098C3F8, 0xD7196DD041C06559, + 0xCBDD322A73D6D932, 0xAD10474DA09C52DF, + 0x8D474C8FAEFF6CDE, 0x7055CCFE1858BEDA, + 0x31B73D1EA9F01DA2, 0x961F6202C2192265, + 0x3C028C636A414ED9, 0x7448B3554414AD7D, + 0x8EDF950167586B7C, 0x7EF4DDED446C3ABC, + 0xB6FBFD079B8D0596, 0x263D71684255BD64, + 0x4EE5367468A65CCC, 0x81F83862CDD4D39E, + 0x56105E599CAB0EFA, 0xD0F699EF711D76D7, + 0x97A28E63F0BA5631, 0xEEBED677DE5E4460, + 0x1BF094736DD62C2E, 0x715C70D06215B9E9, + 0x9B6786E4C03DD382, 0x0EAFB027A1FA5757, + 0x639B642FACBE4EDD, 0x17017B31030DB51C, + 0x37039302F4E0A008, 0x7C3E030BC3ED6671, + 0xA7A866D21CD2329B, 0xE4F2BC3D40737711, + 0x22E21FBCFC88C149, 0x002C5E5F84038D0A, + 0xB20834A7DD3D8896, 0x3C3BDBE1994D11FF, + 0x50C7A99057A69748, 0x443A6D2DDBF4F7A0, + 0x933D6A9EEC1BACD0, 0x191DDA30577F440A, + 0xEB81A3DADD503187, 0x472D59FA6D5D852E, + 0xDED5AF5A0EA4B297, 0xBCE3958041BC6707, + 0xB6B9DDC412FCEEE2, 0x41140BC7F2CD52D1, + 0x53FA83401D9C07FE, 0xB7FB8BB4324CEE57, + 0x5443438F033E29C3, 0xEA8F343F4C9D2883, + 0x34318593248C8FB2, 0x24EE3332DFDF21FE, + 0x9BA001CB45CBF627, 0x75515BFBBD0CE6D4, + 0xDCD4EC3F419D02FA, 0xBE979A383F439BD0, + 0xCB3C68ADB06195DF, 0x7FB040F6A7F55C65, + 0x83BCCE3224735F05, 0xF22DAFCF97993B9A, + 0xA660FAF550EB37E5, 0x85E5529F7256A562, + 0x5B91B229243351A8, 0xF3CB671859017806, + 0xCF9159024555488C, 0xC0BC89464DA1C5EC, + 0x9F343285A00B4BB6, 0xE32A857DDA8E7640, + 0xFF4FB7C8CDFA3DA7, 0x0DB121F7704FB9B9, + 0xF3AC26D3CC576528, 0x4CBE04CA930284D5, + 0x748040460F8DF5DC, 0x898D38AF4DD1DBE5, + 0x2542269291C6AC84, 0x656DA4A4DAD8CD55, + 0xCCD892192C6D2BB9, 0xD3824EAC33B77BDA, + 0x1BB299305C3E8C13, 0xB27110AE4E7AF1F1, + 0x125E6D638B8605D4, 0x265C73BC4658C956, + 0x299EEB23175895FC, 0x5CC6562CB9448056, + 0x9EC8858184CD253A, 0x704D570E2D97F563, + 0x06FAACD625D80CAA, 0x2B032BF73ECF002B, + 0x578C752848ECFA0C, 0xB40E07664E24D9F5, + 0xE659E47AF827484B, 0xB4E725A8915BDF60, + 0x710BCDA8071EDED1, 0x327AC6145E60B9C8, + 0x741B0129D4560F31, 0xC44B75FE2295CD89, + 0x3317DEDB88C95038, 0xC6D04E4B28753F77, + 0xA178472EBB8AE60D, 0x4B43AFBD2CEE7724, + 0x0596843B34B95CE5, 0x18B27423F12E8F5F, + 0x4737980E8A283806, 0x604A21CCA592EABC, + 0xA2CCBE62CD4C91A4, 0xB9B02277BF796C35, + 0xD4B8E3D1917BC86B, 0x8523CD4FAA5208C9, + 0x9B2BD3773123EA2F, 0x1BD795619D825B74, + 0xFDB423997FA30340, 0x97B846780E2A8C66, + 0xA23E821FBDF8A5F2, 0x8890DA2FBFFABD33, + 0x99015ED7DBEA5113, 0x4A4AB27245D30BB1, + 0x271017B9BA825366, 0xEDBC67B52044E960, + 0xDC57A637A20006ED, 0xD1EC8FCE792F8574, + 0x2B694AFCF64E6994, 0xC2AC996A7588C2CC, + 0x829CD22E043A2577, 0x01E06C790591A82E, + 0x8ABFB70C49CC43E2, 0x9EE168DA5EB62BF3, + 0x6BAB9442830C7F53, 0x1EA8B94F4F446F35, + 0x8E2530AA8ADA980E, 0xCD37A28258D70638, + 0x01E2817A479A7F9B, 0x30D4C42F75DEC781, + 0xE3B05614DCE1D014, 0x5B47AAD4BC3C847C, + 0x31574B1B41268673, 0xC3D08DD4F74EE8C8, + 0x509D5878EB39E842, 0x795434E153F90E41, + 0x01708E8DD3FF8C65, 0xC9C86B3B107733A0, + 0x89049DD63C08B5D1, 0x1A59F2280C3BC4C3, + 0xE43A13C9E4CCCBCF, 0x1D9596F43F40128B, + 0x61A23B7EDA9BDA24, 0x7D35B22CC79ACCF5, + 0xDFB2B516207D3534, 0x2671671BBCC6AD9F, + 0x6647C5F6F5792496, 0x272CDE9FB560667E, + 0xD5E460AD7020A246, 0x0F9B786ABC0B5750, + 0x3FEF770D40960D5A, 0xD6E677FAD7521410, + 0xAFC976FD0580C7B3, 0xEE1AEF687FEEE5A0, + 0xBF1CA77833E58F2C, 0x23FEC23FBB7979BF, + 0xBC72B5D7A1CBD54D, 0xDC2776C9C8195355, + 0x7AFC0330E8AC3E9E, 0x31A67A0C26C672D3, + 0x1E77FA7A62EE6C4C, 0x374867C10614D333, + 0xF2D4B2FE415AAFC3, 0x49025D49ED2C10DB, + 0x3123FAA6DB1CF7ED, 0xD1957D9E3B9B19F6, + 0x36C1451A88A09630, 0x1B7AAB8C3A968273, + 0x07DD29D5E22763F1, 0x9EFB9FA4BB7D3022, + 0x4C241E39B23DF959, 0xBFCE58B2B3249999, + 0x2B4CDCA6F07FF3DA, 0x6B2DB28D6D5448A2, + 0x5891CAC5D4ACFF74, 0x284BE2EA89FED4E1, + 0x4E3CD0EF8A489541, 0x30AD09706BA583B8, + 0x226435CB96CCFC8C, 0xCDB1810B79D0BAB4, + 0x3C606747B23E497B, 0x52261CF13B75FFA8, + 0x888D57E407E63624, 0x24BE716BB6F8D262, + 0xBCB266247193AC61, 0xBCB266247193AC61, + 0x87052FE446E07247, 0x65B43CCEFCE00E0A, + 0x2CFC76E0D087C994, 0x0297D850C96F98CF, + 0xC88156EBB786F8D5, 0x62DCDC9F60F4632E, + 0x6EC47A344923E1ED, 0x375A916E2C90F47A, + 0xC6033D32241F6FB5, 0x22F92F5B8350C9B1, + 0xDBA3C090E3D74690, 0xB107D044FEA47767, + 0x5D517B27CF6ECD04, 0xD417A40826D1E81C, + 0x04D950EEFA4EED8C, 0x8515D1B64C4225DF, + 0x625707C5087CF3E1, 0x3E5C5BC88838015F, + 0x99093F60746708CA, 0x0CEBD87AF6613BEC, + 0x3E5F7FC85D854E15, 0x3C4ADC6B88FA8A08, + 0x460BC76A0E10655E, 0xF05D6BD44DA210C7, + 0x9AC577F5A12AD8A9, 0x4A0E99CBD1247EDA, + 0x1540CC4870B741F3, 0xE7E4F46550C1BD36, + 0xDCB194B85EF7B541, 0x27ECEB377235D88F, + 0x2D2386F273FF7A25, 0x349BD41B518C020C, + 0xAAA6A3698A69E048, 0xC4E549AA958765B8, + 0xC85A7127E7AD02AA, 0x0D132C96D284E681, + 0x7284A47B3540E6CF, 0xFB592D66E49ACE42, + 0x5E9564D8246B909A, 0xCAD1755E530A6012, + 0x51F30DB60626A20E, 0xF79790B62B6C73B3, + 0xE832D760399EB220, 0x6E43E6EB24D5F3FB, + 0xF46CDC33180FDA94, 0xBD366067DA5DC0DE, + 0x4AD490AE1536933B, 0xB7D91A5256E2FEA6, + 0xB043ECA801B8CBC1, 0x329F8255315B16D5, + 0xAC3A74E8384A9919, 0x3C0A5394C4294EFD, + 0x5ABA3986D90D8A3B, 0x8A1AC8EBC73850C8, + 0xEA9960D07DADCF10, 0x41CEC7D73267EF3F, + 0x2485D34E50A22E84, 0x686C0F594DECE3B0, + 0x238DB2A2C23EE9EF, 0xA12BCF836724905A, + 0xA41A05B6CB741B85, 0xCE84F8AB9BD41C13, + 0x3C06B5C839B38F7B, 0x4140085B99B17F97, + 0xC8407624CEF2354B, 0x6FE418ABA5009F46, + 0xAC678E40BE7C74D2, 0x68C3D9A4D2B4D08D, + 0x18F621F7A5B1F85D, 0x595B9EE1AA7788C8, + 0xA619B168B8A8570F, 0x1817E299AF9979DE, + 0xDD902D0349AFAD3A, 0x2F1ABED17AD92CE7, + 0x92F0DA1E27DB96DC, 0x9F681D0969707D0D, + 0xD0263801A4C5B0BB, 0x6E7F154934B0020A, + 0x48C633E94A8142A7, 0xB69CFCD3BFFC6C49, + 0x50C375537449F369, 0x1B769FEF6AC22FCD, + 0x163E252DE035A133, 0x26C2ACB261895E70, + 0x183DADC6AA953186, 0xD109C0DDBFB16C42, + 0x06A320535F5F0248, 0x879E0FC1ED4201FB, + 0xBF4FEF46DB7894D3, 0x5EF0C89900BD8BB6, + 0x8DB296B814EDDA07, 0xCF7941E922F85F77, + 0xC5F0A8EBD3F361CE, 0x985CACB900CBBF03, + 0xC28A22F146A144A7, 0x72643E7E52406496, + 0x1312DDD8385AEE4E, 0x1312DDD8385AEE4E, + 0xD5A4B59980401588, 0x705CAB8E3141A3E9, + 0x255F8DAFD540D397, 0x9BF7A2B2D461EEEF, + 0xBA7148484BD90365, 0x386C67F2B8055D74, + 0xE33D59DA70B58FDF, 0x3D6C3476988DE6E1, + 0x3CDC7136613284BD, 0xCCC984BF74DC5A30, + 0x59E727A1C9D3E31A, 0xD13A0E3C40852A22, + 0xA67C35C56EB1BD9D, 0x7A7C3E6346CB112E, + 0x6806C51AD12B83B8, 0xEFD424FDD55A6EC7, + 0x149916F50C34A40D, 0x84096EE576F0192B, + 0xF19D095E42D430CC, 0x7D474D14E1A8A20A, + 0xABDABF4E1EDECBFA, 0x2F6EFD779B0D9B0A, + 0x87DDEB611B329A9C, 0x3D63BD58D4AD95A4, + 0x06EC7A0E9BB0A015, 0x3FCD7CC0DD8729C4, + 0xF92099527DB8E2A7, 0xF7865792085F5D28, + 0x9120E8DBA3D69273, 0x561E884F17F3B19A, + 0x49A49BED12794D70, 0x695202FDB441A035, + 0xA9A31475F530DFDA, 0x3FF2C510C4AF0326, + 0x867654CBC7606F2C, 0xF79020AE00268B91, + 0x3ED2B83AB2E82799, 0xBCAA1E28389F3218, + 0x6F8838D03D1DC226, 0x94F284E4B5633B45, + 0xC60060EB0D8AC7B1, 0xAC2D3618E6A9DA7B, + 0x20510814175EA477, 0xAEB6074141B6B98E, + 0x9EB6522EA68F22FE, 0x52AC2BA60807E173, + 0x116FB94DC4B79F17, 0xC35FFCF19CF1824E, + 0x444D98F98C11F3EC, 0xF5D8620825CF306F, + 0x2058206FBE79A8AD, 0x88645E1CB9E8DEF0, + 0xB165AB7C248B2DC1, 0x704A6AC8FE10B451, + 0x308F96458B7087CC, 0x4B13D06FD764E37F, + 0xEFFB25453D8600F9, 0xEC27FD4DF41FBE05, + 0x2208438012482A1A, 0xE37EB80DFB0D31FB, + 0x2B5F9D2AF1F1722D, 0x914FE6C4D25C2ABA, + 0x2F868413AD66C660, 0x194077BB91B8BE86, + 0x9FE5633880ECD8ED, 0x7FB4033815BC3A23, + 0xF8EBCCC96ADB9FB7, 0xCA6689A617E3F81A, + 0x5B440763A4C8D15B, 0x9624333247B84756, + 0xC571D0E77D8BBC29, 0x782D9837034A27A9, + 0x5CCABFFCA31DDE33, 0x8BA8CB16F34DFECD, + 0x14FC5833464340A8, 0xA9105DE2F9AC7705, + 0x445D79F995508307, 0x515AFA9E2496A34D, + 0x769951E2455E2EB5, 0x6D1C8B51D0FABF32, + 0x01F73A131C18CD94, 0x88718F88EB6B8FD5, + 0x8FF3847DADD8E30C, 0x8D5B2CAB16E07F01, + 0xDC518000E39DAE1F, 0x97069930B6961A6D, + 0x92C360B5F15D2302, 0x7A93219C3451ECBC, + 0x3DBF2DF0AEB7D289, 0x5491887B955D095B, + 0x0027501B9F3B407E, 0x58D4F7C6214FFC91, + 0x90E47239EA1980B8, 0xDA69BBE6D56F03FB, + 0xBCDF8BAF56C87B6A, 0x405618B55A98EF4B, + 0xEADD41B5AF0839AB, 0x03627CC8826504CD, + 0xC024869A53992F34, 0x0A0080A9EB535EC7, + 0x9304881D6F6537EA, 0x51448301AAA5A667, + 0xBFA48E2FF417213F, 0xCC09B877A009E41F, + 0xC485E07E4F0B7958, 0x010441D415663813, + 0x02369D5C8A51FDCF, 0x6750AD393826203A, + 0x54ABA22FA6371249, 0x1F80131CB40B3BAE, + 0xA08FE5E49BDC39DD, 0x31A051E72DD399A9, + 0x497420E022796B3F, 0x8E2F288B1BDF9EC6, + 0x4B5B4DA5D79F1943, 0xE4DFF80C26559354, + 0xA49C426ED0CA4AB7, 0x28FFAD75D45581CE, + 0x69FE6DC87BD2A5E9, 0xD758DE4966B8B70C, + 0x060D6E96F8B8E48D, 0x1861D54BAC877B58, + 0xCF1CE768BB43480E, 0xB5B176232D066EAD, + 0xA6F6F70FDC6D144C, 0x3CAE4C2FDDBD863F, + 0x58C70CF3A41E4AE7, 0xCC2EDAABFCD738A4, + 0x359AF31A4B52F5ED, 0x6B4AC547704C6FC2, + 0x2970EAA18FD5E42F, 0x1CC9F6FC902A1726, + 0x29A28F3F8CF6D854, 0x70593F5B4BDBCBCD, + 0xC82630132081BB6F, 0x6B7C0BD5B0CEDC41, + 0xF46C581C61718916, 0xD20D31BC4E3A72D3, + 0xD125AE748725C6BC, 0xCD9DF646977DACD7, + 0x9A77DFD295E29B09, 0xFF52991481B3D445, + 0x16DA8172459434AA, 0x4B415BB8C5A2F41C, + 0x684785568EF26A22, 0x45EC8BA85459EF82, + 0xB45EFF719D8427A6, 0xD59A2B31F6A6CAF8, + 0x35E0654F4BAD7971, 0x50E174E0E0A47920, + 0x6F2135B6129620C1, 0x6ECBFF1E07110050, + 0x7572EF42FC6A9B6D, 0xA7A4F67BDAB4B73E, + 0xE0D36E5D9E99CC21, 0x83954D324677C1F9, + 0x2BC54A8188768488, 0xB79FC8FB1129255F, + 0xEDBC8405B3895CC9, 0xEDBC8405B3895CC9, + 0xC153C43EA202C8C1, 0x4336DC3297C47528, + 0xF13FE2A80C05C561, 0xA768928261903931, + 0x82A2B386716608F1, 0x5329E9DE665963BD, + 0x9A75585FB2E54FAD, 0xA99696509966C371, + 0xC531EE8A1145A149, 0x7CB10FABBA4D5F41, + 0xF6201B4DAF662A9D, 0x60FF5ED57C36A351, + 0xF3D78F59DFE18D79, 0xD214E725DD037118, + 0xD2E6822DBFD6C8BD, 0xE3C9546BB1ECEC04, + 0xB2C086CC1BF8F2BF, 0x091D4791267089F8, + 0xBA3D65906822BED5, 0xDE8D704E3CF27C7D, + 0xAAB3200ED59016BC, 0xA318EBEEDBE27A2A, + 0xEA2F2061875EED90, 0xFFC2F937F00D19F8, + 0x876046A8E3A4B71C, 0x8DE28588CE3990E2, + 0x6DB47AA77FD94E09, 0x63FD384CB138320F, + 0x68772DB2B2526F9F, 0xBA6FC33B09D1C39A, + 0x1C4FC5752BCD8E48, 0x8DA8F193E70EDF6A, + 0x7FDFADE676AA3CB0, 0xF1D0549BA93424E7, + 0x0A49D1CB6E34AF72, 0x52E3A18EDFF7ADA2, + 0x2B6747FAA9DB9D6B, 0x5E3D11E1DC5FBF4D, + 0xA50E117CDDF82F0C, 0xE75BA2ABC80DF859, + 0xA2C1F5E92AFE49ED, 0x85B7AA5E9B6F0759, + 0x65287525D951F6BE, 0x5B6546CBD2A97EB5, + 0x444C4525ECE0A4B9, 0x481449BA600BF48C, + 0xEFABC7722293DA7C, 0xF589ECFFF0C877F8, + 0x121F0593E0A431D7, 0x0061AA1825F1C72A, + 0x9F47B058362C84B5, 0x6471F4759775FCA4, + 0x0F70731BACCFBB96, 0xEB156B5FFE1B289C, + 0xE05F6AEEFEB0BB02, 0x67181FF49CA879A6, + 0x961AC54BF0613F5D, 0x3211C35423263392, + 0x78CFE51896B6B8A4, 0xAE07F5C5D7B878C1, + 0xC53EB42A499A7E90, 0x2020FC50CB5FBFA1, + 0x544ABDDA3B409B6D, 0x206C14525FF9EA88, + 0x93DC1BE4E1ABE9D1, 0xA54E1B85EC9F610A, + 0x228E5C6AD4D74BFD, 0x710A0A81073A9D0C, + 0xF46A1E03E8755980, 0xBD33D1F895B73D2D, + 0x1FD09E7390A74D54, 0x610E47A3444BAD86, + 0xF9E56683CA8E11A5, 0xF13F8FC27BECDEF6, + 0x2382AB11450AE7BA, 0x4BE99ECA7E5B225C, + 0x47AED84213A47510, 0x8910EAF195C635A8, + 0x34F9E9049454A7A0, 0x7AF2C19FB25152E6, + 0x25129531F77B9ED3, 0xE832E9D52B06C404, + 0xC11C18092C5530DC, 0x99E30C16BD6C3847, + 0x465BF26AB9684352, 0xA93D9EAF176A34D2, + 0xDBBC7A2432524127, 0xCE9A7A1762204A94, + 0x2D343D2219CD027A, 0x16DE9112AAAB5C8C, + 0x3750146A28097A82, 0x522DE64D1BE35BAD, + 0x1EAF30FCFBF5AF74, 0x197809C7C480B379, + 0xEAA572036990CD1B, 0x5C5A01617B7C3D4A, + 0xD9EFB6DBF7DAAEA3, 0xFC3D64AC1D955520, + 0x02ADA21EA2F6918F, 0x939F0A2D66DCA5C3, + 0x1BEDE233E6CD2A1F, 0x7436C98D25A50C81, + 0x77ED170667F50170, 0x315DA2F7337A8638, + 0x3430676B11CDF21D, 0xAFEF2DFC588B36E2, + 0x4AE5AC8B852D642C, 0x4AE5AC8B852D642C, + 0xA8A7D434AFB4B97B, 0x3D4633348EF0E4AB, + 0x024A60DEB0EA69F0, 0xCE141012DABC4B08, + 0x3A0014ADB172A3C5, 0x96696689D7291EF6, + 0xEA95C0853A27888E, 0xF5D57F8181FB7445, + 0x39DAC362EE65FA28, 0x3DA0AF866B552ECB, + 0x2DA49C3B79856961, 0xCA1C55E06155C7AA, + 0xC2D15BEF167E27BC, 0xAC8D5BCAF7B9ECA1, + 0x6ACF6B7225801CD7, 0x5B31724CDED86C6C, + 0x5C9B84BD7D31D908, 0xD5B3E5CB06248A58, + 0xF372BC22FCB88606, 0xF479CA7199C54C8F, + 0x75632C5ECD7ED843, 0x7E4260CE3412CCAC, + 0xF66A602F829E2A06, 0xF9135F131C423364, + 0x82ACC484FFA3B05F, 0xDC5B18561A18AD5E, + 0xDB41D07A45A6D4B7, 0x1F5394D2988947FD, + 0x7497D2CE2C30D24C, 0x8820F6FCD373F9F7, + 0x3BE0BB12D25FB305, 0x768E89E457BE9C9A, + 0x9CB5CE07A3968D5A, 0x5359E9154EC8BC8F, + 0x8D30F648014A92B5, 0xA65E4194AFEDE1BA, + 0xE3A3DB414A373DAB, 0x17552FF90A99ABEA, + 0x898CC20EA75BACD8, 0x228A4ED518554B3F, + 0x867458251D47CCB2, 0x27FEFDFA220EBB32, + 0x50A8A36201DBF83E, 0xE55A943CA25AB9DC, + 0x8A9BA1AB3E237613, 0xB4BAEA083E2652CB, + 0x609278246A29CA34, 0xB1B74E96C4012E63, + 0xA3EE4A07279BB9DB, 0xF41EB7643E61A928, + 0x16A96863A17552BB, 0x1BB9CED365CE71C9, + 0xE82728F0DE75D13A, 0xD33BEB6D1039A14C, + 0xE9676F61BC0B3321, 0x1CAD2A287D454E0C, + 0xB2A592B04648A9CB, 0x13F42AB08F9D61A5, + 0x1761DC5D8471CBAA, 0x3CD4A5674D4CD9DF, + 0xF1550C4BD22582E2, 0xD451FD9F0D0A9719, + 0x7679CC1BCEBE3D4C, 0xFE78707C87D69372, + 0x971D38760FBC02EF, 0x504B26425DFF773C, + 0x67722AEB798E5FAB, 0xEA414596102A7989, + 0x75138790B4359A74, 0x756C0D2B75F44D33, + 0x85B6C850546FDDE2, 0x163C74179C49AECA, + 0xA00EFE4082C4056E, 0x36A49DB9F73DB2B2, + 0xE9B09589827545E7, 0x0CF06D3E480E9D6B, + 0xB3ED1BFB4BE636DC, 0x1D74385CEC17951D, + 0xB3ECA65C7317F174, 0x57021DB284332EA0, + 0x3E8C8727991A8A0B, 0xAC2B08493719B297, + 0xA320EF046186FA3B, 0xA0851C55F5B2F560, + 0x1E8BE90C74FB4C09, 0xB966251859431487, + 0x37EBBF3117BD6A25, 0x7FAAEDB6E249CBC6, + 0x3E8349C08E4B82E4, 0x6169F4246C1D6412, + 0x3133B907D8B32053, 0x0ABFE58DBAFB4A60, + 0x673ED815D6E323B7, 0x5990DEF1C554658B, + 0x48C2BED9180FE123, 0x45049B4A3B83D806, + 0x62AB793144DE75DC, 0xBCE2F98D372B05EB, + 0x6216B116083A7CB4, 0xB9F812171F4AEE3F, + 0x372EF6699146A1E4, 0x8ABA11AB6561D507, + 0xFCF37A457CB96DC0, 0x3E09537707C40210, + 0x465C84BC39F1C351, 0xEC535F8A76FD9ED3, + 0xA76359FC80B2438E, 0xF7B46911310E4737, + 0xA5B769058763E497, 0x85C45D18D2F740F6, + 0x353FC880830B88FA, 0xBAB6F7501A822416, + 0x4852FC386E2E1BB5, 0x42C16E1E26C6F4A7, + 0xE827B9382CFB41BA, 0xFD065F60F7126DE1, + 0xF0EED5A6BC7B237A, 0xCC336B9652449E02, + 0xFE26117A5841B2FF, 0x7CFE5F3C5F742479, + 0xD05BFF0C0A12C68F, 0x97AC07AE39E43022, + 0xDC80A4C2F18A2B64, 0x4169D62225D118AD, + 0x3548536485DD792B, 0x450CD40CE0177FA2, + 0x4759CC730F947C81, 0x824F1CA67B3DE4E6, + 0x3903E216620488E8, 0xB3013B466DEA6673, + 0x0355EF116C4C97B2, 0x1141BA8DE722BBFB, + 0xF5F6378C4F3419D3, 0xA9BEF71E6CF68903, + 0xF0A4F1BBF4FA7497, 0xFDBAC69EFCFF8452, + 0xAA295B6F28BD587D, 0xFA40668ACFC30ABC, + 0x69F4BE8C8CC4796C, 0x8ADA462BC5F42FD8, + 0x4E417C547182C84D, 0x5A41C58285EC2667, + 0xBA656A3BB01BDEA3, 0x88C0BB2225DD05D8, + 0x27CB772218215325, 0xE0B511223C5ED75A, + 0x5354C5BA2EA868A4, 0x6EB5B87C2D80BAAB, + 0xE163A4BCE4DE6F11, 0xE58535D63CA64820, + 0xED74007FFB146BC2, 0xC1A7CF4B179CD225, + 0xFBFC01CCFB35D99E, 0x44FBC864916E75D4, + 0xFDD179EAF45B556C, 0x67B8619CEF3755E8, + 0x8F719973E1445BA2, 0x440657FAB96ABF59, + 0x190428512B240692, 0xB21542C3B2A23670, + 0xF7AF4F159FF99F97, 0xF7AF4F159FF99F97, + 0xA5272EBEDD4747F6, 0x8E0F7F50DC996DC0, + 0x8753997EB5F6EE3F, 0xC4BFC80D1A8C7DF2, + 0x1BBE0523B8DB9A21, 0x0F4C16D9EAAF22F9, + 0x98CD1D2934B76CC1, 0x9A28082F8DCE4E61, + 0xBE31FD6CE464AC59, 0x91F94D2287684BDB, + 0x1B5C85C612E5256E, 0x0823FA7465392E20, + 0x062D5EAD4DA2FA6A, 0x0F7864BD658D3DC8, + 0x55A1E095DB052FA5, 0x322E2CE0FE466D7D, + 0xFF4803BC019852D9, 0x6801716FD8B2AB58, + 0x923CB32A3B874FCB, 0xD416FE0A3F103A4F, + 0x3F6167F351168730, 0x7E8029344EE9DC34, + 0x05F04155A226FBBF, 0xD2F30DA3ED9CDACC, + 0x8D74E26F54B4E5C3, 0x1EB2685A677896F5, + 0x967278682CB6967A, 0x9FC2ACC68E7C1E10, + 0xBA9775570DB788CF, 0xB0B4E62B0960B28D, + 0xCA4AE345A153D573, 0x897FC3977F467DDD, + 0x6599D834B12D0800, 0x4EBFAC94C831142B, + 0x23F8F5FC7E8C4A6B, 0x65C60F47A52ECB92, + 0xE73A266DB0CA9042, 0xC85977CD781454AC, + 0x3C49C870E66F0A28, 0x9F14D3A90A7A25A9, + 0x1EC7421E7AF9F0FB, 0x2AF2B2498CD975C5, + 0x8D9DF6ECA8768583, 0xFABAA0305A651C20, + 0xF854439EFBB3B583, 0xA8D2FE9FEDE0F78F, + 0x049E937F18F4020C, 0xB0F01A503C825A11, + 0x09C0403ED9A751C2, 0xF87E965FEFF8C548, + 0x9BB01E3834671191, 0xAB3E7E62A69D0DB3, + 0x71E7B2E657449AAD, 0x183BE4F4B6242686, + 0x8524A8B0171D5E07, 0xBDDCDEC7B6205897, + 0x6E91B04E08773030, 0x28E516A94146A9C4, + 0x8533CAFDE1F0F336, 0x3114795AF6B2812D, + 0xAA08EF13F341C8FC, 0x851D0D0DFC8084DB, + 0x4E404A9361F75BB2, 0x908A86F0761483FA, + 0x3BCF567485E1971C, 0x9D8193D2F71A2E2E, + 0xB736A491E64A32CF, 0x75E3AAA7D01DEDC8, + 0x873B82D42AC2B9E5, 0x6C14C77B953FBFEC, + 0x66A49D021870FE88, 0x9C80E3D13D2D1B35, + 0xD5A016BC3C09CF40, 0xDBED096C30A38BAD, + 0x367EF5E2F439B4C6, 0xCD8E8EFBAF299D4D, + 0xFB00CA71DA386228, 0x1AF9284FBBAD9335, + 0x2A70BAE8883E4C81, 0x09C4C80EA1D5B2F7, + 0x405591EC8FD9096D, 0xBF9789ADF6CF01AF, + 0x1DBD58820FA61D71, 0x020175C59CBE79DB, + 0x584770794D758C18, 0x870B1A879934FBCA, + 0x5688585E6D563CD8, 0x33797E8C1A8667FE, + 0x346EF3ECAAAB149E, 0x129E13FEC2E01C2D, + 0x14D913B777DFF5DA, 0x04366A1CC7C6ABA6, + 0x1930DFA731813EC4, 0x78F25615D0329EB1, + 0x594A1028FC2A3E85, 0x07DFC2E14CF434AD, + 0x9B079E5221D984D3, 0x8771CEF27508AB24, + 0xFD3151CD37EA2245, 0xA3F9341B72658E5C, + 0x830C3A44EB3F2CF9, 0x63C4B5C08A6803B2, + 0x04456F95153C6BE4, 0xDDE905ECE033EB55, + 0xEA241BB04110F091, 0xC81FB0F481B923F3, + 0x4D89D607CB3DD1D2, 0x516A1905869A7123, + 0x1DFEDD15019315A9, 0x956E8585F7664480, + 0x891804727E0A98B7, 0x902811AB4D3F0E4F, + 0x5C3D0A935F535C4C, 0x51AB337672378CD6, + 0xE7E035450A7948D5, 0x85D9696FF3E31D8A, + 0x5B669CF2299A271F, 0x4DFCEBA7CC942312, + 0x3EAE97309727E7AD, 0x743C42EC716815F7, + 0xF6DF6E90DE7DF90F, 0x6C7C4EFD3F245591, + 0xE1CA84EBF72E691D, 0xCAD4A8F819424C71, + 0xEA1C610A04DB6BBB, 0x4603196EEEA2355C, + 0x8183455E16C42E3A, 0x97D6BA3D63E00279, + 0x6DD8F5AA635EB4B2, 0x3B89B4AD3274A55C, + 0x16EC4839969F9F5E, 0xD4C5E892E2E71D05, + 0xDF02A2C93F1F26DA, 0xAA95EF44AC54CFF9, + 0x53AF99BAA671CA47, 0xACBF3CDEE04E0AEC, + 0x2746BD9D88C5C5D0, 0x062D667A62314213, + 0x7FA5D82B8F58EC06, 0xFE79B342C22A0052, + 0x694E00132F2823ED, 0xEB8677560AC15143, + 0xB3CAF387AE12E9F8, 0xDEEC139402C42293, + 0x1760FFA8AB074D66, 0xC22CF0F8AABFA658, + 0xE81AFC1BC4CC41CE, 0x36F15E322F9C149E, + 0x9465E683B12D3F6B, 0x5E79A67ADE9A537C, + 0x1279E861A329E73F, 0x348FE88799E71EA4, + 0x606E4D3E3CCCF3EB, 0x8B5C51228CBF49EC, + 0xA01BC64DD4BFBBAC, 0x512AFDBE56A300EF, + 0x7A197E2521EE2BAB, 0x227D489B83127E69, + 0x6448050E9C2A7207, 0xA10A963F310E9A56, + 0xD0659E7EBA4B858A, 0xDA62D21D43B83C09, + 0x1C121FC9545E0D52, 0xDE33C45759FB1977, + 0xCFB0A0D8EDD145A3, 0x0297E633EADA2182, + 0x501478855A6074CE, 0x271E26F00E8A6125, + 0xA5EFC3E847D60507, 0xE16921572C9F67B5, + 0x208A1888007FC0E6, 0xC3C4B4BE188B77CA, + 0xB552929B85FC27EC, 0xAC4758C45E6AFF0D, + 0x90A43CC281FFAB46, 0x5D19BDCFD0320F11, + 0x93028F1DB42BFD08, 0x641C86A22CC715D4, + 0xECDC202B25E5CF48, 0x212519847CEA2BBE, + 0xC65AB383CD91DF98, 0x4200AA9EB255E874, + 0x13AD665062541A7E, 0x9EE77A2A8E060D95, + 0x92D619E420858204, 0xD6844D3104C3ABBF, + 0x0D77A82DC2D0DA59, 0x722971BAB3E4284A, + 0xF7EC25A3EBEEC726, 0x5B86EDC52BCEECF5, + 0xEEB64139BA29A7CF, 0xEA38A0CECA79D07B, + 0x25361A96E0F7E419, 0xA0A9E9496E9899BC, + 0xA7C511FA1C5BDA38, 0x23D23D5696058D5D, + 0x637822DC2AFEEBF8, 0x5E7635B9465CC034, + 0xCE4AC0439F607045, 0x415C778704E5399B, + 0xFCD5C8E06E502F5A, 0xD5504E3827DE12F9, + 0x23B59D8912F94246, 0x8D8DE9C78C56165D, + 0x97B0DB5B4AA74E77, 0x1C53495E38DE08B7, + 0x93A3996368C94158, 0x9982130A0A4E9E8E, + 0xB25DC90BAD56CA42, 0xAEBEF7AEA5E74A38, + 0x3DEC726C25A11BAC, 0xD26CA43E28737C33, + 0x9E8C908F41584ECD, 0xFEC4BF4E27AF2652, + 0x0564B9FF9631B82C, 0xDE323D1EB0316B81, + 0x33A60D8BDD6E508C, 0x59C31C76CE3984FA, + 0x7EA2B6AF97ECA6ED, 0xA2DFFBCD9CFB74A3, + 0x424D4687FA1E5652, 0x06883FE08D5D5F4A, + 0xAA0008F3BBB8F416, 0x2409E8C654B3CB46, + 0x1162EA8AE9D24EEA, 0xD02D8B7DEEF443C8, + 0x8C90FE4B381BA60A, 0x977BF7080DABA2E8, + 0xD1F7CA1535D22818, 0x640B13D2F5888F10, + 0x42A8EC77D5150CBE, 0x9D6C38C1CE8E7A02, + 0xC7C6789AA1CFEDD0, 0x3707E4839F4F6184, + 0xDBD2056652689917, 0xEEAB7C978D615172, + 0x9AFEFF481A85AB2E, 0x2C2F1450FAC84185, + 0x675721C9F644D161, 0xBDCE5D5EF559AB1D, + 0x1CEFB61F193070AE, 0xAEC698CEDC543F39, + 0xD2300034310557E4, 0x3634BAEDAA85178A, + 0x2735233A786B1BEF, 0xCCF6BD7E3E760F6A, + 0x54C7C4A94367717E, 0x4C9F834EDF566D4A, + 0x924426BFFD82E915, 0x72D6504D7D2FB611, + 0xA95F667A755725DA, 0x85C02B4B8175A748, + 0x135F9B7B7ADD2185, 0x65599BC71ECD9E96, + 0x439E9BC95B7E7FBE, 0x3287C8255BCD5846, + 0xBD12F8228410D9B4, 0x2DFA0FE2AE5529AD, + 0x876056684281655D, 0x61A265F59BC83F7B, + 0x7BBB1B54583ED410, 0xD99D30290D6BDAC2, + 0x128F79EDCECE4FD5, 0x7E30F64B65CAD638, + 0x1E3F1B1B891A2AAA, 0xCB1C0F2DEA8639F1, + 0x80C75307B1C42837, 0xACDC64E5D157EC08, + 0xA1B043EE79A916FB, 0x7B4DF4D15A3D8A63, + 0x97FF36A1D40EA00A, 0x066FC15C60D0E579, + 0xD75ACCF5E0FB5367, 0x9F2A8E0E21EBB678, + 0x762DB2D380B48D04, 0x73CE25246161B5B6, + 0x6FD7816A36615F48, 0xB0A92D4A3B3FC3C4, + 0x97DD4C5944CC2E6A, 0xA792DE8F1143CAF4, + 0x061CB768363D6424, 0xCB546B3F6B77B643, + 0x679BE1DAF71DA874, 0x0D628BB90DA6214A, + 0xDDC635D5B3262C56, 0x6AB4199A9C48F05E, + 0x717CD6E6FAEBBEDC, 0x53DE9210BC084E9F, + 0x7FF548385680673F, 0x8F05701ADA031BAD, + 0x0CF2B696BBF945AE, 0x4793CFF25F0D14B5, + 0xB252BC036B525623, 0xC61A3EA05D996D93, + 0x0A9D0C2A3BBC86C1, 0xC0628DBC779B620D, + 0x9641588DAB93B4B5, 0x71BEA1F53F487FA5, + 0xEFE9C9A1651B81E6, 0x0B2AA94F5CF6C2DE, + 0x0FB82563989CF4FB, 0x97862ED5AE1B8593, + 0xC1805D05E6D4FE10, 0x46ACCB4A86ACE5AA, + 0xEB6F1A9B5510A5D2, 0x758F3C14DA65C51D, + 0x4C89FE2BDEB3F169, 0x9BA8CB55B5678B0F, + 0xB3C94A90D9FC9E62, 0xC50751593572DDAE, + 0x91AEF906BCA88877, 0x96DF114B59E81B9C, + 0x9DCE1F0F78260875, 0x4F0D59D7F89CFB54, + 0x487EB21CC7295BA1, 0x29CE559068C8CC1D, + 0x841142A1376E9006, 0xB2A402D1CC70DD0F, + 0xE679E3E06E363892, 0x53DE1F9BC0FF9BF9, + 0xBEDB96A7584AA8CF, 0x0854A007D3887A73, + 0xBCE595371A5FBAAF, 0x4B1AFDD5000FDA01, + 0xAA059C615DE9DD03, 0x8B27CC6455F82A38, + 0xCEA553E35C2246E1, 0x386E1611B601A647, + 0x1186940ED72FFEEC, 0x094E93246CCC9103, + 0xC694D74949CAFD0C, 0x823A242AE0E78CEF, + 0xF2BFA0430F0A0FCB, 0x65FFB0A9D15E084E, + 0xB48FCED898292E52, 0xE9B5676DFF7B46CD, + 0x6FCF8DDEA146C45B, 0x0206FE451E16E368, + 0xD43D95C7A869447F, 0xD3283E98D2EC2A5C, + 0xEFFED78E9011134D, 0x2CBBA235A635CC58, + 0x899BA936634A322E, 0x3673B6048EE4354F, + 0x7EEC7E4F6984A16A, 0x7567140AEEBE24B9, + 0x52AF537A0C5B8AAD, 0x94DF8EC7DE1863A1, + 0xA43D5C6FE51ADBEF, 0xEEC9E321329FBFBB, + 0xF3CC740D36221548, 0xAE9976D431F081BE, + 0xFBA08C503DD5FA58, 0x3A63BEB7A1E25FB1, + 0x3EB1FE9E8E908E15, 0x37DE87D06B5C195D, + 0xF4D8E7AC2A27758C, 0x5002208C5710DBEB, + 0x5873C14A52D74236, 0x58BE94140CB54801, + 0x313CE5879CEB6FCD, 0x644B8DBA4F69BB73, + 0x96EF97DAEB89BEF5, 0xE14CAD6B2BF240B6, + 0x632106CC96E82E91, 0x1567C6DF07BA7B08, + 0xBC9823AB80A3DCAC, 0x1FC1AC701B3D18D7, + 0xD79185689F8FD5DF, 0x1B77A75DE179E7FC, + 0x75D3691713C3B05A, 0x2F5C1E9CBB254D00, + 0x8DB8CFFD58B62552, 0x16EB94D2E38AD136, + 0x93B0FB27C9A04060, 0x2CD796D9868722DB, + 0x61E111E323419E07, 0x7DAFCA3E4EC9113B, + 0x74E20C9145FB66FD, 0x2FA81C60CF2A8DC4, + 0xE902EF951DCE178F, 0xC053645D99AC7C4E, + 0x394CD08E31313C28, 0xCFFB7963C01FA6C5, + 0x311438A071DD9B1A, 0xF1314BCA431A7302, + 0x40C8656EDAEDD569, 0x80C744B6449E4AEB, + 0x212A8D0D2BABFAC2, 0xA08B79ACC38AAA7A, + 0x7DD234D6F3914C5B, 0xCA319362CA231A89, + 0xABB2FA71C83A1B72, 0xA8AC1A7C8E8350D4, + 0xED481732DFF7E997, 0x6E4E355746751127, + 0x0589B5E791CE9B2B, 0x68A97E36279487AD, + 0xE5F5A060439C2F5D, 0x5FDBD649416655B2, + 0xA956C1C3EDB1E734, 0x5A375779AFEF3491, + 0x826D1EE4D1CAFC78, 0x404B58E6C3D47F78, + 0x05A50AF38947EB8D, 0xD64B042C61BD5831, + 0xB5B7742424BD4445, 0xD394411AD4D4D885, + 0x6A51F78772175A51, 0xD6159D9B9FBB833B, + 0x374706271354CB18, 0x983922010566AB19, + 0x4CAFEBFA21EC188D, 0x4CAFEBFA21EC188D, + 0x1899F328B0E12848, 0x9E695CE384C77EF0, + 0x45905BE8654AE067, 0xA5F36A36C49A3EDD, + 0xC01E93FAC20C3346, 0x3BEBAA66F6365B04, + 0xF5F1E89A970B7796, 0xCF597F712411CE3D, + 0x5E3CF89C6BCCA67D, 0x84F073038B557438, + 0xA8ACB6459542A8C8, 0x6C8E92D4F56B150E, + 0x7A5487FE9FAA6B48, 0x551F46B3C7DFB654, + 0x4FEF53183C3C6414, 0x4EC427EABB845D95, + 0xBA9330E7E5B44928, 0xE5CBFD5A687BD8FB, + 0xF0D31AD191A74F87, 0x909F156FC4077611, + 0xEB2D525B57F42B40, 0xDA81FB7770247CC0, + 0x2A2A52824DB96700, 0x9AFE344B15F7B1A4, + 0x30ED88D5E0C56A37, 0x9AC63BDB9DDAB5FD, + 0xF6F5161F4534EDFF, 0x82CE98309332159E, + 0xF8CC1EBE0B62E29F, 0x3B8A1884912A2D04, + 0x9D3151A373974804, 0xD478F2D087D53713, + 0xDD21B016E4289465, 0xDDF47F6DDC6615A5, + 0xFF1B8B4AA1C25DC8, 0xD0AC51DF5D1C2659, + 0xE625BEABBAFFDAB9, 0x5505579F3F8D58CB, + 0x46FB3ED415C7641C, 0x569A845E698486C7, + 0x2EAF1FDB2FB55698, 0x61A4FE6962D74E54, + 0x48B3886C1358D0D5, 0x8543AEC08F877EE9, + 0x0C1F7D49C39D2289, 0xC26D4C816CAB64BE, + 0x44F1012B69313374, 0x7E4F77FE197589E3, + 0xB59E4BD37AE292DB, 0x24014063155619C9, + 0x8817605C2BA76200, 0x78A215BE4DB6B654, + 0x63ECF581BC70E363, 0xED7395E0967076CB, + 0x678B9BB8C3F58FEB, 0x7EB56EF7F2EC63A6, + 0x4164F227D052E293, 0xC26F8B2CC24FCB67, + 0x4665F51EFED00034, 0xA0960047C459311C, + 0xF5A2C681787E579D, 0x0C456F50E9145299, + 0xB51B9AB9EF81868C, 0xF8B82D90D38269BC, + 0x858EC9FD25DE04AA, 0x665073F334F6F647, + 0x65042B9774C4435E, 0xC471A02A03AAE985, + 0x3D34E80EED4AE3BE, 0x7FFAB542797E5F31, + 0xF87D9F2301F7D206, 0x2BEF2FC1775B99DE, + 0x6373D1349925A70E, 0x9CF2691831C7455F, + 0xADF084FB8F075D06, 0xACDD3DE0475552EB, + 0xB479D9F0D48A1BC5, 0x220947A50D62F2C4, + 0x1F2E4E06DEA8992B, 0xD4A2115EEBB4C00A, + 0xF107E836A70DCE05, 0x80B248E2554D9583, + 0x6AFD2CD753FEEF83, 0x88CD7D8164EBB753, + 0xC6F5C0BCDC74D62D, 0x24D977CCEA37DAA4, + 0xA31FD15197B192BD, 0xE368706564BE90F6, + 0x9F7794730795E019, 0xA415F00D0E0DFBCE, + 0x2A8F319B392E7B3F, 0x8B7E22BF01310231, + 0x1461B28A06717D68, 0x947EDE920A8F18DE, + 0xBBF327DED94E4DEB, 0xB390B097FBA51C2C, + 0x04918A41BC9B8157, 0xA58DAC6D423FDD11, + 0x616093EC6B139DD9, 0xBD561C8FC7DDF9E1, + 0xCCA1072C29D096C2, 0xDC39E4D9D73B0D14, + 0xFCC228E07217FCAC, 0x5BCF1911DE29E0A0, + 0x4A0C7C9BB10ABB36, 0x998C4481FF4E6992, + 0xFF059E1E4C01E63C, 0x017139B13A2573C8, + 0x78857FC65CADB909, 0x2A385285C52FE593, + 0xFF41B4B141ED981C, 0x817234E2BB671752, + 0xB35CE999E8EF317E, 0x0D2F8BBA6E4F7540, + 0x5C90CAB09951A12F, 0xDAFF10BDBDC9849B, + 0xEC4B4B3B9908052A, 0x144E3A77B4F2EDA1, + 0x225798743970412B, 0x19BE4974BAAEF724, + 0xE16AA70CE9BEEDC3, 0x164977E75092F135, + 0x0D78DE0572D3969E, 0xBDAC3B01C179E4D3, + 0xA56F01F3765B93A0, 0x6AF7EE4DD9F8B944, + 0x78E8E3A640178255, 0x1E52FBE830B2DFCD, + 0x24B100C68C645951, 0x105ACD62DB7DB8BC, + 0xE0E500246FF73D66, 0xA74E2F732B02CE87, + 0xBFAFDB5FAAA5C5AB, 0xC6CD0D7571533E51, + 0x0378C08504160D0D, 0xC5F21E948A5D2284, + 0x6F697A66CE78674E, 0x5F128F6719C40572, + 0xF731332072F5156C, 0xF6AD8282F4B81331, + 0x96EE0EBA0163DF80, 0x76C905CE995A9E84, + 0xCCBA154209823057, 0xF03E9E22B505CC07, + 0xEEA929141F699854, 0xAD844C8843FC405C, + 0x3BBBD13E5041A79E, 0x839F23C59306846C, + 0x0FF2862B61A58AF9, 0x44DCBCEAF511DAD3, + 0x6F3D4ED9BEE4E61D, 0x89D65C5BDFA950D1, + 0x292564C735375EDF, 0xAA0388A540C6A667, + 0x0218BA067D249DEA, 0x8A11116E71D68687, + 0x00E73468D085F745, 0xE985910A96829016, + 0x225B8B35C88029B3, 0xCA4950AD4AC0DAD8, + 0xEF39EE20C537E98C, 0x55CC6D7C6CB3F611, + 0x37DEB0AA183FB6D8, 0xD8ADCF105AACD2F3, + 0xE791DF1F73ED2C8B, 0x07385B83EE1D8547, + 0x49DA8145672B2725, 0xE03F4310CEF39FF7, + 0x17299B63C7683A2B, 0x36AAC12D537ACD74, + 0xE8B9C0EC9E183F35, 0xC21D718F0BA31631, + 0x206BC5DC9D1AC70A, 0xC9C455A5B1CDEF99, + 0x45EEE61580806D63, 0xB5BF3BBD2E785884, + 0x34D23450F028B0BF, 0xFD9B1BA8BF1C7283, + 0x27F9D613092159CF, 0x14A7049BB956BDF6, + 0xEB8517DDA73720DA, 0x0A96EAF2259A326C, + 0x416DBD4CD6ED8DD2, 0x387A0B2797EBDE5F, + 0x6070104B699B2EF4, 0x6360D952D171209C, + 0x1398582B7F72B3ED, 0x79F5ED0183BE95E8, + 0x4ED9C8D6DA297639, 0x4D77419044E951A1, + 0x6D6840CEE8845831, 0x4CB6F58014173870, + 0xF7F203E31F96F6A1, 0xBB1652A1D9D499DE, + 0xAEBF081FFC0A0E5E, 0x8C203143B9ABA0F6, + 0x0A9F2A468B328E74, 0xD9155337325CC582, + 0xBB9CE077274F6A1B, 0x4B770B4D8C1A469B, + 0xFF300C7649724A0B, 0x7CAF83C1CEFBCF89, + 0xA2746EEAE3E577CD, 0x876E875FF3B5415E, + 0xC7420099936CE286, 0x30E7F16626AABFCB, + 0xE7DF4E0545DFB56E, 0x699D9DA1A2A6FEA5, + 0xBE197EAA669238F4, 0x0BEE29C8C22E9616, + 0xB938B7E6D3C0620C, 0x70B32E52933EF2FB, + 0x2B3334BCA57CD799, 0x50AD811502907230, + 0x4145A4C44FF3B5A6, 0x0D48A4B15295A242, + 0xDC04FCAA7839D492, 0xCD8EA8870D89A8A3, + 0x69240733738C19A0, 0xEDBF7C79EF634D6C, + 0xAFC1CA75AD4074D1, 0xC2EBFA0B77E6B2D4, + 0x9C74B0BC831B753A, 0xF5B58EA504D56F28, + 0xCD183314F7CD2E57, 0xE36CA6B6FEC17E72, + 0x43C677F1E1158005, 0xDCDB00C8F8E60948, + 0xFC058F5121E54C32, 0xA1CC0998BBC30533, + 0xBE22B26DD764C040, 0xBF480D363C51CDF8, + 0x8FE22675A5A45817, 0x45D3E5CF91B9BFB7, + 0x952F06BEECD775CC, 0x64DFC253243C633C, + 0xEF0912DDF7C4CB4B, 0xAD2A40A210A89D47, + 0x5099BC55630B25AE, 0x49851BEFF428591A, + 0x8A8694B48715B000, 0x19200ACEA459C460, + 0xCF8BD3B0BD6D42D7, 0x5D66B6490FC7E937, + 0xC0714D0A7EEECA54, 0x800BE11D571E2E0D, + 0xA0682D67EF1FBA3D, 0x0D9DB1E3D67616B3, + 0xBD8D32550E5CEBFE, 0xFD3921D50955B92F, + 0x4EC12697209F2196, 0xA23A74F32BE523E6, + 0xEBCAB9E5048434F4, 0x60CB58283871142F, + 0x497BF74A7B9CB952, 0x76DCBBAB09EC9564, + 0xBDEB86F4D5809204, 0x32919DFB23E360CB, + 0x1E1497D0D2108115, 0xD6D38247A24743FA, + 0xEEF059FAD016D209, 0x5E7C0A485B91DB87, + 0xC4B5467A1886EA7E, 0x4229C0FE8A11D6B0, + 0xB9449845F73F5E9C, 0xD30F3934105F0A18, + 0x430386FE9BF80B45, 0x5AD02BBC63E31E46, + 0x8F5D1AD832AEB06C, 0x36E030BD64FC108B, + 0xBAF107B6BB2C97F0, 0x037D8E0CFB994CB5, + 0x8EF6B7AC68E2F01B, 0x7E5D5A3EE5810D41, + 0xF9D02130ECDD1D77, 0xE7F243941AC172E2, + 0x7F93691AB4B92272, 0x7337EEABC2904130, + 0xA3F3564A5B3646C0, 0x16F2C573F1E2F4AA, + 0xB5BA80F839791C0F, 0xD18C8678B41DB690, + 0x9F7BBA2EA6372500, 0x183A27B2BAE59089, + 0x036F97C908C2B52C, 0x257CAD90873BF327, + 0xE091339972F131A6, 0x3CB3EBCFEDAE9509, + 0xD4E8E24955024033, 0x6E1E3A5B1F9AB95B, + 0x0C432C1435F5E4FA, 0x975C995F2EE00CFE, + 0x2F057596F2BD0061, 0x586D916147C03659, + 0x1EAE6DD17B7A5EFA, 0xF96708E0100C7378, + 0x423DE3854BB50894, 0x8779A14B5EC7A124, + 0xC4582015556D1C46, 0xA5F854EED2C17AE8, + 0x057A25CFCC9DB671, 0x681BCB528BE0E859, + 0x8026FF78F208978A, 0x87A6D1DC20BA0737, + 0x1A24A179F9B31654, 0x9B050CE2036A4DAD, + 0xCB9E1EB3BE2AF4E9, 0xC460A3A85FF669A4, + 0xED8286F71A819BAA, 0x27A717D22B41275A, + 0xF3B9A78A178572B1, 0xC74074470B4DB0EF, + 0x06087579E7AA85A9, 0x05E4935538EE6AE6, + 0x14EAEA58F93B55AF, 0xF4D99B87EC8F5DEB, + 0xEB1774DF12BB9F12, 0x4C1B54FB5FD65245, + 0x27AA1C973CACFE63, 0x856891AEB889ABEC, + 0xF9C36251F6E48E33, 0x16E89AFE724F919D, + 0x42FDD0F017B1E38E, 0x0AF04716D74DE278, + 0xD81B7F27BC773E66, 0x2C86987E2C1DF572, + 0x8A97BCA30A0CE478, 0xD2FBB949CDCF79AB, + 0x7ECDF98587E92DEC, 0xF9997CBE42FCEA8F, + 0x8B9F1FC6AE8166C0, 0x1674A1DF3D5CBD74, + 0x4DC9A62F844D9337, 0x87DFDE65B6B249CD, + 0xFD1695C5D3B05439, 0x084862F5BBD6FFAF, + 0x7FF4944CC209192D, 0xD043E8A8264D756C, + 0x9A9D1BA639675CF1, 0x462B7521DBFFEDCF, + 0xF29CF591C4BF6CEE, 0x087B9DEC55AB5B29, + 0x04A355E041E004E6, 0x288277F22D527487, + 0xCC6E963682533882, 0x7A02F1956FAB1B75, + 0x7196842CB375CDB3, 0xA29F0AB6CCEE6A3F, + 0xF9C812CD7C46E817, 0xF1EF58EA136E80B6, + 0xD9127E83ABF7C631, 0xA3E93CD02923663B, + 0x523C79AEEFCC4A2A, 0xCD97E5C51C623F26, + 0x74FB3E29E6D10FA9, 0xF66D3F19222C4D15, + 0xD79DEEFB53455EBA, 0x75B41F5020877259, + 0x2D03E13C460760D6, 0x6BA7644E12CBBE22, + 0x57C51E6BAD752696, 0x64058BD9F4A43D49, + 0xD465A8599DFF6814, 0xC047DF82146A8B43, + 0x3CDC1E622CCE0356, 0x6A293C827ECF5B46, + 0xBFD8727AEA3CCEBA, 0xFD866EC0672D68D5, + 0x7C226D5346D4D10A, 0x9F3A2A1234329C4B, + 0xA3BB2E9555C05A8F, 0x8AE96123FEE66A18, + 0x62A0296C1BB1CEB3, 0x6100978FFB2F5CF7, + 0xBE8BE4FE60E27B72, 0x72D460C6FC1A44BE, + 0x88EAEC617CD26926, 0x0799E3D16AD1AA68, + 0x7EE3A3C5E4A40CC9, 0xB021D5C8EC8634FA, + 0xEA23C49EAA83ACFB, 0x45FA7A0C54EB2D43, + 0x6E0C692677008888, 0xF16503A9FA7DAFAA, + 0xC10322A8D3E061EE, 0xC10322A8D3E061EE, + 0x117C70D1F5730B5E, 0xD9090114620C5877, + 0x1DD2139A9A20DCE8, 0x7DF95A3626CFA8D1, + 0xF1E22DC13F5EEBAD, 0x3826166E8F5C2A2E, + 0xDF0D54BE7A776737, 0x6DA4474B7AD4DD92, + 0x2274BC1C4885E333, 0x8EB57098C563AB39, + 0x8214A4B5A7A33612, 0x4EE445F0C447DEF0, + 0x534E36D4DB9ECC5D, 0x509BDF5EE0D622DB, + 0x2CD90358F67D0AA8, 0x934D70FE78CC2D28, + 0xFDC07C58E8AAB715, 0xC39235AF19B4EF8E, + 0x2F41A3BAE005E5FA, 0x1B56B116998738B0, + 0xAAB11F6C4ADBC2C1, 0xB97C75B951EADE4C, + 0x7AE0589093A2E088, 0x16BD21768D0C0D2F, + 0x27F248C3FEBFAAD3, 0x27F248C3FEBFAAD3, + 0xFD4CCDBCC59941B7, 0xCDDAB3241735D813, + 0x62454A641B41F3C5, 0x15A3DE8D4CCE149C, + 0x128A747F4A230952, 0x5FA865B593FF3A8A, + 0xC594B315EDF2D4AF, 0x209ED845F8525F5B, + 0x3E9679C1DFCF422C, 0xD8C2967D4CA9110F, + 0x1600FD8CF72EBC12, 0xFACCA4B8B3988DCF, + 0x7242F8B741CE1086, 0xDCB30D6FCD1A888B, + 0x4419966C9936071A, 0x69A05F076ED895A6, + 0x47619ABE8B268C60, 0x0BEE6CF0D7950EAB, + 0xCEA66DAD478CD39B, 0x42E99B21B7BF92D8, + 0x336B3D200AB007CB, 0x41DAC3909ACCB648, + 0x290E2780BB7AA598, 0x23D49B7025936126, + 0x07FB139B592FA687, 0xABAA7F8FD10DCDF2, + 0xB15162CB5826E9E8, 0x790D618D34F7307C, + 0x8DE69FE35CA09A45, 0xEB394039A41B68FE, + 0x834344A414C7C85D, 0x834344A414C7C85D, + 0xB57A49545BA53CE7, 0x94D4A49E53F5209A, + 0x7EC6F9A478A6A512, 0x413BA7BCD56974F3, + 0x9C375C315099DDE4, 0xF2A0735B7B685E2A, + 0x7BF1A54AE67AC070, 0x835ED6AD965A7CE0, + 0xDF1AF8B5D56542FA, 0xA9459CBE61076DF2, + 0xB70374A758007DFA, 0x516B80917207F1FA, + 0x4462658788425076, 0xD178FAC782CC9453, + 0xA75EAC69F59E96E7, 0xF31622289C134E5A, + 0xCB215C4B56A7FAE7, 0x15E743373D87C416, + 0x726256CC1EEB182F, 0xB3099507583713CA, + 0x5845066D8A1EA7F7, 0xF8A810BF1F3377C1, + 0xF833DDBA3B104D43, 0x9AD2F0804D8219F1, + 0x72D918C99BCACC54, 0x68B90AB279E39C7B, + 0xDFC252D8A3E15AB7, 0xDDE84EF472C2544E, + 0x45A561A9421AB6AD, 0xC89956B0D1E1BB89, + 0x84DE3B5FB3E666F0, 0xF7A474F15CF17425, + 0x75C55983C2C39DAA, 0x74B753151F422F57, + 0x1C1B69FAE509BA97, 0xE05E39EE05F0EE2F, + 0xD55DDFB47991A294, 0x9238F02D7EC54353, + 0x8821196D91FA2DE5, 0xF67395AA3D3AD18A, + 0xBC9CFF381338CB4F, 0x28B81D29CDEA054E, + 0xADF692B254977C0C, 0x2FF622571073AA69, + 0x27561561732A7842, 0x1AAA5445D3C56366, + 0xB4C8D77C80C0421E, 0xF05B5D288F7E1944, + 0xBF286C554784F3DF, 0x4667D737506FA411, + 0xCEA04D83135264CC, 0x2BD4A25EBA9A42AD, + 0x8881C98A31117998, 0x8381607823482FFB, + 0x8CFF648FBD7330F1, 0x5DD93AB0945508AA, + 0x781DE8FA214E87D2, 0x01416851DC32958C, + 0x320C35147D5B5DDD, 0x1CB9689363D61451, + 0xEA1E2D93F6F75ED9, 0xB6E25AF70587D361, + 0x181EC197DAEFE121, 0xC01ED4D29D5B6686, + 0xC2C97EA97711D1AE, 0x579D4AD8ADB5ABAF, + 0xFEBFBFDFB66039DE, 0xBA504270EBAF176A, + 0xEF0D582CBF2D9B0F, 0x6C8A8DADCB013067, + 0xE301BD63E9E13CF0, 0x5008DA29B95E7CD2, + 0x8B2FD4560E55DD2D, 0x8EBD542C90FF0C85, + 0xBC9490CA15AEA8FB, 0x60B6E503C771D350, + 0xA247F9EF01D8082E, 0xD5EFE8BB04B7B6FE, + 0x9346E14F2AF74D46, 0xF4B632243FE0F182, + 0x2B9EEDC07BD06B9F, 0x44AF25C80C878F6D, + 0xF9904D11F1ACBEC3, 0xC79B5F82DEA55E86, + 0x878FF156D36E9956, 0xA66B02CCCE37E01C, + 0x1A092BB0C3808B96, 0x337507F493AD865C, + 0x5473D4195058B2E4, 0x74F78FD8E814CE1A, + 0xAABD62873FFB1A33, 0xAA7DFD3342F5365A, + 0xD57AAAE0E2214D11, 0x0975E2E6FB795E87, + 0xD39D13C9FEBF0511, 0x9DB527289091237A, + 0xA5A9653A8D2CAF48, 0xA612B061C0F9114D, + 0x3D245789CE12982C, 0x9104E9283667AF15, + 0x0729BAC1B8C64317, 0xDC7BC866AEE6CFC6, + 0x9A665550F8DA349B, 0x8DBA1FEC6E8235EE, + 0x7D36291161859389, 0x58ABF980EDF95897, + 0x36391F397731595D, 0xA926D8037A6B0872, + 0x6B3C4650BC8BEE47, 0x86DCEA820A4188A6, + 0xFC40CBF7B90CA77C, 0xD1A5295FE7ADF001, + 0xD796CB5BA8F20E32, 0xDC89C3FDCADCA32F, + 0x837155CD2F63DA09, 0x1EF92774F7B1187E, + 0xE38E9162A2500646, 0x622E46C9F30FB60D, + 0x4C134B4DF76025D0, 0x3FB57058E287267D, + 0x0CF54F20DE43879C, 0x4AC2772F085903BA, + 0x68B2B5F33BA63C41, 0xD0AC4C0F8DCECA73, + 0x6100B3CEFD43452E, 0x808C2477658579B6, + 0x1A67DFBF1F5C3835, 0x1A67DFBF1F5C3835, + 0x7A42B2E236E71415, 0xFFF5F34698660585, + 0x5AC79C98C5C17F05, 0x5AC79C98C5C17F05, + 0x70D2CC8A542A973C, 0x190AC5629FEB9BDC, + 0x1098355A16064BB3, 0x0B567AA96312A58C, + 0x3195F8DD0D531052, 0xD5D361CB7F2DD1F4, + 0x2EAC52B4019E2782, 0x1C8EA7DABB529A31, + 0x26B0E73D7EAAF4D3, 0xE75EE67F14EAAE37, + 0xDC6F8601FAF2E893, 0x538570A438881689, + 0x7B718E197453F2D9, 0xEBE6F36D9C6FAABB, + 0x09606148B6C71DEF, 0x334536EB69E83954, + 0x95E3D6257B166CF2, 0xD29D1374727D1C85, + 0x407D0B57022DC70A, 0xFB1FF9FAD572A96D, + 0x4EA3F425C7744D21, 0x4C4075145A10F0E7, + 0xDFC8CBC606FDB0FC, 0x7A191EFAA83616A8, + 0x813A0A7C9D2E831F, 0x8070052C0707D4F6, + 0x7619364C82D3BF14, 0x127E1B9B961298DF, + 0x1718DE8E3F2823CA, 0x0B87A8220B73252D, + 0x42FCE14F50F27291, 0x9702A99485767693, + 0x6B0E6172C9A4D902, 0xA86BCC60BEE70C8A, + 0x9A987297ED8BD838, 0x65C6DBC40481CB81, + 0x908311265D42A820, 0x4FD2CEFB8C7D9397, + 0xA72BC0B675B1519E, 0xE22116C6D321FECA, + 0xF159A63806BB5BA8, 0x753CC642F3D373C0, + 0x736D7AA1B750856B, 0xB803D1857792AEC5, + 0x02B15662D7F8886F, 0x7A4185C9A76C12B2, + 0x2B40A97646381508, 0x18483AA0EAC0B3AC, + 0x5539C3EBF104A53A, 0xDB4F733568E67770, + 0xB2D0BDE54F0E8E5A, 0x0BFA0C1103173C87, + 0x12103B9E0C9F92FB, 0x1DA40927CAB4A47E, + 0x367B936610BA360C, 0x854C404AEB476240, + 0xC8F4131414C835A1, 0x006F984DD96005C7, + 0x557E43C447E700A8, 0xC88DEA05B3199327, + 0x8D768602ADEF2245, 0xB0332C7BBA1832E5, + 0xDA5F8727EB75B926, 0xF87E67F857B95356, + 0x08F96CA6C551AD51, 0x5854DF8212C41C85, + 0x66680A92700F43DF, 0x2D0F2BF9BAF6A1AD, + 0x298B91AE825E5705, 0xD1A2328AC17D6F4C, + 0xE4723DB6E736CCFF, 0xB263F75DA9A6E89D, + 0xD6429A016084F1A5, 0x229E8F08D62A7D93, + 0xBC4C9EA5391ECC0D, 0x184AACD856873F4C, + 0x737E398138550FFF, 0xF01530C0F19E8282, + 0xC55854C7D7274882, 0x7AE639A1B7BEB0D6, + 0x9D77056A530643F6, 0x49648AD747832803, + 0x46818D79B1F7499A, 0x6DCCE0FDB3CB1D7F, + 0xA238192F33110615, 0x3E7C3F788F2093CE, + 0x44D28D5DDFE5F68C, 0x8F009EEA60C6F8F5, + 0x338D2E3477711050, 0xD40BB860F1299B57, + 0x2D0FC594D1E9C107, 0x17103BF9F0AE1BD0, + 0x0A6EB355EE14A2DB, 0x60830BBC6FC08247, + 0xD7B80E7C3BEFC396, 0x75DE023B2CB7B528, + 0xC54C95DA968EC5B5, 0xB5DB9CB3922C41A7, + 0x814AF7DCAACC597B, 0x4C7E831414FAE3D7, + 0x0368B3A838070348, 0xF94D55021DC59203, + 0x586AFE3FF72D996E, 0xB5BBED356C99E704, + 0x1055AC3A667F09D9, 0xB4B476E0D00F2FA9, + 0x95D2D383D5396B8A, 0x055724FF317B4B7A, + 0x9DBA107B4937F809, 0x7DF18B623115AF1C, + 0xB2092A1EAA7FD45F, 0x5E32EA3E4EEE0AEE, + 0xF12E33034D887F66, 0xD946E6EB2733A43B, + 0x08AAFD0814722BC3, 0x62C887286E017F93, + 0x43C851690662113D, 0x023B0D7338A99FEA, + 0x0FA6E4B75F302400, 0xC24DBD6705C8F67E, + 0x98EFA132A4117BE1, 0x7A4EA1D3F050E568, + 0x77168D722C58B2FC, 0xC2C9D2CF0796BFFF, + 0xD38C4A6D047C019D, 0xBE675095468F2B10, + 0x125BF4ABFC536B09, 0xC9B5453495D7D28E, + 0x5B48A06DD0E792A5, 0xEE4ECD71860C0F1B, + 0x1989C6E6F67E76A8, 0x33B0350E70444F14, + 0x0CB6B3446855B57A, 0xEEEBDE8A9B2394FC, + 0x5234F9F10919EABA, 0x3E8724B048C8403E, + 0x1885BC9B108B4C99, 0x201D631D5AD7EBF4, + 0x15B8ECF844EE67ED, 0x91D137360A62E65D, + 0x79CFD9827CC979B6, 0xCD663CB6A9EAFB34, + 0xCB2CF5148012C8D0, 0x42CE89CF8FB079E5, + 0x6B7513D9966FBEC0, 0x533E323CD73D0001, + 0xC27E1CC2D795105E, 0x19D76D7797ADA482, + 0x3B2FD68DB5F8331C, 0x5FF3FC5E256DDCC7, + 0x9A41CF4674A12272, 0xF7F6A9157CE1B76E, + 0xA2F80B8D040727CC, 0xBB18EA5F1620FF5F, + 0x31727907B2C43C55, 0xDE52BEB5A3F6F081, + 0x202A5ED9CE01D6E7, 0x95F4204438EC7CB9, + 0xCA94551B50B4932C, 0x481CBED1F160D1F5, + 0xF9ACF4A08098EA25, 0x65DC5E51A54DD60D, + 0x4C5E1F087CD10BB7, 0xCF53468C75AE9537, + 0xF538081986E49E9D, 0x72B26E0E77583A99, + 0x845BAD77CC770633, 0x04DD7CE0F03C289C, + 0x9DE327631295B4C2, 0x32FBDF1C2B7942F9, + 0xE0E8BEECCA96BA31, 0xDA729DC5065773A2, + 0x0AE73D8DF3A762B2, 0xBCB30BE1CC07FBB0, + 0x5EAAD83F8CFB4575, 0x60BEF0DC9370900E, + 0xEEE6EACBE8874FBA, 0xEDDAF8F99F371228, + 0x048746E388762E11, 0xDD14CDB3B8003696, + 0x171DB82E3FFD657F, 0x6E203618AFFA0223, + 0xB8322EEB38BE7C26, 0x538DFFC8A320F507, + 0xB309EBEA797E001F, 0x751124B4ECCB0160, + 0x57AB4A3080F85143, 0x906F945A9175295C, + 0xA13E93403F26C812, 0x827505E659355200, + 0x17440AA15D1D3739, 0xE104B1588FD28AEA, + 0xC434133D9BA52777, 0x82BFA44CC46FB88D, + 0xED51733DC73AED51, 0xF1E9457D924C3281, + 0x00A1CADD00108836, 0x950D9BA67C3302DA, + 0xFB8794444A7D60FB, 0x2FD44C03FD3FFB0A, + 0xADBE4809F19F927A, 0xF0BD1DDC919E4BA7, + 0xDE18220B1C183EDA, 0xF239BBB6721A66B0, + 0x911024442F4898F0, 0x485360997059853A, + 0xF83D0FEBE75E62C9, 0x55FFFAA4A7EF5C9F, + 0x908CBECC2CAA3690, 0x0711D6B5B61B3EBC, + 0x44B37CDCAE765AAE, 0xFCB2BEF69A4BBBA9, + 0x6F4C85ACD641BCD2, 0x90AEF504CEC79ACE, + 0x0EAEB0DB4B132399, 0xA66693527106D3DF, + 0xF56B8137DF10135D, 0x3EF96E7058EDBAFE, + 0xD6ADE981781FCA09, 0x91C0C081C79E8F3D, + 0x734E1714D077DA9A, 0x12C799CAEDA6AE3F, + 0x1DE0F5F50D723CAA, 0x61E5A12A54AF7ABF, + 0xBB779C0CA917E865, 0x544677934225FF04, + 0xD10282B6E3751BA0, 0xC1D06696CC3E719B, + 0x487A82C650EB7799, 0x791FA2C27A7A2BC5, + 0xE1E65CA8AC9C00ED, 0x4063423DD6B86995, + 0x726845132380142E, 0xEE7AA8559A163993, + 0x7CD934010E115C2C, 0xC9B8E88428C4C45A, + 0x77C3CEC46BE286F6, 0x77C3CEC46BE286F6, + 0xE3B27E70CEAB9F0C, 0xACFB6D8CB325EF49, + 0x1E8C308FD312C036, 0xFE9B2B065B8931FE, + 0x11B56FBBF7224868, 0x3E30A427442AEB24, + 0x8530AD776CD72B12, 0x5535F005DD8AE6E4, + 0xF827589017D4E4A9, 0x54C8A2583D2132C3, + 0xD716F30D8C8980E2, 0xCE76368F9C118E01, + 0x82A3D6D9CC2CB8E3, 0xDFFF30951A32BFA9, + 0x3BD770D281982DB5, 0x70AA697C9D69D60B, + 0x3F2023999AD51C1F, 0x3E72EB0926A107F9, + 0x717C8481234E3B88, 0x3D915D0A501B4252, + 0x5619BFA07CFD7833, 0x4D68C1E97B11324A, + 0x8C4B92553E4766A5, 0x0602C700974DF696, + 0x1C57C94A6446492A, 0x63B7A52E383DA56B, + 0xA46B73FAA3460AE1, 0x05A87766807B8A5C, + 0x36E353271F0E90EE, 0x13A4C28F44262AD2, + 0xEBFA8D50ADDC54C4, 0x61138E2C2EEAF0D2, + 0x42CBE54462D92634, 0xF9842BF7E4D7204C, + 0xCAE1DC9A0E22A16D, 0x5EECEC1AB3042BE6, + 0xD9D2CFFF49FAB35F, 0xF471787D45ADC2C1, + 0x36DD3FE58B5E5212, 0x53DD69457A3D0B2A, + 0x79344060496A5A56, 0x5CE61A4FC4F936F3, + 0x4879E4FE39074CDF, 0xFD0989E6AB2F6237, + 0x9DA58CDBF6BDBC08, 0xDC2CFB61094E641C, + 0xA74AD2439468C883, 0x3B04E84265C94927, + 0xC58424BA936EB458, 0x9D7453DF8B7E9E0B, + 0x0BE84C318BA6EC22, 0xF5A4E13E4B8151D8, + 0xD8AFB345A9C5CCBB, 0x347A83B3F61970C7, + 0xDCFB5D4DB8BF367E, 0xC737989CC7E336AD, + 0x95AB8B5C992C7B58, 0x8875237855302F87, + 0xC5042CC6F5E3D450, 0xCC7E6EA219FD8BAC, + 0x76BF03FADBF154F5, 0x84070F79DE396386, + 0x3B390A939AF0B5FC, 0xCB28DE3FB15F0590, + 0xC158D28142A34608, 0x72B821E81E209502, + 0xA19EC0786E326E06, 0x5BBF474CD1C1B439, + 0xC141B8917E0017EC, 0x444C68024D4B8F02, + 0x346D81500D088F42, 0x4598B7969D5B0A28, + 0xDC54A7AF8B3A14EF, 0x9859EF5E826A0C49, + 0xBFA0A56A817C6C7D, 0x8ED22902F82371F4, + 0x4D953DF78EBF8158, 0xE3937CF873D88258, + 0xC1670E958EEE24E5, 0x13812A3531901D7E, + 0x438B3D7CA026FE91, 0xB284C9C04FE64454, + 0xBC8DBDCA2436F7E8, 0xDBB89442BDC45F07, + 0x20AC25E781AE4A84, 0x94A63B54D2692FB0, + 0x2AED6301F67007D5, 0x40D79ADB3AFD3714, + 0x3655F544CD30F0B5, 0x18FFE24AC7E1FFD3, + 0x6A09D0D590A47D13, 0x5430382E766E9A40, + 0xB9562064627FF9DB, 0xEC480CACDED4DEA3, + 0xD39B3FFF8FFDD5BF, 0xB31202004947E8D4, + 0xF04C1C27DA35F6C8, 0x68002870F0EF2AD1, + 0xDA95EA3317CC5064, 0x1B921275475F821D, + 0x45F35C0EDC33B03B, 0x94AD7485CB29A8A5, + 0x7E2BD3EF6C205F09, 0xF1559FBE91F13465, + 0xD53F3A29BCE2580E, 0x0CDC949C7755E2B1, + 0x05B7A89BD78797FC, 0xFA82BD1142427E0F, + 0xF99F62004024D506, 0x50C48398530754F8, + 0xC92717EF615B6704, 0xFD11888B7E4927D4, + 0x5AD3932DAEB1E5D3, 0xDDA36ECC91263505, + 0xED6D8E27A43B8CDE, 0x0781C5F2DE0CF2D1, + 0xC7EF1BA83230BA07, 0xC6E0F466730B731B, + 0x643ED62D5EA3BEBD, 0xBD9F36815B9331DB, + 0xFCA9373EF340AC0A, 0x3F3EF2D8197E01C5, + 0xFD325494792302D7, 0xF2D01F1FC4E70556, + 0x90A78ECAA4E78453, 0x6B437484F42FED9F, + 0xC142BE3BB9CE125F, 0x911740B9C4E02699, + 0x3E802F11FBE27674, 0x170B6F91C41712D7, + 0x0923DBF87DFF735E, 0x38D53F24C6EE54EB, + 0xDCCFD3F106C36AB4, 0xC94CED3B37BC6B1E, + 0xE2590BC29220CEBB, 0x04F03AEA116F9138, + 0x3353D13F09307691, 0xBA4914262909D9AE, + 0x2597A0D4A4FC2C77, 0x20049F9A0D7A93AB, + 0x0EB0585D15254740, 0xE475510533501D9B, + 0x8F5EA1C01D65A100, 0xCC84913491D43953, + 0x4215460B9B8B7FA0, 0x957EF324E4A5BE08, + 0x9237E334F6E43156, 0x6EDB158C436CA796, + 0xAFC7E5E075A96F46, 0x6B59206624FACF44, + 0x7F2F4F13AC5257EF, 0x9DA00280321C87D0, + 0x5F5D1665E352A839, 0xFA02DDD2134428AC, + 0x129466ED55140F8D, 0x9328727FD6F1A390, + 0x5B73C77D9EB66E24, 0xB6C1B9E2FFDAEEDF, + 0xCFDBDF5AE59BA0F4, 0xD1FC0E1627CF2399, + 0x6F79B93B0A8E4133, 0x3699D36B67CC8836, + 0xF4435D66A8E2905E, 0xC894B1D9685E4851, + 0x5A59271FFADD33C1, 0x7B44CC985AF750BD, + 0xC8EDE9BDBCCBA6D4, 0xC64CC06536A02F89, + 0x957838AAF91BD12D, 0xF578FA0681152EB7, + 0x7912F7FC4F6264B6, 0x87BE50F80F3FCEAB, + 0x39D55A620FCB6A3A, 0x145AB994058F1720, + 0xB2C1A29588A9F47C, 0xA0563D5B9FFA9E41, + 0x67C540AA08E4A6F5, 0x9B0169E27978C1A2, + 0xFE43368D2AA4F2FC, 0x6FEEF299DAD23D4D, + 0x5687C7F05B39E401, 0xCFDA317349B8ED8A, + 0x6E9C742F340CE5A2, 0xCDA6BA7E76D2CE61, + 0x5F0C4B5B1C393BE2, 0x498BA68C5EC86A24, + 0x267C78C60E806B9A, 0xB10D331AF5A4D8F3, + 0x12534C348C6CB68B, 0x72D30262CF8C8603, + 0x8217FD371A4625CF, 0x0B78271F13F30C96, + 0x31D1D2B858D25E6B, 0xFBF996570EE591A6, + 0x937C71165CF334B3, 0x770FA19E296094F2, + 0x13945951E16EF912, 0x7C9A8865AEED0309, + 0x2E0E1C2B4F6CB339, 0xDD3EBE641B253A60, + 0x01F6594B923B9251, 0xC80067C6E96DC6B4, + 0x0506ED94363AD905, 0x0F615D1063B43264, + 0xE66377CDDADA4810, 0xF34B0738F8494770, + 0x78F0424C34306220, 0x2CDF552D5D61653F, + 0xB9D0DD990DC141DD, 0x8EB7D0F716229BFB, + 0x29A16F8D621C4508, 0xF2CFEAB08D833641, + 0xBAA045B4E42F3C06, 0x7D68AE7B5B041BEC, + 0xFB1F9381E80FA13F, 0xB9C37024E5EEE91E, + 0xDEA36202FC3382DF, 0xE0726BDB50F62E73, + 0x77A84429DD9F0A15, 0x8CAA9D762494A9CB, + 0x5086C7843552CF85, 0x80C402DED399F70F, + 0xADFF1B2A555F5FBA, 0x42350E6CB2FD2E74, + 0x46B05BCAE43856B0, 0x388463F876032FA5, + 0x3A618A217E5154F0, 0x80B2E30CC8B794C0, + 0x9614B71F8ADB982B, 0xF496BF8D9348EB34, + 0xEB0A72181D4AA4AD, 0xC734998376020A87, + 0x3EDCB0505123623B, 0x20FB50DE4E866E5F, + 0x8EEDA153AD141BA4, 0xD0F4606D5A7F6B9A, + 0x54E22EA2C1956A8D, 0x746AE2E04D6C2AD2, + 0xF25DF915FA38C5F3, 0x6A021CF02A47AF78, + 0xDF04580C9D0969F3, 0xFBE33D351BF5BED3, + 0x24A49BEAF468DC90, 0xB30D6A3C06017D1B, + 0x425A920FDB9A0DDA, 0xCFA3A680CE5E08A0, + 0x4F548CABEAE553BC, 0x3E925A01ACC12777, + 0xD38744167B2FA257, 0xDD205B87CDFD0C1B, + 0x5F15302936E07111, 0x27DA7E2B98AB7899, + 0x2E1202248937775C, 0x4653B3967DE9F09C, + 0xBA291848A0815CA9, 0x3095B0C5EB2CFFEC, + 0xEA560AC9EEB1E19B, 0x8D07AFD4C275F767, + 0xF1C03A5352243A30, 0xE07F3955DD358B0C, + 0x0546524ADE2E9723, 0xE13F3E0ED3407B90, + 0x5FD1E1F011E76D7E, 0x8C74DB57A6F523C6, + 0xA731F608CA104E3C, 0xE5DEE9FAEB9878C1, + 0xDC9DA9E8789F5246, 0xC620F17EC4B6FFD4, + 0x186E5D252FA50E7D, 0x7EA43B6762051EA2, + 0x4899CB088EDF59B8, 0x04BC2951833EF44D, + 0x7C6B0C22F9F40BBE, 0xA13444986DC34E90, + 0x7D7A2E43E74E2EB8, 0xE10AFFAFED85BE48, + 0x6EA47DAE7FAD0EED, 0x4FF5AF70CF79B316, + 0xC0416B061F2B7E5E, 0x14ACDCA89CB02326, + 0x6F6981D2253C208F, 0x4E06EA55E2B40658, + 0x0F62619393661D6E, 0xF110FD550466AF1A, + 0x015B03EE1C43E6EC, 0x0F6F4E3FEB297CDE, + 0x29961D490E5814FD, 0x49DECB2035E77554, + 0xACCFB4ACF53551B0, 0x22C43B6780E8FE5B, + 0x17F58B88D085DBAC, 0xB69501AC5A1B3ECD, + 0xEA02E132F5C68722, 0xEA44C65D5434D223, + 0x4F5F651ACCC9C4CF, 0x2BB9918FB60097FC, + 0x02CE1D6AC0FC73EA, 0x570B61427466765A, + 0x476AE72C1D19D1A8, 0x921FA2B067591AE3, + 0xD4438C0564490E63, 0xF77714DC04607D63, + 0x44B80ABAB9D80BD3, 0xB9F59A3A63341AEA, + 0x0134F0835AB6BFCB, 0x008757980182E12F, + 0x9A3FF3DE163034E8, 0xECF99E4700177B8A, + 0xE5C0CF872C2AD150, 0xF44CD46B3EC53222, + 0xA17784FCA9548D15, 0xF3C80B2E954772A7, + 0xA03502FC581F7D9B, 0xBBBFF575B25E23CF, + 0xA38DCFFCEA8962FA, 0xB31CB7A737F771D3, + 0x51455483CF23ED97, 0x5E3585E4AFD19C6F, + 0x3D87450E15D98694, 0xA2B3B271E2AE7A08, + 0x6726BDCCC1932F0E, 0xC4EACCE45DBAA313, + 0x538D1179EC1AA9A9, 0x76CF4C5CBC443D53, + 0x71B0892EC081D60A, 0x1F7ED1C13023483B, + 0x89241A56BD926846, 0x4FA4693156BA81C8, + 0x02B1F2A72E0F5325, 0xE9CE2C2DF77691DF, + 0x6B5C83BA3EFE6A10, 0xCD9DCADC495AE8C8, + 0x786A4EB67B01BF0B, 0x026318B0D6FA55B9, + 0x576594E8D64375E2, 0x39B7FE5A54798F74, + 0xA3B0C41BA5CC0BB5, 0x791B4C3811D53DFA, + 0x5E346D934122613F, 0x8ACA9ACB93EC151E, + 0xCFEB8AF24FC1D0BB, 0x3406B7B02FBFBD2B, + 0x09E7ECA981D9B210, 0x385BB3443BD88252, + 0x9D7AFCBF21C51712, 0x248C63F59D846E8C, + 0x916F0A3CDEC3445E, 0x58905C04D9E1CE4C, + 0x7022BD828FA0B082, 0x7C25F5BCDD3E96FF, + 0x17C07FC640E86B4E, 0x885F3A431ECE75E3, + 0xCC25A4553DFBF9EA, 0xE0C7B6E3DB23C0A5, + 0xF54BB7B61036F335, 0x35C9FD2270689E6E, + 0x115722B1B9C14C1C, 0x037561EBFB8F7D13, + 0xD5C12A75C7B9497F, 0x5F3A27E14D5118E5, + 0x6C0E2E0125610278, 0xCB567ED25393C1DF, + 0xB743F735C03D7810, 0x65EA5C0B8D6FF005, + 0x693478ACBD7F18E7, 0x116AF1D341C50DC5, + 0xAF348AFCB575A441, 0xB2A9D75BBC6A614B, + 0x873FA65C778AD970, 0x775EE0EF25FF3461, + 0xA74802FB8D0B7814, 0xE7B9CAAF8DF31886, + 0x2D05CED3A38D0F3A, 0x8BE0C51D3486F755, + 0x53DDC75BC3AC0A90, 0x44038141877BB4B7, + 0xB385454F8791F57C, 0x9051B921FC6F516B, + 0x687C0B594907D2E8, 0xF1F83A49372E8286, + 0x55E86AF2712B36A1, 0xEFDEF37B67B5BBF4, + 0x9A1B3FCDB36C8697, 0x20F6F12F2945E30E, + 0x2472622CE1F2D45F, 0x62BE9FBA72051169, + 0xA4EFEF9440A5B0EF, 0x1F92B924178A26A9, + 0xC946FE14BE0EB5E2, 0x371AEC43AB6A2A94, + 0xEFD97FF47B745B8D, 0x914282B9D3994C97, + 0x30D779DE7C4F6DD3, 0x45A882EFDC9AC672, + 0xCF228E2AA03099C3, 0x8480C25C8B4ECE51, + 0xA36BFB5EE89F3D82, 0x6C02633F946DBCB6, + 0xDCCA191DF9980FD7, 0x0EF09B31D2D655FC, + 0x9DE986FC9A87C474, 0xEBB066F8EADD0C1F, + 0x9EBD751E5787BAF2, 0xA07AA4D857C37D97, + 0x6C4D0409BA1A2BC2, 0x74A693DD3506B353, + 0x805D7CBB36FD6C4C, 0x2288FA6B752930FB, + 0x0AA27680A0BD43FA, 0xB40044987521BC2C, + 0xF0A60040BE558F2D, 0x69EBAB1EE389F069, + 0x6C188BE134E074AA, 0xA91D83F2CC1345A6, + 0x143921E45EC44D62, 0xC9B73A3470421492, + 0xD0D7B1E680ED4A1A, 0xEEF24AC3000C8433, + 0x0A986918B102B448, 0xE1FB3759140178B0, + 0xEE778F8C7E1142E2, 0x5F95E51ABC3FC59A, + 0x6889498B3E19C797, 0x00A21BC78E06E96C, + 0x95EB9964FF5C5C65, 0xC6FB16A6BCF56FEE, + 0xE184F4F0DC5910E7, 0x2614BD180D42D9AF, + 0x5D10B3795F3FC886, 0x50309A384D827846, + 0x44FA03975424A0EE, 0x3C5048E96C5848FF, + 0x8D68C8FD0FACA94E, 0x50997FC21D62251F, + 0x44A8FCB8ED227738, 0xE8E46B75F88C4ACC, + 0x8117E09A19EEF4D3, 0xEDAD7560F6B69878, + 0xEFACC8AEF94430D5, 0xE74545263B038AF8, + 0x733C87D4CE22BEA2, 0xB4B9948C675E52DA, + 0x97A790315D3831FD, 0x5908C71389E833B2, + 0x450930E616475D0D, 0x956EB3331C33B055, + 0xA4718A1419D18151, 0x84236CF02FFEC68D, + 0x12995F2E53FFA601, 0xE23837F03D9D9CB5, + 0xC70B5FAE151982D8, 0x8A92595B8AA1D4E9, + 0x50FAC3A3E030A6E1, 0x8D896A7D8F933EE8, + 0xAF04C87F5DC1DF38, 0x6E5803BCAFED72FF, + 0x6E04F06094C87047, 0xB1F61A4A8522B5E8, + 0xBFFEAB45A9A9094A, 0xD93F965CFAC1D06A, + 0xF297383AA91DCA29, 0x05FF4D131FAE1483, + 0x95A6C46A31D1917D, 0x3E91F004683989A9, + 0x3841422E9C488D8C, 0x8D5B447F21217223, + 0xD966D51AA5B28BB9, 0x2DA7EDA3305A5996, + 0x0E48D1C262390950, 0xDC2AF9AB32FB87A8, + 0xE131A28626F81AB2, 0x64F7E3FF8F40315D, + 0x020E5F00CDA207BA, 0x5E84945E26CAEF1F, + 0x41350B4FC28E3941, 0xA7A00AC8D63239F8, + 0xFEC9A3B1820F3331, 0x3E27503FDE03009C, + 0x20AE33F3AC9C0033, 0x4358CC02801124D2, + 0xAAA553E7DD28A457, 0xAAF6295FFB2DFEA0, + 0xDB663CC9FF3407A9, 0xAE615D14AD94D3DE, + 0x241FCA5B1AA14F75, 0x6772DD8C24B39E0C, + 0xA989044E70010ABE, 0xE3F823943EA49532, + 0x8785E6E40C7A8818, 0xA15EA13398B66F93, + 0x33E179436C0B31DB, 0x3C11038EDEC5E20E, + 0xA356990E161C9E65, 0x1E8D6005DFE850FF, + 0xA071E0ED98F91286, 0xF20EFDE84DA70D03, + 0x7085228842B13A67, 0x80B82FD1974E28E0, + 0x7141766F91D15BEA, 0x5527519A6ADC0506, + 0x02CFBA0C9E9275CE, 0xA254566DBE36ADC9, + 0xC80A74AC829DDD92, 0x2271ED1E65FB75EE, + 0xD40AAC51E8E4C663, 0x9673CDADA8C3A4D1, + 0x42B2DAA6B596F5F8, 0x3740237A2BE9E6CE, + 0x5CEE3DF569CECAB0, 0x3D7DF9184AA51BF3, + 0xA134777FF7F33331, 0x560853B9DC47471B, + 0x107A473D7A6647A9, 0x413DDECCB7973790, + 0x6EA101606F6E4D81, 0x9CEE125774F2E68E, + 0x7AEFB85C1D49DEB6, 0xF8207455457B967E, + 0xF4080490ADC51C6F, 0x28CF45BC0F98DE7C, + 0xB3EA4FEABF41464B, 0x3F1D798756F2F30C, + 0x83660B734994124D, 0xA0C4009A98ED2161, + 0x23703CD154E83B88, 0x0E0B8D8B4E896661, + 0x9EC6603812C24710, 0x6750311806FF130A, + 0x2B7E9A4EAAA93C89, 0xB2EBF1DBE6A107A1, + 0xD69411AA0CEBF9E9, 0xCA5526F73381C600, + 0x380B4968D1E09E55, 0x50555DAE82AF2AFB, + 0x211C4EF450086857, 0x96D9EC12B0A4E1C7, + 0xAA6A47A573ABB75A, 0xC4BBA4BFB2442AA4, + 0xF33AB75780BA57DE, 0xC236342F1874172C, + 0x01ABCE5E7CBDA196, 0xC9640106BCAADF01, + 0x2B3451FA1E3142E2, 0x54EFA0F75262A2D9, + 0xD3997889736FD899, 0x3A8E088258373CEC, + 0xF2EAB31979A7F910, 0xB111AAA7C1B0D64F, + 0x5C707A667DF8B9FA, 0xA04CAEEE28D0C805, + 0x504D54DF3F6F2247, 0xCC5ED49CF9C9215F, + 0x89221B16730234F0, 0xDB991AD6976D84C0, + 0x5DA825A85D0EA6E6, 0xBABB1D0752FE2AD8, + 0x2016C603D6B8987C, 0xAFA2872DAFE0E3E4, + 0xA48931185F0536FE, 0x554296A515FE935E, + 0xB60A9CFEB21CA6AA, 0xE3AAC517B9D11996, + 0xA2716D40842EAF79, 0xB8705AAD47084011, + 0x27FEB5254759CDE3, 0x91501E532C60D30D, + 0xD92C739EE34C9EBA, 0x8E868F1DC956B37B, + 0xE3E2C1B4C59DBC77, 0x68B0D6E564002023, + 0x7A3F19700A4D0525, 0xF3C5658991970A49, + 0xFAA457EF263E8763, 0x61CA0A70118AC939, + 0x7C06330BFDDA182E, 0xCF5E0238EED8C89A, + 0x1B966F3EF609BADA, 0x4EA035B039DD5B6F, + 0x2057EF813397A772, 0xE118AC83D4EC499D, + 0xEDF4079F9D54C9A1, 0x2828751D3E482BF8, + 0x8378627201D5497D, 0x470BE7EE26E40D68, + 0xB80D8756B4668AB6, 0xF523AEC50C58B0E3, + 0x112209CE0290C03A, 0xD3647FAC74ED0856, + 0x1CA3E9EAC9D93E5E, 0x7B77FA6399B9DC6F, + 0x21C235BC64831E5A, 0x2D03FF047BE9813C, + 0x02A0C9720B854BFA, 0x15EEBCDA5164F71B, + 0x571FEB383F629926, 0x691350EA8B674944, + 0xC7DB36C24634F52B, 0x473AA4E75DFB2A1F, + 0x45F1DE9C34B93AE6, 0xE5A1D437BF9BAB7D, + 0xA78B8FA58200DA56, 0x57B909F83A6BC60E, + 0xF2BEBCDFAFDAA19E, 0x9A8087AB6568A7FE, + 0x470555300D10B2A5, 0xE544790FBAA57D4F, + 0x48164DBB970AC3F0, 0x398E01E1E257E266, + 0x462E0DB9B137DC5F, 0x8E9D6E2DA3B756D5, + 0xFF6BE494C7987F34, 0x5895B37ABB115488, + 0x291E373D483E7EE7, 0xC05DC8484A6BFDFC, + 0xB28ECA15046CA8B9, 0x6E1F1D2CB9DFB793, + 0x4757F00BC6323CFE, 0xAF6FA77785DC1A82, + 0xAA5D6B1888E4DB20, 0x105518C94E16D1C1, + 0x2DDFF3FB9075D747, 0x55F855356D92E38F, + 0x38491439B6BA7F7D, 0xF6C7A5A21FE66C97, + 0x99AC7F0D8B9C893D, 0x55005C717C7A23F7, + 0x0C112765300C7E1E, 0xA44572899F10D9DB, + 0x033C0F9A64E229AE, 0xD3D73954D371F8CC, + 0x65F0C5AE05943EC7, 0x8E93627D38C90C19, + 0x02DEAAC8F8EA7FE7, 0xBFCB4A2A59A0028C, + 0xCBDB9B923CACC92D, 0xEF9B9F0B4833C89D, + 0x4B7620C47217126C, 0x5B7F030015815CD0, + 0xB0760331C7AA4155, 0x986C539B536E0ED2, + 0xE977FC5B08AF3441, 0xB307285327497334, + 0x72751156E7678833, 0xF5AFB6AFBDD3C8FD, + 0x8098C8D6597AAE18, 0xC700800DCB05BD7E, + 0xA6F54BB2FFCA35EA, 0x21191EBAB2A13D65, + 0x5C544BC6C57AC575, 0x07BE48DF95787FCB, + 0x8AA464D4E0F6ACCD, 0xF1FBB82B2E8FF64C, + 0x6524A2F114706F43, 0x31ED3529E5017C08, + 0xF4A0DADB70F57FA6, 0xCF184CEB085BBAED, + 0x31698AA80E0223F8, 0xD026DD43A460DCC4, + 0x63F9EE203C3619F2, 0xB0339D553BD19B75, + 0xE1BB9CD469034F63, 0xDFC3B34E5322A694, + 0xE4B5F4BF2CB24E65, 0x06332363F8F14D77, + 0xF49ABC20D8552257, 0xD4CBBBBAF50CE75A, + 0xE4DCEC7FD5B739A5, 0xDE1408E18FB5EB43, + 0x605F5A140F202491, 0x4E37ACBE6D599CB9, + 0x3658E8CD94FC121A, 0x5478C744B6AAC199, + 0xA1607996431332DF, 0xE5AEA27726895658, + 0xD5451C7BF151EB6F, 0x3E6E98EB4BA25973, + 0xBC7BE5ABC0879F74, 0xCC754BF6F50E1C1D, + 0x5BA68A0840D546AC, 0x8C6C40D2FB54200E, + 0x9F97DA93681F87EA, 0xC871B21562468850, + 0xFC4842A34657BFCB, 0xD2179AB45928B7F4, + 0x10AB107B887214D8, 0x41ECB80EC1B45893, + 0x8A24B067D175A7BD, 0xF8245F6D163928BA, + 0x323F647679A09103, 0x2A43F3458619B33C, + 0x4F32C0D5A90A9B40, 0xEF482630D7014464, + 0xE4E2FD323574965C, 0x7456A265E82B99E9, + 0x0EC92A1BF0857187, 0x4C699345B11ACD30, + 0x1E45B34ADEBEE48E, 0x25BB121CFA358B18, + 0xAEEF48CDF5B6CE7C, 0xA40947BF4C26445B, + 0x41BC0D722FC04221, 0x55DB0C9C79CAC4B2, + 0xFAA23F2CBA159D67, 0xCB17594806A27FBA, + 0x7A2D8AD0A9EB9C3F, 0xE76ABB7DC1AD1626, + 0x593FEAE1F73392D4, 0x20D9BC02CB873D5D, + 0xEEED8FAFEC331A70, 0xC9D4B2958B9AD7E9, + 0x37D5F739FD494675, 0x6A425BA8758A63A7, + 0xFDDC2B4ED3C69DF0, 0x11618436C6AA1BE5, + 0x8147FFF6A718E1AD, 0x25CB978260013FB3, + 0x9134873537FA419C, 0x6A86865E010A134F, + 0x957E790EA1727B64, 0x642711D920F70943, + 0x4B805E6046EE9E47, 0x04F690ADA8C71424, + 0xCD79A550999D7D4F, 0x0BF48192C800C0A2, + 0x523A590C1A3CC0D3, 0xEA5DA18A7AC691A7, + 0xB4771B9AAF4E68E4, 0xD18E1315169D2D48, + 0x5486A79D9FBD342D, 0x9B357607D61E8EDE, + 0x0AB84296FED9CFC6, 0x350456E49ECBFB3D, + 0x9CFA4896C3A53CBB, 0x6D35F51EE0084769, + 0x3DD3F33A5D55EA6F, 0xC6767CDDDB2C0D16, + 0x2A56C06EBEF2B0D9, 0xF81CBD28BD382566, + 0xBF9BD71691857E48, 0xD91B27582ECB3B74, + 0xB8EBB1E9D3588C10, 0xDD499AF3B8580661, + 0x083961498679DC9F, 0x95F3ABD15748A3D6, + 0x749B023950D2311C, 0x82937FEADEC88326, + 0x80EC114669DAEFF4, 0x64C5FDABD2C1ACA3, + 0x73B000F7FBC55829, 0x10B2A949F7102F35, + 0x302C91AB2D477F7E, 0xEEAE95B4AED4ADF0, + 0xBB90E12CAC1DAB25, 0x0AC8FCF0CEC63F8F, + 0x6F06921E5086B58B, 0x6F06921E5086B58B, + 0xDB90C6CCA48940F1, 0xE17DA6B5116D8ACE, + 0x16754C556D2EDE3D, 0x6C2F471E0CF8D4CF, + 0x9614299DCB53E54B, 0xC606AE2A3209945E, + 0x0267D00AF114F17A, 0x80F0B256CF198970, + 0xB9EA40907C680580, 0x4DC1FDFBD910E9BC, + 0x0C698D8F099174C7, 0x09F6AE041F3F427B, + 0xEF29A16337FACADB, 0x0BE276BB74E9FC4E, + 0xE0E854F5280FB769, 0x7681EA195CC4F7B7, + 0xB1B1EA596344DFAB, 0xE9E3C11381ADDEDA, + 0xCD67AD041A394C9C, 0x4E696FF50C506340, + 0xDE45D1A1EF45EE61, 0xE2B90BF0AA28231A, + 0x918C7B2D2FF3928B, 0xE5E4B3732FC88664, + 0x0A6A279F3AA4FD70, 0x93543B430A00B898, + 0x8FD89A6240813FD0, 0x7AB7B929AD32440F, + 0xC5868A966E5BE3AE, 0x46B0B3A4244F35CA, + 0xC52E0F855C58FC2E, 0xAC3CFA578F251755, + 0x26143A59EF48B262, 0xDA5FD61382FC636C, + 0x5CEB25A7D2848963, 0x50AF090FE497FB2D, + 0x6CE36C35C1AC8163, 0x217D83915C7AF84C, + 0x148B08C2D2ACB884, 0x9054B8528B678AD6, + 0xE6A9F00D4240B519, 0x85ACBD340B3DA2BF, + 0x8B0FACEFC36C824B, 0xCD9A33FC14D7CC48, + 0x9748FA4DE50CCE3E, 0x182BD8385B538F03, + 0x2E0DC353342C4A6D, 0x93B9F446C9E48692, + 0xBA4B8D83BDC75551, 0x1FE9DFED9615F0A4, + 0x412F1364FA066CFB, 0x24AFB0439A02B63A, + 0x71B008056E5692D6, 0xE8FF84E6B65800A1, + 0x7B7723747CCB55B6, 0xEBB63BE9A9DCECF3, + 0xD04FE6765D990A06, 0xD434D640BD7DCF2B, + 0xCEDABC5900A0BF97, 0xF49153DE3D8F6474, + 0x36B77BB84687C318, 0xD0ACA001AE759042, + 0x84A2DD9AC37C35C1, 0xECEC7528A52B4EE8, + 0xB22B17DF858716A6, 0xC6B18CC04C8748FD, + 0x176CECF6F920D707, 0xB154967CB3B9C1CF, + 0x932C2D096A2C3FFF, 0x1F9A96198946E6F0, + 0x0F4CC924CF8C7B21, 0xFB7D2BF8B40462B0, + 0xA571991A7FE6CCEB, 0x7785488C353E6BAD, + 0x8A4E6AC373666BC5, 0x583EBEB5019595B2, + 0xDAF87174BE7454FF, 0x2506BDA3E4340FB9, + 0x5C3B791D580E0BC2, 0x1FEE5D177684B67A, + 0xE7E11B8DCBED1058, 0x4233E0A49029D39E, + 0x240A18690AE96513, 0xC2B18235ABE89FC1, + 0x5068F488DDB54DD8, 0x884A80337B41B3BC, + 0x3998B1276A3300E5, 0x98A0BE1A3A95E5D2, + 0xC401503DFE8D53CF, 0x3FAC20807B650B4F, + 0x2FB897405C90B361, 0x1EB7C71DA8CF1080, + 0x36CED73BFED89754, 0x18709FF6990F23CC, + 0x4159C2762B5791D6, 0xB3C4254EDD0C10A0, + 0x92EEF8458CAA9854, 0x24ABBD01DEFB693B, + 0xE496A53BA5F50A56, 0xAA5A955188A7BA43, + 0xC1F981A6F74F0C23, 0x3A062E7DECC9D58A, + 0x8ACD366038D14505, 0x4D136F296B8C248A, + 0xC4B3347BD68BD609, 0x764D30B9FE6672B2, + 0xF745B37630DF176B, 0x0571333E2C22FC64, + 0xF1A6C18B35BCADE6, 0xED18B547CC03A469, + 0x1B93E0107865DD40, 0x43B607A9E0E5F294, + 0xFF287323B0E2C69A, 0x44D90BC9C7FFCF49, + 0xCD8A7537A9B52F06, 0xA7E55BCB7431698B, + 0x1077788E268557C2, 0x0B4295B1608BB934, + 0xFAC18E7356BD3210, 0x2935B6CF697B016B, + 0xD24D37CC275948CC, 0x15173FB88ABC94F9, + 0xEC03C719DB2F4306, 0xACBFEBEFC4AB06E7, + 0xA2E9C1AB8A92E8CD, 0x45298A0DE4030450, + 0x70EA8DA57840F9BE, 0xB76ACACA6142D958, + 0xF059DA7298E8C072, 0x8138521DCE5C7E3A, + 0x6512765E3BE78C50, 0xF59936F11DA07629, + 0x33EE12743CCD6343, 0x1BD85D48E861FB97, + 0x8C825BDC7741D37C, 0x355512A1887B419A, + 0xE40C1C56DF95C2E8, 0xF2CEEA627AD5A24B, + 0xFE99B66D079CF6BC, 0x366E7F593105797F, + 0xA213B11DFF526300, 0x79C53638C293BCEA, + 0x8BCB27A057DF7B7F, 0x44F96D11C74C1DA7, + 0x06582AFF74894C75, 0xB53B32BE49106CD2, + 0xD71649DB0A545AA3, 0x836F48E8C4A773BF, + 0x9A497FE2DF198913, 0xECA23EB9C2A5E83F, + 0xE5564483E407F914, 0x76E23297A6BC5595, + 0x407C7F91DDB46C16, 0x12A99AB8C26E3AEB, + 0x3A8B55FDA4C8DDEF, 0x8BDDC6F7F5316855, + 0x8BAD02F0368D9E14, 0x7919C1F1872DDE8E, + 0x530944F6F4B8A214, 0xE6046EB2291D084D, + 0x2DE7EFA66B906036, 0x399B6D3F817B71F1, + 0xBA91D045575699AD, 0xB14FC6AF30784398, + 0xA0D3D71EA1086C55, 0x2095EF3EA22BA3DF, + 0x97E7E2C04245115B, 0xC72A784872F13376, + 0xC9D55B1A358A5BF7, 0x20799DE10C73159E, + 0x4683149ED1DDE7A1, 0x66418B7D13B71000, + 0xCC9682B8951C5229, 0x21F9691A2B528C26, + 0x5FD5ED82CBBE9989, 0xF9F9AA528C8CF8F3, + 0x2A30922C90C9B42C, 0x660FB6B2D8C885B2, + 0x37F4AD56ECBC0CD6, 0xF15BB9154218AE8D, + 0xE23D5873C2394C61, 0x5B2649BAEEF634B4, + 0x3442775428FD2DAA, 0x3336178C3CB28939, + 0x7472BB270D7B4F3E, 0xCAE17D0341C314BC, + 0x7AC752103856FB20, 0x901DB77DC7B4E063, + 0x73115226F4814E62, 0xB96693901B962802, + 0xAE2206545888AE49, 0x968102705396C4F1, + 0xC5EF963405593646, 0x488B94C6752B342B, + 0xC6AD107DDC9054CC, 0xD51BCA685734D511, + 0xBAF20C5432058024, 0xA70AB8E887871101, + 0xBF737600CDDBEADD, 0xD49E1805F5AA8792, + 0xBD06C611BB9048C2, 0xF12B931C29CD7B3C, + 0x06F761EA47C1D3ED, 0x0AFE9DE0395011BC, + 0x46D1A61A21F566FC, 0x8125B931328BBAB1, + 0xF6086BC836400876, 0x07B3E7B841604E09, + 0xB6C49F8A5E295A5D, 0x3943912232B2A7BF, + 0xDDE23F30CC5A0F03, 0x9A1487081C0EA57E, + 0xB3DA2606774A8E2D, 0xD744FAE5E36E967E, + 0x638A3A81733086DB, 0xC9D88F06B228AD40, + 0xCC6E3B6BB69501F1, 0x0891C4981A42AE5F, + 0xEACEEDA81751915C, 0x57D8512F9DA74735, + 0x971D7B15BCDBEF99, 0x149C1BD354486280, + 0x621873ECE1178967, 0xB4FD317C5D645749, + 0xC78E239AC5B2DDB9, 0x09E56FF13E16455A, + 0xC968670BFACE42D9, 0x4210287E2833D44B, + 0xAE287C923D891715, 0x5FE7F330FFD41D8C, + 0x56CEF0AC79073BDE, 0x472BD05C38FE7A6B, + 0xEBB376779A760AA8, 0x818DBE2400004E47, + 0x0764486AEDE748DB, 0x0764486AEDE748DB, + 0x710311ADF0E20730, 0xC5DE9743D6DA2C15, + 0xB4F90FAF7670B16F, 0x99F5981DB7185A0E, + 0xD2A71E1A77418A49, 0x5590FBCD51709DFE, + 0x76D26A22750E849E, 0xBE67CA25E182A32D, + 0x2B8FFBB76011CA06, 0x2B8FFBB76011CA06, + 0xED98E10B0AFCE4B4, 0x813B85D3250887DC, + 0xF5A788EB4172B53B, 0x8ECFB59E4DBE2DFC, + 0xD642319C54AADEB6, 0x1206F00794A7055F, + 0xB980061DA992779D, 0x554AD8AE4683BF3B, + 0x320D0E0D936A0E9B, 0x6131701056D50D92, + 0xA51C4B86B71652AE, 0xA6E95AA707AE98A6, + 0xBBC72712E80257A1, 0xA91C851005050418, + 0x6B38ECB05A63A685, 0xEBB70B706E0E5B44, + 0x66F010A4B031A331, 0x21748505935F3831, + 0xD3A9971CADAC7252, 0x7B9FDA1976BF0B5D, + 0x50CAD495A460B305, 0x1009A332C2986B7C, + 0x0CE3AA5E1CA19E10, 0x6C9577C090944B92, + 0x1461C72C889E343E, 0xF8AE879D2DF8CC1D, + 0x57D158647A6BFABF, 0x41BB6B0BDB7933FF, + 0x466DA42C89865553, 0x04E20025A2336736, + 0x16E42E800B472221, 0x7035164883B784B2, + 0x614DA022990752DC, 0xA1217FA3D209873F, + 0xE851E480B814D4BA, 0x668E3F4B659F1EE2, + 0xD80932D577274D40, 0x5723F3E75C8CABCD, + 0x72DE52178C291CB5, 0x12156A3FCF4F3077, + 0x4645DE9980999E93, 0xA391DF493DC78008, + 0x1E9057A74FD73E23, 0x8F52C2ACE471578A, + 0xA0CEFCEA390AAB9B, 0xE4675F8FD44CF622, + 0x9C1556705F864230, 0xCC0A83FC3512EBAD, + 0xEBAA9B64D76356FD, 0x273CF7425FFC8B07, + 0xEBD76F2359F190AC, 0x30B0040AB4AF815E, + 0x2B4A15E44DE0F478, 0xDA1F0FCE18FED8C1, + 0x4A9FDE3A5A6D0437, 0x72C4FCBC90F19F80, + 0x01BA3AED21C16CFB, 0x971F41C4C5255FF8, + 0xBB03C38DD3FB7FFD, 0x5B1CC5FA6ED00371, + 0xB0AD1238A709B1A2, 0x626F71E87C942957, + 0xFB8F2A6F3DF08CBE, 0x2DB841ACFCE581C9, + 0xCA78CFA0366592FE, 0xF086DE778B4E9DD9, + 0x7A556143A1C03898, 0xE9B24CFD75198D4C, + 0xCB4E8BE8A0063C5D, 0x9745FAC5B3E4C8B8, + 0x26C10ECBDA5D043B, 0x63342443951EE4F9, + 0x01095C95CD46B624, 0x8CEA62230161C905, + 0x94F12ABF9C79E339, 0x5A0258255BDE2FB1, + 0xD0BC1C6FB18EE154, 0xEA4481256DA774DF, + 0x2B5AA717A181FB4C, 0xDE4189C50F68F0A4, + 0xE07BCA305B82D2FD, 0x934EF04FD8E1E87C, + 0xEC5F66E459AF3BB2, 0x50EE6E8623617CB7, + 0x9911F4A24485F653, 0x519DA9A1F6257443, + 0xDE03620F8703A9DF, 0x58D0F0CFBE69C7B6, + 0x504DFE62A1692296, 0x9F2ACC43C6ECA22E, + 0x0A2E9FDB9A8C62F6, 0x56E8586DBDCE6FE2, + 0x8A694D7A68F8DC38, 0xC2EA5210C33CF647, + 0x797AC7CB535BA28F, 0x4E38E404B98F3D9A, + 0xEDBF6C9B0D2C65C8, 0xC64E4D091884458D, + 0x723538F61C647C5A, 0xF6BDE128C5D5DC93, + 0xF8B0F5A43E928C76, 0xC9B12AFD07AC8CDC, + 0xBD8346376F7A8410, 0xBD8346376F7A8410, + 0x2E05208086BA0651, 0x36C2CA307C00F187, + 0x910A32E7AAD2656C, 0x89FF0171FDDB2246, + 0xBF25EB89375A37AD, 0x78B2DF314748056B, + 0xFCF6788FC4860CD4, 0xE349682033D6449A, + 0xD95CC5D2AB15A09F, 0x81F1280A4AFD3208, + 0x4C8872D8CDBE1B8B, 0xA48693249537873E, + 0x3F69145BBA87BAE7, 0xF6EA88E94E2BD224, + 0x113D2C5DC57E1774, 0xDFEBBBCF22115AF0, + 0xED5EDE9E676643C9, 0xEAA3D549E6D6990D, + 0xAAD6D1ACF08F4612, 0x41EBAB6EAE30B432, + 0x01FEE67DB37F59B2, 0xBBC3519C07015926, + 0x041C7F2A6C9894E6, 0x1EB54C772BC931FA, + 0x33A8F7F7D5F7F33C, 0x91B8E16D0EB126A5, + 0x2982BF73F66E9DDC, 0xEAB4ED37EBFA63CF, + 0x743607648ADD4587, 0x6719F2C27E4D132C, + 0x2A0A62FCDEE16D4F, 0x2403DA1A471D9CF6, + 0x61326EE6DF15B0CA, 0x64F1459D77C5B341, + 0xF73EB622C4F1689B, 0x7A0F33AA19956CEB, + 0x54736AA40E271165, 0xA98268C8F1649DA2, + 0xD75960F6BD9EA49C, 0x68347C9EBA384C80, + 0xC819F3CBB62BF692, 0xE5AC37B329B31F82, + 0xEAF5F7E5AE7C6C9D, 0xEDB744B07F6F504B, + 0xC32779C16FCEECD9, 0x28DDC3A09E7F918B, + 0xFD7A82D67D455BFC, 0x6BB4249BA6AD63A1, + 0xFBBE0570EDF39D46, 0x2014FE437BB4544A, + 0x0BDDB8D9EC6BCF3C, 0x95C1F609605A12FF, + 0x14832BF2ABA53FC5, 0x16798E70F6DC79A4, + 0xEE6C5AD3ECE0A82D, 0x43D3344EE0A5162E, + 0x15337C7C268A27B2, 0x6692B50177E3C4B8, + 0x9D7696D8F4FA6CB7, 0x74256707D1D64CB1, + 0x8EFCCF6EC66D85E4, 0xEE47622FCCA041C0, + 0x66B57B72E0836A76, 0x1233D1F2204DE71D, + 0x5ECB40269053C0D4, 0xFEFC4CE79A79BEE5, + 0x30DE938B516F0AD2, 0x2353E95745568F94, + 0xBABEC9E69A91C57B, 0x06D69059DB3DA20C, + 0x096EF57A0C999BBA, 0x3BBBF463E1825A03, + 0xE73364DB90778FFA, 0x442386ED177F9C74, + 0xDDF803377F94AAA8, 0xAF29C0C2E7C7B504, + 0x1DB21A44B09E8BA3, 0xA2F06ED220802DB3, + 0xA91C6F0FF7D16A13, 0x705ACC7428FA85E1, + 0x0F87E938BDF29D66, 0xF9BA0BC05E1F057F, + 0x4A2D4E8BF4265B0F, 0x61C86D1F86F629E4, + 0x7DCE8BDA0F1C1200, 0xA115FBF153CD1608, + 0x86A652570E5F25DD, 0x1AD5BCFEC31BB8D9, + 0x35F0B98A8387274D, 0xBBFCE82595FCF3E6, + 0xF2A9CDABCEA04BD6, 0x8B2368F2829D6879, + 0xC9A763D8FE87436A, 0xEB25B6CFBE0FD35C, + 0x84EA99C62CB3EF0C, 0x5B17CD8C89FC51DE, + 0xBCBF4FEF9FA5D781, 0x035BBFB481EB12F2, + 0x38B55259C2E078ED, 0x38B55259C2E078ED, + 0xF5846EDB26A98A24, 0x58D9A8180CEEF8F1, + 0xB746D20B17F2A229, 0x1A6E6A5562EECACE, + 0x26D7399B9587FE89, 0x2409391486D1E7BD, + 0x83A169EABCDB10A2, 0xF7E6CFC329D623DF, + 0x4102C7858CFEE4E4, 0xD36B81D2E601144E, + 0x700569DBA175A77C, 0x3B4089734C64DFD7, + 0x5FAF9754E789FB47, 0xED24814ADAB539B1, + 0x271CC6AB59EBF9A5, 0x04D04F99C1B359D6, + 0x3AC1F7B898F30C05, 0xE03C640D3E1BE2E2, + 0x53409B5163D5B846, 0x807915E372FCAB02, + 0x1B87EC93FDCC093A, 0xFAC6799B01780A23, + 0x8B9CDBD6C566C38C, 0xDF0738C894ED918F, + 0x26AF0E8E30BD2A2C, 0x0D9C8D449139C23C, + 0xC19A2925C34D2231, 0x3413996A2603AE97, + 0x4CD49B76338C7DEE, 0x3F029A6A9441FC06, + 0xC6017F6A6CDFA694, 0xEC2B618924CFB80F, + 0x70793BDCA1E854D4, 0x064DCAED924C10B6, + 0x186D5CB5E7B0FF7B, 0x7E1C1B2FCF372776, + 0x84698AB38D0C6636, 0xE7C97806E87E54EE, + 0x172AA1B624FA1013, 0xEC37EA74A17D9A1E, + 0x2F7CEB6520288061, 0x0E8766AFE49CC808, + 0xAE032F8BBA959E90, 0x1522A43546FE42B4, + 0x0F73393BAC7E6730, 0xC22F0078002B00ED, + 0x473151EBC762C6DA, 0x82119F44D396133A, + 0x820E9892A77E97CD, 0x2D1B626082626EB0, + 0x3A54E33660DED67F, 0x47E271E369CCF5DB, + 0xF6BAAAF762E1BF40, 0xCE554FF47ACC6D3A, + 0x333FC8DB079B7186, 0xBF59A61D1F5C76D0, + 0xE83D4F9BA2A38914, 0xA8D713A937F31250, + 0x58A651CD201D89AD, 0xEAE1AF477F6A275F, + 0xA46413066687A328, 0x9C73B4E5C7A601DF, + 0x11B499C1E0FF8559, 0x52EA4804CD21EFE2, + 0xC35A6D07C93802B2, 0xCCC5A7A0013D16A6, + 0x1CCE141467FF42A2, 0xCB1996A58F3E3E4D, + 0x030983CA930B692D, 0xB0008BCA992FE670, + 0xA3EDDAA42411D3B9, 0x7ED42CE3528C0C37, + 0x3B458DDB57038F08, 0x6811E9A010A86065, + 0x2F074C904D85129E, 0xA1C3DC0485BCD60B, + 0x78D0B67629D75856, 0xA5C0C3E9CE22F08A, + 0xE3B6097CC25AA69E, 0xDB179A8EDB8D43F2, + 0xEF2C71A32CAD5FBD, 0x33A9A57AC681FFE3, + 0xD313DE83394AF134, 0x8E05DEDD046F3949, + 0x88CBB5CEB96B7BD2, 0x6C59944A0530A574, + 0x03F1A106BDA7DD3E, 0x6554A8CD16C37933, + 0x70033C3CC29A1FF4, 0x19B3D204B40E1E19, + 0x5FBCA48327B914DF, 0x54A7FFD3BDA60D37, + 0xD17FDB685BBA69B6, 0x5162F9C15FF2EE16, + 0x645F4B6E8499F632, 0xB7666EE93014C830, + 0xD202B92CBF1D816F, 0xB288B2E25E47234F, + 0xA53ED5520C07654A, 0x18AAD19264567F63, + 0x2A7819605465FBCE, 0xAFAEFCA67BF09E72, + 0xE3D969D2785FFB5E, 0x22AE96ADC35DBCDC, + 0xB40F96D6D252839B, 0xB40F96D6D252839B, + 0xF033419D1B81FAE8, 0x281588E106E4EDA3, + 0x55384438FC55AD8E, 0xC99D0AFE94E7337A, + 0xBA8D65C1C65702E5, 0x9C261A5F13927170, + 0xAA0A52D24FB98293, 0x6626CA37A88F93B9, + 0x1FDA0AA679C9919B, 0xB91DFEF32DEB33DB, + 0x88274C11CF0D866D, 0x1C82607FCBA3A762, + 0x20194D48EAEC9A41, 0xC4573B0DEAF874AE, + 0x420BD37289EEE162, 0xD4B5BD42562AA87C, + 0xDFCDB14317A9B361, 0x4E1CF9E6DC044F6E, + 0xA44FF770DFBC5DAE, 0x09AB42F8A130B9CA, + 0xDD2620B7B9D16FF1, 0xB43B8D17FB3324C3, + 0xCB7CC0D58405AD41, 0x0CBDC3AA5184BEA0, + 0x238FFE5C7B0498A6, 0x4A5DC2FF6E0B609F, + 0xC6B9DB42C04DD8C3, 0x950D6A9E1B6D0DB2, + 0x60190048C0764A26, 0xEE23CB1B3ECF4923, + 0x8C9D11605E59D955, 0x43A848299D1053F2, + 0x8F17BC8BA08DA62B, 0xE1C9109AA0B04165, + 0xAFBD61CC738D9EB9, 0x4BB6BF4A85268A22, + 0xF2D49816A804D134, 0xB62977F11F1C9288, + 0x730F5F8D3F0F2050, 0x33083B6564CC30FB, + 0x63B406D7884BFA95, 0x2F4AC5FEB05AEB81, + 0x4859F1FC66A6278E, 0x3D28F4F0775C6C2A, + 0xB5485E4907B53019, 0xF04C5BB5BEE56ED7, + 0x8F75998877616996, 0x39448B5909AEB658, + 0x4AE4FF911DFB61DA, 0x36A89B5D559CD938, + 0xFAB944D4D481ACCB, 0x3DD9D17D4E24538B, + 0xC843060B5765DCE7, 0xC20CA6246517F5DA, + 0x44F7CBC1BEB3327D, 0xEF0A5345D257E6DE, + 0x9B128DC36C1E04CF, 0x4EAA932BAAB38AF6, + 0x43FA7CBE20DAB219, 0x45D4AF8EE586A005, + 0xE0A7D1E497FFCD6F, 0x87524F5C1E0857AB, + 0xC8CA9670B9D83B3B, 0x67AEA8405DE74BE4, + 0xBC2042F090AF6AD3, 0x0083593005D35BEB, + 0x7EF7649B64D7FF10, 0x6197EF56F56B9BB8, + 0xA06509A691D12BE4, 0x90E9DB7AFB683B6B, + 0xA4664972A9B8F8BA, 0xF28019B8F48479C0, + 0xE3DD5F2A84B42281, 0xEE2FD6984DD352B8, + 0xE52B8E7F85D39A08, 0x1934F7E4E24F3FA5, + 0x7DCF7C708D292D55, 0xC8986DAB0D9055BD, + 0xAD15F075A4DA0FDE, 0xBD99B1A905B5473C, + 0x8D8ACD8388CD99CE, 0x81BB8EFADB9D163B, + 0x349CE7B56DAFD95C, 0x43724EBC47AEDE1A, + 0x39BBF623FC803EAC, 0xB2A9BDF905DC5A51, + 0xF8AD2EED7C47E8FE, 0xE3B1741792C863E3, + 0x93C8B64DEB84728C, 0xEC2C573507E00881, + 0xA52D5247A4227E14, 0x8BE6FD03F4A23965, + 0xB2A16444EAD9AE47, 0xC3219A6FBFC09F37, + 0x422D396F80A96547, 0x976177065FE891D9, + 0xC4278F70131BAA6D, 0xEBBDB760157F61CF, + 0x013E5CFC38CD5387, 0x0571D275D47D33CF, + 0x1E98817B311AE98A, 0x58844C38B56B01B9, + 0xF75497BB865F0803, 0x133B0A63A9A49F93, + 0x74D4E028107450A9, 0x1D6A97D1519EC3AD, + 0x2DFC81C9B9608549, 0xE2F0EEC94FEE31F9, + 0x9A7D091411C5F684, 0x5A64713E8D99EAA4, + 0xA86911979638106F, 0x662801E40CA2CE11, + 0x7CD6BC4C2BBDD526, 0x88A92D91AB021F3F, + 0x71EAB450D86954A1, 0x495E56A1AEC913E5, + 0x0BC3144DEB678666, 0x0DDDA8FEC627EEC4, + 0x6A98C2ECF57FA5D4, 0x6980F6E4D4AC14F7, + 0xADB3F206518799E8, 0xF3B2C1AA21CB2C51, + 0xB6BA2444AB393DA2, 0x45881466B05A8703, + 0x46F2193B3AD1D891, 0x32ACAD4C598AE7FC, + 0xB66064452270E8F1, 0xC75595D38D68193F, + 0x93376B65A266EB5F, 0xC8749D706BBF16E1, + 0x90D2156198831D69, 0x35E41B8570BB9549, + 0x52818819057F2B40, 0x30803D1EDC47E0BB, + 0x05983472F0494E60, 0x1F3EE1342053D674, + 0xB50EB4CCB29704AC, 0x2E4A2ECAA4BD1F7B, + 0xA0EBB943C300E693, 0xDD7C2F9844E745B1, + 0x81CBAE94390F9F89, 0xC7EF1AC7845F532D, + 0xE1EF3C1216AFF2CD, 0xCA089CD1A17D76DF, + 0x9DEF883114668116, 0xCC4944A45BF68267, + 0x7DBDD04862D95F04, 0x5FB5CBC5FDADA3C9, + 0x8806CEBFABD3CE05, 0x7E500A72F7BF6557, + 0x00689CDE5F7C6787, 0xBC4C9E47192578AF, + 0x9E6B70061662AE5C, 0x8123E5D5BB4CBCC4, + 0x1EE0F68A7C25DEC6, 0x87C61885D6608FA4, + 0xAFE08B35EC0C9EAE, 0x114D27019AF02810, + 0xAD27D957598E49E9, 0xEA3490547BC74525, + 0xDAC073C7901F9E15, 0x0E32F508F8A14DE9, + 0x39B5D1B10383F0C8, 0xB90EB35E662F9812, + 0xC7B4D79B01FA7A5C, 0xEB9E73D41990B2C4, + 0x24DA7D7667FD7B09, 0x506C449BF64659D1, + 0x4328652AE5769C71, 0xA4D05BB46EA393D0, + 0x8BC515BAE4AAF8FF, 0x151F8A4B84E3E613, + 0x71BC8E838B9C6035, 0x69FBFDE24E0127D9, + 0x6493CF69859B116A, 0x1464E55BFE0DCEF0, + 0x74AFEF0D2E1E409B, 0x176066ACB1B41C48, + 0x774BD811F656A122, 0xF00D6841F0A8DB2E, + 0xD2B315B6689D537D, 0x55C338E4315BAD8F, + 0x38D28DA81E4E9BF9, 0xA37661A97993ECAD, + 0xDA1DF03D5A315F4E, 0xBE4085245FBF8C61, + 0x918B101666F9CB83, 0x918B101666F9CB83, + 0x63C6CCA8E68AE8C8, 0x12CE1CDBAD8161A5, + 0x742A637471BCECD9, 0x5DDC0EBEF6A48288, + 0x52DFF8A10508090A, 0x89CC441BBB263BE6, + 0x78F06F6B1FB5A80C, 0x4CCB328F9DA8E0D0, + 0x733ADF241531E5C2, 0x00B0820575DF338F, + 0xA0F93D5465B3094D, 0x235110569A42EC48, + 0x1913FE4CBF41C463, 0x7B28A83A0D3DD0F9, + 0x81A15811460FAB3A, 0x4DF8E7F8D8FB143A, + 0x886E37EC497200B6, 0x397C98A5552886EB, + 0xC8F3AAF93D0600BF, 0xB9480395060413F1, + 0xED712CA327900C8A, 0x652CD4778CAE64C2, + 0x703123E5E7D429C2, 0x94D607F083224BCF, + 0x14BA4BA137AF6CEC, 0x1FF824902D1BBBC4, + 0xC7622C0D36B2FDA8, 0x095503B9F1CAC814, + 0x14C9FDCC41F81F63, 0x829C197D6E81B961, + 0x352E2B5CF420BF3B, 0x577BE43A512C41FE, + 0x15E69E2802C24B8D, 0x0BCD7FC862B1ADB9, + 0x6A3975DEA89F9A17, 0x886E0AAC0593D3C6, + 0x2AEE8F8390D2298C, 0xC73D3E5416A7F7D2, + 0xB7ED70C49521A61D, 0xF2383CDB821550B5, + 0x005622AEBC33ACA9, 0x1EC145802FBC2137, + 0x612A970AD59E75E3, 0xFBAF7BFE92C3F98D, + 0x6C3B4D6D13B4C841, 0xA2588AC51F89CAFE, + 0xA6DD8458CE24012C, 0x81EA8D0E3B51E01E, + 0x6094AD011A2EA87D, 0xDA8C680C9B8BFAAF, + 0x717E4D1F2048376D, 0x0F8BF24FC23AD672, + 0xC429DCEEB339E129, 0x5501AD171E63CFEB, + 0xF60165E1D2C5370B, 0x5C6C479F2842E622, + 0x0FEE4F80AC44A726, 0x46FA8D34385DD6AA, + 0x50BD2730B191E360, 0xBBC5896F015F04EE, + 0x703CC7F60CBB2B57, 0x44BC7772C728F7E4, + 0x520E541A97A13354, 0x55B1A2570B28CF99, + 0x3DBFC55D5C9BB447, 0xA571B9D2035E6945, + 0x44ACA259D67651DB, 0xA0398E27006D8047, + 0xC5156361F26E2212, 0x3A22644C8900D074, + 0x0F07E7745A236711, 0x53DE24D8A6C88A9A, + 0x8968400D900ED8B3, 0x5B220977A3CA2702, + 0x017008CCDAD48503, 0x5FBE5EA201067B5E, + 0x4700A416E8324EF3, 0x7D879BBAB047C05F, + 0x03B504CF259931BC, 0x38CD3C04C877C35F, + 0x19AAC8F07BFEC53E, 0xB4DD528ED76ED647, + 0x6BA428C528D9E522, 0x9C0D5991926D9379, + 0x494E97C2EF27C470, 0x1947D86A2BB06F8D, + 0x14E85C5EE7A4D542, 0x3D6C56487C41708E, + 0xB28B1FE5BFADD7F5, 0x156CBD8EA5220C1A, + 0x318234F4F3738AF3, 0x472AC3055A188881, + 0x515B4A22E4D3C6D7, 0x1D0F126F75DAD126, + 0xC54A08C85AE4D410, 0xEE6F4CCD0FCF9E1E, + 0x7543BB439F63792B, 0xD30CB36AEC29F5CC, + 0xC847B43F369AC0B5, 0x6E2231E76C64125F, + 0x7A6535691B477C48, 0x5249BC3946DCDA75, + 0x04F8FC8FCF58F88D, 0x8402ED2BE630F8B6, + 0xC488FF2356EA7791, 0xC82CD1DB42480082, + 0xACEE6F360FC1F6B6, 0x58ADEEF81EC497FF, + 0x94D94BF1A75AED3D, 0xC11F9242D7BDABF9, + 0x51AC07A44D4F5B8A, 0xA1B870A535B098D5, + 0x35EEC6C2BC821A71, 0xE6363D7A51B58AD2, + 0x67F3780DD425D4FC, 0x094C1D2DFE050D6E, + 0xC16DE94D9BEA14A0, 0x3055E338A6914C59, + 0x4A595C32F77DFF76, 0xD230FAD4EF73AB31, + 0x6B002A5A1BA4E9A4, 0xCB8CEA9D485EAFF6, + 0x4A18E01DF2C87B86, 0xEC3BBBCF6440E579, + 0x9AEB285D1818C9AC, 0xBA3738C78262143F, + 0x483ACA1176CA93F1, 0x669380BF1CB76943, + 0x1381539FEE034CDA, 0x20DD4A6D27FABAF5, + 0xBFBA3BA79CFF7EBF, 0xC7D3C528D6453E4D, + 0xCDE5E70C1DDB954C, 0x3B66C3A0C8E439B7, + 0x48A59CF88D43DF0E, 0x7F82F5759E299E83, + 0x487912FD248EFDDF, 0x935F68E5161F9331, + 0xB11D94BC55F41932, 0x79458AE4D110F770, + 0x40CF0D12D142A9E8, 0x12E5E33E0E005CED, + 0x4F7D8A9BFB0B43E9, 0x13CC211F9F7ACE7F, + 0x016C090630DF1F89, 0xC89296DD6818BE01, + 0x42156508606DE65E, 0xFC2196F31CC122A7, + 0xADBF060E2B30C5BC, 0xA7E5F88C5CF2D04B, + 0x23BA6B0C2AD7B0D3, 0x6D9E438DE95AA29F, + 0xDFD5033FDBA0A9C8, 0xC51EC1626E7099CA, + 0x01C7B9B38428AEB6, 0xB7D390F8F682127B, + 0x64473AEFDCF47DCA, 0x8CA9CB0F4A5018B4, + 0x88BB3507ED41A240, 0x096C2FC08F9D8D51, + 0x6DDBF9DFFC4AC080, 0x2D278BF73CA9446A, + 0x67D02A194A2FC2BD, 0x42AA2CCF0B61DCD8, + 0x3F7325574E41B44D, 0xEB6DA9468D0C5834, + 0x2513DFB0FB8400FE, 0x1FB6E6318D831B70, + 0xAE9FC9EF6A9FAC79, 0xC5BBAB0F8336ECB7, + 0xD138FA15C9776837, 0xCABE723FEDCB6122, + 0x90D0622866E80445, 0xADB8AC6BAA4B8513, + 0x796A877E459B99EA, 0x6460C026D98259A7, + 0xF11F01D98113536A, 0xBF2029500A5864DF, + 0x10D373323E5B9C0D, 0x83C4A7EF0169D5FD, + 0x4C9296CBCD1B971E, 0x8420170FE4FAF1A7, + 0x2FCB133CA50A49EB, 0xA5C308F948A8839E, + 0xDFE8422B3B94E688, 0xC0BBE340BE2AA02D, + 0x5A353B8E6B1095B5, 0xB3081038630E7D72, + 0x654CD0A825161131, 0x313CC23B5525839F, + 0x444CB7D7DBE6973D, 0xD73EFAD88BCA203C, + 0x37FAAA68DCA9D08D, 0x37FAAA68DCA9D08D, + 0x552369F549563AD5, 0xB1339E1ACA3722C6, + 0xF6062E089251C898, 0x0BE9A992AC49F59F, + 0x0467C11ED88B7D28, 0x3A21CAF837AC07BD, + 0xE1615EC03B3BB4FD, 0xA65C4F563B7CF68E, + 0x4E5C93BD0C32FBF8, 0x71E63FA8638D90D9, + 0x27B0405F59637D1F, 0x4B85FC3BD1A363D0, + 0xF6AA118530443FD2, 0x4186C3700BC22329, + 0x2310A8F9421EBF43, 0x2310A8F9421EBF43, + 0xB68CFAF83A02768D, 0xB5BD329927CB6ECB, + 0xAC96609B9995EDF8, 0x24B736A5B7EBE1EC, + 0xE66C690248F11150, 0xD826C441C0EECCCE, + 0xDBA71115ED9941A6, 0xF5139E9838774FFB, + 0x38D5B0FEBB086F75, 0x208C71954B1AF24D, + 0xAF8A94EDE7712BEF, 0xC63C967EC1D348E4, + 0x8E06A6FE76C9EFF4, 0x8D8037621076DC86, + 0x22EF8FF8778030EB, 0x3CB18364FC6B7009, + 0x5A6AA44FF8E931E6, 0xECAD01BDE6D79924, + 0xBB6F1CAEC68B0BCE, 0xEDE553A156C99512, + 0x80054D7FCC70EEC6, 0x1E9112F421112A60, + 0xA4819F5E23E2FFAD, 0xBAA2575947B921F0, + 0x84B233A8C8FC8AE7, 0x0350660BE3973FF3, + 0x1670F8D05056F257, 0x76DF036B6CF1C4CC, + 0xBAE4F9B97CD43B30, 0xE79194D122EA68B9, + 0x8844BBFCE30AA9E9, 0x34C71C0D521039D0, + 0xEF5EC67D392B830A, 0x6EDAACF02C389E6F, + 0xE3AD2BDBAEE269AC, 0x8B84CFCA87CEA22E, + 0x86E0660E4F5C956D, 0x2E5231E3250C2DC3, + 0xE825F6B6CEA7671D, 0x90742AC709C62DCE, + 0x3F428D08BE5AAE31, 0xA79DFB802C09F5F5, + 0x1DD5897E2FA6E7C9, 0x9CE7E15C76541BC0, + 0xBF72910D0F26F025, 0xF5515BF3A06E8B91, + 0x70A2D1137C8ED7C9, 0x82D2BB48A39F1E88, + 0x48621C9FCA3EBD28, 0xEBDFE18B261316C1, + 0x375F0E738F861A94, 0x7697FD530AC5BB42, + 0x68049AEFF83D8F0A, 0x197093DB247AEAB5, + 0x414641C26E105898, 0xB04D20D6BCFC0C85, + 0x04A2A40C73395041, 0xFAA5505029C4B5A6, + 0x262B14F48D29DE80, 0x4170FE884DF7426D, + 0xF1F8157B8C3F171C, 0x90594E066396B2EB, + 0xC44AA05345C992C6, 0x44D1B2B474803B7A, + 0x89F149B6131E57DA, 0x5DDB4043DAED8354, + 0xDB1EA9411C8911EC, 0x68589862C998EFAB, + 0x53158863FCC0893A, 0xC844146213F10F48, + 0xED3C76ADFA6D07C4, 0xE42F1250E0DFCBB7, + 0xE16142B94664DEFD, 0xA4099DE1318CC227, + 0x211E95CE9903940C, 0xBDF930FFD7942CF7, + 0x32DD916F3F7C9672, 0xB3C320ABE05CE656, + 0x03A93FF1A2CA0864, 0x45FF98724F5DFEB3, + 0xBFEFE3321A3F5015, 0x34BDBA070ABD3605, + 0xBD6E84632DD4CB3F, 0xBC2EC768349461B7, + 0x61631F5DF50D1C34, 0x050A8AC3F0C8C211, + 0x621C6E4729388E41, 0x1A6E6341672051B5, + 0x4CFFC65454C93A49, 0x5288BB5843D19DAD, + 0x71B74D2AE19338D0, 0xE5D3881D15DFC0E2, + 0x4EF47FE21698A8B6, 0x26582FBA6A557016, + 0xA711568EEDB43069, 0x2B360ED559ED11A6, + 0xFDEC055AB549E328, 0x1B15D9E90C06A9CF, + 0x73518ECE2485412B, 0x086D6A5A13971863, + 0x859ED1CEA343FCA8, 0x02DA1DDD95DF45DB, + 0x31E90B8873A4CD3B, 0xC1E313A540F8EA0E, + 0x604E810189EE3A59, 0xB5DD32482347E75D, + 0xC56FBF2F228E1DAC, 0x8AE4531693C890C9, + 0xB08B85D860E7BA3C, 0x2E0FE03FE616F8F6, + 0xFE65AFE7308E32B2, 0xFE65AFE7308E32B2, + 0x4668D80430D6C299, 0x9C4430B10B361917, + 0x2D874D4AE612A65F, 0x5CA786FF666C2B1A, + 0xA21C118553BBDF02, 0x033D1A98DB828D83, + 0x25CB5A9F37BFD063, 0xAE06D39287DB2B6A, + 0xE154B48B68EF72BC, 0x861FE11BC2273595, + 0x97D47996FC48CBAD, 0x5BFE46B7FDCB5ECA, + 0xC396F5B86FF9FEBD, 0x6821684DCC498EA1, + 0x971927086CFD2158, 0xD72603E43F4527D1, + 0xD972DF67326F966E, 0x9F92F8A1719A923C, + 0x14D29BB12D47F68C, 0x93536122D0D17537, + 0xC3C221ADDDE31A11, 0xABFB736567EB67A2, + 0xAFF33B1178172223, 0x7D19037F897BA7D0, + 0x472397322E92A856, 0x0583D21CAF3E0414, + 0x3364AA97340CA215, 0xC84352B5E80ABF68, + 0x0943E5B8E078E76E, 0x7EDC239EB46006D5, + 0x6AC7003FA6E5575E, 0x55F5BD4ABD80B211, + 0x928DBFB892638EF3, 0x19415DE3E26A45FE, + 0x5279FD1C9A07EED3, 0xA882925F5FC924CB, + 0xF9034C136C9E00D3, 0xE0FA63A00F898A62, + 0x596976B02B6B5700, 0x12637A5F32A55571, + 0xAFF4710E2A0A6C12, 0xDE03EF0216BA7186, + 0x2C654B4943BDDF7C, 0xDEAA3AF85CEC13F6, + 0x9B1E824FFBB7027A, 0xFCFF2C571D89D3FF, + 0x213B91045D09B983, 0x0F71B91F9E4CC6DF, + 0x1280804F7CFD2D6C, 0x31416169840C85C3, + 0xAE71FB656C600587, 0x93618ECA8C0838A7, + 0x1DA0DA9CB3F0C8BF, 0x884E047CDAD312D7, + 0xD7D22F5592AED8BA, 0xB5928F039A5E46DC, + 0x28D034A93FE31BF5, 0x87F4BEB993196F12, + 0x1B0B4AEED5B9B41C, 0xB7E0C2B8718FE8DB, + 0x1121BFA1A1A522A8, 0x16EC192DBDD5E5AA, + 0xCBAD6729F7B1F4FC, 0x684F66AAAE419E60, + 0x2C96CDB04FCA358E, 0xA3695A8D781A6EE6, + 0xC33AB876A77F8164, 0x61CB990E8973DFE6, + 0x14590DDBEDB1EC85, 0x88691DCECBD2770C, + 0xDF735600A4696DAF, 0x252BE56DB93DF816, + 0x0CF6CC51AA18F0F8, 0x6EFC06177BCC4C1A, + 0x13337B38DB572509, 0xE7F34EDB631EC2D3, + 0xBAABBB23EB6E484E, 0xAD2289EA9C4D4F11, + 0x47E4E977581C5B55, 0x6B9E71121F5B8154, + 0x3D3D8B3BE5A83D35, 0xA6868D955AE43D53, + 0xCA465D9CC0D231BA, 0xA71839643FBF43F8, + 0xE4973DBDBE6E44B3, 0xED541E6B84C4E3CA, + 0x34A6FC4D06C4DA0F, 0x43392444CEA77F8A, + 0x767FBC2AC802EF3D, 0xD885BEFA31A18D47, + 0x65475A218FFAA93D, 0xBD7D4E8BCF2E9BFB, + 0xBEB3D46BB7F043C0, 0xF0579B4777A30896, + 0x9FA4664CF62E47E8, 0x097B5B4AA4A6A7EE, + 0xB128377056A54E2A, 0xF5143FB7B9EC876D, + 0x93D9BD300D7789E5, 0x616B09EEEFED8FAF, + 0x5E24341A7F92A74B, 0x191132B109DE389B, + 0xD37401D78A929A49, 0x7D394B326546E281, + 0xD8E694757BCEA8E9, 0x0CE5010BE96B84E0, + 0xD1871251F3B5ACD7, 0x325B2846F4FE3AC7, + 0x613ED644950626AE, 0xD1C08F118D9E0117, + 0x1353F87E89946207, 0xF54628B8295E0CFD, + 0xA51338E0DCCD4065, 0x3235D38343A3705B, + 0x675D19C6067CAE08, 0xDEABE64F621A761B, + 0xBDA5DF49D080FE4E, 0x486135364ADC7F93, + 0xD201F3FF917A506D, 0x634A5FB761BC807E, + 0x3E5AE19425CD74BE, 0x8681C47D516FF796, + 0xC50AA39A577AF886, 0x4E45F52E0261CADA, + 0x110F526AB784111F, 0x5C52CF4404E4F174, + 0xB475F27C6A994D65, 0x3897D073B0FFEB10, + 0xD86D101FCFD00A4B, 0x029675CF3DE15692, + 0x239A3351AC1DA385, 0xDB8D6815E13996A9, + 0xC7F76DF27A5045A1, 0xFEF60EAEB2A1B906, + 0x837765A25378F0BB, 0x25D8B90D7AB16D2F, + 0xBE3E347A87ACEB82, 0x7D95E543970B8F2D, + 0xA37B9A517B133349, 0xF61EBFFC313C5211, + 0x8D8ADB562F09A245, 0x250ED94701FCE892, + 0x9768CF648F54C804, 0x539023A06825D1ED, + 0x413C6C763A4AFFAD, 0xC071E51E68F45BDD, + 0x295E3CCEC879CCD7, 0x6F51EE60F217DC8E, + 0x218DD44AAAC964FF, 0x41997DDB2EDE3319, + 0xBCFC632DB7673BF0, 0xB1B8AB076C48A719, + 0xFD5448BE3111ED96, 0xD88C6898FFA824A3, + 0x416B62AC8B9E5BBD, 0xAE4A3CF03353E940, + 0x7C9C0B1EEB1F9072, 0x181DE92C2A0F6544, + 0x3BAB9A4E4F2FF5C7, 0xAAF04BFFFF068CAF, + 0x79F020FF9EDC0748, 0x1B0723EFE914C031, + 0x2170813D3DD8661B, 0x293EFD9177EC62E3, + 0xBA63D9FE45412247, 0x1A3FE41D13E6F24E, + 0x6325D1A044AE510D, 0x3BBFB91FC84F6C2A, + 0xE0AF41401ADF87E3, 0x12806B47D3B4187F, + 0x3A17A27D75C74887, 0x6AF288DCD01E189F, + 0xF78B803082D4386F, 0x318CB1ED360A4FF5, + 0x13E940F88470FA51, 0x7567983D73022C17, + 0x2302C0264EA58D31, 0xEDF7F03509E6A1BD, + 0xD8FA3908D7B86904, 0x650E3DF4169AED24, + 0x8CDE909A0370BB3A, 0x6A7B3C4EFFC59605, + 0x29280002282F1928, 0xAB025F71E5E40DF5, + 0x5F91D5D0B36AA310, 0xA26473B7836FF1C8, + 0x815E5E3073DA1D67, 0xB8DC2E79B515954B, + 0x5BA7919BED300023, 0xB8FD45B9686D7177, + 0x1268615ACE24D504, 0xF5D4712FFC9D01D4, + 0x6CD5A433374D4CFB, 0xCA70422943A4EC8D, + 0xC22912B1D85F26B1, 0x25A00082F6F11619, + 0xE23ADC6FCB1F29AE, 0xBFE7DE6E6C2D0824, + 0x1B9025BDA76822B6, 0x915E90E2D5CB9807, + 0x04D90BA8207ADA2D, 0x10C56E48AC346549, + 0x9B4BD21D69B1E609, 0x96AC6C725E6ACC6A, + 0xE861D0B05C7662B8, 0x1C06C3F7F238CC14, + 0x9B5A68C6489E9909, 0x39255E004257D303, + 0x3599D741C9AC6310, 0x5A5140F48B41FF3F, + 0xEB2DB0CAD13154B3, 0x8578845A59BAA9FF, + 0x7CE1CCB9B293020E, 0x0B676D4511ABB729, + 0x0299FA38396A4940, 0x8111E2AC5F40AF9A, + 0x511F1A683387C7E2, 0xD20EE43CE51F293A, + 0xEEA3B200A6FEB65B, 0x6992F96C61296A6B, + 0x4B53F92932ADFAC0, 0x611CD1312FD3CA66, + 0xFC8202EFC642E6F2, 0x2053F6ACFD4ED4BC, + 0x46DF918788CB093F, 0xB23F15E7A120BB50, + 0xE599A503B3837E1B, 0xCA7F4A8CA3292AE5, + 0x5009DFD741329729, 0x4B33D6349C137416, + 0xF8C397922FC03F41, 0x334291A8490E5BCB, + 0xC84527E235FCA219, 0x8C4AFA619339F2E0, + 0x2DF9038C90AD5264, 0x08693940711DC312, + 0x1D4DC17C38FEAFF0, 0xA3DF67366179BBC3, + 0x51669F7D1FB53D9F, 0xD6ABECE3CBB224B0, + 0x22CCA434E368F03A, 0xA157BFB24D26B54C, + 0x5C90988E7C8E1AF4, 0x4F7C4AB87EB643C0, + 0x0D40EE2A7F2B2D6D, 0x3A3136E2BFDF1609, + 0x236406F60CF216D6, 0x04EE516CD0D3FD47, + 0x9072C8B49907BFAD, 0xCCCF5C35DC145D71, + 0x44CB6447D2571AA0, 0x1D4710D6A0ACB0E9, + 0xCD71A4ECAB22709E, 0xB5F50C802DE49EF5, + 0x23641AFE870AF385, 0x12559ADDF0906A98, + 0x95A88F0B409CDA47, 0xFA4E6005E549B59C, + 0xAAD68E1AB39DA632, 0x2991F881A49C91B1, + 0x6585D955A68452A5, 0x01679BF772B3327B, + 0xA9240A96C74CCA13, 0xCCC4E1883DF61AC2, + 0x00EE9F297C738720, 0xDCD4F88620190EFE, + 0x632E831F382A0FA8, 0x9212422878EDEF69, + 0xE70BA7B90F8390DC, 0xC203D55BCCF45E22, + 0x6FD97159FE3C971A, 0x8E085CBAC2D80633, + 0x517AAF684BB50CD1, 0xFF9949B46A7C6F95, + 0x43286D561B72B8BF, 0x7C1C513BD5D27391, + 0xFE07FF6495D52E2A, 0x616DFAE1CDC37697, + 0xD559D2BE9E37853B, 0x732FD98F4A63038D, + 0xF39C4F538B5124C2, 0x268E92BC5372AD22, + 0xA150A4F065806B1F, 0xBC7AFA40CB26912D, + 0xC8BC6461E629BEAA, 0x4F20B49F58DE595E, + 0xB64CF2CCA9D95F52, 0xD1C8CE12A38AA6D0, + 0x24FB80D107371267, 0x539ED6DF32477DE0, + 0x1B9C0099CB942AC6, 0x3D72B9992AD4B7C5, + 0x6FED2C3679A367B5, 0xAAD39FE65EE3DB8B, + 0x4A58A47A72E3FCB4, 0x8BD8FCCE148429BF, + 0x317B11A312DF5534, 0x4FC578F8112000B8, + 0x237440E46D918649, 0xE605B45E9D524E2D, + 0xC2EE020F5FB4DB53, 0x56DA7CE2BC43B46F, + 0x49010A6A396553D8, 0x9087152AEF5CEF3F, + 0x846BF6291198A71E, 0xCABED3A5B36AD93E, + 0xBE2CACCF5A8AA805, 0xB5F867E143F78583, + 0x58C21165F6545892, 0xEEF1A126035A3F21, + 0xF2B7106D37947CE0, 0x23D3F08918952063, + 0x2F83E7E45D9EA7AE, 0x75DF5F37B97E47DD, + 0xE465D4AB7CA6AE72, 0x16020875C2E3C69F, + 0x560B423D73015E77, 0x78BCF7F9075D201C, + 0x12D148D26538D0F9, 0x08F459FFF58AAB5D, + 0x711794453CFD692B, 0xBDFE75285AB78B69, + 0xF25E02CB9C5818F8, 0xF42740A03D981D0B, + 0xA2FABBE87F4BAD82, 0x71FA2D5F4B42ADDC, + 0x78C4E9961DB3EB5B, 0xCF72485312F1D301, + 0x5DB660B38DD98A31, 0x51B9F37010524A02, + 0x1DD45F9ECFDB1BC9, 0xDE70FC61C90EDC40, + 0x6B7A646C242A7059, 0xB137BD960DB95044, + 0xF6C09E276AEB3F2D, 0x78CA761D4F0B65D9, + 0xDDE6DF5AE89981D2, 0x9984C023D4E57C2E, + 0xE787BF1C5CF823C9, 0xB45221B1FDD47C35, + 0x0F342546AA06FED5, 0xA1595787E246686A, + 0x890E2C5ABED7236D, 0x46F93E0185146CE8, + 0x6636C535F6CC2725, 0xE1E77276F79AF7C6, + 0x865908C81A2C22E9, 0xFE1DEC9C5734D0C0, + 0x51DB102F4A3BA5E0, 0xF9D0F398850191D4, + 0x1612C45F9E3E0D44, 0xC6A6BA6060B032B7, + 0xEC4686EC06434678, 0x354924FCEF0851C8, + 0x95E8F73DC65EFB9C, 0xF4D8C7957C89929B, + 0xA352C1B864CAFD33, 0x8146DEE1C9356611, + 0x38C16A305E8CDC8D, 0x6421AF3DB6AF9597, + 0x8951EB9C6906D3C8, 0x95A930453BF4FB17, + 0x0AF7B437918103B3, 0xA5330A0C56BCA770, + 0x9DC711BC69C548DF, 0xC9126A88F0FAC28F, + 0xF2E07819EF1A5289, 0x94D83CFB2805BCC5, + 0x231C8F89D0539D8F, 0x7C5DE7CC950647DA, + 0xB4C94523F023419C, 0x431E33F39AEFC4C4, + 0xB782F8238512BAD5, 0xAAA9294AAC0A7B85, + 0x7EE64D51E8498728, 0x4022ED66B32A79DE, + 0x68B562E124CC0AEF, 0x3946638DA7736425, + 0xA736CF7FB7C5BFF4, 0xF2D525B9741C3EC1, + 0xC1E8A365BF3B29F2, 0xD991F7672CE8EAD3, + 0x272ACD84970869C5, 0xC62ED852B1172A41, + 0xD3A6A0EF48823A8C, 0x8BE006E7CB1FC3F6, + 0x8BFCEB5EA1B161B6, 0x8E0C45ED2128DA35, + 0xAF9E59B1B1FBF2A0, 0xAAA0836970CF02BE, + 0x8A4416C0DB05FA66, 0xBE9DC62D71E6D646, + 0xBA751764F0821256, 0x6F434FDDC66E9B7B, + 0x8EF5573A1F801A5C, 0xC96A22FEECE3C4EC, + 0x68F01422BE1D838F, 0xE1CA0AA679F28E96, + 0xCCD078C2665D2973, 0x42DA5A1B4F72D9CE, + 0xDD564BDD0472C936, 0x8C07DE9C165DA375, + 0x9AA47FFF660CB932, 0xB60378ABD06310FF, + 0x06462A961E94B67C, 0x08FA3B9450364197, + 0xB47BD05FA66B40CF, 0x8AFB417103D94142, + 0x44A113DD6FFC48D1, 0x2E7C66A9049A3DD1, + 0xC4E2813898C97A4B, 0x4AC15460EE42B5B3, + 0xD9B067E55253E3DD, 0xF3B32CF0774FE960, + 0x638C03B0F9878F57, 0xF8F7AC3EAD55D9B9, + 0x2B3A8F7CA3A38FDE, 0xF3295493AC3DC23E, + 0xC0E78D5C2CE3EB25, 0x186418E088F72A33, + 0x28D1A16553C51776, 0x7F1C9DA5D53192D3, + 0xF308480F1758D82A, 0xF05F9AAB15BF7DBC, + 0xFFEE8FA29AB9A18E, 0xA1438BB696895072, + 0x26D83693ED99291C, 0x16629E92C55D9A49, + 0x9B6E70C5CEEF4EEB, 0xEB9A5705F91A653F, + 0x03FC694AE06C5A20, 0xDFEA7BB6BBCCEC80, + 0xADCDE75E1C60F32D, 0x6AE4659854073F2C, + 0xCC33FA791322B9D9, 0x1036762BD3781C84, + 0xB9496CE47546DB2C, 0x100E9A326CB97BE4, + 0x7C4BB33A8CED7324, 0x0EEF1F9AA800357B, + 0x8BBACBF51DA047A8, 0xC9E087698776DBBC, + 0xF33BDFE19B309B19, 0xB22628F56B3EAA2E, + 0x6F7794F28C6B2535, 0x4E4EFA978A332B98, + 0xEF662D8D57E290B1, 0x25B325CC908EE6A5, + 0xC517E2708E06CD75, 0xF98B272A945FAE61, + 0x9D728C1E12BF5518, 0x79D810B8C4DF88FC, + 0x85F01B8D5B90570E, 0xDAE4BC89A198A6AF, + 0x332B562EEDA62399, 0x3546F6558277860E, + 0x678BB03C1A3BD51E, 0x0965AA31DD655F03, + 0x7B3703D2D32DFA18, 0x5B0E6CBD7C611C82, + 0xE8A169E666CBC541, 0x0E50BA897C6ED5B2, + 0x7D80FD645D4DA346, 0x9C6D92A07D6159B7, + 0x678F86D8FC040BDB, 0x7F0217434D87D6A7, + 0x5917BBA32D06C230, 0x9C5EDEA04AFB252F, + 0x11D5F725F0E780E0, 0xC599540CFF3951FB, + 0xF4F2C0D4EE209E20, 0x00501E90C3DEF64D, + 0x031ACB6ABA18C729, 0xFE66EF9289B72A51, + 0x4D9CA1009AFBD057, 0xEA480A62F5D29812, + 0xDEA92412FCAEB3F5, 0x84E4F68CDE581CD1, + 0xF271147EB7B40F12, 0xFEFBB7574937B33A, + 0x94CF4AC034C9C986, 0x83BF314BEB8A6422, + 0x8132C0EB8B2B3293, 0x297774B8A4AD943F, + 0xB635392A4938B3C3, 0xDCC81D0196B6BB05, + 0xD0EF8A959B8A4CB9, 0x850FB7A5DD127825, + 0x2A93C46AAB1EACC9, 0x4F65123844F8A6D8, + 0x0703B9079823DA4A, 0x2BDB866C1791F9D7, + 0x21BB0FBD3E217C2D, 0xA0CF2067D3649E32, + 0x1201E8A3290A3B98, 0x24F580E7FEBF3667, + 0x5FFE9B4144F9712F, 0x2287F6D727F498F6, + 0x98C494FD5BDFBFD5, 0xAF9EEC01CB822561, + 0x74CD9A9327A282EA, 0x5FD2A95A2EF3EE7B, + 0x8290252FFF36ACB5, 0xDE24858DA0D6B7EC, + 0x7D5DABE888D2D074, 0x78AC08919151D27D, + 0xDC38CC1E35B6A5D7, 0xDC38CC1E35B6A5D7, + 0x58A39BE597CE99CD, 0xDF7DE9F0D36EB936, + 0x62522002E0C391BA, 0x569211D196975C01, + 0xEBD0EDBA5BE957CF, 0x351416F87D5BDCB2, + 0x36F6626459D91457, 0x11BE94FE5E760116, + 0x855BC38818F6F684, 0x0AC576C57F4675DF, + 0x55FCC0C390620314, 0xAA7E522FFB31B2B3, + 0x726E0375C7A26368, 0xA10369EFE6279041, + 0xA0AD167E4B39D9A2, 0x55D9593FF40BF91B, + 0x2A25ADC48F87841F, 0x6D7EFC6AD67234D9, + 0x4CACA84440FA26F6, 0xFE475C49222245C5, + 0x863B23EFDE9C5DF2, 0xBB6CECEE064309F6, + 0x84C8D7C2D30D3280, 0x05F704A61B624383, + 0x7C814D2FB49F40C0, 0x59F1FAF3E8A64BD4, + 0xACF57305B12AF907, 0xCC0AF533DD744245, + 0x18A3E9EE1297FD39, 0xBE3095F04A319277, + 0x0888C3502DBBEEF5, 0x726B6280C5AAB95C, + 0xD10F442036302D50, 0xC912F94B84806A24, + 0xF9800AA1A771B000, 0xB30D2DEA3AE60A3B, + 0xBFE5756E7407064A, 0x91F06D934631F28B, + 0xA87E00932DB4D85D, 0xE3CDBC717F3A17ED, + 0x85D5422B2039A70D, 0xFEB9D98A1C803503, + 0x61767F73EACEED21, 0x0AA8FB035B87E70C, + 0x7B1776B3B53F8D74, 0x7B1776B3B53F8D74, + 0xCB968B53FC7F916D, 0xF88A8B7538A14EA4, + 0x8416FE4E4629D7D7, 0xE142CB86C7F67CB7, + 0x9454528DF15D657A, 0x5B1F7232B835EC44, + 0x6A1738B4323FE2D9, 0x605C62FF615A82BB, + 0x4448EB75B4904BDB, 0xEC173D75B3C8E9EC, + 0xFB80AB299D2EE1BD, 0x8DA609693773E857, + 0x62EC273D00187DCA, 0x854BE2ABA38DEF48, + 0x3E45765F3FBB582F, 0x3E45765F3FBB582F, + 0x79C0E43EB9B944E2, 0xE2DCC930C9477D8F, + 0x2BC338A7B21F4608, 0xED9E2F10D8093C4B, + 0xB69317BF5E782347, 0x13F856602366FE17, + 0xF445DE8DA80A1792, 0x846076961D2BE266, + 0xCD018C591F94CB43, 0x2B13E7DBEAF31AF7, + 0xB6463CF6AF527071, 0x7E348EB3E591ABF7, + 0x153973AB99FE8980, 0x01BF36BDFE0F82AC, + 0x295D82A8559F9150, 0x77FAF4469F9B5ED6, + 0x6BFF5F84102DF80A, 0xDB5DBEA8EEBB4545, + 0xFF8FCF9FFC458A1C, 0x7F96CC03C6CA8437, + 0xA4E8E696C532FBC7, 0xBB39914B3DE0448D, + 0x75BA1CB3B7D40CAF, 0x9AE6D99B83780C6A, + 0x25223CA6B4D20B7F, 0xCA86FAB7FADC8353, + 0x30CA2EF91D15ADF8, 0xA0AAF0B260380061, + 0xE8B0B270B6E7C76E, 0x89AD9CB75446D174, + 0x4EC6CFBC7B2E9536, 0x29B56B922DE631E5, + 0x9C14D30395A51A3C, 0x97A76130F5646065, + 0x1F1E9682483697C7, 0xA9524E551D1472BF, + 0x70DA3BF8DACD3210, 0x3E878ABC91FB2949, + 0xDEA2B8283BAA3944, 0x273F18D32824155A, + 0x2F8B4D1C595B11DB, 0x2F9A44C36266ADC7, + 0x40AFB081F8ADD4EE, 0xBF5B95C83B593EF5, + 0x4E90D746056E273D, 0xC505B5B386596CE3, + 0x4B5AE2EEE4A8F180, 0x4CB3F8AEBF8F5F93, + 0x658500AE6D723A7E, 0xA5286D6BD8C685EF, + 0xEC5E3AF5289DCA81, 0x5CAAB966E92690FC, + 0x57C5DB656185EAC4, 0x8050404A4BD1D0EC, + 0x0ABC54DE641DC0FC, 0xE815FABFB107182E, + 0xEE99784E4467689C, 0xBD2168F3F4D473D1, + 0x2763BBAA72A7BCB9, 0x6A9048AE90F8D829, + 0x438822C279B73B93, 0x2084621CF6AD55B7, + 0xD4367D310F079DB0, 0x525220B07E34522E, + 0x84C0116D012E8FC2, 0xFB51FEBCC8554998, + 0x70A382ADEC069DD3, 0x4E55B9968F9B185A, + 0xE906EC930F5FE7C8, 0x8CC4832E2255824E, + 0x734292F4F0ABF6D0, 0xE9F198943372703F, + 0xC2F84B7F9C4D0C61, 0xEF16F7A7D1759E2A, + 0xF74B1FFA4A15FBEA, 0x0CEDEC8AD30C293B, + 0x7A86743F475D9E09, 0xA566E488BA0A0A4C, + 0x9CFDD90B2B844BF7, 0x3AAE734A915D0A0A, + 0xE05E81A888FA63C8, 0xFEDD7E9148CF3B3E, + 0x32888337579A5970, 0x7ABC6553106F8B81, + 0xE4A310B1D7FA73CC, 0x0BC8768247440B3A, + 0x88795F13FACDA88D, 0x8047C496BEE89A0B, + 0x3E933CFF7B111C22, 0x8B508186238D2BEF, + 0x394B9CD12435C981, 0x1C6FA6A93BF99EA4, + 0x8A35C742130C6080, 0xBC0998777E9C4C17, + 0x340E61DE7F471565, 0x272ACC75FC69F0B5, + 0x3D95EC8B6D940AC3, 0xF2C714EC203F71D8, + 0xBA8805A1108A2515, 0x128BB6DCFB7B5E45, + 0x953563CE563143AF, 0xE4BECF52F473C9C6, + 0xAE3CBE5BF394C9C9, 0x24DBE20C830AE9AB, + 0x2C2B3493FBF51C71, 0x767346F258162697, + 0x768FF8961BA904D6, 0xCCBB1074CAAE000A, + 0x0A9C7F36E5D7B683, 0x55DCF52F9C9C17C6, + 0x59DF79317F85A7E0, 0x6EC5829113861E13, + 0xC1E963C58664B556, 0x8D77547CDE1CEC2C, + 0x9824CFF8FC66E159, 0xE4A44F2D00EC6F08, + 0x08A1B82B91900682, 0x8C9783E384BC7C7D, + 0x71302EC70689052A, 0x48E2D5FD4B8A6D4D, + 0xA0A9668F158129A2, 0xEC92E04062037949, + 0xE11EBBB2A783FE8B, 0xC1C9C375C9134DA4, + 0xD2C91A0B572AAE56, 0xE739127DDCFFD880, + 0xF846AA63DF56B804, 0x06D4187765EAF5C9, + 0x3054F114121C21EA, 0x3A9F8CF8FAF5EDD2, + 0x25BC98A59C2EA962, 0xAFD2714E8B5AEB9F, + 0xDB4EACD4AD0A5D6B, 0x05FCBB2D6BF4C399, + 0x6E8834B52EC20C77, 0x58DF9C9B7E628ADD, + 0x5BCA583A583194DB, 0x0E2040B2743DAF82, + 0xF6C8A544E4CF14FC, 0x6B140B03832EE532, + 0xF0DAEF2F545BEE25, 0x46E69BBED33E3DFC, + 0x8415D95B194A3AEA, 0x278BCAFFD3056018, + 0x3C67506996001F5E, 0xB5CD4DAF46CE6329, + 0xDED51F703D0FA83D, 0x149D9B4375AB4239, + 0xB664292EAECF7FA6, 0x5C052A30B9FCA449, + 0xB346476EF1A64897, 0x5976053523EA16C8, + 0x73D57CFFDD12C355, 0x0BCA9ADE67DF9DD8, + 0x75E7D505F2B15902, 0x6450DD9BE00F7048, + 0xFBCFA2EA2E206890, 0xC33B9889A311ABB0, + 0x593850C16A36B692, 0xFBBC34CE79F2A41B, + 0xDC2C5C242AAC342B, 0x63EC3B3BCF4B0D48, + 0x1FC200409F10E6F1, 0xBB1311EBA4164013, + 0x900086F371220B6F, 0xA5A5B21057A1530E, + 0x5A5F40FE637EB584, 0xB733B49B5DF09CE3, + 0x288DF530C92DAD6F, 0x1E5A10B714F0CF57, + 0x13EDE1A5DBF797C9, 0x72337891E7DC6424, + 0xDFE68C4B787E1BFB, 0x23BA3DE663C9861B, + 0x1B1AB132A16FDA55, 0x7C7B4B110CA2BFFC, + 0x7B30F65D7B710098, 0x7E6D21381B69BB04, + 0xC40D64BE91126F59, 0xFB4CA04AB1C7412B, + 0x37181417CE7C8900, 0x4E682F2B3EA9361F, + 0xFD55E49555E017CF, 0xB694862A9439EFF2, + 0x305C8DCD79DA8B0F, 0x6DC4D8B66C3E0EA0, + 0xF6A9D9708F6F23DF, 0xBB4CC4EC1C23FBF7, + 0xDF649C4E9AFDD788, 0x75CAF1553BC8798E, + 0x5A47B3B5E63E94C6, 0x0B24C180BAC225CA, + 0x2C29BFB64F4FCBE4, 0x0CECFBE3AC3CFAFA, + 0x056A8A219B8E829F, 0x8BE64A4794BF87FA, + 0x1B2366C3F2A5C8DF, 0xA5181DDD4202BDC3, + 0x5F28ECF5FC84772F, 0xB4D080997F77F539, + 0x352A9F6BCF90081F, 0x0064F2026E85AA12, + 0x2E2EBA0EE7CED0E0, 0x3DBB16B468DC3E18, + 0xD558BEC0BBA7E8D2, 0x7C8C7A5FA7D5D710, + 0xAB0F816885B0E483, 0x16B4C536089C3CAD, + 0x61E1DD6125A3EEE6, 0x4B1BAFAB7E8F4DA7, + 0xB3CD51E3DB86F176, 0x4A56DE84F7072783, + 0x2AD93716F184EDA4, 0xEF6894DFD91DE23D, + 0x9F5E6BB6B34540DA, 0x49B677C7B968E373, + 0x2330C12A7A605D16, 0x466AB6D4A9CDF194, + 0xA079A6C51525DC4B, 0xDCD58F2C1C3707C7, + 0x3C788E7F6438754D, 0x4E2E052449EBB471, + 0x47C3B5848C3E45D8, 0x29D9E3B7EDBBA6FD, + 0x36F32DE87082343E, 0x3073345E4C694DD6, + 0x961777E64BDAF717, 0x77D50D8E8FF785AC, + 0xAF66059A131AA269, 0x94D71BAF1D1E4121, + 0xC6E0E2616A7576BB, 0x8D70EF3C45FCCE78, + 0x565E430DB3B05BEC, 0x4783F45F2704D1C8, + 0x88BF9B612B84D3C3, 0x83BA5D18DCB6376E, + 0x207F1A47C0342F48, 0xC83C5E87BE31F95B, + 0x58575AC3CF2CA8EC, 0xD757C7B586ADC2A9, + 0x2C015348CF19CA1D, 0x7507D76C760D0687, + 0x1753344C770358AE, 0xC537AA5FE720E658, + 0xEE09ECEDBABE47FC, 0x9CC7357B2C0B2F37, + 0x2C173AE2BDB9385E, 0xEFC843EEE5626CE9, + 0x47C2A06D4F5F424B, 0x10AA1D668D6C5CF4, + 0xF28DA9F38CD1787C, 0x93942C80E3301AEB, + 0x399685DB942336BC, 0xF61F1F4A0D94EDED, + 0x81AA4610E3FD3A69, 0x4D59D2308EF2E1CB, + 0x2BDD44CC428A7EAE, 0xFA1A73C829B8839F, + 0x4862437A486F91B0, 0x3AB535034B25EFA7, + 0xCE07B9F7817AADA3, 0x6F2A6CFA4386AA2B, + 0xD7E3B9735C0F89D6, 0x6F9D3E582271B7F5, + 0x2107BA504071A6BB, 0xB71084333B418824, + 0x63606A61DE68898A, 0x748F5D0FB38E6165, + 0xEE4EBDD2593BA844, 0xDB6F136202032BCD, + 0x3A214F2EC889B100, 0x9C493286FE3ED901, + 0xE0F82D68C7039158, 0x8C77E25FA5FFBC6B, + 0x18EB48CFC41F2EA0, 0x0097E1CD6A252D2C, + 0x866A4A5FAE349510, 0x1BECDB6869A407B9, + 0x6572ABA3DE1197FC, 0xB422B53E7DCE903D, + 0xE35B38A27E8E7179, 0x64DBE25F624067FB, + 0x1171A97A3D3981B6, 0x352DA825B2FEA76D, + 0xB0F7F8663821D9C3, 0xDE7E9AF51E2E18EB, + 0xE5DA8615A6180789, 0xE184B22692EEAD71, + 0xFCFACD0DB9D7A57D, 0xA83471E5EF1B0F8F, + 0x5EF77C9ADD3B11A3, 0x2B3E2A2E6B780A37, + 0xC9B18B4619F48F7B, 0xD106ADEFEBF39909, + 0x6A25241C340D3822, 0x9C9EC7CC88D050FA, + 0x2CA429C029CCF247, 0x0EFDA7B3FFAA82B3, + 0x0499D7B09FC9B407, 0x908D1ACF42DAF9B8, + 0xD7591B0065AFAA7A, 0x99D0470B6F43A321, + 0xFD00798DBA7523DD, 0xA63E80C5933E74F0, + 0x84ED31191CC5D2C9, 0x36416CC5F169B4CA, + 0x261CCE7EED010641, 0x8BAFB6B897BD2A31, + 0xC87E740D9F3872CC, 0xF958B1E2EA64FE62, + 0x524AC5ECEA15343E, 0xA2CCAAC7F5CA3F49, + 0x40D5DA9550B7CB46, 0x86E8CAB04CEDEB7B, + 0xF8DEE0A5600CBB93, 0x234CDFE13BAD9296, + 0x91A0BD635321F145, 0x4B9078DC74C5BC7C, + 0x0AE1F1653B554AB9, 0xCA50E9C4044F2E78, + 0xBCF3026912A8647D, 0x9366991242637539, + 0x75AC2B60386D89F2, 0xC3EC4B771200D096, + 0x8619AB3809CBBA81, 0xCFAFCDFEC39A4535, + 0x4C2330E61D3DEB56, 0xEA16683D7D7D4E20, + 0x92BAC8ACF88CEC26, 0x0DF1FA6C09C3E674, + 0x2201C576FACAEBE8, 0x330D010878DD999D, + 0x35F284314E619918, 0x709742281560D2F6, + 0x97C9E4E7024A8F2C, 0x3C42479A3436E320, + 0x96E2929292A4DB77, 0x5BBDCA451CB08E45, + 0xF0F77ADB9F67E79D, 0x1B2D40862EF63C5F, + 0x39246A6958EF072C, 0x4802B6517B6338DF, + 0xBD545D44CCE70597, 0x6B59962A89E93CDE, + 0x8DB3F12A02CAEF72, 0x4C917B0A2079C3DB, + 0xEEA5AC2EDA7C33E8, 0x1078E3E6E7C301E8, + 0xAEEDAD1420C65CC0, 0xC3DB7F852D61E7A8, + 0x9CB0BFA7A9342C3D, 0x9C840F1096AA7B8C, + 0x650A08A280870AF6, 0xC86191BBB4E2241A, + 0xEC4CF9FCB29A4424, 0x6307EBFB74CAFA98, + 0x1C7302E725259789, 0xB743E5764FA5B809, + 0xE31C2C72B8692B64, 0x98E18969B1D0C4AB, + 0xF401B182DBA8AF53, 0xF7A72A2EFFA282C4, + 0x76D9B976C4C09FDE, 0x4DD8DB5586FE430D, + 0xEFD79FA81DFBA9CB, 0xB4C725BF0CE24399, + 0x35F7DD45E8C0A16D, 0xBB61E4E5DB5BBD9B, + 0x5F35F6732C3FBBA0, 0x7F9E8971ACF74E2D, + 0xC1F1920BAF281317, 0xA6E0F3D3B283CA5B, + 0x277F471BA9DB000B, 0x5F2B3E2AFA7B81C5, + 0x4805D2B1D8CF94A9, 0x9F2928DF31D785C7, + 0xF113E3AA9BC54613, 0x94F61063C4176ECC, + 0x5A504562485944DD, 0x90FDBB08DC729B21, + 0xC5F68BE9613E2D18, 0xBC5268D1B5C5B73B, + 0x53CAE13E9B426993, 0xBE23E20FAF095C59, + 0x950A154B8DAB6185, 0x254CD34043BCDA6F, + 0x6C93ED8C2F74859B, 0xF449945148E2CE06, + 0x59328EB08C5CEB2B, 0x22B3CA71947B2BE8, + 0x7368E683BB9038D6, 0x12724F39B05BF05D, + 0x16D3D49902F697BB, 0x03BD215545C20988, + 0x36A7FD5A7194B03E, 0x36A7FD5A7194B03E, + 0xF814FEC6A19FD6E0, 0xD59DB2CAAE900C49, + 0x78321BEA235FD8CD, 0x961B6C06CFFE2384, + 0x86B910D66FE9230C, 0x50FAB06DA64B7430, + 0x41F37C3427C75AE0, 0xB15BA3909055E465, + 0xA97F257D0151A6AB, 0x89162DC1A9F25845, + 0x72DD432F3CDFC0EE, 0xD8575EED8AA4AA31, + 0xD4B02A6B476E1FDC, 0xBFB86C21E4EE9D40, + 0x6170941419D7D8EC, 0x9973C6A10108E1CC, + 0x47B32F5611E6E483, 0x79BC50A93E0583FC, + 0x33E6C8EFD0CD93E9, 0x67CA84B124ECEBA2, + 0x032D49C5E359C847, 0xE63F41FC181E9153, + 0xA4A0065E39C9F25C, 0x516E4DB72695977C, + 0x601736CFE536B0A0, 0x40B6A56AA864ABAF, + 0x7241CCB7D020DB69, 0x0536E9AA8DF8D769, + 0x5E657EF1099EDD65, 0x8A0DD05509D75CA3, + 0xA1CADDCD98415A41, 0x4125EF80FB471BDD, + 0x5C497525F803486B, 0x63117B0163630D25, + 0x8B6A4DD0AF9CE215, 0xC3E08713704452A8, + 0x1CEA6BFDF248E5D9, 0x7739A311341A5999, + 0xEF398BEEE4EF45F9, 0x4B4FD12B3B16443A, + 0xB26F670685631727, 0x8A748BF357F6750B, + 0x0A436B8643716D14, 0xA0E8779046AF59B1, + 0xF3A21BCD95725A4A, 0x5C6675393464A814, + 0x18D0456E86604654, 0xAB0F784335D14AC3, + 0x648EE3E7F38877DD, 0x73EB60E7645EAF45, + 0x01B8247A7A8B9AD1, 0xABE4F4FD4329B037, + 0xA98B8E3C088E5A31, 0xC8B9CCF35679F2B0, + 0x83CDB10EA29B370B, 0x9E9699379D42C23B, + 0x580417101DDB492F, 0x86AF801D34E482FF, + 0x47D6F43D77935C75, 0x1F9D47D45E125FA6, + 0xEFEA18DCF10F8F75, 0x05029439A5245679, + 0x87E0052F08BD64E6, 0x0C02E64A92526984, + 0x44E44169EF70138E, 0xFEA9B1B11A8D68FF, + 0xD95E79E8686D2C27, 0x49721683C2EB0132, + 0xBEC7076D64130195, 0x6296023D689C5E64, + 0x975D66A0BC17064C, 0x82585BE8D19B07F6, + 0xEC3C9B8D5327B563, 0xBDAD193FD6CC54F5, + 0x2D55FE374D5FDB91, 0x7EF8172AD258CD63, + 0x7583B4BE4C5A41B5, 0x202529B96398EE1B, + 0x5B84D09CEC5209C5, 0x98501142AE80A99C, + 0x4167EFE0527D706E, 0xA07262F5EF2A33BA, + 0xE8A25867FBA3B05E, 0x5EFB6245D1251EDA, + 0x759650634F07B6B4, 0xFBFB30437D2852F5, + 0x7BEB0C7A235F6F3B, 0x1BAEB6433917FADC, + 0xFB6C4072E9A32E92, 0x645FCD2F12BF3022, + 0xBAD8F2A42B844821, 0x33A6FD49635DC48D, + 0x11E65974A982637C, 0xC40DD87705E0DB63, + 0xB6997A7EB3F5C8C0, 0x0BF0F8F3AD0993F6, + 0x87F395D957D4353D, 0x3A7B57FB88839A13, + 0x4F8A26A890FD62FB, 0xA1108F381688010B, + 0x83FE8D7229593017, 0x1334C7E448B51E81, + 0x0032A6DBA562C518, 0xDF322D96F7178BDB, + 0x723C1CE13FBFDB67, 0xC2D5316F6C82B7CC, + 0xA571D46727E2B718, 0x0D901EFDFD7EF9D5, + 0xC900596A63978C1D, 0xB1DADBFE243A3F87, + 0x065D03A9D6B2C6B5, 0x7294B9962A2BCB49, + 0x8509B634FBE7DA11, 0xDDEC6D09154BA73A, + 0x23F09EADC01449D6, 0xD58B4D2CF55D0EDE, + 0xDAD37F45428801AE, 0x9B8D025C6C2200C5, + 0x2BBA30B854534A0C, 0x8B71145D9B8A20AA, + 0x7BF835BB9E2698C8, 0x99EBE9AD8C344773, + 0x80C2FD58D720C801, 0xD895F953C52A8886, + 0x3A375167F5782A65, 0x3A375167F5782A65, + 0xF239400E16C23E08, 0xAFCDBBD5A2FA0F4D, + 0xBB41AFBBBC0A0287, 0xB4A6144FE4FF5B78, + 0x59B9A7AF4C95133C, 0x5F7D8538FACFDB16, + 0x131BB5DA15453ACF, 0xAC377D7447CA707A, + 0x8235F1BEAD557629, 0x8235F1BEAD557629, + 0x2BF72AD5B41AA739, 0xC402D7B6BBABC791, + 0x5B17A90291133DA5, 0x08918C6897982748, + 0x25AAA32BDC98F2A3, 0xBE493E7C1DC3CE50, + 0xBB7454BAFF08FE25, 0x52149FA3F8DAD0F2, + 0x5835D9CD92E83184, 0x72021D50470D04D2, + 0xD30C50DF888D58B5, 0x3AC990743D2354F7, + 0x798FDEB5B1575088, 0xC2EBED607FDA63EC, + 0xEDE476E5EE29EDB1, 0x203739B163D4D88E, + 0x7F2C4CDF2E82DF4C, 0x9C3B2CE9A37267C8, + 0x351220255D64C155, 0x681AE3DAF3A73058, + 0x01A358D9128B7A86, 0xBC70683B4A6979C3, + 0x944F30DCB7096BDE, 0xD05E29900CF736C3, + 0x564B884A05EC45A3, 0xD4D337C68C18DE99, + 0x2FAA3A30BEC0F25D, 0x1F40A2E0DF8D6171, + 0x89D9FCC2435112F1, 0xA90F6EA513E1982F, + 0x5F4B6931816E599B, 0x66647E28E2119755, + 0x7277F1F2E085EE74, 0xA8911798335DCDA2, + 0x793FF272D5B365F4, 0x6757EE4709949587, + 0x7F4724035FDCA1DD, 0xB5D61F76D4980A55, + 0x175B6BFC15CDD0C5, 0xDC17B40A177A7FFA, + 0xEB3DAC2C86001E5E, 0xA5F7333B2B1BA9B2, + 0xD53343AA4FB7DD28, 0xB36B8558948EA7A8, + 0x397BAA01068BAA96, 0x562F3CF0101A98ED, + 0x17DF68D720AA77F8, 0x1B696F6F424F184F, + 0x083A2CA4F2E573BD, 0x567FEE8B6CB3761C, + 0xB49ECA122467D05F, 0xAFF42ADB086D4955, + 0xBB106883F5201FC4, 0xDE76B3FD3282384E, + 0xAD738C3085FE7E11, 0x4985CD0720AFD468, + 0x7BAE68775557AE0B, 0x818BAE9AA774569F, + 0xA1DD82F3CCF9A01E, 0x024656337542D517, + 0x73B1189623049839, 0xE1D6DBEF26CC7DC1, + 0xE91F1B65F2B48D57, 0xDBAA44790E407312, + 0x6B7256074AE34680, 0xB7305925879F7231, + 0xEF56DBABD3CD4887, 0xBEC5BF9BA5BB795E, + 0xAC26716048436851, 0xB4077F8FE299B96B, + 0x5EE29B4D7D5DF897, 0x0CDC7EE02E30D81F, + 0xC5C8F970D4EDFF71, 0x1EE7D628E2408558, + 0x1D08B970013C34B6, 0xF53829643801155A, + 0xBC6227792A188E2E, 0xBC6227792A188E2E, + 0xAC29253EEF8F0180, 0x197E42755396E838, + 0x0D6CA79EEEBD8CA3, 0xBC9F17DDFB6B7BEE, + 0xCD536C4D33DCC900, 0xBE8D6442209B4BDD, + 0xD801CC02177FA3F1, 0x3711369E6CE3291A, + 0x5E0165278F6339EE, 0x9135CCB10D3D40DC, + 0xCDDC2B77CE54AC6E, 0x2928208674A32D95, + 0x7718D2E2060837D2, 0xD4D000BA86558503, + 0x9D6BFC12B05C6121, 0x90FF97C731BEAAB3, + 0x170F541E1CADD1DE, 0x4EB1369B70C19488, + 0x1BBC135A4D25EDDE, 0x003E36B62EFB38B4, + 0xC265DF9FB44A9FBD, 0xEEA52AD65C3E8DF3, + 0xB3CD58CCA6CDA852, 0xCC406BD28B98B303, + 0xF3F776ADA161E47D, 0x38B84ABF853D49FB, + 0xADD6627C4D325458, 0xECB116D1366C304E, + 0xA17BAD153B51547E, 0x3CF323E45610EDF5, + 0x87D51D72255D4E78, 0x32781653075794DC, + 0xFF5992E1C9E65D05, 0x9491F1AD2C105446, + 0x0BCA1D2C47B0D269, 0x81E9B27A86C752C9, + 0x0991549DE4D64762, 0x456C91FDAFEEF560, + 0x6A12D88881435DCA, 0xCEADF02ABEE1B4F9, + 0x4E74E62E0A97E901, 0x8F88952006DE23FF, + 0xF534D94DFA2EAD26, 0xF2EBB40684982099, + 0x4337511FA8221D36, 0x8A4DE15F43DFE430, + 0xF5BED327CEA362B1, 0xA51D13BAA974BAAF, + 0x14892474891E09EB, 0x4D65AA7135DD3C30, + 0x6CDD58146A436083, 0x03439EA52088DFA4, + 0xEC72C258667BE5EA, 0xF0BEB9CF42DF36BF, + 0xB5D45264751B7DF0, 0xB7066A3C28279F4B, + 0xB1D200FE26AEF3CB, 0x656F27616F8FB0BA, + 0xF2A1B2771A01DBD4, 0x575198C9652239CF, + 0xA921DED15FDF28F5, 0x911224DAEF877361, + 0x72BECCF4B829522E, 0x72BECCF4B829522E, + 0x5ECD378EE64450AB, 0x26D9797073B2C562, + 0xD7AE6C9C9C6AC54C, 0xFB03099134FEF45C, + 0xDEADC0DEDEADC0DE, 0xC621115F1A6F5977, + 0xC5238C011AF405E4, 0x6AD689C6799F1EAA, + 0x7BF1D73DB2ECA492, 0xBC500A1063E726DA, + 0x44621483FF966526, 0x13EC94A2AEFDE248, + 0xBDA07E5950085E46, 0xF1C01CFF96F363D4, + 0xDD829AA198FDC46C, 0xDD829AA198FDC46C, + 0xE37B76C387BE28ED, 0x530509BA34232ADA, + 0xF51D36185993515D, 0x28692C97ECBF1415, + 0xA7092AFE81944852, 0xAFA5489C56FA91B5, + 0x14EDA9EE27BD1626, 0x2E0DD3A927D540E1, + 0x5F9532F3B5CC2551, 0xE50EB54E0F21BED0, + 0xBC1CC91205EC8D6E, 0x19B10F122F21C510, + 0xFC309E94546FCDB5, 0x7AFCB9167082BBA0, + 0xF5ED37F54CD4D52E, 0xFAFB0D577CCBFE53, + 0x69D82604A1A5A254, 0x462B33C675A1D1E1, + 0x1E982AC8716912C5, 0x7B909A35D7290F2B, + 0x93E0DB8440B73A7D, 0x4569005B3D20FB02, + 0xED5FD7AF10F5E262, 0x9DA81F0CE2DC60BA, + 0x6E63860BBB190730, 0x20BA7623E7B1A254, + 0x388A47C51ABDAC8E, 0x4766CFEFD1C88C1A, + 0x591CA673AA6AB736, 0xF4346EC21B3C0EBB, + 0x22A249A53034450A, 0x84FBE118966BBE44, + 0xDC459CFA0CCE245B, 0x5654E8E65979492A, + 0xDFA2EF8E04127DD5, 0xA08F3C300F9E3468, + 0xC8B5C4A79CC18B94, 0x46A7736C33BD33FA, + 0x9FBDA379383A52A4, 0x32279DAB93C9A9FA, + 0x0145F696AAAAD2E4, 0xAD9D75DD073BF477, + 0x3A815DB3EA088722, 0xFEC8B0A512DAD49D, + 0x29DA3CA8D8B2692D, 0x2ED443C78A2CE682, + 0x8C044C5C84505B6A, 0x81772342CAD52F9B, + 0xC6372ECD45D73BCD, 0x51D19921B47902B3, + 0xC4637A6D03C24CC3, 0x842257AED006495B, + 0x02245FE4BED318B8, 0x080D38ACEC5DC1A2, + 0x74556E1420867ECA, 0x9E1262DB4886EB3F, + 0x9969599CCFF5D85E, 0xA7338370200A2E6D, + 0x2D3B147AFAD49DE0, 0x12590DA75EB3CBA6, + 0x949F397A288B28B3, 0x0E1D04FB9E7E48A2, + 0x146DF9EC4C4B9FD4, 0xF2C5E5F021DB1E93, + 0x80338406F3475E55, 0x35CA0C119E6A2A27, + 0xE1C8709406F2C41C, 0xFA7175953F1CEE2F, + 0x9CD43EEE12BF4DD0, 0x1E0A6E4148A87B0E, + 0x1D5F595CCAE2E238, 0xA37E4224284E452A, + 0xA6385DEB180F319F, 0x14F7A1D85D6DDAF8, + 0xFF0B610F6BE0D7AF, 0x9DA3CC3D2D3B3C2B, + 0x36CCB9BE67B970FD, 0x027E0E2FCD8B5BDE, + 0x788E7FD431BD67F1, 0x4C43652273FB9990, + 0xE4B90F367BD81752, 0xDF70785EF230F74E, + 0x2AFD795EEAC8D30D, 0xD510EA8DF3CF65AC, + 0x6A5D89D7769A40D8, 0x03B11E12FCFB58AB, + 0x886913BBEACA68C1, 0xA9365A6B7CE7D167, + 0xC3AC2FFF9612AC81, 0xDD242A311A364879, + 0x4E20D2A627011E8E, 0x47DE5E87A1AC7CBD, + 0x338D9F609FD632DB, 0x64D5E0819AFC3C14, + 0x4F8644AF03D0E0D6, 0x1146A9AE09CE2B14, + 0xE41033B25D003A07, 0x0DCD513510DC5D8A, + 0xC3D0841A0CC546A6, 0x9E3D03981E2E9AD9, + 0x048189FAC643DEEE, 0xBF2FD45BF8E200E2, + 0x8E17DDD6B9D5BF29, 0x425224C581329C44, + 0x0F3B4D4E43177236, 0x25472FE7600404EA, + 0x9049FE339D5F6F6F, 0x334435E3E64C4E90, + 0xC927EC229934AF60, 0xEE6C501F417577C7, + 0x6805D58CAA427B72, 0xBCF9A39ED5C12C34, + 0xEB119AA014E89183, 0xCBF932752CB5F789, + 0xFFE1E5B792D92B34, 0x45DC7FC8C8251687, + 0xE6869BECDD8F2403, 0x559B06B6D67877B4, + 0x4E929E7A5796FD26, 0xED231D763E9B0050, + 0x4967A516ED23A5A1, 0xCDD4B67C569B25CE, + 0x873C9F3104101DD3, 0x32C9F8FADAAEEFE6, + 0xFA83CA6776038F64, 0x337104572A0270A3, + 0xF1307EF624A80D87, 0x451E904FC8FB5C54, + 0x9EEFB62EB27B5792, 0x1594E542FF3D23EF, + 0xB2EBE8CBC58B90E9, 0x8C7776DAF924FA81, + 0xD27058A1CA2B13EE, 0x95090C59AADEBECF, + 0xA358F56F10732EE1, 0x68515D5331A425C7, + 0x35FB78DC42B7BD21, 0xB99476938BE4BE43, + 0xB4DEAE67F35E2ACD, 0x5427C5E12161CF00, + 0x2202A3F42C8E5F79, 0xCC9187BE146DCE4F, + 0xEEBFC7A7EFDC35B4, 0x2F5D527CB51AE553, + 0x59E7B488451F4D3A, 0xEB6BB8A97535CE52, + 0xCD90657D4C30E1CA, 0x122A00293D3E7167, + 0xF8155A7F03DDFC8E, 0x51B4DA0915C08A6F, + 0x9B0F3DCA3DB0F4CD, 0xC504A6173BF90791, + 0x34E82F05DF2974F5, 0x09A7440D17F223C3, + 0x15D757606D170C3C, 0x6352BFB5F372FA37, + 0xA7E4E2D361C2627F, 0xC989F1486A09B933, + 0x29B487C359E19889, 0x873EC65453DE323F, + 0xFE3F9C29F7B32BD5, 0x7FA7EB6FAB2D276F, + 0x7B18DA61F6BAE9D5, 0x03815B6159630EB2, + 0x166E7CF68597D8B5, 0xF8E5239A2E6E0754, + 0x95EB5E34F821BABE, 0x2DEC9FFC148A228E, + 0x0B565B0AAE56A0E8, 0x9FDA8C53BDDCDF38, + 0xF086AD9354FAC3A3, 0xDE122780C559C996, + 0x2977A95FD04772C6, 0xF2FED098BF7385A7, + 0xE2C9439ED45DEA60, 0x200BB4DD7C4DB741, + 0x0035BB914316F1E3, 0x754CE05199AA0AC1, + 0xEFB55E7C25D3B3BE, 0x3937970C698442EC, + 0xA097AB275061FB21, 0xC9B0CDBFD80029CD, + 0x164ECBB3CF750CB0, 0x60C60FC4CCF9DF77, + 0x867365E111A3B6EB, 0x4999364EFF3B7CFC, + 0xB0A6CFD2C69C1088, 0xFF15DAFB540CAC53, + 0x649C97D52332341A, 0xEC59B73A84DB7C06, + 0x21543C612379DB3C, 0xC4989A5366317AA4, + 0x2C42340F916C5930, 0xA28F3E77A1106CDC, + 0xE30524E1871F481D, 0x6645E3ABFFCE6FE1, + 0xAAE9BE70EC7C69AB, 0x8F665D0A29ADE78C, + 0x6D955F6A9E0295B1, 0x69859D2303EB2EA2, + 0x22802E5DC33A0DD7, 0x0243B92F54E119C8, + 0x4C9BF537BE2634B2, 0xA47A27C1733E0E64, + 0x259BA6D4E6F808F1, 0xD6F6A5AB452C028F, + 0xCED08CBE8EBB97C7, 0x93B4E31A7E9FB11E, + 0xA761D4AC6115623D, 0xE71BFBEC53FA2601, + 0x0568566ACBB5DEDC, 0x8748E0122DD45064, + 0x5A34CD9C3C5BEC44, 0xA94E048BE46D64B3, + 0x312342E1A4874F3F, 0x5B5DB02E446390F8, + 0x552BD9096179732B, 0x76BC2EF8CC1D59ED, + 0xDBAA5EC848BA2D46, 0xDDD52AA27400EF1A, + 0xB1BB03742917A5D6, 0x59E6090EF8D1C735, + 0xB8ECD61F531A7B02, 0x5B48B32DCCB9B3BC, + 0xB302540597885499, 0x1CA32AD653DA7B78, + 0xACE699C71AB9DEB5, 0xC39EE54ACC066848, + 0xD80A80346A45D761, 0x378F13F1637D5FF2, + 0x70A64C0234EF522C, 0x3F4E3CA0562D1954, + 0xDACE671663F2F5DB, 0xCDB2D643EC18E75E, + 0x3A52AE588830BF7F, 0x7335D739EB2740AD, + 0xCE86D8191B762107, 0x5F451CBA22BC908B, + 0x1F34B0626C594380, 0x6AC98477BC7983DC, + 0xED3F346429CCD659, 0xCFFE1562F957B4AA, + 0xA78DE25577300BA1, 0x6FCD5BA125F215C6, + 0xE7DCB5B874BCD96E, 0x21300A5159EC89B1, + 0xE2A2AA2F659D77A7, 0xE946751408DFA71B, + 0x43DBAE39626CE83F, 0x7FC329B0A31E8E89, + 0xD77EDADB0420E6E0, 0xB7E1FA65AEDC9FE5, + 0x0C8FAC83902A62DF, 0x5E9616802197B066, + 0x19E50EB6E33E1D28, 0x7500BF0C4F5A9857, + 0xCAC57395B151135F, 0x111DDC4573BC52C2, + 0x29C24BFBED8AB8FB, 0x241C904AE6C04171, + 0xEAE6DCC7EEE3DB1D, 0x2C0A57D1B479F226, + 0x80D9F74197EA47D9, 0xB2B2B460EE75764E, + 0x1636D7FC127B10D2, 0x1BBDAF7867AEE1E3, + 0x23A3CBCD50D54E47, 0x326D4D332D1DD1A5, + 0xAA5F02DB48D704B9, 0x20D884FB6567BAD5, + 0xB3C641F3630BF6DA, 0xB8BA623A2D78418A, + 0x478DCBD2A98B705A, 0x7EB72F98FF7F5344, + 0x2F8AF0E82773A171, 0xB17DC325CCB9F8CE, + 0xF22B6C47C6EAB066, 0x4030103C8B148AFC, + 0xDB89591E290D9182, 0x53B34E295AA9EE4A, + 0x7B226C785A52A0A9, 0xF5AC0DFFFAA7BD9C, + 0xE38CB9D7D39FDBCC, 0xFAF579CDB13E5499, + 0x16160DA74A8E74A2, 0xB3C38851B8F9B85D, + 0x23DFB504655D0CE4, 0x16519F476D90D785, + 0x9BDF59818B1E38C1, 0x44C4C2E7417F5E29, + 0xC35B5CDB2824CF69, 0xC7411AA70F899F00, + 0xAD7E85FC227197C4, 0xA5A5CA8676156FA7, + 0x7AC24EAB6D74118D, 0x3E42526AC8977816, + 0x77DFCCF5948B8C71, 0x95FFEDE0BB66029E, + 0x690A61A6D13583F6, 0x26068E677B9C2868, + 0x7D6F9A3EF26136A0, 0x51D29810E2319A09, + 0x0D53A3B8DA0809D2, 0x4A95E0F654DD603E, + 0x2DACD605FC681475, 0x0829510481BBFC01, + 0x9A53DED9921DE990, 0x96087FB16B45B4B6, + 0xC95EB1DB6E92113D, 0xC67DA40CA8162F2E, + 0xF6F4383B7C92F11A, 0xA751BA48B15BD3A6, + 0x46E571A0E20D01F1, 0xF2A0B4A5DE0987FB, + 0x45C597097DD7CB81, 0xE1A4F64BA2981789, + 0xCC9F3371A7C28BC9, 0x2B58EF16B3ACC62F, + 0x1AE42C1660FD6517, 0x48558536A19BA88A, + 0x17695002FD8B2AE0, 0x4A7DEBF7B9F74D50, + 0xDF2E1F7742402E81, 0x9DBD750110EA2B41, + 0x490861B88F4FD846, 0x9B0418DD3F3136E7, + 0x0C5A80A9E096D529, 0x0C5A80A9E096D529, + 0xC6EB449E33977F0B, 0x16C37952C76894F5, + 0xB302244A1839BDAD, 0x6EE2AE2D8DD2827E, + 0xDE2EF5DA284CC8DF, 0x4A70C67E8FD1FB85, + 0xBF371CD2B64212FD, 0xE68A21B882B190D2, + 0x2162C446DFDF38FD, 0xDD9344ACE0A7C71B, + 0xDD19FA1C6D657305, 0xF22CC2CA28E44D4F, + 0x38FE1EC73743793C, 0x80F5692905AB0149, + 0xB44250AAA456492D, 0x3D3453831104FFFB, + 0x88A741E44A2B3495, 0xD17A6DB35E21C90C, + 0xA8A024587329F36A, 0x84CE5E7CD3A7E197, + 0xEEC4047028426510, 0xB9756A98505CE062, + 0xF095C0405307B21B, 0x06B95C5D3415375D, + 0xF6D733C32076AD03, 0xCC269A238CA6DE56, + 0xDCE214D9ED58F3CF, 0xF0AD0F5559C2EB4C, + 0x2A251AA48B2B46DB, 0xF450B95378AAAE0E, + 0xB3B3359379FE77D3, 0xDE4C646AA47C6026, + 0x608207E7A8FB787C, 0x64A84F7738997E3F, + 0x95101C443A84E7F1, 0xE131502B4410E6E3, + 0x437138B6A830166A, 0xE45C31D4911CAFD4, + 0xD99DB210089617FE, 0x67E5A75A1517A7D5, + 0x044DBAD7A7FA2BE5, 0x8E89F0A86FFEEA0A, + 0xE5F15EE0BBCA8AA7, 0xE8ED0B27F25D2A0F, + 0xC55A0B40FFB1ED23, 0xF661609B6220442D, + 0x27E32866E9A5C416, 0x96BAB7B7F43C0906, + 0xD1A1EE3B4FA8E760, 0x577BCA44D01C75F4, + 0x11DB3500F042A8AA, 0x73E3E38B4B4C9610, + 0x35B9E0803292B641, 0x62A5B93F8270CC83, + 0x5F43D83FD6738741, 0xAB123D3BD3F76D93, + 0xBA3D194057C79A7B, 0x7E7395B67761B607, + 0xC3675780C92F90F9, 0xD34101938B49ECBC, + 0x93054C88E6AA7C44, 0x5C59701DAED7BE6C, + 0x004C505A6A0AB0CE, 0x9D7B5D6F525E6E53, + 0x11FA5D3479C7DD47, 0xBFC9082A414E1E7B, + 0x150E808B375A385A, 0x91D57FB32DCF8FCF, + 0x89C8553DD3274AAE, 0x97D71D1F463885ED, + 0xC3EAD29AB273ECE8, 0x5FCD24E52968CF48, + 0x5B712761429DBC14, 0x0EF0D68557EC77CE, + 0xF154B8D1775B2DEC, 0xFF1BFD649A95D374, + 0x5D6B2D4830A67C62, 0x86328A349E5CFC0B, + 0x4DC416F246A41FC8, 0x964D1F8762BDD72E, + 0xDD79DF9F4D26E1C9, 0xCF29B45F9DCB6767, + 0xAD5FDF34B81BFE79, 0xAAC322731EF33BD5, + 0x3F5CC444DCAAA8F2, 0xE1824063F3D48143, + 0x4669B3ED80F24B4E, 0xA4A022C8F062BB1D, + 0x60B7FD3E5787A61F, 0x0D3F9974660E17FA, + 0x35F8DA0E8A31EF1B, 0xCA591949F95EE0CD, + 0x0A123435A26C36CD, 0xFC5BE73136581F1A, + 0xD51ADCD2D8BC0FB3, 0x5FACB8A2F85D58B4, + 0x993CBE59D350D225, 0xC9A372AD41A07089, + 0x265635150FB0D82E, 0x58FEAAE8E3988687, + 0xF514621E8EA463D0, 0x85445813EB7625BB, + 0x76B3F29D3F967692, 0x0C0EE4235CEF6BEB, + 0xC4301E5121A0ED73, 0xC189FA1CE4E3B2A5, + 0xB8DFD30D6973E135, 0x8CFC2F41A749E236, + 0xC59872A5134879C7, 0x0E827FD7E3F4047B, + 0x715135F4B82AC90D, 0x60533A83B4AD1F5E, + 0x1262D55792428154, 0x81582C67F13BE1FF, + 0xD9454B5752C857DC, 0xBCB989F2DE72FCC8, + 0x0F10B05DDF8D16E9, 0x9B4A5ABBC2942C51, + 0x16F46FB18C8009E4, 0x62E0823A71208EF9, + 0x27CFB1B1E078CB2D, 0xDF195F743266B4DB, + 0xC6796A8FFA375E53, 0x392841D58D2EED1D, + 0xCB645E85E97EA48B, 0xE73EDC7F2F144E8E, + 0x2F09F7976C512404, 0x80F28BAD1826C85F, + 0x44AB0B3AFECCE242, 0xB50F5EF5ED2A7BA7, + 0xB542DE8C3D1CB210, 0xAA9C3673D5649D1F, + 0x121FB4DDDC2D5291, 0xAD50B3F3A4AE3538, + 0x2E7B9B683481687D, 0x5BCB829D6DD41FC9, + 0x998E18CEB44487FC, 0x45D654CF17733053, + 0x428BDCB9DA58DA53, 0x45381F1E5E17264C, + 0x060D935D3981A275, 0x88CF23F322C9687A, + 0x5B50ABB1FE3746F4, 0x4D06F23E397097AE, + 0x3A48AB4445D499BE, 0x2597DF7E9AEC80DE, + 0x9896CE4721BE84BA, 0x4F769DCD0CFA69F1, + 0x9489659372A81585, 0x6F331AE8B59DD4E6, + 0x1187CB58D7F3BED7, 0x1187CB58D7F3BED7, + 0xC9F98AC1884E73A2, 0xB807F97E7979F421, + 0x03300B57FCAC6DDB, 0xBE8646618B3F1D3A, + 0x98EDF76A7271E4F2, 0x79C40BB9AE33ED24, + 0xA770C8EEC6FB2AC5, 0xB1D840746BABEB7C, + 0x8517D4A6CA8513ED, 0x7F242B062024F1F2, + 0xEE68096F9F37341E, 0x61BE49A80917237B, + 0x4CC7F0FEA5283FE0, 0x0137CA6AE1876609, + 0x19BFED045C647C49, 0xDA36268848D37664, + 0xD7021272EB0A451E, 0x612F4DE6E22C7FF7, + 0x471D2FF42A94B4F2, 0x6906086484B6A5CE, + 0x6BEDF5769AC2DC07, 0x260CEFA7E46259B9, + 0x9870ACFB89A90995, 0xA3EE9E61D762C09A, + 0x89D630CF5EA96D23, 0xA8367F71564DC09F, + 0x2C933ABF17A1DF41, 0x81498BC667997F2F, + 0xB7B0870EB531D08D, 0xD5D519EBD3B94A60, + 0x82E7FFCD5B2326B3, 0xF864A45AA21611D8, + 0x93CF869BAA0C4874, 0xC7776239A391CCD0, + 0x8634CEF2522D987B, 0xF519A1B1B7841DFF, + 0xB61C8E878A4199CA, 0x88B0C92B04E14561, + 0x4B490A6832559A65, 0x9EDDE0DBBEFCB232, + 0xCAC66558B944DA67, 0x425E9DF960258EAB, + 0xD93DB43B82BC0D00, 0xD3693FDC4A25CD24, + 0x459FD2C8D0AB78BC, 0xBC240866AA8ED57C, + 0x95EED5A694951F9F, 0xAB53B3829B28E5B8, + 0x8ABE8608576D9CE3, 0x0CA958CB1364FEA2, + 0x58F735290861E6B4, 0xF1057FBC3AF0C1D1, + 0x3C8938D7D872211E, 0x9318BB548FEB68C5, + 0xBF59707B3E5ED531, 0xAAD93864EB031AB2, + 0x477D9DB48F889591, 0xFC93488310E12860, + 0x617F49C2668E6155, 0x2FA97C2DC77433C0, + 0x15E33297C3E8DC60, 0x7FDA3409CBEA9BC3, + 0x5AE17C6B0134B7F1, 0x5781CA93A99BC384, + 0x4F18196C8D38768D, 0x12CEE97058C9C747, + 0x56176892826A4FE8, 0xA4920568F5B9D8E9, + 0x10BA078DAD54C628, 0xF0688AC5AFA15C19, + 0x2C328AF17210F009, 0xD0591B082DA226FB, + 0x2FFB6B224F4B2926, 0x832AD84AA258AE80, + 0x919BE13EED931959, 0x373635EFD76DFAB3, + 0xC514489CFB8AF806, 0xE4D3CB39357EAEFA, + 0x90986E8876CE0A83, 0x63700C801F742019, + 0x3882114BDE571AD4, 0x8F160110753EB17B, + 0x46CD3CB66E0825CC, 0x668F34A75441746A, + 0x244F70C84C547D2D, 0x3348A436D458D8E9, + 0x155467ACA0F55705, 0xCA924A882B048BE4, + 0xBBA55BE9AAAABF44, 0xBBA55BE9AAAABF44, + 0x0C1C5D756FB5F337, 0x1FE2F14117C59281, + 0x4DF7CFFF471A7FB1, 0xB02FAE47395D3028, + 0x8217150E1217EBFD, 0xDE58AE9CB0304806, + 0x4FC9381A7AEE8968, 0xAFB096EF517D4ED8, + 0x6E31B91145873922, 0x1C277775F2803AE9, + 0x6AF0636DDEDCB6DD, 0x6895CB0D4F2E7CDC, + 0x7FCC39C46C3C03BD, 0xA656FDB82B9702AF, + 0x1D132D614DD86811, 0x3D9BC07C93913E04, + 0x6D8EB211944DCE08, 0xAD2E50C41F073454, + 0x0DF606929C105BE1, 0x44EF5678D6916481, + 0x395BF71085D1B1D9, 0x1E540B2EA8ACFCE7, + 0xCF537FDE4FBD4CE5, 0x33B9E3E3CE7D899A, + 0x4E52E752C76E7E7A, 0x8907F12AEE458EDE, + 0x6BCCF9948492FD85, 0x22FF5DDB609C86A2, + 0x14922ED3E38761F0, 0x3F7AA5D301095455, + 0x1CE592FDC749D6F5, 0xA1B0560BF95963C9, + 0xB497F06B288DCFDF, 0x14048B1C509BDE11, + 0x9737A37136F07E75, 0x1FB6C0DF282CC98A, + 0x4BA166079D658ED4, 0x7172396C42DF80C7, + 0x085DEB493BE80812, 0xD5918C818BA4C4C6, + 0xD05D1A6C74DA3498, 0x1C53C249366DA878, + 0xFBD96D87AC96D533, 0xC9E2A193C0DDFC43, + 0x51BC1ED3CC44E8F7, 0x4EA6290996DE4EDC, + 0x1A7CE7CD3E653485, 0x8E71D51E9899AF27, + 0x9CA5DE655269FEC4, 0x2CB73B1E6C06410D, + 0x2E4C123D1C8A710E, 0x978BEDE0E493633F, + 0x4C60E6EFDAFF2462, 0x235C361BD000E938, + 0xE1E258829A885245, 0x8696CA873AEB078A, + 0x31B927BBC44156CD, 0x764D10CFB2EDD065, + 0x362E2D3FE93A9959, 0xD4B2C39F7AD5A6A6, + 0xAE4E8157D9ECF087, 0xC34AC094B6EDF9A4, + 0x8B7FD87F0DDB421E, 0xA3FD819B07AA6542, + 0x706D57B0F50DA710, 0xFB8A6909539A30B1, + 0xC0572928C0ABFDA3, 0xEED665F842CC2DA1, + 0xE83A3E3557A56640, 0x5FEAD10623875182, + 0x6483C25849031C4F, 0xBF19108B32D40D3F, + 0xF5134943EA29868C, 0xF0BCF093FA825DD6, + 0xA4A79DD2D9600654, 0xDE8CC2CD33BB8AA7, + 0xDF6E5987D2B4D140, 0x6F6552E625D83F5F, + 0xFC1E275A90D39995, 0xCAE2ED65934CDBBA, + 0x33468EDC08E371F6, 0x953EAC8A463313E4, + 0xF7B38B8305F1FE8B, 0x774561E80A3178A4, + 0x1F710BFF7DAE6261, 0x1A7786DAAF33238C, + 0x6E08BF5B3722BAC9, 0xA69AF6D166A61AC8, + 0x9A2D0FB2E7852392, 0x5DECB07FFEBB3573, + 0x1FC289A0C3FF470F, 0x925E5D5383C34D2A, + 0x58FCE43488F9F5F4, 0xBE4E52D6C3D53CB2, + 0x4DCDF92BF64236CD, 0xB43C78B59C9567FD, + 0x054354A99211EB96, 0xB2EC8B4970766623, + 0x74C180030FDE4B69, 0xB3D2E916AE9C2B8F, + 0x2DE3F0A134FFBC0D, 0xD40616C608081C8D, + 0x87EB7A3FFCB314DB, 0x6B8C9C1D64326EAE, + 0x8586789730B10CAF, 0xEAEC74D0C3BE5CA5, + 0x66972397E0757E7A, 0x38A6CBA61FF8658C, + 0x40FDEDB72F8293B2, 0x20CC00CC70A99443, + 0x74698374C45701D2, 0xDEB850608E66EF2C, + 0x30432A0118736E00, 0xBA4FC3036D9EBD15, + 0x6C6B148586F934F7, 0x5431B2413A2F9639, + 0x142A02425FF02BD9, 0x8B515AB1F9C6E8CE, + 0xB13C14F66A00D047, 0xEF20E9A7B745D17A, + 0x3D45B0B355C5E0C9, 0x8FFA52004D85F69D, + 0xEDB1232C5BEAE62F, 0x327DB37C9D3A2719, + 0x92C47782FDA8B2A3, 0xFE0E12C8B9EF9558, + 0x423E8DE37D934D89, 0xEACFC87E44438F24, + 0x341DE7ED1D2A1BFD, 0x01758128AAB0BA8F, + 0xF1CEA8A4198D8E9A, 0xF351A3EAC7B0FC94, + 0x98C4FE6EC34154CA, 0xC37AD0FEC29A8CA8, + 0xCA7D9B86ECA7481B, 0xB4C12EFC62A8536A, + 0x2720AAA75001E094, 0x620752C0B6B59FF1, + 0x8FBB6758B3B3E9EC, 0x63A6910486BA1580, + 0x97465886D35210E9, 0xF77EA5B6EAF40F43, + 0x42FB3B532D526E6C, 0xB1F158EA12F59967, + 0xA1FCF8E6AF40B731, 0x6098412AD83D65D4, + 0xB4EDDC19532BFB85, 0x87C9692CDE8B3A8D, + 0x1C99BB7B6E96D16F, 0xFA67B92FD990FE3A, + 0xA8AE43AEC1A61314, 0x6DB73AEB703E42BD, + 0x0B39CF0D53F1C883, 0x624394FE858634D7, + 0x761B77454205A61D, 0xC90B0312846BCF7A, + 0x8D11E61A4ABF49CC, 0x63BF5A9404EFAAE0, + 0x925227803A0EAA1B, 0x925227803A0EAA1B, + 0xFDE8F069C542D126, 0xEB9D3AE49A59372C, + 0xDFF09646E12EC386, 0xD9072F2CE5406719, + 0xBA01E7B6DEEFBBC9, 0xD5969825AE0DC560, + 0x3A9128352EAC9E85, 0x835485714A38BB64, + 0x34770B9CE0E03B91, 0x03E204E0FE6D29E3, + 0x7E07C78925D5FD96, 0xBA7D57857CC0E9C3, + 0x6FB7BB3607D27FA2, 0xA61FF8357522611F, + 0xA69AC4ADE82B57A4, 0xA96A20DEF9847528, + 0x84F0F13120B4E098, 0xD37A24583365B8E9, + 0xDACE1BE37D88AF67, 0x339113967A52524B, + 0xE5810AC70602F2F5, 0x828F1D6B5FDB9530, + 0xB1632E9A5F988D11, 0xD79E16EA1337F8F9, + 0x524EE43A37232C00, 0x5BB069F5430A3866, + 0x5A556B229A169402, 0x9D6657684B48B77B, + 0xE495D1EF4C91FD20, 0x50733A2CD8CDDED9, + 0x755D6D5267CBBD7E, 0xA805F530675B75DC, + 0x4F1D4BE3A7F24601, 0xC612552622E74D36, + 0xFAC75988A7D078D3, 0xEDA3D32C7E577A06, + 0xC3376F42B1FACCC6, 0xDA8ACB3906F9E924, + 0x80C527893080CCF3, 0xC73BC4D74B42DC7A, + 0xA72200F51875FEA4, 0xA72200F51875FEA4, + 0xC7E7181C09F33B69, 0xD3198E318504946F, + 0xE870F9F1F7B4F1FA, 0x0D9FE79B50145C2D, + 0x50EEAAD86232EE55, 0x589EDF8AE5C8D3E7, + 0xD0082607100D7193, 0x86CC61B7283D33B0, + 0x8F9EE5687F8EECCD, 0x6B140ACB5EA66735, + 0xDE7465A27D403C06, 0xCAE2D0DD92A9241E, + 0xEB47EC4E34FB7EE1, 0x911ACE3851C77474, + 0x2E397FD2ECD37C87, 0xB590A8673D04F7DA, + 0xECA658CE2A4E5A72, 0x5770EF297A89065D, + 0xA0FE76168A189DDB, 0xFBB350E73795834E, + 0x2975C866E6713290, 0xE5B011B4A813BDC4, + 0x2B626A0150E4D449, 0xCE86A17A749BBDBF, + 0xBC8983F38F78ED51, 0x4A8177C3950CBBB7, + 0xA0D3E4F7AAFB7E78, 0xFBC0D0806444F2EF, + 0xEB078CA2B5E82ADD, 0x55DB6AD4E57B13E0, + 0xC388A0F065F5BC34, 0x41DA9E172CE3E2A3, + 0x0D127585F77030AF, 0xC66769C13C830856, + 0x92659B4CE1863CB3, 0x03C842FBBC137936, + 0xA036AA84D84CBFEA, 0x488D52DCB5C2DCAE, + 0x419594E137637120, 0xEC42452B73B6CCCE, + 0x42BC05C27A946054, 0x62CB2C6F27D37CA6, + 0x963D27A58DF860AC, 0x16E516CA9C88FF48, + 0x49C32D60007AFA47, 0xDF02DA324F934755, + 0xF06A16CA55D138D8, 0x511C3735BE352A9E, + 0x0759591819534F7B, 0xD9F4B63D8750476C, + 0x9BADDC94EF83B823, 0x9E3EB3EDB58FA356, + 0x33E8CD3322E2FE31, 0x473DA067A7AE5435, + 0x4F5070AA58F69279, 0x4664EA53DEDF81DD, + 0x1E7889778264843A, 0xB71414EE828DB2E4, + 0x817268968605947A, 0xFC552788374D7693, + 0x2FA3173480008493, 0x3250879571891DA5, + 0x61E360B7E040D12E, 0x31900BAE83D92189, + 0xD80958FC74E988A6, 0x7D2B9E6A64637269, + 0x5128DF14A5BB86FC, 0x94A2F8EF5093914C, + 0x4C68DDDDF0097317, 0x51A3C8E07D2F5E54, + 0x1DE37BBF9E9CC14A, 0x2A782EE3BA0FAEF2, + 0xBB8EA16ECBC976C4, 0x13EEB60CB723D269, + 0x705B1F36F9880DD4, 0x4D6FB5FCCA634B35, + 0xC2AFFFDABBDC2C5C, 0x74634292CAC72DD6, + 0xF0AF20AA7731F8C3, 0xA0F8D741F5D8E7E4, + 0xFB2456B2040A6A67, 0x0EBAF08160E9368F, + 0xE111A7C0D200CBC5, 0xCD67FE6304FE304B, + 0x162F9D995753DC19, 0x356DA9D0F27813D5, + 0xB124B57F571D8F18, 0xDA1611E46AAEA71B, + 0x5C8B2F450EE4328E, 0xF19CA9857B40C435, + 0x5702B917B99DB1CD, 0x370AC696C18B193A, + 0x9007A2F21DC108D4, 0xD46F99F9A292A7CC, + 0xB9CF1F793A9F1BF1, 0xA178B7CE272B8387, + 0xAA653AE61924B0A0, 0x45D871626315FDAF, + 0xF020C96915705B3A, 0xAD95C8C9FBF8ADEB, + 0x90A09F3A45FED688, 0x9437DA8C00A86EE5, + 0x1EE7D8DF4425F053, 0xDF27EE31B849DF76, + 0x20CE80B0C2BF4ACC, 0x733CCC70A38EA8EC, + 0x4AACB96203D11A31, 0x884D6C481876A0F1, + 0xB4BBFD9CD8B3922B, 0x6076D375CCB55DBA, + 0x8E04FEDD28D42462, 0x676B3404DACBD7C7, + 0xF660602546D27BA8, 0xEC1D9CA900B82625, + 0xAC7BFD5C1D83EA75, 0x28419FF3E85DDCB7, + 0x22102C9ABFCF125D, 0xB71F47F9B78DA5B4, + 0x8621390F0CDCFE1F, 0x7EA74DCC048EEC24, + 0x632B2940C67F4EA9, 0x4F7359A5B79A8C65, + 0x8B5FADCC4E3A145F, 0xF826718CED0A35A3, + 0xB85F26619073E775, 0xA1B11613FD4ED8DC, + 0xC3B07BA00A83B0F1, 0xCF8A60921A13169B, + 0x15BB2A5C757EB91F, 0xBF3F0FC96E6E7EC0, + 0x5E6CC07646BBEAB8, 0x0E636D0898679AE1, + 0x0A50D2604E05CB94, 0xC0BB049611C513B9, + 0xB885852C39CC265D, 0x081DE0747AC1B2AA, + 0x4E0AF9114608257C, 0x4E0AF9114608257C, + 0x2E8AABFA40A84F8C, 0xA3062DD812C1F6A5, + 0xF487521B7110C156, 0x7337960ED0BA80E4, + 0x631DC5DFF4B110E3, 0x2A8355DBDB78BFD9, + 0x9BD7BD55E4533183, 0x76AFEEC6511A0C9A, + 0xE260E0BB9CD995AC, 0x9B3EDEAD916F8BAC, + 0xF733F45FA4497D93, 0xA61C8CB67DBA91CD, + 0xA0696A65F009EE18, 0x914056C277ED18E6, + 0x3DACA8DDC6FD4980, 0xCBB53772CFBF62B8, + 0x1D506DBBBC51E64B, 0xD2BDAE9F8BA9E776, + 0x9640E30A7F395E4B, 0x9640E30A7F395E4B, + 0x66E3AAFACE2D1EB8, 0x66E3AAFACE2D1EB8, + 0x60EDD13EB3AC1FF3, 0xC8C9BCC66DAE2285, + 0xB93B2867F7B479D1, 0xBFCC0DE8DF47CFD0, + 0xF145F3BE2EFA9A3B, 0x5288A715C24572B9, + 0x171BAFB3C60389F4, 0x86F91C49389050E0, + 0x88087EE1F28024AE, 0x1BD4DD9392DC8315, + 0x81FA173F170560D1, 0x201DD5EED8943538, + 0x304AE42E357B8C7E, 0x573C7DCF0ED57602, + 0x05A1FE504B7F2587, 0x4055F75B86E238A1, + 0x92B35082E0B42F66, 0x771DD26343414AA0, + 0xF6792800AC95350D, 0xD40A2CADD6CC0E8F, + 0x23083260DEC3A551, 0x9A0EC5DB2A338EC8, + 0x394DCDB9E836B7A9, 0x6244A825F67F955C, + 0x5CEC1A84620E7D5B, 0x32DEC16D9E825DE1, + 0x77A1EEC547E7FCF1, 0x2E54D99E9DDB5FAF, + 0x2F395D61F3A1F877, 0x9423CF0FAD15E45C, + 0x9EDD76E87D5D51BA, 0x6D0C8CF180E8B12C, + 0x9E82F0F362881B29, 0xC27530889C24C040, + 0x2D83BC011CA14A3C, 0xBBB1E002003B2F1D, + 0xBCFDE9EDE4CF27DC, 0xDFDC9F55636E70E5, + 0xCAE55F48D3D7875C, 0xC78CD0E23FDA9B40, + 0x693A5C6D6734085B, 0xA48FA5CE681A5230, + 0xE532EC1A63231B4F, 0x45E06B673D198AEB, + 0xAE540335B4ABC4E2, 0x21EADC24F7085E0C, + 0x75D3F7A1B0D9B145, 0xAB6C545A92C4ACE3, + 0x77F1BEB8863288D5, 0x4E8DA737B686529A, + 0x19531C47A2ABD691, 0x794B41873ABF6033, + 0xE532F5D78798DAAB, 0x824F744352C8BC82, + 0xCE94AEBA5D82908A, 0x435E59191DAA3ED5, + 0xEAF0FA793D05C592, 0xF8D57A5113E7316F, + 0xF5BC95857BD6D512, 0xFB818B147C12D4D9, + 0xF1EEA2DDA9FFA69D, 0x170EE31B1057F726, + 0x03D7FB09E75D6B7E, 0xFA3E6ADC3E5D386E, + 0x703F12425ECA8BF5, 0x9339894B54C5D755, + 0x1775961C2FBBCB5C, 0xBEC93E53B3756B98, + 0xA68D3D229F4F3B06, 0xB02F31FBBC19DFEF, + 0xC361AA040D6637A8, 0x587EA57CAF325AC7, + 0xB0C56BD3D808D863, 0x8E7175905F094E48, + 0x4E9021C1FCDD507A, 0xE0222A22232C6034, + 0xF3162836C28F9DA5, 0x3C466A034C95F4BE, + 0x749FADDF97DFE930, 0xB5B1E1F68FEC43D0, + 0xCB2D4AB84A19AA7C, 0xB5804B90CA0871B8, + 0xBC0753C9CA14B506, 0x3F0C68D0F5C4214E, + 0xA9D14EEA259F9248, 0xB8DDE0099965B825, + 0x6D0858B8EDFD2B7D, 0x3A13FD2813C8251F, + 0x5006D96C995A5827, 0xD214FBC130C3F4A3, + 0x8B3CA62B1EF19B62, 0x8F24BA8A74A26844, + 0x579CCED0265D4896, 0x29712F962253A7EB, + 0xD9284A8C0D48352C, 0x36BDFFB529ECB71F, + 0x2CB0075110BE1E56, 0xFEA98B8766327B98, + 0xD1F8363DFAD03848, 0x5CB56864CBD74649, + 0x290D248E25815AE8, 0x290D248E25815AE8, + 0x5AD23D40115353AC, 0xB0C1A43193C25F7A, + 0x252E5F915EABB675, 0x0EDEF7978CB99169, + 0x10C54E4389C12B42, 0x42B4D8C7E389E8B7, + 0x788756D73AC2E07C, 0x3141356F64B8C5E5, + 0xC74C33FCA52856D5, 0x0EF48368674E888A, + 0x5B11728527CA6E5F, 0x56D29DCCD9789CC8, + 0x50C1B2874E50C114, 0x276A552F293D03F4, + 0x41B9FB92EDED32A6, 0x7A79F2D065AB798F, + 0x2E648D16F6E308F3, 0x9258EECD9F3B037F, + 0x5DC40A8869C22141, 0xD73BAB1C72BA581B, + 0x1CCD9A37359072CF, 0x1664AA1696810AD6, + 0x65FAEE425DE637B0, 0x513CBAB6D250E264, + 0xF22CA0FD74B80E7A, 0x7FF37BEAAE86B2EB, + 0xD3C2E180A40F031E, 0x2CA4B93E310C1860, + 0x3C08A8E30363B353, 0xFF8EDECFEAFBF5F4, + 0x15F944730C832252, 0x9FF2677053B4F2A9, + 0x5501B7A5CDB79D37, 0x7888CF2655E6DE28, + 0x84A810B375E69C0E, 0x243172C84C6C38E7, + 0x93B93A37987F1F3D, 0x12D312F073772E84, + 0x2EAB7AB65488D9C2, 0x5EAC714BD9D0AAEE, + 0x7148E0F43D11F0D9, 0x5E966E6F3D296D4B, + 0x2238E588E588A6D7, 0xFB0F840BB90F1EB6, + 0x5A4A6A6D3DC64F52, 0x94FCE9F679E49A66, + 0xC0C527B525D7CFB5, 0x3E61B2932398250B, + 0x83F813570FF519DE, 0x908774FC550804F2, + 0x516FC96EB88EEFE5, 0xB01A64E0E8B40D33, + 0xDC48473142545431, 0x71B254F3954B2700, + 0xB6C987F9285A3814, 0xE619FB502337E500, + 0xAA525DFF66BB82F5, 0x22B36D660BBBE42E, + 0x91D6DD290888CBAB, 0xCF371493BAEB8860, + 0x26AA915AD89BFB4B, 0x0D5E478A215B3F4A, + 0x474D94FE3A1949C4, 0xC166CECF64A8E5BE, + 0xCBB203C04D1ABD27, 0x541F0E02D2741B99, + 0xB4C2EC463672474E, 0x17508251A3DA78B3, + 0xF8C54A461C3E11DC, 0xD3644007ABF34A53, + 0x7CF0448787B23758, 0x93034E1F010EA0FB, + 0x3044240D2E0FA842, 0x718EFCF2AD11E241, + 0x9C00E77AF14B2DFF, 0x0F11288AA9340610, + 0x2916A928514C9827, 0xB1483311BAED1E01, + 0xB328DCC3A3AA401B, 0xA20C4765C44D5D35, + 0xC8D667EE52114ABA, 0xDF26A9084336749B, + 0xBE6B23FFA53FB442, 0x968AC0BD45D79791, + 0x0BC254FF3A911501, 0x57EE38DD25408ACD, + 0xFFF3A50779EFBBB3, 0xA74F056986BF2998, + 0x271C9D3ACA5D6409, 0x5327F4D9D81C2A6E, + 0xB1B6216CA2E7B55E, 0x9BB1222A989074AC, + 0x20B60995556D004F, 0x591190E69BE43117, + 0x299FAEBB108AE05B, 0x79492A7A520B137D, + 0xD009F759A723DB1B, 0xB80ED7B232026E98, + 0x25D990F8E0E3F13C, 0x953E1757DB396DAA, + 0x69F5C3BD0F3EBD89, 0xE4E378D0EAE3FA32, + 0xE37F721824571784, 0x6E4E37932EE272C4, + 0x0290F35C0AD97864, 0xDFEC929D9CEE885D, + 0xBE520D9761FF811F, 0x1A11AF3BFFCE31EB, + 0xAA6A6098851C396F, 0x995F3726546AE292, + 0x7239B21A38F536BA, 0x419E13582192CFEA, + 0xA86478C6958735C5, 0xD2F1398F8FC8F6C3, + 0x6CF598A2957C2BF8, 0x9C54B5A3D8EE1518, + 0x40AEFD1A244741F2, 0x7AEC398C83EB45E9, + 0x46F8696933A63C9B, 0xE3362FD369CEE0FC, + 0x46A6CC01E0826106, 0x670A22CC926FF03C, + 0x0EACDF8487D5155A, 0x25A7052BD3A74454, + 0xC86D67D52A707CF8, 0xA6E8FBD68548675F, + 0x736A718577F39C7D, 0x62C1E89BAB0A90DB, + 0xD9E3006FB3CBD765, 0xC5CAF559D14B1D18, + 0x9AA46BADAD0E27ED, 0xF08FE90569CA1845, + 0xFCDFF7B72D23A1AC, 0x895779B17E5AA5FE, + 0x37C8252A7C92D017, 0xC89CD38D25080855, + 0xECB2FC7235A7D137, 0x753505F4EAD53B36, + 0xE374C498D8BADC14, 0x8ADA5005075878E9, + 0x9D2EB3C2906F6B45, 0x0C20BED1C26D5FE9, + 0xB5D3453C98456528, 0xBB931EE173379AA7, + 0x6DDBBDD98E2E9C25, 0x5A5F8D595F57FCD3, + 0x8B4FFC790CA131EF, 0xC9F8BB68BB2CA4D5, + 0xAC272C0AE01B4BD8, 0x027ACBF438BB2AA5, + 0xA6E9C38DB51D7748, 0xDB42E53EE0542D82, + 0x7C65DAC73C35C862, 0x94F15E506D091111, + 0xD5037BA82E12416F, 0x4DDAC4C80BACF92C, + 0x3C891A251567DFCE, 0x94AD17FD64ED9169, + 0x6D645D59FB5F5AD3, 0x5E2C0A699CE25553, + 0x419615486BBF1956, 0x59BF86F44D9722EC, + 0x584FDFDA48805B86, 0x3AEC124A3999B3D1, + 0x1B84DF6AF2A46938, 0x4645C707A0067CB6, + 0x7D395EA61622E116, 0x5ACE694C63234EB4, + 0x0AE4086104E067B1, 0x8BD492BFF270F7E9, + 0x731EC8A916BD11A1, 0x9F210DE9AC528164, + 0xAA19F5572C38B564, 0x650C90F10BA654AE, + 0xBC80E22DED931E3D, 0xE1D5697A2E62ECC4, + 0x0A7B270912999B3C, 0xEE1D92A39CF8E1E6, + 0xBED9F5693F34ED17, 0xF0C42619E4568EBE, + 0x14E0B2D1AD1044E0, 0x2DE4F7637E03BB7E, + 0x0EE21293DAD47C95, 0x3763A95FD16BF2D0, + 0x0F42323798A58C8C, 0xE38F2D50345F3C24, + 0x28ECB8AC2F607DB2, 0x885822C4003621E2, + 0x5333F526F6AB19AA, 0x1595C3E8842A8F45, + 0xEE5D2A122E09EC42, 0x5E74E07533CA2FE9, + 0xB846F547D3792DF6, 0xB846F547D3792DF6, + 0x18FF00FC7EFF559E, 0x0A6448DF4E471932, + 0x6B9BBD38AB0796DF, 0x0F1058706D5A58B4, + 0xFB71170B7E76ACBA, 0xED5AD56E2C551D1E, + 0xBF19721FA34D32C0, 0x5D17762378773235, + 0x052991E59076E4E4, 0xC72EF66FA0B25C63, + 0x69778E7564BADE6D, 0x3550A1A1A4D8BAFF, + 0xC208B673CE446B61, 0x909171C88CAE98CD, + 0x3910051CCECDB00C, 0x8B58E7AC53EED9F1, + 0xBFDF984E2C22B94F, 0xA4D8C1146083E26D, + 0x6B24BFE83A2BE47B, 0x92685F7745983649, + 0xC77720A12FE14A86, 0xED3365BAA5895E01, + 0x2E65248609523599, 0x8B5C4EB193A1CF0E, + 0x07F1BE2BCCAA27A7, 0x723B88C26632AA38, + 0x1FC877464A04FC4F, 0xB20B4DFB7E26761E, + 0x33DE49EDF4DDE77A, 0xB3FBA4E62C3215E7, + 0xC1AA9F53CE982990, 0xE4DACD1F7BF2447A, + 0x4487C259F0F70977, 0x3778FB1E5EA800F9, + 0xA2C6FC031D46FFF0, 0x2D57EADCBEDDB2AA, + 0x7E782A910C362C25, 0xDB39007912973865, + 0xD40148F22E81A1D9, 0x64A9C45E797F804E, + 0x704983DF373B198F, 0xF0EF4F4D0C46337B, + 0x4060057271CEBC89, 0x16CD04EE7232AB90, + 0x3AE22DEB5BA5A3E6, 0x39E572BDDBA714A2, + 0x4F38DCA127DAAEA2, 0x141069688E7AD83D, + 0xE22D8FDE858B8119, 0xE6907D2E2D8505A3, + 0x62CA17B74C435651, 0xC5A8254991E59BD8, + 0x06843DA7060A026B, 0x78CDDD1E6367978D, + 0x0DC7CABAB1E9B67E, 0x46EDFC827DC67D89, + 0x1F3F018BC3AFA77C, 0x3063E66D1501117A, + 0x213AEB2B90CBA7AC, 0x26E4F443B23A3AEB, + 0xBE8CD9BE829BBEBF, 0x6B73E47F4576B965, + 0x4F930AD022D6DE3B, 0xD10D64C52C7D4290, + 0xC34BC448DA29F5E9, 0x6FFB5A1D068F7385, + 0x7D1464D472D32136, 0x6DB88AC4A86B7993, + 0x3A3D5568AF297CD5, 0x3D165343793A065F, + 0xD1C9B92BDD3F151D, 0xDE604ADDE4140C29, + 0x4A4722448F18EEF5, 0xBE0E1FA08021D61B, + 0x5927F96A78577363, 0x83E421E5A4A2A512, + 0xCEA7C8E1B48FF68C, 0x4C07D42235640681, + 0xACAD101E1FB66689, 0xCB4407649EE68051, + 0x1D6A14F1F9A736FC, 0xC3F1DAC7D0C05D0F, + 0x19A30C23F5827F8A, 0x182EADDDF63B0B99, + 0x57A3BDDAD8E5AA0A, 0xDD0E57E73E5C4BF6, + 0xCE6294A232D03786, 0x571632CCE26C19A6, + 0x0FDE9DBFC0A6BC65, 0xF11D037164D8CD39, + 0x28F174A67B8D0C2F, 0xDD6BF87BDB4456AD, + 0xB264C4D2F2B0A78B, 0x75BF1E4B1EBB3AF7, + 0x5D14D4154BFE7B2C, 0x84418AD4000B0403, + 0x6CE177D014502E8A, 0x16C81091DBB14498, + 0x1F922734E259BD26, 0x411F46E7B93E1221, + 0x20E330937C399D29, 0x74F0149898241E08, + 0x0772DF77852C2E30, 0xD1540D162A263705, + 0x85F462BADC7DA47F, 0xFE034A9A4FD042E3, + 0x67F6413D3220E18D, 0x2F0D1CE923B94A1B, + 0x187382F8A3E0A6C3, 0xE83473557118C457, + 0x8410C5E0CD847B9D, 0xA02CE3E77460F58F, + 0x965791A9A488A062, 0x77EBE54599B2C2D0, + 0x3C6D3BEF33301255, 0xFA9AEEE5D576B9C3, + 0xB8FBC8B1330CA9B4, 0x1A7BC5B59D4A3171, + 0xCA042B6957743895, 0xAB6A270F84A8781E, + 0xC20E50AA46D09CA8, 0x95CA4545D0C61309, + 0xF90125F1F79ECDF8, 0x93E374390D566810, + 0xB56BBBCC2955D9CB, 0xE807694ABD40478F, + 0xD2F1C53C97EE81AB, 0xE40F1D4171D40174, + 0x09693B0312F91649, 0x75E674AE2B22AD08, + 0x4CF5F55DAC3280A0, 0x52E6B1ACC4B9D6DC, + 0xCFEB46DCD7D8D5EB, 0xB241CDFBA0C015E7, + 0x94587F17E9C365D5, 0xE668BF9946D414D8, + 0x9D724B400A7E8FFC, 0x9F9640FBF275E1F1, + 0xE054346CA3A0F315, 0x731992816BA6C01E, + 0x9E23B1777A927DAD, 0x1074C22A1D0F9011, + 0xA72835064DD63E4C, 0x558A4A5E67A4DF55, + 0x44FCFE4121378898, 0x32753F96AF5DD5F8, + 0x3E38E28A1D80DDF6, 0xF52D9FCF2CE249B4, + 0x0F3E34E968EA374E, 0xE7FD307AF3D07EF7, + 0x15D3A79D4E44B913, 0x45B1B4E55BF15523, + 0xE361C5C71C431A4F, 0xBC4B0376D5E2BD1A, + 0x20F898A5D9782800, 0xD15FB1055A3CC41E, + 0x3D9ACB1EB139E702, 0xE83E493D593614A6, + 0x75773E11BA459E90, 0x9CE97F6074FF7DA6, + 0xBD32E46AA95C1DD2, 0x2238A7B9D277F13C, + 0xDCF0754AC3D6FD4E, 0x5FFE809EA0CD41B7, + 0x3FA00D4F4641BFAE, 0x5DBBDF50CD03CC68, + 0xA049A5BE0F04F2F8, 0x1C82B0418F192A3B, + 0x7A192BE16D373D00, 0xFDDD21F53752637B, + 0xACB5DCCA1EC76840, 0x63FE990BAB40116A, + 0x5CF0D8F9BBA0DD75, 0x6F40CA12DE6862D6, + 0x23285DED6EBD7EA3, 0x6EC1CF4C6A8CFEA3, + 0x8605AF0DE8B3A5AC, 0x6834CE30982B8CF4, + 0x9724FB59A3E72AD0, 0xE000C7F412C9BF70, + 0x3A8CADC7D37AACC5, 0xDAB43B395AB1F55F, + 0x9B53BB6E8943AF53, 0x2AA99ECF9FBD1E5D, + 0x5AA3BEFA29F03AD4, 0xF7701A907195ED86, + 0xCADA5A0D0702381E, 0xC5BB4DDEFA17EE8F, + 0x7AA80209BDA643EB, 0x0AA1D616883C0FC5, + 0x9DFE13ECDC1EC196, 0x44E83A08C5886AB7, + 0x88C6814073DD4A73, 0x4D2B6680250EFCC8, + 0x567384DFA67029E6, 0xF752EEF4DA6D1BBB, + 0x3C7D42D58F770B54, 0xC08E749A208F1CB3, + 0x1DDA930A0AC38571, 0xFBF1F1BE9D437D22, + 0xE3433EADAAF7EE40, 0xFAF9E5F77F1A8F7D, + 0x72D0706CD6CCDB58, 0xB7C255F4F163F7E4, + 0x375A706A5C2FD084, 0x0A3938C08965000F, + 0x7DB53B37A2F211A0, 0x8633DDD8C62AC690, + 0xFC545A9F0626E3B6, 0xA5D6C2FBF2732683, + 0x4F056E1AFFEF17AB, 0xD9655A906159641D, + 0x1E09C32048FEFD1C, 0x9C1DFC7BF3ED9A74, + 0x11879CDD803D30F4, 0x180515BEAA9FBCFB, + 0x77B5F9A36BF96710, 0x4919CE7E9ED9532F, + 0xCC665AAC360D31E7, 0x79444732D1763556, + 0xAE2AF67E9D9AF65D, 0xC983AF341845804E, + 0xE95B0C7D5BA3B96B, 0xE2145C68E17733E5, + 0xAC83B1DB38D0ADA0, 0xB4923849DDDE65CE, + 0xE80492A9AC099A93, 0xC664C0067EEAB8D1, + 0x8AA9180DE2FEDD45, 0x889C54763DCD2AB8, + 0x1B212B26DD3C04DF, 0x639C36116F049ECB, + 0xF7F9DCCA89E7505B, 0xF6BB7F22B7DAFAF3, + 0x1F464EF988465A81, 0x49C0A24B0C64060B, + 0x07503F7948F491A7, 0xB2F7F35C9956F9EB, + 0x728C4CC7920CD102, 0x5CDAFEF86032B4D9, + 0xBD2A8EC3AF4DE7DB, 0x1D87FC6C9DC6D4B1, + 0x5EE02954A14C69DB, 0x6CB94FBA5543B4A5, + 0xB923B3A86CD23278, 0xDB0652AA3D1D5FC8, + 0xF1B9F16E89E2C93A, 0x32ED0A5245744097, + 0x849648349D77F5C5, 0x2967B9554C6C28E3, + 0x78C0D93253149435, 0x19B51B1E0B878852, + 0xCEF70AA5B3F89BA1, 0x4FCCBCCCB1A46E9F, + 0x24F4121D07579880, 0x3AAAA0D47FDAEFE1, + 0x521638ADA1BA0D18, 0x57355C5F09B24A36, + 0xD6D09A6F32F49EF1, 0x38F3F35ECEA220B9, + 0x933C06518B52A9A4, 0x7FF898C8E473677A, + 0xF166E48407BAC484, 0x9DA29013F33252A6, + 0x5D1E75F91C07DEE5, 0x29DD5F01E17882E2, + 0x10BDDBFC529428DD, 0x0222F263F70347A8, + 0xA6D3A8750DC73270, 0x912E56FD8DB2CADC, + 0xD4793DFF3AF2ABCD, 0x159DAD9C9C3E087A, + 0xC2D2AD9EAAE265B8, 0x4AD57C47C81FE886, + 0x37A4494483B9F5C9, 0xCD71917B0485F823, + 0x4172393E6BE1FECE, 0x3A17DD2BBFB843BB, + 0xC67DB108A9ADE3BE, 0x2E614A2AC61C4B49, + 0x2272B0A1343129F4, 0x133C52AF0E7B5C0F, + 0x428BACCDF5E26EAD, 0x9F6498B97F642B82, + 0x4AF9BD80EEBEB453, 0x44CD355F587F467C, + 0xBBE5D803A5360CBF, 0xF0FAC6CA001082F0, + 0x79B258E397854D29, 0x699BB142959CAA74, + 0xD83C2B94E7508980, 0x40C925D4A6D691FB, + 0x404A5AA9B9F0B746, 0x64DE59E32AAC9189, + 0x1F351CF1C6475734, 0x312B173020DFD707, + 0x2D5DC831176D0114, 0xA2EB658A49EB6A33, + 0x48AF36444B965238, 0x3640D836D145B814, + 0xC3654A441402562D, 0x9D2B2BFAFBC0DC9A, + 0xF808475FA571D823, 0x6FB1EB7F73800604, + 0xB3E6360DDE733E82, 0x528A718A7FBBF010, + 0x583049884A2EEE3C, 0x2F43119FCFA9DF44, + 0x11DD0815DCBF846E, 0x3D6121FA3AE61072, + 0xA0261AEF7ACFC51E, 0xD38D21E62402F180, + 0x4202BBCB8684563D, 0xA0BD77D0A97C70E0, + 0xA33CDCCDA663159E, 0x16371AB7527A7757, + 0x58CC181719256197, 0xC43919AB44F8EB1D, + 0xA7DCDF4DED40A8F4, 0x9155F8478E78BC35, + 0xA21C51255B205245, 0xDBC51F4BF2AE3280, + 0x2A74E1D5F2F00EEC, 0x674642CC58396437, + 0xC8B1B2425604CDD0, 0x51DFF77F172C4420, + 0xE41885592B08B097, 0xF9C6E0A62DED8BBA, + 0xC64DED7EF0D2FE37, 0x8728BC90F52DC55B, + 0xB81F6D4A8F5EEBA8, 0x99A264CA4F4CA6F7, + 0x5190796ED39C9B6D, 0xA4B1CF85F7018E78, + 0x49EC8030F5015F8B, 0xBEFBD60AF2ADC3AD, + 0x36492C2F0D134C56, 0x038C9B2E74840F55, + 0x195AEEB13CEFE2EE, 0xB95DDD9ED08D971C, + 0x11315AB3385B8AC0, 0xD9925DC55D73CA5A, + 0xA55547801EB331FC, 0xC5CD95A5B7169511, + 0x90CD7C6871FBF1B4, 0x8918C3EF2FB0ABDD, + 0xF4924635A19EB37D, 0xE3F32DF0088B1EA4, + 0x0B568201DD99F0EB, 0xED7CF0445832FAEE, + 0x83E87508A2CA2AC6, 0x335BFE4BF18C7988, + 0xA5C80D8E768A9E66, 0x183C56AF4E869D6C, + 0xB8721407EE9C3FF6, 0x0C92FEF480721C1B, + 0x81E1552E35DC3839, 0x4AE9893CBA452EC0, + 0x330ED4D05491934F, 0x11EAD59BC2566E94, + 0x9A4CF4F48AD77302, 0x6280556FDB0D083D, + 0x70894BD0915C5BCA, 0xD269EA3552557C81, + 0x2F7F2B26DD3F18EE, 0x09B3F9C327D5C4B6, + 0x02EC0AF5C5A49B7A, 0xBEFF25A5E38D38C3, + 0xE5608CA7BC163A5F, 0xB8240CDC4A1AD4EF, + 0xAFEBB0D5D8F687D2, 0x492C2E126D2443B5, + 0x701375A7D43F01CB, 0x2071FE2219F8A9F0, + 0x9D80CD1D0E6327DE, 0xBBE0D0DF58DE7F97, + 0x60F9A4393A21F741, 0x264EF324A968552D, + 0xD5002D78B7162E1B, 0x09B0CB074C332620, + 0x237D5336A9A54108, 0x3B807F9BB6C23353, + 0xE33FFA906CE74880, 0xCA5702B560C1A812, + 0x8E0A582209A62695, 0xEDE3A270F1277EA3, + 0xFF56381874F82086, 0x37A11A039E429460, + 0xD5B35BEA41919ACB, 0xE2E3C8104BBF558B, + 0xC520A34DAFBF24B1, 0xBA6DAD671BB2553F, + 0xE3A7742E0B7A2F8B, 0x1078CCF56E8B37D6, + 0xD01015C7316AE176, 0x9D6719338AAFFE00, + 0xD66C9E72B3CC4982, 0x4AA9B591F7C133EB, + 0x1A5AA1208AF5DB59, 0x6FF312B4049B4865, + 0xBA9749CC94C1FD85, 0x6E8601B7F95F1BE4, + 0xAB13A5565480B6D9, 0x64F37BCA46003D43, + 0xF133BBBE91E1691F, 0x726C47D78CE29DFC, + 0xF06EBB91A81E09E3, 0x2BBE3495E78C9438, + 0xD5BB4025AE449A4E, 0x3AB1EF8B99970B6D, + 0x3DA5ECD1A56CBA6D, 0xF2FA5E7CACE568B6, + 0xA5E78BA2B1331C55, 0xC507AA2C3FCF5DA4, + 0xA7FFBA498E4AAF67, 0x3B1B2E9D5A9A86DA, + 0xCBBDE6D335D6D496, 0xC3AFE2B8AF48FCC8, + 0xA2459F72C14E2E8D, 0x89BAC7925830792E, + 0x361840888AC539AE, 0xFA03406E21D86D40, + 0xD4D8636C0199A939, 0xE0F1260F14A89254, + 0x24A2AD74FA9814E2, 0x92375A2080374327, + 0xDE4C184B2B9B071A, 0xD03B80D5775B63DF, + 0x655185A06D9EEAAB, 0x167E0AAAC47615D0, + 0xC5286FFC176F28A2, 0xD9045D352687BE18, + 0xE45B7F222DE47E09, 0x970CD43622925924, + 0x19D1B791CB3670FE, 0xADE343F4FEB8F5AA, + 0xC9B43A33D09CADA7, 0x8E5F00DE1F5A879B, + 0x80CA6A8B6C094CC4, 0x87BE0E4947F798AC, + 0xDBC631F109350B8C, 0x4551B6FEB638C979, + 0x8FA9C42FC5D7C64B, 0xB4632FAC2A0DD490, + 0xE6DE0561D9232A64, 0x0B3D3A4BFAC8F7E7, + 0x67406F2C8F87FC4F, 0x2233B99BD0212944, + 0x906CA41A4B74ECA4, 0x1B2DC7C8A3EDB3CF, + 0xBA5ECEEA120E5611, 0x8D89CE5EC4CA9E28, + 0xA18AFB39081B6A1F, 0x5AEC787E73C88D03, + 0x228D3D94F8A11C3C, 0x7F16E6FC0336C986, + 0xAD6875BBC0FC899C, 0x408DF9C303E26E6C, + 0x5F7B268D15BA0739, 0xF3936E845DB36009, + 0x5F7D596BAC2E7777, 0xE27B43E56097B31E, + 0x5C0DE367AA0D911C, 0x45884CED13CDACAD, + 0x87243C6B17322A8B, 0x45BA339DB0D3BE63, + 0x65D2EBB47E1CEC21, 0xA87835FA95542DD6, + 0x1D12A56FC95BE92E, 0x54F954F6EA005829, + 0x44F28F86433B10A9, 0xEFD4841266953EAA, + 0xF5BB8DAC426A52C0, 0xA647CE907D69C0F8, + 0xFB5045B7C42B75BF, 0x3FD146795EFB335A, + 0xCCC39339BEF76CF5, 0xC419E4A083905E8D, + 0x0CF97F497FE7D048, 0x407DFA41CBA14624, + 0x4C2A9FDC22377075, 0x237C9D64A0F94C79, + 0xF3BBE884A14BB413, 0xCDEE919CA17BB8B0, + 0x013A80FC08F6E4F2, 0xB84B43B766630B5C, + 0xF0BC9BCD24A511D5, 0xF0BC9BCD24A511D5, + 0x12DED8CA53D47EA5, 0x0484D99771630DC2, + 0x883D79C4071E18B3, 0x6AA1F733791ADB84, + 0xF751B16FB32ABC1D, 0x0DBA91C89D6BE54B, + 0xA8434F1DFF41D6E7, 0xBEB13CBDB01F0B4C, + 0xA8CF1CC0AFCD3F12, 0x711D46DEC0FF8E64, + 0x1F400FEF721170DA, 0xD3E001C2878B9B46, + 0x91EF6EE6419E5B97, 0x1299B5AD46A4427D, + 0x1EE7063B80FFC77C, 0xE99504CC51D09E54, + 0x96695E368AD855F3, 0x886ED6CA3B972F3B, + 0x5DD35C8D074E57AE, 0x1B06AE80EAE48AB7, + 0xF36199225D6D8C86, 0x75C105CA8CD45D8B, + 0x9CD27B0045628463, 0xDFB7BFA6482FEE1E, + 0x15C40837039FFAF7, 0x7FF6ACE380ED166C, + 0x8927CBF9D22261A4, 0xF0AE30F012D1FD8C, + 0x214CD562A939246A, 0xF3A5A9B3C619EC98, + 0x56A3B51944C50598, 0xB0DD106A5BCD38F8, + 0xC19F6C8E7865A6FF, 0xAD40237B7C712CE3, + 0xF56DFB7B61BE7276, 0xC17E71BC1629DDDF, + 0xA61B4DF533DCB56E, 0xC18B7B2430ACA41E, + 0xF6829842C06AE524, 0xC44700EBFFB89827, + 0xAA3F739ABDDCF21F, 0x136FA3E01F15E56C, + 0x9C4AB58491FDC98A, 0xA3BC7E14B0B0F042, + 0x49482F9FCD825AAA, 0x321612B215771387, + 0xC8535819C450EBA8, 0xCFC30375A8407970, + 0x452736765B31FC4B, 0x9BF6ACA1044F0A92, + 0x62E849B7EB28E770, 0x96662AD62126C1F8, + 0x21FFB63D8C615361, 0x0079B680EB32314C, + 0x5B1F2E327B6B6FE1, 0x89C6CFA39F6774B4, + 0x90532EDF0D2BDD86, 0x66D8992485C9DE0C, + 0xDC9274A7EF6B2867, 0xCE5D3A25F4C496EE, + 0x87E5C46C187FE0AE, 0x6F4C82D59FB4D7B7, + 0x44A0BDC559B35F6E, 0xE0CEB33DC8AA8D84, + 0xB7952076E444979D, 0x03178B32FA4F2AC2, + 0x1454F2448DE30163, 0xDA025166B7151B37, + 0xACDE7185B374177C, 0xD545129CDA76E326, + 0xD3D15555431AB793, 0xA700E2BE6F531543, + 0x324C5AA411DA7737, 0xBC70C2404980872D, + 0xAEF12960FA943792, 0x10768D2535A136FD, + 0x50085246ABD3FEFA, 0x57A7F754B6B8906E, + 0x0C515FAB3FF9EA92, 0xDA654EB115F9FF7D, + 0xA6928482543022B4, 0x49783353F325DA92, + 0x4D41783FB745E42E, 0x7508AE96782B0441, + 0x4895BDEA16E7C080, 0x4CCC01FD8FE1E895, + 0xFEFCF11B01287125, 0x605FFD8506384662, + 0xDFB4138EEFED7B81, 0x280CF21D155C9165, + 0x1A8B5F3C01E2B477, 0x47A71ED5EBF4D6CA, + 0xDC8C5D7CFEAB8394, 0xDAEE7376A96B4F31, + 0x93AA4165CB67E925, 0x93AA4165CB67E925, + 0xE32EFE9AB4A9AA0C, 0x47554D1FFAB68B45, + 0x6B17C62C9635D2DC, 0x68C57F5DB4F92876, + 0xC0741A26499654CD, 0x1F2ACFAC81F93E2B, + 0xCCE26000E9A6FAD7, 0x278C3C833C547EF2, + 0x1A992DA297A4630C, 0xB3CE8D9AA3CF7110, + 0xF3FBE2D50A6A8C28, 0xE619DE4F72F76E79, + 0x996DD1E1E02F1008, 0x1FCD42355711E0B1, + 0xADA24309FE08DACF, 0xD09C9D030AFD3F25, + 0xF9E1CCAE8BA4C281, 0x3F7B4E0F1F1583A5, + 0xC90621D8A0CEECF2, 0xFA62A4119BE7829C, + 0xE6B7B0ACD4E4B75E, 0x44327D00A05B6907, + 0x8BD6C6DEA20E82C6, 0x8103893E84E393C0, + 0xABD5E88B8A2D3DB2, 0xFFACC6DF1936F7A4, + 0xAA391C728106F7AF, 0x87F1904AB605184A, + 0xE75A4A2E5E316D86, 0x9B4B7504627CD3AB, + 0x3A539D52857EA82D, 0xF3A721EE2348AC29, + 0x32C7A7E8C43A1F80, 0xE5A1E4E094971D4D, + 0xD930DE3236E1755F, 0x32D5AD8D06DFEDDA, + 0x812595A0644CE1DE, 0x14FA206D9CE730A9, + 0x8CC469AB4D349B7C, 0xDEAB473B761FA4B2, + 0x740E14FAD5842351, 0x6EF509381A399003, + 0xC0E0D686DDFC6EAE, 0xE4AFB5DDD9416AD8, + 0xA735353C77334EA0, 0x55160E78E7EFD016, + 0x84DFC579C2FC214C, 0x4B07B5C29BB25342, + 0x7049BF858601DC0F, 0xCF6E8522AC153EF6, + 0xA4FF579AC0E3AAAE, 0x84BDC1D2DDA37898, + 0x10C2FA78D0E128A1, 0x3D5924F121A78A53, + 0x1A8EA222F9C67DBB, 0xDDC9DE9DEA2EC37C, + 0x5EDEF0CF8C1DAB3C, 0x22ED7F522AE8D492, + 0xBB40DD2270B65366, 0x27FC1B0077581B37, + 0xDC0F817884CDD856, 0xE63D792F88BFF242, + 0x065DB281590CEA2D, 0xAB995AEF6AF44C1D, + 0xB055A34527CB8FD7, 0xEE3EC0999D10410A, + 0xC724C701C30B2FE7, 0x10A0C871D59F8003, + 0xBCDC5017D3CE1E9E, 0x98FB758C7911C941, + 0x53F4892D18EC90A4, 0xDD7194F34583240D, + 0x556C1AA270D5A207, 0x7A65E39F58B0A607, + 0x705A844002B39DC0, 0xAE96FC485F60B441, + 0xD261BA3E7E998072, 0xD18F522C48769201, + 0xE7A0D23DC414507B, 0x324E9C77BDF774EA, + 0x6874E2190B0C1972, 0xDB6FBA5468510E93, + 0x1327E2FE9746BAEE, 0x6CFCAD853B84B192, + 0xB129E447A2EDA4BF, 0x96BEEBF07BE42616, + 0x28A04B411933F8A6, 0xED57EB73724BA9AB, + 0xE266ED23311F24D4, 0xABE35643ECAF1CBD, + 0xC66D1CF99ED7FE25, 0xC66D1CF99ED7FE25, + 0x06F030E3169A0B2E, 0xD008056213B0A5B3, + 0x1D610EB0FEA716D9, 0xEE301551FE15D82C, + 0x48838ED9937A15D1, 0x829F49209FFCC472, + 0xAC2890471901861C, 0x3C06ADE9C0AB03AF, + 0x264AC28B01B353A5, 0xC85540D19015C63C, + 0x2587A48BC88DFADF, 0x7C48EC18998B637E, + 0x57FFF03E423A4C0B, 0x0DDE31F276B66983, + 0xB91B4C20085BD12F, 0x3EE7B92DFCF204D1, + 0xA9A41C1E940FB0E8, 0xDBF5BCD703020A83, + 0xFA1E0E893D915215, 0x9FC86AFF8CD3A69F, + 0xA1183BCFEE0F93D1, 0x404F198499B17FEB, + 0x6FDDF453C0C756EC, 0x068B689C2D0BFA82, + 0xFA8904DC5F304220, 0x82418FCC3F5D788B, + 0x99B72C7ABDE5C910, 0x66EE05995A4D4A82, + 0x92790862E36C2ADA, 0xF728E4D04FD52BD1, + 0xE574A662ACAEFBB1, 0x6138757AA13FF92D, + 0x0D01D20616FC73FB, 0xB267FF1B9BA45091, + 0xA06C969B02A97298, 0x05351AF95891EE5C, + 0xEB6891F03362FB12, 0x967CEF1CC8B39632, + 0x015C49A93E3E086E, 0x75D6926F4F0071F0, + 0xC79AE21974B01FB2, 0xEB9046E5F59B1DB8, + 0x0CDDA42F9E360CA6, 0xFC234AFD088A85AB, + 0x4EBB7E87AA0DBED4, 0x07B9D0CCF319DA01, + 0x9D8D44ADBBA61EF2, 0xD7A1DE6EE7FAD28C, + 0x1087BC8EC540DAEB, 0xAA707B921102DC82, + 0x23227DF0B2115469, 0x13BE4EB24A70451F, + 0x4F14F9F870D6FBC8, 0x8BA4AD00568AB5FC, + 0x98A4EB5D89A0C952, 0xA9C0BBFB9CBB66F1, + 0x5B74EA8CFD5E3E7E, 0x41BD26951ADF63E3, + 0x21986729D6A3A830, 0xFA23566AAAB7508D, + 0x5E569EC46EC21CAE, 0x1FEA113D60D39099, + 0x407F8D034F70F0C2, 0xB219419D69E14AF5, + 0x705A276EBFF3133D, 0xDFC8B8E3558D7160, + 0x4D9D109F63FEE1D4, 0x5D151593B8B74B64, + 0x878C75C09FBDB942, 0xAD74EA53C7C30930, + 0x544996C0081ABDEB, 0x544996C0081ABDEB, + 0xC9156DC11411A9EA, 0xF96EF441E3943DF4, + 0xD3BD40951412FEF6, 0x068BDE31F7D112BB, + 0xD031A9162D01088C, 0x0EC2B29D4172D225, + 0x503F5920162365B2, 0xFB1C7DD82D64EF9C, + 0xEA386986E786A54F, 0x5420D0D520CF44D0, + 0xAC09CA973C564252, 0x49875FC4498CDA9A, + 0x41B4893843BBDB74, 0xD0051FAE2E1BB4C8, + 0x50F457823CE6EB5F, 0x2AD3045712160011, + 0xEA14EEF5B7CD2C30, 0x99E90C0A348D1105, + 0x1D97D1E3A70A649F, 0x6F201761F29885A2, + 0x7E3F55ED251B76D3, 0x4C92E5D364839A54, + 0xF741BD853611592D, 0x9F7560E01E0B07A5, + 0x944955FB2A3935C8, 0x7C0019321F1FC821, + 0xFA5B74BAB8A7EF99, 0xFA5B74BAB8A7EF99, + 0xEDEAD9A91EC768B3, 0x5C65D96B05BB0FC5, + 0x8702416E512EC454, 0xDFE58ECD10F98CE1, + 0x5F61EBBE1A00F96D, 0x1DDB793DF6C05751, + 0x7DB18CA8CAD5B098, 0xD48F3624355BD10B, + 0x0811381EF5062FEC, 0x3FED1F98029BD3C6, + 0xAF12610C644A35C9, 0x87D30E8961D60915, + 0xB4A53E05F68B6FA1, 0x4C5488249DC68F24, + 0xBF4DC1784BE94DFA, 0x1E6ED0965899A872, + 0x7D41E9D2D17C5B2D, 0xA5827500BA13CF74, + 0xE023E8AC4EF7C117, 0x9228228835BE767D, + 0x07C313F94746702C, 0xE2BB9441C54169BF, + 0xC197616D221FF4A4, 0xED93DAC36CA89AF2, + 0x95C0A5BBDC189AA1, 0xFF4C05C42C1C3C74, + 0x5F2013F8BC24EE69, 0xA491012434A0347C, + 0x933BBEEB8C61B5F4, 0xA6213CD18FA7A1D1, + 0x2F137B508DE238F2, 0x7B6CB6A99A59E190, + 0x0C15B0E443B2349D, 0xEC37C16B346A6CA6, + 0x48DE78AF2C8885B8, 0x2D886F8E34B7ED6D, + 0xF7B2CFDE5C9F700D, 0xBEE2140D9B5C3750, + 0xBED8CA5FF5E04113, 0x0E25380C354638F7, + 0x95A7DABDDBB78AE7, 0x6B3A4D1933C03F8C, + 0x05661B80A8C9165F, 0x5B38E054B758C032, + 0xCE58B1CFB9290813, 0x2542B03313A1A1E5, + 0x2F844A8B08D76685, 0x952AB441FA24BF16, + 0xE18B138FABC53103, 0xD76BEAE1A33E3251, + 0x63EB2B972A218CAC, 0x64C0F1E29589C755, + 0xDFEBD56D9BD1EB16, 0xB63015EB91A2D1FF, + 0x2A1F4F37F95BAD08, 0xC6A2E001AEBB5B7F, + 0x0A41540E63C9EE17, 0x51595C15729F2944, + 0x8BE1146DFD5D4468, 0x0986143F5F4540D1, + 0xA74A541C6884E7B8, 0x34DC21A7AB5C360E, + 0x2A179DF17CCF04CD, 0xE498E37B41AEA1DF, + 0xBEB2D9A1D9A8F55A, 0x70C5FE4EE59DC750, + 0x20C6C7E4EB082A7F, 0x8B4524E0E3CEED65, + 0x6F4F599753F8200A, 0xC320F09F3EEF6FA7, + 0xCFD778E7904C255E, 0x1FAD7C59AB24A0FE, + 0xAF42195A42C63BBA, 0x914405FD4B00C8CF, + 0xB5A4DB34FE89B88A, 0xD8EA8B9488DA3292, + 0x487EB90B98E9FB19, 0xCFB46930AE4B1729, + 0xFDD8D2440DAF1590, 0x7DE8DD7B0F70FD20, + 0xA7E30DE9272B6D49, 0xB9D4B0227B91C091, + 0x9A2C8064B6C1E41A, 0x0EACAC06DA21203B, + 0xF3E31D16CBDCB304, 0x62025DA221257962, + 0xDA024BDBD600F44A, 0x5620E03C014DE077, + 0x2B69F5074C894811, 0xABD845EBE246A2A8, + 0x3E65CDE5215832C1, 0x9A902750109547C4, + 0x38CE16C96BD11344, 0xB7D6400C89373777, + 0x2CE9D95E4051AECD, 0xB58EE1784CDBEF20, + 0x040ADDCBAFA1018A, 0x6A87931A7B2A5A10, + 0x99BFDC94A603E541, 0x99A6768052B30AE8, + 0x2FA9923062DD396C, 0xBA1F9FEE8D489B84, + 0x55DF6DB45179236E, 0xCDA128C75CB6A11C, + 0x1C2473301B1C66BA, 0xEDF0BE28FE1D7A5A, + 0xF813C7E63F9062A5, 0x95FD42F6FB9333AE, + 0x07DBD622D9533857, 0xD2F30BF6810641EE, + 0x821418C727FCACD7, 0x02E2DEC4D2E7340C, + 0xA2297E18F3E71C2E, 0x813E6E9F3A82143F, + 0x2FA133A4A9D37ED8, 0xB57B6688CB06F008, + 0xC4C4575F62534A24, 0x6BE78B7B5C1ED8AC, + 0x287F1F75D2803595, 0x7D9398197632F2CE, + 0xDFF49EE984E7AAE8, 0x783C0A3AB54FD553, + 0x930DE22F07B1CCE3, 0xDC729A2D359F873D, + 0x0D5F65A8F4EBDAB5, 0x0328F776CF87196B, + 0x1D4446A62D35B0D0, 0x2C6D85903A6AE09A, + 0x2E89990DDFF670C3, 0x925DF35B964FC55A, + 0x92DA6E70EF249BD1, 0x8025C708462E034F, + 0x5C4EBFFA98BDB41C, 0x2D2E3E2B3C023D86, + 0x2F794A877ADD4C92, 0xC5E2C8D098AB1672, + 0x9D060B08CD63321A, 0xA87F793D79B7549E, + 0xFF8F3A92B75ED67A, 0x5829ED84C6884229, + 0xECC01B7C5763333C, 0x77299F3A2E302D50, + 0x226C284C830D0CA8, 0xE6D1650269F554A1, + 0x8E243837643D9583, 0x3CC71D07260A46FB, + 0x1CAE5D2E3F9A07F0, 0xD53940B2D18417CC, + 0x2570E26BE63964E3, 0x2AC93CC39E4C5450, + 0xC0F97FCE55094987, 0xC77FD8F88190C5A5, + 0xC02F4DBFB51D988B, 0x7160B751D113C8C6, + 0xA73667484D7037C3, 0x0A217B1E336D059D, + 0x699E4A5C8C893A18, 0x7D8470C9351FF6CF, + 0xEEEDA5E6D7080987, 0x11D2BA6926783D2A, + 0x19853B5B17D77BCA, 0x884CBAFF30A27EBB, + 0xFE4C1D0D3B9CC17E, 0x458F935971A3BE20, + 0x3001BEF2FECA3680, 0x12A1AB954FBBFA7E, + 0xB13E88E655E5A3BC, 0xAF5E31B386A03FE7, + 0x198D161F458ECC7F, 0x0D0B9F93E58E44D9, + 0x6C5AE23EFA885092, 0x3D9AD37162DD6896, + 0x18A47D074708FD68, 0x159BC3DDA80D71AC, + 0x2A2173E46DAECD12, 0xA01D7927903507FB, + 0x95D9F4BC443956E7, 0xC1DF1475AF167C08, + 0x33E3C6C6F2F0B506, 0x5A1619993190DFD5, + 0xB6AE90EDDE95C762, 0x9EFE01401122B7F4, + 0x3523634255FC3318, 0xF91D68602B0BFFFF, + 0x6004BCB0E226AAEA, 0x9740F9C648B27B1F, + 0x10D0A8F259E93EC9, 0xE2ACCE12A4E50947, + 0x480357EE890C295A, 0x9618CA3AB2A82C04, + 0x9663FE6B7A61EB00, 0xAD12B613280ABFFF, + 0x3C1978285B036B25, 0x231BB9B41C5A18C5, + 0x5517F90043466049, 0x82518CCD63EE000B, + 0xA8638BE228D4751A, 0xAC9409F7FDA89956, + 0xA132FB5370554DB0, 0x71AEFBCB34DA1049, + 0x7345BDD95E62E0F2, 0x211A0F273B705428, + 0xFE02FFBED8CA9D99, 0x936616EE3F524830, + 0x40763EA7B9B783E7, 0xA666FA3E58C7D1BA, + 0xFCCCAC2BD3C1F180, 0x265C482776999332, + 0xFB380A29641EC31A, 0x9C14AB9191A9291F, + 0x1C9ADDA3244A1FBF, 0x90E0430E6CB448D5, + 0x7FE61782AD94CC09, 0x72421690A35C701A, + 0xD0E9CE05A1E68CD8, 0xFAF595B44ED45E98, + 0x19AF7ED9B9D23058, 0x3D62E0B627279EB8, + 0xEA12BD130D7569A1, 0x695C095045CA6437, + 0xBA52FF538ED2BC71, 0x783924BA309D8E09, + 0x5B9853296731E88D, 0xE4C6BDA9F2CDD17A, + 0x8D8686B622B88120, 0x4569EA65F1B056ED, + 0x7EC3C679D0E7E46B, 0x790D5A7482DF438C, + 0xE78503B10C4314E0, 0x52C950D703092348, + 0xBC9AE166038A5CEC, 0xF0CFD24C4C5A6185, + 0xC1447451DDB512F0, 0xC1447451DDB512F0, + 0xC67E2DA1CBE759E2, 0x666F97B17C19B7E6, + 0xD01005D2BA2EB778, 0x7E6D109F5EAE92DE, + 0x4C6A6451C79E4662, 0x30700B4AA35835FD, + 0x6C8065A3B780185B, 0x90517F1BF9113FB8, + 0x4056EA1105F5ABD7, 0xC083602F50680BA4, + 0x11D862A3E977A9EF, 0x06C6F76D2E20647E, + 0x5E203DA2BA15D436, 0xB72AC7E7E0E41DF0, + 0xC4E7EED74C818C78, 0x2CCE404BB4A3BA4A, + 0xC01D2470F22CDE5A, 0xC01D2470F22CDE5A, + 0x6ABFA3E16460F22D, 0x1CA878DB277C6DF0, + 0x1F2300CB7FA7B7F6, 0x8078E78E0BCB685F, + 0xCA9D2AA3E326D720, 0x6F322A1B441135FB, + 0x81DF9ABA6C83DFF9, 0xF476220E4554B5F0, + 0x1B7ABE26CBCBF8C7, 0xFA5BD490D9925AB6, + 0xA5342D390CDA41D6, 0x9A414FAB0B301A80, + 0xB2D06FAEDE65B577, 0xC228040556B02BEA, + 0xB8BEC0CA6F0EDB0F, 0xDDF04C83FF11A9B0, + 0x729072355FA39EC9, 0xC25830F0A5BDB298, + 0x49B99BF3FDA89A7A, 0x6B47F8B0C7440E4F, + 0xEE066C7006C49C0A, 0xE3256460F693089C, + 0xE8AF77C4C06ADC93, 0x35A1BC0F4035B2F2, + 0xB118AF58B5F332A1, 0xFAA3D6C1680108A5, + 0x566FD402B25787DE, 0xB4F8EBDFC90D5044, + 0x2B2A2CC86778B619, 0x4887295EB4BCA068, + 0x9C16459B2324B2CF, 0x13CC864D5E3E38E4, + 0xA9F9C2E0FDE11CBB, 0x637C66DB5E571C4D, + 0x6B7E4FB50D5F3D65, 0xCC29ABFF6ADFDE69, + 0xB96B00E976BE977F, 0x4B67F6F179EDA6FA, + 0x10706DC6AD2D49C0, 0x3409C874FDE63346, + 0xA151A7394A214E65, 0x1275587246A96F24, + 0x2E22FEFA0100275E, 0xE512FA6187A7E677, + 0x109697E2FFBAC8A1, 0xBAE46728EC10BE94, + 0x0626A247D2405330, 0xF0DABE056C7B70AB, + 0xFF266D1D0EB1195D, 0x01965518E9188F97, + 0x651D3228960D08AF, 0xDD0CBE69BF0D526F, + 0x66E49BF55B4B1874, 0x8EBCA434B6289ADC, + 0x50B196FC9ED6545B, 0xC863751B64F51C9B, + 0x19464CB6E4078C8A, 0xDBB5D0F3BB248B76, + 0x344F393B027E38C3, 0x658354283ECCD8DE, + 0xFBA550EA44404EE6, 0x0201EE6F15BD3F23, + 0xFC00454CF60B91DD, 0x689DBCAEC2F3E760, + 0x46718ACEEDEAFC84, 0xA2F873ABD527568A, + 0x245A6883D966D537, 0xCAFB54B99BF4F907, + 0xB39786F201FEE30B, 0x56767669E130CC55, + 0x6E176F1B18BC0637, 0x85FE98B030EF175B, + 0xD2FB5DC35CA67C53, 0x9404A07A08FA1D0F, + 0x50634E348C8D44EF, 0x4083482D43DC9D81, + 0xFD280B4D7F3ABC4D, 0x85054E7BF685BC15, + 0xB104CD1BABF302E2, 0x3B89994312445DE5, + 0x3B988190C0AA6C0B, 0x32051C1124051B7B, + 0x4DFDD9EB705F8140, 0x3601BCA33ECA8B49, + 0x8D67489793FF428B, 0x5C831CB7BD2C601A, + 0xDF7E3EEB29642C38, 0xB0E3D695A2277296, + 0xFF5E5EA2DCEEACF3, 0xFF5E5EA2DCEEACF3, + 0x2B486269ACD548D3, 0xD84D912B8097B018, + 0xC45D23BAF168AAB8, 0x547F3E9F33EBE1F4, + 0x2432784ACA090DA4, 0x702696330F8E5676, + 0xE57397B4A3429DD0, 0x4EC07525DD602A5C, + 0x34D66BC058019CE0, 0xFE0E871A280D0ACA, + 0x4CEBC1ED31E8925E, 0x1162BE8F8BCA45AB, + 0x3FD2EC8BF1F1CF30, 0x25653BA5FF37F809, + 0x98215325A695E78A, 0xC1859AE124240E09, + 0x58BB377BEC7CD5F4, 0x2F28A1AF3AA59AE1, + 0x0D30EB83668E63C5, 0x7699CA97CD34ECCD, + 0xD11FA52EB849D978, 0x6EF8BFCB3A7C2EE9, + 0x4E72BBDBCA58A3DB, 0xC622E29936D655E3, + 0xFE205F38AAA58E5B, 0x487E714EBA43B50F, + 0x59C16B79F53B3712, 0x534A78284194028D, + 0x21442F412E8DE56B, 0x218077812CB5CC2A, + 0xA277800A9EAE340E, 0x85034094C7A1FC89, + 0x375E7FC44F21C8AB, 0xD48FE064DFC88949, + 0x8C27DEB2EBD61AB3, 0x2CE298A5104477CC, + 0x2ACABED337622DF2, 0x6992180973A1E266, + 0xEC69ADF931AAE0C3, 0xC5B90B9E8A99F4EA, + 0x1FEF0683B96EBCF2, 0xFA5BD1BBE7EA5BD2, + 0xB65B60556E2A9225, 0xB30CD10E2CD1B67D, + 0xB606E6CC59664972, 0x32393C3A2B84355A, + 0xF584CF8529B51434, 0xF584CF8529B51434, + 0x66C3FB05206041BA, 0xB123385B78E21D42, + 0x9C11908013EA4715, 0x6D76DE5691106992, + 0x76D683C108594D0E, 0x65C53DE5B457FED1, + 0x491674FBFFF81A84, 0x4DD028F651C4AF3C, + 0x5746F3A7AB7FE544, 0x730551DCA699D643, + 0x46326E13DA4E0546, 0x41D1D73EBE3BE716, + 0x4F0C413926060B38, 0x79CFB461AC4F4DC6, + 0xD2DCCD8E16E20997, 0x07AD77A9898E29BA, + 0x708BDD8CD795B043, 0x5D98A2EB2BC86014, + 0x97FFB4ADEED08066, 0x97FFB4ADEED08066, + 0x071A5197D6AFC8B3, 0xAD9DFA8200EA2A8A, + 0x1C073274E065C6D2, 0x2876485FE204A401, + 0x2BE4BC731D039D5A, 0x1253999C4F276C38, + 0x4A04DE7CAB2739A1, 0x4C33A8616B52B9E7, + 0x71FB0EBCD4915D56, 0xE29885A2522592A0, + 0x6FDDAD856E36988A, 0x03827AA74A431CF5, + 0x983765856F2564F9, 0x7D7DBA522B57FFD0, + 0xADDD1C754E2E2914, 0xB79582D96EB331F9, + 0x692D58DF40657E8C, 0xA0EE07597D53EE19, + 0x8181CE2F25CB9BB7, 0x95E0A762F4378580, + 0x06C0023BED16DD6B, 0x5BFE23C73CDDBC0C, + 0xC15907D667F7CFB2, 0xBB5470581157221C, + 0x8A800DACCC0DA55D, 0x151AACB45F2D8C16, + 0x8CDDF1E452BABE11, 0xE32DAB4CCCA1FC90, + 0xB2798643312205C5, 0xA3FD18A27D9E6505, + 0x6D28DC1671E334FD, 0xC1BCFC0873E2F9D4, + 0x3BD3F52BA9B1E4E8, 0xCF92261B8BD9FFE9, + 0xEF21A9EF089A2668, 0x12F409221DAE2366, + 0x159B7318403A1CD8, 0x551EB0FE7AB0B6CE, + 0xB32209EFFDC04913, 0x7D92C08570AED172, + 0x70B8EC8FC108A634, 0x801ECD3C5FBB60F9, + 0x149AEE66F0CB3A99, 0xA5018159B4411234, + 0x8BF907833BE275DE, 0x719D2DC716064B76, + 0x43E4111189E54F0E, 0xCF7E9D7EE2349689, + 0x13518FF1C6B28938, 0xA8AC96FD8BFCCB20, + 0xA4DEDE28B1814289, 0xF5523FE9CD935145, + 0x655B91F1495A9090, 0x3CEB66EC8A34CB10, + 0x9DE624D2FC4B603F, 0x9ED0E4967CF9B0B1, + 0x9D74AE343DB65533, 0x6DD7E97514747039, + 0x2036F561ADD12E33, 0xA2FEFE3BBCD9FB23, + 0x02165D55000219AC, 0x708D5E68CCCC32AE, + 0xAF66DCEE6609B148, 0xFFCFF4576AE8F21E, + 0x583DF8E3D4AFBD98, 0x500BACA595B00ACF, + 0x598803E85E8448D9, 0x502E71B1C8F70479, + 0xD2CC78CD3D0B50F9, 0xCD17FCBD8B334D45, + 0x43FA0DFC5DF87815, 0xBC5DA64D264879FF, + 0x468056A6BB6F3846, 0x3120C869DFADA521, + 0xB9EFD5C25018725A, 0x8FF71A24509DA743, + 0x39917E1B4CB0F911, 0x08D2EB248E1DF2C1, + 0xAC392C8483342AC2, 0xE51580B6E84596E9, + 0xC7ABCACA4985A766, 0x04DB9DF765C4226F, + 0x029FE7CD1B7E2E75, 0xD8C5970C104EE9F9, + 0x95CF81BD06EE1887, 0x1C630F5050F06EB5, + 0x6DEE944E1EE90CFB, 0x44469A8E828B76FB, + 0x12561FCBB62D5B9C, 0x547724EA136B58B9, + 0x4ADA3F19BE4A6047, 0x49AD60910638AA79, + 0x806058BBDC136E06, 0x95D1A2308D597AA2, + 0x407DC5E97DB1A4D3, 0xFED8430C207866D5, + 0x544810ED9DB6BBE6, 0x229B96CDD7FBC57A, + 0x0350E7E17BA767D0, 0xDF412ECDA6E66201, + 0xF4C8CF9E353AFECA, 0x379DF424356C33E5, + 0xBA7F0B77D80A4EB7, 0xE3DD1DA290B04CCE, + 0x13A8DE2FD77D04F3, 0xB7F94D5F7DBEB9B6, + 0x3BC861DF703E5097, 0xD7BB21DBCAF9ADB1, + 0xF511F759238A5122, 0xDCB047B68195DD6F, + 0x95C9E72F3D7DEC9B, 0x63E7B2FCB3D2ECBB, + 0x5C48A1D6E3B33179, 0x39B61BDCEA9F0957, + 0x4127F1D84E347769, 0x887507560A1B9268, + 0x3117D84EFA60F77B, 0x6818D70197C8EDD4, + 0x35E39E5570358630, 0x2A9849F429572E39, + 0x5728BB6D63E3FF1D, 0x08DD5C90650AB751, + 0xBF1A602B5BA52FEE, 0x6F21DC8C6FD88FCF, + 0x34F060F4BF92E018, 0x9469E3DA4B5A7A39, + 0x2EABE3B06F58C1BE, 0x3B4B2A7D56C01C09, + 0x22D7275A79FE8215, 0x963E03AF64E1395B, + 0xED1517D3AF17C698, 0xA34A5897592D3767, + 0x9AB9C1CFC8862DFB, 0x9C02B660CDCF1292, + 0xA2AE5C478B96E3B6, 0x16EF1D267886F0A5, + 0xED5AB8860415BABA, 0x6F85CEC2A08E35D4, + 0xDC20483CD3DD5201, 0x88B665756C26F7F7, + 0xBBB45C3CF5C8AA85, 0x95E7320BD9D51F89, + 0xA0F8A7517A273C05, 0xA625D96BDE6A2827, + 0x2801D0012266DF07, 0x58222F98EDED588B, + 0xD7C95D322FF57522, 0xF46E72F72630AA74, + 0xCE2B43770B655F8F, 0xC499AF3B32CE9E44, + 0x5FCF4D7069B09026, 0xFEABE4F1525A0A08, + 0x336511A34F2E5185, 0x343A67D02BA7963E, + 0xB7635E80A5C31BFF, 0xCC6DE40C1B0CA70B, + 0x1A0D4A6C336B7BC5, 0xE895584921D5DCB3, + 0xE3945201F14637DD, 0x0F6B0F89ACEC469A, + 0x59424BD75174C9B1, 0xBB88E75343D3F9ED, + 0x6CC86E78358D5119, 0xF84CFB580CE995B7, + 0x15FF52B809DB2353, 0x5FA8AD2D5582AEDA, + 0x8386BFB614D06749, 0x945FBB15AF3D1A75, + 0xBA96394A0EECFA65, 0xB85F083C9EC6349B, + 0x6E0859B530A365CC, 0xABAC3B4C7E2AAF54, + 0x22DA66936E0FFF37, 0x9FEF247BAEB331F5, + 0xA6DB27D19ECBB7DA, 0x575B7C28D81C0B4D, + 0x648E7A5434AF7969, 0x9DC368EBC0627412, + 0xBC1D768F2F5D6C05, 0x17114A8CCDEB9E3D, + 0x2ED61456317B8178, 0x37A45BFCFA8ED1A9, + 0xA67F9C46D612B6F1, 0x9660FCDECA64B930, + 0x906B778CA1DC72B6, 0x4D9115464D37FCEB, + 0xEE53B14A19E480D4, 0x76EC599745C1F9BD, + 0x6AD0BD5E087866CB, 0xF25455BCDC1F84AB, + 0xDBF860CF1DB8E599, 0x924B1AB29F57DA48, + 0x9E4CFFF989258472, 0xACA86FC73DC40E96, + 0xD484BF71050CA1EE, 0x41059522A813006E, + 0x06610343E73B9727, 0x4DB1F9BB44AB31C4, + 0x3D2FD9E763B24472, 0x9AF0046294647722, + 0x031C55ED33227371, 0xBFD34AAE952D8C39, + 0x4593CF82AA179706, 0x389743F72E1287D7, + 0xCABDB751D86FE93B, 0x324AA4318E9FB6EF, + 0xD7C10C4A637992C9, 0x8ADD26334FB0EADD, + 0xC9001364B4388F22, 0x4135068DCDCF385D, + 0x4D610C6B56031351, 0x11D2FAB00543926F, + 0xDB283FDE680FE72E, 0xE2C80C5EACF02022, + 0x46E2B844905BC5F0, 0x04D299C80240D6FD, + 0x0B824797C9BF2159, 0xE80CD484C7092894, + 0xC23DE0E91C30B58C, 0xFA3CD2A976F07F94, + 0x440AF51A3462B86F, 0xCB63763717A253D9, + 0x4C61C75BEE8184C2, 0xC95426A654AFD89C, + 0x037ABB06825D7AB1, 0x45F54A5D563BAB7E, + 0xB4271092CA7EDF48, 0xD6D29A31AB2A8BDA, + 0x06A3524161C502BA, 0xB781771AACA31D78, + 0xB4AB419E0D86ACAE, 0x566A87BC9E723CB4, + 0xD00D76A7DFC9D852, 0xA67FA54208D15BCD, + 0xC7272775B4DC786E, 0x903CBC9D71D2160E, + 0xB812B3FD1C01CF27, 0x0E3F56EF162ABFA8, + 0x011883F41211432A, 0x4D9AD83C5BA0C218, + 0x6009F9F1AE90D8A6, 0x5C1A8A424CBD7EC6, + 0x7EC3E537791D8CC4, 0x0FBD6A653794B06C, + 0x79DF7E806202CE01, 0xDA060B8C374D44E7, + 0x7C0A893088881D57, 0xAB946B7DDFEE8833, + 0x5721B434AD84D57A, 0x8879B2803A5F8682, + 0xBDECF64367884AC3, 0x111FCF62A4BA857D, + 0xFC18DB55AE19E046, 0x36C0D9757EDAA8CC, + 0x991251AFC3981F84, 0x43DDCE9C73E22D9D, + 0xCE5F689CF5A0A49D, 0x817F41864B424C70, + 0xADED7F5748ACAFE6, 0xFF6C60A49A2BE250, + 0x137BC35589E34E1E, 0x05F3E4A6F62A5ACD, + 0x7F96F23FA9B73327, 0x0F956787E97CF431, + 0x645D0B458D8E17B5, 0x9FCA90D8D2A2DC15, + 0xB2CBCD0930DFB420, 0x4C6F400CF30C1680, + 0x9BEA350D7C48061B, 0x9BEA350D7C48061B, + 0x6B1E8E2ED1335B71, 0x674364FB1963C598, + 0xC61B86C9F61EB404, 0x0513A10C6415B57C, + 0x276B6CE369C33678, 0x29DDCB8E40A160C7, + 0x8093F23ABACCC7D4, 0x199F05544A69FB20, + 0x20746F7B1032A3C7, 0x31F2EFD33130D530, + 0x2C9F302398E13141, 0x493B9F580D2322AB, + 0xE36A98D8AB3D3C66, 0x6FB334055E09B998, + 0x41FAA8FB2ECE8720, 0x70BD0C4D306B4544, + 0x7EC8ABA5E74B3D7A, 0x7EC8ABA5E74B3D7A, + 0xAC97AF97FA68E5D5, 0xFDA02CEF7BB76C08, + 0x2131046957F31B04, 0x675DD3A87096953D, + 0x8609C75EC438FB3B, 0xD13758E51A782103, + 0x7D3A583856F2C5AC, 0x7BCBEA12E57E6587, + 0xF434A10BA01C37D0, 0x476E714E34018858, + 0x7E6946F68A38B74F, 0xB0B1C9DB727DCCDC, + 0xA8733668D1047B51, 0x3899B75017372078, + 0xB3271D7AB655B441, 0xAC4FD27671081628, + 0x4851997F37FE9B3C, 0xBAE77BA3A38F7944, + 0x4B33C4243DE0C432, 0x6ACB137CE7852248, + 0xA87B2335D12531D7, 0xB6B7C4FC66B4A8AB, + 0x11B5E6D2AE73F48E, 0xEB399571DCA129A9, + 0xE50384ACC2C3DB74, 0x9C1A8030E99A269D, + 0x41290B40FA63E6DA, 0x472CFE0C870FF017, + 0x18B7AE224B087E26, 0x783BBE166E12B258, + 0x350F82CCB186AA1B, 0x62560DF60F74AA2E, + 0xD3E51C0AB8C26EEE, 0x0CBAE25F5A61219E, + 0xD3301660A57C9272, 0x0E4417A447DBAA53, + 0x69FF13266D7296DA, 0xEF83643F973BDA35, + 0xB16FCE9DDC7BA182, 0x8B6A925F148E0E94, + 0x2CE056FF3723F00B, 0x039EBE516344FAAA, + 0x92523B76657A517D, 0x40A7E0E65D62E5D2, + 0x46F917F6B4128FE4, 0xDD217DE18BBC8E71, + 0xC7F2DE41D102BFB4, 0x780FC617D7FC172A, + 0x6DEE77AFF8C21BD1, 0x9FCD56F864077E14, + 0x29DE5FA52D00428C, 0xC5E8919401B3C049, + 0x176852ACAAC173D1, 0xEAEAEAF459E83FC9, + 0xCB00196B31C39EB1, 0x13F65543CDF24793, + 0x79AB33F0FBFAC40C, 0x00366D0641FC64B9, + 0xDDF24D535060F811, 0xBD5C8D2E20B94BD4, + 0xBA739D6D5A05D6E7, 0x869C33363C4516B4, + 0x34B973047A2268B9, 0x8B94F76F569A2AC4, + 0x5DA3A8DE8CB6226F, 0xD62E84C1A443A088, + 0x29B18B4FD460CA8F, 0x9FD2A31EE1AED2AF, + 0x35BB21DE06784373, 0x537140C6FD687560, + 0xD1032E482629049E, 0x711C71764B9073E2, + 0x9572BD4DD6B72122, 0x506EAA858B8C1B10, + 0x5FF2C33B13A02A11, 0x1D0A9129C236EFCF, + 0x3DE3AA516FB126A4, 0x3C1B81D0B5A5B618, + 0xAEAB987727C5A8A4, 0x16AA6B503D2C9D54, + 0x6551B1F7F6CD46EA, 0x1A318EEA506A68C8, + 0x203B381133817079, 0x2DC4EB12EB60F277, + 0x117B45156D7EFF2E, 0x3549431D4E321B7E, + 0x2FB19228983E832C, 0x475CA10CECBD99A2, + 0xF98E4B3E56AFC7B1, 0x2EBE157228C5F499, + 0xC30713A383BFBF0E, 0x37C686EC5F835E98, + 0x85973643155D0B07, 0xBD833AA6EB59C81B, + 0x3EED80DFF7325CAA, 0x4846DFBEB498024C, + 0xA9CDB1E3F0A49883, 0xA9CDB1E3F0A49883, + 0xBA2C7DB0C129449A, 0x959CFDF61FAE6BC9, + 0x33D72899E24C3365, 0xD9E6A20518FF976F, + 0x3D3D15AF7BCAAF83, 0xDC1ACDE6E645E5EF, + 0x5CE587FB5A42C8C4, 0x6D488077FC7AF376, + 0xE662C8B759D08F3C, 0x78EE0531704D6DD9, + 0xF1AE5DCDBFCA2721, 0x72703AFBB822710A, + 0x73561D4425A021A2, 0x48B6B7B6755EF099, + 0x88578F6EC36B4A3A, 0xD8E1354FA73B9C12, + 0xB9BB18E2C40142ED, 0xD54899846E0850A1, + 0x30A6614C1F7799B8, 0x28E80531B318B296, + 0xF1A1803D3476F215, 0xFC34A78A396151CA, + 0x3158C77A7E888AB4, 0xFE4F9416E3A24776, + 0x71DC455F5CD1C2B1, 0xD86C3984AD1BC14D, + 0x1C9D7949FA533490, 0xA085ACB00B1A8A1D, + 0x38BAAA5DD4C9D19F, 0x1EFABBC6D189C872, + 0xC980E62E33DF1D5C, 0xF57054D6036F7B21, + 0x19CAFA3C87F7C2FF, 0x264EE27FDED1DCA1, + 0x5BD5F255321C4AAF, 0x0522E7AF4E7D6835, + 0x10655FAB9915623D, 0x74698A07E06F2F97, + 0xDEAAF77EB3687E97, 0x6B7C03C60655F5F8, + 0x3270F67EED31FBC1, 0x77BB529833419E4B, + 0x9D30687C57BAA0BB, 0x3003C3A88F98C2AC, + 0x1AA8A837D2169D94, 0xB2B610091E845B65, + 0x98E2BC1CA26287C3, 0x9F8755BFF312A639, + 0xBE3DB208333D9844, 0x34032E85F6D8563E, + 0x3FA4BF0A7AB7DE2C, 0xE368221DAFA8842E, + 0xE8853FBCE7D8D0D6, 0xBD62D1917A5F8DD2, + 0x55A8BECAF28A4EB7, 0xA428AF0BCAADC64A, + 0x19D8DA0E5A68045A, 0xB93CE5FF3635FEFD, + 0x32CAC93C9DE73D32, 0x1FFD908A6547D0C7, + 0xAFF47709F1D5DCCE, 0xDB00D15435DD3627, + 0x6F6F290102C02AB4, 0xB592493CDC7124C3, + 0x0B8B7F74BF061C6D, 0x821A09FCF7D18676, + 0x031E11F3D447647E, 0xD86964DDD0885499, + 0x242B5874F0A4E052, 0x606D5EC551961A10, + 0x6BC0ACD0673ACEBE, 0x297492CEDE095275, + 0x45A9187928F4B9E3, 0x8D367F0B53916265, + 0xAB3CAA6B422164DA, 0x9C0D256830690A70, + 0xE3261D791EB44ACB, 0x6FA9C6FC36086A78, + 0x73001E34F85137F8, 0x0B0EF9F89716DF8A, + 0xC729991A9065376E, 0xB9F9B06BE925BC54, + 0xEF7D17BC6C85264C, 0x9E3C25573694B0CA, + 0x96E6D5150DBF1C09, 0xA7937A977D415762, + 0x5FBAE526203990C9, 0xC40253B7AD8F8141, + 0x792271AB35C356A4, 0x55684097D0396B57, + 0x44919CC079BB60BF, 0x9498FF1F54FDF587, + 0xA516C198B7DCA1E1, 0x2A5C1594F37A6631, + 0xD3CD6FD297AE87CC, 0xFABF45630A359B11, + 0x5B76B14AE875C795, 0x1993C816F91DE0CB, + 0x7D8BA05688AD64C7, 0x23BA98A349F4B91D, + 0x03C2EEBB04B3FB72, 0x0640A6589856D2B1, + 0x8989CBD7B4E82534, 0xBA002840543C85C9, + 0xB7257BA2550EA10A, 0x7AAF3FB351A73689, + 0xF12E6CD06C73D69E, 0x9D29638A96C3B0F0, + 0x3DE51E9C80B116CF, 0x8914C23892578262, + 0x615EB504B0788DAF, 0xD922B9FA9AAB5C31, + 0x316DB59CD14C1774, 0x091644086E892B74, + 0x2D7A9B577E72385E, 0xB1E79F9A1E81311C, + 0xF083835B70BA9BFE, 0x57BEB833F0529320, + 0x23428FC53C60919C, 0x8C8D76FF623C41BC, + 0x407091CF6037118E, 0x8877012A104BFBE2, + 0x66C7BB2416ED3FCE, 0xE8F3E4F2388876EC, + 0x887FA38787DE8C72, 0xC60554272875D76A, + 0xFD813BB7DB977F20, 0xDED9309DDD5A58F4, + 0xCD0A8A9338681CF2, 0x7064535E895AD161, + 0xF740FB339D471C35, 0x2ACB31E9AD9CD463, + 0xC7827959479DCC78, 0x895470BB92940DC6, + 0x049F059625058A86, 0x9C5B31105C010B47, + 0x5CDE92C702A8FCE7, 0xB20BB447C131B310, + 0x9D4FDBB035229669, 0x3E36F06B5AAC0723, + 0xF8BDBF3D573049A1, 0x811451B8BA61B007, + 0xD5B4883AC32F24C3, 0xB569C5668135C61E, + 0xE60054A0FAE8227F, 0xA4756F00F08C95EC, + 0x9747292807126EDA, 0x16912343AE54C352, + 0x56EB5E94318D3FB6, 0xAFE591D41A07B2FC, + 0x6C395296347AF0FB, 0x75C657917FB4003B, + 0x1A2DCF21E22955B0, 0xE02F4C3522882D1E, + 0x7E30698477BF0FA2, 0x9A898486F0944461, + 0x8F5FB35D7E88FC70, 0x6E74C4FAEF001064, + 0x9A1131ABF8453E58, 0x5B02834E66E85E13, + 0x9780F32BCAF72431, 0xEE891B8DF8FF946D, + 0x1563FE35E9928E67, 0xD79EDAD54826AD27, + 0x685D5561680D088B, 0x664A9C693A971BFB, + 0x6178F68A87A4D3A0, 0x80382F8EBF76114E, + 0x2818FF6638CB09DE, 0x72D865B1FDCD10F0, + 0x2A5E0621DD815A9A, 0x04C294C4E7154351, + 0xD6CA58B3B53A0F22, 0x47F6F4E3A427902C, + 0xFF14D6FEEC507BBE, 0xFF14D6FEEC507BBE, + 0xDE564951F95E09ED, 0x407B7FBB86B988B9, + 0x69C922B677621428, 0x69C922B677621428, + 0x7EE9F5D83DD4F90E, 0x3F7B472B49D4D2AC, + 0x028944378AC816A9, 0xCF477384114A1741, + 0x052837721A854EC7, 0x86838FAA1E8A1038, + 0x21973BBF8D17EDFA, 0x22F60AC75F47C66A, + 0x3E71D0B300B7AA79, 0xE767467C4AAD68A8, + 0x82CEDC33687E1F50, 0x1BC7A425D69E84A9, + 0x3FA36981311FA4FF, 0x5607401B1908D7C3, + 0xFEDB7D269E8C60E3, 0x612434A5544F5847, + 0x28579D1B8F8AAC80, 0x7AD43B94CD205A49, + 0xE6AC6C45FBE83004, 0x6EEFB9852B1F36EB, + 0xAA0BC91BE0B796E3, 0x05524C2A43660E7F, + 0x8DE9945BCC9AEC52, 0x8B2E07E3E5B15D48, + 0x60296AF4BA14ABC5, 0x8A90955C39C9044C, + 0x293220DA1B46CEBC, 0x2DC2890038BFF758, + 0x274A1519DFC1094F, 0x28B1DDFFAA8928EE, + 0x28B18377EB6E25F6, 0x93A2700DAEF80D1C, + 0x208784099002BC30, 0xE9F487B66E055135, + 0x644546EC5287471B, 0xE1C045B5E77827E9, + 0x1897CA71995A90B4, 0x2D54F00919E36B63, + 0x29B260B84947DFCC, 0x7C0166AE3D19A361, + 0x093D6DDCA5B8FBAE, 0x79F81BE872570074, + 0xDF4B952F7D381B95, 0xC85FF1F8A04236D3, + 0x70A252F60A3E036B, 0x09D48D620DB96163, + 0x62374889A4D59F72, 0xD69961AC74E916E3, + 0x10144267DD22866C, 0x073A1111AA7C8686, + 0xEB0A2B758F7B850F, 0x71794FDA9361403E, + 0x249E310B2D920699, 0xDF9AB3C346705246, + 0xED76D195E6E3BF7F, 0xE5423A6C90C30BCC, + 0x5D97630A8A0EF123, 0x70CE8D2E6B0ECE3C, + 0x74C0E2A57EC66760, 0x3BA50B117757EA3E, + 0x9040DFB09BE75706, 0x5F1D2FA6FBF403D1, + 0x9B8E1BF04B51F2E8, 0x5C21627F44D0A4AC, + 0x1F8E00FB18239600, 0x51C45857BC5EF13D, + 0xDE44A00999B2837D, 0xBCEF29BBAC16D038, + 0x5D5CAFF661DDF6FC, 0x092B9A2C8F9C705E, + 0x5DC577201723960A, 0x3C8CA3A774D2ED66, + 0x6B50FC8749632EC1, 0x971569E906FAAAC2, + 0x6E11F282F11863B6, 0xE5694002E250F2D1, + 0x017568A8182D98A6, 0x532D1719F5E51AE2, + 0x19F2A026EDF0013F, 0x04E5165F663D7983, + 0x8F993D26E0CA5E8E, 0xD83D4B641DBA1F1C, + 0x422F32CC7E56ABAD, 0x2B9CE4B85D669BA3, + 0x4F54F3B6C202FB4E, 0x3DF0143FCD335B48, + 0x300D614A4C785FC4, 0x9CF7186A344D26A9, + 0x6D793F03A631FE56, 0x4ECDF1AC3EC9ADF1, + 0x67FC09BC554A75E5, 0x330E4FB0B2E035E7, + 0x5549EE11FA22FCF2, 0xEBA87F605C131B19, + 0x405425358A7D61FE, 0x0846333BC725A766, + 0xE57085BC4B6B2D60, 0x314A1AB56764C12D, + 0xC098810437312FFF, 0x462354AD40326131, + 0xB51194800B257161, 0x4EE8324979A597B2, + 0x8E5FB15663F79120, 0xA5C5D178B75F53C6, + 0x026FB97D0A425F84, 0x6FA8221C9D2ECB46, + 0xC3330A45CCCDB26A, 0x004B4DE459D9277C, + 0xAE306F2A904BF86E, 0x64B711F5179A0CEC, + 0x6F0F77FBA9A8F2E6, 0x91F3303ACDC001BE, + 0xEDD91296CD01AEE0, 0xE62DA6AAD4CB14E4, + 0xA13B0222F3D94A94, 0x1B5D7B29077E23F8, + 0x79D3B596FE44EE8B, 0x4544B07E5BF6339C, + 0xF55E4046F6F831DC, 0xEDEE67DF8B262119, + 0x47B595D60664CFFA, 0x8AC463FE615497D5, + 0x51B3C61D5006765B, 0x2F9B1DB89F0DAA3E, + 0x8C1DC7770C51DC8D, 0x6558CCB2A9836B53, + 0x61A3DBA14AB7F411, 0xF64CCD2B361895E2, + 0x5640BFF86B16E8DC, 0x5C062C9AFC66C513, + 0xA2767257A320FC82, 0x28135EF4EFC59AF6, + 0xB5349E36C546509A, 0xF9396352432E6C10, + 0xD1B0F412F109EA5D, 0xAB0596591A2DEF66, + 0x83B8201ED82A9A2D, 0x98049B8490B0E613, + 0x71AFB258CCED3A27, 0xB24535D3E314DFBF, + 0x84FD40F56075E816, 0xF59284F54E03EE36, + 0xA41BCD7213805AAC, 0x992D27781C0CAD28, + 0x40B62FA033EB0346, 0x35727E1088FE37C3, + 0x602E548F46E24D59, 0xA7BAF5A3B9C4BDDB, + 0xA60BB5CE242BB254, 0xA34B79924DD80A9A, + 0xC2EAE3FB8CDBED31, 0x74BEE465F70B968C, + 0xF6AF6CB341349015, 0x22BCDA79AFFA487A, + 0x6837ECDF4BEF87E1, 0xCBE001B6C37192A7, + 0xA10B2DB49E92A6B0, 0xA5B990B21237B420, + 0xC91C6C55199308CA, 0xC9248337A8F81981, + 0x469F2ECDEC046337, 0x0D1A9BA89E57F763, + 0x5A859503B0C08678, 0xE0A6F16F546C8274, + 0x754615490A029508, 0xDC949C4A3FD76A44, + 0xDCD4EA924F42D01A, 0x2CA971FF57ACA369, + 0x65019750A0324133, 0xF66C9C93DD6D9095, + 0x5BC9495F0B3B6FA6, 0xD58F21CD47ED1D6B, + 0xDD21B55DF695CD0A, 0xAA115D61707C2388, + 0x0225778816FDC28C, 0x4D96A42366D2FBE1, + 0x289016EC778D60E0, 0x0DFECF5FF1884F2D, + 0xB4EC2312F4E5B1F1, 0xDF23DCD7A3E1B7A5, + 0x3A6867B4845BEDA2, 0x10643A357794B3BD, + 0xE1B13771A843C4F6, 0x0388E9988AE25FE8, + 0xC7397A83F7A2A462, 0xFAF3663F722E0CA8, + 0x48608C3464F58AB4, 0xB034D63F2AC698FB, + 0x103991D4A307D472, 0x628E78E73686A5A9, + 0x759E13EBC1C15C5A, 0xCDB8372251D2B328, + 0xEBF8284D8CADEB53, 0x215EBC4B9ABE5251, + 0x0EF93E9F3D08C178, 0x27D1524D8F8AB27C, + 0x1CA59E306ECB80A5, 0x35BEDD7AFD26FCD5, + 0xB1381B97F70C7B30, 0x366F2EE77E6D2120, + 0x758F49C24925568A, 0x20134BB1D330FA8F, + 0xC6D3D26810C8E0F9, 0x67182A03BD561806, + 0x5E7AE8AABE8B7C0D, 0xDFE2034EFC4BADB1, + 0xC8391C309684595A, 0x7A8EF3F01F221FF2, + 0x8D4D46230B2C353A, 0xC7E4E71866B09979, + 0x5A4F9EDF1673F704, 0x8E2C0C5DDFACC4A3, + 0xEE82280AB767B690, 0x401880DEB6D89C96, + 0x2E0A74E1002380B1, 0x3BDC1388AF8F601B, + 0x43F4DBA69710E01E, 0x610AB01E36CB3EB5, + 0x68EDDA28A5976D07, 0xC1DFA5E3535B69F6, + 0x89023FBBF9200E9F, 0xCB3024ED32EBF9EC, + 0x74BD83EA840F6BC9, 0xE5E1E3C9D866175E, + 0x52F357A30698BCCE, 0xCBD5BF9FD895F81F, + 0x1A31FE0049E542F6, 0x6F958279C554B2CD, + 0x9135584D09A3437E, 0x131F04047A7864D8, + 0xDB629FFD9285FA06, 0xF10AD7891E7F9F95, + 0x7EC52CC40597D170, 0x1957A6389047831E, + 0x5B4E4C817FCC2DFB, 0x2EBAAC7478326ECC, + 0x53952FD2BAA19F17, 0x35B66DA5A0E5ABE2, + 0x26903D9CD1175F2C, 0x48644A320FB780EB, + 0xE41CA53051197A27, 0xDAA1E5A2BEE06B50, + 0xAD6DACA4BA53E0A4, 0x70729B766882A4DF, + 0xE520FF1AD2785B40, 0x79CC60D128756F16, + 0xBBC08F6B4CB8FF0A, 0x6A6C88201B15D7EA, + 0xB8E181E559464527, 0xCCFA606BB731DE7C, + 0x62ECFCFDEE7885D6, 0x3EA8C0BAD14D607C, + 0x17FCA7199A530203, 0x042D3F56FFA48394, + 0x7B8A361C1813FBEF, 0xD0DBCF94279ED096, + 0x5A43C76F7FC7BA5F, 0xA7B40B7D4853ADD9, + 0x80C8B1846639BB19, 0x6A9EC1F6F5C4ACED, + 0x5C41E6BABC9E2112, 0x0B4A6B4168F21B91, + 0x21E253A7F8DA5DFB, 0x3F01EF7011E60CD5, + 0x2B6D467DAB714E8D, 0x88B586663F001D13, + 0xE6B0E8CFC3633BF0, 0x36BE5A905BBC3636, + 0x6EAAEFC76ACC311F, 0xBCE80C1BFB032685, + 0xC12321827687FE4D, 0x86DA8A407ED8A381, + 0x956B409B984D9BF7, 0x52D6C041E20A8DF1, + 0xB72E26D81006005B, 0xD3B638D46BF908EE, + 0xBC38B49BCB83BC9B, 0x5AC2C33175100EF3, + 0xA7C4F2C6E744A550, 0x3CF5ADE443D18312, + 0xD29EC58C2F6B5014, 0x4413D406F1EDEA57, + 0xEE76FF7E6A0166B0, 0x05F358400C3C81D6, + 0x67EEDEA1B9BAFD94, 0xA2A7DE2914591E35, + 0xE2F53F172B45EDE1, 0x9BFF081396CFFFC3, + 0xCAA15F13EBD417FF, 0xE4158E25735AAF13, + 0x203B527D1B77904C, 0xAE386BF4C10DA2A6, + 0xBA71116ADF5B514C, 0xF4C21F6414CF1653, + 0x6ADAABD3068C5235, 0x5430621E372A60EA, + 0x6501129C9E0FFA05, 0x4ACEEE8C0C6D752C, + 0xFA07759E6FDDD7CF, 0xDBAA41471EB9C5CC, + 0xEF49CF0270307CBE, 0xCADB541AD8CAFD43, + 0x7504C0F113AB50FC, 0x911B702AFAD692AA, + 0x55E1D2758F34E437, 0xF03ACE54462622C9, + 0x21115BCD6E44656A, 0x9EDEEA994698960E, + 0x8389CD56CA8072DC, 0x67CF1352CC692A08, + 0x3AFDC536C3D01674, 0xD5C0F2C0C23EEEBE, + 0xA82819CAC9C4C403, 0xDAC95E213A2A9D98, + 0x33506883545AC0DF, 0x6A3F0FDBDD89D000, + 0xE3EBAAE484798530, 0x62B35ED15B4DF479, + 0x37025B27D9B658B1, 0x22AEBAB79B65420E, + 0xEF26739BCD9907D5, 0x11C6FAFEA33DAC78, + 0xE842A9398079BD82, 0x056CEF866EF9291B, + 0x97C65887D4B37FA9, 0xF7DBAEA10D027AEE, + 0x22AC59A870E6A669, 0x9B73EB6255D4AE81, + 0x772960298DA26FDB, 0xB51972B58BF40F96, + 0xAB54A438726D25D5, 0x49CB177958B472A8, + 0x2DCF46CB1A4F0884, 0x4231C0F561F47868, + 0x9849DE24FCF23CCC, 0x4B4359E6C6E64685, + 0x0C4BBF625CA98C4E, 0x5587484C0CD0306E, + 0x8664170EF165C4A6, 0x18E799D84C12692D, + 0x57715966069157AD, 0x7D2CA33170C87A11, + 0x7FD2990AF016795E, 0x7FD2990AF016795E, + 0x7C0043FDFF6436BC, 0xCB6610732EA7B3C7, + 0xD12882D3FF82BF11, 0xED2EF55D15FAF20E, + 0x634148744F385576, 0x415928DF2EAAED2E, + 0xEC6A202EE4960385, 0x5E89D8C80EED3A1D, + 0x165E135D6DFA2907, 0xC6AA0BB16E3A0B01, + 0x7AD9E6CE657D69E3, 0xE798A823945FC1EE, + 0x772282EBEB95E682, 0x446CC29337F6968D, + 0x34E710FF01247C5A, 0xC55DA02D18D77322, + 0xC45C27EF50F36ADC, 0xD22D04E82B321B6C, + 0xB8FF7AB45305C345, 0xBDA4776988E3E1A9, + 0xBC3CCA5844452B06, 0xD494A6C370C3D305, + 0xE7CF3C4F9F489F0C, 0x83E7671FB1B0EA3F, + 0x378E809BF61EC840, 0xFD633D7231E1261C, + 0x95CF53B3D687F9FA, 0xEDF282DE81A4E495, + 0x6E13FC662B882D1D, 0xE7CBF6B12C6C955D, + 0x4B5B620C9B59ED34, 0x3BF41B46B52FC189, + 0x9088EB5A43FFB0A1, 0xCF882B151A34557C, + 0x84436EC293B1415F, 0xF1D7BA19E531DE2C, + 0xDA5E12F728DB30CA, 0xDA5E12F728DB30CA, + 0x57E4C39DE5EE8470, 0x966155156C573F75, + 0xF1160ACCF98A3FC8, 0x7B6B41ECBE4B733F, + 0xD242728AA6F0FBA2, 0x3BCD5137CE6A77E2, + 0xF0F2103EFAF8CBA7, 0x9F3F28DE61C3AA82, + 0x3F878F92B3A7A071, 0x069557E67CC67C29, + 0x54833611C17ABDEA, 0x50B76EE36FBE865F, + 0xB5C51B5502E85E83, 0x09C1414CB91476A5, + 0x76EF28DA05EA395A, 0x4A3CAFCAB7B02E0A, + 0x8879EE09268305D5, 0xCC89BCE0D230B0D6, + 0x676C48776CACBB5A, 0x9AF62494CC03DEF1, + 0x1C8A4C2C19E68EEC, 0xAB0BB1BDD76B67DC, + 0xAEA8FD591FAD4106, 0xBD74B9C9BB5E1622, + 0xAB8E2EDA0C0A5883, 0xA72908630B966DCC, + 0x97841634EF7DF1D6, 0x04F334D40DE7B220, + 0x6683AB880E427778, 0xEA5C7C61843816D5, + 0xA549C3B37EA28131, 0x2C7A52191F8DFF00, + 0x2CC848A861D01493, 0x10F7D3E143C6BFE4, + 0xD9F8455409B525E9, 0x24CBDE4C2EEE441C, + 0xFAF2A78061FD9EF4, 0x5086B45874995907, + 0x063AE2B2CC273588, 0xDFFE747BA19D9E75, + 0xDCA174A42133F08C, 0xBE527F3A3A04FB79, + 0x0FC2D89AC25A5814, 0x16C6E55F8C91ED24, + 0x386F6CE5BAF6091C, 0x278BD89624D37226, + 0xC5574E0AEB86BA68, 0x4FFD888249B447E6, + 0xB50807EABE20A8DC, 0xB5815392582AB87A, + 0x6D14BFDC33B34F55, 0xB7890F1006E20412, + 0xAD464F2E18836BFC, 0xAD464F2E18836BFC, + 0xBBE7648349B49BE8, 0x9EDEBDBCF0CA8781, + 0xFDBF4CDBC07E1706, 0xA831E89DCF82DBF4, + 0x6CC27C9FA2040220, 0x2D61488C347F8402, + 0x9537097412CF75FE, 0xFD04BD7FA7FDC8C0, + 0xA0948AB42D7BA0DE, 0x48E10529AEAE00F9, + 0xB50C0B0CEDC6CE84, 0x69AF387D1A91914C, + 0xBF94DD42F63BDED2, 0x2F040F7AF0534E16, + 0x633F6F44A537EBB6, 0xCE9B68978ACFC0FE, + 0xAABB1F56E2A17CED, 0x1F2C4D3A741ED5AD, + 0xA1A9FC1C76A6730D, 0xB55F4A9B15B8687E, + 0x697F508861875B42, 0x3F5EA4DC99C798CC, + 0x95AED7B8E39ECAA4, 0x39770140E336176D, + 0x99CAD8E7AFDB60FA, 0x5D654093425985A4, + 0x4C7028F78FFD3681, 0x712766206A1FB244, + 0x2311DD7159F00582, 0x9467B0584C318BAD, + 0x1093408B4B9D1146, 0xF68E4E46C76FADB6, + 0x2497C4717C8B881E, 0x89E171705EA920DA, + 0x5AFEEDD9BB2899D7, 0x3A3D993E6038D003, + 0xB088E9A47AE6EDD5, 0xEF26B061362BFAC5, + 0x218297BF0CFD853B, 0xC6F23A13F7502DC2, + 0xCE60DE011B6C7978, 0x9FA24EA712B9DC35, + 0xD4D4F6A4AB575A33, 0x66B785A2E38AFE05, + 0x763B4BD305338F19, 0x758CA774AF47E610, + 0x3B963160CD65D41E, 0x4FA5062424CA8F79, + 0x6A842D197F845D56, 0xDFCDA69090A27D1F, + 0x3DFF319A831E0CDB, 0x64CF0B1FED5D2D23, + 0xCEF214315D276FD1, 0x7AEE1151EA84CE7C, + 0xBE5C1255A1830FF5, 0x276AD30F7ADB253C, + 0xCA4AC3EAAE46EC7B, 0x21CF10913EBB8AAD, + 0xCE5D0E5E315DB238, 0xE82FA3EF8F4691FC, + 0x7EEF65D5F153E26A, 0xDDC360B77B1C1AE6, + 0x65B080555EA48149, 0x63330C16A0672545, + 0x28D37D4F71AC5C58, 0xCCE873890D990C3F, + 0xF40DD601A65F7F19, 0x2835492575BEB0E6, + 0x6089CDF6A57F326C, 0x78EF6BDFD91C7D7F, + 0x6274C4712850841E, 0x741BC8585A65F4E0, + 0x953DA1E1B12C0491, 0x6596B08538BEF507, + 0x51BB2D88D31A914B, 0x63A152463BA5D8EC, + 0xC50CE861B55EAB8B, 0xE7EF8DD8596FAB5A, + 0x6EBFB22D646FFC18, 0x97F149F09AA42962, + 0x25367DE49D64CF16, 0xADB056FF4873632E, + 0x46A1E1A299EC4BBA, 0x016587321D096AED, + 0x5F456788B05FAEAC, 0x6B12AF969525E2B2, + 0xBE4C854FFDB6EEBE, 0x88B9EE5446E06E44, + 0x2A69FFD1B42BFF9E, 0xCB59BED06C8D8623, + 0x13127EC3665E8EE1, 0x778AD4620A6469FB, + 0xE0A6138401BCB837, 0x15EDEE04BCDC062C, + 0xA77DC70BD689A1E5, 0xB7C1D501EA4AF43E, + 0x2959F696AE390A99, 0x670EBC79D84CAC16, + 0x99A05839C46CE316, 0x290F73D78EA7ACBF, + 0xA1DD317EA8FD4F29, 0x21DC133439C50AA5, + 0xC24075310A8B9CD1, 0x71B0D01332756A26, + 0x9F3F689B814F2599, 0x2F59632BC3D0BA0A, + 0x3F4D00167E41E0AD, 0x2EFB177BD4CC053A, + 0x9D44FCCE98450843, 0x378000C23A45D089, + 0x140E6A44870A11CE, 0x23FF6A7387AADACB, + 0x60BF608F1B8CD1B6, 0xF7E38415C6027209, + 0x87B63E25A529D526, 0x8F37B08BFE649B87, + 0x21D2E5662C1F6FED, 0xB0CF8E8296F01432, + 0xC6DC823253FBB366, 0x2B72223BC5E6AEE0, + 0xBC74B4BE25EB6C8A, 0xE12DECC9CD8EA15A, + 0xD23A1A815D21DB19, 0x342FA983EFDCF87C, + 0xE4CB7541F413D2C5, 0xA2A9A3EBEA03B1F6, + 0x66E7CB63C97B7D20, 0xAF3DF0E7989C8411, + 0xAC51915D27E4A5F7, 0x23F06E624576B77F, + 0x3EC8BF18AA453FE9, 0x30940D8C121A801C, + 0x3441CAD2F2231923, 0x92408A8996EC1C80, + 0xE43701C36CAFF1A4, 0x1C4692901D44F0EE, + 0xCFC8BE9A5E1FE575, 0x0DF115F2DFB9476F, + 0xA6E9FDCB2C76785E, 0xFCF2996A0E9DEDF6, + 0x1F25887F3C104278, 0x255B318EF26B8BB3, + 0x8BA6F76BC53A1493, 0x410F7E904016F85F, + 0x56B94C6D7127DFBA, 0x38BAFE3BBC859486, + 0x0581730AB9380412, 0x35B69CA7D039EFCF, + 0x32CAEDF24A583345, 0x7F8C42905CE3AC40, + 0x1297A88E081430EB, 0xDE5F0C35ABFAE7EF, + 0x365E877C61D6988B, 0xB04972E8C39E22A6, + 0xA6294919E56FF02A, 0x4200138CBB376D4D, + 0x48ADC8A773564670, 0x100BDBF4D9AD9C8C, + 0x1A78AD3D8240536F, 0xE301A6EBE644D433, + 0xF417C2502FFFED43, 0xC16ECE4C45894D24, + 0xD4196117AF7BB974, 0x9BB2BC07CBCBEFA6, + 0xC0ED6438E6D39BA8, 0xB1FE41B8B7B7E7F6, + 0x5AA3F878A178C4FC, 0x939216F3B74957E9, + 0x00C09F246ABEDD82, 0x6BAE30F6D8C8EB82, + 0x2CE544C68FB812A0, 0x077121A83525E84C, + 0x1033371FC8E842A7, 0x43BA63ED2A7A4D2F, + 0x87E7F24270732CB1, 0xD8CDB1383C822BD5, + 0x3556041742A0DC74, 0x7264A30B4B7EC628, + 0x85B66BC92B62622E, 0xA130D0330135513A, + 0x33F2E3FE70EAAE1D, 0xCF1FE5DEA3E2E135, + 0xA551BE18C11A476D, 0x9F99D4EABFB00DDE, + 0x43FEB945EE7F85B8, 0x73156EBB4802E831, + 0x816562BADFDEC83E, 0x4C282482B986CA53, + 0xE8D65CA700C9A693, 0xE592AEEF07F5ACB2, + 0x9A83F5F9963775EF, 0x1D2EEB05831CD818, + 0xB3924ECD70E095DC, 0xB7A74982A8F639B9, + 0x4198AB0022B15F87, 0x4D79903AC2C62A29, + 0x8935624F8C5592CC, 0x00BA91AE0048DAC9, + 0x51F0FEB9F6AE98C0, 0x7DEA086D46274EB3, + 0x72C1056D678BB7D8, 0xDD456D7F1AC1F8D9, + 0xB4C7A93837C91A1F, 0x54074F16F5654499, + 0x90A38E9838E0A8C1, 0x6C18ABC0D4C9AAEC, + 0xD8CA6FA57401884D, 0x53B2586DB8F999A7, + 0x06F43E5175EB6D96, 0xB878C9CF124CE441, + 0xF03755696450470C, 0x7452439CC81F5469, + 0x21D04D7BC538C146, 0x2C02FD537351F376, + 0x5EE5632F47AE9695, 0x94714182656D3835, + 0x5BFF36D6ED83E0AE, 0x7ABB6A57FEA9E35D, + 0x5BCDE0F640C773D2, 0x0B689A191D843945, + 0xA7ECB73355EB2F20, 0xE810D112A0C00FF3, + 0x1F9FB66F3A3842D2, 0xFD27541A23F0F64A, + 0xE615BB7A7752C76A, 0x1918725DF54CC57C, + 0x59C3757B3B7408E8, 0x373CAD73CFC80EE8, + 0x54B0F614960F4A5F, 0x863684C6FF605DBB, + 0x0AD9E8F87FF7C16F, 0x821EBB8C473B5AC5, + 0xF488C566413B4232, 0xD02BB47B48729D81, + 0xC1952F3773BA18FE, 0xC1A351B95E36CEE8, + 0xAE31E7DF9B5B132E, 0xDBB5D5416B2AB402, + 0xAB04325045427AAE, 0xDC252CD3A5DA5F65, + 0x600F8CB31C7AAB6E, 0xB3BE6C3813CA2B6C, + 0xACFB2463CC22BED2, 0x74891A80460EA768, + 0xE01903C47C7AC89E, 0x06FB234BBA422A9F, + 0x02398B627547189C, 0xD5CF6F9E6FB73F7B, + 0xD1E46824E6FB92B5, 0xD1E46824E6FB92B5, + 0x7A1ADEEF01740A24, 0x8CFE477EBC9C9655, + 0xB893215D8D4C015B, 0x94D6C89E54DCFFD2, + 0x93AE6A61BE015BF1, 0xD39FDEA586C82548, + 0x2C8CBFE1EA5FC631, 0x78AD5F6DFCE28557, + 0x8968D4D8C6C40C11, 0xC5CBF2E2DF8B78A3, + 0x7669F9E39DC17063, 0x3326F34E011A3E38, + 0xA0FA4EC6A05DA44E, 0xA8990EC283701813, + 0x97CE68CB032583F0, 0x5EB620E783C4517C, + 0x9CCC9525BF2408E0, 0x905CCEE05822E71F, + 0xE4E53E1419D81127, 0x05B028589AA5CDA0, + 0xE6C0C80B8C867537, 0x83BBEF784BCAC410, + 0xF051D9BFB6BA39C0, 0x55CC7E45BCB19963, + 0xF0E4BA16D1DB546C, 0x49CD1E1C9228352E, + 0x67B2C79AA7FF5738, 0x2AC1ECA957EB9158, + 0xAD2D28A1AFDFF131, 0xA5D39CB3073E83F4, + 0x5991A01434CE9677, 0x850FF0C17C7B65A9, + 0xADF7BE450512C12F, 0x058E0757369EBEAB, + 0xAF03011701811146, 0xE68CF76DCD906DC4, + 0x2C1D8B3B19E517CC, 0x9FD3277EF6FD8108, + 0xA2F952104FC6DD4B, 0x67365D8BEE8AC02D, + 0x1821D91AD4B56108, 0xAF76DC34F0718838, + 0x877C1EAEAC531023, 0xDDB60218A620965E, + 0xCA230C9682556CF1, 0x50B947F587BAF618, + 0xFB680D403909DC70, 0xAC5B2506743F67DF, + 0xCF1182F682F65307, 0xD0F7D73F9749F258, + 0xB568DFCC358429C4, 0x9CBD775226BEB857, + 0xBCBFCD9D1DAC19E2, 0x003042FDDCA46622, + 0x5182A339A3474510, 0x5309318C08ED8CE0, + 0x66979ACF5102FD2F, 0x8E59B9B3A40E5179, + 0x9BDDC73CC6A115D4, 0x50B2343E4A31E66D, + 0x25ECB9F8017D98E0, 0x81176349BE8B3031, + 0x023ACAB2DC9DC4A4, 0x25CC1255225B82F0, + 0x2C4A1590ABF43E8B, 0xE2B7E71D014076F7, + 0xF4FC6A6F67D8D856, 0xAB1C4744AF94EBCA, + 0x563B65A643ED072E, 0xC562FE1EBE48B70E, + 0xE05DD0E9707003A3, 0xC7546390B55A7FFE, + 0x29439776AAA00A62, 0xA359F4D5EAEF37AA, + 0xDEDF1C8BD47C2200, 0xB9F2388FB32B8D40, + 0xD2049635DEB9C375, 0x8492951AA4C5E1BC, + 0xE67C6DFD386EA5E7, 0x57234C03C800F98B, + 0x08B0CA7A6AB3AC32, 0x019A9B017B0F7296, + 0x068F64F2470F9656, 0x16EB34BCB8FF7F0D, + 0x6A973569BA094650, 0x18A5AC906C2AE237, + 0x4348BFDA56023A2F, 0x616FB27502322769, + 0x729B5F1EFBC0AAEE, 0x96729F0BA9418850, + 0x1837AF7C627009BA, 0x640EE45C98DEDA73, + 0xF78F94D60248C737, 0x6E66A0ECA9637C46, + 0x6D6AF961B72728AE, 0x3650C929A10F0EFC, + 0x3765C3A3E8192E10, 0xCB3F1538F3444103, + 0x41062318F23ED854, 0xE3EC59535D9B909A, + 0xB09D25E77C33EB3F, 0x98C542E7B3364E15, + 0xF796359A959DF65D, 0x5BDDB6E7B40C7A39, + 0xAC0BFBDC3BE00E14, 0x707D58EAD6F0DF4D, + 0xCA59CCAE5D01E4CE, 0xD89835E1D519B569, + 0x4237E822315D8BA9, 0x61ADF659BDFA734F, + 0x7619EEE8C886757F, 0x0CC8B4C581022F66, + 0x2AA720E4287BF269, 0xAB256D7C8D6A4AC9, + 0xB77D05AC8C78AADB, 0xFA657401A11FF221, + 0x92922A607497B14D, 0x1EA7954E8B7A87AE, + 0xB8EF61207C2393A9, 0x03C7354FE1D61B9E, + 0x26D99D5A82FD18E8, 0xD0C9C21322F414B6, + 0x8EA86DF356801C7D, 0x94EA1F8D5CB17C82, + 0xBB2333BB87DDD87F, 0x3CCFC106A6738860, + 0x7BBE7FF626A591FE, 0x837027D0DB9215C0, + 0xEFC13B1CE30D755D, 0x7BF16DDE0547C4BB, + 0xA6FA3979BED01B81, 0x910551839DC6A7B1, + 0x36D782F68B309BDA, 0x45A445014B256CB5, + 0xDEE612F2D71B0308, 0x57338FC01D78BA44, + 0x5335BE58C083E74E, 0xBB3DA45FD0FEFF89, + 0x9078C0C5EF8C19E9, 0xC2B92342CA52F7EA, + 0xF030907CCBB8A9FD, 0xA3A3E3B836DB6D5B, + 0xB2E0C0D6922D31F2, 0xF4B0F1D16C5ECDB7, + 0xA916396DF4154EE3, 0x59094334ED7162F7, + 0x0BFFB028B3DD0A97, 0xCB5CCEF2770E05F4, + 0x388EB2B86C73B6B3, 0x483D665D1287B547, + 0xFA2888E3833C8E96, 0x5E3ADA0EEEFBDA71, + 0x756AE6E962168A04, 0x9F54648E5BED7D62, + 0x86B4B6212CB8B627, 0x80C31A22501B228B, + 0xDD2238F57B977751, 0xEDC8EB71BDF5815A, + 0x702BC4D605522539, 0x154728CFDF0822E1, + 0x4D02279C83BE69FE, 0xA082EAA17C26C492, + 0x0419B167EE128F33, 0x96C8DB8274CBD326, + 0xF3B0E0AED097A3F5, 0x998E6E243D95183A, + 0x26E13D440E7F6064, 0x26E13D440E7F6064, + 0xFEB2DDED3509562E, 0xFEB2DDED3509562E, + 0x78CEEE41F49F421F, 0x78CEEE41F49F421F, + 0x74513EA3E505181E, 0x2D1DBB6F4CA53366, + 0xAF60E6A2936F982A, 0xAF60E6A2936F982A, + 0x430A7631A84C9BE7, 0x430A7631A84C9BE7, + 0x0BBB9A7A8FFE931B, 0x0BBB9A7A8FFE931B, + 0x94A68DA412C4007D, 0x94A68DA412C4007D, + 0xCD0F5B5D932AE473, 0x812B131371BEF692, + 0xF4B2ED59DEB5D774, 0xBC72F72B28569518, + 0x9BDA23BF666F0855, 0xA9B0133EED69CC07, + 0x0A3F820A9A9A9AC5, 0xE6FBDCAAEB2A3D4F, + 0xF1211889DF15A763, 0xF582A897A7912851, + 0x8DC9675797123522, 0x7701EEFE7F351B28, + 0xD0A484CB2F829FBE, 0x56170D894044321A, + 0x8F0D5BA1C2CC91D7, 0xFD1F7E8B478ADA45, + 0x36DE109527A2C0C4, 0xC3590D5180A9FC68, + 0xC406BE343FC4B9AF, 0x6AECF987DCB60AFA, + 0x04F2FA6E234162F7, 0xA9E8221D38125321, + 0xD32214EED2B5770E, 0x47B4D1801B82A793, + 0x5BBCF35BF6E456F7, 0x2300D5427AB634A0, + 0xB6871B0555B02996, 0x39CB74F6C6250CD0, + 0x13F1FCB111B820B0, 0x4D209ABE9FDF997E, + 0x1DC67821D32BBF62, 0xC51B27A99761B57D, + 0xE532D6811B3A4D2A, 0x04BE5B5CC9E4B325, + 0xD78772BDCD6471FD, 0x1EEF6FE2B3107AA2, + 0xBD0EFB25CCA8F97A, 0x61F7424D96CABB64, + 0xA5375426F1FA16E7, 0x1B15A15D70CA5CA8, + 0x2F5A72430E78C8D3, 0x2F5A72430E78C8D3, + 0xE42FCDFD0E4196F7, 0xA91163D8D92B4EE3, + 0xD7CD9CF34F2C99E8, 0xD16BD2D9E77A9C69, + 0xEAABE8FDFA21274C, 0xAE8E6284A6D09C87, + 0x5F3B7749C112D552, 0x824C85B41BE522B8, + 0xFFA5D878809819DB, 0xD13544ADC6A3F165, + 0x8974647ED222EA5F, 0xDA9EC7DC2368E62B, + 0xE5F773C1A1D9D168, 0x71FF95CC27B74CE2, + 0xC443FD757C3BA637, 0x1D3D67B2B4E6496F, + 0x94BC51E9449D917F, 0x532BF48031D68855, + 0x81404F3DC124FE5B, 0xE94C3DFBD4D74724, + 0x3BD101471C7F9EEC, 0xE15BC3017DAEEDEA, + 0xED44897CB336F480, 0xA025CF94245C7BBF, + 0xA03D4ACE0A3284CE, 0x7A1D6E372C9B0D33, + 0xFABF21B6515BAE65, 0xB6488F3A39295039, + 0xB2CC4836834E8A98, 0x9CEFB7D95B7F50D8, + 0x2B171E6B2F64D8DF, 0x2DB184CC9064069B, + 0xF92A014A634442D6, 0x3E15E494AC200C6E, + 0x45B8154E077D9E4D, 0xCCF8CE6ECB8490FD, + 0x223CA69A8C4417FD, 0x893289730A4A21E6, + 0x43865688AE10F0D7, 0xA23C9FE11AB9D3C8, + 0x9E778248D6685FE0, 0x6217A44F745D15E6, + 0xB539BD8A4C1EECF8, 0x4A849EADCA934A24, + 0xE124FA80A759019C, 0xEB16010DBE2A2950, + 0xFB6DB092FBAE29E6, 0xAD592DB2F96ECA57, + 0xD20D79671A598594, 0xEFEED9AB1DE8C2C4, + 0x6816FB4416760775, 0x0C156EEBC386DF2A, + 0x759299C5BB31D2A9, 0xAC0450E583B816FC, + 0x11B0A20C493F7E36, 0x385F1329FC0B2A9A, + 0xCDA1C62BE2777802, 0x968C9473415B3A7C, + 0x31BA138F6304FB9F, 0x35BC9B3188983FA0, + 0xF6B170F9A02E9E87, 0x396402027BCBD865, + 0x17C3A7D31EAE39F9, 0xA0EFA74FD5CED7AA, + 0x1C436FD11FFA692F, 0x329EACFB80D47308, + 0x5EA784D197556507, 0xFE972E3803B8F244, + 0xB162DC95C0A3317B, 0x673199BEECA61201, + 0x75AF80E61248EEBD, 0x3F83BFD10239557E, + 0xE7B80E2BF9D80BD6, 0xC9327DBF3A6C58ED, + 0x24E4E51FC16305F9, 0x48C07A1CD76ED682, + 0x6D3A430D1A809179, 0x23C8858EB0904B23, + 0xB21B89501CFAC79E, 0x8CFFBF6959FF8219, + 0x960C9FF8F616E41C, 0x73AF76B5B436689C, + 0x9B5016A6433A68C5, 0xEB6F253B0727FA03, + 0xD5BB406F4E04019F, 0x3F06BD0C544583A2, + 0x85F061DA64ED2F67, 0xB12E7ADB99F5BEEB, + 0x531B84E7DA981FB6, 0x50AED80F13EE5970, + 0x9D26502BB97BFE62, 0xDE82EF1CD67A076F, + 0x7C4FCCD2E4DEB394, 0x8B8AE99F9148079E, + 0xDBC966A01C02BCA7, 0xB0E92983C32CA21C, + 0xFC4EE00A7B3BFB76, 0x4DB2ECF3CD805BC6, + 0x30FD873ECE50E9F6, 0x38B791250E006A89, + 0x0FE8E1FCD2B86B33, 0x9B022911EA95A90E, + 0x69EF772B192614C1, 0xD61C27FD90CA5A01, + 0x33981D6804E62F49, 0xF25D8F13BFD62011, + 0x4128464231E3CA0B, 0x0757B7FBB1FEB5F2, + 0xA51B086B0B2C0F7A, 0x26DECB8B631BD3DC, + 0x62B9FEC9A11F10EF, 0xE37341706C07CAEA, + 0x2AFC2D19B50797F2, 0x33B0E138E677D12C, + 0xCCB339CC970452DA, 0x860FB60EB0922404, + 0x7A5349B773584675, 0xC677CBED737C2039, + 0x005ACA7100BD101D, 0x7949AB4DDD6E0D44, + 0x0CCE73BC7A11E885, 0xC2BE7E6CE09C212D, + 0x5BBBD92186E1F1C5, 0xA510355252E5C3E9, + 0x771ADB0E7635B7BF, 0xAB1CFC100F084386, + 0x4041A13C7A391B1B, 0x8B31607EB5838263, + 0x299EF3C576773506, 0xC37856D224E52ED4, + 0xED26584F6BDCBBFD, 0x5EDA486C8AECA356, + 0xA9160796D47A2CF8, 0x01EB3E1541A210CB, + 0x4FBFE2DF84CE2EFD, 0x7ED3EDA4C4D612D5, + 0x1DC9B749E7AE282B, 0xA6A0FA7F001A72FB, + 0x4043679560C4EC9A, 0x2E24D38C3F51AB68, + 0xE08256F972C7BB2C, 0x1C8487A09DF65207, + 0x6DD05E9D83EFA4C9, 0x0678C35B80A8CBFB, + 0x0F99F70C61F14619, 0x30A4E9C3B95141ED, + 0x631F1CB8FB4130AA, 0x3A0A1602169383BA, + 0x50F291211919D6AF, 0x8FD08A3A093BAACE, + 0x83AD64F53F4E9483, 0xA3DEF7AE421BCCFD, + 0xAC95ED552157E092, 0x0E41AE9400CF5AB4, + 0xD4391969AA5DB8B5, 0xDA37193CAA040EB4, + 0x5C95BC4983E40787, 0x6A5F9EDA81B32E07, + 0x0FDACAB5CA857903, 0x4C6F5DE975BE68CA, + 0xF029D4798E020BF4, 0xC0F548817D5DB0B8, + 0x57A03005593E8495, 0xDF264369EE40D1E0, + 0x3ED90646ED1B5EA7, 0xEF467BF5426D0383, + 0x180A570AE883661C, 0x88BBC93A8303F8A8, + 0xC991C255AA6D90B2, 0x0D01377CBB402497, + 0xE86689E5F82DE429, 0x6817ACF18A10E06F, + 0xD21D111C46BA9F15, 0x2EA02577FCF4621C, + 0x1464E17207CD36E2, 0x1464E17207CD36E2, + 0x533073E8A596008C, 0x533073E8A596008C, + 0xA6C90FBC38E395EE, 0x5E72DF7B8C03AA05, + 0xE2BB399D90942091, 0xB9F7A469460E7A4A, + 0x26E1CD96B0903D60, 0xBF142393960F568B, + 0xA40F9C2623F6A8B5, 0x32C1729072A82662, + 0x5CBAD97E059E1B94, 0xB6D68BD9EDCDD76F, + 0xF9B10B529DCFB33B, 0xF9A422146971B693, + 0x700AF71AE615E6DD, 0x91A9C560786BD132, + 0xDC18531D7019A535, 0x4E520AB94C58CDDC, + 0x08E8EEADFD0DC4A0, 0xC06549A26FA43CBB, + 0x5D17BE59D2123284, 0xE9E1D4D7EFD2E29A, + 0xF70EFA14FE091429, 0xB88F95FC13D1A4DD, + 0x7808619F31FF22DB, 0xB9CC5CC2A7437150, + 0x3E93E06DB8EF1F30, 0x0471F84E07D156D1, + 0x85443FF4C328F53B, 0x1D0F0A8090E1551E, + 0x67A5589628E0CFF6, 0x678E959F60C0DB94, + 0x83F28CE49FBBFFBA, 0x2999FF4884D79BD0, + 0x07EAB372C8841D99, 0xAB3C3872668799C0, + 0x0B203B4AFDE53A4F, 0x982905734682D639, + 0x64E5C4CC82847B73, 0x003AF354E818AEB0, + 0x53C10C8BD774F2C9, 0x50FF03268D8F1D86, + 0x580CE4438479CC61, 0xB8CE2A3C998060F7, + 0x745711A75AB09277, 0xD6003E90FFFD0FC5, + 0x95914459A87EBA28, 0x4F15DFC8A6FF9D34, + 0x283B6062A2C01E9B, 0x5AB0A339DA02D5DB, + 0xC3BFED92026A2AAD, 0x972128702A73652B, + 0xAF50DA1A3F8B1BA4, 0x84B16C7901B604D0, + 0x74732C6CA90DA2B4, 0x5381ADE2AB48C34C, + 0xF3929C2379B60CCE, 0x8E3B6139DCC5E397, + 0xA02E59562D711006, 0xFE7540F1BEE89108, + 0x31E64B916088AE77, 0x5615CEB61FD013D3, + 0x4811BBAC21C5FCD5, 0xEF64102A68B016B4, + 0x0E4F77F7B9D74D84, 0x85B27F99EFCDE96A, + 0xDFFA5BE8381C3314, 0xE22FEC48A045AA30, + 0x9DCFF2AFB68B3476, 0x871F5D64A7186019, + 0x85A0EF54A500882C, 0x8B48A87425306D59, + 0xE944C4F5AF1B5883, 0x19CE48398ED0AA35, + 0x94A8394D150B013A, 0xDC21F812C53C1BA0, + 0x8E02D73914064223, 0x8A058FAA67658E8A, + 0x4D36070FE0215186, 0xB364346471C3B028, + 0x2FBF47B1B36D36F9, 0x863C8F1186AACA83, + 0xA29177F7703B5644, 0x900E477F7E7FAFD5, + 0xC42DD763159F3461, 0xC3E66A439E573E4D, + 0x6B07B9CE4D390375, 0x03C14641295C0405, + 0xCE4E5D9B0A4FF560, 0xF7E5756D14B1844D, + 0x10FAB35428CCC9D7, 0x02BFF15CAA701972, + 0xBA416D68C631496A, 0xEF5DA7B0B233B989, + 0x53AFD64C6758F2F9, 0xDEFD839F7EC4B1AE, + 0x2BF66D2E7414F686, 0x8B1F09CC6C3C3886, + 0x6793E42BE02B575D, 0x158BE4DA604B8CE3, + 0x7F8413B7FC2AA6B9, 0x857B3D3645392E1F, + 0x3B3D11CD9FFCDFC9, 0x70F3087E1D69E208, + 0x5B8ED3DB018927B1, 0x30C35F7F42E16D7F, + 0xD45CB817D7E177D2, 0x2114A68B95B68855, + 0x73E2B500410DA5A2, 0x5FC81ED67BAE8E8B, + 0xA091A5E44F0072E5, 0x64DDDCB61D7680D8, + 0xD7B6C73CAD419BCF, 0x7759A6B72D53AB8B, + 0x0DBD5D7E3C5BEC3B, 0x0676F68E0A01D918, + 0x3E9BB38102A589B0, 0xBED4CFEBFFB06C15, + 0x144DA052257AE7D8, 0x7157F95D1468800C, + 0x3AAD8B2FCA1E289F, 0x3141A38304DDB450, + 0x9E80A5BA8109F974, 0xCDB768CC75763B8D, + 0xC3C7A6AFDB244624, 0xBC7DD936FAB5B033, + 0xEBEFC2E77084F599, 0x37F7E862362586A2, + 0xD45B1FFCCD52FF19, 0xEE46C75CC4278490, + 0x520F3282A53D26B7, 0x583B24A049440101, + 0x0C978FDA19692C2C, 0x3876A7BB44FE1A0B, + 0x9AC9CCBFA8C29795, 0xFC426889440E01BF, + 0x2615AA2A695930C1, 0x2357EFC0E577FD4B, + 0x3F9990BF5F22759C, 0x7613A9A31792E306, + 0x05095437424397FA, 0xE45310E861787FC2, + 0xC116FF9B4D488291, 0x1FF4424D3D1FEE0B, + 0x742B58F723233ED9, 0xF27915DA30087A9F, + 0xCEFA968912D0F78D, 0x399FE7DFD14716CA, + 0xFA91550DF9318B22, 0x343B9F9115ED2C30, + 0x439BFDE3CD0610F6, 0xDDCD169B875A8C80, + 0x4D86CD31E8976ECE, 0xD8BFD04305D960D0, + 0xB99C4E4D9499DF29, 0x77CFFAE90E8C4BF3, + 0x3855FB5EB2C5E8B2, 0x62C21892E32BDB00, + 0x6B1DE27EE78E6A19, 0x43B8FFA9FA5ACB37, + 0x74881E6BCAE2327C, 0x8CF15536C2885718, + 0xF98DDE0A8ED09323, 0xCD7495327ACF9137, + 0x02C40BF885C567B6, 0x51FB94D5F3D17E35, + 0x7206F674F2A3B1BB, 0x97D0CF02746FBEB4, + 0xCBBD7C4991B64809, 0xD0A2F51B2E57F028, + 0x716B6DB9D1886106, 0x05051A326970AA76, + 0x597F8DBA9B206FC7, 0x81F32B9A798D5EF7, + 0xE26CCFF8094D8C74, 0x551305F842A0A237, + 0xCD74233600C4EA6B, 0xD617E992DF8A305E, + 0x796A87B3B68D1F3D, 0x147BC8286E4946D3, + 0x2FC5650B0271CB57, 0xC72A027F63D1F5DE, + 0xFD8B834A8BA05048, 0x932557B3260F13C4, + 0x599E4FA1F87EB5FF, 0x11812CF89B710148, + 0x468F769A077E790F, 0x6DAE5BC6E04D2DE6, + 0x9FFAA562E6A391D1, 0x1C4DE9B574B24869, + 0xDB32D62FCA524DAA, 0x321D3A19A52D6599, + 0x2910669969E9535E, 0x8ED8428AB65B7367, + 0x5025D8C3034C2060, 0x8F9A55E7D87C27EF, + 0x6FF8FF40B6357D45, 0xF46EDF82CA845956, + 0x3CA58F6CB7CBD784, 0xFCC26BA7572E9F1F, + 0x9D40DF90FAD26098, 0x3F466B2A5F02D328, + 0xCA6B2F7CE32AB653, 0x637EEE40966C2BFB, + 0x257ED0FADF750BCF, 0x257ED0FADF750BCF, + 0x1AD5B71586B94820, 0x08F338D098BF714B, + 0xBE9B0959FFD0779B, 0xD2B70038FDC7433C, + 0x741A3D8380319A81, 0x503E3BFF07E32C3B, + 0x2DA41ED6E1FCD7A5, 0x142D0FD7E42F719D, + 0xBE4390CB40B3E627, 0xAE77D1668DA754A8, + 0x9133955F1A2DA957, 0x75FC0AB2EDB01170, + 0x524FF0AEFF9C3973, 0xF8ABF8940883FDB5, + 0x327EDEEEAC55C369, 0x48AD110DC0A6BE25, + 0xFBC5E768C7A77A6A, 0x86F91DCAA8962419, + 0xB07D3185E11657A5, 0x33FC825CB31766E0, + 0xA11700682F3AD45C, 0x7404749A8C3BD799, + 0xA670B3662FAFFBD0, 0x1AA7FA4BBD799B88, + 0x870DDFD5A4A796E4, 0x47807D8CD55F1303, + 0x01BF60A500E28887, 0xA6BE8F025C6B653F, + 0x0EDEC3C276198689, 0x818C6D67AB3F266B, + 0xBDCD95FC216A8B3E, 0x8A437068C87289B7, + 0xDCD51DD8F87AEC5C, 0xE8C1AC5A90BA3636, + 0x57005C18827F3A28, 0xF92FB7BFC3CD275E, + 0xB071E27958EF4CF0, 0xEA6E45901A12B311, + 0x402F9ED62087E898, 0xF5195738B4A7349C, + 0x57DBA049E110F217, 0x65436E51C985931E, + 0x4927FC39CD0869A0, 0x35EE8BE28AE0C86D, + 0x815F18AD865F057F, 0xD28419A1DF39B6B0, + 0x7E58745504313A2E, 0x45A4D664C42235B1, + 0x2EA9A3BEDF3F17B8, 0x4F11245B08F5B536, + 0x0BE73DA6984A6E33, 0xF94E8CE19D4205DA, + 0x26F07DD83A5F7F98, 0xFB74E3D4C9031464, + 0xC0D2AF00BCC234CA, 0x41328F5E1B95097D, + 0xF2FD55CB574BCC55, 0x1C06EFF2850DE499, + 0x71C33B22606CD88A, 0x510494EE6BA1AFB1, + 0x3FB99A8B08D18FD6, 0xD9203CBCEC2C0A1B, + 0x9D6981DFC91A8604, 0x72AC1B255E2E67B1, + 0x57AF1F8E27483721, 0xC101EDBBE4F86687, + 0x3C5C1E2C2FF814B1, 0x1CA9F5E6E866688A, + 0x3039AE5AD2C9C0C4, 0x8A10C07236045CF1, + 0x57B192B4D4AD23D5, 0xE7473EFB02569964, + 0xDDF73E2B1FEC5AB4, 0xABFB8A2AA9BEBE01, + 0xE036A705F989E049, 0xC54B993BB48F127D, + 0x5E3AA4CA2B6FB0EE, 0x4CFCE4324CAB38D5, + 0xCA575C391FEA25CC, 0x6AAC17FF6D7E9BE1, + 0xADB57E5B663CCA8B, 0xCD5A1EF40366D75B, + 0x8EF52ACAECC51D9C, 0xCE501D9A89E71E15, + 0x9ECA15ADFE141431, 0xA7BDADBC292ECCB3, + 0x9769F811D1785B03, 0xB126455193B0249B, + 0xBF22E0F32968E967, 0xEE4E07716A206EBC, + 0x20FE7FDFEEAD38C0, 0x3675641E867C19AC, + 0x1F471B79ACC90BEF, 0xBBB96B2000C518B2, + 0xC8BC2011F67B3411, 0xFEE9AB0D5CA2118D, + 0x9FAAA4F4FC71F87F, 0x6A0ACB1AF84D879E, + 0xDC3A310219E5DA62, 0xD9A82F3AB1350294, + 0x729E3401F0430686, 0x76B31E07F5692BE9, + 0x2B51EDBEFC301339, 0x565B9270B6BB55DE, + 0xDD100EB17A94FF65, 0xDAFA24E60C13BB74, + 0x82352748437638CA, 0x070E110DECB2ED01, + 0x042E4B70B93E6054, 0x10C3C5B6A801C599, + 0x5B4F04F19376A0BA, 0xFF47446BCCB6E3AF, + 0xD830567D88A1E873, 0x55EED23DC4BC079F, + 0x0379DAF89BA09AA5, 0x76D70166E6CA3B9C, + 0xF1CA12B18AEF5298, 0x6DA4D1FB7DCE9FD8, + 0x32EBD154CB6B8B99, 0xC09538ED00E16CDF, + 0x12B37D54667DB0B8, 0x850A6B703300A183, + 0xFAA10F1FAFB11AF2, 0x66A94F94A5DD05CE, + 0xE73092F4157CD126, 0xA3087B7887F8649B, + 0x241E289B5C059EDC, 0x9EB01DDA32D7F403, + 0xD82CF8E64C8729D8, 0xE0E6FAAB075C8D01, + 0xB60FEBA45333D36F, 0x54BBD34B26EF27D9, + 0x76B02E21ED27A469, 0xCE293C7793B5EC3F, + 0x2C8DF5D129595281, 0xDC84908803DC13E0, + 0x42613035157E4208, 0xF806ACF4599BDDBB, + 0x800DD4721A8B008B, 0x3E42A32E15B11FFA, + 0xAA81B5F10BC43AC2, 0x5E85B9A5E6984D7D, + 0x1F13D5AE5CB17E17, 0x0481156B0E5C0340, + 0x12B6281B6C6706C0, 0x571BF6744EF52906, + 0x0CD9AB83489430EA, 0x080479A55EA36824, + 0xC7BE335216B5EC7C, 0x03546D1E49984C8D, + 0xDE350F8651E4346C, 0x141AB7237EA42633, + 0x1A5CD7752DD28CD3, 0xC862BFF2021CFFD7, + 0x9A73240B49945C76, 0x666C16A4ED8F3098, + 0xEC51713AB6EC36E8, 0x2B56C657979E352B, + 0xA2A707979FE754DC, 0x5DDAEAEA3F8FBE74, + 0x838DA0936A24ED4D, 0x69D05EF4B2FF3C93, + 0x77758139EC9B66C7, 0xC69F9835D0856C45, + 0xA5EAFE473E45C442, 0xA4D53EACE37E1631, + 0xF2404D68CBC855FA, 0x6ACFF9B807C63BBA, + 0x7984C03AA5CC2F41, 0x123480158F10FA67, + 0xC254481A4574CB2F, 0x3DF4E172AD7D16AF, + 0x5A6FFA2433E2F14C, 0x012D9AF02A57F126, + 0x4BA92A18502BCA61, 0x6FA19E14E23FF16E, + 0xB87A37EEB7FAA67D, 0x6D19CF57DC2F3E74, + 0x371EA43692861CF1, 0x3C75661E6B2F54EE, + 0x6C34F1208B8923FD, 0x258B9DCFCB230FAF, + 0xB37E4E6A2388CA7B, 0x0C2EC251A0502347, + 0x3B39236746714134, 0x58B75E6A71A37784, + 0xB7B873520C84C118, 0xD9FCC3607602D184, + 0x1632BE0AC1E62876, 0xABF632B9E519BFE2, + 0x376C6375BA60293A, 0x06B169AFEE356AD4, + 0x2B1C623823DB0D9D, 0xC76488F3D2692257, + 0x61A885D3F7CFEE9A, 0xBBD67FCEA966017B, + 0x2B1813ABA29016C5, 0xED1E23A658F29D8D, + 0x95BAF97C82464629, 0x998F68DD26BCB3D0, + 0x10BD227A753B0D84, 0xE52D3703C896F0AD, + 0xFAFC23AEE23868DB, 0x5196D2A581169EA1, + 0x972BC203BBC4C4D5, 0x538DF1E152BC09E3, + 0x1950DAE9848A4739, 0xF565EEB8725037F3, + 0xEA16B69D93D71A45, 0xD813CC47F64D347C, + 0x72433699B4E6DD64, 0x1EF10815F16FABF7, + 0x0EDE326D47CD0F3E, 0x871989750407EC02, + 0x38B7C51AB1EDC7D8, 0x68238EC4457CF24F, + 0x6DAD3F8AEDDC7A4F, 0xF2AC8394E8D99924, + 0xE6717E652B8C8D8A, 0xB1CA6B8274FA7F4E, + 0x94538037EE44F5CF, 0x1111786FD303E4D2, + 0xBD0BE0BFC927EAC1, 0x563DBD0FC25AC2E2, + 0xF2EAC213D5EA0623, 0x9DC1A6454CB8B9EA, + 0x662635855957C411, 0x2314C4C472A33C7C, + 0x2A7776C709904AB0, 0xB308335B226917E4, + 0x441603240D202FA6, 0x515B0629DCBB6181, + 0x9641A9FF718E9C5E, 0x9A9B07D8E488CD6D, + 0x8B0C2964BA471961, 0x9D758632BC266B9C, + 0x966DD84FB6A46017, 0xBCDFCD39B3A03C1F, + 0x152D90E4C1B4738A, 0x4DAC1288478BAB80, + 0x9FEDF86898F100E9, 0xF3EB9A843D0AFBBC, + 0x9BF438815F5D96EA, 0x59B7B9A24CEDDBA2, + 0x9F6E2821885CAEE2, 0x51E7587A4C03455A, + 0xD53ACDBEF24A46E8, 0x21A209761841277F, + 0x941E5306BCD7C2C7, 0x2287793DBC7E7938, + 0x55AA95F481D694D2, 0x06EC589F9E7A97A7, + 0xBF09786A7FCAB582, 0xB0777E06E745E94D, + 0xBAF6BABF9E7CCC13, 0xE84E63587FB2DF95, + 0x1ACCFBA3D8DAB2EE, 0x6269512923355DA1, + 0x4E548C0D7AE39FF9, 0xC44FD821E0691E14, + 0x162C23CA83ED0A62, 0xFFAE5E115B2E0C5C, + 0x45E816772E93A9DB, 0xCBE767DE3A8F805F, + 0x5A0A3D1A186A5508, 0x50A9E5AA46A6632D, + 0xA75E2B6733DA5142, 0xE59992C75DE5F7E4, + 0x3448505B6E35262D, 0x5703D1BB667B3ADA, + 0x8020A73847E0CA7D, 0x24FF7130B317C0B6, + 0xA0AD7E2AF5349F61, 0xC0C84C8A3AD8D118, + 0xA699957E60D80214, 0x98C53BC0651696B0, + 0xA3C0B359DCB848B6, 0xA279F991B433DFDF, + 0x593570C289A77688, 0x722D5CFE95568B02, + 0x91B87C55093DE351, 0xBF892E860FFE77C6, + 0xDEB2B99A1AF1A2A6, 0x8EB98ED649FBEEE1, + 0x14F96AA50D6FBEA7, 0xA4ECE9F9B431271B, + 0x659CF2EF7F550C4F, 0xD5EFCCA90028E8F2, + 0xB7C7F6AD6424304B, 0xAF343FF7C5CB595E, + 0x45A83257ED02D9BC, 0x96F1D5BFDB71AA21, + 0x0E3A041ED6AC2B45, 0xD171F0AEC1CFBAB5, + 0x350C23949E43686C, 0x93E1F287F2BA4DC9, + 0xBE339365C863BD36, 0x214E857DC196E5F9, + 0x52C1EADAF7B10302, 0x4A636A09AEACD577, + 0x156DD1FF815A7B02, 0x3865A01DBCEC5555, + 0x63145D9C883A1A70, 0x70D76B2EE444F0BD, + 0x211AB1DD8D0F363A, 0x44471B63FEA886CF, + 0x9FD90732F56403CE, 0x61C57640D7569ECF, + 0xABA17D7CE615ADBF, 0xFFBE12D059373A24, + 0xD422FCC5F239A915, 0xD4B214349C8E8AE1, + 0x25F87B30C382FCA7, 0xD8A14DD983454D11, + 0xA8FDB297A8D25FBA, 0x8F639D0D922F6888, + 0xA13C11E1B5C06BFC, 0x98CF439620DF1D3D, + 0xA9CBFD40B3FA3010, 0x661C94C437A05CB0, + 0xB695E2CD0A2DA9EE, 0x51FD5FA8105FAEE5, + 0x56C8B608CFD49854, 0x6E10BA0305002606, + 0x8F08017F9D7C47BD, 0x5F6330FACE66ACDA, + 0x17430B918701C342, 0x3022D2F54D2D5800, + 0x17AD8C9706BDD88A, 0xFA175C86E2E73F8C, + 0x80FE4F3AB4E1B62A, 0x8AA1EDF529FD447A, + 0x317EBA71D7543F52, 0x514A976A99458342, + 0x202709F4C58A0424, 0xAD97A7EDCF347FBB, + 0xC6F580E4C94926AC, 0x55990FEFA064FC71, + 0x1E6611149DB3DB6B, 0x5A3487C540B04426, + 0xDD6CB2CCE7C2735C, 0x06B6B032D809D25A, + 0x98C3CF913D895111, 0xCC936EC8BC787333, + 0xCD015E5BB0D96A57, 0xBC68FBDA73BBB4A6, + 0x521FB041D93DD0E4, 0x9681B7444691EB29, + 0xF9113A30DE5C6670, 0x0702C81DAF64325D, + 0x23D69E0465570028, 0x83281755E11A1B30, + 0x1115F16B8AB9E8BF, 0x4E2EF4B6B665F3F4, + 0x0E4C749FF9DE9CC4, 0xDA0C49A6D01B065C, + 0x169BD9382084C8C0, 0xE803430E29ABF0DE, + 0x7B5280EBA9840C72, 0x3A2A8DAFDBEC4CFE, + 0x9D292F73ADBD9313, 0x6DE5AB1CAABE6EEF, + 0x2CEA2839313C09AC, 0x4C4EBDF5C0D2DCB8, + 0x71A78003C8E71424, 0xBB3CDAB62C8773C8, + 0x801BD273D3A23F74, 0x9EE541665B6620C2, + 0x157F93B036700462, 0x232F50D37AC94ECF, + 0xE4C3B169876D33D7, 0xC036337DEC373C36, + 0x2790F4B17D098E26, 0x640D58BA02AE994F, + 0xD1942374085C8469, 0x0702D7210420E04E, + 0x57D760D55F54E071, 0xA2F8D689459470D3, + 0xBD12C5EEE184C337, 0x98E94A93D7CF5AF1, + 0x7C9C91AB74A0360F, 0xB4D5E37C91862216, + 0x16A304E6CB2BFAB9, 0x5D84ACA900168A16, + 0xDB88A37483346780, 0x7E12948ACF187619, + 0x07C837F9A01C34C9, 0x9E8B548C035F223D, + 0xA50ABC31E3CDFAFF, 0x403A87C18C91C19E, + 0x038C1F517D7FDCF8, 0x00DEC68C32788DCD, + 0x52F0982D7FD156B6, 0xA05F91D121569413, + 0x78DCDC15C9F116B4, 0x041B9511CD0AC7F4, + 0xE9F6FFE837354DD4, 0x85EFAD0D44058E0C, + 0xB9C362BABECDDC7A, 0xC4EF004220364D2F, + 0x1E314167F701DC3B, 0xA53484CF24F59ADF, + 0xEAA0FFE120D92784, 0xDD944E3FD2028A48, + 0x45FF974EEE1C8734, 0x97A41BF3F05FC07D, + 0x970F608F0EE6C885, 0x5D8B0ADD9EFBD7B9, + 0xF87683CDF73C3F6E, 0x0248C79F1248F36C, + 0xA8B6AFDAC320AC87, 0xFB0CE0D8BB6531E8, + 0xAA51DB313C010A7E, 0x8E2E721D21D4A751, + 0xDF729E8D20CF7327, 0xFBC6C2D539FEBE5D, + 0x24AC0137444F9FD5, 0xB2AEF68A1821E149, + 0xCD6524439909C979, 0x0DADCCBB066E7AFB, + 0x9029B2F3DA924928, 0xF3A3BAE36B132003, + 0x234CDD44D996FD9A, 0xFEAAC380BBD053F4, + 0x742D6FD43115AF73, 0x4406369AECFF1937, + 0x75A16C3DA34F1245, 0xB5E587F8B911573B, + 0xB81656BC81FE24D1, 0xF9AF7AB8FF14C166, + 0x23C3EB807312F01A, 0x5D5B527FBF1A950C, + 0x25615540D894B814, 0x24DD1A7E1CE5AEEA, + 0x35A3CD97B2C0A6D2, 0xA6B38ABB8F4380A0, + 0x75A9A10948D1DEA6, 0xE272FEA6C88ED136, + 0x60E892BA4F5BDCA4, 0x678263DE4652A485, + 0x4B0311D3CDC4648F, 0xBDF731C5B27D78FF, + 0x77E2DD177910E1CF, 0xC8877830539DB973, + 0x5E1460624D194A38, 0x75BD85C612751A4E, + 0x96DEC8D5430208B7, 0x22BB30159A1EDCA6, + 0x719FF505F097FD20, 0xAF98B1BA240CE3DB, + 0xFD1D220394BCB824, 0x121C91C4B97233C1, + 0x968F270E39141ECA, 0xE3793E75F6CD0C71, + 0x0AFC4AF510774B47, 0x2C79DF42E0C84790, + 0x1EAC5F91BCBC5073, 0x9FD38F64FBC1F717, + 0x7AA5B4CE533C858B, 0x45FEE0510947498A, + 0xA905192A6781C41B, 0xE6611BC25F4D0CB3, + 0x3DDA37128DD1ACA8, 0xBA817770948E3E78, + 0x7B21E0BB01E8224A, 0x2C379BFDCD630F44, + 0xF2DD778C22B15BDA, 0xC5CEFC62F3637652, + 0x6AFDFB93754950C7, 0x9E6DF64305F09E3F, + 0xE45087D85F468BC2, 0x41E66F7E7D75ED55, + 0xCC3FDDED67BCFC63, 0x6E9EADDAA035F46A, + 0x817B86108EB94E51, 0x48506AB156710F59, + 0x58FADDED207897DC, 0x6F58CB684B3A13C0, + 0x35EDD5B2E3FF01C0, 0x1D9E964F58A13269, + 0x0B4DF1FA60C0E664, 0x3CA6514EA63E4687, + 0xB57D8DD645CFA2CF, 0x601B0DFD9B0102A6, + 0xEE4C0E6DBC6F2C6F, 0x297858422D123974, + 0x784BA7E0ECEB4178, 0xB40BF1E5B5AFAF2C, + 0xB094BC1DB4018240, 0x65A06F27C41E6D59, + 0x63BB75ABEDC1F6A0, 0xE8C3F992ED2B135F, + 0xD48FE545CD46F857, 0xFDC0A3F3BB6292F2, + 0xEB709A36958ABE0D, 0x698D291827FA1D1E, + 0x701919482C74B5AB, 0x701919482C74B5AB, + 0xBF4F34A85CA2970C, 0x06EA00EFD2FAE447, + 0x2309595AD6145265, 0x77C24A2808A82D26, + 0xDF47FC56C71569CF, 0x348B9A67D786EAEA, + 0x6D3465A73092F0E6, 0x2EA77AAC984722FF, + 0x1C491717107431C7, 0xED45A225D37BD239, + 0x77F16B447824DA6C, 0x849795C707462416, + 0xCDCA26E80FAECB8F, 0x1E9C66D34A087DF6, + 0x444D8CF241EC25C5, 0xDB94CFF813F20EA8, + 0x13C4B962653A5280, 0xD3E7A454CADD4E9F, + 0xEC9264727EEC0F28, 0x97B4B7B3DC70018D, + 0x14621BB1DF14E2B2, 0x9B21206C33C27B06, + 0x90A6526CF0381030, 0x7419FA8584FCEA12, + 0x5E62BE5DC58E9E06, 0xA8480CE935ABCA93, + 0x3CA6050692BC61B0, 0xE84D1F126D0D28A1, + 0xECF128344E9FF9F1, 0xC2CC13808B6C4D46, + 0xD2B32BE3FC1626C6, 0x3A3BA44578C292E5, + 0x1185A8087587322C, 0x84A4848B00417D4D, + 0x1AC8F4AD40E22127, 0x9F7D387F30FC0EBE, + 0xF47E567B3630DD12, 0x3652265BE50D03F0, + 0x2632482FD6B9AB87, 0x81FE0E774FC75DFF, + 0x04655F9D075D0AE5, 0x6E49CEDB385C327E, + }; + + uint64_t search_crossmap(uint64_t hash) { + for (int i = 0; i < sizeof(g_crossmap_data) / 8; i += 2) { + if (g_crossmap_data[i] == hash) + return g_crossmap_data[i + 1]; + } + + return 0; + } + + uint64_t search_crossmap_mapped(uint64_t hash) { + for (int i = 0; i < sizeof(g_crossmap_data) / 8; i++) { + if (g_crossmap_data[i] == hash) { + if (i == 0) return g_crossmap_data[i]; + return g_crossmap_data[i - 1]; + } + } + + return hash; + } + + void foreach(void(*func)(uint64_t)) { + for (int i = 0; i < sizeof(g_crossmap_data) / 8; i++) { + func(g_crossmap_data[i]); + } + } + } + + static std::unordered_map g_cached_natives; + + native_handler get_native_handler(uint64_t hash) { + native_handler handler = g_cached_natives[hash]; + if (!handler) { + uint64_t crossmap_hash = crossmap::search_crossmap(hash); + if (crossmap_hash) { + native_handler handler = (native_handler)native_registration::get_handler(crossmap_hash); + if (handler) { + g_cached_natives[hash] = handler; + return g_cached_natives[hash]; + } + } + + return (native_handler)0; + } + + return handler; + } + + void call_native(uint64_t hash, native_setup* setup) { + native_handler handler = get_native_handler(hash); + if (handler) { + handler(setup); + } + } +} \ No newline at end of file diff --git a/GTAV/src/rage/invoker/invoker.h b/GTAV/src/rage/invoker/invoker.h new file mode 100644 index 0000000..5e96bc3 --- /dev/null +++ b/GTAV/src/rage/invoker/invoker.h @@ -0,0 +1,122 @@ +#pragma once +#include "stdafx.h" +#include "util/math.h" +#include "global/vars.h" + +namespace rage::invoker { + namespace crossmap { + uint64_t search_crossmap(uint64_t hash); + uint64_t search_crossmap_mapped(uint64_t hash); + void foreach(void(*func)(uint64_t)); + } + + class native_context { + protected: + void* m_return_data; + uint32_t m_argument_count; + void* m_argument_data; + uint32_t m_data_count; + math::vector3* m_script_vectors[4]; + math::vector4 m_result_vectors[4]; + public: + void reset() { + m_argument_count = 0; + m_data_count = 0; + } + + template + T get_argument(int index) { + uint64_t* _ = (uint64_t*)m_argument_data; + return *(T*)&_[index]; + } + + template + void set_argument(int index, T value) { + uint64_t* _ = (uint64_t*)m_argument_data; + *(T*)&_[index] = value; + } + + template + T get_return_result(int index) { + uint64_t* _ = (uint64_t*)m_return_data; + return *(T*)&_[index]; + } + + template + void set_return(int index, T value) { + uint64_t* _ = (uint64_t*)m_return_data; + *(T*)&_[index] = value; + } + + void* get_return_data() { + return m_return_data; + } + + static void update_result_vectors(native_context* p) { + for (uint32_t i = 0; i < p->m_data_count; i++) { + p->m_script_vectors[i]->x = p->m_result_vectors[i].x; + p->m_script_vectors[i]->y = p->m_result_vectors[i].y; + p->m_script_vectors[i]->z = p->m_result_vectors[i].z; + } + + p->m_data_count = 0; + } + }; + + class native_setup : public native_context { + private: + uint8_t m_temp_buffer[256]; + public: + inline native_setup() { + m_argument_data = &m_temp_buffer; + m_return_data = &m_temp_buffer; + + m_argument_count = 0; + m_data_count = 0; + + memset(m_temp_buffer, 0x0, sizeof(m_temp_buffer)); + } + + uint32_t get_argument_count() { + return m_argument_count; + } + + template + void push(T value) { + memset(&m_temp_buffer[8 * m_argument_count], 0, 8); + *(T*)&m_temp_buffer[8 * m_argument_count] = value; + m_argument_count++; + } + + template + T get_return() { + return *(T*)m_temp_buffer; + } + + uint64_t* get_result_pointer() { + return (uint64_t*)m_temp_buffer; + } + }; + + typedef void(*native_handler)(native_context*); + + native_handler get_native_handler(uint64_t hash); + void call_native(uint64_t hash, native_setup* setup); + + struct pass { + template pass(type...) {} + }; + + template + R invoke(uint64_t hash, meme&&... args) { + native_setup setup; + + pass{([&]() { + setup.push(args); + }(), 1)... }; + + call_native(hash, &setup); + native_context::update_result_vectors(&setup); + return setup.get_return(); + } +} \ No newline at end of file diff --git a/GTAV/src/rage/invoker/natives.h b/GTAV/src/rage/invoker/natives.h new file mode 100644 index 0000000..42310b4 --- /dev/null +++ b/GTAV/src/rage/invoker/natives.h @@ -0,0 +1,5906 @@ +#pragma once +#include "invoker.h" +#include "rage/types/base_types.h" +#define _i rage::invoker::invoke + +namespace native { + static int ceil(float value) { return _i(0x11E019C8F43ACC8A, value); } + static float cos(float value) { return _i(0xD0FFB162F40A139C, value); } + static int floor(float value) { return _i(0xF34EE736CF047844, value); } + static float pow(float base, float exponent) { return _i(0xE3621CC40F31FE2E, base, exponent); } + static int round(float value) { return _i(0xF2DB717A73826179, value); } + static Void settimera(int value) { return _i(0xC1B1E9A034A63A62, value); } + static Void settimerb(int value) { return _i(0x5AE11BC36633DE4E, value); } + static Void _0x42B65DEEF2EDF2A1(Any p0) { return _i(0x42B65DEEF2EDF2A1, p0); } + static int shift_left(int value, int bitShift) { return _i(0xEDD95A39E5544DE8, value, bitShift); } + static int shift_right(int value, int bitShift) { return _i(0x97EF1E5BCE9DC075, value, bitShift); } + static float sin(float value) { return _i(0x0BADBFA3B172435F, value); } + static float sqrt(float value) { return _i(0x71D93B57D07F9804, value); } + static int timera() { return _i(0x83666F9FB8FEBD4B); } + static int timerb() { return _i(0xC9D9444186B5A374); } + static float timestep() { return _i(0x0000000050597EE2); } + static float to_float(int value) { return _i(0xBBDA792448DB5A89, value); } + static float vdist2(float x1, float y1, float z1, float x2, float y2, float z2) { return _i(0xB7A628320EFF8E47, x1, y1, z1, x2, y2, z2); } + static float vdist(float x1, float y1, float z1, float x2, float y2, float z2) { return _i(0x2A488C176D52CCA5, x1, y1, z1, x2, y2, z2); } + static float vmag2(float x, float y, float z) { return _i(0xA8CEACB4F35AE058, x, y, z); } + static float vmag(float x, float y, float z) { return _i(0x652D2EEEF1D3E62C, x, y, z); } + static int start_new_script(const char* scriptName, int stackSize) { return _i(0xE81651AD79516E48, scriptName, stackSize); } + static int start_new_script_with_args(const char* scriptName, uint64_t* args, int argCount, int stackSize) { return _i(0xB8BA7F44DF1575E1, scriptName, args, argCount, stackSize); } + static int start_new_script_with_name_hash(uint32_t scriptHash, int stackSize) { return _i(0xEB1C67C3A5333A92, scriptHash, stackSize); } + static int start_new_script_with_name_hash_and_args(uint32_t scriptHash, Any* args, int argCount, int stackSize) { return _i(0xC4BB298BD441BE78, scriptHash, args, argCount, stackSize); } + static Void wait(int ms) { return _i(0x4EDE34FBADD967A6, ms); } + + static Void app_clear_block() { return _i(0x5FE1DF3342DB7DBA); } + static Void app_close_app() { return _i(0xE41C65E07A5F05FC); } + static Void app_close_block() { return _i(0xE8E3FCF72EAC0EF8); } + static bool app_data_valid() { return _i(0x846AA8E7D55EE5B6); } + static bool app_delete_app_data(const char* appName) { return _i(0x44151AEA95C8A003, appName); } + static Any app_get_deleted_file_status() { return _i(0xC9853A2BE3DED1A6); } + static float app_get_float(const char* property) { return _i(0x1514FB24C02C2322, property); } + static int app_get_int(const char* property) { return _i(0xD3A58A12C77D9D4B, property); } + static const char* app_get_string(const char* property) { return _i(0x749B023950D2311C, property); } + static bool app_has_linked_social_club_account() { return _i(0x71EEE69745088DA0); } + static bool app_has_synced_data(const char* appName) { return _i(0xCA52279A7271517F, appName); } + static Void app_save_data() { return _i(0x95C5D356CDA6E85F); } + static Void app_set_app(const char* appName) { return _i(0xCFD0406ADAF90D2B, appName); } + static Void app_set_block(const char* blockName) { return _i(0x262AB456A3D21F93, blockName); } + static Void app_set_float(const char* property, float value) { return _i(0x25D7687C68E0DAA4, property, value); } + static Void app_set_int(const char* property, int value) { return _i(0x607E8E3D3E4F9611, property, value); } + static Void app_set_string(const char* property, const char* value) { return _i(0x3FF2FCEC4B7721B4, property, value); } + + static Void stop_stream() { return _i(0xA4718A1419D18151); } + static Void _0xD01005D2BA2EB778(Any* p0) { return _i(0xD01005D2BA2EB778, p0); } + static Void dynamic_mixer_related_fn(Entity p0, const char* p1, float p2) { return _i(0x153973AB99FE8980, p0, p1, p2); } + static Void add_line_to_conversation(int p0, const char* p1, const char* p2, int p3, int p4, bool p5, bool p6, bool p7, bool p8, int p9, bool p10, bool p11, bool p12) { return _i(0xC5EF963405593646, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } + static Void add_ped_to_conversation(Any p0, Any ped, const char* p2) { return _i(0x95D9F4BC443956E7, p0, ped, p2); } + static Any _0x3D120012440E6683() { return _i(0x3D120012440E6683); } + static Any audio_is_scripted_music_playing() { return _i(0x845FFC3A4FEEFA3E); } + static Void blip_siren(Vehicle vehicle) { return _i(0x1B9025BDA76822B6, vehicle); } + static Void _0xF154B8D1775B2DEC(bool p0) { return _i(0xF154B8D1775B2DEC, p0); } + static Void disable_police_reports() { return _i(0xB4F90FAF7670B16F); } + static bool cancel_music_event(const char* eventName) { return _i(0x5B17A90291133DA5, eventName); } + static bool is_vehicle_radio_loud(Vehicle vehicle) { return _i(0x032A116663A4D5AC, vehicle); } + static Void clear_all_broken_glass() { return _i(0xB32209EFFDC04913); } + static Void clear_ambient_zone_list_state(Any* p0, bool p1) { return _i(0x120C48C614909FA4, p0, p1); } + static Void clear_ambient_zone_state(const char* zoneName, bool p1) { return _i(0x218DD44AAAC964FF, zoneName, p1); } + static Void _0x1654F24A88A8E3FE(const char* radioStation) { return _i(0x1654F24A88A8E3FE, radioStation); } + static Void create_new_scripted_conversation() { return _i(0xD2C91A0B572AAE56); } + static Void _0xDDC635D5B3262C56(Any* p0) { return _i(0xDDC635D5B3262C56, p0); } + static Void disable_ped_pain_audio(Ped ped, bool toggle) { return _i(0xA9A41C1E940FB0E8, ped, toggle); } + static Void force_ambient_siren(bool value) { return _i(0x552369F549563AD5, value); } + static bool can_ped_speak(Ped ped, const char* speechName, bool unk) { return _i(0x49B99BF3FDA89A7A, ped, speechName, unk); } + static bool _0x109697E2FFBAC8A1() { return _i(0x109697E2FFBAC8A1); } + static Void _0xC15907D667F7CFB2(Vehicle vehicle, bool toggle) { return _i(0xC15907D667F7CFB2, vehicle, toggle); } + static Void _0xB81CF134AEB56FFB() { return _i(0xB81CF134AEB56FFB); } + static Void _0x2BE4BC731D039D5A(Any p0, bool p1) { return _i(0x2BE4BC731D039D5A, p0, p1); } + static Void _0x1C073274E065C6D2(Any p0, bool p1) { return _i(0x1C073274E065C6D2, p0, p1); } + static int find_radio_station_index(int station) { return _i(0x8D67489793FF428B, station); } + static Void _0x062D5EAD4DA2FA6A() { return _i(0x062D5EAD4DA2FA6A); } + static Void set_vehicle_audio(Vehicle vehicle, const char* audioName) { return _i(0x4F0C413926060B38, vehicle, audioName); } + static Void _0xD57AAAE0E2214D11() { return _i(0xD57AAAE0E2214D11); } + static Void freeze_radio_station(const char* radioStation) { return _i(0x344F393B027E38C3, radioStation); } + static Any _0x5E203DA2BA15D436(Any p0) { return _i(0x5E203DA2BA15D436, p0); } + static int get_audible_music_track_text_id() { return _i(0x50B196FC9ED6545B); } + static Any get_current_scripted_conversation_line() { return _i(0x480357EE890C295A); } + static Any _0xE73364DB90778FFA() { return _i(0xE73364DB90778FFA); } + static Any get_music_playtime() { return _i(0xE7A0D23DC414507B); } + static Any _0x3A48AB4445D499BE() { return _i(0x3A48AB4445D499BE); } + static int get_network_id_from_sound_id(int soundId) { return _i(0x2DE3F0A134FFBC0D, soundId); } + static int max_radio_station_index() { return _i(0xF1620ECB50E01DE7); } + static Any get_player_radio_station_genre() { return _i(0xA571991A7FE6CCEB); } + static int get_player_radio_station_index() { return _i(0xE8AF77C4C06ADC93); } + static const char* get_player_radio_station_name() { return _i(0xF6D733C32076AD03); } + static const char* get_radio_station_name(int radioStation) { return _i(0xB28ECA15046CA8B9, radioStation); } + static int get_sound_id() { return _i(0x430386FE9BF80B45); } + static int get_sound_id_from_network_id(int netId) { return _i(0x75262FD12D0A1C84, netId); } + static int get_stream_play_time() { return _i(0x4E72BBDBCA58A3DB); } + static Any _0xAA19F5572C38B564(Any* p0) { return _i(0xAA19F5572C38B564, p0); } + static uint32_t get_vehicle_default_horn(Vehicle vehicle) { return _i(0x02165D55000219AC, vehicle); } + static uint32_t get_vehicle_horn_hash(Vehicle vehicle) { return _i(0xACB5DCCA1EC76840, vehicle); } + static Any _0x544810ED9DB6BBE6() { return _i(0x544810ED9DB6BBE6); } + static Any _0x5B50ABB1FE3746F4() { return _i(0x5B50ABB1FE3746F4); } + static bool has_sound_finished(int soundId) { return _i(0xFCBDCE714A7C88E5, soundId); } + static Any _0x40763EA7B9B783E7(Any p0, Any p1, Any p2) { return _i(0x40763EA7B9B783E7, p0, p1, p2); } + static Any hint_ambient_audio_bank(Any p0, Any p1, Any p2) { return _i(0x8F8C0E370AE62F5C, p0, p1, p2); } + static Any hint_script_audio_bank(Any p0, Any p1, Any p2) { return _i(0xFB380A29641EC31A, p0, p1, p2); } + static Void set_synchronized_audio_event_position_this_frame(const char* p0, Entity p1) { return _i(0x950A154B8DAB6185, p0, p1); } + static Void _0xC8EDE9BDBCCBA6D4(Any* p0, float p1, float p2, float p3) { return _i(0xC8EDE9BDBCCBA6D4, p0, p1, p2, p3); } + static Void interrupt_conversation(Any p0, Any* p1, Any* p2) { return _i(0xA018A12E5C5C2FA6, p0, p1, p2); } + static Void _0x8A694D7A68F8DC38(Ped p0, const char* p1, const char* p2) { return _i(0x8A694D7A68F8DC38, p0, p1, p2); } + static bool is_alarm_playing(const char* alarmName) { return _i(0x226435CB96CCFC8C, alarmName); } + static bool is_ambient_speech_disabled(Ped ped) { return _i(0x932C2D096A2C3FFF, ped); } + static bool is_ambient_speech_playing(Ped p0) { return _i(0x9072C8B49907BFAD, p0); } + static bool is_ambient_zone_enabled(const char* ambientZone) { return _i(0x01E2817A479A7F9B, ambientZone); } + static bool _0xC265DF9FB44A9FBD(Any p0) { return _i(0xC265DF9FB44A9FBD, p0); } + static bool is_any_speech_playing(Ped ped) { return _i(0x729072355FA39EC9, ped); } + static bool is_audio_scene_active(const char* scene) { return _i(0xB65B60556E2A9225, scene); } + static bool is_game_in_control_of_music() { return _i(0x6D28DC1671E334FD); } + static bool is_horn_active(Vehicle vehicle) { return _i(0x9D6BFC12B05C6121, vehicle); } + static bool is_mission_complete_playing() { return _i(0x19A30C23F5827F8A); } + static Any _0x6F259F82D873B8B8() { return _i(0x6F259F82D873B8B8); } + static int get_number_of_passenger_voice_variations(Any p0) { return _i(0x66E49BF55B4B1874, p0); } + static Any _0xC8B1B2425604CDD0() { return _i(0xC8B1B2425604CDD0); } + static bool is_mobile_phone_call_ongoing() { return _i(0x7497D2CE2C30D24C); } + static bool is_mobile_phone_radio_active() { return _i(0xB35CE999E8EF317E); } + static Any _0xA097AB275061FB21() { return _i(0xA097AB275061FB21); } + static bool is_ped_in_current_conversation(Ped ped) { return _i(0x049E937F18F4020C, ped); } + static bool is_ped_ringtone_playing(Ped ped) { return _i(0x1E8E5E20937E3137, ped); } + static bool is_player_vehicle_radio_enabled() { return _i(0x5F43D83FD6738741); } + static Any _0x0626A247D2405330() { return _i(0x0626A247D2405330); } + static bool is_radio_retuning() { return _i(0xA151A7394A214E65); } + static bool is_scripted_conversation_loaded() { return _i(0xDF0D54BE7A776737); } + static bool is_scripted_conversation_ongoing() { return _i(0x16754C556D2EDE3D); } + static bool is_scripted_speech_playing(Any p0) { return _i(0xCC9AA18DCC7084F4, p0); } + static bool is_stream_playing() { return _i(0xD11FA52EB849D978); } + static bool _0x5DB8010EE71FDEF2(Vehicle vehicle) { return _i(0x5DB8010EE71FDEF2, vehicle); } + static Any _0x0BE4BE946463F917(Any p0) { return _i(0x0BE4BE946463F917, p0); } + static Void _0x651D3228960D08AF(Any p0, Any p1) { return _i(0x651D3228960D08AF, p0, p1); } + static bool load_stream(const char* streamName, const char* soundSet) { return _i(0x1F1F957154EC51DF, streamName, soundSet); } + static bool load_streawith_start_offset(const char* streamName, int startOffset, const char* soundSet) { return _i(0x59C16B79F53B3712, streamName, startOffset, soundSet); } + static Void _0x75773E11BA459E90(Any p0, bool p1) { return _i(0x75773E11BA459E90, p0, p1); } + static Void _0xD2CC78CD3D0B50F9(Any p0, bool p1) { return _i(0xD2CC78CD3D0B50F9, p0, p1); } + static Void override_trevor_rage(Any* p0) { return _i(0x13AD665062541A7E, p0); } + static Void override_underwater_stream(Any* p0, bool p1) { return _i(0xF2A9CDABCEA04BD6, p0, p1); } + static Void override_veh_horn(Vehicle vehicle, bool mute, int p2) { return _i(0x3CDC1E622CCE0356, vehicle, mute, p2); } + static Void pause_scripted_conversation(bool p0) { return _i(0x8530AD776CD72B12, p0); } + static Void play_ambient_speech_at_coords(const char* p0, const char* p1, float p2, float p3, float p4, const char* p5) { return _i(0xED640017ED337E45, p0, p1, p2, p3, p4, p5); } + static Void _0xEE066C7006C49C0A(Any p0, Any p1, Any* p2) { return _i(0xEE066C7006C49C0A, p0, p1, p2); } + static Void _0xCADA5A0D0702381E(const char* p0, const char* soundset) { return _i(0xCADA5A0D0702381E, p0, soundset); } + static Void play_end_credits_music(bool play) { return _i(0xCD536C4D33DCC900, play); } + static Void play_mission_complete_audio(const char* audioName) { return _i(0xB138AAB8A70D3C69, audioName); } + static Void play_pain(Ped ped, int painID, int p1, Any p3) { return _i(0xBC9AE166038A5CEC, ped, painID, p1, p3); } + static Void play_ambient_speech2(Ped ped, const char* speechName, const char* speechParam, Any p3) { return _i(0xC6941B4A3A8FBBB9, ped, speechName, speechParam, p3); } + static Void play_ambient_speech1(Ped ped, const char* speechName, const char* speechParam, Any p3) { return _i(0x8E04FEDD28D42462, ped, speechName, speechParam, p3); } + static Void play_ambient_speech_with_voice(Ped p0, const char* speechName, const char* voiceName, const char* speechParam, bool p4) { return _i(0x3523634255FC3318, p0, speechName, voiceName, speechParam, p4); } + static Void play_ped_ringtone(const char* ringtoneName, Ped ped, bool p2) { return _i(0xF9E56683CA8E11A5, ringtoneName, ped, p2); } + static Any play_police_report(const char* name, float p1) { return _i(0xDFEBD56D9BD1EB16, name, p1); } + static Void play_sound(Player soundId, const char* audioName, const char* audioRef, bool p3, Any p4, bool p5) { return _i(0x7FF4944CC209192D, soundId, audioName, audioRef, p3, p4, p5); } + static Void play_sound_from_coord(int soundId, const char* audioName, float x, float y, float z, const char* audioRef, bool p6, int range, bool p8) { return _i(0x8D8686B622B88120, soundId, audioName, x, y, z, audioRef, p6, range, p8); } + static Void play_sound_from_entity(int soundId, const char* audioName, Entity entity, const char* audioRef, bool p4, Any p5) { return _i(0xE65F427EB70AB1ED, soundId, audioName, entity, audioRef, p4, p5); } + static Void _0x5B9853296731E88D(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0x5B9853296731E88D, p0, p1, p2, p3, p4, p5); } + static Void play_sound_frontend(int soundId, const char* audioName, const char* audioRef, bool p3) { return _i(0x67C540AA08E4A6F5, soundId, audioName, audioRef, p3); } + static Void play_stream_from_object(Object object) { return _i(0xEBAA9B64D76356FD, object); } + static Void play_stream_from_ped(Ped ped) { return _i(0x89049DD63C08B5D1, ped); } + static Void play_stream_from_position(float x, float y, float z) { return _i(0x21442F412E8DE56B, x, y, z); } + static Void play_stream_from_vehicle(Vehicle vehicle) { return _i(0xB70374A758007DFA, vehicle); } + static Void play_stream_frontend() { return _i(0x58FCE43488F9F5F4); } + static bool play_synchronized_audio_event(Any p0) { return _i(0x8B2FD4560E55DD2D, p0); } + static Void play_vehicle_door_close_sound(Vehicle vehicle, int p1) { return _i(0x62A456AA4769EF34, vehicle, p1); } + static Void play_vehicle_door_open_sound(Vehicle vehicle, int p1) { return _i(0x3A539D52857EA82D, vehicle, p1); } + static Void preload_script_conversation(bool p0, bool p1, bool p2, bool p3) { return _i(0x3B3CAD6166916D87, p0, p1, p2, p3); } + static Void preload_script_phone_conversation(bool p0, bool p1) { return _i(0x6004BCB0E226AAEA, p0, p1); } + static Void _0xCA4CEA6AE0000A7E(Any p0) { return _i(0xCA4CEA6AE0000A7E, p0); } + static bool prepare_alarm(const char* alarmName) { return _i(0x9D74AE343DB65533, alarmName); } + static bool prepare_music_event(const char* eventName) { return _i(0x1E5185B72EF5158A, eventName); } + static Any prepare_synchronized_audio_event(const char* p0, Any p1) { return _i(0xC7ABCACA4985A766, p0, p1); } + static bool prepare_synchronized_audio_event_for_scene(Any p0, Any* p1) { return _i(0x029FE7CD1B7E2E75, p0, p1); } + static Void _0xFBE20329593DEC9D(Any p0, Any p1, Any p2, Any p3) { return _i(0xFBE20329593DEC9D, p0, p1, p2, p3); } + static Void _0x5D2BFAAB8D956E0E() { return _i(0x5D2BFAAB8D956E0E); } + static Void release_mission_audio_bank() { return _i(0x0EC92A1BF0857187); } + static Void release_ambient_audio_bank() { return _i(0x65475A218FFAA93D); } + static Void release_script_audio_bank() { return _i(0x7A2D8AD0A9EB9C3F); } + static Void _0x19AF7ED9B9D23058() { return _i(0x19AF7ED9B9D23058); } + static Void _0x9AC92EED5E4793AB() { return _i(0x9AC92EED5E4793AB); } + static Void release_sound_id(int soundId) { return _i(0x353FC880830B88FA, soundId); } + static Void _0xCE4AC0439F607045() { return _i(0xCE4AC0439F607045); } + static Void _0x18EB48CFC41F2EA0(Any p0, float p1) { return _i(0x18EB48CFC41F2EA0, p0, p1); } + static Void _0xB4BBFD9CD8B3922B(const char* p0) { return _i(0xB4BBFD9CD8B3922B, p0); } + static bool request_mission_audio_bank(const char* p0, bool p1, Any p2) { return _i(0x7345BDD95E62E0F2, p0, p1, p2); } + static bool request_ambient_audio_bank(const char* p0, bool p1, Any p2) { return _i(0xFE02FFBED8CA9D99, p0, p1, p2); } + static bool request_script_audio_bank(const char* p0, bool p1, Any p2) { return _i(0x2F844A8B08D76685, p0, p1, p2); } + static Void set_ped_talk(Ped ped) { return _i(0x4ADA3F19BE4A6047, ped); } + static Void reset_ped_audio_flags(Any p0) { return _i(0xF54BB7B61036F335, p0); } + static Void reset_trevor_rage() { return _i(0xE78503B10C4314E0); } + static Void _0xD2DCCD8E16E20997(Any p0) { return _i(0xD2DCCD8E16E20997, p0); } + static Void _0x70B8EC8FC108A634(bool p0, Any p1) { return _i(0x70B8EC8FC108A634, p0, p1); } + static Void set_aggressive_horns(bool toggle) { return _i(0x395BF71085D1B1D9, toggle); } + static Void set_ambient_voice_name(Ped ped, const char* name) { return _i(0x6C8065A3B780185B, ped, name); } + static Void _0x9A53DED9921DE990(Any p0, Any p1) { return _i(0x9A53DED9921DE990, p0, p1); } + static Void set_ambient_zone_list_state(Any* p0, bool p1, bool p2) { return _i(0x9748FA4DE50CCE3E, p0, p1, p2); } + static Void set_ambient_zone_list_state_persistent(const char* ambientZone, bool p1, bool p2) { return _i(0xF3638DAE8C4045E1, ambientZone, p1, p2); } + static Void set_ambient_zone_state(Any* p0, bool p1, bool p2) { return _i(0xBDA07E5950085E46, p0, p1, p2); } + static Void set_ambient_zone_state_persistent(const char* ambientZone, bool p1, bool p2) { return _i(0x1D6650420CEC9D3B, ambientZone, p1, p2); } + static Void set_animal_mood(Ped animal, int mood) { return _i(0xCC97B29285B1DC3B, animal, mood); } + static Void set_audio_flag(const char* flagName, bool toggle) { return _i(0xB9EFD5C25018725A, flagName, toggle); } + static Void set_audio_scene_variable(const char* scene, const char* variable, float value) { return _i(0xEF21A9EF089A2668, scene, variable, value); } + static Void _0xA5F377B175A699C5(Any p0) { return _i(0xA5F377B175A699C5, p0); } + static Void _0x12561FCBB62D5B9C(int p0) { return _i(0x12561FCBB62D5B9C, p0); } + static Void set_audio_vehicle_priority(Vehicle vehicle, Any p1) { return _i(0xE5564483E407F914, vehicle, p1); } + static Void _0x0B568201DD99F0EB(bool p0) { return _i(0x0B568201DD99F0EB, p0); } + static Void _0x61631F5DF50D1C34(bool p0) { return _i(0x61631F5DF50D1C34, p0); } + static Void _0x4E404A9361F75BB2(const char* radioStation, const char* p1, bool p2) { return _i(0x4E404A9361F75BB2, radioStation, p1, p2); } + static Void set_cutscene_audio_override(const char* p0) { return _i(0x3B4BF5F0859204D9, p0); } + static Void set_emitter_radio_station(const char* emitterName, const char* radioStation) { return _i(0xACF57305B12AF907, emitterName, radioStation); } + static Void _0x892B6AB8F33606F5(Any p0, Any p1) { return _i(0x892B6AB8F33606F5, p0, p1); } + static Void set_frontend_radio_active(bool active) { return _i(0xF7F26C6E9CC9EBB8, active); } + static Void _0x159B7318403A1CD8(Any p0) { return _i(0x159B7318403A1CD8, p0); } + static Void set_gps_active(bool active) { return _i(0x3BD3F52BA9B1E4E8, active); } + static Void set_horn_enabled(Vehicle vehicle, bool toggle) { return _i(0x76D683C108594D0E, vehicle, toggle); } + static Void sound_vehicle_horn_this_frame(Vehicle vehicle) { return _i(0x9C11908013EA4715, vehicle); } + static Void _0x9D3AF56E94C9AE98(Any p0, float p1) { return _i(0x9D3AF56E94C9AE98, p0, p1); } + static Void set_initial_player_station(const char* radioStation) { return _i(0x88795F13FACDA88D, radioStation); } + static Void set_microphone_position(bool p0, float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3) { return _i(0xB6AE90EDDE95C762, p0, x1, y1, z1, x2, y2, z2, x3, y3, z3); } + static Void set_mobile_phone_radio_state(bool state) { return _i(0xBF286C554784F3DF, state); } + static Void set_mobile_radio_enabled_during_gameplay(bool Toggle) { return _i(0x1098355A16064BB3, Toggle); } + static Void _0xB542DE8C3D1CB210(bool p0) { return _i(0xB542DE8C3D1CB210, p0); } + static Void _0xA5342D390CDA41D6(Any p0, bool p1) { return _i(0xA5342D390CDA41D6, p0, p1); } + static Void _0x8BF907833BE275DE(float p0, float p1) { return _i(0x8BF907833BE275DE, p0, p1); } + static Void set_ped_is_drunk(Ped ped, bool toggle) { return _i(0x95D2D383D5396B8A, ped, toggle); } + static Void _0x1B7ABE26CBCBF8C7(Any p0, Any p1, Any p2) { return _i(0x1B7ABE26CBCBF8C7, p0, p1, p2); } + static Void set_ped_scream(Ped ped) { return _i(0x40CF0D12D142A9E8, ped); } + static Void _0x7CDC8C3B89F661B3(Ped playerPed, uint32_t p1) { return _i(0x7CDC8C3B89F661B3, playerPed, p1); } + static Void _0x149AEE66F0CB3A99(float p0, float p1) { return _i(0x149AEE66F0CB3A99, p0, p1); } + static Void set_player_angry(Ped playerPed, bool disabled) { return _i(0xEA241BB04110F091, playerPed, disabled); } + static Void _0x6FDDAD856E36988A(Any p0, bool p1) { return _i(0x6FDDAD856E36988A, p0, p1); } + static Void _0x044DBAD7A7FA2BE5(const char* p0, const char* p1) { return _i(0x044DBAD7A7FA2BE5, p0, p1); } + static Void _0xDA07819E452FFE8F(Any p0) { return _i(0xDA07819E452FFE8F, p0); } + static Void _0x33E3C6C6F2F0B506(Any p0, float p1, float p2, float p3) { return _i(0x33E3C6C6F2F0B506, p0, p1, p2, p3); } + static Void set_radio_auto_unfreeze(bool toggle) { return _i(0xC1AA9F53CE982990, toggle); } + static Void _0x2C96CDB04FCA358E(float p0) { return _i(0x2C96CDB04FCA358E, p0); } + static Void _0xDD6BCF9E94425DF9() { return _i(0xDD6BCF9E94425DF9); } + static Void _0xFF266D1D0EB1195D() { return _i(0xFF266D1D0EB1195D); } + static Void _0x774BD811F656A122(const char* radioStation, bool p1) { return _i(0x774BD811F656A122, radioStation, p1); } + static Void set_radio_to_station_index(int radioStation) { return _i(0xA619B168B8A8570F, radioStation); } + static Void set_radio_to_station_name(const char* stationName) { return _i(0xC69EDA28699D5107, stationName); } + static Void set_radio_track(const char* radioStation, const char* radioTrack) { return _i(0xB39786F201FEE30B, radioStation, radioTrack); } + static Void _0x06C0023BED16DD6B(Any p0, bool p1) { return _i(0x06C0023BED16DD6B, p0, p1); } + static Void _0x43FA0DFC5DF87815(Vehicle vehicle, bool p1) { return _i(0x43FA0DFC5DF87815, vehicle, p1); } + static Void set_siren_with_no_driver(Vehicle vehicle, bool toggle) { return _i(0x1FEF0683B96EBCF2, vehicle, toggle); } + static Void _0xBEF34B1D9624D5DD(bool p0) { return _i(0xBEF34B1D9624D5DD, p0); } + static Void set_static_emitter_enabled(const char* emitterName, bool toggle) { return _i(0x399D2D3B33F1B8EB, emitterName, toggle); } + static Void set_user_radio_control_enabled(bool toggle) { return _i(0x19F21E63AE6EAE4E, toggle); } + static Void set_variable_on_sound(int soundId, Any* p1, float p2) { return _i(0xAD6B3148A78AE9B6, soundId, p1, p2); } + static Void set_variable_on_stream(const char* p0, float p1) { return _i(0x2F9D3834AEB9EF79, p0, p1); } + static Void get_player_headset_sound_alternate(const char* p0, float p1) { return _i(0xBCC29F935ED07688, p0, p1); } + static Void _0x733ADF241531E5C2(const char* name, float p1) { return _i(0x733ADF241531E5C2, name, p1); } + static Void _0x01BB4D577D38BD9E(Any p0, float p1) { return _i(0x01BB4D577D38BD9E, p0, p1); } + static Void _0x59E7B488451F4D3A(Any p0, float p1) { return _i(0x59E7B488451F4D3A, p0, p1); } + static Void set_vehicle_boost_active(Vehicle vehicle, bool Toggle) { return _i(0x4A04DE7CAB2739A1, vehicle, Toggle); } + static Void _0x58BB377BEC7CD5F4(bool p0, bool p1) { return _i(0x58BB377BEC7CD5F4, p0, p1); } + static Void _0xF3365489E0DD50F9(Any p0, bool p1) { return _i(0xF3365489E0DD50F9, p0, p1); } + static Void set_vehicle_radio_enabled(Vehicle vehicle, bool toggle) { return _i(0x3B988190C0AA6C0B, vehicle, toggle); } + static Void set_vehicle_radio_loud(Vehicle vehicle, bool toggle) { return _i(0xBB6F1CAEC68B0BCE, vehicle, toggle); } + static Void _0xF1F8157B8C3F171C(Any p0, const char* p1, const char* p2) { return _i(0xF1F8157B8C3F171C, p0, p1, p2); } + static Void _0xC1805D05E6D4FE10(Vehicle vehicle) { return _i(0xC1805D05E6D4FE10, vehicle); } + static Void set_vehicle_radio_station(Vehicle vehicle, const char* radioStation) { return _i(0x1B9C0099CB942AC6, vehicle, radioStation); } + static Void skip_radio_forward() { return _i(0x6DDBBDD98E2E9C25); } + static Void skip_to_next_scripted_conversation_line() { return _i(0x9663FE6B7A61EB00); } + static Void start_alarm(const char* alarmName, bool p2) { return _i(0x0355EF116C4C97B2, alarmName, p2); } + static bool start_audio_scene(const char* scene) { return _i(0x013A80FC08F6E4F2, scene); } + static Void start_preloaded_conversation() { return _i(0x23641AFE870AF385); } + static Void restart_scripted_conversation() { return _i(0x9AEB285D1818C9AC); } + static Void start_script_conversation(bool p0, bool p1, bool p2, bool p3) { return _i(0x6B17C62C9635D2DC, p0, p1, p2, p3); } + static Void start_script_phone_conversation(bool p0, bool p1) { return _i(0x252E5F915EABB675, p0, p1); } + static Void stop_alarm(const char* alarmName, bool toggle) { return _i(0xA1CADDCD98415A41, alarmName, toggle); } + static Void stop_all_alarms(bool stop) { return _i(0x2F794A877ADD4C92, stop); } + static Void stop_audio_scene(const char* scene) { return _i(0xDFE8422B3B94E688, scene); } + static Void stop_audio_scenes() { return _i(0xBAC7FC81A75EC1A1); } + static Void stop_current_playing_ambient_speech(Ped ped) { return _i(0xB8BEC0CA6F0EDB0F, ped); } + static Void set_ped_mute(Ped ped) { return _i(0x7A73D05A607734C7, ped); } + static Void _0x806058BBDC136E06() { return _i(0x806058BBDC136E06); } + static Void stop_ped_ringtone(Ped ped) { return _i(0x6C5AE23EFA885092, ped); } + static Void stop_ped_speaking(Ped ped, bool shaking) { return _i(0x9D64D7405520E3D3, ped, shaking); } + static Any stop_scripted_conversation(bool p0) { return _i(0xD79DEEFB53455EBA, p0); } + static Void _0xE4E6DD5566D28C82() { return _i(0xE4E6DD5566D28C82); } + static Void stop_sound(int soundId) { return _i(0xA3B0C41BA5CC0BB5, soundId); } + static bool stop_synchronized_audio_event(Any p0) { return _i(0x92D6A88E64A94430, p0); } + static bool trigger_music_event(const char* eventName) { return _i(0x706D57B0F50DA710, eventName); } + static Void unfreeze_radio_station(const char* radioStation) { return _i(0xFC00454CF60B91DD, radioStation); } + static Void release_named_script_audio_bank(const char* audioBank) { return _i(0x77ED170667F50170, audioBank); } + static Void _0x11579D940949C49E(Any p0) { return _i(0x11579D940949C49E, p0); } + static Void unlock_mission_news_story(int newsStory) { return _i(0xB165AB7C248B2DC1, newsStory); } + static Void _0x031ACB6ABA18C729(const char* radioStation, const char* p1) { return _i(0x031ACB6ABA18C729, radioStation, p1); } + static Void _0x0150B6FF25A9E2E5() { return _i(0x0150B6FF25A9E2E5); } + static Void _0x7EC3C679D0E7E46B(Any p0, Any p1, Any p2, Any p3) { return _i(0x7EC3C679D0E7E46B, p0, p1, p2, p3); } + static Void _0xBF4DC1784BE94DFA(Any p0, bool p1, Any p2) { return _i(0xBF4DC1784BE94DFA, p0, p1, p2); } + static Void use_siren_as_horn(Vehicle vehicle, bool toggle) { return _i(0xFA932DE350266EF8, vehicle, toggle); } + static Void register_script_with_audio(Any p0) { return _i(0xC6ED9D5092438D91, p0); } + static Void unregister_script_with_audio() { return _i(0xA8638BE228D4751A); } + static Void _0x02E93C796ABD3A97(bool p0) { return _i(0x02E93C796ABD3A97, p0); } + + static Void reset_exclusive_scenario_group() { return _i(0x4202BBCB8684563D); } + static bool is_ped_being_arrested(Ped ped) { return _i(0x90A09F3A45FED688, ped); } + static Void add_cover_blocking_area(float playerX, float playerY, float playerZ, float radiusX, float radiusY, float radiusZ, bool p6, bool p7, bool p8, bool p9) { return _i(0x45C597097DD7CB81, playerX, playerY, playerZ, radiusX, radiusY, radiusZ, p6, p7, p8, p9); } + static ScrHandle add_cover_point(float p0, float p1, float p2, float p3, Any p4, Any p5, Any p6, bool p7) { return _i(0xD5C12A75C7B9497F, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void add_patrol_route_link(Any p0, Any p1) { return _i(0x23083260DEC3A551, p0, p1); } + static Void add_patrol_route_node(int p0, const char* p1, float x1, float y1, float z1, float x2, float y2, float z2, int p8) { return _i(0x8EDF950167586B7C, p0, p1, x1, y1, z1, x2, y2, z2, p8); } + static Void add_vehicle_subtask_attack_coord(Ped ped, float x, float y, float z) { return _i(0x5CF0D8F9BBA0DD75, ped, x, y, z); } + static Void add_vehicle_subtask_attack_ped(Ped ped, Ped ped2) { return _i(0x85F462BADC7DA47F, ped, ped2); } + static bool assisted_movement_is_route_loaded(const char* route) { return _i(0x60F9A4393A21F741, route); } + static Void assisted_movement_override_load_distance_this_frame(float dist) { return _i(0x13945951E16EF912, dist); } + static Void assisted_movement_remove_route(const char* route) { return _i(0x3548536485DD792B, route); } + static Void assisted_movement_request_route(const char* route) { return _i(0x817268968605947A, route); } + static Void assisted_movement_set_route_properties(const char* route, int props) { return _i(0xD5002D78B7162E1B, route, props); } + static Void clear_driveby_task_underneath_driving_task(Ped ped) { return _i(0xC35B5CDB2824CF69, ped); } + static Void clear_ped_secondary_task(Ped ped) { return _i(0x176CECF6F920D707, ped); } + static Void clear_ped_tasks(Ped ped) { return _i(0xE1EF3C1216AFF2CD, ped); } + static Void clear_ped_tasks_immediately(Ped ped) { return _i(0xAAA34F8A7CB32098, ped); } + static Void clear_sequence_task(Object* taskSequence) { return _i(0x3841422E9C488D8C, taskSequence); } + static Void close_patrol_route() { return _i(0xB043ECA801B8CBC1); } + static Void close_sequence_task(Object taskSequence) { return _i(0x39E72BC99E6360CB, taskSequence); } + static bool control_mounted_weapon(Ped ped) { return _i(0xDCFE42068FE0135A, ped); } + static Void create_patrol_route() { return _i(0xAF8A443CCC8018DC); } + static Void delete_patrol_route(const char* patrolRoute) { return _i(0x7767DD9D65E91319, patrolRoute); } + static bool does_scenario_exist_in_area(float x, float y, float z, float radius, bool b) { return _i(0x5A59271FFADD33C1, x, y, z, radius, b); } + static bool does_scenario_group_exist(const char* scenarioGroup) { return _i(0xF9034C136C9E00D3, scenarioGroup); } + static bool does_scenario_of_type_exist_in_area(float p0, float p1, float p2, Any* p3, float p4, bool p5) { return _i(0x0A9D0C2A3BBC86C1, p0, p1, p2, p3, p4, p5); } + static bool does_scripted_cover_point_exist_at_coords(float x, float y, float z) { return _i(0xA98B8E3C088E5A31, x, y, z); } + static int get_active_vehicle_mission_type(Vehicle veh) { return _i(0x534AEBA6E5ED4CAB, veh); } + static const char* get_clip_set_for_scripted_gun_task(int p0) { return _i(0x3A8CADC7D37AACC5, p0); } + static bool get_is_task_active(Ped ped, int taskNumber) { return _i(0xB0760331C7AA4155, ped, taskNumber); } + static bool get_is_waypoint_recording_loaded(const char* name) { return _i(0xCB4E8BE8A0063C5D, name); } + static Any get_navmesh_route_distance_remaining(Ped ped, Any* p1, Any* p2) { return _i(0xC6F5C0BCDC74D62D, ped, p1, p2); } + static int get_navmesh_route_result(Ped ped) { return _i(0x632E831F382A0FA8, ped); } + static float get_ped_desired_move_blend_ratio(Ped ped) { return _i(0x8517D4A6CA8513ED, ped); } + static float get_ped_waypoint_distance(Any p0) { return _i(0xE6A877C64CAF1BC5, p0); } + static Any get_ped_waypoint_progress(Any p0) { return _i(0x2720AAA75001E094, p0); } + static float get_phone_gesture_anim_current_time(Ped ped) { return _i(0x47619ABE8B268C60, ped); } + static float get_phone_gesture_anim_total_time(Ped ped) { return _i(0x1EE0F68A7C25DEC6, ped); } + static math::vector3 get_scripted_cover_point_coords(ScrHandle coverpoint) { return _i>(0x594A1028FC2A3E85, coverpoint); } + static int get_script_task_status(Ped targetPed, uint32_t taskHash) { return _i(0x77F1BEB8863288D5, targetPed, taskHash); } + static int get_sequence_progress(Ped ped) { return _i(0x00A9010CFE1E3533, ped); } + static bool _0xB4F47213DF45A64C(Any p0, Any* p1) { return _i(0xB4F47213DF45A64C, p0, p1); } + static bool _0xA7FFBA498E4AAF67(Any p0, const char* p1) { return _i(0xA7FFBA498E4AAF67, p0, p1); } + static const char* _0x717E4D1F2048376D(Ped ped) { return _i(0x717E4D1F2048376D, ped); } + static Any get_vehicle_waypoint_progress(Any p0) { return _i(0x9824CFF8FC66E159, p0); } + static Any get_vehicle_waypoint_target_point(Any p0) { return _i(0x416B62AC8B9E5BBD, p0); } + static float get_waypoint_distance_along_route(const char* p0, int p1) { return _i(0xA5B769058763E497, p0, p1); } + static bool _0x3E38E28A1D80DDF6(Ped ped) { return _i(0x3E38E28A1D80DDF6, ped); } + static bool is_driveby_task_underneath_driving_task(Ped ped) { return _i(0x8785E6E40C7A8818, ped); } + static bool is_mounted_weapon_task_underneath_driving_task(Ped ped) { return _i(0xA320EF046186FA3B, ped); } + static bool is_move_blend_ratio_running(Ped ped) { return _i(0xD4D8636C0199A939, ped); } + static bool is_move_blend_ratio_sprinting(Ped ped) { return _i(0x24A2AD74FA9814E2, ped); } + static bool is_move_blend_ratio_still(Ped ped) { return _i(0x349CE7B56DAFD95C, ped); } + static bool is_move_blend_ratio_walking(Ped ped) { return _i(0xF133BBBE91E1691F, ped); } + static bool is_ped_active_in_scenario(Ped ped) { return _i(0xAA135F9482C82CC3, ped); } + static bool is_ped_cuffed(Ped ped) { return _i(0x74E559B3BC910685, ped); } + static bool is_ped_getting_up(Ped ped) { return _i(0x2A74E1D5F2F00EEC, ped); } + static bool is_ped_in_writhe(Ped ped) { return _i(0xDEB6D52126E7D640, ped); } + static bool _0x621C6E4729388E41(Ped ped) { return _i(0x621C6E4729388E41, ped); } + static bool is_ped_running(Ped ped) { return _i(0xC5286FFC176F28A2, ped); } + static bool is_ped_running_arrest_task(Ped ped) { return _i(0x3DC52677769B4AE0, ped); } + static bool is_ped_sprinting(Ped ped) { return _i(0x57E457CD2C0FC168, ped); } + static bool is_ped_still(Ped ped) { return _i(0xAC29253EEF8F0180, ped); } + static bool is_ped_strafing(Ped ped) { return _i(0xE45B7F222DE47E09, ped); } + static bool is_ped_walking(Ped ped) { return _i(0xDE4C184B2B9B071A, ped); } + static bool is_playing_phone_gesture_anim(Ped ped) { return _i(0xB8EBB1E9D3588C10, ped); } + static bool is_scenario_group_enabled(const char* scenarioGroup) { return _i(0x367A09DED4E05B99, scenarioGroup); } + static bool is_scenario_occupied(float p0, float p1, float p2, float p3, bool p4) { return _i(0x788756D73AC2E07C, p0, p1, p2, p3, p4); } + static bool is_scenario_type_enabled(const char* scenarioType) { return _i(0x3A815DB3EA088722, scenarioType); } + static bool _0x921CE12C489C4C41(int PlayerID) { return _i(0x921CE12C489C4C41, PlayerID); } + static bool _0x30ED88D5E0C56A37(Any p0) { return _i(0x30ED88D5E0C56A37, p0); } + static bool is_waypoint_playback_going_on_for_ped(Any p0) { return _i(0xE03B3F2D3DC59B64, p0); } + static bool is_waypoint_playback_going_on_for_vehicle(Any p0) { return _i(0xF5134943EA29868C, p0); } + static Void open_patrol_route(const char* patrolRoute) { return _i(0xA36BFB5EE89F3D82, patrolRoute); } + static Void open_sequence_task(Object* taskSequence) { return _i(0xE8854A4326B9E12B, taskSequence); } + static bool ped_has_use_scenario_task(Ped ped) { return _i(0x295E3CCEC879CCD7, ped); } + static Void play_anim_on_running_scenario(Ped ped, const char* animDict, const char* animName) { return _i(0x748040460F8DF5DC, ped, animDict, animName); } + static Void play_entity_scripted_anim(Any p0, Any* p1, Any* p2, Any* p3, float p4, float p5) { return _i(0x77A1EEC547E7FCF1, p0, p1, p2, p3, p4, p5); } + static Void remove_all_cover_blocking_areas() { return _i(0xDB6708C0B46F56D8); } + static Void remove_cover_point(ScrHandle coverpoint) { return _i(0xAE287C923D891715, coverpoint); } + static Void _0x1F351CF1C6475734(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9) { return _i(0x1F351CF1C6475734, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void remove_waypoint_recording(const char* name) { return _i(0xFF1B8B4AA1C25DC8, name); } + static Any _0xD01015C7316AE176(Ped ped, const char* p1) { return _i(0xD01015C7316AE176, ped, p1); } + static Void request_waypoint_recording(const char* name) { return _i(0x9EEFB62EB27B5792, name); } + static Void reset_scenario_groups_enabled() { return _i(0xDD902D0349AFAD3A); } + static Void reset_scenario_types_enabled() { return _i(0x0D40EE2A7F2B2D6D); } + static Void set_anim_looped(Any p0, bool p1, Any p2, bool p3) { return _i(0x70033C3CC29A1FF4, p0, p1, p2, p3); } + static Void set_anim_rate(Ped p0, float p1, float p2, float p3) { return _i(0x032D49C5E359C847, p0, p1, p2, p3); } + static Void set_aniweight(Any p0, float p1, Any p2, Any p3, bool p4) { return _i(0x207F1A47C0342F48, p0, p1, p2, p3, p4); } + static Void set_driveby_task_target(Ped shootingPed, Ped targetPed, Vehicle targetVehicle, float x, float y, float z) { return _i(0xE5B302114D8162EE, shootingPed, targetPed, targetVehicle, x, y, z); } + static Void set_drive_task_cruise_speed(Ped driver, float cruiseSpeed) { return _i(0x5C9B84BD7D31D908, driver, cruiseSpeed); } + static Void set_drive_task_driving_style(Ped ped, int drivingStyle) { return _i(0xDACE1BE37D88AF67, ped, drivingStyle); } + static Void set_drive_task_max_cruise_speed(Any p0, float p1) { return _i(0x404A5AA9B9F0B746, p0, p1); } + static Void set_exclusive_scenario_group(const char* scenarioGroup) { return _i(0x535E97E1F7FC0C6A, scenarioGroup); } + static Any _0xAB13A5565480B6D9(Any p0, Any p1) { return _i(0xAB13A5565480B6D9, p0, p1); } + static Void set_global_min_bird_flight_height(float height) { return _i(0x6C6B148586F934F7, height); } + static Void set_high_fall_task(Ped ped, Any p1, Any p2, Any p3) { return _i(0x8C825BDC7741D37C, ped, p1, p2, p3); } + static Void set_mounted_weapon_target(Ped shootingPed, Ped targetPed, Vehicle targetVehicle, float x, float y, float z, Any p6) { return _i(0xCCD892192C6D2BB9, shootingPed, targetPed, targetVehicle, x, y, z, p6); } + static Void set_parachute_task_target(Ped ped, float x, float y, float z) { return _i(0xC313379AF0FCEDA7, ped, x, y, z); } + static Void set_parachute_task_thrust(Ped ped, float thrust) { return _i(0x0729BAC1B8C64317, ped, thrust); } + static Void _0x8FD89A6240813FD0(Ped ped, bool p1, bool p2) { return _i(0x8FD89A6240813FD0, ped, p1, p2); } + static Void set_ped_desired_move_blend_ratio(Ped ped, float p1) { return _i(0x1E982AC8716912C5, ped, p1); } + static Void set_ped_path_avoid_fire(Ped ped, bool avoidFire) { return _i(0x4455517B28441E60, ped, avoidFire); } + static Void set_ped_path_can_drop_from_height(Ped ped, bool Toggle) { return _i(0xE361C5C71C431A4F, ped, Toggle); } + static Void set_ped_path_can_use_climbovers(Ped ped, bool Toggle) { return _i(0x8E06A6FE76C9EFF4, ped, Toggle); } + static Void set_ped_path_can_use_ladders(Ped ped, bool Toggle) { return _i(0x77A5B103C87F476E, ped, Toggle); } + static Void _0x88E32DB8C1A4AA4B(Ped ped, float p1) { return _i(0x88E32DB8C1A4AA4B, ped, p1); } + static Void set_ped_path_may_enter_water(Ped ped, bool mayEnterWater) { return _i(0xF35425A4204367EC, ped, mayEnterWater); } + static Void set_ped_path_prefer_to_avoid_water(Ped ped, bool avoidWater) { return _i(0x38FE1EC73743793C, ped, avoidWater); } + static Any set_ped_waypoint_route_offset(Any p0, Any p1, Any p2, Any p3) { return _i(0xED98E10B0AFCE4B4, p0, p1, p2, p3); } + static Void set_scenario_group_enabled(const char* scenarioGroup, bool p1) { return _i(0x02C8E5B49848664E, scenarioGroup, p1); } + static Void set_scenario_type_enabled(const char* scenarioType, bool toggle) { return _i(0xEB47EC4E34FB7EE1, scenarioType, toggle); } + static Void set_sequence_to_repeat(Object taskSequence, bool repeat) { return _i(0x58C70CF3A41E4AE7, taskSequence, repeat); } + static Void _0xB0A6CFD2C69C1088(Ped p0, Any* p1, bool p2) { return _i(0xB0A6CFD2C69C1088, p0, p1, p2); } + static Void _0xD5BB4025AE449A4E(Ped p0, const char* p1, float p2) { return _i(0xD5BB4025AE449A4E, p0, p1, p2); } + static Void set_task_vehicle_chase_behavior_flag(Ped ped, int flag, bool set) { return _i(0xCC665AAC360D31E7, ped, flag, set); } + static Void set_task_vehicle_chase_ideal_pursuit_distance(Ped ped, float distance) { return _i(0x639B642FACBE4EDD, ped, distance); } + static Void stop_anim_playback(Ped ped, Any p1, bool p2) { return _i(0xEE08C992D238C5D1, ped, p1, p2); } + static Void stop_anim_task(Ped ped, const char* animDictionary, const char* animationName, float p3) { return _i(0x97FF36A1D40EA00A, ped, animDictionary, animationName, p3); } + static Void task_achieve_heading(Ped ped, float heading, int timeout) { return _i(0x93B93A37987F1F3D, ped, heading, timeout); } + static Void _0x19D1B791CB3670FE(Any p0, Any p1) { return _i(0x19D1B791CB3670FE, p0, p1); } + static Void task_aim_gun_at_coord(Ped ped, float x, float y, float z, int time, bool p5, bool p6) { return _i(0x6671F3EEC681BDA1, ped, x, y, z, time, p5, p6); } + static Void task_aim_gun_at_entity(Ped ped, Entity entity, int duration, bool p3) { return _i(0x9B53BB6E8943AF53, ped, entity, duration, p3); } + static Void task_aim_gun_scripted(Ped ped, uint32_t scriptTask, bool p2, bool p3) { return _i(0x7A192BE16D373D00, ped, scriptTask, p2, p3); } + static Void task_aim_gun_scripted_with_target(Any p0, Any p1, float p2, float p3, float p4, Any p5, bool p6, bool p7) { return _i(0x8605AF0DE8B3A5AC, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void task_arrest_ped(Ped ped, Ped target) { return _i(0xF3B9A78A178572B1, ped, target); } + static Void task_boat_mission(Ped pedDriver, Vehicle boat, Any p2, Any p3, float x, float y, float z, Any p7, float maxSpeed, int drivingStyle, float p10, Any p11) { return _i(0x15C86013127CE63F, pedDriver, boat, p2, p3, x, y, z, p7, maxSpeed, drivingStyle, p10, p11); } + static Void task_chat_to_ped(Ped ped, Ped target, Any p2, float p3, float p4, float p5, float p6, float p7) { return _i(0x8C338E0263E4FD19, ped, target, p2, p3, p4, p5, p6, p7); } + static Void task_clear_defensive_area(Any p0) { return _i(0x95A6C46A31D1917D, p0); } + static Void task_clear_look_at(Ped ped) { return _i(0x0F804F1DB19B9689, ped); } + static Void task_climb(Ped ped, bool unused) { return _i(0x89D9FCC2435112F1, ped, unused); } + static Void task_climb_ladder(Ped ped, int p1) { return _i(0xB6C987F9285A3814, ped, p1); } + static Void task_combat_hated_targets_around_ped(Ped ped, float radius, int p2) { return _i(0x7BF835BB9E2698C8, ped, radius, p2); } + static Void task_combat_hated_targets_around_ped_timed(Any p0, float p1, Any p2, Any p3) { return _i(0x2BBA30B854534A0C, p0, p1, p2, p3); } + static Void task_combat_hated_targets_in_area(Ped ped, float x, float y, float z, float radius, Any p5) { return _i(0x4CF5F55DAC3280A0, ped, x, y, z, radius, p5); } + static Void task_combat_ped(Ped ped, Ped targetPed, int p2, int p3) { return _i(0xF166E48407BAC484, ped, targetPed, p2, p3); } + static Void task_combat_ped_timed(Any p0, Ped ped, int p2, Any p3) { return _i(0x944F30DCB7096BDE, p0, ped, p2, p3); } + static Void task_cower(Ped ped, int duration) { return _i(0x3EB1FE9E8E908E15, ped, duration); } + static Void task_drive_by(Ped driverPed, Ped targetPed, Vehicle targetVehicle, float targetX, float targetY, float targetZ, float distanceToShoot, int pedAccuracy, bool p8, uint32_t firingPattern) { return _i(0x2F8AF0E82773A171, driverPed, targetPed, targetVehicle, targetX, targetY, targetZ, distanceToShoot, pedAccuracy, p8, firingPattern); } + static Void task_enter_vehicle(Ped ped, Vehicle vehicle, int timeout, int seat, float speed, int p5, Any p6) { return _i(0xC20E50AA46D09CA8, ped, vehicle, timeout, seat, speed, p5, p6); } + static Void task_everyone_leave_vehicle(Vehicle vehicle) { return _i(0x7F93691AB4B92272, vehicle); } + static Void task_exit_cover(Any p0, Any p1, float p2, float p3, float p4) { return _i(0x79B258E397854D29, p0, p1, p2, p3, p4); } + static Void task_extend_route(float x, float y, float z) { return _i(0x1E7889778264843A, x, y, z); } + static Void task_flush_route() { return _i(0x841142A1376E9006); } + static Void task_follow_nav_mesh_to_coord(Ped ped, float x, float y, float z, float speed, int timeout, float stoppingRange, bool persistFollowing, float unk) { return _i(0x15D3A79D4E44B913, ped, x, y, z, speed, timeout, stoppingRange, persistFollowing, unk); } + static Void task_follow_point_route(Ped ped, float speed, int unknown) { return _i(0x595583281858626E, ped, speed, unknown); } + static Void task_follow_to_offset_of_entity(Ped ped, Entity entity, float offsetX, float offsetY, float offsetZ, float movementSpeed, int timeout, float stoppingRange, bool persistFollowing) { return _i(0x304AE42E357B8C7E, ped, entity, offsetX, offsetY, offsetZ, movementSpeed, timeout, stoppingRange, persistFollowing); } + static Void task_follow_waypoint_recording(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x0759591819534F7B, p0, p1, p2, p3, p4); } + static Void task_force_motion_state(Ped ped, uint32_t state, bool p2) { return _i(0x4F056E1AFFEF17AB, ped, state, p2); } + static Void task_get_off_boat(Ped ped, Vehicle boat) { return _i(0x9C00E77AF14B2DFF, ped, boat); } + static Void task_goto_entity_aiming(Ped ped, Entity target, float distanceToStopAt, float StartAimingDist) { return _i(0xA9DA48FAB8A76C12, ped, target, distanceToStopAt, StartAimingDist); } + static Void task_goto_entity_offset(Ped ped, Any p1, Any p2, float x, float y, float z, int duration) { return _i(0xE39B4FF4FDEBDE27, ped, p1, p2, x, y, z, duration); } + static Void task_goto_entity_offset_xy(Any p0, Any p1, Any p2, float p3, float p4, float p5, float p6, Any p7) { return _i(0x338E7EF52B6095A9, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void task_go_straight_to_coord(Ped ped, float x, float y, float z, float speed, int timeout, float targetHeading, float distanceToSlide) { return _i(0xD76B57B44F1E6F8B, ped, x, y, z, speed, timeout, targetHeading, distanceToSlide); } + static Void task_go_straight_to_coord_relative_to_entity(Entity entity1, Entity entity2, float p2, float p3, float p4, float p5, Any p6) { return _i(0x61E360B7E040D12E, entity1, entity2, p2, p3, p4, p5, p6); } + static Void task_go_to_coord_and_aim_at_hated_entities_near_coord(Ped pedHandle, float goToLocationX, float goToLocationY, float goToLocationZ, float focusLocationX, float focusLocationY, float focusLocationZ, float speed, bool shootAtEnemies, float distanceToStopAt, float noRoadsDistance, bool unkTrue, int unkFlag, int aimingFlag, uint32_t firingPattern) { return _i(0xA55547801EB331FC, pedHandle, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, unkTrue, unkFlag, aimingFlag, firingPattern); } + static Void task_go_to_coord_any_means(Ped ped, float x, float y, float z, float speed, Any p5, bool p6, int walkingStyle, float p8) { return _i(0x5BC448CB78FA3E88, ped, x, y, z, speed, p5, p6, walkingStyle, p8); } + static Void task_go_to_coord_any_means_extra_params(Ped ped, float x, float y, float z, float speed, Any p5, bool p6, int walkingStyle, float p8, Any p9, Any p10, Any p11, Any p12) { return _i(0x1DD45F9ECFDB1BC9, ped, x, y, z, speed, p5, p6, walkingStyle, p8, p9, p10, p11, p12); } + static Void task_go_to_coord_any_means_extra_params_with_cruise_speed(Ped ped, float x, float y, float z, float speed, Any p5, bool p6, int walkingStyle, float p8, Any p9, Any p10, Any p11, Any p12, Any p13) { return _i(0xB8ECD61F531A7B02, ped, x, y, z, speed, p5, p6, walkingStyle, p8, p9, p10, p11, p12, p13); } + static Void task_go_to_coord_while_aiming_at_coord(Ped ped, float x, float y, float z, float aimAtX, float aimAtY, float aimAtZ, float moveSpeed, bool p8, float p9, float p10, bool p11, Any flags, bool p13, uint32_t firingPattern) { return _i(0x11315AB3385B8AC0, ped, x, y, z, aimAtX, aimAtY, aimAtZ, moveSpeed, p8, p9, p10, p11, flags, p13, firingPattern); } + static Void task_go_to_coord_while_aiming_at_entity(Any p0, float p1, float p2, float p3, Any p4, float p5, bool p6, float p7, float p8, bool p9, Any p10, bool p11, Any p12, Any p13) { return _i(0xB2A16444EAD9AE47, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); } + static Void task_go_to_entity(Entity entity, Entity target, int duration, float distance, float speed, float p5, int p6) { return _i(0x6A071245EB0D1882, entity, target, duration, distance, speed, p5, p6); } + static Void task_go_to_entity_while_aiming_at_coord(Any p0, Any p1, float p2, float p3, float p4, float p5, bool p6, float p7, float p8, bool p9, bool p10, Any p11) { return _i(0x04701832B739DCE5, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } + static Void task_go_to_entity_while_aiming_at_entity(Ped ped, Entity entityToWalkTo, Entity entityToAimAt, float speed, bool shootatEntity, float p5, float p6, bool p7, bool p8, uint32_t firingPattern) { return _i(0x97465886D35210E9, ped, entityToWalkTo, entityToAimAt, speed, shootatEntity, p5, p6, p7, p8, firingPattern); } + static Void task_guard_assigned_defensive_area(Any p0, float p1, float p2, float p3, float p4, float p5, Any p6) { return _i(0xD2A207EEBDF9889B, p0, p1, p2, p3, p4, p5, p6); } + static Void task_guard_current_position(Ped p0, float p1, float p2, bool p3) { return _i(0x4A58A47A72E3FCB4, p0, p1, p2, p3); } + static Void task_guard_sphere_defensive_area(Ped p0, float p1, float p2, float p3, float p4, float p5, Any p6, float p7, float p8, float p9, float p10) { return _i(0xC946FE14BE0EB5E2, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } + static Void task_hands_up(Ped ped, int duration, Ped facingPed, int p3, bool p4) { return _i(0xF2EAB31979A7F910, ped, duration, facingPed, p3, p4); } + static Void task_heli_chase(Ped pilot, Entity entityToFollow, float x, float y, float z) { return _i(0xAC83B1DB38D0ADA0, pilot, entityToFollow, x, y, z); } + static Void task_heli_mission(Ped pilot, Vehicle vehicle, Vehicle vehicleToFollow, Ped pedToFollow, float posX, float posY, float posZ, int mode, float speed, float radius, float angle, int p11, int height, float p13, int p14) { return _i(0xDAD029E187A2BEB4, pilot, vehicle, vehicleToFollow, pedToFollow, posX, posY, posZ, mode, speed, radius, angle, p11, height, p13, p14); } + static Void task_jump(Ped ped, bool unused, Any p2, Any p3) { return _i(0x0AE4086104E067B1, ped, unused, p2, p3); } + static Void task_leave_any_vehicle(Ped ped, int p1, int p2) { return _i(0x504D54DF3F6F2247, ped, p1, p2); } + static Void task_leave_vehicle(Ped ped, Vehicle vehicle, int flags) { return _i(0xD3DBCE61A490BE02, ped, vehicle, flags); } + static Void task_look_at_coord(Entity entity, float x, float y, float z, float duration, Any p5, Any p6) { return _i(0x6FA46612594F7973, entity, x, y, z, duration, p5, p6); } + static Void task_look_at_entity(Ped ped, Entity lookAt, int duration, int unknown1, int unknown2) { return _i(0x69F4BE8C8CC4796C, ped, lookAt, duration, unknown1, unknown2); } + static Void task_move_network_advanced(Ped ped, const char* p1, float p2, float p3, float p4, float p5, float p6, float p7, Any p8, float p9, bool p10, const char* animDict, int flags) { return _i(0xD5B35BEA41919ACB, ped, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, animDict, flags); } + static Void task_move_network(Ped ped, const char* task, float multiplier, bool p3, const char* animDict, int flags) { return _i(0x2D537BA194896636, ped, task, multiplier, p3, animDict, flags); } + static Void task_open_vehicle_door(Ped ped, Vehicle vehicle, int timeOut, int doorIndex, float speed) { return _i(0x965791A9A488A062, ped, vehicle, timeOut, doorIndex, speed); } + static Void task_parachute(Ped ped, bool p1, Any p2) { return _i(0xD2F1C53C97EE81AB, ped, p1, p2); } + static Void task_parachute_to_target(Ped ped, float x, float y, float z) { return _i(0xB33E291AFA6BD03A, ped, x, y, z); } + static Void task_patrol(Ped ped, const char* p1, Any p2, bool p3, bool p4) { return _i(0xBDA5DF49D080FE4E, ped, p1, p2, p3, p4); } + static Void task_pause(Ped ped, int ms) { return _i(0xE73A266DB0CA9042, ped, ms); } + static Void task_ped_slide_to_coord(Ped ped, float x, float y, float z, float heading, float p5) { return _i(0xD04FE6765D990A06, ped, x, y, z, heading, p5); } + static Void task_ped_slide_to_coord_hdg_rate(Ped ped, float x, float y, float z, float heading, float p5, float p6) { return _i(0x5A4A6A6D3DC64F52, ped, x, y, z, heading, p5, p6); } + static Void task_perform_sequence(Ped ped, Object taskSequence) { return _i(0x5ABA3986D90D8A3B, ped, taskSequence); } + static Void task_perform_sequence_from_progress(Any p0, Any p1, Any p2, Any p3) { return _i(0x89221B16730234F0, p0, p1, p2, p3); } + static Void _0x8C33220C8D78CA0D(Any p0, Any p1) { return _i(0x8C33220C8D78CA0D, p0, p1); } + static Void task_plane_chase(Ped pilot, Entity entityToFollow, float x, float y, float z) { return _i(0x2D2386F273FF7A25, pilot, entityToFollow, x, y, z); } + static Void task_plane_land(Ped pilot, Vehicle plane, float runwayStartX, float runwayStartY, float runwayStartZ, float runwayEndX, float runwayEndY, float runwayEndZ) { return _i(0xBF19721FA34D32C0, pilot, plane, runwayStartX, runwayStartY, runwayStartZ, runwayEndX, runwayEndY, runwayEndZ); } + static Void task_plane_mission(Ped pilot, Vehicle plane, Vehicle targetVehicle, Ped targetPed, float destinationX, float destinationY, float destinationZ, int missionType, float vehicleSpeed, float p9, float heading, float maxAltitude, float minAltitude, Any p13) { return _i(0x23703CD154E83B88, pilot, plane, targetVehicle, targetPed, destinationX, destinationY, destinationZ, missionType, vehicleSpeed, p9, heading, maxAltitude, minAltitude, p13); } + static Void _0x92C360B5F15D2302(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x92C360B5F15D2302, p0, p1, p2, p3, p4, p5, p6); } + static Void task_plant_bomb(Ped ped, float x, float y, float z, float heading) { return _i(0x965FEC691D55E9BF, ped, x, y, z, heading); } + static Void task_play_anim(Ped ped, const char* animDictionary, const char* animationName, float speed, float speedMultiplier, int duration, int flag, float playbackRate, bool lockX, bool lockY, bool lockZ) { return _i(0xEA47FE3719165B94, ped, animDictionary, animationName, speed, speedMultiplier, duration, flag, playbackRate, lockX, lockY, lockZ); } + static Void task_play_anim_advanced(Ped ped, const char* animDict, const char* animName, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float speed, float speedMultiplier, int duration, Any flag, float animTime, Any p14, Any p15) { return _i(0x83CDB10EA29B370B, ped, animDict, animName, posX, posY, posZ, rotX, rotY, rotZ, speed, speedMultiplier, duration, flag, animTime, p14, p15); } + static Void task_play_phone_gesture_animation(Ped ped, const char* animDict, const char* animation, const char* boneMaskType, float p4, float p5, bool p6, bool p7) { return _i(0x8FBB6758B3B3E9EC, ped, animDict, animation, boneMaskType, p4, p5, p6, p7); } + static Void task_put_ped_directly_into_cover(Ped ped, float x, float y, float z, Any timeout, bool p5, float p6, bool p7, bool p8, Any p9, bool p10) { return _i(0x4172393E6BE1FECE, ped, x, y, z, timeout, p5, p6, p7, p8, p9, p10); } + static Void task_put_ped_directly_into_melee(Ped ped, Ped meleeTarget, float p2, float p3, float p4, bool p5) { return _i(0x1C6CD14A876FFE39, ped, meleeTarget, p2, p3, p4, p5); } + static Void task_rappel_from_heli(Ped ped, int unused) { return _i(0x09693B0312F91649, ped, unused); } + static Void task_react_and_flee_ped(Ped ped, Ped fleeTarget) { return _i(0x72C896464915D1B1, ped, fleeTarget); } + static Void task_reload_weapon(Ped ped, bool unused) { return _i(0x62D2916F56B9CD2D, ped, unused); } + static Void task_scripted_animation(Ped ped, Any* p1, Any* p2, Any* p3, float p4, float p5) { return _i(0x126EF75F1E17ABE5, ped, p1, p2, p3, p4, p5); } + static Void task_seek_cover_from_ped(Ped ped, Ped target, int duration, bool p3) { return _i(0x84D32B3BEC531324, ped, target, duration, p3); } + static Void task_seek_cover_from_pos(Ped ped, float x, float y, float z, int duration, bool p5) { return _i(0x75AC2B60386D89F2, ped, x, y, z, duration, p5); } + static Void task_seek_cover_to_coords(Ped ped, float x1, float y1, float z1, float x2, float y2, float z2, Any p7, bool p8) { return _i(0x39246A6958EF072C, ped, x1, y1, z1, x2, y2, z2, p7, p8); } + static Void task_seek_cover_to_cover_point(Any p0, Any p1, float p2, float p3, float p4, Any p5, bool p6) { return _i(0xD43D95C7A869447F, p0, p1, p2, p3, p4, p5, p6); } + static Void task_set_blocking_of_non_temporary_events(Ped ped, bool toggle) { return _i(0x90D2156198831D69, ped, toggle); } + static Void task_set_decision_maker(Ped p0, uint32_t p1) { return _i(0xEB8517DDA73720DA, p0, p1); } + static Void task_set_sphere_defensive_area(Any p0, float p1, float p2, float p3, float p4) { return _i(0x933C06518B52A9A4, p0, p1, p2, p3, p4); } + static Void task_shocking_event_react(Ped ped, int eventHandle) { return _i(0x452419CBD838065B, ped, eventHandle); } + static Void task_shoot_at_coord(Ped ped, float x, float y, float z, int duration, uint32_t firingPattern) { return _i(0x46A6CC01E0826106, ped, x, y, z, duration, firingPattern); } + static Void task_shoot_at_entity(Entity entity, Entity target, int duration, uint32_t firingPattern) { return _i(0x08DA95E8298AE772, entity, target, duration, firingPattern); } + static Void task_shuffle_to_next_vehicle_seat(Ped ped, Vehicle vehicle, Any p2) { return _i(0x7AA80209BDA643EB, ped, vehicle, p2); } + static Void task_sky_dive(Ped ped, Any p1) { return _i(0x601736CFE536B0A0, ped, p1); } + static Void task_smart_flee_coord(Ped ped, float x, float y, float z, float distance, int time, bool p6, bool p7) { return _i(0x94587F17E9C365D5, ped, x, y, z, distance, time, p6, p7); } + static Void task_smart_flee_ped(Ped ped, Ped fleeTarget, float distance, Any fleeTime, bool p4, bool p5) { return _i(0x22B0D0E37CCB840D, ped, fleeTarget, distance, fleeTime, p4, p5); } + static Void task_stand_guard(Ped ped, float x, float y, float z, float heading, const char* scenarioName) { return _i(0xAE032F8BBA959E90, ped, x, y, z, heading, scenarioName); } + static Void task_stand_still(Ped ped, int time) { return _i(0x919BE13EED931959, ped, time); } + static Void task_start_scenario_at_position(Ped ped, const char* scenarioName, float x, float y, float z, float heading, int duration, bool sittingScenario, bool teleport) { return _i(0xFA4EFC79F69D4F07, ped, scenarioName, x, y, z, heading, duration, sittingScenario, teleport); } + static Void task_start_scenario_in_place(Ped ped, const char* scenarioName, int unkDelay, bool playEnterAnim) { return _i(0x142A02425FF02BD9, ped, scenarioName, unkDelay, playEnterAnim); } + static Void task_stay_in_cover(Ped ped) { return _i(0xE5DA8615A6180789, ped); } + static Void task_stealth_kill(Ped killer, Ped target, uint32_t killType, float p3, bool p4) { return _i(0xAA5DC05579D60BD9, killer, target, killType, p3, p4); } + static Void task_stop_phone_gesture_animation(Ped ped, Any p1) { return _i(0x3FA00D4F4641BFAE, ped, p1); } + static Void task_swap_weapon(Ped ped, bool p1) { return _i(0xA21C51255B205245, ped, p1); } + static Void task_sweep_aim_entity(Ped ped, const char* anim, const char* p2, const char* p3, const char* p4, int p5, Vehicle vehicle, float p7, float p8) { return _i(0x2047C02158D6405A, ped, anim, p2, p3, p4, p5, vehicle, p7, p8); } + static Void task_sweep_aim_position(Any p0, Any* p1, Any* p2, Any* p3, Any* p4, Any p5, float p6, float p7, float p8, float p9, float p10) { return _i(0x7AFE8FDC10BC07D2, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } + static Void task_synchronized_scene(Ped ped, int scene, const char* animDictionary, const char* animationName, float speed, float speedMultiplier, int duration, int flag, float playbackRate, Any p9) { return _i(0xEEA929141F699854, ped, scene, animDictionary, animationName, speed, speedMultiplier, duration, flag, playbackRate, p9); } + static Void task_throw_projectile(int ped, float x, float y, float z, Any p4, Any p5) { return _i(0x7285951DBF6B5A51, ped, x, y, z, p4, p5); } + static Void task_toggle_duck(bool p0, bool p1) { return _i(0xAC96609B9995EDF8, p0, p1); } + static Void task_turn_ped_to_face_coord(Ped ped, float x, float y, float z, int duration) { return _i(0x1DDA930A0AC38571, ped, x, y, z, duration); } + static Void task_turn_ped_to_face_entity(Ped ped, Entity entity, int duration) { return _i(0x5AD23D40115353AC, ped, entity, duration); } + static Void task_use_mobile_phone(Ped ped, int p1, Any p2) { return _i(0xBD2A8EC3AF4DE7DB, ped, p1, p2); } + static Void task_use_mobile_phone_timed(Ped ped, int duration) { return _i(0x5EE02954A14C69DB, ped, duration); } + static Void task_use_nearest_scenario_chain_to_coord(Any p0, float p1, float p2, float p3, float p4, Any p5) { return _i(0x9FDA1B3D7E7028B3, p0, p1, p2, p3, p4, p5); } + static Void task_use_nearest_scenario_chain_to_coord_warp(Any p0, float p1, float p2, float p3, float p4, Any p5) { return _i(0x97A28E63F0BA5631, p0, p1, p2, p3, p4, p5); } + static Void task_use_nearest_scenario_to_coord(Ped ped, float x, float y, float z, float distance, int duration) { return _i(0x277F471BA9DB000B, ped, x, y, z, distance, duration); } + static Void task_use_nearest_scenario_to_coord_warp(Ped ped, float x, float y, float z, float radius, Any p5) { return _i(0x58E2E0F23F6B76C3, ped, x, y, z, radius, p5); } + static Void task_vehicle_aim_at_coord(Ped ped, float x, float y, float z) { return _i(0x447C1E9EF844BC0F, ped, x, y, z); } + static Void task_vehicle_aim_at_ped(Ped ped, Ped target) { return _i(0xE41885592B08B097, ped, target); } + static Void task_vehicle_chase(Ped driver, Entity targetEnt) { return _i(0x3C08A8E30363B353, driver, targetEnt); } + static Void task_vehicle_drive_to_coord(Ped ped, Vehicle vehicle, float x, float y, float z, float speed, Any p6, uint32_t vehicleModel, int drivingMode, float stopRange, float p10) { return _i(0xE2A2AA2F659D77A7, ped, vehicle, x, y, z, speed, p6, vehicleModel, drivingMode, stopRange, p10); } + static Void task_vehicle_drive_to_coord_longrange(Ped ped, Vehicle vehicle, float x, float y, float z, float speed, int driveMode, float stopRange) { return _i(0x158BB33F920D360C, ped, vehicle, x, y, z, speed, driveMode, stopRange); } + static Void task_vehicle_drive_wander(Ped ped, Vehicle vehicle, float speed, int drivingStyle) { return _i(0x480142959D337D00, ped, vehicle, speed, drivingStyle); } + static Void task_vehicle_escort(Ped ped, Vehicle vehicle, Vehicle targetVehicle, int mode, float speed, int drivingStyle, float minDistance, int p7, float noRoadsDistance) { return _i(0x0FA6E4B75F302400, ped, vehicle, targetVehicle, mode, speed, drivingStyle, minDistance, p7, noRoadsDistance); } + static Void task_vehicle_follow(Ped driver, Vehicle vehicle, Entity targetEntity, int drivingStyle, float speed, int minDistance) { return _i(0xFC545A9F0626E3B6, driver, vehicle, targetEntity, drivingStyle, speed, minDistance); } + static Void task_vehicle_follow_waypoint_recording(Ped ped, Vehicle vehicle, const char* WPRecording, int p3, int p4, int p5, int p6, float p7, bool p8, float p9) { return _i(0x3123FAA6DB1CF7ED, ped, vehicle, WPRecording, p3, p4, p5, p6, p7, p8, p9); } + static Void task_vehicle_goto_navmesh(Ped ped, Vehicle vehicle, float x, float y, float z, float speed, int behaviorFlag, float stoppingRange) { return _i(0x195AEEB13CEFE2EE, ped, vehicle, x, y, z, speed, behaviorFlag, stoppingRange); } + static Void task_vehicle_heli_protect(Ped pilot, Vehicle vehicle, Entity entityToFollow, float targetSpeed, int p4, float radius, int altitude, int p7) { return _i(0x1E09C32048FEFD1C, pilot, vehicle, entityToFollow, targetSpeed, p4, radius, altitude, p7); } + static Void task_vehicle_mission(Any p0, Any p1, Any p2, Any p3, float p4, Any p5, float p6, float p7, bool p8) { return _i(0x659427E0EF36BCDE, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static Void task_vehicle_mission_coors_target(Ped ped, Vehicle vehicle, float x, float y, float z, int p5, int p6, int p7, float p8, float p9, bool p10) { return _i(0xF0AF20AA7731F8C3, ped, vehicle, x, y, z, p5, p6, p7, p8, p9, p10); } + static Void task_vehicle_mission_ped_target(Ped ped, Vehicle vehicle, Ped pedTarget, int mode, float maxSpeed, int drivingStyle, float minDistance, float p7, bool p8) { return _i(0x9454528DF15D657A, ped, vehicle, pedTarget, mode, maxSpeed, drivingStyle, minDistance, p7, p8); } + static Void task_vehicle_park(Ped ped, Vehicle vehicle, float x, float y, float z, float heading, int mode, float radius, bool keepEngineOn) { return _i(0x0F3E34E968EA374E, ped, vehicle, x, y, z, heading, mode, radius, keepEngineOn); } + static Void task_vehicle_play_anim(Vehicle vehicle, const char* animation_set, const char* animation_name) { return _i(0x69F5C3BD0F3EBD89, vehicle, animation_set, animation_name); } + static Void task_vehicle_shoot_at_coord(Ped ped, float x, float y, float z, float p4) { return _i(0x5190796ED39C9B6D, ped, x, y, z, p4); } + static Void task_vehicle_shoot_at_ped(Ped ped, Ped target, float p2) { return _i(0x10AB107B887214D8, ped, target, p2); } + static Void task_vehicle_temp_action(Ped driver, Vehicle vehicle, int action, int time) { return _i(0xC429DCEEB339E129, driver, vehicle, action, time); } + static Void task_wander_in_area(Ped ped, float x, float y, float z, float radius, float minimalLength, float timeBetweenWalks) { return _i(0xE054346CA3A0F315, ped, x, y, z, radius, minimalLength, timeBetweenWalks); } + static Void task_wander_standard(Ped ped, float p1, int p2) { return _i(0xBB9CE077274F6A1B, ped, p1, p2); } + static Void task_warp_ped_into_vehicle(Ped ped, Vehicle vehicle, int seat) { return _i(0x9A7D091411C5F684, ped, vehicle, seat); } + static Void task_writhe(Ped ped, Ped target, int time, int p3, Any p4, Any p5) { return _i(0xCDDC2B77CE54AC6E, ped, target, time, p3, p4, p5); } + static Void uncuff_ped(Ped ped) { return _i(0x67406F2C8F87FC4F, ped); } + static Void update_task_aim_gun_scripted_target(Ped p0, Ped p1, float p2, float p3, float p4, bool p5) { return _i(0x9724FB59A3E72AD0, p0, p1, p2, p3, p4, p5); } + static Void update_task_hands_up_duration(Ped ped, int duration) { return _i(0xA98FCAFD7893C834, ped, duration); } + static Void update_task_sweep_aim_entity(Ped ped, Entity entity) { return _i(0xE4973DBDBE6E44B3, ped, entity); } + static Void update_task_sweep_aim_position(Any p0, float p1, float p2, float p3) { return _i(0xBB106883F5201FC4, p0, p1, p2, p3); } + static Void use_waypoint_recording_as_assisted_movement_route(Any* p0, bool p1, float p2, float p3) { return _i(0x5A353B8E6B1095B5, p0, p1, p2, p3); } + static Void vehicle_waypoint_playback_override_speed(Any p0, float p1) { return _i(0x121F0593E0A431D7, p0, p1); } + static Void vehicle_waypoint_playback_pause(Any p0) { return _i(0x8A4E6AC373666BC5, p0); } + static Void vehicle_waypoint_playback_resume(Any p0) { return _i(0xDC04FCAA7839D492, p0); } + static Void vehicle_waypoint_playback_use_default_speed(Any p0) { return _i(0x5CEB25A7D2848963, p0); } + static bool waypoint_playback_get_is_paused(Any p0) { return _i(0x701375A7D43F01CB, p0); } + static Void waypoint_playback_override_speed(Any p0, float p1, bool p2) { return _i(0x7D7D2B47FA788E85, p0, p1, p2); } + static Void waypoint_playback_pause(Any p0, bool p1, bool p2) { return _i(0x0F342546AA06FED5, p0, p1, p2); } + static Void waypoint_playback_resume(Any p0, bool p1, Any p2, Any p3) { return _i(0x244F70C84C547D2D, p0, p1, p2, p3); } + static Void waypoint_playback_start_aiming_at_coord(Any p0, float p1, float p2, float p3, bool p4) { return _i(0x8968400D900ED8B3, p0, p1, p2, p3, p4); } + static Void waypoint_playback_start_aiming_at_ped(Any p0, Any p1, bool p2) { return _i(0x20E330937C399D29, p0, p1, p2); } + static Void waypoint_playback_start_shooting_at_coord(Any p0, float p1, float p2, float p3, bool p4, Any p5) { return _i(0x057A25CFCC9DB671, p0, p1, p2, p3, p4, p5); } + static Void waypoint_playback_start_shooting_at_ped(Any p0, Any p1, bool p2, Any p3) { return _i(0xE70BA7B90F8390DC, p0, p1, p2, p3); } + static Void waypoint_playback_stop_aiming_or_shooting(Any p0) { return _i(0x47EFA040EBB8E2EA, p0); } + static Void waypoint_playback_use_default_speed(Any p0) { return _i(0x6599D834B12D0800, p0); } + static bool waypoint_recording_get_closest_waypoint(const char* name, float x, float y, float z, int* point) { return _i(0xB629A298081F876F, name, x, y, z, point); } + static bool waypoint_recording_get_coord(const char* name, int point, math::vector3* coord) { return _i(0x2FB897405C90B361, name, point, coord); } + static bool waypoint_recording_get_num_points(const char* name, int* points) { return _i(0x5343532C01A07234, name, points); } + static float waypoint_recording_get_speed_at_point(const char* name, int point) { return _i(0x005622AEBC33ACA9, name, point); } + static Void task_follow_nav_mesh_to_coord_advanced(Ped ped, float x, float y, float z, float speed, int timeout, float unkFloat, int unkInt, float unkX, float unkY, float unkZ, float unk_40000f) { return _i(0x17F58B88D085DBAC, ped, x, y, z, speed, timeout, unkFloat, unkInt, unkX, unkY, unkZ, unk_40000f); } + static Void set_next_desired_move_state(float p0) { return _i(0xF1B9F16E89E2C93A, p0); } + + static Void add_cam_spline_node(Cam camera, float x, float y, float z, float xRot, float yRot, float zRot, int length, int p8, int p9) { return _i(0x8609C75EC438FB3B, camera, x, y, z, xRot, yRot, zRot, length, p8, p9); } + static Void _0x0FB82563989CF4FB(Any p0, Any p1, Any p2, Any p3) { return _i(0x0FB82563989CF4FB, p0, p1, p2, p3); } + static Void _0x0A9F2A468B328E74(Any p0, Any p1, Any p2, Any p3) { return _i(0x0A9F2A468B328E74, p0, p1, p2, p3); } + static Void _0x609278246A29CA34(Any p0, Any p1, Any p2) { return _i(0x609278246A29CA34, p0, p1, p2); } + static Void _0x271017B9BA825366(Any p0, bool p1) { return _i(0x271017B9BA825366, p0, p1); } + static Void animated_shake_cam(Cam cam, const char* p1, const char* p2, const char* p3, float amplitude) { return _i(0xA2746EEAE3E577CD, cam, p1, p2, p3, amplitude); } + static Void _0xC2EAE3FB8CDBED31(const char* p0, const char* p1, const char* p2, float p3) { return _i(0xC2EAE3FB8CDBED31, p0, p1, p2, p3); } + static Any _0x4879E4FE39074CDF() { return _i(0x4879E4FE39074CDF); } + static Void attach_cam_to_entity(Cam cam, Entity entity, float xOffset, float yOffset, float zOffset, bool isRelative) { return _i(0xFEDB7D269E8C60E3, cam, entity, xOffset, yOffset, zOffset, isRelative); } + static Void attach_cam_to_ped_bone(Cam cam, Ped ped, int boneIndex, float x, float y, float z, bool heading) { return _i(0x61A3DBA14AB7F411, cam, ped, boneIndex, x, y, z, heading); } + static Void stop_cutscene_cam_shaking() { return _i(0xDB629FFD9285FA06); } + static Void _0x62374889A4D59F72() { return _i(0x62374889A4D59F72); } + static Cam create_cam(const char* camName, bool p1) { return _i(0xC3981DCE61D9E13F, camName, p1); } + static Cam create_camera(uint32_t camHash, bool p1) { return _i(0x5E3CF89C6BCCA67D, camHash, p1); } + static Cam create_camera_with_params(uint32_t camHash, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fov, bool p8, Any p9) { return _i(0x6ABFA3E16460F22D, camHash, posX, posY, posZ, rotX, rotY, rotZ, fov, p8, p9); } + static Cam create_cam_with_params(const char* camName, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fov, bool p8, int p9) { return _i(0xB51194800B257161, camName, posX, posY, posZ, rotX, rotY, rotZ, fov, p8, p9); } + static Void create_cinematic_shot(Any p0, int p1, Any p2, Entity entity) { return _i(0x741B0129D4560F31, p0, p1, p2, entity); } + static Void destroy_all_cams(bool thisScriptCheck) { return _i(0x8E5FB15663F79120, thisScriptCheck); } + static Void destroy_cam(Cam cam, bool thisScriptCheck) { return _i(0x865908C81A2C22E9, cam, thisScriptCheck); } + static Void detach_cam(Cam cam) { return _i(0xA2FABBE87F4BAD82, cam); } + static Void disable_aim_cam_this_update() { return _i(0x1A31FE0049E542F6); } + static Void _0x49482F9FCD825AAA(Entity entity) { return _i(0x49482F9FCD825AAA, entity); } + static Void disable_vehicle_first_person_cam_this_frame() { return _i(0xADFF1B2A555F5FBA); } + static Any _0x17FCA7199A530203() { return _i(0x17FCA7199A530203); } + static Void _0x62ECFCFDEE7885D6() { return _i(0x62ECFCFDEE7885D6); } + static Void _0xB1381B97F70C7B30() { return _i(0xB1381B97F70C7B30); } + static Void _0x59424BD75174C9B1() { return _i(0x59424BD75174C9B1); } + static Void enable_crosshair_this_frame() { return _i(0xEA7F0AD7E9BA676F); } + static Void _0x5A43C76F7FC7BA5F() { return _i(0x5A43C76F7FC7BA5F); } + static Void disable_first_person_cam_this_frame() { return _i(0xDE2EF5DA284CC8DF); } + static bool does_cam_exist(Cam cam) { return _i(0xA7A932170592B50E, cam); } + static Void do_screen_fade_in(int duration) { return _i(0xD4E8E24955024033, duration); } + static Void do_screen_fade_out(int duration) { return _i(0x891B5B39AC6302AF, duration); } + static Void _0x48608C3464F58AB4(Any p0, Any p1, Any p2) { return _i(0x48608C3464F58AB4, p0, p1, p2); } + static Void _0xA41BCD7213805AAC(bool p0) { return _i(0xA41BCD7213805AAC, p0); } + static Void _0x0AA27680A0BD43FA() { return _i(0x0AA27680A0BD43FA); } + static Any _0x19CAFA3C87F7C2FF() { return _i(0x19CAFA3C87F7C2FF); } + static float get_cam_anim_current_phase(Cam cam) { return _i(0xA10B2DB49E92A6B0, cam); } + static math::vector3 get_cam_coord(Cam cam) { return _i>(0xBAC038F7459AE5AE, cam); } + static float get_cam_far_clip(Cam cam) { return _i(0xB60A9CFEB21CA6AA, cam); } + static float get_cam_far_dof(Cam cam) { return _i(0x255F8DAFD540D397, cam); } + static float get_cam_fov(Cam cam) { return _i(0xC3330A45CCCDB26A, cam); } + static float get_cam_near_clip(Cam cam) { return _i(0xC520A34DAFBF24B1, cam); } + static math::vector3 get_cam_rot(Cam cam, int rotationOrder) { return _i>(0x7D304C1C955E3E12, cam, rotationOrder); } + static bool get_cam_spline_node_index(Cam cam) { return _i(0xB22B17DF858716A6, cam); } + static float get_cam_spline_node_phase(Cam cam) { return _i(0xD9D0E694C8282C96, cam); } + static float get_cam_spline_phase(Cam cam) { return _i(0xB5349E36C546509A, cam); } + static Any _0xEE778F8C7E1142E2(Any p0) { return _i(0xEE778F8C7E1142E2, p0); } + static math::vector3 get_gameplay_cam_coords() { return _i>(0xA200EB1EE790F448); } + static float _0xDFC8CBC606FDB0FC() { return _i(0xDFC8CBC606FDB0FC); } + static float _0x9780F32BCAF72431() { return _i(0x9780F32BCAF72431); } + static float _0x80EC114669DAEFF4() { return _i(0x80EC114669DAEFF4); } + static float _0x162F9D995753DC19() { return _i(0x162F9D995753DC19); } + static float _0xD0082607100D7193() { return _i(0xD0082607100D7193); } + static float _0xA03502FC581F7D9B() { return _i(0xA03502FC581F7D9B); } + static math::vector3 get_final_rendered_cam_rot(int rotationOrder) { return _i>(0x5B4E4C817FCC2DFB, rotationOrder); } + static float _0x5F35F6732C3FBBA0(Any p0) { return _i(0x5F35F6732C3FBBA0, p0); } + static math::vector3 _0x26903D9CD1175F2C(Any p0, Any p1) { return _i>(0x26903D9CD1175F2C, p0, p1); } + static float get_gameplay_cazoom() { return _i(0x7EC52CC40597D170); } + static Entity _0x89215EC747DF244A(float p0, int p1, float p2, float p3, float p4, float p5, float p6, int p7, int p8) { return _i(0x89215EC747DF244A, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static int get_follow_ped_cazoom_level() { return _i(0x33E6C8EFD0CD93E9); } + static int get_follow_ped_cam_view_mode() { return _i(0x8D4D46230B2C353A); } + static int get_follow_vehicle_cazoom_level() { return _i(0xEE82280AB767B690); } + static int get_follow_vehicle_cam_view_mode() { return _i(0xA4FF579AC0E3AAAE); } + static math::vector3 get_gameplay_cam_coord() { return _i>(0x14D6F5678D8F1B37); } + static float get_gameplay_cam_fov() { return _i(0x65019750A0324133); } + static float get_gameplay_cam_relative_heading() { return _i(0x743607648ADD4587); } + static float get_gameplay_cam_relative_pitch() { return _i(0x3A6867B4845BEDA2); } + static math::vector3 get_gameplay_cam_rot(int rotationOrder) { return _i>(0x837765A25378F0BB, rotationOrder); } + static Cam get_rendering_cam() { return _i(0x5234F9F10919EABA); } + static Void _0x149916F50C34A40D(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9) { return _i(0x149916F50C34A40D, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void _0x7B8A361C1813FBEF() { return _i(0x7B8A361C1813FBEF); } + static Void _0x9E4CFFF989258472() { return _i(0x9E4CFFF989258472); } + static Void _0xF4F2C0D4EE209E20() { return _i(0xF4F2C0D4EE209E20); } + static bool is_aim_cam_active() { return _i(0x68EDDA28A5976D07); } + static bool _0x74BD83EA840F6BC9() { return _i(0x74BD83EA840F6BC9); } + static Any _0xEAF0FA793D05C592() { return _i(0xEAF0FA793D05C592); } + static Any _0xD7360051C885628B() { return _i(0xD7360051C885628B); } + static bool is_cam_active(Cam cam) { return _i(0xDFB2B516207D3534, cam); } + static bool is_cam_interpolating(Cam cam) { return _i(0x036F97C908C2B52C, cam); } + static bool is_cam_playing_anim(Cam cam, const char* animName, const char* animDictionary) { return _i(0xC90621D8A0CEECF2, cam, animName, animDictionary); } + static bool is_cam_rendering(Cam cam) { return _i(0x02EC0AF5C5A49B7A, cam); } + static bool is_cam_shaking(Cam cam) { return _i(0x6B24BFE83A2BE47B, cam); } + static bool is_cam_spline_paused(Any p0) { return _i(0x0290F35C0AD97864, p0); } + static bool is_cinematic_cam_rendering() { return _i(0xB15162CB5826E9E8); } + static bool is_cinematic_cam_shaking() { return _i(0xBBC08F6B4CB8FF0A); } + static bool is_in_vehicle_cam_disabled() { return _i(0x4F32C0D5A90A9B40); } + static bool _0xCA9D2AA3E326D720() { return _i(0xCA9D2AA3E326D720); } + static bool is_cinematic_shot_active(Any p0) { return _i(0xCC9F3371A7C28BC9, p0); } + static Any _0xBF72910D0F26F025() { return _i(0xBF72910D0F26F025); } + static bool is_first_person_aim_cam_active() { return _i(0x5E346D934122613F); } + static bool is_follow_ped_cam_active() { return _i(0xC6D3D26810C8E0F9); } + static bool is_follow_vehicle_cam_active() { return _i(0xCBBDE6D335D6D496); } + static bool is_gameplay_cam_looking_behind() { return _i(0x70FDA869F3317EA9); } + static bool is_gameplay_cam_rendering() { return _i(0x39B5D1B10383F0C8); } + static bool is_gameplay_cam_shaking() { return _i(0x016C090630DF1F89); } + static bool is_gameplay_hint_active() { return _i(0xE520FF1AD2785B40); } + static bool _0x3044240D2E0FA842() { return _i(0x3044240D2E0FA842); } + static bool _0x705A276EBFF3133D() { return _i(0x705A276EBFF3133D); } + static Any _0x1F2300CB7FA7B7F6() { return _i(0x1F2300CB7FA7B7F6); } + static bool is_screen_faded_in() { return _i(0x5A859503B0C08678); } + static bool is_screen_faded_out() { return _i(0xB16FCE9DDC7BA182); } + static bool is_screen_fading_in() { return _i(0x5C544BC6C57AC575); } + static bool is_screen_fading_out() { return _i(0x797AC7CB535BA28F); } + static bool is_script_global_shaking() { return _i(0xC912AF078AF19212); } + static bool is_sphere_visible(float x, float y, float z, float radius) { return _i(0xE33D59DA70B58FDF, x, y, z, radius); } + static Void override_cam_spline_motion_blur(Cam cam, int p1, float p2, float p3) { return _i(0x7DCF7C708D292D55, cam, p1, p2, p3); } + static Void override_cam_spline_velocity(Cam cam, int p1, float p2, float p3) { return _i(0x40B62FA033EB0346, cam, p1, p2, p3); } + static bool play_cam_anim(Cam cam, const char* animName, const char* animDictionary, float x, float y, float z, float xRot, float yRot, float zRot, bool p9, int p10) { return _i(0x9A2D0FB2E7852392, cam, animName, animDictionary, x, y, z, xRot, yRot, zRot, p9, p10); } + static bool play_synchronized_cam_anim(Any p0, Any p1, const char* animName, const char* animDictionary) { return _i(0xE32EFE9AB4A9AA0C, p0, p1, animName, animDictionary); } + static Void point_cam_at_coord(Cam cam, float x, float y, float z) { return _i(0xF75497BB865F0803, cam, x, y, z); } + static Void point_cam_at_entity(Cam cam, Entity entity, float p2, float p3, float p4, bool p5) { return _i(0x5640BFF86B16E8DC, cam, entity, p2, p3, p4, p5); } + static Void point_cam_at_ped_bone(Cam cam, int ped, int boneIndex, float x, float y, float z, bool p6) { return _i(0x68B2B5F33BA63C41, cam, ped, boneIndex, x, y, z, p6); } + static Void render_script_cams(bool render, bool ease, int easeTime, bool p3, bool p4, Any p5) { return _i(0x07E5B515DB0636FC, render, ease, easeTime, p3, p4, p5); } + static Any _0x8BFCEB5EA1B161B6() { return _i(0x8BFCEB5EA1B161B6); } + static Void _0x4008EDF7D6E48175(bool p0) { return _i(0x4008EDF7D6E48175, p0); } + static Void set_cam_active(Cam cam, bool active) { return _i(0x026FB97D0A425F84, cam, active); } + static Void set_cam_active_with_interp(Cam camTo, Cam camFrom, int duration, int easeLocation, int easeRotation) { return _i(0x9FBDA379383A52A4, camTo, camFrom, duration, easeLocation, easeRotation); } + static Void set_cam_affects_aiming(Cam cam, bool toggle) { return _i(0x8C1DC7770C51DC8D, cam, toggle); } + static Void set_cam_anim_current_phase(Cam cam, float phase) { return _i(0x4145A4C44FF3B5A6, cam, phase); } + static Void _0x661B5C8654ADD825(Any p0, bool p1) { return _i(0x661B5C8654ADD825, p0, p1); } + static Void set_cam_coord(Cam cam, float posX, float posY, float posZ) { return _i(0x4D41783FB745E42E, cam, posX, posY, posZ); } + static Void set_cam_effect(int p0) { return _i(0x80C8B1846639BB19, p0); } + static Void set_cam_dof_fnumber_of_lens(Cam camera, float p1) { return _i(0x7DD234D6F3914C5B, camera, p1); } + static Void _0x47B595D60664CFFA(Any p0, Any p1) { return _i(0x47B595D60664CFFA, p0, p1); } + static Void set_cam_dof_focus_distance_bias(Cam camera, float p1) { return _i(0xC669EEA5D031B7DE, camera, p1); } + static Void set_cam_dof_max_near_in_focus_distance(Cam camera, float p1) { return _i(0xC3654A441402562D, camera, p1); } + static Void set_cam_dof_max_near_in_focus_distance_blend_level(Cam camera, float p1) { return _i(0x2C654B4943BDDF7C, camera, p1); } + static Void _0xF55E4046F6F831DC(Any p0, float p1) { return _i(0xF55E4046F6F831DC, p0, p1); } + static Void _0xE111A7C0D200CBC5(Any p0, float p1) { return _i(0xE111A7C0D200CBC5, p0, p1); } + static Void set_cam_dof_planes(Cam cam, float p1, float p2, float p3, float p4) { return _i(0x3CF48F6F96E749DC, cam, p1, p2, p3, p4); } + static Void set_cam_dof_strength(Cam cam, float dofStrength) { return _i(0x5EE29B4D7D5DF897, cam, dofStrength); } + static Void set_cam_far_clip(Cam cam, float farClip) { return _i(0xAE306F2A904BF86E, cam, farClip); } + static Void set_cam_far_dof(Cam cam, float farDOF) { return _i(0xEDD91296CD01AEE0, cam, farDOF); } + static Void set_cam_fov(Cam cam, float fieldOfView) { return _i(0xB13C14F66A00D047, cam, fieldOfView); } + static Void set_cam_inherit_roll_vehicle(Cam cam, bool p1) { return _i(0x45F1DE9C34B93AE6, cam, p1); } + static Void _0xA2767257A320FC82(Any p0, bool p1) { return _i(0xA2767257A320FC82, p0, p1); } + static Void set_cam_motion_blur_strength(Cam cam, float strength) { return _i(0x6F0F77FBA9A8F2E6, cam, strength); } + static Void set_cam_near_clip(Cam cam, float nearClip) { return _i(0xC7848EFCCC545182, cam, nearClip); } + static Void set_cam_near_dof(Cam cam, float nearDOF) { return _i(0x3FA4BF0A7AB7DE2C, cam, nearDOF); } + static Void set_cam_params(Cam cam, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fieldOfView, Any p8, int p9, int p10, int p11) { return _i(0xBFD8727AEA3CCEBA, cam, posX, posY, posZ, rotX, rotY, rotZ, fieldOfView, p8, p9, p10, p11); } + static Void set_cam_rot(Cam cam, float rotX, float rotY, float rotZ, int rotationOrder) { return _i(0x85973643155D0B07, cam, rotX, rotY, rotZ, rotationOrder); } + static Void set_cam_shake_amplitude(Cam cam, float amplitude) { return _i(0xD93DB43B82BC0D00, cam, amplitude); } + static Void set_cam_spline_duration(int cam, int timeDuration) { return _i(0x1381539FEE034CDA, cam, timeDuration); } + static Void _0x83B8201ED82A9A2D(Any p0, Any p1, Any p2, float p3) { return _i(0x83B8201ED82A9A2D, p0, p1, p2, p3); } + static Void _0x7BF1A54AE67AC070(Any p0, Any p1, Any p2) { return _i(0x7BF1A54AE67AC070, p0, p1, p2); } + static Void _0xA6385DEB180F319F(Any p0, Any p1, float p2) { return _i(0xA6385DEB180F319F, p0, p1, p2); } + static Void set_cam_spline_phase(Cam cam, float p1) { return _i(0x242B5874F0A4E052, cam, p1); } + static Void _0xD1B0F412F109EA5D(Any p0, Any p1) { return _i(0xD1B0F412F109EA5D, p0, p1); } + static Void set_cam_use_shallow_dof_mode(Cam cam, bool toggle) { return _i(0x16A96863A17552BB, cam, toggle); } + static Void _0x2A2173E46DAECD12(Any p0, Any p1) { return _i(0x2A2173E46DAECD12, p0, p1); } + static Void set_cinematic_button_active(bool p0) { return _i(0x51669F7D1FB53D9F, p0); } + static Void set_cinematic_cam_shake_amplitude(float p0) { return _i(0xC724C701C30B2FE7, p0); } + static Void set_cinematic_mode_active(bool p0) { return _i(0xDCF0754AC3D6FD4E, p0); } + static Void _0xDC9DA9E8789F5246() { return _i(0xDC9DA9E8789F5246); } + static Void _0x12DED8CA53D47EA5(float p0) { return _i(0x12DED8CA53D47EA5, p0); } + static Void _0x0AF7B437918103B3(float p0) { return _i(0x0AF7B437918103B3, p0); } + static Void _0x2F7F2B26DD3F18EE(float p0, float p1) { return _i(0x2F7F2B26DD3F18EE, p0, p1); } + static Void _0xBCFC632DB7673BF0(float p0, float p1) { return _i(0xBCFC632DB7673BF0, p0, p1); } + static Void _0x70894BD0915C5BCA(float p0) { return _i(0x70894BD0915C5BCA, p0); } + static Void _0xCED08CBE8EBB97C7(float p0, float p1) { return _i(0xCED08CBE8EBB97C7, p0, p1); } + static Void _0x5C41E6BABC9E2112(Any p0) { return _i(0x5C41E6BABC9E2112, p0); } + static Void _0x11FA5D3479C7DD47(Any p0) { return _i(0x11FA5D3479C7DD47, p0); } + static Void _0x21E253A7F8DA5DFB(const char* vehicleName) { return _i(0x21E253A7F8DA5DFB, vehicleName); } + static Void set_gameplay_cam_raw_yaw(float yaw) { return _i(0x103991D4A307D472, yaw); } + static Void set_gameplay_cam_raw_pitch(float pitch) { return _i(0x759E13EBC1C15C5A, pitch); } + static Void _0xC91C6C55199308CA(Any p0, float p1, float p2, float p3) { return _i(0xC91C6C55199308CA, p0, p1, p2, p3); } + static Void _0x503F5920162365B2(Any p0, float p1, float p2, float p3) { return _i(0x503F5920162365B2, p0, p1, p2, p3); } + static Void set_camera_range(Cam cam, float range) { return _i(0xF9D02130ECDD1D77, cam, range); } + static Void _0xC8B5C4A79CC18B94(Cam p0) { return _i(0xC8B5C4A79CC18B94, p0); } + static Void _0xE827B9382CFB41BA(Any p0, Any p1, Any p2, Any p3) { return _i(0xE827B9382CFB41BA, p0, p1, p2, p3); } + static Void _0xDD79DF9F4D26E1C9() { return _i(0xDD79DF9F4D26E1C9); } + static Void _0xC8391C309684595A() { return _i(0xC8391C309684595A); } + static bool set_follow_ped_cam_cutscene_chat(const char* p0, int p1) { return _i(0x44A113DD6FFC48D1, p0, p1); } + static Void set_follow_ped_cam_view_mode(int viewMode) { return _i(0x5A4F9EDF1673F704, viewMode); } + static Void set_time_idle_drop(bool p0, bool p1) { return _i(0x9DFE13ECDC1EC196, p0, p1); } + static Void _0x91EF6EE6419E5B97(bool p0) { return _i(0x91EF6EE6419E5B97, p0); } + static Void set_follow_vehicle_cazoom_level(int zoomLevel) { return _i(0x19464CB6E4078C8A, zoomLevel); } + static Void set_follow_vehicle_cam_view_mode(int viewMode) { return _i(0xAC253D7842768F48, viewMode); } + static Void _0xDB90C6CCA48940F1(bool p0) { return _i(0xDB90C6CCA48940F1, p0); } + static Void _0xFD3151CD37EA2245(Any p0) { return _i(0xFD3151CD37EA2245, p0); } + static Void _0x8BBACBF51DA047A8(Any p0) { return _i(0x8BBACBF51DA047A8, p0); } + static Void _0x2AED6301F67007D5(Entity entity) { return _i(0x2AED6301F67007D5, entity); } + static Void _0x0225778816FDC28C(float p0) { return _i(0x0225778816FDC28C, p0); } + static Void custom_menu_coordinates(float p0) { return _i(0x487A82C650EB7799, p0); } + static Void set_gameplay_cam_relative_heading(float heading) { return _i(0xB4EC2312F4E5B1F1, heading); } + static Void set_gameplay_cam_relative_pitch(float x, float Value2) { return _i(0x6D0858B8EDFD2B7D, x, Value2); } + static Void set_gameplay_cam_shake_amplitude(float amplitude) { return _i(0xA87E00932DB4D85D, amplitude); } + static Void set_gameplay_coord_hint(float p0, float p1, float p2, Any p3, Any p4, Any p5, Any p6) { return _i(0xD51ADCD2D8BC0FB3, p0, p1, p2, p3, p4, p5, p6); } + static Void set_gameplay_entity_hint(Entity entity, float xOffset, float yOffset, float zOffset, bool p4, int p5, int p6, int p7, Any p8) { return _i(0x189E955A8313E298, entity, xOffset, yOffset, zOffset, p4, p5, p6, p7, p8); } + static Void _0xD1F8363DFAD03848(float p0) { return _i(0xD1F8363DFAD03848, p0); } + static Void get_is_multiplayer_brief(bool p0) { return _i(0xE3433EADAAF7EE40, p0); } + static Void _0x5D7B620DAE436138(float p0) { return _i(0x5D7B620DAE436138, p0); } + static Void _0xC92717EF615B6704(float p0) { return _i(0xC92717EF615B6704, p0); } + static Void _0xF8BDBF3D573049A1(float p0) { return _i(0xF8BDBF3D573049A1, p0); } + static Void set_gameplay_hint_fov(float FOV) { return _i(0x513403FB9C56211F, FOV); } + static Void set_gameplay_object_hint(Any p0, float p1, float p2, float p3, bool p4, Any p5, Any p6, Any p7) { return _i(0x83E87508A2CA2AC6, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void set_gameplay_ped_hint(Ped p0, float x1, float y1, float z1, bool p4, Any p5, Any p6, Any p7) { return _i(0x2B486269ACD548D3, p0, x1, y1, z1, p4, p5, p6, p7); } + static Void set_gameplay_vehicle_hint(Any p0, float p1, float p2, float p3, bool p4, Any p5, Any p6, Any p7) { return _i(0xA2297E18F3E71C2E, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void _0xE9EA16D6E54CDCA4(Vehicle p0, int p1) { return _i(0xE9EA16D6E54CDCA4, p0, p1); } + static Void _0x469F2ECDEC046337(bool p0) { return _i(0x469F2ECDEC046337, p0); } + static Void _0x42156508606DE65E(float p0) { return _i(0x42156508606DE65E, p0); } + static Void animate_gameplay_cam_zoom(float p0, float distance) { return _i(0xDF2E1F7742402E81, p0, distance); } + static Void clamp_gameplay_cayaw(float minimum, float maximum) { return _i(0x8F993D26E0CA5E8E, minimum, maximum); } + static Void clamp_gameplay_cam_pitch(float minimum, float maximum) { return _i(0xA516C198B7DCA1E1, minimum, maximum); } + static Void set_use_hi_dof() { return _i(0xA13B0222F3D94A94); } + static Void set_widescreen_borders(bool p0, int p1) { return _i(0xDCD4EA924F42D01A, p0, p1); } + static Void shake_cam(Cam cam, const char* type, float amplitude) { return _i(0x6A25241C340D3822, cam, type, amplitude); } + static Void shake_cinematic_cam(const char* p0, float p1) { return _i(0xDCE214D9ED58F3CF, p0, p1); } + static Void shake_gameplay_cam(const char* shakeName, float intensity) { return _i(0xFD55E49555E017CF, shakeName, intensity); } + static Void _0xF4C8CF9E353AFECA(const char* p0, float p1) { return _i(0xF4C8CF9E353AFECA, p0, p1); } + static Void stop_cam_pointing(Cam cam) { return _i(0xF33AB75780BA57DE, cam); } + static Void stop_cam_shaking(Cam cam, bool p1) { return _i(0xBDECF64367884AC3, cam, p1); } + static Void stop_cinematic_cam_shaking(bool p0) { return _i(0x2238E588E588A6D7, p0); } + static Void stop_cinematic_shot(Any p0) { return _i(0x7660C6E75D3A078E, p0); } + static Void _0x247ACBC4ABBC9D1C(bool p0) { return _i(0x247ACBC4ABBC9D1C, p0); } + static Void _0x324C5AA411DA7737(Any p0) { return _i(0x324C5AA411DA7737, p0); } + static Void stop_gameplay_cam_shaking(bool p0) { return _i(0x0EF93E9F3D08C178, p0); } + static Void stop_gameplay_hint(bool p0) { return _i(0xF46C581C61718916, p0); } + static Void render_first_person_cam(bool render, Any p1, Any p2, Any p3) { return _i(0xC819F3CBB62BF692, render, p1, p2, p3); } + static Void stop_script_global_shaking(bool p0) { return _i(0x1C9D7949FA533490, p0); } + static Void _0x425A920FDB9A0DDA(Any p0) { return _i(0x425A920FDB9A0DDA, p0); } + static Void _0x271401846BD26E92(bool p0, bool p1) { return _i(0x271401846BD26E92, p0, p1); } + static Void _0x6493CF69859B116A() { return _i(0x6493CF69859B116A); } + static bool _0x5C48A1D6E3B33179(Any p0) { return _i(0x5C48A1D6E3B33179, p0); } + static Void set_cam_debug_name(Cam camera, const char* name) { return _i(0x1B93E0107865DD40, camera, name); } + static Void _0xCCD078C2665D2973(bool p0) { return _i(0xCCD078C2665D2973, p0); } + + static Void add_to_clock_time(int hours, int minutes, int seconds) { return _i(0xD716F30D8C8980E2, hours, minutes, seconds); } + static Void advance_clock_time_to(int hour, int minute, int second) { return _i(0xC8CA9670B9D83B3B, hour, minute, second); } + static int get_clock_day_of_month() { return _i(0x3D10BC92A4DB1D35); } + static int get_clock_day_of_week() { return _i(0xD972E4BD7AEB235F); } + static int get_clock_hours() { return _i(0x25223CA6B4D20B7F); } + static int get_clock_minutes() { return _i(0x13D2B8ADD79640F2); } + static int get_clock_month() { return _i(0xBBC72712E80257A1); } + static int get_clock_seconds() { return _i(0x494E97C2EF27C470); } + static int get_clock_year() { return _i(0x961777E64BDAF717); } + static Void get_local_time(int* year, int* month, int* day, int* hour, int* minute, int* second) { return _i(0x50C7A99057A69748, year, month, day, hour, minute, second); } + static int get_milliseconds_per_game_minute() { return _i(0x2F8B4D1C595B11DB); } + static Void get_posix_time(int* year, int* month, int* day, int* hour, int* minute, int* second) { return _i(0xDA488F299A5B164E, year, month, day, hour, minute, second); } + static Void get_utc_time(int* year, int* month, int* day, int* hour, int* minute, int* second) { return _i(0x8117E09A19EEF4D3, year, month, day, hour, minute, second); } + static Void pause_clock(bool toggle) { return _i(0x4055E40BD2DBEC1D, toggle); } + static Void set_clock_date(int day, int month, int year) { return _i(0xB096419DF0D06CE7, day, month, year); } + static Void set_clock_time(int hour, int minute, int second) { return _i(0x47C3B5848C3E45D8, hour, minute, second); } + + static bool _0xB56BBBCC2955D9CB() { return _i(0xB56BBBCC2955D9CB); } + static bool can_set_enter_state_for_registered_entity(const char* cutsceneEntName, uint32_t modelHash) { return _i(0x645D0B458D8E17B5, cutsceneEntName, modelHash); } + static bool can_set_exit_state_for_camera(bool p0) { return _i(0xB2CBCD0930DFB420, p0); } + static bool can_set_exit_state_for_registered_entity(const char* cutsceneEntName, uint32_t modelHash) { return _i(0x4C6A6451C79E4662, cutsceneEntName, modelHash); } + static Any _0x5EDEF0CF8C1DAB3C() { return _i(0x5EDEF0CF8C1DAB3C); } + static bool does_cutscene_entity_exist(const char* cutsceneEntName, uint32_t modelHash) { return _i(0x499EF20C5DB25C59, cutsceneEntName, modelHash); } + static int _0x583DF8E3D4AFBD98() { return _i(0x583DF8E3D4AFBD98); } + static int get_cutscene_section_playing() { return _i(0x49010A6A396553D8); } + static int get_cutscene_time() { return _i(0xE625BEABBAFFDAB9); } + static int get_cutscene_total_duration() { return _i(0xEE53B14A19E480D4); } + static Any _0x0ABC54DE641DC0FC(Any* p0) { return _i(0x0ABC54DE641DC0FC, p0); } + static Entity get_entity_index_of_cutscene_entity(const char* cutsceneEntName, uint32_t modelHash) { return _i(0x0A2E9FDB9A8C62F6, cutsceneEntName, modelHash); } + static Entity get_entity_index_of_registered_entity(const char* cutsceneEntName, uint32_t modelHash) { return _i(0xC0741A26499654CD, cutsceneEntName, modelHash); } + static uint32_t* _0x708BDD8CD795B043() { return _i(0x708BDD8CD795B043); } + static bool has_cutscene_finished() { return _i(0x7C0A893088881D57); } + static bool has_cutscene_loaded() { return _i(0xC59F528E9AB9F339); } + static bool _0xA1C996C2A744262E(Any* p0) { return _i(0xA1C996C2A744262E, p0); } + static bool has_this_cutscene_loaded(const char* cutsceneName) { return _i(0x228D3D94F8A11C3C, cutsceneName); } + static bool _0x4CEBC1ED31E8925E(const char* cutsceneName) { return _i(0x4CEBC1ED31E8925E, cutsceneName); } + static bool is_cutscene_active() { return _i(0x991251AFC3981F84); } + static bool _0x71B74D2AE19338D0(int p0) { return _i(0x71B74D2AE19338D0, p0); } + static bool is_cutscene_playing() { return _i(0xD3C2E180A40F031E); } + static int _0xA0FE76168A189DDB() { return _i(0xA0FE76168A189DDB); } + static Void _0x2F137B508DE238F2(bool p0) { return _i(0x2F137B508DE238F2, p0); } + static Void register_entity_for_cutscene(Ped cutscenePed, const char* cutsceneEntName, int p2, uint32_t modelHash, int p4) { return _i(0xE40C1C56DF95C2E8, cutscenePed, cutsceneEntName, p2, modelHash, p4); } + static Void remove_cutscene() { return _i(0x440AF51A3462B86F); } + static Void _0xD00D76A7DFC9D852(Any* p0) { return _i(0xD00D76A7DFC9D852, p0); } + static Void request_cutscene(const char* cutsceneName, int p1) { return _i(0x7A86743F475D9E09, cutsceneName, p1); } + static Void request_cutscene_ex(const char* cutsceneName, int p1, int p2) { return _i(0xC23DE0E91C30B58C, cutsceneName, p1, p2); } + static Void _0x06A3524161C502BA(Any* p0) { return _i(0x06A3524161C502BA, p0); } + static Void register_synchronised_script_speech() { return _i(0x2131046957F31B04); } + static Void _0xE36A98D8AB3D3C66(bool p0) { return _i(0xE36A98D8AB3D3C66, p0); } + static Void _0x41FAA8FB2ECE8720(bool p0) { return _i(0x41FAA8FB2ECE8720, p0); } + static Void _0x4C61C75BEE8184C2(const char* p0, Any p1, Any p2) { return _i(0x4C61C75BEE8184C2, p0, p1, p2); } + static Void set_cutscene_fade_values(bool p0, bool p1, bool p2, bool p3) { return _i(0x8093F23ABACCC7D4, p0, p1, p2, p3); } + static Void _0x20746F7B1032A3C7(bool p0, bool p1, bool p2, bool p3) { return _i(0x20746F7B1032A3C7, p0, p1, p2, p3); } + static Void _0x06EE9048FD080382(bool p0) { return _i(0x06EE9048FD080382, p0); } + static Void set_cutscene_origin(float x, float y, float z, float p3, int p4) { return _i(0xB812B3FD1C01CF27, x, y, z, p3, p4); } + static Void _0x011883F41211432A(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x011883F41211432A, p0, p1, p2, p3, p4, p5, p6); } + static Void set_cutscene_ped_component_variation(const char* cutsceneEntName, int p1, int p2, int p3, uint32_t modelHash) { return _i(0xBA01E7B6DEEFBBC9, cutsceneEntName, p1, p2, p3, modelHash); } + static Void _0x2A56C06EBEF2B0D9(const char* cutsceneEntName, Ped ped, uint32_t modelHash) { return _i(0x2A56C06EBEF2B0D9, cutsceneEntName, ped, modelHash); } + static Void set_cutscene_ped_prop_variation(const char* cutsceneEntName, int p1, int p2, int p3, uint32_t modelHash) { return _i(0x0546524ADE2E9723, cutsceneEntName, p1, p2, p3, modelHash); } + static Void set_cutscene_trigger_area(float p0, float p1, float p2, float p3, float p4, float p5) { return _i(0x9896CE4721BE84BA, p0, p1, p2, p3, p4, p5); } + static Void _0xC61B86C9F61EB404(bool toggle) { return _i(0xC61B86C9F61EB404, toggle); } + static Void _0x8D9DF6ECA8768583(int p0) { return _i(0x8D9DF6ECA8768583, p0); } + static Void _0x7F96F23FA9B73327(uint32_t modelHash) { return _i(0x7F96F23FA9B73327, modelHash); } + static Void start_cutscene(int p0) { return _i(0x186D5CB5E7B0FF7B, p0); } + static Void start_cutscene_at_coords(float x, float y, float z, int p3) { return _i(0x1C9ADDA3244A1FBF, x, y, z, p3); } + static Void stop_cutscene(bool p0) { return _i(0xC7272775B4DC786E, p0); } + static Void stop_cutscene_immediately() { return _i(0xD220BDD222AC4A1E); } + static bool was_cutscene_skipped() { return _i(0x40C8656EDAEDD569); } + + static Void array_value_add_boolean(Any* arrayData, bool value) { return _i(0xF8B0F5A43E928C76, arrayData, value); } + static Any* array_value_add_object(Any* arrayData) { return _i(0x6889498B3E19C797, arrayData); } + static Void array_value_add_float(Any* arrayData, float value) { return _i(0x57A995FD75D37F56, arrayData, value); } + static Void array_value_add_integer(Any* arrayData, int value) { return _i(0xCABDB751D86FE93B, arrayData, value); } + static Void array_value_add_string(Any* arrayData, const char* value) { return _i(0x2F0661C155AEEEAA, arrayData, value); } + static Void array_value_add_vector3(Any* arrayData, float valueX, float valueY, float valueZ) { return _i(0x407F8D034F70F0C2, arrayData, valueX, valueY, valueZ); } + static bool array_value_get_boolean(Any* arrayData, int arrayIndex) { return _i(0x50C1B2874E50C114, arrayData, arrayIndex); } + static int array_value_get_size(Any* arrayData) { return _i(0x065DB281590CEA2D, arrayData); } + static Any* array_value_get_object(Any* arrayData, int arrayIndex) { return _i(0x8B5FADCC4E3A145F, arrayData, arrayIndex); } + static float array_value_get_float(Any* arrayData, int arrayIndex) { return _i(0xC0C527B525D7CFB5, arrayData, arrayIndex); } + static int array_value_get_integer(Any* arrayData, int arrayIndex) { return _i(0x3E5AE19425CD74BE, arrayData, arrayIndex); } + static const char* array_value_get_string(Any* arrayData, int arrayIndex) { return _i(0xD3F2FFEB8D836F52, arrayData, arrayIndex); } + static int array_value_get_type(Any* arrayData, int arrayIndex) { return _i(0x3A0014ADB172A3C5, arrayData, arrayIndex); } + static math::vector3 array_value_get_vector3(Any* arrayData, int arrayIndex) { return _i>(0x8D2064E5B64A628A, arrayData, arrayIndex); } + static Any* object_value_add_array(Any* objectData, const char* key) { return _i(0x5B11728527CA6E5F, objectData, key); } + static Any* object_value_add_object(Any* objectData, const char* key) { return _i(0xA358F56F10732EE1, objectData, key); } + static Any* object_value_get_array(Any* objectData, const char* key) { return _i(0x7A983AA9DA2659ED, objectData, key); } + static bool object_value_get_boolean(Any* objectData, const char* key) { return _i(0x1186940ED72FFEEC, objectData, key); } + static Any* object_value_get_object(Any* objectData, const char* key) { return _i(0xB6B9DDC412FCEEE2, objectData, key); } + static float object_value_get_float(Any* objectData, const char* key) { return _i(0x06610343E73B9727, objectData, key); } + static int object_value_get_integer(Any* objectData, const char* key) { return _i(0x78F06F6B1FB5A80C, objectData, key); } + static const char* object_value_get_string(Any* objectData, const char* key) { return _i(0x3D2FD9E763B24472, objectData, key); } + static int object_value_get_type(Any* objectData, const char* key) { return _i(0x031C55ED33227371, objectData, key); } + static math::vector3 object_value_get_vector3(Any* objectData, const char* key) { return _i>(0x46CD3CB66E0825CC, objectData, key); } + static Void object_value_add_boolean(Any* objectData, const char* key, bool value) { return _i(0x35124302A556A325, objectData, key, value); } + static Void object_value_add_float(Any* objectData, const char* key, float value) { return _i(0xC27E1CC2D795105E, objectData, key, value); } + static Void object_value_add_integer(Any* objectData, const char* key, int value) { return _i(0xE7E035450A7948D5, objectData, key, value); } + static Void object_value_add_string(Any* objectData, const char* key, const char* value) { return _i(0x8FF3847DADD8E30C, objectData, key, value); } + static Void object_value_add_vector3(Any* objectData, const char* key, float valueX, float valueY, float valueZ) { return _i(0x4CD49B76338C7DEE, objectData, key, valueX, valueY, valueZ); } + static Void _0x6CC86E78358D5119() { return _i(0x6CC86E78358D5119); } + static Void datafile_create() { return _i(0xD27058A1CA2B13EE); } + static Void datafile_delete() { return _i(0x9AB9C1CFC8862DFB); } + static bool _0x8F5EA1C01D65A100(Any p0) { return _i(0x8F5EA1C01D65A100, p0); } + static Void _0xC55854C7D7274882() { return _i(0xC55854C7D7274882); } + static const char* datafile_get_file_dict() { return _i(0x906B778CA1DC72B6); } + static bool _0x15FF52B809DB2353(Any p0) { return _i(0x15FF52B809DB2353, p0); } + static bool _0xF8CC1EBE0B62E29F(Any p0) { return _i(0xF8CC1EBE0B62E29F, p0); } + static bool datafile_is_save_pending() { return _i(0xBEDB96A7584AA8CF); } + static bool _0xFCCAE5B92A830878(Any p0) { return _i(0xFCCAE5B92A830878, p0); } + static bool load_ugc_file(const char* filename) { return _i(0xC5238C011AF405E4, filename); } + static bool _0x22DA66936E0FFF37(Any p0) { return _i(0x22DA66936E0FFF37, p0); } + static bool _0x01095C95CD46B624(int p0) { return _i(0x01095C95CD46B624, p0); } + static bool _0xA69AC4ADE82B57A4(int p0) { return _i(0xA69AC4ADE82B57A4, p0); } + static bool _0x52818819057F2B40(int p0) { return _i(0x52818819057F2B40, p0); } + static bool _0x9CB0BFA7A9342C3D(int p0, bool p1) { return _i(0x9CB0BFA7A9342C3D, p0, p1); } + static bool _0x83BCCE3224735F05(const char* filename) { return _i(0x83BCCE3224735F05, filename); } + static Void _0x2ED61456317B8178() { return _i(0x2ED61456317B8178); } + static bool _0x4DFDD9EB705F8140(bool* p0) { return _i(0x4DFDD9EB705F8140, p0); } + static Void _0xAD6875BBC0FC899C(Any p0) { return _i(0xAD6875BBC0FC899C, p0); } + static bool _0xC84527E235FCA219(const char* p0, bool p1, const char* p2, Any* p3, Any* p4, const char* type, bool p6) { return _i(0xC84527E235FCA219, p0, p1, p2, p3, p4, type, p6); } + static bool _0xA5EFC3E847D60507(const char* p0, const char* p1, const char* p2, const char* p3, bool p4) { return _i(0xA5EFC3E847D60507, p0, p1, p2, p3, p4); } + static bool _0x692D808C34A82143(const char* p0, float p1, const char* type) { return _i(0x692D808C34A82143, p0, p1, type); } + static bool _0x648E7A5434AF7969(const char* p0, Any* p1, bool p2, Any* p3, Any* p4, Any* p5, const char* type) { return _i(0x648E7A5434AF7969, p0, p1, p2, p3, p4, p5, type); } + static bool _0x4645DE9980999E93(const char* p0, const char* p1, const char* p2, const char* p3, const char* type) { return _i(0x4645DE9980999E93, p0, p1, p2, p3, type); } + + static bool decor_exist_on(Entity entity, const char* propertyName) { return _i(0x05661B80A8C9165F, entity, propertyName); } + static bool decor_get_bool(Entity entity, const char* propertyName) { return _i(0xDACE671663F2F5DB, entity, propertyName); } + static float decor_get_float(Entity entity, const char* propertyName) { return _i(0x6524A2F114706F43, entity, propertyName); } + static int decor_get_int(Entity entity, const char* propertyName) { return _i(0xA06C969B02A97298, entity, propertyName); } + static bool decor_is_registered_as_type(const char* propertyName, int type) { return _i(0x4F14F9F870D6FBC8, propertyName, type); } + static Void decor_register(const char* propertyName, int type) { return _i(0x9FD90732F56403CE, propertyName, type); } + static Void decor_register_lock() { return _i(0xA9D14EEA259F9248); } + static bool decor_remove(Entity entity, const char* propertyName) { return _i(0x00EE9F297C738720, entity, propertyName); } + static bool decor_set_bool(Entity entity, const char* propertyName, bool value) { return _i(0x6B1E8E2ED1335B71, entity, propertyName, value); } + static bool decor_set_float(Entity entity, const char* propertyName, float value) { return _i(0x211AB1DD8D0F363A, entity, propertyName, value); } + static bool decor_set_int(Entity entity, const char* propertyName, int value) { return _i(0x0CE3AA5E1CA19E10, entity, propertyName, value); } + static bool decor_set_time(Entity entity, const char* propertyName, int timestamp) { return _i(0x95AED7B8E39ECAA4, entity, propertyName, timestamp); } + + static bool _0x241FCA5B1AA14F75() { return _i(0x241FCA5B1AA14F75); } + static Any _0x8D30F648014A92B5() { return _i(0x8D30F648014A92B5); } + static bool get_is_loading_screen_active() { return _i(0x10D0A8F259E93EC9); } + static bool nullify(Any* variable, Any unused) { return _i(0x46E2B844905BC5F0, variable, unused); } + static bool _0xF2E07819EF1A5289() { return _i(0xF2E07819EF1A5289); } + static Any _0xA213B11DFF526300() { return _i(0xA213B11DFF526300); } + static bool is_dlc_present(uint32_t dlcHash) { return _i(0x812595A0644CE1DE, dlcHash); } + static Void load_mp_dlc_maps() { return _i(0x0888C3502DBBEEF5); } + static Void load_sp_dlc_maps() { return _i(0xD7C10C4A637992C9); } + static Any _0x9489659372A81585() { return _i(0x9489659372A81585); } + + static Void apply_force_to_entity(Entity entity, int forceFlags, float x, float y, float z, float offX, float offY, float offZ, int p8, bool isLocal, bool p10, bool isMassRel, bool p12, bool p13) { return _i(0xC5F68BE9613E2D18, entity, forceFlags, x, y, z, offX, offY, offZ, p8, isLocal, p10, isMassRel, p12, p13); } + static Void apply_force_to_entity_center_of_mass(Entity entity, int forceType, float x, float y, float z, bool p5, bool isRel, bool highForce, bool p8) { return _i(0x18FF00FC7EFF559E, entity, forceType, x, y, z, p5, isRel, highForce, p8); } + static Void _0x5C48B75732C8456C(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0x5C48B75732C8456C, p0, p1, p2, p3, p4, p5); } + static Void _0xFD1695C5D3B05439(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0xFD1695C5D3B05439, p0, p1, p2, p3, p4, p5); } + static Void attach_entity_to_entity(Entity entity1, Entity entity2, int boneIndex, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, bool p9, bool useSoftPinning, bool collision, bool isPed, int vertexIndex, bool fixedRot) { return _i(0x6B9BBD38AB0796DF, entity1, entity2, boneIndex, xPos, yPos, zPos, xRot, yRot, zRot, p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot); } + static Void attach_entity_to_entity_physically(Entity entity1, Entity entity2, int boneIndex1, int boneIndex2, float xPos1, float yPos1, float zPos1, float xPos2, float yPos2, float zPos2, float xRot, float yRot, float zRot, float breakForce, bool fixedRot, bool p15, bool collision, bool p17, int p18) { return _i(0xC3675780C92F90F9, entity1, entity2, boneIndex1, boneIndex2, xPos1, yPos1, zPos1, xPos2, yPos2, zPos2, xRot, yRot, zRot, breakForce, fixedRot, p15, collision, p17, p18); } + static Void clear_entity_last_damage_entity(Entity entity) { return _i(0xA72CD9CA74A5ECBA, entity); } + static Void create_forced_object(float x, float y, float z, Any p3, uint32_t modelHash, bool p5) { return _i(0x150E808B375A385A, x, y, z, p3, modelHash, p5); } + static Void create_model_hide(float x, float y, float z, float radius, uint32_t model, bool p5) { return _i(0x8A97BCA30A0CE478, x, y, z, radius, model, p5); } + static Void create_model_hide_excluding_script_objects(float x, float y, float z, float radius, uint32_t model, bool p5) { return _i(0x3A52AE588830BF7F, x, y, z, radius, model, p5); } + static Void create_model_swap(float x, float y, float z, float radius, uint32_t originalModel, uint32_t newModel, bool p6) { return _i(0x92C47782FDA8B2A3, x, y, z, radius, originalModel, newModel, p6); } + static Void delete_entity(Entity* entity) { return _i(0xAE3CBE5BF394C9C9, entity); } + static Void detach_entity(Entity entity, bool p1, bool collision) { return _i(0x961AC54BF0613F5D, entity, p1, collision); } + static bool does_entity_belong_to_this_script(Entity entity, bool p1) { return _i(0xDDE6DF5AE89981D2, entity, p1); } + static bool does_entity_exist(Entity entity) { return _i(0x7239B21A38F536BA, entity); } + static bool does_entity_have_drawable(Entity entity) { return _i(0x060D6E96F8B8E48D, entity); } + static bool does_entity_have_physics(Entity entity) { return _i(0xDA95EA3317CC5064, entity); } + static Void _0x6CE177D014502E8A(Any p0) { return _i(0x6CE177D014502E8A, p0); } + static bool find_anim_event_phase(const char* animDictionary, const char* animName, const char* p2, Any* p3, Any* p4) { return _i(0x07F1BE2BCCAA27A7, animDictionary, animName, p2, p3, p4); } + static Void force_entity_ai_and_animation_update(Entity entity) { return _i(0x40FDEDB72F8293B2, entity); } + static Void freeze_entity_position(Entity entity, bool toggle) { return _i(0x428CA6DBD1094446, entity, toggle); } + static float get_anim_duration(const char* animDict, const char* animName) { return _i(0xFEDDF04D62B8D790, animDict, animName); } + static math::vector3 get_collision_normal_of_last_hit_for_entity(Entity entity) { return _i>(0xE465D4AB7CA6AE72, entity); } + static int get_entity_alpha(Entity entity) { return _i(0x5A47B3B5E63E94C6, entity); } + static float get_entity_anim_current_time(Entity entity, const char* animDict, const char* animName) { return _i(0x346D81500D088F42, entity, animDict, animName); } + static float get_entity_anim_total_time(Entity entity, const char* animDict, const char* animName) { return _i(0x50BD2730B191E360, entity, animDict, animName); } + static Entity get_entity_attached_to(Entity entity) { return _i(0x48C2BED9180FE123, entity); } + static Any _0xB328DCC3A3AA401B(Any p0) { return _i(0xB328DCC3A3AA401B, p0); } + static int get_entity_bone_index_by_name(Entity entity, const char* boneName) { return _i(0xFB71170B7E76ACBA, entity, boneName); } + static math::vector3 _0x46F8696933A63C9B(Any p0, Any p1) { return _i>(0x46F8696933A63C9B, p0, p1); } + static math::vector3 _0xCE6294A232D03786(Any p0, Any p1) { return _i>(0xCE6294A232D03786, p0, p1); } + static Any _0xD95CC5D2AB15A09F(Any p0) { return _i(0xD95CC5D2AB15A09F, p0); } + static bool get_entity_collision_disabled(Entity entity) { return _i(0xCCF1E97BEFDAE480, entity); } + static math::vector3 get_entity_coords(Entity entity, bool alive) { return _i>(0x3FEF770D40960D5A, entity, alive); } + static math::vector3 get_entity_forward_vector(Entity entity) { return _i>(0x0A794A5A57F8DF91, entity); } + static float get_entity_forward_x(Entity entity) { return _i(0x8BB4EF4214E0E6D5, entity); } + static float get_entity_forward_y(Entity entity) { return _i(0x866A4A5FAE349510, entity); } + static float get_entity_heading(Entity entity) { return _i(0xE83D4F9BA2A38914, entity); } + static float get_entity_physics_heading(Entity entity) { return _i(0x846BF6291198A71E, entity); } + static int get_entity_health(Entity entity) { return _i(0xEEF059FAD016D209, entity); } + static float get_entity_height(Entity entity, float X, float Y, float Z, bool atTop, bool inWorldCoords) { return _i(0x5A504562485944DD, entity, X, Y, Z, atTop, inWorldCoords); } + static float get_entity_height_above_ground(Entity entity) { return _i(0x1DD55701034110E5, entity); } + static int get_entity_lod_dist(Entity entity) { return _i(0x4159C2762B5791D6, entity); } + static Void get_entity_matrix(Entity entity, math::vector3* rightVector, math::vector3* forwardVector, math::vector3* upVector, math::vector3* position) { return _i(0xECB2FC7235A7D137, entity, rightVector, forwardVector, upVector, position); } + static int get_entity_max_health(Entity entity) { return _i(0x15D757606D170C3C, entity); } + static uint32_t get_entity_model(Entity entity) { return _i(0x9F47B058362C84B5, entity); } + static Any _0x1F922734E259BD26(Any p0, Any p1) { return _i(0x1F922734E259BD26, p0, p1); } + static float get_entity_pitch(Entity entity) { return _i(0xD45DC2893621E1FE, entity); } + static int get_entity_population_type(Entity entity) { return _i(0xF6F5161F4534EDFF, entity); } + static Void get_entity_quaternion(Entity entity, float* x, float* y, float* z, float* w) { return _i(0x7B3703D2D32DFA18, entity, x, y, z, w); } + static float get_entity_roll(Entity entity) { return _i(0x831E0242595560DF, entity); } + static math::vector3 get_entity_rotation(Entity entity, int rotationOrder) { return _i>(0xAFBD61CC738D9EB9, entity, rotationOrder); } + static math::vector3 get_entity_rotation_velocity(Entity entity) { return _i>(0x213B91045D09B983, entity); } + static const char* get_entity_script(Entity entity, ScrHandle* script) { return _i(0xA6E9C38DB51D7748, entity, script); } + static float get_entity_speed(Entity entity) { return _i(0xD5037BA82E12416F, entity); } + static math::vector3 get_entity_speed_vector(Entity entity, bool relative) { return _i>(0x9A8D700A51CB7B0D, entity, relative); } + static float get_entity_submerged_level(Entity entity) { return _i(0xE81AFC1BC4CC41CE, entity); } + static int get_entity_type(Entity entity) { return _i(0x8ACD366038D14505, entity); } + static float get_entity_upright_value(Entity entity) { return _i(0x95EED5A694951F9F, entity); } + static math::vector3 get_entity_velocity(Entity entity) { return _i>(0x4805D2B1D8CF94A9, entity); } + static uint32_t get_last_material_hit_by_entity(Entity entity) { return _i(0x5C3D0A935F535C4C, entity); } + static Player get_nearest_player_to_entity(Entity entity) { return _i(0x7196842CB375CDB3, entity); } + static Player get_nearest_player_to_entity_on_team(Entity entity, int team) { return _i(0x4DC9A62F844D9337, entity, team); } + static math::vector3 get_offset_from_entity_given_world_coords(Entity entity, float posX, float posY, float posZ) { return _i>(0x2274BC1C4885E333, entity, posX, posY, posZ); } + static math::vector3 get_offset_from_entity_in_world_coords(Entity entity, float offsetX, float offsetY, float offsetZ) { return _i>(0x1899F328B0E12848, entity, offsetX, offsetY, offsetZ); } + static Object get_object_index_from_entity_index(Entity entity) { return _i(0xD7E3B9735C0F89D6, entity); } + static Ped get_ped_index_from_entity_index(Entity entity) { return _i(0x04A2A40C73395041, entity); } + static Vehicle get_vehicle_index_from_entity_index(Entity entity) { return _i(0x4B53F92932ADFAC0, entity); } + static math::vector3 get_world_position_of_entity_bone(Entity entity, int boneIndex) { return _i>(0x44A8FCB8ED227738, entity, boneIndex); } + static bool has_anim_event_fired(Entity entity, uint32_t actionHash) { return _i(0xEAF4CD9EA3E7E922, entity, actionHash); } + static bool has_collision_loaded_around_entity(Entity entity) { return _i(0xE9676F61BC0B3321, entity); } + static bool has_entity_anim_finished(Entity entity, const char* animDict, const char* animName, int p3) { return _i(0x20B711662962B472, entity, animDict, animName, p3); } + static bool has_entity_been_damaged_by_any_object(Entity entity) { return _i(0x95EB9964FF5C5C65, entity); } + static bool has_entity_been_damaged_by_any_ped(Entity entity) { return _i(0x605F5A140F202491, entity); } + static bool has_entity_been_damaged_by_any_vehicle(Entity entity) { return _i(0xDFD5033FDBA0A9C8, entity); } + static bool has_entity_been_damaged_by_entity(Entity entity1, Entity entity2, bool p2) { return _i(0xC86D67D52A707CF8, entity1, entity2, p2); } + static bool has_entity_clear_los_to_entity(Entity entity1, Entity entity2, int traceType) { return _i(0xFCDFF7B72D23A1AC, entity1, entity2, traceType); } + static bool has_entity_clear_los_to_entity_in_front(Entity entity1, Entity entity2) { return _i(0x0267D00AF114F17A, entity1, entity2); } + static bool has_entity_collided_with_anything(Entity entity) { return _i(0x8BAD02F0368D9E14, entity); } + static bool is_an_entity(int handle) { return _i(0x731EC8A916BD11A1, handle); } + static bool is_entity_an_object(Entity entity) { return _i(0x8D68C8FD0FACA94E, entity); } + static bool is_entity_attached(Entity entity) { return _i(0xB346476EF1A64897, entity); } + static bool is_entity_attached_to_any_object(Entity entity) { return _i(0xCF511840CEEDE0CC, entity); } + static bool is_entity_attached_to_any_ped(Entity entity) { return _i(0xB1632E9A5F988D11, entity); } + static bool is_entity_attached_to_any_vehicle(Entity entity) { return _i(0x26AA915AD89BFB4B, entity); } + static bool is_entity_attached_to_entity(Entity from, Entity to) { return _i(0xEFBE71898A993728, from, to); } + static bool is_entity_at_coord(Entity entity, float xPos, float yPos, float zPos, float xSize, float ySize, float zSize, bool p7, bool p8, int p9) { return _i(0x20B60995556D004F, entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9); } + static bool is_entity_at_entity(Entity entity1, Entity entity2, float xSize, float ySize, float zSize, bool p5, bool p6, int p7) { return _i(0x751B70C3D034E187, entity1, entity2, xSize, ySize, zSize, p5, p6, p7); } + static bool is_entity_a_mission_entity(Entity entity) { return _i(0x0A7B270912999B3C, entity); } + static bool is_entity_a_ped(Entity entity) { return _i(0x524AC5ECEA15343E, entity); } + static bool is_entity_a_vehicle(Entity entity) { return _i(0x6AC7003FA6E5575E, entity); } + static bool is_entity_dead(Entity entity, Any p1) { return _i(0x5F9532F3B5CC2551, entity, p1); } + static bool is_entity_in_air(Entity entity) { return _i(0x886E37EC497200B6, entity); } + static bool is_entity_in_angled_area(Entity entity, float originX, float originY, float originZ, float edgeX, float edgeY, float edgeZ, float angle, bool p8, bool p9, Any p10) { return _i(0x51210CED3DA1C78A, entity, originX, originY, originZ, edgeX, edgeY, edgeZ, angle, p8, p9, p10); } + static bool is_entity_in_area(Entity entity, float x1, float y1, float z1, float x2, float y2, float z2, bool p7, bool p8, Any p9) { return _i(0x54736AA40E271165, entity, x1, y1, z1, x2, y2, z2, p7, p8, p9); } + static bool is_entity_in_water(Entity entity) { return _i(0xCFB0A0D8EDD145A3, entity); } + static bool is_entity_in_zone(Entity entity, const char* zone) { return _i(0xB6463CF6AF527071, entity, zone); } + static bool is_entity_occluded(Entity entity) { return _i(0xE31C2C72B8692B64, entity); } + static bool is_entity_on_screen(Entity entity) { return _i(0xE659E47AF827484B, entity); } + static bool is_entity_playing_anim(Entity entity, const char* animDict, const char* animName, int p4) { return _i(0x1F0B79228E461EC9, entity, animDict, animName, p4); } + static bool is_entity_static(Entity entity) { return _i(0x1218E6886D3D8327, entity); } + static bool is_entity_touching_entity(Entity entity, Entity targetEntity) { return _i(0x17FFC1B2BA35A494, entity, targetEntity); } + static bool is_entity_touching_model(Entity entity, uint32_t modelHash) { return _i(0x0F42323798A58C8C, entity, modelHash); } + static bool is_entity_upright(Entity entity, float angle) { return _i(0x5333F526F6AB19AA, entity, angle); } + static bool is_entity_upsidedown(Entity entity) { return _i(0x1DBD58820FA61D71, entity); } + static bool is_entity_visible(Entity entity) { return _i(0x47D6F43D77935C75, entity); } + static bool is_entity_visible_to_script(Entity entity) { return _i(0xD796CB5BA8F20E32, entity); } + static bool is_entity_waiting_for_world_collision(Entity entity) { return _i(0xD05BFF0C0A12C68F, entity); } + static bool play_entity_anim(Entity entity, const char* animName, const char* animDict, float p3, bool loop, bool stayInAnim, bool p6, float delta, Any bitset) { return _i(0x7FB218262B810701, entity, animName, animDict, p3, loop, stayInAnim, p6, delta, bitset); } + static bool play_synchronized_entity_anim(Entity entity, int syncedScene, const char* animation, const char* propName, float p4, float p5, Any p6, float p7) { return _i(0xC77720A12FE14A86, entity, syncedScene, animation, propName, p4, p5, p6, p7); } + static bool play_synchronized_map_entity_anim(float p0, float p1, float p2, float p3, Any p4, Any p5, Any* p6, Any* p7, float p8, float p9, Any p10, float p11) { return _i(0xB9C54555ED30FBC4, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } + static Void process_entity_attachments(Entity entity) { return _i(0xF4080490ADC51C6F, entity); } + static Void remove_forced_object(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x61B6775E83C0DB6F, p0, p1, p2, p3, p4); } + static Void remove_model_hide(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0xD9E3006FB3CBD765, p0, p1, p2, p3, p4, p5); } + static Void remove_model_swap(float x, float y, float z, float radius, uint32_t originalModel, uint32_t newModel, bool p6) { return _i(0x033C0F9A64E229AE, x, y, z, radius, originalModel, newModel, p6); } + static Void reset_entity_alpha(Entity entity) { return _i(0x9B1E824FFBB7027A, entity); } + static Void _0x490861B88F4FD846(Any p0) { return _i(0x490861B88F4FD846, p0); } + static Void _0x36F32DE87082343E(Any p0, Any p1) { return _i(0x36F32DE87082343E, p0, p1); } + static Void _0xE12ABE5E3A389A6C(Entity entity, bool p1) { return _i(0xE12ABE5E3A389A6C, entity, p1); } + static Void _0xA80AE305E0A3044F(Entity entity, bool p1) { return _i(0xA80AE305E0A3044F, entity, p1); } + static Void set_entity_alpha(Entity entity, int alphaLevel, bool skin) { return _i(0x44A0870B7E92D7C0, entity, alphaLevel, skin); } + static Void set_entity_always_prerender(Entity entity, bool toggle) { return _i(0xACAD101E1FB66689, entity, toggle); } + static Void set_entity_anim_current_time(Entity entity, const char* animDictionary, const char* animName, float time) { return _i(0x4487C259F0F70977, entity, animDictionary, animName, time); } + static Void set_entity_anim_speed(Entity entity, const char* animDictionary, const char* animName, float speedMultiplier) { return _i(0x28D1A16553C51776, entity, animDictionary, animName, speedMultiplier); } + static Void set_entity_as_mission_entity(Entity entity, bool p1, bool p2) { return _i(0xAD738C3085FE7E11, entity, p1, p2); } + static Void _0x68B562E124CC0AEF(Any p0, Any p1) { return _i(0x68B562E124CC0AEF, p0, p1); } + static Void set_entity_can_be_damaged(Entity entity, bool toggle) { return _i(0x1760FFA8AB074D66, entity, toggle); } + static Void set_entity_can_be_damaged_by_relationship_group(Entity entity, bool bCanBeDamaged, int relGroup) { return _i(0xE22D8FDE858B8119, entity, bCanBeDamaged, relGroup); } + static Void set_entity_can_be_targeted_without_los(Entity entity, bool toggle) { return _i(0xD3997889736FD899, entity, toggle); } + static Void _0xB17BC6453F6CF5AC(Any p0, Any p1) { return _i(0xB17BC6453F6CF5AC, p0, p1); } + static Void _0x352E2B5CF420BF3B(Any p0, Any p1) { return _i(0x352E2B5CF420BF3B, p0, p1); } + static Void set_entity_collision(Entity entity, bool toggle, bool keepPhysics) { return _i(0x1A9205C1B9EE827F, entity, toggle, keepPhysics); } + static Void _0x9EBC85ED0FFFE51C(Entity entity, bool p1, bool p2) { return _i(0x9EBC85ED0FFFE51C, entity, p1, p2); } + static Void set_entity_coords(Entity entity, float xPos, float yPos, float zPos, bool xAxis, bool yAxis, bool zAxis, bool clearArea) { return _i(0x06843DA7060A026B, entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea); } + static Void set_entity_coords_no_offset(Entity entity, float xPos, float yPos, float zPos, bool xAxis, bool yAxis, bool zAxis) { return _i(0x239A3351AC1DA385, entity, xPos, yPos, zPos, xAxis, yAxis, zAxis); } + static Void set_entity_coords2(Entity entity, float xPos, float yPos, float zPos, bool xAxis, bool yAxis, bool zAxis, bool clearArea) { return _i(0x621873ECE1178967, entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea); } + static Void set_entity_dynamic(Entity entity, bool toggle) { return _i(0x1718DE8E3F2823CA, entity, toggle); } + static Void set_entity_has_gravity(Entity entity, bool toggle) { return _i(0x4A4722448F18EEF5, entity, toggle); } + static Void set_entity_heading(Entity entity, float heading) { return _i(0x8E2530AA8ADA980E, entity, heading); } + static Void set_entity_health(Entity entity, int health) { return _i(0x6B76DC1F3AE6E6A3, entity, health); } + static Void set_entity_invincible(Entity entity, bool toggle) { return _i(0x3882114BDE571AD4, entity, toggle); } + static Void _0x78E8E3A640178255(Entity entity) { return _i(0x78E8E3A640178255, entity); } + static Void set_entity_is_target_priority(Entity entity, bool p1, float p2) { return _i(0xEA02E132F5C68722, entity, p1, p2); } + static Void set_entity_lights(Entity entity, bool toggle) { return _i(0x7CFBA6A80BDF3874, entity, toggle); } + static Void set_entity_load_collision_flag(Entity entity, bool toggle, Any p2) { return _i(0x0DC7CABAB1E9B67E, entity, toggle, p2); } + static Void set_entity_lod_dist(Entity entity, int value) { return _i(0x5927F96A78577363, entity, value); } + static Void set_entity_max_health(Entity entity, int value) { return _i(0x166E7CF68597D8B5, entity, value); } + static Void set_entity_max_speed(Entity entity, float speed) { return _i(0x0E46A3FCBDE2A1B1, entity, speed); } + static Void set_entity_motion_blur(Entity entity, bool toggle) { return _i(0x295D82A8559F9150, entity, toggle); } + static Void _0x2C2E3DC128F44309(Entity entity, bool p1) { return _i(0x2C2E3DC128F44309, entity, p1); } + static Void set_entity_no_collision_entity(Entity entity1, Entity entity2, bool unknown) { return _i(0xA53ED5520C07654A, entity1, entity2, unknown); } + static Void set_entity_only_damaged_by_player(Entity entity, bool toggle) { return _i(0x79F020FF9EDC0748, entity, toggle); } + static Void set_entity_only_damaged_by_relationship_group(Entity entity, bool p1, Any p2) { return _i(0x7022BD828FA0B082, entity, p1, p2); } + static Void set_entity_proofs(Entity entity, bool bulletProof, bool fireProof, bool explosionProof, bool collisionProof, bool meleeProof, bool p6, bool p7, bool drownProof) { return _i(0xFAEE099C6F890BB8, entity, bulletProof, fireProof, explosionProof, collisionProof, meleeProof, p6, p7, drownProof); } + static Void set_entity_quaternion(Entity entity, float x, float y, float z, float w) { return _i(0x77B21BE7AC540F07, entity, x, y, z, w); } + static Void set_entity_records_collisions(Entity entity, bool toggle) { return _i(0x0A50A1EEDAD01E65, entity, toggle); } + static Void set_entity_render_scorched(Entity entity, bool toggle) { return _i(0x730F5F8D3F0F2050, entity, toggle); } + static Void _0x694E00132F2823ED(Entity entity, bool p1) { return _i(0x694E00132F2823ED, entity, p1); } + static Void set_entity_rotation(Entity entity, float pitch, float roll, float yaw, int rotationOrder, bool p5) { return _i(0x8524A8B0171D5E07, entity, pitch, roll, yaw, rotationOrder, p5); } + static Void set_entity_something(Entity entity, bool toggle) { return _i(0x3910051CCECDB00C, entity, toggle); } + static Void _0x5C3B791D580E0BC2(Entity entity, float p1) { return _i(0x5C3B791D580E0BC2, entity, p1); } + static Void set_entity_trafficlight_override(Entity entity, int state) { return _i(0x57C5DB656185EAC4, entity, state); } + static Void _0x1A092BB0C3808B96(Entity entity, bool p1) { return _i(0x1A092BB0C3808B96, entity, p1); } + static Void set_entity_velocity(Entity entity, float x, float y, float z) { return _i(0x1C99BB7B6E96D16F, entity, x, y, z); } + static Void set_entity_visible(Entity entity, bool toggle, bool unk) { return _i(0xEA1C610A04DB6BBB, entity, toggle, unk); } + static Void _0xC34BC448DA29F5E9(Any p0, Any p1) { return _i(0xC34BC448DA29F5E9, p0, p1); } + static Void _0xCEA7C8E1B48FF68C(Any p0, Any p1) { return _i(0xCEA7C8E1B48FF68C, p0, p1); } + static Void _0xD7B80E7C3BEFC396(Any p0, Any p1) { return _i(0xD7B80E7C3BEFC396, p0, p1); } + static Void set_entity_as_no_longer_needed(Entity* entity) { return _i(0xB736A491E64A32CF, entity); } + static Void set_ped_as_no_longer_needed(Ped* ped) { return _i(0x2595DD4236549CE3, ped); } + static Void set_vehicle_as_no_longer_needed(Vehicle* vehicle) { return _i(0x629BFA74418D6239, vehicle); } + static Void set_object_as_no_longer_needed(Object* object) { return _i(0x3AE22DEB5BA5A3E6, object); } + static Void _0xDC6F8601FAF2E893(Entity entity, bool p1) { return _i(0xDC6F8601FAF2E893, entity, p1); } + static Any stop_entity_anim(Entity entity, const char* animation, const char* animGroup, float p3) { return _i(0x28004F88151E03E0, entity, animation, animGroup, p3); } + static bool stop_synchronized_entity_anim(Entity entity, float p1, bool p2) { return _i(0x43D3807C077261E3, entity, p1, p2); } + static bool stop_synchronized_map_entity_anim(float p0, float p1, float p2, float p3, Any p4, float p5) { return _i(0x11E79CAB7183B6F5, p0, p1, p2, p3, p4, p5); } + static bool would_entity_be_occluded(uint32_t entityModelHash, float x, float y, float z, bool p4) { return _i(0xEE5D2A122E09EC42, entityModelHash, x, y, z, p4); } + + static ScrHandle add_shocking_event_at_position(int type, float x, float y, float z, float duration) { return _i(0xD9F8455409B525E9, type, x, y, z, duration); } + static ScrHandle add_shocking_event_for_entity(int type, Entity entity, float duration) { return _i(0x7FD8F3BE76F89422, type, entity, duration); } + static Void block_decision_maker_event(uint32_t name, int type) { return _i(0xE42FCDFD0E4196F7, name, type); } + static Void clear_decision_maker_event_response(uint32_t name, int type) { return _i(0x4FC9381A7AEE8968, name, type); } + static bool is_shocking_event_in_sphere(int type, float x, float y, float z, float radius) { return _i(0x1374ABB7C15BAB92, type, x, y, z, radius); } + static Void remove_all_shocking_events(bool p0) { return _i(0xEAABE8FDFA21274C, p0); } + static bool remove_shocking_event(ScrHandle event) { return _i(0x2CDA538C44C6CCE5, event); } + static Void remove_shocking_event_spawn_blocking_areas() { return _i(0x340F1415B68AEADE); } + static Void set_decision_maker(Ped ped, uint32_t name) { return _i(0xB604A2942ADED0EE, ped, name); } + static Void suppress_agitation_events_next_frame() { return _i(0x5F3B7749C112D552); } + static Void suppress_shocking_events_next_frame() { return _i(0x2F9A292AD0A3BD89); } + static Void suppress_shocking_event_type_next_frame(int type) { return _i(0x3FD2EC8BF1F1CF30, type); } + static Void unblock_decision_maker_event(uint32_t name, int type) { return _i(0xD7CD9CF34F2C99E8, name, type); } + + static bool _0x341DE7ED1D2A1BFD(uint32_t componentHash, uint32_t drawableSlotHash, int componentId) { return _i(0x341DE7ED1D2A1BFD, componentHash, drawableSlotHash, componentId); } + static bool get_dlc_vehicle_data(int dlcVehicleIndex, int* outData) { return _i(0x33468EDC08E371F6, dlcVehicleIndex, outData); } + static int get_dlc_vehicle_flags(int dlcVehicleIndex) { return _i(0x5549EE11FA22FCF2, dlcVehicleIndex); } + static uint32_t get_dlc_vehicle_model(int dlcVehicleIndex) { return _i(0xECC01B7C5763333C, dlcVehicleIndex); } + static int _0xC098810437312FFF(int modData) { return _i(0xC098810437312FFF, modData); } + static bool get_dlc_weapon_component_data(int dlcWeaponIndex, int dlcWeapCompIndex, int* ComponentDataPtr) { return _i(0x6CF598A2957C2BF8, dlcWeaponIndex, dlcWeapCompIndex, ComponentDataPtr); } + static bool get_dlc_weapon_data(int dlcWeaponIndex, int* outData) { return _i(0x79923CD21BECE14E, dlcWeaponIndex, outData); } + static Void get_forced_component(uint32_t componentHash, int componentId, Any* p2, Any* p3, Any* p4) { return _i(0x6C93ED8C2F74859B, componentHash, componentId, p2, p3, p4); } + static Void _0xE1CA84EBF72E691D(Any p0, Any p1, Any* p2, Any* p3, Any* p4) { return _i(0xE1CA84EBF72E691D, p0, p1, p2, p3, p4); } + static uint32_t get_hash_name_for_component(Entity entity, int componentId, int drawableVariant, int textureVariant) { return _i(0x0368B3A838070348, entity, componentId, drawableVariant, textureVariant); } + static uint32_t get_hash_name_for_prop(Entity entity, int componentId, int propIndex, int propTextureIndex) { return _i(0x5D6160275CAEC8DD, entity, componentId, propIndex, propTextureIndex); } + static int get_num_dlc_vehicles() { return _i(0xA7A866D21CD2329B); } + static int get_num_dlc_weapons() { return _i(0xEE47635F352DA367); } + static int get_num_dlc_weapon_components(int dlcWeaponIndex) { return _i(0x405425358A7D61FE, dlcWeaponIndex); } + static int get_num_decorations(int character) { return _i(0x278F76C3B0A8F109, character); } + static int get_num_forced_components(uint32_t componentHash) { return _i(0xC6B9DB42C04DD8C3, componentHash); } + static Any _0x017568A8182D98A6(Any p0) { return _i(0x017568A8182D98A6, p0); } + static int _0xC17AD0E5752BECDA(uint32_t componentHash) { return _i(0xC17AD0E5752BECDA, componentHash); } + static Any _0xD40AAC51E8E4C663(Any p0) { return _i(0xD40AAC51E8E4C663, p0); } + static Void get_shop_ped_component(uint32_t p0, Any* p1) { return _i(0x74C0E2A57EC66760, p0, p1); } + static Void get_shop_ped_outfit(Any p0, Any* p1) { return _i(0xB7952076E444979D, p0, p1); } + static bool get_prop_from_outfit(Any outfit, int slot, Any* item) { return _i(0x19F2A026EDF0013F, outfit, slot, item); } + static Any get_shop_ped_outfit_locate(Any p0) { return _i(0x073CA26B079F956E, p0); } + static bool _0xA9F9C2E0FDE11CBB(Any p0, Any p1, Any* p2) { return _i(0xA9F9C2E0FDE11CBB, p0, p1, p2); } + static Void _0x5D5CAFF661DDF6FC(Any p0, Any* p1) { return _i(0x5D5CAFF661DDF6FC, p0, p1); } + static Void get_shop_ped_query_component(int componentId, int* outComponent) { return _i(0x249E310B2D920699, componentId, outComponent); } + static Void get_shop_ped_query_outfit(Any p0, Any* outfit) { return _i(0x6D793F03A631FE56, p0, outfit); } + static Void get_shop_ped_query_prop(Any p0, Any* p1) { return _i(0xDE44A00999B2837D, p0, p1); } + static bool _0xFF56381874F82086(int p0, int p1, int* outComponent) { return _i(0xFF56381874F82086, p0, p1, outComponent); } + static Void get_variant_component(uint32_t componentHash, int componentId, Any* p2, Any* p3, Any* p4) { return _i(0x6E11F282F11863B6, componentHash, componentId, p2, p3, p4); } + static Void _0xD81B7F27BC773E66(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xD81B7F27BC773E66, p0, p1, p2, p3, p4); } + static Void init_shop_ped_component(int* outComponent) { return _i(0x1E8C308FD312C036, outComponent); } + static Void init_shop_ped_prop(int* outProp) { return _i(0xEB0A2B758F7B850F, outProp); } + static bool is_dlc_data_empty(int dlcData) { return _i(0xD4D7B033C3AA243C, dlcData); } + static bool is_dlc_vehicle_mod(int modData) { return _i(0x0564B9FF9631B82C, modData); } + static int _0x50F457823CE6EB5F(int p0, int p1, int p2, int p3) { return _i(0x50F457823CE6EB5F, p0, p1, p2, p3); } + static int get_num_props_from_outfit(int character, int p1, int p2, bool p3, int p4, int componentId) { return _i(0x9BDF59818B1E38C1, character, p1, p2, p3, p4, componentId); } + static int _0xF3FBE2D50A6A8C28(int character, bool p1) { return _i(0xF3FBE2D50A6A8C28, character, p1); } + + static void add_owned_explosion(Ped ped, float x, float y, float z, int explosionType, float damageScale, bool isAudible, bool isInvisible, float cameraShake) { _i(0x172AA1B624FA1013, ped, x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake); } + static Void add_explosion(float x, float y, float z, int explosionType, float damageScale, bool isAudible, bool isInvisible, float cameraShake, bool noDamage) { return _i(0xE3AD2BDBAEE269AC, x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake, noDamage); } + static Void add_explosion_with_user_vfx(float x, float y, float z, int explosionType, uint32_t explosionFx, float damageScale, bool isAudible, bool isInvisible, float cameraShake) { return _i(0x36DD3FE58B5E5212, x, y, z, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake); } + static bool get_closest_fire_pos(math::vector3* outPosition, float x, float y, float z) { return _i(0x352A9F6BCF90081F, outPosition, x, y, z); } + static int get_number_of_fires_in_range(float x, float y, float z, float radius) { return _i(0x50CAD495A460B305, x, y, z, radius); } + static Entity get_ped_inside_explosion_area(int explosionType, float x1, float y1, float z1, float x2, float y2, float z2, float radius) { return _i(0x14BA4BA137AF6CEC, explosionType, x1, y1, z1, x2, y2, z2, radius); } + static bool is_entity_on_fire(Entity entity) { return _i(0x28D3FED7190D3A0B, entity); } + static Any _0x6070104B699B2EF4(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x6070104B699B2EF4, p0, p1, p2, p3, p4, p5, p6); } + static bool is_explosion_in_angled_area(int explosionType, float x1, float y1, float z1, float x2, float y2, float z2, float angle) { return _i(0xA079A6C51525DC4B, explosionType, x1, y1, z1, x2, y2, z2, angle); } + static bool is_explosion_in_area(int explosionType, float x1, float y1, float z1, float x2, float y2, float z2) { return _i(0x2E2EBA0EE7CED0E0, explosionType, x1, y1, z1, x2, y2, z2); } + static bool is_explosion_in_sphere(int explosionType, float x, float y, float z, float radius) { return _i(0xAB0F816885B0E483, explosionType, x, y, z, radius); } + static Void remove_script_fire(int fireHandle) { return _i(0x7FF548385680673F, fireHandle); } + static Any start_entity_fire(Entity entity) { return _i(0xF6A9D9708F6F23DF, entity); } + static int start_script_fire(float X, float Y, float Z, int maxChildren, bool isGasFire) { return _i(0x6B83617E04503888, X, Y, Z, maxChildren, isGasFire); } + static Void stop_entity_fire(Entity entity) { return _i(0x7F0DD2EBBB651AFF, entity); } + static Void stop_fire_in_range(float x, float y, float z, float radius) { return _i(0x056A8A219B8E829F, x, y, z, radius); } + + static Any _0x82ACC484FFA3B05F(Any p0) { return _i(0x82ACC484FFA3B05F, p0); } + static int add_decal(int decalType, float posX, float posY, float posZ, float p4, float p5, float p6, float p7, float p8, float p9, float width, float height, float rCoef, float gCoef, float bCoef, float opacity, float timeout, bool p17, bool p18, bool p19) { return _i(0xB302244A1839BDAD, decalType, posX, posY, posZ, p4, p5, p6, p7, p8, p9, width, height, rCoef, gCoef, bCoef, opacity, timeout, p17, p18, p19); } + static Any add_entity_icon(Entity entity, const char* icon) { return _i(0x9CD43EEE12BF4DD0, entity, icon); } + static Any add_petrol_decal(float x, float y, float z, float groundLvl, float width, float transparency) { return _i(0x4F5212C7AD880DF8, x, y, z, groundLvl, width, transparency); } + static Void _0x967278682CB6967A(Any p0, Any p1, Any p2, Any p3) { return _i(0x967278682CB6967A, p0, p1, p2, p3); } + static Void _0x1A8E2C8B9CF4549C(Any* p0, Any* p1) { return _i(0x1A8E2C8B9CF4549C, p0, p1); } + static bool add_clan_decal_to_vehicle(Vehicle vehicle, Ped ped, int boneIndex, float x1, float x2, float x3, float y1, float y2, float y3, float z1, float z2, float z3, float scale, Any p13, int alpha) { return _i(0x428BDCB9DA58DA53, vehicle, ped, boneIndex, x1, x2, x3, y1, y2, y3, z1, z2, z3, scale, p13, alpha); } + static Void _0xEFABC7722293DA7C() { return _i(0xEFABC7722293DA7C); } + static Any _0xE35B38A27E8E7179(Any p0) { return _i(0xE35B38A27E8E7179, p0); } + static bool get_screen_effect_is_active(const char* effectName) { return _i(0x36AD3E690DA5ACEB, effectName); } + static Void start_screen_effect(const char* effectName, int duration, bool looped) { return _i(0x2206BF9A37B7F724, effectName, duration, looped); } + static Void stop_screen_effect(const char* effectName) { return _i(0x068E835A1D0DC0E3, effectName); } + static Void stop_all_screen_effects() { return _i(0xB4EDDC19532BFB85); } + static Void _0xD2209BE128B5418C(const char* graphicsName) { return _i(0xD2209BE128B5418C, graphicsName); } + static Void attach_tv_audio_to_entity(Entity entity) { return _i(0x845BAD77CC770633, entity); } + static bool _0x759650634F07B6B4(Any p0) { return _i(0x759650634F07B6B4, p0); } + static Any _0x7FA5D82B8F58EC06() { return _i(0x7FA5D82B8F58EC06); } + static bool push_scaleform_movie_function(int scaleform, const char* functionName) { return _i(0xF6E48914C7A8694E, scaleform, functionName); } + static bool push_scaleform_movie_function_n(const char* functionName) { return _i(0xAB58C27C2E6123C6, functionName); } + static bool _0xB9449845F73F5E9C(const char* functionName) { return _i(0xB9449845F73F5E9C, functionName); } + static bool push_scaleform_movie_function_from_hud_component(int hudComponent, const char* functionName) { return _i(0x98C494FD5BDFBFD5, hudComponent, functionName); } + static Any _0xA67C35C56EB1BD9D() { return _i(0xA67C35C56EB1BD9D); } + static Any _0x1DD2139A9A20DCE8() { return _i(0x1DD2139A9A20DCE8); } + static Void begin_text_command_scaleform_string(const char* componentType) { return _i(0x80338406F3475E55, componentType); } + static Void call_scaleform_movie_method(int scaleform, const char* method) { return _i(0xFBD96D87AC96D533, scaleform, method); } + static Void call_scaleform_movie_function_float_params(int scaleform, const char* functionName, float param1, float param2, float param3, float param4, float param5) { return _i(0xD0837058AE2E4BEE, scaleform, functionName, param1, param2, param3, param4, param5); } + static Void call_scaleform_movie_function_mixed_params(int scaleform, const char* functionName, float floatParam1, float floatParam2, float floatParam3, float floatParam4, float floatParam5, const char* stringParam1, const char* stringParam2, const char* stringParam3, const char* stringParam4, const char* stringParam5) { return _i(0xEF662D8D57E290B1, scaleform, functionName, floatParam1, floatParam2, floatParam3, floatParam4, floatParam5, stringParam1, stringParam2, stringParam3, stringParam4, stringParam5); } + static Void call_scaleform_movie_function_string_params(int scaleform, const char* functionName, const char* param1, const char* param2, const char* param3, const char* param4, const char* param5) { return _i(0x51BC1ED3CC44E8F7, scaleform, functionName, param1, param2, param3, param4, param5); } + static Void _0x27CB772218215325() { return _i(0x27CB772218215325); } + static Void set_far_shadows_suppressed(bool toggle) { return _i(0x80ECBC0C856D3B0B, toggle); } + static Void _0x0AE73D8DF3A762B2(bool p0) { return _i(0x0AE73D8DF3A762B2, p0); } + static Void _0x03FC694AE06C5A20() { return _i(0x03FC694AE06C5A20); } + static Void _0x6DDBF9DFFC4AC080(bool p0) { return _i(0x6DDBF9DFFC4AC080, p0); } + static Void _0x259BA6D4E6F808F1(Any p0) { return _i(0x259BA6D4E6F808F1, p0); } + static Void _0xD2936CAB8B58FCBD(Any p0, bool p1, float p2, float p3, float p4, float p5, bool p6, float p7) { return _i(0xD2936CAB8B58FCBD, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void _0x5F0F3F56635809EF(float p0) { return _i(0x5F0F3F56635809EF, p0); } + static Void _0xD39D13C9FEBF0511(bool p0) { return _i(0xD39D13C9FEBF0511, p0); } + static Void _0x02AC28F3A01FA04A(float p0) { return _i(0x02AC28F3A01FA04A, p0); } + static Void _0x5E9DAF5A20F15908(float p0) { return _i(0x5E9DAF5A20F15908, p0); } + static Void _0x25FC3E33A31AD0C9(bool p0) { return _i(0x25FC3E33A31AD0C9, p0); } + static Void _0xB11D94BC55F41932(const char* p0) { return _i(0xB11D94BC55F41932, p0); } + static Void _0x36F6626459D91457(float p0) { return _i(0x36F6626459D91457, p0); } + static Void _0x15E33297C3E8DC60(Any p0) { return _i(0x15E33297C3E8DC60, p0); } + static Void clear_draw_origin() { return _i(0xFF0B610F6BE0D7AF); } + static Void _0x92CCC17A7A2285DA() { return _i(0x92CCC17A7A2285DA); } + static Void _0x2A251AA48B2B46DB() { return _i(0x2A251AA48B2B46DB); } + static Void _0x4AF92ACD3141D96C() { return _i(0x4AF92ACD3141D96C); } + static Void clear_timecycle_modifier() { return _i(0x0F07E7745A236711); } + static Void _0xBEB3D46BB7F043C0(Any p0) { return _i(0xBEB3D46BB7F043C0, p0); } + static int create_checkpoint(int type, float posX1, float posY1, float posZ1, float posX2, float posY2, float posZ2, float radius, int red, int green, int blue, int alpha, int reserved) { return _i(0x0134F0835AB6BFCB, type, posX1, posY1, posZ1, posX2, posY2, posZ2, radius, red, green, blue, alpha, reserved); } + static Object create_tracked_point() { return _i(0xE2C9439ED45DEA60); } + static Void delete_checkpoint(int checkpoint) { return _i(0xF5ED37F54CD4D52E, checkpoint); } + static Void destroy_tracked_point(Object point) { return _i(0xB25DC90BAD56CA42, point); } + static Void _0x0E4299C549F0D1F1(bool p0) { return _i(0x0E4299C549F0D1F1, p0); } + static Void set_particle_fx_blood_scale(bool p0) { return _i(0x5F6DF3D92271E8A1, p0); } + static Void _0xC35A6D07C93802B2() { return _i(0xC35A6D07C93802B2); } + static Void _0x2BF72AD5B41AA739() { return _i(0x2BF72AD5B41AA739); } + static Void _0x3669F1B198DCAA4F() { return _i(0x3669F1B198DCAA4F); } + static Void _0x1612C45F9E3E0D44() { return _i(0x1612C45F9E3E0D44); } + static Void _0xEFD97FF47B745B8D(Any p0) { return _i(0xEFD97FF47B745B8D, p0); } + static Void _0xDE81239437E8C5A8() { return _i(0xDE81239437E8C5A8); } + static Void _0x02369D5C8A51FDCF(bool p0) { return _i(0x02369D5C8A51FDCF, p0); } + static Void disable_vehicle_distantlights(bool toggle) { return _i(0xC9F98AC1884E73A2, toggle); } + static bool _0x5E657EF1099EDD65(Any p0) { return _i(0x5E657EF1099EDD65, p0); } + static bool does_particle_fx_looped_exist(int ptfxHandle) { return _i(0x74AFEF0D2E1E409B, ptfxHandle); } + static bool does_vehicle_have_decal(Vehicle vehicle, Any p1) { return _i(0x060D935D3981A275, vehicle, p1); } + static Void _0x22A249A53034450A(bool p0) { return _i(0x22A249A53034450A, p0); } + static Void draw_box(float x1, float y1, float z1, float x2, float y2, float z2, int red, int green, int blue, int alpha) { return _i(0xD3A9971CADAC7252, x1, y1, z1, x2, y2, z2, red, green, blue, alpha); } + static Void draw_light_with_range(float posX, float posY, float posZ, int colorR, int colorG, int colorB, float range, float intensity) { return _i(0xF2A1B2771A01DBD4, posX, posY, posZ, colorR, colorG, colorB, range, intensity); } + static Void draw_light_with_range_and_shadow(float x, float y, float z, int r, int g, int b, float range, float intensity, float shadow) { return _i(0xF49E9A9716A04595, x, y, z, r, g, b, range, intensity, shadow); } + static Void draw_line(float x1, float y1, float z1, float x2, float y2, float z2, int red, int green, int blue, int alpha) { return _i(0x6B7256074AE34680, x1, y1, z1, x2, y2, z2, red, green, blue, alpha); } + static Void _0x1072F115DAB0717E(bool p0, bool p1) { return _i(0x1072F115DAB0717E, p0, p1); } + static Void draw_marker(int type, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ, int red, int green, int blue, int alpha, bool bobUpAndDown, bool faceCamera, int p19, bool rotate, const char* textureDict, const char* textureName, bool drawOnEnts) { return _i(0x28477EC23D892089, type, posX, posY, posZ, dirX, dirY, dirZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, red, green, blue, alpha, bobUpAndDown, faceCamera, p19, rotate, textureDict, textureName, drawOnEnts); } + static Void _0xE82728F0DE75D13A(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9, Any p10, Any p11, Any p12, Any p13, Any p14, Any p15, Any p16, Any p17, Any p18, Any p19, Any p20, Any p21, Any p22, Any p23, Any p24) { return _i(0xE82728F0DE75D13A, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24); } + static Void _0x799017F9E3B10112(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7) { return _i(0x799017F9E3B10112, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void draw_poly(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, int red, int green, int blue, int alpha) { return _i(0xAC26716048436851, x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue, alpha); } + static Void draw_rect(float x, float y, float width, float height, int r, int g, int b, int a, Any p8) { return _i(0x3A618A217E5154F0, x, y, width, height, r, g, b, a, p8); } + static Void draw_scaleform_movie(int scaleformHandle, float x, float y, float width, float height, int red, int green, int blue, int alpha, int unk) { return _i(0x54972ADAF0294A93, scaleformHandle, x, y, width, height, red, green, blue, alpha, unk); } + static Void draw_scaleform_movie3_d(int scaleform, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float p7, float p8, float p9, float scaleX, float scaleY, float scaleZ, Any p13) { return _i(0x87D51D72255D4E78, scaleform, posX, posY, posZ, rotX, rotY, rotZ, p7, p8, p9, scaleX, scaleY, scaleZ, p13); } + static Void draw_scaleform_movie3_d_non_additive(int scaleform, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float p7, float p8, float p9, float scaleX, float scaleY, float scaleZ, Any p13) { return _i(0x1CE592FDC749D6F5, scaleform, posX, posY, posZ, rotX, rotY, rotZ, p7, p8, p9, scaleX, scaleY, scaleZ, p13); } + static Void draw_scaleform_movie_fullscreen(int scaleform, int red, int green, int blue, int alpha, int unk) { return _i(0x0DF606929C105BE1, scaleform, red, green, blue, alpha, unk); } + static Void draw_scaleform_movie_fullscreen_masked(int scaleform1, int scaleform2, int red, int green, int blue, int alpha) { return _i(0xCF537FDE4FBD4CE5, scaleform1, scaleform2, red, green, blue, alpha); } + static Void draw_spot_light_with_shadow(float posX, float posY, float posZ, float dirX, float dirY, float dirZ, int colorR, int colorG, int colorB, float distance, float brightness, float roundness, float radius, float falloff, float shadow) { return _i(0x5BCA583A583194DB, posX, posY, posZ, dirX, dirY, dirZ, colorR, colorG, colorB, distance, brightness, roundness, radius, falloff, shadow); } + static Void draw_spot_light(float posX, float posY, float posZ, float dirX, float dirY, float dirZ, int colorR, int colorG, int colorB, float distance, float brightness, float roundness, float radius, float falloff) { return _i(0xD0F64B265C8C8B33, posX, posY, posZ, dirX, dirY, dirZ, colorR, colorG, colorB, distance, brightness, roundness, radius, falloff); } + static Void draw_sprite(const char* textureDict, const char* textureName, float screenX, float screenY, float width, float height, float heading, int red, int green, int blue, int alpha, Any p11) { return _i(0xE7FFAE5EBF23D890, textureDict, textureName, screenX, screenY, width, height, heading, red, green, blue, alpha, p11); } + static Void _0x2BC54A8188768488(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9, Any p10) { return _i(0x2BC54A8188768488, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } + static Void draw_sprite_poly(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, int p9, int p10, int p11, int p12, const char* p13, const char* p14, float p15, float p16, float p17, float p18, float p19, float p20, float p21, float p22, float p23) { return _i(0x29280002282F1928, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23); } + static Void draw_sprite_poly2(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float red1, float green1, float blue1, int alpha1, float red2, float green2, float blue2, int alpha2, float red3, float green3, float blue3, int alpha3, const char* textureDict, const char* textureName, float u1, float v1, float w1, float u2, float v2, float w2, float u3, float v3, float w3) { return _i(0x736D7AA1B750856B, x1, y1, z1, x2, y2, z2, x3, y3, z3, red1, green1, blue1, alpha1, red2, green2, blue2, alpha2, red3, green3, blue3, alpha3, textureDict, textureName, u1, v1, w1, u2, v2, w2, u3, v3, w3); } + static Void draw_tv_channel(float xPos, float yPos, float xScale, float yScale, float rotation, int red, int green, int blue, int alpha) { return _i(0xFDDC2B4ED3C69DF0, xPos, yPos, xScale, yScale, rotation, red, green, blue, alpha); } + static Void enable_alien_blood_vfx(bool Toggle) { return _i(0x9DCE1F0F78260875, Toggle); } + static Void enable_clown_blood_vfx(bool toggle) { return _i(0xD821490579791273, toggle); } + static Void _0x2C328AF17210F009(float p0) { return _i(0x2C328AF17210F009, p0); } + static Void _0x74C180030FDE4B69(bool p0) { return _i(0x74C180030FDE4B69, p0); } + static Void enable_movie_subtitles(bool toggle) { return _i(0x873FA65C778AD970, toggle); } + static Void _0x5DEBD9C4DC995692() { return _i(0x5DEBD9C4DC995692); } + static Void _0x0A123435A26C36CD() { return _i(0x0A123435A26C36CD); } + static Void pop_scaleform_movie_function_void() { return _i(0xC6796A8FFA375E53); } + static int pop_scaleform_movie_function() { return _i(0xC50AA39A577AF886); } + static Void end_text_command_scaleform_string() { return _i(0x362E2D3FE93A9959); } + static Void end_text_command_scaleform_string2() { return _i(0xAE4E8157D9ECF087); } + static Void fade_decals_in_range(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xD77EDADB0420E6E0, p0, p1, p2, p3, p4); } + static Void _0xC9B18B4619F48F7B(float p0) { return _i(0xC9B18B4619F48F7B, p0); } + static Void _0x814AF7DCAACC597B(Any p0) { return _i(0x814AF7DCAACC597B, p0); } + static Void _0xBA0127DA25FD54C9(Any p0, Any p1) { return _i(0xBA0127DA25FD54C9, p0, p1); } + static Void _0x9B079E5221D984D3(bool p0) { return _i(0x9B079E5221D984D3, p0); } + static Void _0xDC459CFA0CCE245B(bool p0) { return _i(0xDC459CFA0CCE245B, p0); } + static Void _0xD801CC02177FA3F1() { return _i(0xD801CC02177FA3F1); } + static Void _0x6A12D88881435DCA() { return _i(0x6A12D88881435DCA); } + static Void _0x0A46AF8A78DC5E0A() { return _i(0x0A46AF8A78DC5E0A); } + static Void _0x346EF3ECAAAB149E() { return _i(0x346EF3ECAAAB149E); } + static Void get_active_screen_resolution(int* x, int* y) { return _i(0x873C9F3104101DD3, x, y); } + static float get_aspect_ratio(bool b) { return _i(0xF1307EF624A80D87, b); } + static int _0x473151EBC762C6DA() { return _i(0x473151EBC762C6DA); } + static float get_decal_wash_level(int decal) { return _i(0x323F647679A09103, decal); } + static Any _0xBB0527EC6341496D() { return _i(0xBB0527EC6341496D); } + static bool get_is_hidef() { return _i(0x84ED31191CC5D2C9); } + static bool _0x2F09F7976C512404(float xCoord, float yCoord, float zCoord, float p3) { return _i(0x2F09F7976C512404, xCoord, yCoord, zCoord, p3); } + static bool get_is_widescreen() { return _i(0x30CF4BDA4FCB1905); } + static Any _0x393BD2275CEB7793() { return _i(0x393BD2275CEB7793); } + static int return_two(Any p0) { return _i(0x40AFB081F8ADD4EE, p0); } + static Any _0xDC54A7AF8B3A14EF() { return _i(0xDC54A7AF8B3A14EF); } + static Any _0xE59343E9E96529E7() { return _i(0xE59343E9E96529E7); } + static Any _0x35FB78DC42B7BD21() { return _i(0x35FB78DC42B7BD21); } + static float get_safe_zone_size() { return _i(0xBAF107B6BB2C97F0); } + static Any _0xD80A80346A45D761(Any p0) { return _i(0xD80A80346A45D761, p0); } + static int _0x2DE7EFA66B906036(Any funcData) { return _i(0x2DE7EFA66B906036, funcData); } + static const char* sitting_tv(int scaleform) { return _i(0xE1E258829A885245, scaleform); } + static float is_particle_fx_delayed_blink() { return _i(0x5CCABFFCA31DDE33); } + static Any _0xB2EBE8CBC58B90E9() { return _i(0xB2EBE8CBC58B90E9); } + static bool get_screen_coord_from_world_coord(float worldX, float worldY, float worldZ, float* screenX, float* screenY) { return _i(0x34E82F05DF2974F5, worldX, worldY, worldZ, screenX, screenY); } + static Void get_screen_resolution(int* x, int* y) { return _i(0x888D57E407E63624, x, y); } + static Void _0x6DD8F5AA635EB4B2(float p0, float p1, Any* p2, Any* p3) { return _i(0x6DD8F5AA635EB4B2, p0, p1, p2, p3); } + static Any _0xCB82A0BF0E3E3265(Any p0) { return _i(0xCB82A0BF0E3E3265, p0); } + static Any _0x5B0316762AFD4A64() { return _i(0x5B0316762AFD4A64); } + static int _0x1670F8D05056F257(Any* p0) { return _i(0x1670F8D05056F257, p0); } + static Any _0x0C0C4E81E1AC60A0() { return _i(0x0C0C4E81E1AC60A0); } + static Any _0xF5BED327CEA362B1(Any p0) { return _i(0xF5BED327CEA362B1, p0); } + static Any _0x0D6CA79EEEBD8CA3() { return _i(0x0D6CA79EEEBD8CA3); } + static Any _0x90A78ECAA4E78453() { return _i(0x90A78ECAA4E78453); } + static math::vector3 get_texture_resolution(const char* textureDict, const char* textureName) { return _i>(0x35736EE65BD00C11, textureDict, textureName); } + static int get_timecycle_modifier_index() { return _i(0xFDF3D97C674AFB66); } + static Any _0x459FD2C8D0AB78BC() { return _i(0x459FD2C8D0AB78BC); } + static bool _0xEB3DAC2C86001E5E() { return _i(0xEB3DAC2C86001E5E); } + static int get_tv_channel() { return _i(0xFC1E275A90D39995); } + static float get_tv_volume() { return _i(0x2170813D3DD8661B); } + static bool is_nightvision_active() { return _i(0x2202A3F42C8E5F79); } + static bool is_seethrough_active() { return _i(0x44B80ABAB9D80BD3); } + static int _0xFE26117A5841B2FF(Vehicle vehicle, Any p1) { return _i(0xFE26117A5841B2FF, vehicle, p1); } + static Any _0xA4819F5E23E2FFAD() { return _i(0xA4819F5E23E2FFAD); } + static math::vector3 _0xA4664972A9B8F8BA(Any p0) { return _i>(0xA4664972A9B8F8BA, p0); } + static Void _0x12995F2E53FFA601(int p0, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8, int p9, int p10, int p11) { return _i(0x12995F2E53FFA601, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } + static Void _0xA51C4B86B71652AE(bool p0) { return _i(0xA51C4B86B71652AE, p0); } + static Void _0x06F761EA47C1D3ED(bool p0) { return _i(0x06F761EA47C1D3ED, p0); } + static Void _0xB1BB03742917A5D6(int type, float xPos, float yPos, float zPos, float p4, int red, int green, int blue, int alpha) { return _i(0xB1BB03742917A5D6, type, xPos, yPos, zPos, p4, red, green, blue, alpha); } + static Void _0xC0416B061F2B7E5E(bool p0) { return _i(0xC0416B061F2B7E5E, p0); } + static Void _0x312342E1A4874F3F(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, bool p8) { return _i(0x312342E1A4874F3F, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static Void _0x2485D34E50A22E84(float p0, float p1, float p2) { return _i(0x2485D34E50A22E84, p0, p1, p2); } + static Void _0x9CFDD90B2B844BF7(float p0, float p1, float p2, float p3, float p4) { return _i(0x9CFDD90B2B844BF7, p0, p1, p2, p3, p4); } + static Void _0xDBAA5EC848BA2D46(Any p0, Any p1) { return _i(0xDBAA5EC848BA2D46, p0, p1); } + static Void _0x851CD923176EBA7C() { return _i(0x851CD923176EBA7C); } + static Void _0x302C91AB2D477F7E() { return _i(0x302C91AB2D477F7E); } + static Void _0x6D955F6A9E0295B1(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x6D955F6A9E0295B1, p0, p1, p2, p3, p4, p5, p6); } + static bool has_scaleform_container_movie_loaded_into_parent(int scaleformHandle) { return _i(0x8217150E1217EBFD, scaleformHandle); } + static bool has_named_scaleform_movie_loaded(const char* scaleformName) { return _i(0x0C1C5D756FB5F337, scaleformName); } + static bool has_scaleform_movie_loaded(int scaleformHandle) { return _i(0x85F01B8D5B90570E, scaleformHandle); } + static bool has_hud_scaleform_loaded(int hudComponent) { return _i(0xDF6E5987D2B4D140, hudComponent); } + static bool has_streamed_texture_dict_loaded(const char* textureDict) { return _i(0x0145F696AAAAD2E4, textureDict); } + static bool is_decal_alive(int decal) { return _i(0xC694D74949CAFD0C, decal); } + static bool _0x768FF8961BA904D6(Any funcData) { return _i(0x768FF8961BA904D6, funcData); } + static Any _0x7B226C785A52A0A9() { return _i(0x7B226C785A52A0A9); } + static bool is_tracked_point_visible(Object point) { return _i(0xC45CCDAAC9221CA8, point); } + static bool load_tv_channel(uint32_t tvChannel) { return _i(0x0AD973CA1E077B60, tvChannel); } + static bool _0x4862437A486F91B0(Any* p0, Any p1, Any p2, Any p3) { return _i(0x4862437A486F91B0, p0, p1, p2, p3); } + static int load_movie_mesh_set(const char* movieMeshSetName) { return _i(0xB66064452270E8F1, movieMeshSetName); } + static Void move_vehicle_decals(Any p0, Any p1) { return _i(0x84C8D7C2D30D3280, p0, p1); } + static Void _0xEFB55E7C25D3B3BE() { return _i(0xEFB55E7C25D3B3BE); } + static Void _0x1600FD8CF72EBC12(float p0) { return _i(0x1600FD8CF72EBC12, p0); } + static Void _0x2A2A52824DB96700(Any* p0) { return _i(0x2A2A52824DB96700, p0); } + static Any _0x95EB5E34F821BABE(Any p0, Any p1, Any p2) { return _i(0x95EB5E34F821BABE, p0, p1, p2); } + static bool _0xD1C7CB175E012964(int scaleformHandle) { return _i(0xD1C7CB175E012964, scaleformHandle); } + static Void _0x8A35C742130C6080(Any p0, Any* p1, Any* p2) { return _i(0x8A35C742130C6080, p0, p1, p2); } + static Any _0xBCEDB009461DA156() { return _i(0xBCEDB009461DA156); } + static bool _0x27FEB5254759CDE3(const char* textureDict, bool p1) { return _i(0x27FEB5254759CDE3, textureDict, p1); } + static bool _0x7AC24EAB6D74118D(bool p0) { return _i(0x7AC24EAB6D74118D, p0); } + static Void pop_timecycle_modifier() { return _i(0x3C8938D7D872211E); } + static Void _0xD7021272EB0A451E(const char* p0) { return _i(0xD7021272EB0A451E, p0); } + static Void _0x0218BA067D249DEA() { return _i(0x0218BA067D249DEA); } + static Void _0x649C97D52332341A(Any p0) { return _i(0x649C97D52332341A, p0); } + static Void _0x14FC5833464340A8() { return _i(0x14FC5833464340A8); } + static Void _0xAE51BC858F32BA66(Any p0, float p1, float p2, float p3, float p4) { return _i(0xAE51BC858F32BA66, p0, p1, p2, p3, p4); } + static Any _0x2C42340F916C5930(Any p0) { return _i(0x2C42340F916C5930, p0); } + static Void push_timecycle_modifier() { return _i(0x58F735290861E6B4); } + static Any _0x9B6E70C5CEEF4EEB(Any p0) { return _i(0x9B6E70C5CEEF4EEB, p0); } + static Any _0x2A893980E96B659A(Any p0) { return _i(0x2A893980E96B659A, p0); } + static Void _0xA44FF770DFBC5DAE() { return _i(0xA44FF770DFBC5DAE); } + static Void release_movie_mesh_set(int movieMeshSet) { return _i(0xEB119AA014E89183, movieMeshSet); } + static Void remove_decal(int decal) { return _i(0xED3F346429CCD659, decal); } + static Void remove_decals_from_object(Object obj) { return _i(0xCCF71CBDDF5B6CB9, obj); } + static Void remove_decals_from_object_facing(Object obj, float x, float y, float z) { return _i(0xA6F6F70FDC6D144C, obj, x, y, z); } + static Void remove_decals_from_vehicle(Vehicle vehicle) { return _i(0xE91F1B65F2B48D57, vehicle); } + static Void remove_decals_in_range(float x, float y, float z, float range) { return _i(0x5D6B2D4830A67C62, x, y, z, range); } + static Void remove_particle_fx(int ptfxHandle, bool p1) { return _i(0xC401503DFE8D53CF, ptfxHandle, p1); } + static Void remove_particle_fx_from_entity(Entity entity) { return _i(0xB8FEAEEBCC127425, entity); } + static Void remove_particle_fx_in_range(float X, float Y, float Z, float radius) { return _i(0xDD19FA1C6D657305, X, Y, Z, radius); } + static Void _0xF44A5456AC3F4F97(Any p0) { return _i(0xF44A5456AC3F4F97, p0); } + static Void _0xD2300034310557E4(Vehicle vehicle, Any p1) { return _i(0xD2300034310557E4, vehicle, p1); } + static Void _0x03300B57FCAC6DDB(bool p0) { return _i(0x03300B57FCAC6DDB, p0); } + static Void _0x98EDF76A7271E4F2() { return _i(0x98EDF76A7271E4F2); } + static int request_scaleform_movie(const char* scaleformName) { return _i(0x11FE353CF9733E6F, scaleformName); } + static int request_scaleform_movie_instance(const char* scaleformName) { return _i(0xC514489CFB8AF806, scaleformName); } + static int request_scaleform_movie_interactive(const char* scaleformName) { return _i(0xBD06C611BB9048C2, scaleformName); } + static Any request_scaleform_movie2(const char* scaleformName) { return _i(0x65E7E78842E74CDB, scaleformName); } + static Void request_hud_scaleform(int hudComponent) { return _i(0x9304881D6F6537EA, hudComponent); } + static Void request_streamed_texture_dict(const char* textureDict, bool p1) { return _i(0xDFA2EF8E04127DD5, textureDict, p1); } + static Void _0xE3E2C1B4C59DBC77(int unk) { return _i(0xE3E2C1B4C59DBC77, unk); } + static Void reset_particle_fx_asset_old_to_new(const char* name) { return _i(0x89C8553DD3274AAE, name); } + static Void _0xE1C8709406F2C41C() { return _i(0xE1C8709406F2C41C); } + static Void screen_draw_position_end() { return _i(0xE3A3DB414A373DAB); } + static Any _0x3DEC726C25A11BAC(int p0) { return _i(0x3DEC726C25A11BAC, p0); } + static Void push_scaleform_movie_function_parameter_bool(bool value) { return _i(0xC58424BA936EB458, value); } + static Void push_scaleform_movie_function_parameter_float(float value) { return _i(0xD69736AAE04DB51A, value); } + static Void push_scaleform_movie_function_parameter_int(int value) { return _i(0xC3D0841A0CC546A6, value); } + static Void _0xEC52C631A1831C03(Any p0) { return _i(0xEC52C631A1831C03, p0); } + static Void _0x77FE3402004CD1B0(Any p0) { return _i(0x77FE3402004CD1B0, p0); } + static Void push_scaleform_movie_function_parameter_string(const char* value) { return _i(0xBA7148484BD90365, value); } + static Void _0xE83A3E3557A56640(const char* button_option) { return _i(0xE83A3E3557A56640, button_option); } + static Void _0x70A64C0234EF522C() { return _i(0x70A64C0234EF522C); } + static Void _0x1086127B3A63505E(Any p0, Any p1, Any p2) { return _i(0x1086127B3A63505E, p0, p1, p2); } + static Void _0x9D75795B9DC6EBBF(Any p0) { return _i(0x9D75795B9DC6EBBF, p0); } + static Void _0xA78DE25577300BA1(Any p0) { return _i(0xA78DE25577300BA1, p0); } + static Void _0xD7D0B00177485411(Any p0, float p1) { return _i(0xD7D0B00177485411, p0, p1); } + static Void _0x1636D7FC127B10D2(Any p0) { return _i(0x1636D7FC127B10D2, p0); } + static Void _0x19E50EB6E33E1D28(Any p0) { return _i(0x19E50EB6E33E1D28, p0); } + static Void _0x0C8FAC83902A62DF(Any p0) { return _i(0x0C8FAC83902A62DF, p0); } + static Void _0xFEBFBFDFB66039DE(Any p0) { return _i(0xFEBFBFDFB66039DE, p0); } + static Void _0xFF5992E1C9E65D05(Any p0) { return _i(0xFF5992E1C9E65D05, p0); } + static Void set_blackout(bool enable) { return _i(0x1268615ACE24D504, enable); } + static Void _0x23BA6B0C2AD7B0D3(bool p0) { return _i(0x23BA6B0C2AD7B0D3, p0); } + static Void _0xF51D36185993515D(int checkpoint, float posX, float posY, float posZ, float unkX, float unkY, float unkZ) { return _i(0xF51D36185993515D, checkpoint, posX, posY, posZ, unkX, unkY, unkZ); } + static Void set_checkpoint_cylinder_height(int checkpoint, float nearHeight, float farHeight, float radius) { return _i(0x2707AAE9D9297D89, checkpoint, nearHeight, farHeight, radius); } + static Void _0x615D3925E87A3B26(int checkpoint) { return _i(0x615D3925E87A3B26, checkpoint); } + static Void _0x3C788E7F6438754D(Any p0, Any p1, Any p2, Any p3) { return _i(0x3C788E7F6438754D, p0, p1, p2, p3); } + static Void _0xDB1EA9411C8911EC(Any p0) { return _i(0xDB1EA9411C8911EC, p0); } + static Void _0x4B5B4DA5D79F1943(int checkpoint, float p0) { return _i(0x4B5B4DA5D79F1943, checkpoint, p0); } + static Void _0x44621483FF966526(Any p0, Any p1) { return _i(0x44621483FF966526, p0, p1); } + static Void set_checkpoint_icon_rgba(int checkpoint, int red, int green, int blue, int alpha) { return _i(0xB9EA40907C680580, checkpoint, red, green, blue, alpha); } + static Void set_checkpoint_rgba(int checkpoint, int red, int green, int blue, int alpha) { return _i(0x7167371E8AD747F7, checkpoint, red, green, blue, alpha); } + static Void _0xBBF327DED94E4DEB(const char* p0) { return _i(0xBBF327DED94E4DEB, p0); } + static Void _0x46D1A61A21F566FC(float p0) { return _i(0x46D1A61A21F566FC, p0); } + static Void _0xC5C8F970D4EDFF71(Any p0) { return _i(0xC5C8F970D4EDFF71, p0); } + static Void _0x4B5CFC83122DF602() { return _i(0x4B5CFC83122DF602); } + static Void _0xD9454B5752C857DC() { return _i(0xD9454B5752C857DC); } + static Void _0x27CFB1B1E078CB2D() { return _i(0x27CFB1B1E078CB2D); } + static Void _0xE2892E7E55D7073A(float p0) { return _i(0xE2892E7E55D7073A, p0); } + static Void set_draw_origin(float x, float y, float z, bool screen) { return _i(0xAA0008F3BBB8F416, x, y, z, screen); } + static Void set_entity_icon_color(Entity entity, int red, int green, int blue, int alpha) { return _i(0x1D5F595CCAE2E238, entity, red, green, blue, alpha); } + static Void set_entity_icon_visibility(Entity entity, bool toggle) { return _i(0xE0E8BEECCA96BA31, entity, toggle); } + static Void _0xEF398BEEE4EF45F9(bool p0) { return _i(0xEF398BEEE4EF45F9, p0); } + static Void _0x5096FD9CCB49056D(Any* p0) { return _i(0x5096FD9CCB49056D, p0); } + static Void set_flash(float p0, float p1, float fadeIn, float duration, float fadeOut) { return _i(0x0AB84296FED9CFC6, p0, p1, fadeIn, duration, fadeOut); } + static Void _0x6A51F78772175A51(Any p0) { return _i(0x6A51F78772175A51, p0); } + static Void _0xBA3D65906822BED5(bool p0, bool p1, float p2, float p3, float p4, float p5) { return _i(0xBA3D65906822BED5, p0, p1, p2, p3, p4, p5); } + static Void _0x9641588DAB93B4B5(Any p0) { return _i(0x9641588DAB93B4B5, p0); } + static Void _0xB569F41F3E7E83A4(Any p0) { return _i(0xB569F41F3E7E83A4, p0); } + static Void _0xB3C641F3630BF6DA(float p0) { return _i(0xB3C641F3630BF6DA, p0); } + static Void _0xBF59707B3E5ED531(const char* p0) { return _i(0xBF59707B3E5ED531, p0); } + static Void set_nightvision(bool toggle) { return _i(0x18F621F7A5B1F85D, toggle); } + static Void set_noiseoveride(bool toggle) { return _i(0xE787BF1C5CF823C9, toggle); } + static Void set_noisinessoveride(float value) { return _i(0xCB6A7C3BB17A0C67, value); } + static Void _0x54E22EA2C1956A8D(float p0) { return _i(0x54E22EA2C1956A8D, p0); } + static Void _0x908311265D42A820(Any p0) { return _i(0x908311265D42A820, p0); } + static Void _0xBB90E12CAC1DAB25(float p0) { return _i(0xBB90E12CAC1DAB25, p0); } + static Void _0x27E32866E9A5C416(float p0) { return _i(0x27E32866E9A5C416, p0); } + static Void _0xCA4AE345A153D573(bool p0) { return _i(0xCA4AE345A153D573, p0); } + static Void set_particle_fx_cam_inside_nonplayer_vehicle(Any p0, bool p1) { return _i(0xACEE6F360FC1F6B6, p0, p1); } + static Void set_particle_fx_cam_inside_vehicle(bool p0) { return _i(0xEEC4047028426510, p0); } + static Void _0x949F397A288B28B3(float p0) { return _i(0x949F397A288B28B3, p0); } + static Void _0xBA3D194057C79A7B(Any p0) { return _i(0xBA3D194057C79A7B, p0); } + static Void _0x8CDE909A0370BB3A(bool p0) { return _i(0x8CDE909A0370BB3A, p0); } + static Void set_particle_fx_looped_alpha(int ptfxHandle, float alpha) { return _i(0x726845132380142E, ptfxHandle, alpha); } + static Void set_particle_fx_looped_colour(int ptfxHandle, float r, float g, float b, bool p4) { return _i(0x7F8F65877F88783B, ptfxHandle, r, g, b, p4); } + static Void set_particle_fx_looped_evolution(int ptfxHandle, const char* propertyName, float amount, bool Id) { return _i(0x5F0C4B5B1C393BE2, ptfxHandle, propertyName, amount, Id); } + static Void set_particle_fx_looped_range(int ptfxHandle, float range) { return _i(0xDCB194B85EF7B541, ptfxHandle, range); } + static Void set_particle_fx_looped_offsets(int ptfxHandle, float x, float y, float z, float rotX, float rotY, float rotZ) { return _i(0xF7DDEBEC43483C43, ptfxHandle, x, y, z, rotX, rotY, rotZ); } + static Void set_particle_fx_looped_scale(int ptfxHandle, float scale) { return _i(0xB44250AAA456492D, ptfxHandle, scale); } + static Void set_particle_fx_non_looped_alpha(float alpha) { return _i(0x77168D722C58B2FC, alpha); } + static Void set_particle_fx_non_looped_colour(float r, float g, float b) { return _i(0x26143A59EF48B262, r, g, b); } + static Void set_particle_fx_asset_old_to_new(const char* oldAsset, const char* newAsset) { return _i(0xEA1E2D93F6F75ED9, oldAsset, newAsset); } + static Void set_particle_fx_shootout_boat(Any p0) { return _i(0x96EF97DAEB89BEF5, p0); } + static Void _0x2B40A97646381508(Any p0) { return _i(0x2B40A97646381508, p0); } + static Void _0xBDEB86F4D5809204(float p0) { return _i(0xBDEB86F4D5809204, p0); } + static Void set_scaleform_movie_as_no_longer_needed(int* scaleformHandle) { return _i(0x1D132D614DD86811, scaleformHandle); } + static Void _0x32F34FF7F617643B(Any p0, Any p1) { return _i(0x32F34FF7F617643B, p0, p1); } + static Void _0xE6A9F00D4240B519(Any p0, Any p1) { return _i(0xE6A9F00D4240B519, p0, p1); } + static Void set_scaleform_movie_to_use_system_time(int scaleform, bool toggle) { return _i(0x6D8EB211944DCE08, scaleform, toggle); } + static Void screen_draw_position_begin(int x, int y) { return _i(0xB8A850F20A067EB6, x, y); } + static Void screen_draw_position_ratio(float x, float y, float p2, float p3) { return _i(0xF5A2C681787E579D, x, y, p2, p3); } + static Void _0xC6372ECD45D73BCD(bool p0) { return _i(0xC6372ECD45D73BCD, p0); } + static Void set2_d_layer(int layer) { return _i(0x61BB1D9B3A95D802, layer); } + static Void set_seethrough(bool toggle) { return _i(0x7E08924259E08CE0, toggle); } + static Void _0x5DBF05DB5926D089(Any p0) { return _i(0x5DBF05DB5926D089, p0); } + static Void set_streamed_texture_dict_as_no_longer_needed(const char* textureDict) { return _i(0xBE2CACCF5A8AA805, textureDict); } + static Void _0x1BBC135A4D25EDDE(bool p0) { return _i(0x1BBC135A4D25EDDE, p0); } + static Void set_timecycle_modifier(const char* modifierName) { return _i(0x2C933ABF17A1DF41, modifierName); } + static Void set_timecycle_modifier_strength(float strength) { return _i(0x82E7FFCD5B2326B3, strength); } + static Void set_tracked_point_info(Object point, float x, float y, float z, float radius) { return _i(0x164ECBB3CF750CB0, point, x, y, z, radius); } + static Void _0x1CBA05AE7BD7EE05(float p0) { return _i(0x1CBA05AE7BD7EE05, p0); } + static Void set_transition_timecycle_modifier(const char* modifierName, float transition) { return _i(0x3BCF567485E1971C, modifierName, transition); } + static Void set_tv_audio_frontend(bool toggle) { return _i(0x113D2C5DC57E1774, toggle); } + static Void set_tv_channel(int channel) { return _i(0xBAABBB23EB6E484E, channel); } + static Void _0xF7B38B8305F1FE8B(int p0, const char* p1, bool p2) { return _i(0xF7B38B8305F1FE8B, p0, p1, p2); } + static Void _0x2201C576FACAEBE8(Any p0, const char* p1, Any p2) { return _i(0x2201C576FACAEBE8, p0, p1, p2); } + static Void _0xD1C55B110E4DF534(Any p0) { return _i(0xD1C55B110E4DF534, p0); } + static Void set_tv_volume(float volume) { return _i(0x2982BF73F66E9DDC, volume); } + static Void _0xF78B803082D4386F(float p0) { return _i(0xF78B803082D4386F, p0); } + static Void _0xA46B73FAA3460AE1(bool p0) { return _i(0xA46B73FAA3460AE1, p0); } + static int start_particle_fx_looped_on_entity2(const char* effectName, Entity entity, float xOffset, float yOffset, float zOffset, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis, Any p12, Any p13, Any p14) { return _i(0x6F60E89A7B64EE1D, effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis, p12, p13, p14); } + static int start_particle_fx_looped_on_entity_bone2(const char* effectName, Entity entity, float xOffset, float yOffset, float zOffset, float xRot, float yRot, float zRot, int boneIndex, float scale, bool xAxis, bool yAxis, bool zAxis, Any p13, Any p14, Any p15) { return _i(0xDDE23F30CC5A0F03, effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, boneIndex, scale, xAxis, yAxis, zAxis, p13, p14, p15); } + static bool start_particle_fx_non_looped_at_coord2(const char* effectName, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis) { return _i(0xF56B8137DF10135D, effectName, xPos, yPos, zPos, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis); } + static bool start_particle_fx_non_looped_on_entity2(const char* effectName, Entity entity, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, float scale, bool axisX, bool axisY, bool axisZ) { return _i(0xC95EB1DB6E92113D, effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, scale, axisX, axisY, axisZ); } + static bool start_particle_fx_non_looped_on_ped_bone2(const char* effectName, Ped ped, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, int boneIndex, float scale, bool axisX, bool axisY, bool axisZ) { return _i(0xA41B6A43642AC2CF, effectName, ped, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, boneIndex, scale, axisX, axisY, axisZ); } + static int start_particle_fx_looped_at_coord(const char* effectName, float x, float y, float z, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis, bool p11) { return _i(0xE184F4F0DC5910E7, effectName, x, y, z, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis, p11); } + static int start_particle_fx_looped_on_entity(const char* effectName, Entity entity, float xOffset, float yOffset, float zOffset, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis) { return _i(0x1AE42C1660FD6517, effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis); } + static int start_particle_fx_looped_on_entity_bone(const char* effectName, Entity entity, float xOffset, float yOffset, float zOffset, float xRot, float yRot, float zRot, int boneIndex, float scale, bool xAxis, bool yAxis, bool zAxis) { return _i(0xC6EB449E33977F0B, effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, boneIndex, scale, xAxis, yAxis, zAxis); } + static int start_particle_fx_looped_on_ped_bone(const char* effectName, Ped ped, float xOffset, float yOffset, float zOffset, float xRot, float yRot, float zRot, int boneIndex, float scale, bool xAxis, bool yAxis, bool zAxis) { return _i(0xF28DA9F38CD1787C, effectName, ped, xOffset, yOffset, zOffset, xRot, yRot, zRot, boneIndex, scale, xAxis, yAxis, zAxis); } + static int start_particle_fx_non_looped_at_coord(const char* effectName, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, float scale, bool xAxis, bool yAxis, bool zAxis) { return _i(0x25129531F77B9ED3, effectName, xPos, yPos, zPos, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis); } + static bool start_particle_fx_non_looped_on_entity(const char* effectName, Entity entity, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, float scale, bool axisX, bool axisY, bool axisZ) { return _i(0x0D53A3B8DA0809D2, effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, scale, axisX, axisY, axisZ); } + static bool start_particle_fx_non_looped_on_ped_bone(const char* effectName, Ped ped, float offsetX, float offsetY, float offsetZ, float rotX, float rotY, float rotZ, int boneIndex, float scale, bool axisX, bool axisY, bool axisZ) { return _i(0x0E7E72961BA18619, effectName, ped, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, boneIndex, scale, axisX, axisY, axisZ); } + static Void _0x99AC7F0D8B9C893D(float p0) { return _i(0x99AC7F0D8B9C893D, p0); } + static Void stop_particle_fx_looped(int ptfxHandle, bool p1) { return _i(0x8F75998877616996, ptfxHandle, p1); } + static Void _0xA356990E161C9E65(bool p0) { return _i(0xA356990E161C9E65, p0); } + static Void _0x5CE62918F8D703C7(int p0, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8, int p9, int p10, int p11) { return _i(0x5CE62918F8D703C7, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } + static Void _0x1C4FC5752BCD8E48(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, float p9, float p10, float p11, float p12) { return _i(0x1C4FC5752BCD8E48, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } + static Void set_frozen_rendering_disabled(bool enabled) { return _i(0xDFC252D8A3E15AB7, enabled); } + static Void _0xE63D7C6EECECB66B(bool p0) { return _i(0xE63D7C6EECECB66B, p0); } + static bool transition_to_blurred(float transitionTime) { return _i(0xA328A24AAA6B7FDC, transitionTime); } + static bool transition_from_blurred(float transitionTime) { return _i(0xEFACC8AEF94430D5, transitionTime); } + static bool _0x98C4FE6EC34154CA(const char* p0, Ped ped, int p2, float posX, float posY, float posZ) { return _i(0x98C4FE6EC34154CA, p0, ped, p2, posX, posY, posZ); } + static Void _0x7A42B2E236E71415() { return _i(0x7A42B2E236E71415); } + static bool ui3dscene_is_available() { return _i(0xD3A10FC7FD8D98CD); } + static Void _0x108BE26959A9D9BB(bool p0) { return _i(0x108BE26959A9D9BB, p0); } + static bool _0xF1CEA8A4198D8E9A(const char* p0) { return _i(0xF1CEA8A4198D8E9A, p0); } + static Void _0xB7ED70C49521A61D(Any p0) { return _i(0xB7ED70C49521A61D, p0); } + static Void _0xDEADC0DEDEADC0DE(Object object) { return _i(0xDEADC0DEDEADC0DE, object); } + static Void use_particle_fx_asset_next_call(const char* name) { return _i(0x6C38AF3693A69A91, name); } + static Void set_force_ped_footsteps_tracks(bool toggle) { return _i(0xAEEDAD1420C65CC0, toggle); } + static Void set_force_vehicle_trails(bool toggle) { return _i(0x4CC7F0FEA5283FE0, toggle); } + static Void wash_decals_from_vehicle(Vehicle vehicle, float p1) { return _i(0x5B712761429DBC14, vehicle, p1); } + static Void wash_decals_in_range(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x9C30613D50A6ADEF, p0, p1, p2, p3, p4); } + static Void _0xCA465D9CC0D231BA(Any p0) { return _i(0xCA465D9CC0D231BA, p0); } + static int get_maximum_number_of_photos() { return _i(0x34D23450F028B0BF); } + static Any _0xE791DF1F73ED2C8B(Any p0) { return _i(0xE791DF1F73ED2C8B, p0); } + static Any _0xEC72C258667BE5EA(Any p0) { return _i(0xEC72C258667BE5EA, p0); } + static Any _0xBE197EAA669238F4(Any p0, Any p1, Any p2, Any p3) { return _i(0xBE197EAA669238F4, p0, p1, p2, p3); } + static Void set_debug_lines_and_spheres_drawing_active(bool enabled) { return _i(0x175B6BFC15CDD0C5, enabled); } + static Void _0x7FDFADE676AA3CB0(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9) { return _i(0x7FDFADE676AA3CB0, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void draw_debug_line_with_two_colours(float x1, float y1, float z1, float x2, float y2, float z2, int r1, int g1, int b1, int r2, int g2, int b2, int alpha1, int alpha2) { return _i(0xD8B9A8AC5608FF94, x1, y1, z1, x2, y2, z2, r1, g1, b1, r2, g2, b2, alpha1, alpha2); } + static Void draw_debug_sphere(float x, float y, float z, float radius, int red, int green, int blue, int alpha) { return _i(0xAAD68E1AB39DA632, x, y, z, radius, red, green, blue, alpha); } + static Void draw_debug_box(float x1, float y1, float z1, float x2, float y2, float z2, int red, int green, int blue, int alpha) { return _i(0x083A2CA4F2E573BD, x1, y1, z1, x2, y2, z2, red, green, blue, alpha); } + static Void draw_debug_cross(float x, float y, float z, float size, int red, int green, int blue, int alpha) { return _i(0x73B1189623049839, x, y, z, size, red, green, blue, alpha); } + static Void draw_debug_text(const char* text, float x, float y, float z, int red, int green, int blue, int alpha) { return _i(0x3903E216620488E8, text, x, y, z, red, green, blue, alpha); } + static Void draw_debug_text2_d(const char* text, float x, float y, float z, int red, int green, int blue, int alpha) { return _i(0xA3BB2E9555C05A8F, text, x, y, z, red, green, blue, alpha); } + static Void _0x61F95E5BB3E0A8C6(Any p0) { return _i(0x61F95E5BB3E0A8C6, p0); } + + static Void activate_frontend_menu(uint32_t menuhash, bool Toggle_Pause, int component) { return _i(0xEF01D36B9C9D0C7B, menuhash, Toggle_Pause, component); } + static Any _0xCE5D0E5E315DB238(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xCE5D0E5E315DB238, p0, p1, p2, p3, p4); } + static Blip add_blip_for_coord(float x, float y, float z) { return _i(0x5A039BB0BCA604B6, x, y, z); } + static Blip add_blip_for_entity(Entity entity) { return _i(0x5CDE92C702A8FCE7, entity); } + static Blip add_blip_for_pickup(Pickup pickup) { return _i(0xBE339365C863BD36, pickup); } + static Blip add_blip_for_radius(float posX, float posY, float posZ, float radius) { return _i(0x46818D79B1F7499A, posX, posY, posZ, radius); } + static Void add_next_message_to_previous_briefs(bool p0) { return _i(0x60296AF4BA14ABC5, p0); } + static Void _0x311438A071DD9B1A(Any p0, Any p1, Any p2) { return _i(0x311438A071DD9B1A, p0, p1, p2); } + static Void _0xA905192A6781C41B(float x, float y, float z) { return _i(0xA905192A6781C41B, x, y, z); } + static Void add_text_component_float(float value, int decimalPlaces) { return _i(0xE7DCB5B874BCD96E, value, decimalPlaces); } + static Void add_text_component_formatted_integer(int value, bool commaSeparated) { return _i(0x0E4C749FF9DE9CC4, value, commaSeparated); } + static Void add_text_component_integer(int value) { return _i(0x03B504CF259931BC, value); } + static Void add_text_component_substring_blip_name(Blip blip) { return _i(0x80EAD8E2E1D5D52E, blip); } + static Void add_text_component_substring_player_name(const char* text) { return _i(0x6C188BE134E074AA, text); } + static Void add_text_component_substring_website(const char* website) { return _i(0x94CF4AC034C9C986, website); } + static Void add_text_component_scaleform(const char* p0) { return _i(0x5F68520888E69014, p0); } + static Void add_text_component_app_title(const char* p0, int p1) { return _i(0x761B77454205A61D, p0, p1); } + static Void add_text_component_substring_text_label(const char* labelName) { return _i(0xC63CD5D2920ACBE7, labelName); } + static Void add_text_component_substring_text_label_hash_key(uint32_t gxtEntryHash) { return _i(0x17299B63C7683A2B, gxtEntryHash); } + static Void add_text_component_substring_time(int timestamp, int flags) { return _i(0x1115F16B8AB9E8BF, timestamp, flags); } + static Void _0xE67C6DFD386EA5E7(bool p0) { return _i(0xE67C6DFD386EA5E7, p0); } + static Void _0xCC3FDDED67BCFC63() { return _i(0xCC3FDDED67BCFC63); } + static Void _0x60734CC207C9833C(bool p0) { return _i(0x60734CC207C9833C, p0); } + static Any _0xF13FE2A80C05C561() { return _i(0xF13FE2A80C05C561); } + static Void begin_text_command_objective(const char* p0) { return _i(0x23D69E0465570028, p0); } + static Void set_loading_prompt_text_entry(const char* string) { return _i(0xABA17D7CE615ADBF, string); } + static Void begin_text_command_clear_print(const char* text) { return _i(0xE124FA80A759019C, text); } + static Void begin_text_command_display_help(const char* inputType) { return _i(0x8509B634FBE7DA11, inputType); } + static Void begin_text_command_display_text(const char* text) { return _i(0x25FBB336DF1804CB, text); } + static Void begin_text_command_line_count(const char* entry) { return _i(0x521FB041D93DD0E4, entry); } + static Void begin_text_command_width(const char* text) { return _i(0x54CE8AC98E120CAB, text); } + static Void begin_text_command_is_message_displayed(const char* text) { return _i(0x853648FD1063A213, text); } + static Void begin_text_command_is_this_help_message_being_displayed(const char* labelName) { return _i(0x0A24DA3A41B718F5, labelName); } + static Void begin_text_command_timer(const char* p0) { return _i(0x8F9EE5687F8EECCD, p0); } + static Void begin_text_command_print(const char* GxtEntry) { return _i(0xB87A37EEB7FAA67D, GxtEntry); } + static Void begin_text_command_set_blip_name(const char* gxtentry) { return _i(0xF9113A30DE5C6670, gxtentry); } + static Void begin_text_command_thefeed_post(const char* type) { return _i(0x202709F4C58A0424, type); } + static Any _0xB2A592B04648A9CB() { return _i(0xB2A592B04648A9CB); } + static bool is_loading_prompt_being_displayed() { return _i(0xD422FCC5F239A915); } + static Void remove_loading_prompt() { return _i(0x10D373323E5B9C0D); } + static Void set_player_cash_change(int cash, int bank) { return _i(0x0772DF77852C2E30, cash, bank); } + static Void clear_additional_text(int p0, bool p1) { return _i(0x2A179DF17CCF04CD, p0, p1); } + static Void _0xD12882D3FF82BF11() { return _i(0xD12882D3FF82BF11); } + static Void clear_all_help_messages() { return _i(0x6178F68A87A4D3A0); } + static Void clear_brief() { return _i(0x9D292F73ADBD9313); } + static Void _0x7792424AA0EAC32E() { return _i(0x7792424AA0EAC32E); } + static Void clear_floating_help(Any p0, bool p1) { return _i(0x50085246ABD3FEFA, p0, p1); } + static Void _0xE6DE0561D9232A64() { return _i(0xE6DE0561D9232A64); } + static Void clear_gps_flags() { return _i(0x21986729D6A3A830); } + static Void _0x67EEDEA1B9BAFD94() { return _i(0x67EEDEA1B9BAFD94); } + static Void clear_gps_player_waypoint() { return _i(0xFF4FB7C8CDFA3DA7); } + static Void clear_gps_race_track() { return _i(0x7AA5B4CE533C858B); } + static Void clear_help(bool toggle) { return _i(0x8DFCED7A656F8802, toggle); } + static Void clear_ped_in_pause_menu() { return _i(0x5E62BE5DC58E9E06); } + static Void clear_prints() { return _i(0xCC33FA791322B9D9); } + static Void clear_small_prints() { return _i(0x2CEA2839313C09AC); } + static Void clear_this_print(const char* p0) { return _i(0xCF708001E1E536DD, p0); } + static Void abort_text_chat() { return _i(0x1AC8F4AD40E22127); } + static Void _0xD2B32BE3FC1626C6() { return _i(0xD2B32BE3FC1626C6); } + static Any _0x66E7CB63C97B7D20() { return _i(0x66E7CB63C97B7D20); } + static int create_mp_gamer_tag(Ped ped, const char* username, bool pointedClanTag, bool isRockstarClan, const char* clanTag, Any p5) { return _i(0xBFEFE3321A3F5015, ped, username, pointedClanTag, isRockstarClan, clanTag, p5); } + static Void set_mp_gamer_tag_color(int headDisplayId, const char* username, bool pointedClanTag, bool isRockstarClan, const char* clanTag, Any p5, int r, int g, int b) { return _i(0x6DD05E9D83EFA4C9, headDisplayId, username, pointedClanTag, isRockstarClan, clanTag, p5, r, g, b); } + static Void _0x2708FC083123F9FF() { return _i(0x2708FC083123F9FF); } + static Any _0x551DF99658DB6EE8(float p0, float p1, float p2) { return _i(0x551DF99658DB6EE8, p0, p1, p2); } + static Void set_map_full_screen(bool toggle) { return _i(0x5354C5BA2EA868A4, toggle); } + static Void _0x1EAE6DD17B7A5EFA(Any p0) { return _i(0x1EAE6DD17B7A5EFA, p0); } + static Void _0xD8E694757BCEA8E9() { return _i(0xD8E694757BCEA8E9); } + static Void disable_frontend_this_frame() { return _i(0x6D3465A73092F0E6); } + static Void _0x9245E81072704B8A(bool p0) { return _i(0x9245E81072704B8A, p0); } + static Void display_ammo_this_frame(bool display) { return _i(0xA5E78BA2B1331C55, display); } + static Void display_area_name(bool toggle) { return _i(0x276B6CE369C33678, toggle); } + static Void display_cash(bool toggle) { return _i(0x96DEC8D5430208B7, toggle); } + static Void display_help_text_this_frame(const char* message, bool p1) { return _i(0x960C9FF8F616E41C, message, p1); } + static Void display_hud(bool toggle) { return _i(0xA6294919E56FF02A, toggle); } + static Void _0x7669F9E39DC17063() { return _i(0x7669F9E39DC17063); } + static Void _0x402F9ED62087E898() { return _i(0x402F9ED62087E898); } + static Void _0x82CEDC33687E1F50(bool p0) { return _i(0x82CEDC33687E1F50, p0); } + static Void display_radar(bool Toggle) { return _i(0xA0EBB943C300E693, Toggle); } + static Void display_sniper_scope_this_frame() { return _i(0x73115226F4814E62); } + static bool does_blip_exist(Blip blip) { return _i(0xA6DB27D19ECBB7DA, blip); } + static bool _0xDD2238F57B977751(Any p0) { return _i(0xDD2238F57B977751, p0); } + static bool does_ped_have_ai_blip(Ped ped) { return _i(0x15B8ECF844EE67ED, ped); } + static bool does_text_block_exist(const char* gxt) { return _i(0x1C7302E725259789, gxt); } + static bool does_text_label_exist(const char* gxt) { return _i(0xAC09CA973C564252, gxt); } + static Void center_player_on_radar_this_frame() { return _i(0x6D14BFDC33B34F55); } + static Void _0x55F5A5F07134DE60() { return _i(0x55F5A5F07134DE60); } + static Void _0xBF4F34A85CA2970C() { return _i(0xBF4F34A85CA2970C); } + static Void end_text_command_objective(bool p0) { return _i(0xCFDBDF5AE59BA0F4, p0); } + static Void show_loading_prompt(int busySpinnerType) { return _i(0xBD12F8228410D9B4, busySpinnerType); } + static Void end_text_command_clear_print() { return _i(0xFCC75460ABA29378); } + static Void end_text_command_display_help(Any p0, bool loop, bool beep, int shape) { return _i(0x238FFE5C7B0498A6, p0, loop, beep, shape); } + static Void end_text_command_display_text(float x, float y, Any p2) { return _i(0xCD015E5BB0D96A57, x, y, p2); } + static int end_text_command_get_line_count(float x, float y) { return _i(0x9040DFB09BE75706, x, y); } + static float end_text_command_get_width(int font) { return _i(0x85F061DA64ED2F67, font); } + static bool end_text_command_is_message_displayed() { return _i(0x8A9BA1AB3E237613); } + static bool end_text_command_is_this_help_message_being_displayed(int p0) { return _i(0x10BDDBFC529428DD, p0); } + static Void end_text_command_timer(bool p0) { return _i(0xA86911979638106F, p0); } + static Void end_text_command_print(int duration, bool drawImmediately) { return _i(0x9D77056A530643F6, duration, drawImmediately); } + static Void end_text_command_set_blip_name(Blip blip) { return _i(0xBC38B49BCB83BC9B, blip); } + static int draw_notification_award(const char* p0, const char* p1, int p2, int p3, const char* p4) { return _i(0xAA295B6F28BD587D, p0, p1, p2, p3, p4); } + static int draw_notification_apartment_invite(bool p0, bool p1, int* p2, int p3, bool isLeader, bool unk0, int clanDesc, int R, int G, int B) { return _i(0x97C9E4E7024A8F2C, p0, p1, p2, p3, isLeader, unk0, clanDesc, R, G, B); } + static int end_text_command_thefeed_post_crewtag_with_game_name(bool p0, bool p1, int64_t* p2, int p3, bool isLeader, bool unk0, int clanDesc, const char* playerName, int R, int G, int B) { return _i(0x137BC35589E34E1E, p0, p1, p2, p3, isLeader, unk0, clanDesc, playerName, R, G, B); } + static Any _0x8EFCCF6EC66D85E4(Any* p0, Any* p1, Any* p2, bool p3, bool p4) { return _i(0x8EFCCF6EC66D85E4, p0, p1, p2, p3, p4); } + static int set_notification_message2(const char* picName1, const char* picName2, bool flash, int iconType, const char* sender, const char* subject) { return _i(0x1CCD9A37359072CF, picName1, picName2, flash, iconType, sender, subject); } + static int set_notification_message3(const char* picName1, const char* picName2, bool p2, Any p3, const char* p4, const char* p5) { return _i(0xC6F580E4C94926AC, picName1, picName2, p2, p3, p4, p5); } + static int set_notification_message4(const char* picName1, const char* picName2, bool flash, int iconType, const char* sender, const char* subject, float duration) { return _i(0x1E6611149DB3DB6B, picName1, picName2, flash, iconType, sender, subject, duration); } + static int set_notification_message_clan_tag(const char* picName1, const char* picName2, bool flash, int iconType, const char* sender, const char* subject, float duration, const char* clanTag) { return _i(0x5CBF7BADE20DB93E, picName1, picName2, flash, iconType, sender, subject, duration, clanTag); } + static int set_notification_message_clan_tag2(const char* picName1, const char* picName2, bool flash, int iconType1, const char* sender, const char* subject, float duration, const char* clanTag, int iconType2, int p9) { return _i(0x531B84E7DA981FB6, picName1, picName2, flash, iconType1, sender, subject, duration, clanTag, iconType2, p9); } + static int draw_notification_with_icon(int type, int image, const char* text) { return _i(0xD202B92CBF1D816F, type, image, text); } + static int draw_notification_with_button(int type, const char* button_option, const char* text) { return _i(0xDD6CB2CCE7C2735C, type, button_option, text); } + static int set_notification_message(const char* p0, int p1, int p2, int p3, bool p4, const char* picName1, const char* picName2) { return _i(0x2B7E9A4EAAA93C89, p0, p1, p2, p3, p4, picName1, picName2); } + static int draw_notification(bool blink, bool p1) { return _i(0x2ED7843F8F801023, blink, p1); } + static int draw_notification4(bool blink, bool p1) { return _i(0xF020C96915705B3A, blink, p1); } + static int draw_notification2(bool blink, bool p1) { return _i(0x44FA03975424A0EE, blink, p1); } + static int draw_notification3(bool blink, bool p1) { return _i(0x378E809BF61EC840, blink, p1); } + static Any _0x33EE12743CCD6343(Any p0, Any p1, Any p2) { return _i(0x33EE12743CCD6343, p0, p1, p2); } + static Any _0xC8F3AAF93D0600BF(Any p0, Any p1, Any p2, Any p3) { return _i(0xC8F3AAF93D0600BF, p0, p1, p2, p3); } + static Any _0x7AE0589093A2E088(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0x7AE0589093A2E088, p0, p1, p2, p3, p4, p5); } + static Any _0xB6871B0555B02996(Any* p0, Any* p1, Any p2, Any* p3, Any* p4, Any p5, Any p6, Any p7) { return _i(0xB6871B0555B02996, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void _0xCEF214315D276FD1(bool p0) { return _i(0xCEF214315D276FD1, p0); } + static Void flash_ability_bar(bool toggle) { return _i(0x02CFBA0C9E9275CE, toggle); } + static Void flash_minimap_display() { return _i(0xF2DD778C22B15BDA); } + static Void _0x6B1DE27EE78E6A19(Any p0) { return _i(0x6B1DE27EE78E6A19, p0); } + static Void flash_wanted_display(bool p0) { return _i(0xA18AFB39081B6A1F, p0); } + static Void _0xEE4C0E6DBC6F2C6F() { return _i(0xEE4C0E6DBC6F2C6F); } + static Void _0x8817605C2BA76200() { return _i(0x8817605C2BA76200); } + static Void _0x57D760D55F54E071(bool p0) { return _i(0x57D760D55F54E071, p0); } + static Void _0xBA8D65C1C65702E5(bool p0) { return _i(0xBA8D65C1C65702E5, p0); } + static Any _0x1121BFA1A1A522A8() { return _i(0x1121BFA1A1A522A8); } + static Blip* _0x7CD934010E115C2C(Ped ped) { return _i(0x7CD934010E115C2C, ped); } + static Blip _0x56176892826A4FE8(Ped ped) { return _i(0x56176892826A4FE8, ped); } + static int get_blip_alpha(Blip blip) { return _i(0x970F608F0EE6C885, blip); } + static int get_blip_colour(Blip blip) { return _i(0xDF729E8D20CF7327, blip); } + static Any _0x2C173AE2BDB9385E(Any p0) { return _i(0x2C173AE2BDB9385E, p0); } + static Blip get_blip_from_entity(Entity entity) { return _i(0xBC8DBDCA2436F7E8, entity); } + static int get_blip_hud_colour(Blip blip) { return _i(0x729B5F1EFBC0AAEE, blip); } + static math::vector3 get_blip_info_id_coord(Blip blip) { return _i>(0xFA7C7F0AADF25D09, blip); } + static math::vector3 get_blip_coords(Blip blip) { return _i>(0x586AFE3FF72D996E, blip); } + static int get_blip_info_id_display(Blip blip) { return _i(0x1E314167F701DC3B, blip); } + static Entity get_blip_info_id_entity_index(Blip blip) { return _i(0x4BA4E2553AFEDC2C, blip); } + static int get_blip_info_id_type(Blip blip) { return _i(0xBE9B0959FFD0779B, blip); } + static int get_blip_sprite(Blip blip) { return _i(0x1FC877464A04FC4F, blip); } + static const char* get_text_substring(const char* text, int position, int length) { return _i(0x169BD9382084C8C0, text, position, length); } + static const char* get_text_substring_slice(const char* text, int startPosition, int endPosition) { return _i(0xCE94AEBA5D82908A, text, startPosition, endPosition); } + static const char* get_text_substring_safe(const char* text, int position, int length, int maxLength) { return _i(0xB2798643312205C5, text, position, length, maxLength); } + static bool _0x8F08017F9D7C47BD(Any p0, Any* p1, Any p2) { return _i(0x8F08017F9D7C47BD, p0, p1, p2); } + static bool _0xCA6B2F7CE32AB653(Any p0, Any* p1, Any p2) { return _i(0xCA6B2F7CE32AB653, p0, p1, p2); } + static bool _0x24A49BEAF468DC90(Any p0, Any* p1, Any p2, Any p3, Any p4) { return _i(0x24A49BEAF468DC90, p0, p1, p2, p3, p4); } + static Any _0xD484BF71050CA1EE(Any p0) { return _i(0xD484BF71050CA1EE, p0); } + static uint32_t get_current_frontend_menu() { return _i(0x2309595AD6145265); } + static Any _0x01A358D9128B7A86() { return _i(0x01A358D9128B7A86); } + static int get_current_website_id() { return _i(0x97D47996FC48CBAD); } + static Any _0xC2D2AD9EAAE265B8() { return _i(0xC2D2AD9EAAE265B8); } + + static const char* get_label_text(const char* labelName) { + const char* Return = _i(0x7B5280EBA9840C72, labelName); + return !Return ? "NULL" : Return; + } + + static Blip get_first_blip_info_id(int blipSprite) { return _i(0x1BEDE233E6CD2A1F, blipSprite); } + static Any _0x98C3CF913D895111(Any p0, Any p1) { return _i(0x98C3CF913D895111, p0, p1); } + static Any _0xE3B05614DCE1D014(Any p0) { return _i(0xE3B05614DCE1D014, p0); } + static Void get_hud_colour(int hudColorIndex, int* r, int* g, int* b, int* a) { return _i(0x7C9C91AB74A0360F, hudColorIndex, r, g, b, a); } + static math::vector3 get_hud_component_position(int id) { return _i>(0x223CA69A8C4417FD, id); } + static bool get_hud_screen_position_froworld_position(float worldX, float worldY, float worldZ, float* screenX, float* screenY) { return _i(0xF9904D11F1ACBEC3, worldX, worldY, worldZ, screenX, screenY); } + static int get_length_of_literal_string(const char* string) { return _i(0xF030907CCBB8A9FD, string); } + static int get_length_of_string(const char* STRING) { return _i(0x43E4111189E54F0E, STRING); } + static int get_length_of_string_with_this_text_label(const char* gxt) { return _i(0x801BD273D3A23F74, gxt); } + static Blip get_main_player_blip_id() { return _i(0xDCD4EC3F419D02FA); } + static Void _0x7E17BE53E1AAABAF(Any* p0, Any* p1, Any* p2) { return _i(0x7E17BE53E1AAABAF, p0, p1, p2); } + static bool _0x052991E59076E4E4(uint32_t p0, Any* p1) { return _i(0x052991E59076E4E4, p0, p1); } + static bool _0x5FBD7095FE7AE57F(Any p0, float* p1) { return _i(0x5FBD7095FE7AE57F, p0, p1); } + static bool set_userids_uihidden(Any p0, Any* p1) { return _i(0xEF4CED81CEBEDC6D, p0, p1); } + static bool _0x90A6526CF0381030(Any p0, Any* p1, Any p2, Any p3) { return _i(0x90A6526CF0381030, p0, p1, p2, p3); } + static Void _0x36C1451A88A09630(Any* p0, Any* p1) { return _i(0x36C1451A88A09630, p0, p1); } + static bool is_minimap_area_revealed(float x, float y, float radius) { return _i(0x6E31B91145873922, x, y, radius); } + static float _0xE0130B41D3CF4574() { return _i(0xE0130B41D3CF4574); } + static bool _0x632B2940C67F4EA9(int scaleformHandle, Any* p1, Any* p2, Any* p3) { return _i(0x632B2940C67F4EA9, scaleformHandle, p1, p2, p3); } + static Any get_named_rendertarget_render_id(const char* p0) { return _i(0x1A6478B61C6BDC3B, p0); } + static Blip disable_blip_name_for_var() { return _i(0x5C90988E7C8E1AF4); } + static Blip get_next_blip_info_id(int blipSprite) { return _i(0x14F96AA50D6FBEA7, blipSprite); } + static Any _0x3F0CF9CB7E589B88() { return _i(0x3F0CF9CB7E589B88); } + static int get_number_of_active_blips() { return _i(0x9A3FF3DE163034E8); } + static math::vector3 _0x5BFF36D6ED83E0AE() { return _i>(0x5BFF36D6ED83E0AE); } + static int get_pause_menu_state() { return _i(0x272ACD84970869C5); } + static bool _0xA238192F33110615(int* p0, int* p1, int* p2) { return _i(0xA238192F33110615, p0, p1, p2); } + static float get_text_scale_height(float size, int font) { return _i(0xDB88A37483346780, size, font); } + static Any _0x593FEAE1F73392D4() { return _i(0x593FEAE1F73392D4); } + static const char* get_street_name_from_hash_key(uint32_t hash) { return _i(0xD0EF8A959B8A4CB9, hash); } + static int get_blip_info_id_iterator() { return _i(0x186E5D252FA50E7D); } + static Void give_ped_to_pause_menu(Ped ped, int p1) { return _i(0xAC0BFBDC3BE00E14, ped, p1); } + static bool has_additional_text_loaded(int slot) { return _i(0x02245FE4BED318B8, slot); } + static Any _0xA277800A9EAE340E() { return _i(0xA277800A9EAE340E); } + static Any _0x2E22FEFA0100275E() { return _i(0x2E22FEFA0100275E); } + static Any _0xF284AC67940C6812() { return _i(0xF284AC67940C6812); } + static bool is_scripted_hud_component_active(int id) { return _i(0xDD100EB17A94FF65, id); } + static bool _0x214CD562A939246A() { return _i(0x214CD562A939246A); } + static bool has_this_additional_text_loaded(const char* gxt, int slot) { return _i(0xADBF060E2B30C5BC, gxt, slot); } + static int get_default_script_rendertarget_render_id() { return _i(0x52F0982D7FD156B6); } + static bool _0x4A9923385BDB9DAD() { return _i(0x4A9923385BDB9DAD); } + static Void hide_help_text_this_frame() { return _i(0xD46923FC481CA285); } + static Void hide_hud_and_radar_this_frame() { return _i(0x719FF505F097FD20); } + static Void hide_hud_component_this_frame(int id) { return _i(0x6806C51AD12B83B8, id); } + static Void hide_loading_on_fade_this_frame() { return _i(0x4B0311D3CDC4648F); } + static Void disable_radar_this_frame() { return _i(0x5FBAE526203990C9); } + static Void _0x20FE7FDFEEAD38C0() { return _i(0x20FE7FDFEEAD38C0); } + static Void hide_number_on_blip(Blip blip) { return _i(0x532CFF637EF80148, blip); } + static Void hide_scripted_hud_component_this_frame(int id) { return _i(0xE374C498D8BADC14, id); } + static Void _0xA4DEDE28B1814289() { return _i(0xA4DEDE28B1814289); } + static Void _0x488043841BBE156F() { return _i(0x488043841BBE156F); } + static Void show_weapon_wheel(bool forcedShow) { return _i(0xEB354E5376BC81A7, forcedShow); } + static uint32_t _0xA48931185F0536FE() { return _i(0xA48931185F0536FE); } + static Any _0xA13E93403F26C812(Any p0) { return _i(0xA13E93403F26C812, p0); } + static Void _0x72C1056D678BB7D8(uint32_t weaponHash) { return _i(0x72C1056D678BB7D8, weaponHash); } + static Void _0x14C9FDCC41F81F63(bool p0) { return _i(0x14C9FDCC41F81F63, p0); } + static Void _0x0AFC4AF510774B47() { return _i(0x0AFC4AF510774B47); } + static bool is_blip_flashing(Blip blip) { return _i(0xA5E41FD83AD6CEF0, blip); } + static bool is_blip_on_minimap(Blip blip) { return _i(0xE41CA53051197A27, blip); } + static bool is_blip_short_range(Blip blip) { return _i(0xDA5F8727EB75B926, blip); } + static bool _0x2432784ACA090DA4(Any p0) { return _i(0x2432784ACA090DA4, p0); } + static Any _0x3BAB9A4E4F2FF5C7() { return _i(0x3BAB9A4E4F2FF5C7); } + static bool is_help_message_being_displayed() { return _i(0x4D79439A6B55AC67); } + static bool is_help_message_fading_out() { return _i(0x327EDEEEAC55C369); } + static bool is_help_message_on_screen() { return _i(0xDAD37F45428801AE); } + static bool _0x4167EFE0527D706E() { return _i(0x4167EFE0527D706E); } + static bool is_hud_component_active(int id) { return _i(0xBC4C9EA5391ECC0D, id); } + static bool is_hud_hidden() { return _i(0xA86478C6958735C5); } + static bool is_hud_preference_switched_on() { return _i(0x1930DFA731813EC4); } + static Any _0x801879A9B4F4B2FB() { return _i(0x801879A9B4F4B2FB); } + static bool is_message_being_displayed() { return _i(0x7984C03AA5CC2F41); } + static bool is_radar_enabled() { return _i(0xAF754F20EB5CD51A); } + static bool is_mission_creator_blip(Blip blip) { return _i(0x26F49BF3381D933D, blip); } + static Any _0x3D9ACB1EB139E702() { return _i(0x3D9ACB1EB139E702); } + static bool is_mp_gamer_tag_active(int gamerTagId) { return _i(0x4E929E7A5796FD26, gamerTagId); } + static bool add_trevor_random_modifier(int gamerTagId) { return _i(0x595B5178E412E199, gamerTagId); } + static bool has_mp_gamer_tag() { return _i(0x6E0EB3EB47C8D7AA); } + static bool is_text_chat_active() { return _i(0xB118AF58B5F332A1); } + static bool is_named_rendertarget_linked(uint32_t hash) { return _i(0x113750538FA31298, hash); } + static bool is_named_rendertarget_registered(const char* p0) { return _i(0x78DCDC15C9F116B4, p0); } + static Any _0x4E3CD0EF8A489541() { return _i(0x4E3CD0EF8A489541); } + static int _0x6F72CD94F7B5B68C() { return _i(0x6F72CD94F7B5B68C); } + static bool is_social_club_active() { return _i(0xC406BE343FC4B9AF); } + static Any _0x9049FE339D5F6F6F() { return _i(0x9049FE339D5F6F6F); } + static bool is_pause_menu_active() { return _i(0xB0034A223497FFCB); } + static bool is_pause_menu_restarting() { return _i(0x1C491717107431C7); } + static bool is_radar_hidden() { return _i(0x157F93B036700462); } + static bool is_radar_preference_switched_on() { return _i(0x9EB6522EA68F22FE); } + static Any _0x9135584D09A3437E() { return _i(0x9135584D09A3437E); } + static bool _0x09C0403ED9A751C2(Any p0) { return _i(0x09C0403ED9A751C2, p0); } + static Any _0x2F057596F2BD0061() { return _i(0x2F057596F2BD0061); } + static bool is_streaming_additional_text(int p0) { return _i(0x8B6817B71B85EBF0, p0); } + static bool is_subtitle_preference_switched_on() { return _i(0xAD6DACA4BA53E0A4); } + static bool has_mp_gamer_tag2(int gamerTagId) { return _i(0xEB709A36958ABE0D, gamerTagId); } + static bool is_warning_message_active() { return _i(0xE18B138FABC53103); } + static Any _0xAF42195A42C63BBA() { return _i(0xAF42195A42C63BBA); } + static bool is_waypoint_active() { return _i(0x1DD1F58F493F1DA5); } + static Void link_named_rendertarget(uint32_t hash) { return _i(0xF6C09E276AEB3F2D, hash); } + static Void lock_minimap_angle(int angle) { return _i(0x299FAEBB108AE05B, angle); } + static Void lock_minimap_position(float x, float y) { return _i(0x1279E861A329E73F, x, y); } + static Void set_text_chat_unk(bool p0) { return _i(0x1DB21A44B09E8BA3, p0); } + static Void _0x7C226D5346D4D10A(Any p0) { return _i(0x7C226D5346D4D10A, p0); } + static Void show_social_club_legal_screen() { return _i(0x805D7CBB36FD6C4C); } + static Void _0x523A590C1A3CC0D3() { return _i(0x523A590C1A3CC0D3); } + static Void _0x75D3691713C3B05A() { return _i(0x75D3691713C3B05A); } + static Void override_multiplayer_chat_colour(Any p0, Any p1) { return _i(0xF47E567B3630DD12, p0, p1); } + static Void _0x6A1738B4323FE2D9(Any p0) { return _i(0x6A1738B4323FE2D9, p0); } + static Void _0x77F16B447824DA6C(Any p0) { return _i(0x77F16B447824DA6C, p0); } + static Void _0xCDCA26E80FAECB8F() { return _i(0xCDCA26E80FAECB8F); } + static Void add_frontend_menu_context(uint32_t hash) { return _i(0xDD564BDD0472C936, hash); } + static Void object_decal_toggle(uint32_t hash) { return _i(0x444D8CF241EC25C5, hash); } + static Any _0xDE03620F8703A9DF() { return _i(0xDE03620F8703A9DF); } + static bool _0xC8E1071177A23BE5(Any* p0, Any* p1, Any* p2) { return _i(0xC8E1071177A23BE5, p0, p1, p2); } + static Any _0x359AF31A4B52F5ED() { return _i(0x359AF31A4B52F5ED); } + static Any _0x13C4B962653A5280() { return _i(0x13C4B962653A5280); } + static bool _0x84698AB38D0C6636(uint32_t hash) { return _i(0x84698AB38D0C6636, hash); } + static Any _0x2A25ADC48F87841F() { return _i(0x2A25ADC48F87841F); } + static Void enable_deathblood_seethrough(bool p0) { return _i(0x4895BDEA16E7C080, p0); } + static Void _0xC78E239AC5B2DDB9(bool p0, Any p1, Any p2) { return _i(0xC78E239AC5B2DDB9, p0, p1, p2); } + static Void _0xF06EBB91A81E09E3(bool p0) { return _i(0xF06EBB91A81E09E3, p0); } + static Void _0x2DE6C5E2E996F178(Any p0) { return _i(0x2DE6C5E2E996F178, p0); } + static Void _0xC65AB383CD91DF98() { return _i(0xC65AB383CD91DF98); } + static Void pulse_blip(Blip blip) { return _i(0x742D6FD43115AF73, blip); } + static Void refresh_waypoint() { return _i(0x81FA173F170560D1); } + static bool register_named_rendertarget(const char* p0, bool p1) { return _i(0x57D9C12635E25CE3, p0, p1); } + static Void _0x14621BB1DF14E2B2() { return _i(0x14621BB1DF14E2B2); } + static bool release_named_rendertarget(Any* p0) { return _i(0xE9F6FFE837354DD4, p0); } + static Void _0x2916A928514C9827() { return _i(0x2916A928514C9827); } + static Void remove_blip(Blip* blip) { return _i(0x86A652570E5F25DD, blip); } + static Void _0xC594B315EDF2D4AF(Ped ped) { return _i(0xC594B315EDF2D4AF, ped); } + static Void remove_mp_gamer_tag(int gamerTagId) { return _i(0x31698AA80E0223F8, gamerTagId); } + static Void remove_multiplayer_bank_cash() { return _i(0xC7C6789AA1CFEDD0); } + static Void remove_multiplayer_hud_cash() { return _i(0x968F270E39141ECA); } + static Void _0x95CF81BD06EE1887() { return _i(0x95CF81BD06EE1887); } + static Void _0x6EF54AB721DC6242() { return _i(0x6EF54AB721DC6242); } + static Void set_hud_colours_switch(int hudColorIndex, int hudColorIndex2) { return _i(0x1CCC708F0F850613, hudColorIndex, hudColorIndex2); } + static Void set_hud_colour(int hudColorIndex, int r, int g, int b, int a) { return _i(0xF314CF4F0211894E, hudColorIndex, r, g, b, a); } + static Void request_additional_text(const char* gxt, int slot) { return _i(0x71A78003C8E71424, gxt, slot); } + static Void request_additional_text2(const char* gxt, int slot) { return _i(0x6009F9F1AE90D8A6, gxt, slot); } + static Void _0xB99C4E4D9499DF29(bool p0) { return _i(0xB99C4E4D9499DF29, p0); } + static Void reset_hud_component_values(int id) { return _i(0x450930E616475D0D, id); } + static Void reset_reticule_values() { return _i(0x12782CE0A636E9F0); } + static Void restart_frontend_menu(uint32_t menuHash, int p1) { return _i(0x10706DC6AD2D49C0, menuHash, p1); } + static Void set_ability_bar_value(float p0, float p1) { return _i(0x9969599CCFF5D85E, p0, p1); } + static Void _0x577599CCED639CA2(Any p0) { return _i(0x577599CCED639CA2, p0); } + static Void _0xEE76FF7E6A0166B0(int headDisplayId, bool p1) { return _i(0xEE76FF7E6A0166B0, headDisplayId, p1); } + static Void set_radar_bigmap_enabled(bool toggleBigMap, bool showFullMap) { return _i(0x231C8F89D0539D8F, toggleBigMap, showFullMap); } + static Void set_blip_alpha(Blip blip, int alpha) { return _i(0x45FF974EEE1C8734, blip, alpha); } + static Void set_blip_as_friendly(Blip blip, bool toggle) { return _i(0x6F6F290102C02AB4, blip, toggle); } + static Void set_blip_shrink(Blip blip, bool toggle) { return _i(0x2B6D467DAB714E8D, blip, toggle); } + static Void set_blip_as_mission_creator_blip(Blip blip, bool toggle) { return _i(0x24AC0137444F9FD5, blip, toggle); } + static Void set_blip_as_short_range(Blip blip, bool toggle) { return _i(0xBE8BE4FE60E27B72, blip, toggle); } + static Void set_blip_bright(Blip blip, bool toggle) { return _i(0xB203913733F27884, blip, toggle); } + static Void set_blip_category(Blip blip, int index) { return _i(0x234CDD44D996FD9A, blip, index); } + static Void set_blip_colour(Blip blip, int color) { return _i(0x03D7FB09E75D6B7E, blip, color); } + static Void set_blip_coords(Blip blip, float posX, float posY, float posZ) { return _i(0xAE2AF67E9D9AF65D, blip, posX, posY, posZ); } + static Void set_blip_display(Blip blip, int displayId) { return _i(0x9029B2F3DA924928, blip, displayId); } + static Void _0xC4278F70131BAA6D(Any p0, bool p1) { return _i(0xC4278F70131BAA6D, p0, p1); } + static Void set_blip_fade(Blip blip, int opacity, int duration) { return _i(0x2AEE8F8390D2298C, blip, opacity, duration); } + static Void set_blip_flashes(Blip blip, bool toggle) { return _i(0xB14552383D39CE3E, blip, toggle); } + static Void set_blip_flashes_alternate(Blip blip, bool toggle) { return _i(0x2E8D9498C56DD0D1, blip, toggle); } + static Void set_blip_flash_interval(Blip blip, Any p1) { return _i(0xAA51DB313C010A7E, blip, p1); } + static Void set_blip_flash_timer(Blip blip, int duration) { return _i(0xD3CD6FD297AE87CC, blip, duration); } + static Void _0x54318C915D27E4CE(Any p0, bool p1) { return _i(0x54318C915D27E4CE, p0, p1); } + static Void set_blip_high_detail(Blip blip, bool toggle) { return _i(0xE2590BC29220CEBB, blip, toggle); } + static Void _0xB552929B85FC27EC(Any p0, Any p1) { return _i(0xB552929B85FC27EC, p0, p1); } + static Void set_blip_name_from_text_file(Blip blip, const char* gxtEntry) { return _i(0xEAA0FFE120D92784, blip, gxtEntry); } + static Void set_blip_name_to_player_name(Blip blip, Player player) { return _i(0x127DE7B20C60A6A3, blip, player); } + static Void set_blip_priority(Blip blip, int priority) { return _i(0xAE9FC9EF6A9FAC79, blip, priority); } + static Void set_blip_rotation(Blip blip, int rotation) { return _i(0xF87683CDF73C3F6E, blip, rotation); } + static Void _0xA8B6AFDAC320AC87(Any p0, Any p1) { return _i(0xA8B6AFDAC320AC87, p0, p1); } + static Void set_blip_route(Blip blip, bool enabled) { return _i(0x4F7D8A9BFB0B43E9, blip, enabled); } + static Void set_blip_route_colour(Blip blip, int colour) { return _i(0x837155CD2F63DA09, blip, colour); } + static Void set_blip_scale(Blip blip, float scale) { return _i(0xD38744167B2FA257, blip, scale); } + static Void set_blip_secondary_colour(Blip blip, float r, float g, float b) { return _i(0x14892474891E09EB, blip, r, g, b); } + static Void _0x4B5B620C9B59ED34(Any p0, Any p1) { return _i(0x4B5B620C9B59ED34, p0, p1); } + static Void set_blip_show_cone(Blip blip, bool toggle) { return _i(0x13127EC3665E8EE1, blip, toggle); } + static Void set_blip_sprite(Blip blip, int spriteId) { return _i(0xDF735600A4696DAF, blip, spriteId); } + static Void _0x2C9F302398E13141(Any p0, Any p1) { return _i(0x2C9F302398E13141, p0, p1); } + static Void _0xD1942374085C8469(Any p0) { return _i(0xD1942374085C8469, p0); } + static Void set_notification_color_next(int hudIndex) { return _i(0x39BBF623FC803EAC, hudIndex); } + static Void _0x817B86108EB94E51(bool p0, Any* p1, Any* p2, Any* p3, Any* p4, Any* p5, Any* p6, Any* p7, Any* p8) { return _i(0x817B86108EB94E51, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static Void _0x04655F9D075D0AE5(bool p0) { return _i(0x04655F9D075D0AE5, p0); } + static Void _0x2632482FD6B9AB87() { return _i(0x2632482FD6B9AB87); } + static Void _0xA17784FCA9548D15(Any p0, Any p1, Any p2) { return _i(0xA17784FCA9548D15, p0, p1, p2); } + static Void set_minimap_attitude_indicator_level(float altitude, bool p1) { return _i(0xD201F3FF917A506D, altitude, p1); } + static Void set_player_blip_position_this_frame(float x, float y) { return _i(0x77E2DD177910E1CF, x, y); } + static Void _0xCD74233600C4EA6B(Any p0) { return _i(0xCD74233600C4EA6B, p0); } + static Void _0x7679CC1BCEBE3D4C(Any p0, float p1, float p2) { return _i(0x7679CC1BCEBE3D4C, p0, p1, p2); } + static Void _0x788E7FD431BD67F1(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0x788E7FD431BD67F1, p0, p1, p2, p3, p4, p5); } + static Void _0xB094BC1DB4018240(Any p0, Any p1, float p2, float p3) { return _i(0xB094BC1DB4018240, p0, p1, p2, p3); } + static Void _0x784BA7E0ECEB4178(Any p0, float x, float y, float z) { return _i(0x784BA7E0ECEB4178, p0, x, y, z); } + static Void _0x2790F4B17D098E26(Any p0) { return _i(0x2790F4B17D098E26, p0); } + static Void set_frontend_active(bool active) { return _i(0x745711A75AB09277, active); } + static Void _0x900086F371220B6F(bool p0, Any p1, Any p2) { return _i(0x900086F371220B6F, p0, p1, p2); } + static Void set_gps_flags(int p0, float p1) { return _i(0x5B440763A4C8D15B, p0, p1); } + static Void set_gps_flashes(bool toggle) { return _i(0x320D0E0D936A0E9B, toggle); } + static Void _0x3DDA37128DD1ACA8(bool p0) { return _i(0x3DDA37128DD1ACA8, p0); } + static Void _0x3F5CC444DCAAA8F2(Any p0, Any p1, bool p2) { return _i(0x3F5CC444DCAAA8F2, p0, p1, p2); } + static Void _0xB9C362BABECDDC7A(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xB9C362BABECDDC7A, p0, p1, p2, p3, p4); } + static Void set_hud_component_position(int id, float x, float y) { return _i(0xAABB1F56E2A17CED, id, x, y); } + static Void _0x06A320535F5F0248(Any p0) { return _i(0x06A320535F5F0248, p0); } + static Void _0x975D66A0BC17064C(Any p0) { return _i(0x975D66A0BC17064C, p0); } + static Void set_minimap_block_waypoint(bool toggle) { return _i(0x58FADDED207897DC, toggle); } + static Any set_minimap_component(int p0, bool p1, int p2) { return _i(0x75A9A10948D1DEA6, p0, p1, p2); } + static Void _0x62E849B7EB28E770(bool p0) { return _i(0x62E849B7EB28E770, p0); } + static Void _0x0923DBF87DFF735E(float x, float y, float z) { return _i(0x0923DBF87DFF735E, x, y, z); } + static Void _0x71BDB63DBAF8DA59(Any p0) { return _i(0x71BDB63DBAF8DA59, p0); } + static Void _0x35EDD5B2E3FF01C0() { return _i(0x35EDD5B2E3FF01C0); } + static Void set_minimap_revealed(bool toggle) { return _i(0xF8DEE0A5600CBB93, toggle); } + static Void set_north_yankton_map(bool toggle) { return _i(0x9133955F1A2DA957, toggle); } + static Void key_hud_colour(bool p0, Any p1) { return _i(0x1A5CD7752DD28CD3, p0, p1); } + static Void set_mission_name(bool p0, const char* name) { return _i(0x5F28ECF5FC84772F, p0, name); } + static Void _0xE45087D85F468BC2(bool p0, Any* p1) { return _i(0xE45087D85F468BC2, p0, p1); } + static Void set_cursor_sprite(int spriteId) { return _i(0x8DB8CFFD58B62552, spriteId); } + static Void show_cursor_this_frame() { return _i(0xAAE7CE1D63167423); } + static Void _0x98215325A695E78A(bool p0) { return _i(0x98215325A695E78A, p0); } + static Void set_mp_gamer_tag_icons(int headDisplayId, bool p1) { return _i(0xA67F9C46D612B6F1, headDisplayId, p1); } + static Void set_mp_gamer_tag_alpha(int gamerTagId, int component, int alpha) { return _i(0xD48FE545CD46F857, gamerTagId, component, alpha); } + static Void set_mp_gamer_tag_chatting(int gamerTagId, const char* string) { return _i(0x7B7723747CCB55B6, gamerTagId, string); } + static Void set_mp_gamer_tag_colour(int gamerTagId, int flag, int color) { return _i(0x613ED644950626AE, gamerTagId, flag, color); } + static Void set_mp_gamer_tag_health_bar_colour(int headDisplayId, int color) { return _i(0x3158C77A7E888AB4, headDisplayId, color); } + static Void set_mp_gamer_tag_name(int gamerTagId, const char* string) { return _i(0xDEA2B8283BAA3944, gamerTagId, string); } + static Void _0x9C16459B2324B2CF(Any p0, Any p1) { return _i(0x9C16459B2324B2CF, p0, p1); } + static Void set_mp_gamer_tag_visibility(int gamerTagId, int component, bool toggle, Any p3) { return _i(0x63BB75ABEDC1F6A0, gamerTagId, component, toggle, p3); } + static Void set_mp_gamer_tag_wanted_level(int gamerTagId, int wantedlvl) { return _i(0xCF228E2AA03099C3, gamerTagId, wantedlvl); } + static Void set_multiplayer_bank_cash() { return _i(0xDD21B55DF695CD0A); } + static Void _0xC2D15BEF167E27BC() { return _i(0xC2D15BEF167E27BC); } + static Void set_new_waypoint(float x, float y) { return _i(0xFE43368D2AA4F2FC, x, y); } + static Void set_pause_menu_active(bool toggle) { return _i(0xDF47FC56C71569CF, toggle); } + static Void _0x3CA6050692BC61B0(bool p0) { return _i(0x3CA6050692BC61B0, p0); } + static Void _0xECF128344E9FF9F1(bool p0) { return _i(0xECF128344E9FF9F1, p0); } + static Void _0x0C4BBF625CA98C4E(Ped ped, bool p1) { return _i(0x0C4BBF625CA98C4E, ped, p1); } + static Void _0xE52B8E7F85D39A08(Ped ped, int unk) { return _i(0xE52B8E7F85D39A08, ped, unk); } + static Void hide_special_ability_lockon_operation(Any p0, bool p1) { return _i(0x3EED80DFF7325CAA, p0, p1); } + static Void set_ai_blip_max_distance(Ped ped, float distance) { return _i(0x97C65887D4B37FA9, ped, distance); } + static Void _0xFCFACD0DB9D7A57D(Any p0, Any p1) { return _i(0xFCFACD0DB9D7A57D, p0, p1); } + static Void set_ped_enemy_ai_blip(int pedHandle, bool showViewCones) { return _i(0xD30C50DF888D58B5, pedHandle, showViewCones); } + static Void _0xB13DCB4C6FAAD238(Any p0, Any p1, Any p2) { return _i(0xB13DCB4C6FAAD238, p0, p1, p2); } + static Void _0x7B21E0BB01E8224A(Any p0) { return _i(0x7B21E0BB01E8224A, p0); } + static Void set_director_mode(bool toggle) { return _i(0x808519373FD336A3, toggle); } + static Void _0x41350B4FC28E3941(bool p0) { return _i(0x41350B4FC28E3941, p0); } + static Void _0x1EAC5F91BCBC5073(bool p0) { return _i(0x1EAC5F91BCBC5073, p0); } + static Void set_radar_as_exterior_this_frame() { return _i(0xE81B7D2A3DAB2D81); } + static Void set_radar_as_interior_this_frame(uint32_t interior, float x, float y, int z, int zoom) { return _i(0x59E727A1C9D3E31A, interior, x, y, z, zoom); } + static Void set_radar_zoom(int zoomLevel) { return _i(0x096EF57A0C999BBA, zoomLevel); } + static Void responding_as_temp(float p0) { return _i(0xBD12C5EEE184C337, p0); } + static Void _0xF98E4B3E56AFC7B1(Any p0, float p1) { return _i(0xF98E4B3E56AFC7B1, p0, p1); } + static Void set_radar_zoom_level_this_frame(float zoomLevel) { return _i(0xCB7CC0D58405AD41, zoomLevel); } + static Void _0x25615540D894B814(Any p0, bool p1) { return _i(0x25615540D894B814, p0, p1); } + static Void _0x0CF54F20DE43879C(Any p0) { return _i(0x0CF54F20DE43879C, p0); } + static Void _0xD68A5FF8A3A89874(int r, int g, int b, int a) { return _i(0xD68A5FF8A3A89874, r, g, b, a); } + static Void _0x16A304E6CB2BFAB9(int r, int g, int b, int a) { return _i(0x16A304E6CB2BFAB9, r, g, b, a); } + static Void _0x9E778248D6685FE0(const char* p0) { return _i(0x9E778248D6685FE0, p0); } + static Void set_text_centre(bool align) { return _i(0xC02F4DBFB51D988B, align); } + static Void set_text_colour(int red, int green, int blue, int alpha) { return _i(0xBE6B23FFA53FB442, red, green, blue, alpha); } + static Void set_text_dropshadow(int distance, int r, int g, int b, int a) { return _i(0x465C84BC39F1C351, distance, r, g, b, a); } + static Void set_text_drop_shadow() { return _i(0x1CA3E9EAC9D93E5E); } + static Void set_text_font(int fontType) { return _i(0x66E0276CC5F6B9DA, fontType); } + static Void _0x1185A8087587322C(bool p0) { return _i(0x1185A8087587322C, p0); } + static Void set_text_justification(int justifyType) { return _i(0x4E096588B13FFECA, justifyType); } + static Void set_text_leading(bool p0) { return _i(0xA50ABC31E3CDFAFF, p0); } + static Void set_text_outline() { return _i(0x2513DFB0FB8400FE); } + static Void set_text_render_id(int renderId) { return _i(0x5F15302936E07111, renderId); } + static Void set_text_right_justify(bool toggle) { return _i(0x6B3C4650BC8BEE47, toggle); } + static Void set_text_scale(float p0, float size) { return _i(0x07C837F9A01C34C9, p0, size); } + static Void set_text_wrap(float start, float end) { return _i(0x63145D9C883A1A70, start, end); } + static Void _0x6CDD58146A436083(Any p0) { return _i(0x6CDD58146A436083, p0); } + static Void set_warning_message(const char* entryLine1, int instructionalKey, const char* entryLine2, bool p3, Any p4, Any* p5, Any* p6, bool background) { return _i(0x7B1776B3B53F8D74, entryLine1, instructionalKey, entryLine2, p3, p4, p5, p6, background); } + static bool _0xDAF87174BE7454FF(Any p0) { return _i(0xDAF87174BE7454FF, p0); } + static bool _0x0C5A80A9E096D529(Any p0, Any* p1, Any p2, Any p3, Any p4, Any p5) { return _i(0x0C5A80A9E096D529, p0, p1, p2, p3, p4, p5); } + static Void set_warning_message2(const char* entryHeader, const char* entryLine1, int instructionalKey, const char* entryLine2, bool p4, Any p5, Any* p6, Any* p7, bool background) { return _i(0xDC38CC1E35B6A5D7, entryHeader, entryLine1, instructionalKey, entryLine2, p4, p5, p6, p7, background); } + static Void set_warning_message3(const char* entryHeader, const char* entryLine1, Any instructionalKey, const char* entryLine2, bool p4, Any p5, Any p6, Any* p7, Any* p8, bool p9) { return _i(0x701919482C74B5AB, entryHeader, entryLine1, instructionalKey, entryLine2, p4, p5, p6, p7, p8, p9); } + static Void _0x15803FEC3B9A872B(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9, Any p10) { return _i(0x15803FEC3B9A872B, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } + static Void set_waypoint_off() { return _i(0xA7E4E2D361C2627F); } + static Void set_widescreen_format(Any p0) { return _i(0xC3B07BA00A83B0F1, p0); } + static Void _0x60E892BA4F5BDCA4() { return _i(0x60E892BA4F5BDCA4); } + static Void _0xDCFB5D4DB8BF367E(Any p0, bool p1) { return _i(0xDCFB5D4DB8BF367E, p0, p1); } + static Void set_blip_friend(Blip blip, bool toggle) { return _i(0x23C3EB807312F01A, blip, toggle); } + static Void show_heading_indicator_on_blip(Blip blip, bool toggle) { return _i(0x5FBCA48327B914DF, blip, toggle); } + static Void _0x75A16C3DA34F1245(Any p0, bool p1) { return _i(0x75A16C3DA34F1245, p0, p1); } + static Void show_hud_component_this_frame(int id) { return _i(0x0B4DF1FA60C0E664, id); } + static Void show_number_on_blip(Blip blip, int number) { return _i(0xA3C0B359DCB848B6, blip, number); } + static Void set_blip_friendly(Blip blip, bool toggle) { return _i(0xB81656BC81FE24D1, blip, toggle); } + static Void _0xF1A6C18B35BCADE6(bool p0) { return _i(0xF1A6C18B35BCADE6, p0); } + static Void set_blip_checked(Blip blip, bool toggle) { return _i(0x74513EA3E505181E, blip, toggle); } + static Void _0xDB34E8D56FC13B08(Any p0, bool p1, bool p2) { return _i(0xDB34E8D56FC13B08, p0, p1, p2); } + static Void _0x3D3D15AF7BCAAF83(Any p0, bool p1, bool p2) { return _i(0x3D3D15AF7BCAAF83, p0, p1, p2); } + static Void _0xBA751764F0821256() { return _i(0xBA751764F0821256); } + static Void _0xEC9264727EEC0F28() { return _i(0xEC9264727EEC0F28); } + static Void _0xADED7F5748ACAFE6() { return _i(0xADED7F5748ACAFE6); } + static Void _0x56C8B608CFD49854() { return _i(0x56C8B608CFD49854); } + static Void _0x80FE4F3AB4E1B62A() { return _i(0x80FE4F3AB4E1B62A); } + static Void _0xA8FDB297A8D25FBA() { return _i(0xA8FDB297A8D25FBA); } + static Void _0x583049884A2EEE3C() { return _i(0x583049884A2EEE3C); } + static Void _0xA13C11E1B5C06BFC() { return _i(0xA13C11E1B5C06BFC); } + static Void _0xFDEC055AB549E328() { return _i(0xFDEC055AB549E328); } + static int get_current_notification() { return _i(0x82352748437638CA); } + static Void _0x32888337579A5970() { return _i(0x32888337579A5970); } + static Void _0x25F87B30C382FCA7() { return _i(0x25F87B30C382FCA7); } + static Any _0xA9CBFD40B3FA3010() { return _i(0xA9CBFD40B3FA3010); } + static Void _0x6F1554B0CC2089FA(bool p0) { return _i(0x6F1554B0CC2089FA, p0); } + static Void _0xFDB423997FA30340() { return _i(0xFDB423997FA30340); } + static Void remove_notification(int notificationId) { return _i(0xBE4390CB40B3E627, notificationId); } + static Void _0xB695E2CD0A2DA9EE() { return _i(0xB695E2CD0A2DA9EE); } + static Void _0xD4438C0564490E63() { return _i(0xD4438C0564490E63); } + static Void _0xFDD85225B2DEA55E() { return _i(0xFDD85225B2DEA55E); } + static Void _0xE1CD1E48E025E661() { return _i(0xE1CD1E48E025E661); } + static Void set_notification_background_color(int hudIndex) { return _i(0x92F0DA1E27DB96DC, hudIndex); } + static Void _0x17AD8C9706BDD88A(Any p0) { return _i(0x17AD8C9706BDD88A, p0); } + static Void set_notification_flash_color(int red, int green, int blue, int alpha) { return _i(0x17430B918701C342, red, green, blue, alpha); } + static Void clear_notifications_pos(float pos) { return _i(0x55598D21339CB998, pos); } + static Void _0xBAE4F9B97CD43B30(bool p0) { return _i(0xBAE4F9B97CD43B30, p0); } + static Void _0x4A0C7C9BB10ABB36(bool p0) { return _i(0x4A0C7C9BB10ABB36, p0); } + static Void _0x15CFA549788D35EF() { return _i(0x15CFA549788D35EF); } + static Void _0x317EBA71D7543F52(Any* p0, Any* p1, Any* p2, Any* p3) { return _i(0x317EBA71D7543F52, p0, p1, p2, p3); } + static Void toggle_stealth_radar(bool toggle) { return _i(0x6AFDFB93754950C7, toggle); } + static Void _0x72DD432F3CDFC0EE(float posX, float posY, float posZ, float radius, int p4) { return _i(0x72DD432F3CDFC0EE, posX, posY, posZ, radius, p4); } + static Void unlock_minimap_angle() { return _i(0x8183455E16C42E3A); } + static Void unlock_minimap_position() { return _i(0x3E93E06DB8EF1F30); } + static Void _0x170F541E1CADD1DE(bool p0) { return _i(0x170F541E1CADD1DE, p0); } + static Void _0x0C698D8F099174C7(Any p0) { return _i(0x0C698D8F099174C7, p0); } + static Pickup get_blip_info_id_pickup_index(Blip blip) { return _i(0x9B6786E4C03DD382, blip); } + static Void _0xD2049635DEB9C375() { return _i(0xD2049635DEB9C375); } + static Void set_text_proportional(bool p0) { return _i(0x038C1F517D7FDCF8, p0); } + static Void set_text_edge(int p0, int r, int g, int b, int a) { return _i(0x441603240D202FA6, p0, r, g, b, a); } + static Void set_multiplayer_hud_cash(int p0, int p1) { return _i(0xFD1D220394BCB824, p0, p1); } + static Void clear_reminder_message() { return _i(0xB57D8DD645CFA2CF); } + static Void _0x211C4EF450086857() { return _i(0x211C4EF450086857); } + static Void log_debug_info(const char* p0) { return _i(0x2162C446DFDF38FD, p0); } + + static Void enable_interior_prop(int interiorID, const char* propName) { return _i(0x55E86AF2712B36A1, interiorID, propName); } + static Void _0x483ACA1176CA93F1() { return _i(0x483ACA1176CA93F1); } + static Void add_pickup_to_interior_room_by_name(Pickup pickup, const char* roomName) { return _i(0x3F6167F351168730, pickup, roomName); } + static Void cap_interior(int interiorID, bool toggle) { return _i(0xD9175F941610DB54, interiorID, toggle); } + static Void clear_room_for_entity(Entity entity) { return _i(0xB365FC0C4E27FFA7, entity); } + static Void _0x23B59D8912F94246() { return _i(0x23B59D8912F94246); } + static Void disable_interior_prop(int interiorID, const char* propName) { return _i(0x420BD37289EEE162, interiorID, propName); } + static Void disable_interior(int interiorID, bool toggle) { return _i(0x6170941419D7D8EC, interiorID, toggle); } + static Void _0x9E6542F0CE8E70A3(bool toggle) { return _i(0x9E6542F0CE8E70A3, toggle); } + static Void hide_map_object_this_frame(uint32_t mapObjectHash) { return _i(0xA97F257D0151A6AB, mapObjectHash); } + static Void _0x50C375537449F369(Any p0) { return _i(0x50C375537449F369, p0); } + static Void force_room_for_entity(Entity entity, int interiorID, uint32_t roomHashKey) { return _i(0x52923C4710DD9907, entity, interiorID, roomHashKey); } + static Void _0x920D853F3E17F1DA(int interiorID, uint32_t roomHashKey) { return _i(0x920D853F3E17F1DA, interiorID, roomHashKey); } + static int get_interior_at_coords(float x, float y, float z) { return _i(0xB0F7F8663821D9C3, x, y, z); } + static int get_interior_at_coords_with_type(float x, float y, float z, const char* interiorType) { return _i(0x05B7A89BD78797FC, x, y, z, interiorType); } + static int unk_get_interior_at_coords(float x, float y, float z, int unk) { return _i(0xF0F77ADB9F67E79D, x, y, z, unk); } + static int get_interior_from_collision(float x, float y, float z) { return _i(0xEC4CF9FCB29A4424, x, y, z); } + static int get_interior_from_entity(Entity entity) { return _i(0x2107BA504071A6BB, entity); } + static int get_interior_group_id(int interiorID) { return _i(0xE4A84ABF135EF91A, interiorID); } + static uint32_t get_key_for_entity_in_room(Entity entity) { return _i(0x399685DB942336BC, entity); } + static math::vector3 get_offset_from_interior_in_world_coords(int interiorID, float x, float y, float z) { return _i>(0x9E3B3E6D66F6E22F, interiorID, x, y, z); } + static uint32_t get_room_key_from_gameplay_cam() { return _i(0xA6575914D2A0B450); } + static uint32_t get_room_key_from_entity(Entity entity) { return _i(0x47C2A06D4F5F424B, entity); } + static bool are_coords_colliding_with_exterior(float x, float y, float z) { return _i(0xEEA5AC2EDA7C33E8, x, y, z); } + static bool is_interior_capped(int interiorID) { return _i(0x92BAC8ACF88CEC26, interiorID); } + static bool is_interior_disabled(int interiorID) { return _i(0xBC5115A5A939DD15, interiorID); } + static bool is_interior_prop_enabled(int interiorID, const char* propName) { return _i(0x35F7DD45E8C0A16D, interiorID, propName); } + static bool is_interior_ready(int interiorID) { return _i(0x6726BDCCC1932F0E, interiorID); } + static bool is_interior_scene() { return _i(0xBC72B5D7A1CBD54D); } + static bool is_valid_interior(int interiorID) { return _i(0x26B0E73D7EAAF4D3, interiorID); } + static Void load_interior(int interiorID) { return _i(0x2CA429C029CCF247, interiorID); } + static Void refresh_interior(int interiorID) { return _i(0x41F37C3427C75AE0, interiorID); } + static Void _0x82EBB79E258FA2B7(Entity entity, int interiorID) { return _i(0x82EBB79E258FA2B7, entity, interiorID); } + static Void set_interior_prop_color(int interiorID, const char* propName, int color) { return _i(0xC1F1920BAF281317, interiorID, propName, color); } + static Any _0x4C2330E61D3DEB56(int interiorID) { return _i(0x4C2330E61D3DEB56, interiorID); } + static Void _0x7241CCB7D020DB69(Any p0, Any p1) { return _i(0x7241CCB7D020DB69, p0, p1); } + static Void _0x405DC2AEF6AF95B9(uint32_t roomHashKey) { return _i(0x405DC2AEF6AF95B9, roomHashKey); } + static Void _0xAF348AFCB575A441(const char* roomName) { return _i(0xAF348AFCB575A441, roomName); } + static Void unpin_interior(int interiorID) { return _i(0x261CCE7EED010641, interiorID); } + + static bool add_to_itemset(Any p0, Any p1) { return _i(0xE3945201F14637DD, p0, p1); } + static Void clean_itemset(Any p0) { return _i(0x41BC0D722FC04221, p0); } + static Any create_itemset(math::vector3* distri) { return _i(0x35AD299F50D91B24, distri); } + static Void destroy_itemset(Any p0) { return _i(0xDE18220B1C183EDA, p0); } + static Any get_indexed_item_in_itemset(Any p0, Any p1) { return _i(0x7A197E2521EE2BAB, p0, p1); } + static Any get_itemset_size(Any p0) { return _i(0xD9127E83ABF7C631, p0); } + static bool is_in_itemset(Any p0, Any p1) { return _i(0x2D0FC594D1E9C107, p0, p1); } + static bool is_itemset_valid(Any p0) { return _i(0xB1B1EA596344DFAB, p0); } + static Void remove_from_itemset(Any p0, Any p1) { return _i(0x25E68244B0177686, p0, p1); } + + static Any _0x8AA464D4E0F6ACCD() { return _i(0x8AA464D4E0F6ACCD); } + static bool _0xEF7D17BC6C85264C() { return _i(0xEF7D17BC6C85264C); } + static bool is_ui_loading_multiplayer() { return _i(0xC6DC823253FBB366); } + static Void _0xC7E7181C09F33B69(bool p0) { return _i(0xC7E7181C09F33B69, p0); } + static Void _0xB0C56BD3D808D863(bool p0) { return _i(0xB0C56BD3D808D863, p0); } + static Void is_in_loading_screen(bool p0) { return _i(0xFC309E94546FCDB5, p0); } + static Void _0xFA1E0E893D915215(bool p0) { return _i(0xFA1E0E893D915215, p0); } + static int _0xF2CA003F167E21D2() { return _i(0xF2CA003F167E21D2); } + + static int get_current_language_id() { return _i(0x2BDD44CC428A7EAE); } + static int get_user_language_id() { return _i(0xA8AE43AEC1A61314); } + static Any _0x497420E022796B3F() { return _i(0x497420E022796B3F); } + + static float absf(float value) { return _i(0x73D57CFFDD12C355, value); } + static int absi(int value) { return _i(0xF0D31AD191A74F87, value); } + static float acos(float p0) { return _i(0x1D08B970013C34B6, p0); } + static Void _0xA6A12939F16D85BE(uint32_t hash, bool p1) { return _i(0xA6A12939F16D85BE, hash, p1); } + static Any _0x918C7B2D2FF3928B(float p0, float p1, float p2, float p3, float p4, float p5, float p6) { return _i(0x918C7B2D2FF3928B, p0, p1, p2, p3, p4, p5, p6); } + static Any _0x2D4259F1FEB81DA9(float p0, float p1, float p2, float p3) { return _i(0x2D4259F1FEB81DA9, p0, p1, p2, p3); } + static int add_hospital_restart(float x, float y, float z, float p3, Any p4) { return _i(0x1F464EF988465A81, x, y, z, p3, p4); } + static Any add_police_restart(float p0, float p1, float p2, float p3, Any p4) { return _i(0x452736765B31FC4B, p0, p1, p2, p3, p4); } + static Any _0x67F6413D3220E18D(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9) { return _i(0x67F6413D3220E18D, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Any _0x32C7A7E8C43A1F80(float p0, float p1, float p2, float p3, float p4, float p5, bool p6, bool p7) { return _i(0x32C7A7E8C43A1F80, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void _0x69FE6DC87BD2A5E9(Any p0) { return _i(0x69FE6DC87BD2A5E9, p0); } + static int add_stunt_jump(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, float p9, float p10, float p11, float p12, float p13, float p14, Any p15, Any p16, Any p17) { return _i(0x1A992DA297A4630C, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17); } + static int add_stunt_jump_angled(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, float p9, float p10, float p11, float p12, float p13, float p14, float p15, float p16, Any p17, Any p18, Any p19) { return _i(0xBBE5D803A5360CBF, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19); } + static Void _0xB8721407EE9C3FF6(Any p0, Any p1, Any p2) { return _i(0xB8721407EE9C3FF6, p0, p1, p2); } + static Void _0xDEA36202FC3382DF(bool p0) { return _i(0xDEA36202FC3382DF, p0); } + static bool are_profile_settings_valid() { return _i(0x5AA3BEFA29F03AD4); } + static bool are_strings_equal(const char* string1, const char* string2) { return _i(0x0C515FAB3FF9EA92, string1, string2); } + static float asin(float p0) { return _i(0xC843060B5765DCE7, p0); } + static float atan2(float p0, float p1) { return _i(0x8927CBF9D22261A4, p0, p1); } + static float atan(float p0) { return _i(0xA9D1795CD5043663, p0); } + static Void begin_replay_stats(Any p0, Any p1) { return _i(0xE0E500246FF73D66, p0, p1); } + static Void _0x9B2BD3773123EA2F(int type, bool toggle) { return _i(0x9B2BD3773123EA2F, type, toggle); } + static Void _0x58A39BE597CE99CD() { return _i(0x58A39BE597CE99CD); } + static Void cancel_stunt_jump() { return _i(0xE6B7B0ACD4E4B75E); } + static Void _0xC79AE21974B01FB2() { return _i(0xC79AE21974B01FB2); } + static Void clear_angled_area_of_vehicles(float p0, float p1, float p2, float p3, float p4, float p5, float p6, bool p7, bool p8, bool p9, bool p10, bool p11, Any p12) { return _i(0x11DB3500F042A8AA, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } + static Void clear_area(float X, float Y, float Z, float radius, bool p4, bool ignoreCopCars, bool ignoreObjects, bool p7) { return _i(0xA56F01F3765B93A0, X, Y, Z, radius, p4, ignoreCopCars, ignoreObjects, p7); } + static Void clear_area_of_everything(float x, float y, float z, float radius, bool p4, bool p5, bool p6, bool p7) { return _i(0x957838AAF91BD12D, x, y, z, radius, p4, p5, p6, p7); } + static Void clear_area_of_cops(float x, float y, float z, float radius, int flags) { return _i(0x04F8FC8FCF58F88D, x, y, z, radius, flags); } + static Void clear_area_of_objects(float x, float y, float z, float radius, int flags) { return _i(0xDD9B9B385AAC7F5B, x, y, z, radius, flags); } + static Void clear_area_of_peds(float x, float y, float z, float radius, int flags) { return _i(0xBE31FD6CE464AC59, x, y, z, radius, flags); } + static Void clear_area_of_projectiles(float x, float y, float z, float radius, int flags) { return _i(0x0A1CB9094635D1A6, x, y, z, radius, flags); } + static Void clear_area_of_vehicles(float x, float y, float z, float radius, bool p4, bool p5, bool p6, bool p7, bool p8, Any p9) { return _i(0x01C7B9B38428AEB6, x, y, z, radius, p4, p5, p6, p7, p8, p9); } + static Void clear_bit(int* address, int offset) { return _i(0xE80492A9AC099A93, address, offset); } + static Void _0x06462A961E94B67C() { return _i(0x06462A961E94B67C); } + static Void clear_override_weather() { return _i(0x338D2E3477711050); } + static Void clear_replay_stats() { return _i(0x1B1AB132A16FDA55); } + static Void set_next_respawn_to_custom() { return _i(0xA2716D40842EAF79); } + static Void _0x7EC6F9A478A6A512() { return _i(0x7EC6F9A478A6A512); } + static Void _0xB3CD58CCA6CDA852() { return _i(0xB3CD58CCA6CDA852); } + static Void _0x0CF97F497FE7D048(Any p0) { return _i(0x0CF97F497FE7D048, p0); } + static Void clear_weather_type_persist() { return _i(0xCCC39339BEF76CF5); } + static int compare_strings(const char* str1, const char* str2, bool matchCase, int maxLength) { return _i(0x1E34710ECD4AB0EB, str1, str2, matchCase, maxLength); } + static Void _0x213AEB2B90CBA7AC(Any p0, Any p1, Any p2) { return _i(0x213AEB2B90CBA7AC, p0, p1, p2); } + static bool create_incident(int incidentType, float x, float y, float z, int p5, float radius, int* outIncidentID, Any p7) { return _i(0x3F892CAF67444AE7, incidentType, x, y, z, p5, radius, outIncidentID, p7); } + static bool create_incident_with_entity(int incidentType, Ped ped, int amountOfPeople, float radius, int* outIncidentID, Any p5) { return _i(0x05983472F0494E60, incidentType, ped, amountOfPeople, radius, outIncidentID, p5); } + static Void delete_incident(int test) { return _i(0x556C1AA270D5A207, test); } + static Void delete_stunt_jump(int p0) { return _i(0xDC518000E39DAE1F, p0); } + static Void disable_hospital_restart(int hospitalIndex, bool toggle) { return _i(0xC8535819C450EBA8, hospitalIndex, toggle); } + static Void disable_police_restart(int policeIndex, bool toggle) { return _i(0x23285DED6EBD7EA3, policeIndex, toggle); } + static Void disable_stunt_jump_set(int p0) { return _i(0xA5272EBEDD4747F6, p0); } + static Void display_onscreen_keyboard(int p0, const char* windowTitle, const char* p2, const char* defaultText, const char* defaultConcat1, const char* defaultConcat2, const char* defaultConcat3, int maxInputLength) { return _i(0x00DC833F2568DBF6, p0, windowTitle, p2, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, maxInputLength); } + static Void display_onscreen_keyboard2(int p0, const char* windowTitle, Any* p2, const char* defaultText, const char* defaultConcat1, const char* defaultConcat2, const char* defaultConcat3, const char* defaultConcat4, const char* defaultConcat5, const char* defaultConcat6, const char* defaultConcat7, int maxInputLength) { return _i(0xCA78CFA0366592FE, p0, windowTitle, p2, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, defaultConcat4, defaultConcat5, defaultConcat6, defaultConcat7, maxInputLength); } + static bool _0x1327E2FE9746BAEE(Any p0) { return _i(0x1327E2FE9746BAEE, p0); } + static Any _0x171BAFB3C60389F4(Any p0) { return _i(0x171BAFB3C60389F4, p0); } + static Void do_auto_save() { return _i(0x50EEAAD86232EE55); } + static Void enable_dispatch_service(int dispatchService, bool toggle) { return _i(0xDC0F817884CDD856, dispatchService, toggle); } + static Void enable_stunt_jump_set(int p0) { return _i(0xE369A5783B866016, p0); } + static Void enable_tennis_mode(Ped ped, bool toggle, bool p2) { return _i(0x28A04B411933F8A6, ped, toggle, p2); } + static Void end_replay_stats() { return _i(0xA23E821FBDF8A5F2); } + static bool find_spawn_point_in_direction(float x1, float y1, float z1, float x2, float y2, float z2, float distance, math::vector3* spawnPoint) { return _i(0x6874E2190B0C1972, x1, y1, z1, x2, y2, z2, distance, spawnPoint); } + static Void reset_localplayer_state() { return _i(0xC0AA53F866B3134D); } + static Void create_lightning_thunder() { return _i(0xF6062E089251C898); } + static int get_allocated_stack_size() { return _i(0x8B3CA62B1EF19B62); } + static float get_angle_between2_d_vectors(float x1, float y1, float x2, float y2) { return _i(0x186FC4BE848E1C92, x1, y1, x2, y2); } + static bool _0xB335F761606DB47C(Any* p0, Any* p1, Any p2, bool p3) { return _i(0xB335F761606DB47C, p0, p1, p2, p3); } + static Any _0x4750FC27570311EC() { return _i(0x4750FC27570311EC); } + static Any _0x1B2366C3F2A5C8DF() { return _i(0x1B2366C3F2A5C8DF); } + static int get_bits_in_range(int var, int rangeStart, int rangeEnd) { return _i(0x53158863FCC0893A, var, rangeStart, rangeEnd); } + static Any _0xD10282B6E3751BA0() { return _i(0xD10282B6E3751BA0); } + static math::vector3 _0x21C235BC64831E5A(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, bool p9) { return _i>(0x21C235BC64831E5A, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static float get_cloud_hat_opacity() { return _i(0x20AC25E781AE4A84); } + static const char* get_global_char_buffer() { return _i(0x24DA7D7667FD7B09); } + static Any _0x8D7A43EC6A5FEA45(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8) { return _i(0x8D7A43EC6A5FEA45, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static bool _0xDFB4138EEFED7B81(Ped ped, uint32_t weaponHash, float radius, Entity* entity, bool p4) { return _i(0xDFB4138EEFED7B81, ped, weaponHash, radius, entity, p4); } + static Void get_weather_type_transition(Any* p0, Any* p1, float* progress_or_time) { return _i(0xF3BBE884A14BB413, p0, p1, progress_or_time); } + static float get_distance_between_coords(float x1, float y1, float z1, float x2, float y2, float z2, bool useZ) { return _i(0xF1B760881820C952, x1, y1, z1, x2, y2, z2, useZ); } + static int get_fake_wanted_level() { return _i(0x4C9296CBCD1B971E); } + static int get_frame_count() { return _i(0xFC8202EFC642E6F2); } + static float get_frame_time() { return _i(0x15C40837039FFAF7); } + static int get_game_timer() { return _i(0x9CD27B0045628463); } + static bool get_ground_coords_while_in_air(float x, float y, float z, float* p3, math::vector3* p4) { return _i(0x8BDC7BFC57A81E76, x, y, z, p3, p4); } + static Any _0x9E82F0F362881B29(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x9E82F0F362881B29, p0, p1, p2, p3, p4); } + static bool get_ground_z_for_3d_coord(float x, float y, float z, float* groundZ, bool unk) { return _i(0xC906A7DAB05C8D2B, x, y, z, groundZ, unk); } + static uint32_t get_hash_key(const char* model) { return _i(0xD24D37CC275948CC, model); } + static float get_heading_from_vector_2d(float dx, float dy) { return _i(0x2FFB6B224F4B2926, dx, dy); } + static int get_index_of_current_level() { return _i(0xCBAD6729F7B1F4FC); } + static Any _0x6E04F06094C87047() { return _i(0x6E04F06094C87047); } + static bool _0x9689123E3F213AA5() { return _i(0x9689123E3F213AA5); } + static bool _0xF56DFB7B61BE7276(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, float p9, float p10, float p11, Any* p12) { return _i(0xF56DFB7B61BE7276, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } + static bool get_mission_flag() { return _i(0xA33CDCCDA663159E); } + static Void get_model_dimensions(uint32_t modelHash, math::vector3* minimum, math::vector3* maximum) { return _i(0x03E8D3D5F549087A, modelHash, minimum, maximum); } + static uint32_t get_next_weather_type_hash_name() { return _i(0x711327CD09C8F162); } + static int get_free_stack_slots_count(int stackSize) { return _i(0xFEAD16FC8F9DFC0F, stackSize); } + static int get_number_of_dispatched_units_for_player(int dispatchService) { return _i(0xEB4A0C2D56441717, dispatchService); } + static Any _0x996DD1E1E02F1008() { return _i(0x996DD1E1E02F1008); } + static const char* get_onscreen_keyboard_result() { return _i(0x8362B09B91893647); } + static uint32_t get_prev_weather_type_hash_name() { return _i(0x564B884A05EC45A3); } + static int get_profile_setting(int profileSetting) { return _i(0xC488FF2356EA7791, profileSetting); } + static Any _0x82FDE6A57EE4EE44(Ped ped, uint32_t weaponhash, float p2, float p3, float p4, bool p5) { return _i(0x82FDE6A57EE4EE44, ped, weaponhash, p2, p3, p4, p5); } + static Any get_rain_level() { return _i(0x96695E368AD855F3); } + static Any get_random_event_flag() { return _i(0xD2D57F1D764117B1); } + static float get_random_float_in_range(float startRange, float endRange) { return _i(0x313CE5879CEB6FCD, startRange, endRange); } + static int get_random_int_in_range(int startRange, int endRange) { return _i(0xD53343AA4FB7DD28, startRange, endRange); } + static float _0x7F8F6405F4777AF6(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, bool p9) { return _i(0x7F8F6405F4777AF6, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Any _0x8098C8D6597AAE18(Any p0) { return _i(0x8098C8D6597AAE18, p0); } + static Any _0xDC9274A7EF6B2867() { return _i(0xDC9274A7EF6B2867); } + static Any _0x5B1F2E327B6B6FE1() { return _i(0x5B1F2E327B6B6FE1); } + static Any _0x2B626A0150E4D449() { return _i(0x2B626A0150E4D449); } + static Any _0xA4A0065E39C9F25C(Any p0, Any p1, Any p2, Any p3) { return _i(0xA4A0065E39C9F25C, p0, p1, p2, p3); } + static Any _0xA09F896CE912481F(bool p0) { return _i(0xA09F896CE912481F, p0); } + static Any get_snow_level() { return _i(0xC5868A966E5BE3AE); } + static int _0x397BAA01068BAA96() { return _i(0x397BAA01068BAA96); } + static Any _0x2B5E102E4A42F2BF() { return _i(0x2B5E102E4A42F2BF); } + static float _0xE599A503B3837E1B() { return _i(0xE599A503B3837E1B); } + static bool _0x19BFED045C647C49(Any p0) { return _i(0x19BFED045C647C49, p0); } + static bool _0x17DF68D720AA77F8(Any p0) { return _i(0x17DF68D720AA77F8, p0); } + static bool _0xE95B0C7D5BA3B96B(Any p0) { return _i(0xE95B0C7D5BA3B96B, p0); } + static Any _0x6856EC3D35C81EA4() { return _i(0x6856EC3D35C81EA4); } + static math::vector3 get_wind_direction() { return _i>(0x1F400FEF721170DA); } + static float get_wind_speed() { return _i(0xA8CF1CC0AFCD3F12); } + static Any _0x14832BF2ABA53FC5() { return _i(0x14832BF2ABA53FC5); } + static bool has_bullet_impacted_in_area(float x, float y, float z, float p3, bool p4, bool p5) { return _i(0x9870ACFB89A90995, x, y, z, p3, p4, p5); } + static bool has_bullet_impacted_in_box(float p0, float p1, float p2, float p3, float p4, float p5, bool p6, bool p7) { return _i(0xDC8C5D7CFEAB8394, p0, p1, p2, p3, p4, p5, p6, p7); } + static bool has_button_combination_just_been_entered(uint32_t hash, int amount) { return _i(0x071E2A839DE82D90, hash, amount); } + static Any _0x2107A3773771186D() { return _i(0x2107A3773771186D); } + static bool _0x6FDDF453C0C756EC() { return _i(0x6FDDF453C0C756EC); } + static bool has_cheat_string_just_been_entered(uint32_t hash) { return _i(0x557E43C447E700A8, hash); } + static Any _0xE8B9C0EC9E183F35() { return _i(0xE8B9C0EC9E183F35); } + static bool is_pc_version() { return _i(0x48AF36444B965238); } + static Any _0x075F1D57402C93BA() { return _i(0x075F1D57402C93BA); } + static Any _0xD642319C54AADEB6() { return _i(0xD642319C54AADEB6); } + static Void ignore_next_restart(bool toggle) { return _i(0x21FFB63D8C615361, toggle); } + static Void _0x8D74E26F54B4E5C3(const char* p0) { return _i(0x8D74E26F54B4E5C3, p0); } + static bool is_area_occupied(float p0, float p1, float p2, float p3, float p4, float p5, bool p6, bool p7, bool p8, bool p9, bool p10, Any p11, bool p12) { return _i(0xA61B4DF533DCB56E, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } + static bool is_auto_save_in_progress() { return _i(0x69240733738C19A0); } + static bool is_bit_set(int address, int offset) { return _i(0xA921AA820C25702F, address, offset); } + static bool is_bullet_in_angled_area(float p0, float p1, float p2, float p3, float p4, float p5, float p6, bool p7) { return _i(0x1A8B5F3C01E2B477, p0, p1, p2, p3, p4, p5, p6, p7); } + static bool is_bullet_in_area(float p0, float p1, float p2, float p3, bool p4) { return _i(0x3F2023999AD51C1F, p0, p1, p2, p3, p4); } + static bool is_bullet_in_box(float p0, float p1, float p2, float p3, float p4, float p5, bool p6) { return _i(0xDE0F6D7450D37351, p0, p1, p2, p3, p4, p5, p6); } + static Any _0xA049A5BE0F04F2F8() { return _i(0xA049A5BE0F04F2F8); } + static bool is_incident_valid(int incidentId) { return _i(0xC8BC6461E629BEAA, incidentId); } + static bool is_memory_card_in_use() { return _i(0x8A75CE2956274ADD); } + static bool is_minigame_in_progress() { return _i(0x2B4A15E44DE0F478); } + static bool is_next_weather_type(const char* weatherType) { return _i(0x2FAA3A30BEC0F25D, weatherType); } + static bool is_point_obscured_by_a_mission_entity(float p0, float p1, float p2, float p3, float p4, float p5, Any p6) { return _i(0xE54E209C35FFA18D, p0, p1, p2, p3, p4, p5, p6); } + static bool is_position_occupied(float x, float y, float z, float range, bool p4, bool p5, bool p6, bool p7, bool p8, Any p9, bool p10) { return _i(0xADCDE75E1C60F32D, x, y, z, range, p4, p5, p6, p7, p8, p9, p10); } + static bool is_prev_weather_type(const char* weatherType) { return _i(0x44F28F86433B10A9, weatherType); } + static bool is_projectile_in_area(float x1, float y1, float z1, float x2, float y2, float z2, bool ownedByPlayer) { return _i(0x5270A8FBC098C3F8, x1, y1, z1, x2, y2, z2, ownedByPlayer); } + static bool is_projectile_type_in_angled_area(float p0, float p1, float p2, float p3, float p4, float p5, float p6, Any p7, bool p8) { return _i(0xF0BC12401061DEA0, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static bool is_projectile_type_in_area(float x1, float y1, float z1, float x2, float y2, float z2, int type, bool p7) { return _i(0x2E0DC353342C4A6D, x1, y1, z1, x2, y2, z2, type, p7); } + static bool _0x34318593248C8FB2(float p0, float p1, float p2, Any p3, float p4, bool p5) { return _i(0x34318593248C8FB2, p0, p1, p2, p3, p4, p5); } + static bool is_sniper_bullet_in_area(float x1, float y1, float z1, float x2, float y2, float z2) { return _i(0xFEFCF11B01287125, x1, y1, z1, x2, y2, z2); } + static bool is_string_null(const char* string) { return _i(0xF22B6C47C6EAB066, string); } + static bool is_string_null_or_empty(const char* string) { return _i(0xCA042B6957743895, string); } + static bool is_stunt_jump_in_progress() { return _i(0x7A3F19700A4D0525); } + static bool is_stunt_jump_message_showing() { return _i(0x2272B0A1343129F4); } + static bool is_tennis_mode(Ped ped) { return _i(0x5D5479D115290C3F, ped); } + static bool is_this_a_minigame_script() { return _i(0x7B30F65D7B710098); } + static Any _0x3BBBD13E5041A79E() { return _i(0x3BBBD13E5041A79E); } + static Void set_cloud_hat_transition(const char* type, float transitionTime) { return _i(0xFC4842A34657BFCB, type, transitionTime); } + static Void network_set_script_is_safe_for_network_game() { return _i(0x9243BAC96D64C050); } + static Void _0x3ED1438C1F5C6612(int p0) { return _i(0x3ED1438C1F5C6612, p0); } + static bool override_save_house(bool p0, float p1, float p2, float p3, float p4, bool p5, float p6, float p7) { return _i(0x1162EA8AE9D24EEA, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void disable_automatic_respawn(bool disableRespawn) { return _i(0x2C2B3493FBF51C71, disableRespawn); } + static Void _0x8FA9C42FC5D7C64B(Any p0, Any p1, float p2, float p3, float p4, bool p5) { return _i(0x8FA9C42FC5D7C64B, p0, p1, p2, p3, p4, p5); } + static Void _0xE266ED23311F24D4(Any p0, Any* p1, Any* p2, float p3, float p4, bool p5) { return _i(0xE266ED23311F24D4, p0, p1, p2, p3, p4, p5); } + static Any _0xABB2FA71C83A1B72() { return _i(0xABB2FA71C83A1B72); } + static bool _0x684A41975F077262() { return _i(0x684A41975F077262); } + static Void populate_now() { return _i(0x7472BB270D7B4F3E); } + static Void _0x11B56FBBF7224868(const char* p0) { return _i(0x11B56FBBF7224868, p0); } + static Void _0xE3D969D2785FFB5E() { return _i(0xE3D969D2785FFB5E); } + static Any _0x72DE52178C291CB5() { return _i(0x72DE52178C291CB5); } + static Any _0x44A0BDC559B35F6E() { return _i(0x44A0BDC559B35F6E); } + static Any _0xEB2104E905C6F2E9() { return _i(0xEB2104E905C6F2E9); } + static Void force_social_club_update() { return _i(0xEB6891F03362FB12); } + static Void register_float_to_save(Any* p0, const char* name) { return _i(0x7CAEC29ECB5DFEBB, p0, name); } + static Void _0xA735353C77334EA0(Any* p0, Any* p1) { return _i(0xA735353C77334EA0, p0, p1); } + static Void register_int_to_save(Any* p0, const char* name) { return _i(0x34C9EE5986258415, p0, name); } + static Void register_enum_to_save(Any* p0, const char* name) { return _i(0x10C2FA78D0E128A1, p0, name); } + static Void register_bool_to_save(Any* p0, const char* name) { return _i(0xC8F4131414C835A1, p0, name); } + static Any register_save_house(float p0, float p1, float p2, float p3, Any* p4, Any p5, Any p6) { return _i(0xC0714D0A7EEECA54, p0, p1, p2, p3, p4, p5, p6); } + static Void register_text_label_to_save(Any* p0, const char* name) { return _i(0xEDB1232C5BEAE62F, p0, name); } + static Void _0x6F7794F28C6B2535(Any* p0, const char* name) { return _i(0x6F7794F28C6B2535, p0, name); } + static Void _0x48F069265A0E4BEC(Any* p0, const char* name) { return _i(0x48F069265A0E4BEC, p0, name); } + static Void _0x8269816F6CFD40F8(Any* p0, const char* name) { return _i(0x8269816F6CFD40F8, p0, name); } + static Void _0xFAA457EF263E8763(Any* p0, const char* name) { return _i(0xFAA457EF263E8763, p0, name); } + static Void remove_dispatch_spawn_blocking_area(Any p0) { return _i(0x264AC28B01B353A5, p0); } + static Void _0xB129E447A2EDA4BF(Any p0, bool p1) { return _i(0xB129E447A2EDA4BF, p0, p1); } + static Void _0xE6869BECDD8F2403(Any p0, bool p1) { return _i(0xE6869BECDD8F2403, p0, p1); } + static Void reset_dispatch_ideal_spawn_distance() { return _i(0x77A84429DD9F0A15); } + static Void reset_dispatch_spawn_blocking_areas() { return _i(0xAC7BFD5C1D83EA75); } + static Void _0xEB2DB0CAD13154B3(Any p0) { return _i(0xEB2DB0CAD13154B3, p0); } + static Void _0x437138B6A830166A() { return _i(0x437138B6A830166A); } + static Void _0xD9F692D349249528() { return _i(0xD9F692D349249528); } + static Void _0xE574A662ACAEFBB1() { return _i(0xE574A662ACAEFBB1); } + static Void _0x37DEB0AA183FB6D8() { return _i(0x37DEB0AA183FB6D8); } + static bool _0x8EF5573A1F801A5C(Any p0, Any* p1, Any* p2) { return _i(0x8EF5573A1F801A5C, p0, p1, p2); } + static Void _0x0A60017F841A54F2(Any p0, Any p1, Any p2, Any p3) { return _i(0x0A60017F841A54F2, p0, p1, p2, p3); } + static Void _0x1BB299305C3E8C13(Any p0, Any p1, Any p2, Any p3) { return _i(0x1BB299305C3E8C13, p0, p1, p2, p3); } + static Void _0x1FF6BF9A63E5757F() { return _i(0x1FF6BF9A63E5757F); } + static Void _0x438822C279B73B93(Any p0) { return _i(0x438822C279B73B93, p0); } + static Void set_bit(int* address, int offset) { return _i(0x933D6A9EEC1BACD0, address, offset); } + static Void set_bits_in_range(int* var, int rangeStart, int rangeEnd, int p3) { return _i(0x8EF07E15701D61ED, var, rangeStart, rangeEnd, p3); } + static Void set_cloud_hat_opacity(float opacity) { return _i(0xF36199225D6D8C86, opacity); } + static Void _0x02DEAAC8F8EA7FE7(const char* p0) { return _i(0x02DEAAC8F8EA7FE7, p0); } + static Void set_credits_active(bool toggle) { return _i(0xB938B7E6D3C0620C, toggle); } + static Void _0xB51B9AB9EF81868C(bool toggle) { return _i(0xB51B9AB9EF81868C, toggle); } + static Void set_weather_type_transition(uint32_t weatherType1, uint32_t weatherType2, float percentWeather2) { return _i(0x578C752848ECFA0C, weatherType1, weatherType2, percentWeather2); } + static Void set_dispatch_ideal_spawn_distance(float p0) { return _i(0x6FE601A64180D423, p0); } + static Void _0xD10F442036302D50(Any p0, Any p1, Any p2) { return _i(0xD10F442036302D50, p0, p1, p2); } + static Void set_dispatch_time_between_spawn_attempts(Any p0, float p1) { return _i(0x44F7CBC1BEB3327D, p0, p1); } + static Void set_dispatch_time_between_spawn_attempts_multiplier(Any p0, float p1) { return _i(0x48838ED9937A15D1, p0, p1); } + static Void set_explosive_ammo_this_frame(Player player) { return _i(0xA66C71C98D5F2CFB, player); } + static Void set_explosive_melee_this_frame(Player player) { return _i(0xFF1BED81BFDC0FE0, player); } + static Void set_fade_in_after_death_arrest(bool toggle) { return _i(0xDA66D2796BA33F12, toggle); } + static Void set_fade_in_after_load(bool toggle) { return _i(0xF3D78F59DFE18D79, toggle); } + static Void set_fade_out_after_arrest(bool toggle) { return _i(0x1E0B4DC0D990A4E7, toggle); } + static Void set_fade_out_after_death(bool toggle) { return _i(0x4A18E01DF2C87B86, toggle); } + static Void set_fake_wanted_level(int fakeWantedLevel) { return _i(0x1454F2448DE30163, fakeWantedLevel); } + static Void set_fire_ammo_this_frame(Player player) { return _i(0x11879CDD803D30F4, player); } + static Void _0xA1183BCFEE0F93D1(Any p0) { return _i(0xA1183BCFEE0F93D1, p0); } + static Void set_game_paused(bool toggle) { return _i(0x577D1284D6873711, toggle); } + static Void set_gravity_level(int level) { return _i(0x740E14FAD5842351, level); } + static Void _0xD261BA3E7E998072(Any p0, float p1) { return _i(0xD261BA3E7E998072, p0, p1); } + static Void _0xB08B85D860E7BA3C(Any p0, Any p1, Any p2) { return _i(0xB08B85D860E7BA3C, p0, p1, p2); } + static Void set_unk_map_flag(int flag) { return _i(0xC5F0A8EBD3F361CE, flag); } + static Void use_freemode_map_behavior(bool toggle) { return _i(0x9BAE5AD2508DF078, toggle); } + static Void set_minigame_in_progress(bool toggle) { return _i(0x19E00D7322C6F85B, toggle); } + static Void set_mission_flag(bool toggle) { return _i(0xC4301E5121A0ED73, toggle); } + static Void set_override_weather(const char* weatherType) { return _i(0xA43D5C6FE51ADBEF, weatherType); } + static Void show_ped_in_pause_menu(bool toggle) { return _i(0x4EBB7E87AA0DBED4, toggle); } + static Void _0x9D8D44ADBBA61EF2(bool p0) { return _i(0x9D8D44ADBBA61EF2, p0); } + static Void set_rain_fx_intensity(float intensity) { return _i(0x643E26EA6E024D92, intensity); } + static Void set_random_event_flag(bool p0) { return _i(0x971927086CFD2158, p0); } + static Void set_random_seed(int time) { return _i(0x444D98F98C11F3EC, time); } + static Void set_randoweather_type() { return _i(0x8B05F884CF7E8020); } + static Void set_custom_respawn_position(float x, float y, float z, float heading) { return _i(0x706B5EDCAA7FA663, x, y, z, heading); } + static Void _0x2587A48BC88DFADF(bool p0) { return _i(0x2587A48BC88DFADF, p0); } + static Void set_save_house(Any p0, bool p1, bool p2) { return _i(0x4F548CABEAE553BC, p0, p1, p2); } + static Void set_save_menu_active(bool unk) { return _i(0xC9BF75D28165FF77, unk); } + static Void _0x65D2EBB47E1CEC21(bool p0) { return _i(0x65D2EBB47E1CEC21, p0); } + static Void _0xD79185689F8FD5DF(bool p0) { return _i(0xD79185689F8FD5DF, p0); } + static Void set_super_jump_this_frame(Player player) { return _i(0x57FFF03E423A4C0B, player); } + static Void _0x54F157E0336A3822(Any p0, const char* p1, float p2) { return _i(0x54F157E0336A3822, p0, p1, p2); } + static Void _0x6F2135B6129620C1(bool p0) { return _i(0x6F2135B6129620C1, p0); } + static Void set_this_script_can_be_paused(bool toggle) { return _i(0xAA391C728106F7AF, toggle); } + static Void set_this_script_can_remove_blips_created_by_any_script(bool toggle) { return _i(0xB98236CAAECEF897, toggle); } + static Void _0xFB00CA71DA386228() { return _i(0xFB00CA71DA386228); } + static Void set_time_scale(float time) { return _i(0x1D408577D440E81E, time); } + static Void _0xE532EC1A63231B4F(Any p0, Any p1) { return _i(0xE532EC1A63231B4F, p0, p1); } + static Void set_weather_type_now(const char* weatherType) { return _i(0x29B487C359E19889, weatherType); } + static Void set_weather_type_now_persist(const char* weatherType) { return _i(0xED712CA327900C8A, weatherType); } + static Void set_weather_type_over_time(const char* weatherType, float time) { return _i(0xFB5045B7C42B75BF, weatherType, time); } + static Void set_weather_type_persist(const char* weatherType) { return _i(0x704983DF373B198F, weatherType); } + static Void set_wind(float speed) { return _i(0xAC3A74E8384A9919, speed); } + static Void set_wind_direction(float direction) { return _i(0xEB0F4468467B4528, direction); } + static Void set_wind_speed(float speed) { return _i(0xEE09ECEDBABE47FC, speed); } + static Void shoot_single_bullet_between_coords(float x1, float y1, float z1, float x2, float y2, float z2, int damage, bool p7, uint32_t weaponHash, Ped ownerPed, bool isAudible, bool isInvisible, float speed) { return _i(0x867654CBC7606F2C, x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed); } + static Void shoot_single_bullet_between_coords_ignore_entity(float x1, float y1, float z1, float x2, float y2, float z2, int damage, bool p7, uint32_t weaponHash, Ped ownerPed, bool isAudible, bool isInvisible, float speed, Entity entity, Any p14) { return _i(0xE3A7742E0B7A2F8B, x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed, entity, p14); } + static Void shoot_single_airstrike_bullet_between_coords(float x1, float y1, float z1, float x2, float y2, float z2, int damage, bool p7, uint32_t weaponHash, Ped ownerPed, bool isAudible, bool isInvisible, float speed, Entity entity, bool p14, bool p15, bool p16, bool p17, Any p18, Any p19) { return _i(0xBFE5756E7407064A, x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed, entity, p14, p15, p16, p17, p18, p19); } + static Any _0xD3D15555431AB793() { return _i(0xD3D15555431AB793); } + static Void _0xF2F6A2FA49278625(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, Any* p9, Any* p10, Any* p11, Any* p12) { return _i(0xF2F6A2FA49278625, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } + static Void _0x92790862E36C2ADA() { return _i(0x92790862E36C2ADA); } + static Void start_save_array(Any* p0, int p1, const char* arrayName) { return _i(0x60FE567DF1B1AF9D, p0, p1, arrayName); } + static Void start_save_data(Any* p0, Any p1, bool p2) { return _i(0xA9575F812C6A7997, p0, p1, p2); } + static Void start_save_struct(Any* p0, int p1, const char* structName) { return _i(0xBF737600CDDBEADD, p0, p1, structName); } + static Void _0xC7DB36C24634F52B() { return _i(0xC7DB36C24634F52B); } + static Void stop_save_data() { return _i(0x74E20C9145FB66FD); } + static Void stop_save_struct() { return _i(0xEB1774DF12BB9F12); } + static Void stop_save_array() { return _i(0x04456F95153C6BE4); } + static bool string_to_int(const char* string, int* outInteger) { return _i(0x5A5F40FE637EB584, string, outInteger); } + static Void _0x1EAE0A6E978894A2(int p0, bool p1) { return _i(0x1EAE0A6E978894A2, p0, p1); } + static float tan(float p0) { return _i(0x632106CC96E82E91, p0); } + static Void terminate_all_scripts_with_this_name(const char* scriptName) { return _i(0x9DC711BC69C548DF, scriptName); } + static Void _0xFB80AB299D2EE1BD(Any p0) { return _i(0xFB80AB299D2EE1BD, p0); } + static Any _0xEA2F2061875EED90() { return _i(0xEA2F2061875EED90); } + static Void clear_cloud_hat() { return _i(0x957E790EA1727B64); } + static Void _0xA74802FB8D0B7814(const char* p0, float p1) { return _i(0xA74802FB8D0B7814, p0, p1); } + static int update_onscreen_keyboard() { return _i(0x0CF2B696BBF945AE); } + static Void _0x693478ACBD7F18E7() { return _i(0x693478ACBD7F18E7); } + static Void using_mission_creator(bool toggle) { return _i(0xF14878FC50BEC6EE, toggle); } + static Void _0xA8434F1DFF41D6E7(float p0) { return _i(0xA8434F1DFF41D6E7, p0); } + static Void _0xC3C221ADDDE31A11(float p0) { return _i(0xC3C221ADDDE31A11, p0); } + static Void _0x31727907B2C43C55(float p0) { return _i(0x31727907B2C43C55, p0); } + static Void _0x405591EC8FD9096D(float p0) { return _i(0x405591EC8FD9096D, p0); } + static Void _0xB3E6360DDE733E82(float p0) { return _i(0xB3E6360DDE733E82, p0); } + static Void _0xF751B16FB32ABC1D(float p0) { return _i(0xF751B16FB32ABC1D, p0); } + static Void _0x7C9C0B1EEB1F9072(float p0) { return _i(0x7C9C0B1EEB1F9072, p0); } + static Void _0xB9854DFDE0D833D6(float p0) { return _i(0xB9854DFDE0D833D6, p0); } + static Void _0x9F5E6BB6B34540DA(float p0) { return _i(0x9F5E6BB6B34540DA, p0); } + static Void _0x6216B116083A7CB4(float p0) { return _i(0x6216B116083A7CB4, p0); } + static Void _0xB8F87EAD7533B176(float p0) { return _i(0xB8F87EAD7533B176, p0); } + static Void _0xA7A1127490312C36(float p0) { return _i(0xA7A1127490312C36, p0); } + static Void _0xC3EAD29AB273ECE8(float p0) { return _i(0xC3EAD29AB273ECE8, p0); } + static Void _0xC54A08C85AE4D410(float p0) { return _i(0xC54A08C85AE4D410, p0); } + static bool is_sniper_inverted() { return _i(0x61A23B7EDA9BDA24); } + static bool is_orbis_version() { return _i(0xA72BC0B675B1519E); } + static bool is_durango_version() { return _i(0x4D982ADB1978442D); } + static bool is_xbox360_version() { return _i(0xF6201B4DAF662A9D); } + static bool is_ps3_version() { return _i(0xCCA1072C29D096C2); } + static bool is_aussie_version() { return _i(0x9F1935CA1F724008); } + static bool is_frontend_fading() { return _i(0x7EA2B6AF97ECA6ED); } + static Void _0x4DCDF92BF64236CD(Any p0, Any p1) { return _i(0x4DCDF92BF64236CD, p0, p1); } + static Void _0x31125FD509D9043F(Any p0) { return _i(0x31125FD509D9043F, p0); } + static Void _0xEBD3205A207939ED(Any p0) { return _i(0xEBD3205A207939ED, p0); } + static Void _0x97E7E2C04245115B(Any p0) { return _i(0x97E7E2C04245115B, p0); } + static Void _0xEB078CA2B5E82ADD(Any p0, Any p1) { return _i(0xEB078CA2B5E82ADD, p0, p1); } + static Void _0x703CC7F60CBB2B57(Any p0) { return _i(0x703CC7F60CBB2B57, p0); } + static Void _0x8951EB9C6906D3C8() { return _i(0x8951EB9C6906D3C8); } + static Void _0xBA4B8D83BDC75551(Any p0) { return _i(0xBA4B8D83BDC75551, p0); } + static Void _0x23227DF0B2115469() { return _i(0x23227DF0B2115469); } + + static Any _0x9777734DAD16992F() { return _i(0x9777734DAD16992F); } + static bool _0xE260E0BB9CD995AC(Any p0) { return _i(0xE260E0BB9CD995AC, p0); } + static Any _0xE154B48B68EF72BC(Any p0) { return _i(0xE154B48B68EF72BC, p0); } + static Any _0x6FCF8DDEA146C45B(Any p0) { return _i(0x6FCF8DDEA146C45B, p0); } + static Void network_buy_airstrike(int cost, bool p1, bool p2) { return _i(0x763B4BD305338F19, cost, p1, p2); } + static Any _0xA3EDDAA42411D3B9() { return _i(0xA3EDDAA42411D3B9); } + static Void network_buy_bounty(int amount, Player victim, bool p2, bool p3) { return _i(0x7B718E197453F2D9, amount, victim, p2, p3); } + static Void _0x30FD873ECE50E9F6(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x30FD873ECE50E9F6, p0, p1, p2, p3, p4); } + static Void network_buy_fairground_ride(int amountSpent, Any p1, bool p2, bool p3) { return _i(0x8A7B3952DD64D2B5, amountSpent, p1, p2, p3); } + static Void network_buy_healthcare(int cost, bool p1, bool p2) { return _i(0xD9B067E55253E3DD, cost, p1, p2); } + static Void network_buy_heli_strike(int cost, bool p1, bool p2) { return _i(0x81AA4610E3FD3A69, cost, p1, p2); } + static Void network_buy_item(Ped player, uint32_t item, Any p2, Any p3, bool p4, const char* item_name, Any p6, Any p7, Any p8, bool p9) { return _i(0xF0077C797F66A355, player, item, p2, p3, p4, item_name, p6, p7, p8, p9); } + static Any _0xD987F2489969668C() { return _i(0xD987F2489969668C); } + static Void network_buy_property(float propertyCost, uint32_t propertyName, bool p2, bool p3) { return _i(0x650A08A280870AF6, propertyCost, propertyName, p2, p3); } + static Any _0x75AF80E61248EEBD() { return _i(0x75AF80E61248EEBD); } + static bool network_can_bet(Any p0) { return _i(0x3A54E33660DED67F, p0); } + static Any _0xC62DD18375C99130() { return _i(0xC62DD18375C99130); } + static bool network_can_receive_player_cash(Any p0, Any p1, Any p2, Any p3) { return _i(0x5D17BE59D2123284, p0, p1, p2, p3); } + static Any _0x1C2473301B1C66BA() { return _i(0x1C2473301B1C66BA); } + static bool _0x7303E27CC6532080(Any p0, bool p1, bool p2, bool p3, Any* p4, Any p5) { return _i(0x7303E27CC6532080, p0, p1, p2, p3, p4, p5); } + static bool network_can_spend_money(Any p0, bool p1, bool p2, bool p3, Any p4) { return _i(0xAB3CAA6B422164DA, p0, p1, p2, p3, p4); } + static Void network_clear_character_wallet(Any p0) { return _i(0xA921DED15FDF28F5, p0); } + static Any _0x18B7AE224B087E26() { return _i(0x18B7AE224B087E26); } + static Void network_delete_character(int characterIndex, bool p1, bool p2) { return _i(0x05A50AF38947EB8D, characterIndex, p1, p2); } + static Void _0x0CB1BE0633C024A8(Any p0, Any p1, Any p2, Any p3) { return _i(0x0CB1BE0633C024A8, p0, p1, p2, p3); } + static Void _0x08B0CA7A6AB3AC32(Any p0, Any p1, Any p2) { return _i(0x08B0CA7A6AB3AC32, p0, p1, p2); } + static Void network_earn_from_ai_target_kill(Any p0, Any p1) { return _i(0x515B4A22E4D3C6D7, p0, p1); } + static Void network_earn_from_ambient_job(int p0, const char* p1, Any* p2) { return _i(0xFB6DB092FBAE29E6, p0, p1, p2); } + static Void network_earn_from_bend_job(int amount, const char* heistHash) { return _i(0x61326EE6DF15B0CA, amount, heistHash); } + static Void network_earn_from_betting(int amount, const char* p1) { return _i(0x827A5BA1A44ACA6D, amount, p1); } + static Void network_earn_from_bounty(int amount, int* network_handle, Any* p2, Any p3) { return _i(0x131BB5DA15453ACF, amount, network_handle, p2, p3); } + static Void _0x8586789730B10CAF(Any p0, Any p1, Any p2, Any p3) { return _i(0x8586789730B10CAF, p0, p1, p2, p3); } + static Void network_earn_from_challenge_win(Any p0, Any* p1, bool p2) { return _i(0x2B171E6B2F64D8DF, p0, p1, p2); } + static Void _0xECA658CE2A4E5A72(Any p0, Any p1) { return _i(0xECA658CE2A4E5A72, p0, p1); } + static Void network_earn_from_crate_drop(int amount) { return _i(0xB1CC1B9EC3007A2A, amount); } + static Void network_earn_from_daily_objectives(int p0, const char* p1, int p2) { return _i(0x6EA318C91C1A8786, p0, p1, p2); } + static Void _0x84C0116D012E8FC2(Any p0) { return _i(0x84C0116D012E8FC2, p0); } + static Void network_earn_from_gangattack_pickup(int amount) { return _i(0xA03D4ACE0A3284CE, amount); } + static Void _0x31BA138F6304FB9F(Any p0, Any p1) { return _i(0x31BA138F6304FB9F, p0, p1); } + static Void network_earn_from_holdups(int amount) { return _i(0x45B8154E077D9E4D, amount); } + static Void network_earn_from_import_export(Any p0, Any p1) { return _i(0xF92A014A634442D6, p0, p1); } + static Void network_earn_from_job(int amount, const char* p1) { return _i(0xB2CC4836834E8A98, amount, p1); } + static Void network_earn_from_job_bonus(Any p0, Any* p1, Any* p2) { return _i(0x6816FB4416760775, p0, p1, p2); } + static Void network_earn_from_not_badsport(int amount) { return _i(0x4337511FA8221D36, amount); } + static Void network_earn_from_personal_vehicle(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8) { return _i(0x3F4D00167E41E0AD, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static Void network_earn_from_pickup(int amount) { return _i(0xED1517D3AF17C698, amount); } + static Void _0xC8407624CEF2354B(Any p0, Any p1) { return _i(0xC8407624CEF2354B, p0, p1); } + static Void network_earn_from_property(int amount, uint32_t propertyName) { return _i(0x849648349D77F5C5, amount, propertyName); } + static Void network_earn_from_armour_truck(int amount) { return _i(0xF514621E8EA463D0, amount); } + static Void network_earn_from_rockstar(int amount) { return _i(0x02CE1D6AC0FC73EA, amount); } + static Void _0x9251B6ABF2D0A5B4(Any p0, Any p1) { return _i(0x9251B6ABF2D0A5B4, p0, p1); } + static Void _0x6B7E4FB50D5F3D65(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x6B7E4FB50D5F3D65, p0, p1, p2, p3, p4); } + static Void network_earn_from_vehicle(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7) { return _i(0xB539BD8A4C1EECF8, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void _0xEDEAD9A91EC768B3(Any p0, Any p1, Any p2) { return _i(0xEDEAD9A91EC768B3, p0, p1, p2); } + static Any _0x3E4ADAFF1830F146() { return _i(0x3E4ADAFF1830F146); } + static Void _0xCDA1C62BE2777802(Any p0, Any p1, Any p2) { return _i(0xCDA1C62BE2777802, p0, p1, p2); } + static Void _0x55A1E095DB052FA5(Any p0, Any p1) { return _i(0x55A1E095DB052FA5, p0, p1); } + static Void _0xDEE612F2D71B0308(Any p0, Any p1, Any p2, Any p3) { return _i(0xDEE612F2D71B0308, p0, p1, p2, p3); } + static Void _0x35F8DA0E8A31EF1B(Any p0) { return _i(0x35F8DA0E8A31EF1B, p0); } + static Void _0x005ACA7100BD101D(Any p0) { return _i(0x005ACA7100BD101D, p0); } + static bool _0x7C4FCCD2E4DEB394() { return _i(0x7C4FCCD2E4DEB394); } + static Any _0xA31FD6A0865B6D14() { return _i(0xA31FD6A0865B6D14); } + static bool _0xDC18531D7019A535(Any p0, Any p1) { return _i(0xDC18531D7019A535, p0, p1); } + static Any _0xED5AB8860415BABA() { return _i(0xED5AB8860415BABA); } + static Any _0x08E8EEADFD0DC4A0() { return _i(0x08E8EEADFD0DC4A0); } + static Any _0x5D1E75F91C07DEE5() { return _i(0x5D1E75F91C07DEE5); } + static Any _0xFB2456B2040A6A67() { return _i(0xFB2456B2040A6A67); } + static Any _0x4F54F3B6C202FB4E() { return _i(0x4F54F3B6C202FB4E); } + static Any _0x13A8DE2FD77D04F3() { return _i(0x13A8DE2FD77D04F3); } + static Any _0xEA560AC9EEB1E19B() { return _i(0xEA560AC9EEB1E19B); } + static const char* network_get_bank_balance_string() { return _i(0xA6FA3979BED01B81); } + static Any _0x700AF71AE615E6DD() { return _i(0x700AF71AE615E6DD); } + static Any _0xF9B10B529DCFB33B() { return _i(0xF9B10B529DCFB33B); } + static int64_t network_get_vc_balance() { return _i(0x5CBAD97E059E1B94); } + static int64_t network_get_vc_bank_balance() { return _i(0x76EF28DA05EA395A); } + static int64_t network_get_vc_wallet_balance(int character) { return _i(0xA40F9C2623F6A8B5, character); } + static Void network_give_player_jobshare_cash(int amount, int* network_handle) { return _i(0xFB18DF9CB95E0105, amount, network_handle); } + static Void network_initialize_cash(int p0, int p1) { return _i(0x3DA5ECD1A56CBA6D, p0, p1); } + static Void _0x821418C727FCACD7(Any p0) { return _i(0x821418C727FCACD7, p0); } + static bool network_money_can_bet(Any p0, bool p1, bool p2) { return _i(0x81404F3DC124FE5B, p0, p1, p2); } + static Void network_pay_employee_wage(Any p0, bool p1, bool p2) { return _i(0x5FD5ED82CBBE9989, p0, p1, p2); } + static Void network_pay_match_entry_fee(int value, int* p1, bool p2, bool p3) { return _i(0x9346E14F2AF74D46, value, p1, p2, p3); } + static Void network_pay_utility_bill(Any p0, bool p1, bool p2) { return _i(0xAFE08B35EC0C9EAE, p0, p1, p2); } + static Void network_receive_player_jobshare_cash(int value, int* network_handle) { return _i(0x56A3B51944C50598, value, network_handle); } + static Void network_refund_cash(int index, const char* context, const char* reason, bool unk) { return _i(0xF9C812CD7C46E817, index, context, reason, unk); } + static Void _0x08A1B82B91900682(Any p0, Any p1, Any p2) { return _i(0x08A1B82B91900682, p0, p1, p2); } + static Void _0xDBC966A01C02BCA7(Any p0, Any p1, Any p2) { return _i(0xDBC966A01C02BCA7, p0, p1, p2); } + static Void network_spent_ammo_drop(Any p0, bool p1, bool p2) { return _i(0xB162DC95C0A3317B, p0, p1, p2); } + static Void network_spent_arrest_bail(Any p0, bool p1, bool p2) { return _i(0x812F5488B1B2A299, p0, p1, p2); } + static Void _0x5D97630A8A0EF123(Any p0, Any p1, Any p2) { return _i(0x5D97630A8A0EF123, p0, p1, p2); } + static Any network_spent_bank_interest() { return _i(0xCA230C9682556CF1); } + static Void network_spent_betting(Any p0, Any p1, Any* p2, bool p3, bool p4) { return _i(0x1C436FD11FFA692F, p0, p1, p2, p3, p4); } + static Void network_spent_boat_pickup(Any p0, bool p1, bool p2) { return _i(0x524EE43A37232C00, p0, p1, p2); } + static Any _0xFFBE02CD385356BD() { return _i(0xFFBE02CD385356BD); } + static Void network_spent_bounty(Any p0, bool p1, bool p2) { return _i(0x29B260B84947DFCC, p0, p1, p2); } + static Void network_spent_bull_shark(Any p0, bool p1, bool p2) { return _i(0xA6DD8458CE24012C, p0, p1, p2); } + static Void _0x12D148D26538D0F9(Any p0, Any p1, Any p2, Any p3) { return _i(0x12D148D26538D0F9, p0, p1, p2, p3); } + static Void network_spent_buy_offtheradar(Any p0, bool p1, bool p2) { return _i(0xA628A745E2275C5D, p0, p1, p2); } + static Void network_spent_buy_passive_mode(Any p0, bool p1, bool p2) { return _i(0x6D3A430D1A809179, p0, p1, p2); } + static Void network_spent_buy_reveal_players(Any p0, bool p1, bool p2) { return _i(0x6E176F1B18BC0637, p0, p1, p2); } + static Void _0xAC272C0AE01B4BD8(Any p0, Any p1, Any p2, Any p3) { return _i(0xAC272C0AE01B4BD8, p0, p1, p2, p3); } + static Void network_spent_buy_wantedlevel(Any p0, Any* p1, bool p2, bool p3) { return _i(0xE1B13771A843C4F6, p0, p1, p2, p3); } + static Void network_spent_call_player(Any p0, Any* p1, bool p2, bool p3) { return _i(0xACDE7185B374177C, p0, p1, p2, p3); } + static Void network_spent_carwash(Any p0, Any p1, Any p2, bool p3, bool p4) { return _i(0xEC03C719DB2F4306, p0, p1, p2, p3, p4); } + static Void network_spent_cash_drop(int amount, bool p1, bool p2) { return _i(0x289016EC778D60E0, amount, p1, p2); } + static Void _0x5F456788B05FAEAC(Any p0, Any p1, Any p2) { return _i(0x5F456788B05FAEAC, p0, p1, p2); } + static Void network_spent_cinema(Any p0, Any p1, bool p2, bool p3) { return _i(0x6B38ECB05A63A685, p0, p1, p2, p3); } + static Void _0x5182A339A3474510(Any p0, Any p1, Any p2) { return _i(0x5182A339A3474510, p0, p1, p2); } + static Void network_spent_from_rockstar(int bank, bool p1, bool p2) { return _i(0x6A445B64ED7ABEB5, bank, p1, p2); } + static Any _0xB1F1346FD57685D7() { return _i(0xB1F1346FD57685D7); } + static Any _0xB18AC2ECBB15CB6A() { return _i(0xB18AC2ECBB15CB6A); } + static Void network_spent_heli_pickup(Any p0, bool p1, bool p2) { return _i(0x7BF1D73DB2ECA492, p0, p1, p2); } + static Void network_spent_hire_mercenary(Any p0, bool p1, bool p2) { return _i(0xE7B80E2BF9D80BD6, p0, p1, p2); } + static Void network_spent_hire_mugger(Any p0, bool p1, bool p2) { return _i(0xE404BFB981665BF0, p0, p1, p2); } + static Void network_spent_holdups(Any p0, bool p1, bool p2) { return _i(0xD9B86B9872039763, p0, p1, p2); } + static Void _0xC1952F3773BA18FE(Any p0, Any p1, Any p2) { return _i(0xC1952F3773BA18FE, p0, p1, p2); } + static Void network_spent_in_stripclub(Any p0, bool p1, Any p2, bool p3) { return _i(0xEE99784E4467689C, p0, p1, p2, p3); } + static Any _0x28F174A67B8D0C2F() { return _i(0x28F174A67B8D0C2F); } + static Void _0x5BCDE0F640C773D2(Any p0, Any p1, Any p2, Any p3) { return _i(0x5BCDE0F640C773D2, p0, p1, p2, p3); } + static Void _0xD7CCCBA28C4ECAF0(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xD7CCCBA28C4ECAF0, p0, p1, p2, p3, p4); } + static Void _0xE7DF4E0545DFB56E(Any p0, Any p1, Any p2) { return _i(0xE7DF4E0545DFB56E, p0, p1, p2); } + static Void network_spent_no_cops(Any p0, bool p1, bool p2) { return _i(0xD5BB406F4E04019F, p0, p1, p2); } + static Void _0xE8B0B270B6E7C76E(Any p0, Any p1, Any p2, Any p3) { return _i(0xE8B0B270B6E7C76E, p0, p1, p2, p3); } + static Void _0x05F04155A226FBBF(Any p0, Any p1, Any p2, Any p3) { return _i(0x05F04155A226FBBF, p0, p1, p2, p3); } + static Void _0x0035BB914316F1E3(Any p0, Any p1, Any p2, Any p3) { return _i(0x0035BB914316F1E3, p0, p1, p2, p3); } + static Void network_spent_pay_vehicle_insurance_premium(int amount, uint32_t vehicleModel, int* network_handle, bool notBankrupt, bool hasTheMoney) { return _i(0x9FF28D88C766E3E8, amount, vehicleModel, network_handle, notBankrupt, hasTheMoney); } + static Void _0x0FE8E1FCD2B86B33(Any p0, Any p1, Any p2, Any p3) { return _i(0x0FE8E1FCD2B86B33, p0, p1, p2, p3); } + static Void _0xB49ECA122467D05F(Any p0, Any p1, Any p2, Any p3) { return _i(0xB49ECA122467D05F, p0, p1, p2, p3); } + static Void _0x112209CE0290C03A(Any p0, Any p1, Any p2, Any p3) { return _i(0x112209CE0290C03A, p0, p1, p2, p3); } + static Void _0xE23ADC6FCB1F29AE(Any p0, Any p1, Any p2) { return _i(0xE23ADC6FCB1F29AE, p0, p1, p2); } + static Void _0x0D30EB83668E63C5(Any p0, Any p1, Any p2, Any p3) { return _i(0x0D30EB83668E63C5, p0, p1, p2, p3); } + static Void _0xED5FD7AF10F5E262(Any p0, Any p1, Any p2, Any p3) { return _i(0xED5FD7AF10F5E262, p0, p1, p2, p3); } + static Void network_spent_player_healthcare(Any p0, Any p1, bool p2, bool p3) { return _i(0x7C99101F7FCE2EE5, p0, p1, p2, p3); } + static Void network_spent_prostitutes(Any p0, bool p1, bool p2) { return _i(0xB21B89501CFAC79E, p0, p1, p2); } + static Void _0x6FD97159FE3C971A(Any p0, Any p1, Any p2, Any p3) { return _i(0x6FD97159FE3C971A, p0, p1, p2, p3); } + static Void _0x998E18CEB44487FC(Any p0, Any p1, Any p2, Any p3) { return _i(0x998E18CEB44487FC, p0, p1, p2, p3); } + static Void _0xCCB339CC970452DA(Any p0, Any p1, Any p2, Any p3) { return _i(0xCCB339CC970452DA, p0, p1, p2, p3); } + static Void _0x33981D6804E62F49(Any p0, Any p1, Any p2, Any p3) { return _i(0x33981D6804E62F49, p0, p1, p2, p3); } + static Void _0xB4C2EC463672474E(Any p0, Any p1, Any p2, Any p3) { return _i(0xB4C2EC463672474E, p0, p1, p2, p3); } + static Void _0x69EF772B192614C1(Any p0, Any p1, Any p2, Any p3) { return _i(0x69EF772B192614C1, p0, p1, p2, p3); } + static Void _0xBD0EFB25CCA8F97A(Any p0, Any p1, Any p2, Any p3) { return _i(0xBD0EFB25CCA8F97A, p0, p1, p2, p3); } + static Void _0xFC4EE00A7B3BFB76(Any p0, Any p1, Any p2) { return _i(0xFC4EE00A7B3BFB76, p0, p1, p2); } + static Void network_spent_request_heist(Any p0, bool p1, bool p2) { return _i(0x9D26502BB97BFE62, p0, p1, p2); } + static Void network_spent_request_job(Any p0, bool p1, bool p2) { return _i(0x8204DA7934DF3155, p0, p1, p2); } + static Void network_spent_robbed_by_mugger(int amount, bool p1, bool p2) { return _i(0x995A65F15F581359, amount, p1, p2); } + static Void network_spent_taxi(int amount, bool p1, bool p2) { return _i(0x17C3A7D31EAE39F9, amount, p1, p2); } + static Void network_spent_telescope(Any p0, bool p1, bool p2) { return _i(0x7FE61782AD94CC09, p0, p1, p2); } + static Void _0xA51B086B0B2C0F7A(Any p0, Any p1, Any p2, Any p3) { return _i(0xA51B086B0B2C0F7A, p0, p1, p2, p3); } + static Void _0x2FAB6614CE22E196(Any p0, Any p1, Any p2, Any p3) { return _i(0x2FAB6614CE22E196, p0, p1, p2, p3); } + static Void _0x675D19C6067CAE08(Any p0, Any p1, Any p2, Any p3) { return _i(0x675D19C6067CAE08, p0, p1, p2, p3); } + static Void _0xFA07759E6FDDD7CF(Any p0, Any p1, Any p2, Any p3) { return _i(0xFA07759E6FDDD7CF, p0, p1, p2, p3); } + static Void _0x615EB504B0788DAF(Any p0, Any p1, Any p2, Any p3) { return _i(0x615EB504B0788DAF, p0, p1, p2, p3); } + static Void _0x4128464231E3CA0B(Any p0, Any p1, Any p2, Any p3) { return _i(0x4128464231E3CA0B, p0, p1, p2, p3); } + static Void _0x2AFC2D19B50797F2(Any p0, Any p1, Any p2, Any p3) { return _i(0x2AFC2D19B50797F2, p0, p1, p2, p3); } + static Void _0x8E243837643D9583(Any p0, Any p1, Any p2, Any p3) { return _i(0x8E243837643D9583, p0, p1, p2, p3); } + static Void _0x365E877C61D6988B(Any p0, Any p1, Any p2, Any p3) { return _i(0x365E877C61D6988B, p0, p1, p2, p3); } + static Void _0xA95F667A755725DA(Any p0, Any p1, Any p2, Any p3) { return _i(0xA95F667A755725DA, p0, p1, p2, p3); } + static Void _0x0C82D21A77C22D49(Any p0, Any p1, Any p2, Any p3) { return _i(0x0C82D21A77C22D49, p0, p1, p2, p3); } + static Void _0xA75CCF58A60A5FD1(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9) { return _i(0xA75CCF58A60A5FD1, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void _0xD99DB210089617FE(Any p0, Any p1, Any p2) { return _i(0xD99DB210089617FE, p0, p1, p2); } + static const char* process_cash_gift(int* p0, int* p1, const char* p2) { return _i(0x20194D48EAEC9A41, p0, p1, p2); } + static Any _0xF70EFA14FE091429(Any p0) { return _i(0xF70EFA14FE091429, p0); } + static Any _0x9B5016A6433A68C5() { return _i(0x9B5016A6433A68C5); } + static Any _0xCD0F5B5D932AE473() { return _i(0xCD0F5B5D932AE473); } + + static bool can_phone_be_seen_on_screen() { return _i(0xC4E2813898C97A4B); } + static Void cell_cam_activate(bool p0, bool p1) { return _i(0xFDE8F069C542D126, p0, p1); } + static Void disable_phone_this_frame(bool toggle) { return _i(0x015C49A93E3E086E, toggle); } + static Void _0xA2CCBE62CD4C91A4(int* toggle) { return _i(0xA2CCBE62CD4C91A4, toggle); } + static bool cell_cam_is_char_visible_no_face_check(Entity entity) { return _i(0x439E9BC95B7E7FBE, entity); } + static Void _0xAC2890471901861C(float p0) { return _i(0xAC2890471901861C, p0); } + static Void _0x466DA42C89865553(float p0) { return _i(0x466DA42C89865553, p0); } + static Void _0xF1E22DC13F5EEBAD(float p0) { return _i(0xF1E22DC13F5EEBAD, p0); } + static Void _0xD6ADE981781FCA09(float p0) { return _i(0xD6ADE981781FCA09, p0); } + static Void _0x53F4892D18EC90A4(float p0) { return _i(0x53F4892D18EC90A4, p0); } + static Void _0x15E69E2802C24B8D(float p0) { return _i(0x15E69E2802C24B8D, p0); } + static Void _0x1B0B4AEED5B9B41C(float p0) { return _i(0x1B0B4AEED5B9B41C, p0); } + static Void _0x3117D84EFA60F77B(float p0) { return _i(0x3117D84EFA60F77B, p0); } + static Void set_phone_lean(bool Toggle) { return _i(0x44E44169EF70138E, Toggle); } + static Void move_finger(int direction) { return _i(0x95C9E72F3D7DEC9B, direction); } + static Void create_mobile_phone(int phoneType) { return _i(0xA4E8E696C532FBC7, phoneType); } + static Void destroy_mobile_phone() { return _i(0x3BC861DF703E5097); } + static Void get_mobile_phone_position(math::vector3* position) { return _i(0x584FDFDA48805B86, position); } + static Void get_mobile_phone_render_id(int* renderId) { return _i(0xB4A53E05F68B6FA1, renderId); } + static Void get_mobile_phone_rotation(math::vector3* rotation, Any p1) { return _i(0x1CEFB61F193070AE, rotation, p1); } + static Void script_is_moving_mobile_phone_offscreen(bool toggle) { return _i(0xF511F759238A5122, toggle); } + static Void _0x375A706A5C2FD084(Any p0) { return _i(0x375A706A5C2FD084, p0); } + static Void set_mobile_phone_position(float posX, float posY, float posZ) { return _i(0x693A5C6D6734085B, posX, posY, posZ); } + static Void set_mobile_phone_rotation(float rotX, float rotY, float rotZ, Any p3) { return _i(0xBB779C0CA917E865, rotX, rotY, rotZ, p3); } + static Void set_mobile_phone_scale(float scale) { return _i(0xCBDD322A73D6D932, scale); } + + static Any network_shop_basket_add_item(Any* p0, Any p1) { return _i(0xF30980718C8ED876, p0, p1); } + static bool network_shop_basket_apply_server_data(Any p0, Any* p1) { return _i(0xE1A0450ED46A7812, p0, p1); } + static Any network_shop_basket_end() { return _i(0xA65568121DF2EA26); } + static Any _0xE547E9114277098F() { return _i(0xE547E9114277098F); } + static Any network_shop_basket_is_full() { return _i(0x27F76CC6C55AD30E); } + static bool network_shop_basket_start(Any* p0, Any p1, Any p2, Any p3) { return _i(0x279F08B1A4B29B7E, p0, p1, p2, p3); } + static bool network_shop_begin_service(int* value, Any p1, Any p2, Any p3, Any p4, int p5) { return _i(0x3C5FD37B5499582E, value, p1, p2, p3, p4, p5); } + static Any _0x3C4487461E9B0DCB() { return _i(0x3C4487461E9B0DCB); } + static bool network_shop_does_item_exist(const char* name) { return _i(0xBD4D7EAF8A30F637, name); } + static bool network_shop_does_item_exist_hash(uint32_t hash) { return _i(0x247F0F73A182EA0B, hash); } + static bool network_shop_checkout_start(Any p0) { return _i(0x39BE7CEA8D9CC8E6, p0); } + static bool _0x74A0FD0688F1EE45(Any p0) { return _i(0x74A0FD0688F1EE45, p0); } + static bool _0x51F1A8E48C3D2F6D(Any p0, bool p1, Any p2) { return _i(0x51F1A8E48C3D2F6D, p0, p1, p2); } + static Any _0x0A6D923DFFC9BD89() { return _i(0x0A6D923DFFC9BD89); } + static Any network_shop_delete_set_telemetry_nonce_seed() { return _i(0x112CEF1615A1139F); } + static bool network_shop_end_service(Any p0) { return _i(0xE2A99A9B524BEFFF, p0); } + static Any _0x85F6C9ABA1DE2BCF() { return _i(0x85F6C9ABA1DE2BCF); } + static int network_shop_get_price(int hash, int hash2, bool p2) { return _i(0xC27009422FCCA88D, hash, hash2, p2); } + static bool _0x897433D292B44130(Any* p0, Any* p1) { return _i(0x897433D292B44130, p0, p1); } + static Any _0xE3E5A7C64CA2C6ED() { return _i(0xE3E5A7C64CA2C6ED); } + static Any _0x2B949A1E6AEC8F6A() { return _i(0x2B949A1E6AEC8F6A); } + static bool network_shop_get_transactions_disabled() { return _i(0x810E8431C0614BF9); } + static bool network_shop_get_transactions_enabled_for_character(int mpChar) { return _i(0xB24F0944DA203D9E, mpChar); } + static Any _0x357B152EF96C30B6() { return _i(0x357B152EF96C30B6); } + static bool _0xCF38DAFBB49EDE5E(Any* p0) { return _i(0xCF38DAFBB49EDE5E, p0); } + static bool _0x0395CB47B022E62C(Any* p0) { return _i(0x0395CB47B022E62C, p0); } + static bool _0xC13C38E47EA5DF31(Any* p0) { return _i(0xC13C38E47EA5DF31, p0); } + static bool _0x170910093218C8B9(Any* p0) { return _i(0x170910093218C8B9, p0); } + static bool network_shop_session_apply_received_data(Any p0) { return _i(0x2F41D51BA3BCD1F1, p0); } + static bool network_shop_set_telemetry_nonce_seed(Any p0) { return _i(0x9507D4271988E1AE, p0); } + static bool network_shop_start_session(Any p0) { return _i(0xA135AC892A58FC07, p0); } + static Any _0x72EB7BA9B69BF6AB() { return _i(0x72EB7BA9B69BF6AB); } + static bool _0x35A1B3E1D1315CFA(bool p0, bool p1) { return _i(0x35A1B3E1D1315CFA, p0, p1); } + static Any _0x613F125BA3BD2EB9() { return _i(0x613F125BA3BD2EB9); } + static bool network_transfer_bank_to_wallet(int charStatInt, int amount) { return _i(0xD47A2C1BA117471D, charStatInt, amount); } + static Any _0x23789E777D14CE44() { return _i(0x23789E777D14CE44); } + static Any _0x350AA5EBC03D3BD2() { return _i(0x350AA5EBC03D3BD2); } + static Any network_shop_cash_transfer_set_telemetry_nonce_seed() { return _i(0x498C1E05CE5F7877); } + static bool network_transfer_wallet_to_bank(int charStatInt, int amount) { return _i(0xC2F7FE5309181C7D, charStatInt, amount); } + + static Void _0x1F7BC3539F9E0224() { return _i(0x1F7BC3539F9E0224); } + static bool _0xBD545D44CCE70597() { return _i(0xBD545D44CCE70597); } + static Any _0xEBCAB9E5048434F4() { return _i(0xEBCAB9E5048434F4); } + static Any _0x7808619F31FF22DB() { return _i(0x7808619F31FF22DB); } + static Void activate_damage_tracker_on_network_id(int netID, bool p1) { return _i(0xD45B1FFCCD52FF19, netID, p1); } + static Void _0xBEC0816FF5ACBCDA(Any p0, Any p1) { return _i(0xBEC0816FF5ACBCDA, p0, p1); } + static bool bad_sport_player_left_detected(int* network_handle, int event, int amountReceived) { return _i(0xEC5E3AF5289DCA81, network_handle, event, amountReceived); } + static Any _0xE16AA70CE9BEEDC3(Any p0) { return _i(0xE16AA70CE9BEEDC3, p0); } + static bool can_register_mission_entities(int p0, Any p1, Any p2, Any p3) { return _i(0x69778E7564BADE6D, p0, p1, p2, p3); } + static bool can_register_mission_objects(int p0) { return _i(0x800DD4721A8B008B, p0); } + static bool can_register_mission_peds(int p0) { return _i(0xBCBF4FEF9FA5D781, p0); } + static bool can_register_mission_pickups(int p0) { return _i(0x0A49D1CB6E34AF72, p0); } + static bool can_register_mission_vehicles(int p0) { return _i(0x7277F1F2E085EE74, p0); } + static Void download_check() { return _i(0x4F18196C8D38768D); } + static Any _0xC64DED7EF0D2FE37(Any* p0) { return _i(0xC64DED7EF0D2FE37, p0); } + static bool _0x3A3D5568AF297CD5(Any p0) { return _i(0x3A3D5568AF297CD5, p0); } + static Any network_enable_motion_drugged() { return _i(0x0B0CC10720653F3B); } + static bool _0x4C61B39930D045DA(Any p0) { return _i(0x4C61B39930D045DA, p0); } + static Any _0xC7ABAC5DE675EE3B() { return _i(0xC7ABAC5DE675EE3B); } + static Void get_date_and_time_from_unix_epoch(int unixEpoch, Any* timeStructure) { return _i(0xAC97AF97FA68E5D5, unixEpoch, timeStructure); } + static Void _0x265635150FB0D82E() { return _i(0x265635150FB0D82E); } + static Any _0x43865688AE10F0D7() { return _i(0x43865688AE10F0D7); } + static Any _0xA75E2B6733DA5142() { return _i(0xA75E2B6733DA5142); } + static Any _0x62B9FEC9A11F10EF() { return _i(0x62B9FEC9A11F10EF); } + static bool _0x098AB65B9ED9A9EC(Any* p0, Any p1, Any p2) { return _i(0x098AB65B9ED9A9EC, p0, p1, p2); } + static bool _0x0AE1F1653B554AB9(Any p0) { return _i(0x0AE1F1653B554AB9, p0); } + static Any _0xDC48473142545431() { return _i(0xDC48473142545431); } + static Void fade_out_local_player(bool p0) { return _i(0x416DBD4CD6ED8DD2, p0); } + static bool fillout_pm_player_list(int* network_handle, Any p1, Any p2) { return _i(0xCBBD7C4991B64809, network_handle, p1, p2); } + static bool fillout_pm_player_list_with_names(Any* p0, Any* p1, Any p2, Any p3) { return _i(0x716B6DB9D1886106, p0, p1, p2, p3); } + static int get_posix_time() { return _i(0x9A73240B49945C76); } + static Any _0xF12E6CD06C73D69E() { return _i(0xF12E6CD06C73D69E); } + static Any _0x6F44CBF56D79FAC0(Any p0, Any p1) { return _i(0x6F44CBF56D79FAC0, p0, p1); } + static Any _0x662635855957C411(Any p0) { return _i(0x662635855957C411, p0); } + static Any _0xB4271092CA7EDF48(Any p0) { return _i(0xB4271092CA7EDF48, p0); } + static Any _0x2A7776C709904AB0(Any p0) { return _i(0x2A7776C709904AB0, p0); } + static Any _0x722F5D28B61C5EA8(Any p0) { return _i(0x722F5D28B61C5EA8, p0); } + static Any _0xCA94551B50B4932C(Any p0) { return _i(0xCA94551B50B4932C, p0); } + static Any _0x74FB3E29E6D10FA9() { return _i(0x74FB3E29E6D10FA9); } + static Any _0xA0FA4EC6A05DA44E() { return _i(0xA0FA4EC6A05DA44E); } + static Any _0x58CC181719256197(Any p0, Any p1, Any p2) { return _i(0x58CC181719256197, p0, p1, p2); } + static Any network_is_pending_friend(Any p0) { return _i(0x0BE73DA6984A6E33, p0); } + static Any _0x8B0C2964BA471961() { return _i(0x8B0C2964BA471961); } + static Any _0x88B588B41FF7868E() { return _i(0x88B588B41FF7868E); } + static Any _0x67FC09BC554A75E5() { return _i(0x67FC09BC554A75E5); } + static Any _0x6FB7BB3607D27FA2() { return _i(0x6FB7BB3607D27FA2); } + static Any _0xC7BE335216B5EC7C() { return _i(0xC7BE335216B5EC7C); } + static Any _0x0C1F7D49C39D2289() { return _i(0x0C1F7D49C39D2289); } + static Any _0xA72835064DD63E4C() { return _i(0xA72835064DD63E4C); } + static Any _0x0AFCE529F69B21FF() { return _i(0x0AFCE529F69B21FF); } + static int get_network_time() { return _i(0x7A5487FE9FAA6B48); } + static int _0x89023FBBF9200E9F() { return _i(0x89023FBBF9200E9F); } + static Any _0xF2EAC213D5EA0623() { return _i(0xF2EAC213D5EA0623); } + static int _0x12B6281B6C6706C0(bool p0) { return _i(0x12B6281B6C6706C0, p0); } + static int _0xCB215C4B56A7FAE7(bool p0) { return _i(0xCB215C4B56A7FAE7, p0); } + static int _0x0CD9AB83489430EA(bool p0) { return _i(0x0CD9AB83489430EA, p0); } + static int get_num_reserved_mission_objects(bool p0, Any p1) { return _i(0xAA81B5F10BC43AC2, p0, p1); } + static int get_num_reserved_mission_peds(bool p0, Any p1) { return _i(0x1F13D5AE5CB17E17, p0, p1); } + static int get_num_reserved_mission_vehicles(bool p0, Any p1) { return _i(0xCF3A965906452031, p0, p1); } + static const char* get_online_version() { return _i(0xFCA9373EF340AC0A); } + static Any _0x8BD6C6DEA20E82C6(Any p0) { return _i(0x8BD6C6DEA20E82C6, p0); } + static const char* get_time_as_string(int time) { return _i(0x9E23B1777A927DAD, time); } + static int get_time_difference(int timeA, int timeB) { return _i(0xA2C6FC031D46FFF0, timeA, timeB); } + static int get_time_offset(int timeA, int timeB) { return _i(0x017008CCDAD48503, timeA, timeB); } + static bool has_network_time_started() { return _i(0x46718ACEEDEAFC84); } + static Any _0x1D4DC17C38FEAFF0() { return _i(0x1D4DC17C38FEAFF0); } + static Any _0xEA14EEF5B7CD2C30() { return _i(0xEA14EEF5B7CD2C30); } + static Any _0x2EAC52B4019E2782() { return _i(0x2EAC52B4019E2782); } + static bool is_damage_tracker_active_on_network_id(int netID) { return _i(0x6E192E33AD436366, netID); } + static Any _0xB2092A1EAA7FD45F(Any p0) { return _i(0xB2092A1EAA7FD45F, p0); } + static bool _0x21D04D7BC538C146(Any p0) { return _i(0x21D04D7BC538C146, p0); } + static Any _0x7EF7649B64D7FF10(Any p0) { return _i(0x7EF7649B64D7FF10, p0); } + static bool _0xA1607996431332DF(int netId) { return _i(0xA1607996431332DF, netId); } + static bool is_player_in_cutscene(Player player) { return _i(0xE73092F4157CD126, player); } + static bool network_is_signed_online() { return _i(0x1077788E268557C2); } + static bool is_sphere_visible_to_another_machine(float p0, float p1, float p2, float p3) { return _i(0xD82CF8E64C8729D8, p0, p1, p2, p3); } + static bool is_sphere_visible_to_player(Any p0, float p1, float p2, float p3, float p4) { return _i(0xDC3A310219E5DA62, p0, p1, p2, p3, p4); } + static Any _0x883D79C4071E18B3() { return _i(0x883D79C4071E18B3); } + static bool is_time_equal_to(int timeA, int timeB) { return _i(0xF5BC95857BD6D512, timeA, timeB); } + static bool is_time_less_than(int timeA, int timeB) { return _i(0xCB2CF5148012C8D0, timeA, timeB); } + static bool is_time_more_than(int timeA, int timeB) { return _i(0xDE350F8651E4346C, timeA, timeB); } + static Any _0x59328EB08C5CEB2B() { return _i(0x59328EB08C5CEB2B); } + static bool network_accept_presence_invite(Any p0) { return _i(0xFA91550DF9318B22, p0); } + static bool network_access_tunable_bool(const char* tunableContext, const char* tunableName) { return _i(0xAA6A47A573ABB75A, tunableContext, tunableName); } + static bool network_access_tunable_bool_hash(uint32_t tunableContext, uint32_t tunableName) { return _i(0xEA16B69D93D71A45, tunableContext, tunableName); } + static bool network_access_tunable_float(const char* tunableContext, const char* tunableName, float* value) { return _i(0xE5608CA7BC163A5F, tunableContext, tunableName, value); } + static bool network_access_tunable_float_hash(uint32_t tunableContext, uint32_t tunableName, float* value) { return _i(0x972BC203BBC4C4D5, tunableContext, tunableName, value); } + static Any _0x3A8B55FDA4C8DDEF(Any p0, Any p1, Any p2) { return _i(0x3A8B55FDA4C8DDEF, p0, p1, p2); } + static Any _0x1950DAE9848A4739(Any p0, Any p1, Any p2) { return _i(0x1950DAE9848A4739, p0, p1, p2); } + static Any _0x697F508861875B42(Any p0, Any p1, Any p2) { return _i(0x697F508861875B42, p0, p1, p2); } + static bool network_access_tunable_int(const char* tunableContext, const char* tunableName, int* value) { return _i(0x8BE1146DFD5D4468, tunableContext, tunableName, value); } + static bool network_access_tunable_int_hash(uint32_t tunableContext, uint32_t tunableName, int* value) { return _i(0x40FCE03E50E8DBE8, tunableContext, tunableName, value); } + static Any _0xFAFC23AEE23868DB() { return _i(0xFAFC23AEE23868DB); } + static Any network_action_follow_invite() { return _i(0xC88156EBB786F8D5); } + static Any _0x2B1C623823DB0D9D(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x2B1C623823DB0D9D, p0, p1, p2, p3, p4, p5, p6); } + static Any _0x25B99872D588A101(float p0, float p1, float p2, float p3, float p4, float p5) { return _i(0x25B99872D588A101, p0, p1, p2, p3, p4, p5); } + static Any network_add_entity_angled_area(float p0, float p1, float p2, float p3, float p4, float p5, float p6) { return _i(0x376C6375BA60293A, p0, p1, p2, p3, p4, p5, p6); } + static Any network_add_entity_area(float p0, float p1, float p2, float p3, float p4, float p5) { return _i(0x494C8FB299290269, p0, p1, p2, p3, p4, p5); } + static Void network_add_entity_to_synchronised_scene(Entity entity, int netScene, const char* animDict, const char* animName, float speed, float speedMulitiplier, int flag) { return _i(0xF2404D68CBC855FA, entity, netScene, animDict, animName, speed, speedMulitiplier, flag); } + static Void network_add_followers(int* p0, int p1) { return _i(0x236406F60CF216D6, p0, p1); } + static bool network_add_friend(Any* p0, const char* p1) { return _i(0x8E02D73914064223, p0, p1); } + static Void network_add_ped_to_synchronised_scene(Ped ped, int netScene, char* animDict, char* animName, float blendInSpeed, float blendOutSpeed, int duration, int flag, float playbackRate, Any p9) { return _i(0x742A637471BCECD9, ped, netScene, animDict, animName, blendInSpeed, blendOutSpeed, duration, flag, playbackRate, p9); } + static Void network_force_local_use_of_synced_scene_camera(int netScene, const char* animDict, const char* animName) { return _i(0xCF8BD3B0BD6D42D7, netScene, animDict, animName); } + static Void _0xFB680D403909DC70(Any p0, Any p1) { return _i(0xFB680D403909DC70, p0, p1); } + static Void network_block_kicked_players(bool p0) { return _i(0x6B07B9CE4D390375, p0); } + static Void _0x267C78C60E806B9A(Any p0, bool p1) { return _i(0x267C78C60E806B9A, p0, p1); } + static Void _0x144DA052257AE7D8(Any p0) { return _i(0x144DA052257AE7D8, p0); } + static bool network_am_i_blocked_by_gamer(Any* p0) { return _i(0x15337C7C268A27B2, p0); } + static bool network_am_i_blocked_by_player(Player player) { return _i(0x87F395D957D4353D, player); } + static bool network_am_i_muted_by_gamer(Any* p0) { return _i(0xDF02A2C93F1F26DA, p0); } + static bool network_am_i_muted_by_player(Player player) { return _i(0x9D6981DFC91A8604, player); } + static bool _0x99B72C7ABDE5C910(Ped ped, Player player) { return _i(0x99B72C7ABDE5C910, ped, player); } + static Void _0xE66C690248F11150(Entity p0, Any p1) { return _i(0xE66C690248F11150, p0, p1); } + static Void network_apply_transition_parameter(Any p0, Any p1) { return _i(0x521638ADA1BA0D18, p0, p1); } + static Void _0xEBEFC2E77084F599(Any p0, const char* p1, bool p2) { return _i(0xEBEFC2E77084F599, p0, p1, p2); } + static Void _0xDBD2056652689917(float x, float y, float z) { return _i(0xDBD2056652689917, x, y, z); } + static bool network_are_handles_the_same(int* netHandle1, int* netHandle2) { return _i(0x57DBA049E110F217, netHandle1, netHandle2); } + static bool network_is_player_equal_to_index(Player player, int index) { return _i(0x9DE986FC9A87C474, player, index); } + static Any _0xBA9775570DB788CF() { return _i(0xBA9775570DB788CF); } + static bool network_are_transition_details_valid(Any p0) { return _i(0x2615AA2A695930C1, p0); } + static Void network_attach_synchronised_scene_to_entity(int netScene, Entity entity, int bone) { return _i(0x478DCBD2A98B705A, netScene, entity, bone); } + static Void network_bail(Any p0, Any p1, Any p2) { return _i(0x95914459A87EBA28, p0, p1, p2); } + static Void network_bail_transition(Any p0, Any p1, Any p2) { return _i(0xEAA572036990CD1B, p0, p1, p2); } + static Void network_block_invites(bool toggle) { return _i(0x34F9E9049454A7A0, toggle); } + static Void _0xCFEB8AF24FC1D0BB(bool p0) { return _i(0xCFEB8AF24FC1D0BB, p0); } + static Void _0xBD0BE0BFC927EAC1() { return _i(0xBD0BE0BFC927EAC1); } + static Void _0xFB8F2A6F3DF08CBE() { return _i(0xFB8F2A6F3DF08CBE); } + static bool network_can_access_multiplayer(int* loadingState) { return _i(0xAF50DA1A3F8B1BA4, loadingState); } + static bool network_can_bail() { return _i(0x580CE4438479CC61); } + static Any _0x8F5D1AD832AEB06C(Any p0) { return _i(0x8F5D1AD832AEB06C, p0); } + static bool network_can_enter_multiplayer() { return _i(0x7E782A910C362C25); } + static bool _0x135F9B7B7ADD2185(Any* p0) { return _i(0x135F9B7B7ADD2185, p0); } + static Any _0x2BF66D2E7414F686() { return _i(0x2BF66D2E7414F686); } + static bool network_can_session_end() { return _i(0x4EEBC3694E49C572); } + static bool network_can_set_waypoint() { return _i(0xC927EC229934AF60); } + static bool network_can_communicate_with_gamer(int* player) { return _i(0xA150A4F065806B1F, player); } + static Void network_change_transition_slots(Any p0, Any p1) { return _i(0xEEEDA5E6D7080987, p0, p1); } + static bool _0x83F28CE49FBBFFBA(Any p0, Any p1, bool p2) { return _i(0x83F28CE49FBBFFBA, p0, p1, p2); } + static Any _0x4AD490AE1536933B(Any p0, Any p1) { return _i(0x4AD490AE1536933B, p0, p1); } + static bool _0x44B37CDCAE765AAE(Any p0, Any* p1) { return _i(0x44B37CDCAE765AAE, p0, p1); } + static bool _0x78321BEA235FD8CD(Any p0, bool p1) { return _i(0x78321BEA235FD8CD, p0, p1); } + static Any _0x0CF6CC51AA18F0F8(Any p0, Any p1, Any p2) { return _i(0x0CF6CC51AA18F0F8, p0, p1, p2); } + static Any _0x60EDD13EB3AC1FF3() { return _i(0x60EDD13EB3AC1FF3); } + static Any _0x07EAB372C8841D99(Any p0, Any p1, Any p2) { return _i(0x07EAB372C8841D99, p0, p1, p2); } + static bool _0x595F028698072DD9(Any p0, Any p1, bool p2) { return _i(0x595F028698072DD9, p0, p1, p2); } + static bool network_is_clan_membership_finished_downloading() { return _i(0xB3F64A6A91432477); } + static bool _0x2B51EDBEFC301339(int p0, const char* p1) { return _i(0x2B51EDBEFC301339, p0, p1); } + static bool network_clan_animation(const char* animDict, const char* animName) { return _i(0x729E3401F0430686, animDict, animName); } + static bool network_clan_download_membership(int* network_handle) { return _i(0xA989044E70010ABE, network_handle); } + static bool network_clan_download_membership_pending(Any* p0) { return _i(0x5B9E023DC6EBEDC0, p0); } + static bool _0x5835D9CD92E83184(Any* p0, Any* p1) { return _i(0x5835D9CD92E83184, p0, p1); } + static int get_num_membership_desc() { return _i(0x1F471B79ACC90BEF); } + static bool network_clan_get_membership(int* p0, int* clanMembership, int p2) { return _i(0xC8BC2011F67B3411, p0, clanMembership, p2); } + static int network_clan_get_membership_count(int* p0) { return _i(0xAAB11F6C4ADBC2C1, p0); } + static bool network_clan_get_membership_desc(int* memberDesc, int p1) { return _i(0x48DE78AF2C8885B8, memberDesc, p1); } + static bool network_clan_get_membership_valid(int* p0, Any p1) { return _i(0x48A59CF88D43DF0E, p0, p1); } + static Void _0xF45352426FF3A4F0(int* clanDesc, int bufferSize, int* network_handle) { return _i(0xF45352426FF3A4F0, clanDesc, bufferSize, network_handle); } + static Any _0xC32EA7A2F6CA7557() { return _i(0xC32EA7A2F6CA7557); } + static bool _0xA134777FF7F33331(Any p0, Any* p1) { return _i(0xA134777FF7F33331, p0, p1); } + static bool _0x7543BB439F63792B(int* clanDesc, int bufferSize) { return _i(0x7543BB439F63792B, clanDesc, bufferSize); } + static bool network_clan_join(int clanDesc) { return _i(0x9FAAA4F4FC71F87F, clanDesc); } + static bool network_clan_player_get_desc(int* clanDesc, int bufferSize, int* network_handle) { return _i(0xEEE6EACBE8874FBA, clanDesc, bufferSize, network_handle); } + static bool network_clan_player_is_active(int* network_handle) { return _i(0xB124B57F571D8F18, network_handle); } + static Void _0x113E6E3E50E286B0(Any p0) { return _i(0x113E6E3E50E286B0, p0); } + static bool network_clan_remote_memberships_are_in_cache(int* p0) { return _i(0xBB6E6FEE99D866B2, p0); } + static bool _0x13518FF1C6B28938(Any p0) { return _i(0x13518FF1C6B28938, p0); } + static bool network_player_is_in_clan() { return _i(0x579CCED0265D4896); } + static Void network_clear_clock_time_override() { return _i(0xD972DF67326F966E); } + static Void network_clear_followers() { return _i(0x058F43EC59A8631A); } + static Any network_clear_follow_invite() { return _i(0x439BFDE3CD0610F6); } + static Void network_clear_found_gamers() { return _i(0x6D14CCEE1B40381A); } + static Void clear_gamer_task_data() { return _i(0x86E0660E4F5C956D); } + static Void _0x1888694923EF4591() { return _i(0x1888694923EF4591); } + static Void _0x140E6A44870A11CE() { return _i(0x140E6A44870A11CE); } + static Void network_clear_property_id() { return _i(0xC2B82527CA77053E); } + static Void _0x6CE50E47F5543D0C() { return _i(0x6CE50E47F5543D0C); } + static Void network_clear_transition_creator_handle() { return _i(0xFB3272229A82C759); } + static Void network_clear_voice_channel() { return _i(0xE036A705F989E049); } + static Void _0xF03755696450470C() { return _i(0xF03755696450470C); } + static Void network_close_transition_matchmaking() { return _i(0x43F4DBA69710E01E); } + static Void _0x1632BE0AC1E62876(Any p0, Any p1) { return _i(0x1632BE0AC1E62876, p0, p1); } + static Void _0xBBDF066252829606(Any p0, bool p1, Any p2) { return _i(0xBBDF066252829606, p0, p1, p2); } + static int network_create_synchronised_scene(float x, float y, float z, float xRot, float yRot, float zRot, int p6, int p7, int p8, float p9, Any p10, float p11) { return _i(0x7CD6BC4C2BBDD526, x, y, z, xRot, yRot, zRot, p6, p7, p8, p9, p10, p11); } + static Any _0xF9B83B77929D8863() { return _i(0xF9B83B77929D8863); } + static Any _0x5AE17C6B0134B7F1() { return _i(0x5AE17C6B0134B7F1); } + static Void network_disable_invincible_flashing(int player, bool p1) { return _i(0x9DD368BF06983221, player, p1); } + static Void _0xC505036A35AFD01B(bool p0) { return _i(0xC505036A35AFD01B, p0); } + static Void _0x407091CF6037118E(int netID) { return _i(0x407091CF6037118E, netID); } + static Void _0xCA575C391FEA25CC(Any p0) { return _i(0xCA575C391FEA25CC, p0); } + static bool network_does_network_id_exist(int netID) { return _i(0x38CE16C96BD11344, netID); } + static bool network_does_entity_exist_with_network_id(Entity entity) { return _i(0x18A47D074708FD68, entity); } + static bool network_does_tunable_exist(const char* tunableContext, const char* tunableName) { return _i(0x85E5F8B9B898B20A, tunableContext, tunableName); } + static bool network_does_tunable_exist_hash(uint32_t tunbaleContext, uint32_t tunableName) { return _i(0xE4E53E1419D81127, tunbaleContext, tunableName); } + static bool network_do_transition_quickmatch(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0x71FB0EBCD4915D56, p0, p1, p2, p3, p4, p5); } + static bool network_do_transition_quickmatch_async(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0xA091A5E44F0072E5, p0, p1, p2, p3, p4, p5); } + static bool network_do_transition_quickmatch_with_group(Any p0, Any p1, Any p2, Any p3, Any* p4, Any p5, Any p6, Any p7) { return _i(0x9C4AB58491FDC98A, p0, p1, p2, p3, p4, p5, p6, p7); } + static bool network_do_transition_to_freemode(Any* p0, Any p1, bool p2, int players, bool p4) { return _i(0x3AAD8B2FCA1E289F, p0, p1, p2, players, p4); } + static bool network_do_transition_to_game(bool p0, int maxPlayers) { return _i(0x3E9BB38102A589B0, p0, maxPlayers); } + static bool network_do_transition_to_new_freemode(Any* p0, Any p1, int players, bool p3, bool p4, bool p5) { return _i(0x9E80A5BA8109F974, p0, p1, players, p3, p4, p5); } + static bool network_do_transition_to_new_game(bool p0, int maxPlayers, bool p2) { return _i(0x4665F51EFED00034, p0, maxPlayers, p2); } + static Void _0xE6717E652B8C8D8A(Any p0, Any p1) { return _i(0xE6717E652B8C8D8A, p0, p1); } + static Void _0x5E3AA4CA2B6FB0EE(Any p0) { return _i(0x5E3AA4CA2B6FB0EE, p0); } + static Void network_end_tutorial_session() { return _i(0xD0AFAFF5A51D72F7); } + static bool _0xE64A3CA08DFA37A9(Any p0) { return _i(0xE64A3CA08DFA37A9, p0); } + static bool _0x4DF7CFFF471A7FB1(Any p0) { return _i(0x4DF7CFFF471A7FB1, p0); } + static bool _0x4A2D4E8BF4265B0F(Any p0) { return _i(0x4A2D4E8BF4265B0F, p0); } + static Any _0x815F18AD865F057F(Any p0) { return _i(0x815F18AD865F057F, p0); } + static Void _0x2A5E0621DD815A9A(Any p0, Any p1, Any p2, Any p3) { return _i(0x2A5E0621DD815A9A, p0, p1, p2, p3); } + static Any network_explode_vehicle(Vehicle vehicle, bool isAudible, bool isInvisible, bool p3) { return _i(0x301A42153C9AD707, vehicle, isAudible, isInvisible, p3); } + static Void network_fade_in_entity(Entity entity, bool state, Any p2) { return _i(0x1F4ED342ACEFE62D, entity, state, p2); } + static Void network_fade_out_entity(Entity entity, bool normal, bool slow) { return _i(0xDE564951F95E09ED, entity, normal, slow); } + static bool network_x_affects_gamers(Any p0) { return _i(0xE532D6811B3A4D2A, p0); } + static Any _0xFB1F9381E80FA13F(int p0, Any p1) { return _i(0xFB1F9381E80FA13F, p0, p1); } + static bool network_find_matched_gamers(Any p0, float p1, float p2, float p3) { return _i(0xF7B2CFDE5C9F700D, p0, p1, p2, p3); } + static Void _0x64F62AFB081E260D() { return _i(0x64F62AFB081E260D); } + static Void _0xB7C7F6AD6424304B() { return _i(0xB7C7F6AD6424304B); } + static Void _0xC9B43A33D09CADA7(Any p0) { return _i(0xC9B43A33D09CADA7, p0); } + static bool network_gamertag_from_handle_pending() { return _i(0xB071E27958EF4CF0); } + static bool network_gamertag_from_handle_start(int* network_handle) { return _i(0x9F0C0A981D73FA56, network_handle); } + static bool network_gamertag_from_handle_succeeded() { return _i(0xFD00798DBA7523DD); } + static bool network_gamer_has_headset(Any* p0) { return _i(0xF2FD55CB574BCC55, p0); } + static int network_get_activity_player_num(bool p0) { return _i(0x73E2B500410DA5A2, p0); } + static Any _0x9614B71F8ADB982B() { return _i(0x9614B71F8ADB982B); } + static bool network_get_desroyer_of_entity(Any p0, Any p1, uint32_t* p2) { return _i(0x4CACA84440FA26F6, p0, p1, p2); } + static Any _0x83660B734994124D(Any p0, Any p1, Any p2) { return _i(0x83660B734994124D, p0, p1, p2); } + static Any _0x350C23949E43686C() { return _i(0x350C23949E43686C); } + static Any _0xD414BE129BB81B32() { return _i(0xD414BE129BB81B32); } + static Any _0x0E3A041ED6AC2B45() { return _i(0x0E3A041ED6AC2B45); } + static Any _0x7DB53B37A2F211A0() { return _i(0x7DB53B37A2F211A0); } + static int get_tunables_content_modifier_id(uint32_t contentHash) { return _i(0x187382F8A3E0A6C3, contentHash); } + static bool network_get_currently_selected_gamer_handle_from_invite_menu(Any* p0) { return _i(0x74881E6BCAE2327C, p0); } + static Any _0xC434133D9BA52777(Any p0, Any p1) { return _i(0xC434133D9BA52777, p0, p1); } + static int network_get_destroyer_of_network_id(int netId, uint32_t* weaponHash) { return _i(0x7A1ADEEF01740A24, netId, weaponHash); } + static Entity network_get_entity_from_network_id(int netId) { return _i(0xCE4E5D9B0A4FF560, netId); } + static Vehicle net_to_veh(int netHandle) { return _i(0x367B936610BA360C, netHandle); } + static Ped net_to_ped(int netHandle) { return _i(0xBDCD95FC216A8B3E, netHandle); } + static Object net_to_obj(int netHandle) { return _i(0xD8515F5FEA14CB3F, netHandle); } + static Entity net_to_ent(int netHandle) { return _i(0xBFFEAB45A9A9094A, netHandle); } + static Any _0x37D5F739FD494675(Any p0) { return _i(0x37D5F739FD494675, p0); } + static bool network_get_entity_is_local(Entity entity) { return _i(0x0991549DE4D64762, entity); } + static bool network_get_entity_is_networked(Entity entity) { return _i(0xC7827959479DCC78, entity); } + static Entity network_get_entity_killer_of_player(Player player, uint32_t* weaponHash) { return _i(0x42B2DAA6B596F5F8, player, weaponHash); } + static bool network_get_found_gamer(Any* p0, Any p1) { return _i(0x9DCFF2AFB68B3476, p0, p1); } + static int network_get_friend_count() { return _i(0x203F1CFD823B27A4); } + static const char* network_get_friend_name(Player player) { return _i(0xE11EBBB2A783FE8B, player); } + static const char* network_get_friend_name_from_index(int friendIndex) { return _i(0x4164F227D052E293, friendIndex); } + static const char* network_get_gamertag_from_handle(int* network_handle) { return _i(0x426141162EBE5CDB, network_handle); } + static Any _0x2CC848A861D01493() { return _i(0x2CC848A861D01493); } + static bool _0x02A8BEC6FD9AF660(Any* p0, Any p1) { return _i(0x02A8BEC6FD9AF660, p0, p1); } + static Void network_get_server_time(int* hours, int* minutes, int* seconds) { return _i(0x6D03BFBD643B2A02, hours, minutes, seconds); } + static Any _0x52C1EADAF7B10302() { return _i(0x52C1EADAF7B10302); } + static int network_get_host_of_script(const char* scriptName, int p1, int p2) { return _i(0x1D6A14F1F9A736FC, scriptName, p1, p2); } + static Any network_get_host_of_this_script() { return _i(0xC7B4D79B01FA7A5C); } + static Any _0x638A3A81733086DB() { return _i(0x638A3A81733086DB); } + static Any _0x3855FB5EB2C5E8B2(Any p0) { return _i(0x3855FB5EB2C5E8B2, p0); } + static Any _0x2DA41ED6E1FCD7A5(Any p0, Any p1) { return _i(0x2DA41ED6E1FCD7A5, p0, p1); } + static math::vector3 _0x64D779659BC37B19(Any p0) { return _i>(0x64D779659BC37B19, p0); } + static math::vector3 _0x125E6D638B8605D4(Any p0) { return _i>(0x125E6D638B8605D4, p0); } + static math::vector3 _0x33DE49EDF4DDE77A(Any p0) { return _i>(0x33DE49EDF4DDE77A, p0); } + static Void network_get_local_handle(int* network_handle, int bufferSize) { return _i(0xE86051786B66CD8E, network_handle, bufferSize); } + static int network_unlink_networked_synchronised_scene(int netScene) { return _i(0x02C40BF885C567B6, netScene); } + static int network_get_max_friends() { return _i(0xAFEBB0D5D8F687D2); } + static int network_get_num_participants_host() { return _i(0xA6C90FBC38E395EE); } + static Void _0xADB57E5B663CCA8B(Player p0, float* p1, float* p2) { return _i(0xADB57E5B663CCA8B, p0, p1, p2); } + static Any _0xD38C4A6D047C019D() { return _i(0xD38C4A6D047C019D); } + static int network_get_num_connected_players() { return _i(0xA4A79DD2D9600654); } + static int network_get_num_found_gamers() { return _i(0xA1B043EE79A916FB); } + static int network_get_num_participants() { return _i(0x18D0456E86604654); } + static int network_get_num_presence_invites() { return _i(0xCEFA968912D0F78D); } + static int network_get_num_script_participants(Any* p0, Any p1, Any p2) { return _i(0x3658E8CD94FC121A, p0, p1, p2); } + static Any _0x617F49C2668E6155() { return _i(0x617F49C2668E6155); } + static Any _0xFF8FCF9FFC458A1C() { return _i(0xFF8FCF9FFC458A1C); } + static int network_get_participant_index(int index) { return _i(0x1B84DF6AF2A46938, index); } + static Any _0x120364DE2845DAF8(Any* p0, Any p1) { return _i(0x120364DE2845DAF8, p0, p1); } + static Any _0x01ABCE5E7CBDA196() { return _i(0x01ABCE5E7CBDA196); } + static Player network_get_player_from_gamer_handle(int* network_handle) { return _i(0xCE5F689CF5A0A49D, network_handle); } + static int network_get_player_index(Player player) { return _i(0x24FB80D107371267, player); } + static Player network_get_player_index_from_ped(Ped ped) { return _i(0x6C0E2E0125610278, ped); } + static float network_get_player_loudness(Any p0) { return _i(0x21A1684A25C2867F, p0); } + static bool _0x82377B65E943F72D(Any p0) { return _i(0x82377B65E943F72D, p0); } + static Any _0x3B39236746714134(Any p0) { return _i(0x3B39236746714134, p0); } + static Any _0xAA5FAFCD2C5F5E47() { return _i(0xAA5FAFCD2C5F5E47); } + static Any _0x24409FC4C55CB22D(Any p0) { return _i(0x24409FC4C55CB22D, p0); } + static bool _0x3DBF2DF0AEB7D289(Any p0) { return _i(0x3DBF2DF0AEB7D289, p0); } + static bool network_get_presence_invite_handle(Any p0, Any* p1) { return _i(0x38D5B0FEBB086F75, p0, p1); } + static Any network_get_presence_invite_id(Any p0) { return _i(0xDFF09646E12EC386, p0); } + static Any _0x742B58F723233ED9(Any p0) { return _i(0x742B58F723233ED9, p0); } + static Any network_get_presence_invite_inviter(Any p0) { return _i(0x4962CC4AA2F345B7, p0); } + static bool _0x8806CEBFABD3CE05(Any p0) { return _i(0x8806CEBFABD3CE05, p0); } + static Any _0x728C4CC7920CD102(Any p0) { return _i(0x728C4CC7920CD102, p0); } + static Any _0xD39B3FFF8FFDD5BF(Any p0) { return _i(0xD39B3FFF8FFDD5BF, p0); } + static Any network_get_presence_invite_session_id(Any p0) { return _i(0x26E1CD96B0903D60, p0); } + static Void network_get_primary_clan_data_cancel() { return _i(0x042E4B70B93E6054); } + static Any network_get_primary_clan_data_clear() { return _i(0x9AA46BADAD0E27ED); } + static bool network_get_primary_clan_data_new(Any* p0, Any* p1) { return _i(0xC080FF658B2E41DA, p0, p1); } + static Any network_get_primary_clan_data_pending() { return _i(0xB5074DB804E28CE7); } + static bool network_get_primary_clan_data_start(Any* p0, Any p1) { return _i(0xCE86D8191B762107, p0, p1); } + static Any network_get_primary_clan_data_success() { return _i(0x5B4F04F19376A0BA); } + static int network_get_random_int() { return _i(0x599E4FA1F87EB5FF); } + static int network_get_random_int_in_range(int rangeStart, int rangeEnd) { return _i(0xE30CF56F1EFA5F43, rangeStart, rangeEnd); } + static Void network_get_respawn_result(int randomInt, math::vector3* coordinates, float* heading) { return _i(0x371EA43692861CF1, randomInt, coordinates, heading); } + static Any _0x6C34F1208B8923FD(Any p0) { return _i(0x6C34F1208B8923FD, p0); } + static int network_get_script_status() { return _i(0x57D158647A6BFABF); } + static Any network_get_talker_proximity() { return _i(0x84F0F13120B4E098); } + static bool network_get_this_script_is_network_script() { return _i(0x2910669969E9535E); } + static int network_get_timeout_time() { return _i(0x5ED0356A0CE3A34F); } + static int _0xCF61D4B4702EE9EB() { return _i(0xCF61D4B4702EE9EB); } + static bool network_get_transition_host(int* network_handle) { return _i(0x65042B9774C4435E, network_handle); } + static Any network_get_transition_members(Any* p0, Any p1) { return _i(0x73B000F7FBC55829, p0, p1); } + static Any _0x10BD227A753B0D84() { return _i(0x10BD227A753B0D84); } + static Any _0x3765C3A3E8192E10() { return _i(0x3765C3A3E8192E10); } + static Void network_handle_from_friend(Player friendIndex, int* network_handle, int bufferSize) { return _i(0xD45CB817D7E177D2, friendIndex, network_handle, bufferSize); } + static Void network_handle_from_member_id(const char* memberId, int* network_handle, int bufferSize) { return _i(0xA0FD21BED61E5C4C, memberId, network_handle, bufferSize); } + static Void network_handle_from_player(Player player, int* network_handle, int bufferSize) { return _i(0x388EB2B86C73B6B3, player, network_handle, bufferSize); } + static Void network_handle_from_user_id(const char* userId, int* network_handle, int bufferSize) { return _i(0xDCD51DD8F87AEC5C, userId, network_handle, bufferSize); } + static uint32_t network_hash_from_gamer_handle(int* network_handle) { return _i(0x58575AC3CF2CA8EC, network_handle); } + static uint32_t network_hash_from_player_handle(Player player) { return _i(0xBC1D768F2F5D6C05, player); } + static bool _0x1353F87E89946207() { return _i(0x1353F87E89946207); } + static Any _0x26F07DD83A5F7F98() { return _i(0x26F07DD83A5F7F98); } + static bool _0x2E0BF682CC778D49(Any p0) { return _i(0x2E0BF682CC778D49, p0); } + static bool _0x237D5336A9A54108(Any p0) { return _i(0x237D5336A9A54108, p0); } + static Any _0xC42DD763159F3461() { return _i(0xC42DD763159F3461); } + static bool network_has_control_of_door(int doorID) { return _i(0xCB3C68ADB06195DF, doorID); } + static bool network_has_control_of_entity(Entity entity) { return _i(0x01BF60A500E28887, entity); } + static bool network_has_control_of_network_id(int netId) { return _i(0x4D36070FE0215186, netId); } + static bool network_has_control_of_pickup(Pickup pickup) { return _i(0x5BC9495F0B3B6FA6, pickup); } + static bool _0xB07D3185E11657A5(Entity p0) { return _i(0xB07D3185E11657A5, p0); } + static bool network_has_follow_invite() { return _i(0x76D9B976C4C09FDE); } + static bool network_has_headset() { return _i(0xE870F9F1F7B4F1FA); } + static bool network_has_invited_gamer(Any* p0) { return _i(0x4D86CD31E8976ECE, p0); } + static bool network_has_invited_gamer_to_transition(Any* p0) { return _i(0x7284A47B3540E6CF, p0); } + static Any _0x71DC455F5CD1C2B1(Any p0) { return _i(0x71DC455F5CD1C2B1, p0); } + static bool network_has_pending_invite() { return _i(0xAC8C7B9B88C4A668); } + static bool network_has_player_started_transition(Player player) { return _i(0x9AC9CCBFA8C29795, player); } + static bool _0x5D10B3795F3FC886() { return _i(0x5D10B3795F3FC886); } + static bool network_has_ros_privilege(int p0) { return _i(0xA699957E60D80214, p0); } + static bool _0xC22912B1D85F26B1(Any p0, Any* p1, Any* p2) { return _i(0xC22912B1D85F26B1, p0, p1, p2); } + static Any _0x593570C289A77688() { return _i(0x593570C289A77688); } + static Any _0x91B87C55093DE351() { return _i(0x91B87C55093DE351); } + static bool _0x67A5589628E0CFF6() { return _i(0x67A5589628E0CFF6); } + static Any _0x76BF03FADBF154F5() { return _i(0x76BF03FADBF154F5); } + static bool _0x3F9990BF5F22759C(Any* p0) { return _i(0x3F9990BF5F22759C, p0); } + static bool network_are_ros_available() { return _i(0x85443FF4C328F53B); } + static bool _0xB57A49545BA53CE7(Any* p0) { return _i(0xB57A49545BA53CE7, p0); } + static bool _0xCCA4318E1AB03F1F(Any* p0) { return _i(0xCCA4318E1AB03F1F, p0); } + static bool _0x07DD29D5E22763F1(Any* p0) { return _i(0x07DD29D5E22763F1, p0); } + static bool _0xAEEF48CDF5B6CE7C(Any p0, Any p1) { return _i(0xAEEF48CDF5B6CE7C, p0, p1); } + static bool network_have_online_privileges() { return _i(0x25CB5A9F37BFD063); } + static Any _0x5EA784D197556507() { return _i(0x5EA784D197556507); } + static bool is_rockstar_banned() { return _i(0x8020A73847E0CA7D); } + static bool is_socialclub_banned() { return _i(0xA0AD7E2AF5349F61); } + static Any _0x422D396F80A96547() { return _i(0x422D396F80A96547); } + static bool can_play_online() { return _i(0x5F91D5D0B36AA310); } + static Any _0x606E4D3E3CCCF3EB() { return _i(0x606E4D3E3CCCF3EB); } + static Any _0x66B59CFFD78467AF() { return _i(0x66B59CFFD78467AF); } + static bool _0x72D918C99BCACC54(Any p0) { return _i(0x72D918C99BCACC54, p0); } + static Void _0xFAC18E7356BD3210() { return _i(0xFAC18E7356BD3210); } + static Any network_host_transition(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9) { return _i(0xA60BB5CE242BB254, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void _0x4C2A9FDC22377075() { return _i(0x4C2A9FDC22377075); } + static bool network_invite_gamers(Any* p0, Any p1, Any* p2, Any* p3) { return _i(0x9D80CD1D0E6327DE, p0, p1, p2, p3); } + static bool network_invite_gamers_to_transition(Any* p0, Any p1) { return _i(0x4A595C32F77DFF76, p0, p1); } + static bool network_is_activity_session() { return _i(0x05095437424397FA); } + static Any network_is_activity_spectator() { return _i(0x12103B9E0C9F92FB); } + static bool network_is_activity_spectator_from_handle(int* network_handle) { return _i(0x2763BBAA72A7BCB9, network_handle); } + static Any network_is_adding_friend() { return _i(0x6EA101606F6E4D81); } + static Any _0x2E4C123D1C8A710E(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x2E4C123D1C8A710E, p0, p1, p2, p3, p4, p5, p6); } + static bool network_is_cable_connected() { return _i(0xEFFB25453D8600F9); } + static bool network_is_chatting_in_platform_party(int* network_handle) { return _i(0x8DE9945BCC9AEC52, network_handle); } + static bool network_is_clock_time_overridden() { return _i(0xD7C95D322FF57522); } + static bool network_is_cloud_available() { return _i(0x9A4CF4F48AD77302); } + static bool has_bg_script_been_downloaded() { return _i(0x8132C0EB8B2B3293); } + static Any _0x16D3D49902F697BB() { return _i(0x16D3D49902F697BB); } + static bool network_has_control_of_pavement_stats(uint32_t hash) { return _i(0xC01E93FAC20C3346, hash); } + static Any _0x71302EC70689052A(Any p0) { return _i(0x71302EC70689052A, p0); } + static bool _0x422F32CC7E56ABAD(Any p0) { return _i(0x422F32CC7E56ABAD, p0); } + static bool network_is_finding_gamers() { return _i(0xDDDF64C91BFCF0AA); } + static bool network_is_friend(int* network_handle) { return _i(0x1A24A179F9B31654, network_handle); } + static bool network_is_friend_online2(int* network_handle) { return _i(0x87EB7A3FFCB314DB, network_handle); } + static bool network_is_friend_index_online(int friendIndex) { return _i(0xBAD8F2A42B844821, friendIndex); } + static bool network_is_friend_in_multiplayer(const char* friendName) { return _i(0x57005C18827F3A28, friendName); } + static bool network_is_friend_in_same_title(const char* friendName) { return _i(0x2EA9A3BEDF3F17B8, friendName); } + static bool network_is_friend_online(const char* name) { return _i(0x425A44533437B64D, name); } + static bool network_is_gamer_blocked_by_me(Any* p0) { return _i(0xE944C4F5AF1B5883, p0); } + static bool network_is_gamer_in_my_session(int* network_handle) { return _i(0x0F10B05DDF8D16E9, network_handle); } + static bool network_is_gamer_muted_by_me(int* p0) { return _i(0xCE60DE011B6C7978, p0); } + static bool network_is_gamer_talking(int* p0) { return _i(0x71C33B22606CD88A, p0); } + static bool network_is_game_in_progress() { return _i(0x10FAB35428CCC9D7); } + static Any _0x94A8394D150B013A() { return _i(0x94A8394D150B013A); } + static bool network_is_handle_valid(int* network_handle, int bufferSize) { return _i(0x6F79B93B0A8E4133, network_handle, bufferSize); } + static bool network_is_host() { return _i(0x8DB296B814EDDA07); } + static bool network_is_host_of_this_script() { return _i(0x83CD99A1E6061AB5); } + static bool network_is_inactive_profile(Any* p0) { return _i(0x7E58745504313A2E, p0); } + static bool network_is_in_mp_cutscene() { return _i(0x6CC27C9FA2040220); } + static Any _0x2FC5650B0271CB57() { return _i(0x2FC5650B0271CB57); } + static Any _0xFD8B834A8BA05048() { return _i(0xFD8B834A8BA05048); } + static bool network_is_session_active() { return _i(0xD83C2B94E7508980); } + static bool network_is_in_session() { return _i(0xCA97246103B63917); } + static bool network_is_in_spectator_mode() { return _i(0x048746E388762E11); } + static bool network_is_in_transition() { return _i(0x68049AEFF83D8F0A); } + static Any network_is_in_tutorial_session() { return _i(0xADA24309FE08DACF); } + static bool network_is_local_player_invincible() { return _i(0x8A8694B48715B000); } + static bool network_is_multiplayer_disabled() { return _i(0x9747292807126EDA); } + static Any _0x7242F8B741CE1086(Any p0) { return _i(0x7242F8B741CE1086, p0); } + static Any _0x74698374C45701D2() { return _i(0x74698374C45701D2); } + static bool network_is_participant_active(int p0) { return _i(0x6FF8FF40B6357D45, p0); } + static Any _0xA8ACB6459542A8C8() { return _i(0xA8ACB6459542A8C8); } + static bool network_is_player_active(Player player) { return _i(0xB8DFD30D6973E135, player); } + static bool network_is_player_a_participant(Any p0) { return _i(0x3CA58F6CB7CBD784, p0); } + static bool _0x1AD5B71586B94820(Player p0, Any* p1, Any p2) { return _i(0x1AD5B71586B94820, p0, p1, p2); } + static bool network_is_player_blocked_by_me(Player player) { return _i(0x57AF1F8E27483721, player); } + static bool _0x919B3C98ED8292F9(Any p0) { return _i(0x919B3C98ED8292F9, p0); } + static bool network_is_player_connected(Player player) { return _i(0x93DC1BE4E1ABE9D1, player); } + static bool _0x631DC5DFF4B110E3(Any p0) { return _i(0x631DC5DFF4B110E3, p0); } + static bool network_is_player_in_mp_cutscene(Player player) { return _i(0x63F9EE203C3619F2, player); } + static bool network_is_player_muted_by_me(Player player) { return _i(0x8C71288AE68EDE39, player); } + static bool network_is_player_talking(Player player) { return _i(0x031E11F3D447647E, player); } + static Any _0xC0D2AF00BCC234CA() { return _i(0xC0D2AF00BCC234CA); } + static Any _0x14922ED3E38761F0() { return _i(0x14922ED3E38761F0); } + static bool _0x8D11E61A4ABF49CC() { return _i(0x8D11E61A4ABF49CC); } + static bool network_is_script_active(const char* scriptName, Any p1, bool p2, Any p3) { return _i(0x9D40DF90FAD26098, scriptName, p1, p2, p3); } + static bool network_is_session_busy() { return _i(0xF4435D66A8E2905E); } + static bool network_is_session_started() { return _i(0x9DE624D2FC4B603F); } + static bool network_is_signed_in() { return _i(0x054354A99211EB96); } + static Any network_is_transition_busy() { return _i(0x520F3282A53D26B7); } + static Any _0x0DBD5D7E3C5BEC3B() { return _i(0x0DBD5D7E3C5BEC3B); } + static Any _0x6512765E3BE78C50() { return _i(0x6512765E3BE78C50); } + static Any network_is_transition_host() { return _i(0x0B824797C9BF2159); } + static bool network_is_transition_host_from_handle(int* network_handle) { return _i(0x6B5C83BA3EFE6A10, network_handle); } + static Any _0xC571D0E77D8BBC29() { return _i(0xC571D0E77D8BBC29); } + static Any network_is_transition_matchmaking() { return _i(0x292564C735375EDF); } + static Any _0x37A4494483B9F5C9() { return _i(0x37A4494483B9F5C9); } + static bool _0x5A6AA44FF8E931E6() { return _i(0x5A6AA44FF8E931E6); } + static bool _0x5DC577201723960A() { return _i(0x5DC577201723960A); } + static bool network_is_transition_started() { return _i(0x53FA83401D9C07FE); } + static Any network_is_transition_to_game() { return _i(0x9D7696D8F4FA6CB7); } + static Any _0xD0A484CB2F829FBE() { return _i(0xD0A484CB2F829FBE); } + static bool has_tunables_been_downloaded() { return _i(0x0467C11ED88B7D28); } + static Any _0x35F0B98A8387274D() { return _i(0x35F0B98A8387274D); } + static Any network_join_group_activity() { return _i(0xA06509A691D12BE4); } + static Any _0x59DF79317F85A7E0() { return _i(0x59DF79317F85A7E0); } + static Any _0xFFE1E5B792D92B34() { return _i(0xFFE1E5B792D92B34); } + static bool network_join_transition(Player player) { return _i(0x9D060B08CD63321A, player); } + static Any network_launch_transition() { return _i(0x2DCF46CB1A4F0884); } + static Void _0xBF22E0F32968E967(Player player, bool p1) { return _i(0xBF22E0F32968E967, player, p1); } + static Void network_respawn_coords(Player player, float x, float y, float z, bool p4, bool p5) { return _i(0x9769F811D1785B03, player, x, y, z, p4, p5); } + static Any network_leave_transition() { return _i(0xD23A1A815D21DB19); } + static Void _0x261E97AD7BCF3D40(bool p0) { return _i(0x261E97AD7BCF3D40, p0); } + static Void _0x39917E1B4CB0F911(bool p0) { return _i(0x39917E1B4CB0F911, p0); } + static bool network_mark_transition_gamer_as_fully_joined(Any* p0) { return _i(0x5728BB6D63E3FF1D, p0); } + static const char* network_member_id_from_gamer_handle(int* network_handle) { return _i(0xC82630132081BB6F, network_handle); } + static Any _0x53C10C8BD774F2C9() { return _i(0x53C10C8BD774F2C9); } + static Void _0x283B6062A2C01E9B() { return _i(0x283B6062A2C01E9B); } + static Void network_open_transition_matchmaking() { return _i(0x2B3A8F7CA3A38FDE); } + static Void network_override_chat_restrictions(Player player, bool toggle) { return _i(0x3039AE5AD2C9C0C4, player, toggle); } + static Void network_override_clock_time(int Hours, int Minutes, int Seconds) { return _i(0xE679E3E06E363892, Hours, Minutes, Seconds); } + static Void _0xA7E30DE9272B6D49(Ped ped, float x, float y, float z, float p4) { return _i(0xA7E30DE9272B6D49, ped, x, y, z, p4); } + static Void network_override_receive_restrictions(Player player, bool toggle) { return _i(0xDDF73E2B1FEC5AB4, player, toggle); } + static Void _0x0FF2862B61A58AF9(bool p0) { return _i(0x0FF2862B61A58AF9, p0); } + static Void network_override_send_restrictions(Player player, bool toggle) { return _i(0x97DD4C5944CC2E6A, player, toggle); } + static Void network_chat_mute(bool p0) { return _i(0x57B192B4D4AD23D5, p0); } + static Void _0x6F697A66CE78674E(int team, bool toggle) { return _i(0x6F697A66CE78674E, team, toggle); } + static Void network_override_transition_chat(bool p0) { return _i(0xAF66059A131AA269, p0); } + static Any _0x172F75B6EE2233BA() { return _i(0x172F75B6EE2233BA); } + static const char* network_player_get_name(Player player) { return _i(0x7718D2E2060837D2, player); } + static const char* network_player_get_userid(Player player, char* buffer) { return _i(0x4927FC39CD0869A0, player, buffer); } + static bool network_player_has_headset(Player player) { return _i(0x3FB99A8B08D18FD6, player); } + static bool _0x565E430DB3B05BEC(Any p0) { return _i(0x565E430DB3B05BEC, p0); } + static bool network_player_is_badsport() { return _i(0x19D8DA0E5A68045A); } + static bool network_player_is_cheater() { return _i(0x655B91F1495A9090); } + static bool network_player_is_rockstar_dev(Player player) { return _i(0x544ABDDA3B409B6D, player); } + static Void _0x2302C0264EA58D31() { return _i(0x2302C0264EA58D31); } + static Any _0x3C891A251567DFCE(Any* p0) { return _i(0x3C891A251567DFCE, p0); } + static bool network_get_gamer_status(Any* p0) { return _i(0x85A0EF54A500882C, p0); } + static Void _0x45A83257ED02D9BC() { return _i(0x45A83257ED02D9BC); } + static Void network_register_entity_as_networked(Entity entity) { return _i(0x06FAACD625D80CAA, entity); } + static Void network_register_host_broadcast_variables(int* vars, int numVars) { return _i(0x3E9B2F01C50DF595, vars, numVars); } + static Void network_register_player_broadcast_variables(int* vars, int numVars) { return _i(0x3364AA97340CA215, vars, numVars); } + static Void _0xCFEB46DCD7D8D5EB(bool p0) { return _i(0xCFEB46DCD7D8D5EB, p0); } + static Void _0x25D990F8E0E3F13C() { return _i(0x25D990F8E0E3F13C); } + static Void network_remove_all_transition_invite() { return _i(0x726E0375C7A26368); } + static Void _0xEBF8284D8CADEB53() { return _i(0xEBF8284D8CADEB53); } + static Void _0xF083835B70BA9BFE() { return _i(0xF083835B70BA9BFE); } + static bool network_remove_entity_area(Any p0) { return _i(0x93CF869BAA0C4874, p0); } + static bool network_remove_presence_invite(Any p0) { return _i(0xF0210268DB0974B1, p0); } + static Void network_remove_transition_invite(Any* p0) { return _i(0x7524B431B2E6F7EE, p0); } + static Any _0x5626D9D6810730D5() { return _i(0x5626D9D6810730D5); } + static bool network_request_cloud_background_scripts() { return _i(0x924426BFFD82E915); } + static Void network_request_cloud_tunables() { return _i(0x42FB3B532D526E6C); } + static bool network_request_control_of_door(int doorID) { return _i(0x870DDFD5A4A796E4, doorID); } + static bool network_request_control_of_entity(Entity entity) { return _i(0xB69317BF5E782347, entity); } + static bool network_request_control_of_network_id(int netId) { return _i(0xA670B3662FAFFBD0, netId); } + static Any _0x62A0296C1BB1CEB3() { return _i(0x62A0296C1BB1CEB3); } + static Void _0x741A3D8380319A81() { return _i(0x741A3D8380319A81); } + static Void network_reset_body_tracker() { return _i(0x72433699B4E6DD64); } + static Void network_resurrect_local_player(float x, float y, float z, float heading, bool unk, bool changetime, Any p6) { return _i(0xEA23C49EAA83ACFB, x, y, z, heading, unk, changetime, p6); } + static Void _0xB13E88E655E5A3BC() { return _i(0xB13E88E655E5A3BC); } + static Void _0xF1B84178F8674195(Any p0) { return _i(0xF1B84178F8674195, p0); } + static bool _0x1171A97A3D3981B6(Any* p0, Any* p1, Any p2, Any p3) { return _i(0x1171A97A3D3981B6, p0, p1, p2, p3); } + static bool network_send_presence_invite(int* network_handle, const char* p1, Any p2, Any p3) { return _i(0xC3C7A6AFDB244624, network_handle, p1, p2, p3); } + static Void _0xFA2888E3833C8E96() { return _i(0xFA2888E3833C8E96); } + static bool network_send_text_message(const char* message, int* network_handle) { return _i(0x3A214F2EC889B100, message, network_handle); } + static bool network_send_transition_gamer_instruction(int* network_handle, const char* p1, int p2, int p3, bool p4) { return _i(0x31D1D2B858D25E6B, network_handle, p1, p2, p3, p4); } + static bool network_send_presence_transition_invite(Any* p0, const char* p1, Any p2, Any p3) { return _i(0xC116FF9B4D488291, p0, p1, p2, p3); } + static bool network_session_activity_quickmatch(Any p0, Any p1, Any p2, Any p3) { return _i(0xBE3E347A87ACEB82, p0, p1, p2, p3); } + static Void _0xCAE55F48D3D7875C(Any p0) { return _i(0xCAE55F48D3D7875C, p0); } + static Void network_session_block_join_requests(bool p0) { return _i(0xA73667484D7037C3, p0); } + static Void network_session_cancel_invite() { return _i(0x2FBF47B1B36D36F9); } + static Void network_session_change_slots(int p0, bool p1) { return _i(0xB4AB419E0D86ACAE, p0, p1); } + static bool network_session_crew_matchmaking(int p0, int p1, int p2, int maxPlayers, bool p4) { return _i(0x94BC51E9449D917F, p0, p1, p2, maxPlayers, p4); } + static bool network_session_end(bool p0, bool p1) { return _i(0xA02E59562D711006, p0, p1); } + static Any network_session_enter(Any p0, Any p1, Any p2, int maxPlayers, Any p4, Any p5) { return _i(0x330ED4D05491934F, p0, p1, p2, maxPlayers, p4, p5); } + static Void network_session_force_cancel_invite() { return _i(0xA29177F7703B5644); } + static bool network_session_friend_matchmaking(int p0, int p1, int maxPlayers, bool p3) { return _i(0x2CFC76E0D087C994, p0, p1, maxPlayers, p3); } + static int _0xDFFA5BE8381C3314() { return _i(0xDFFA5BE8381C3314); } + static Void network_session_get_inviter(int* network_handle) { return _i(0xE57397B4A3429DD0, network_handle); } + static bool network_session_is_player_voted_to_kick(Player player) { return _i(0xD6D09A6F32F49EF1, player); } + static int network_session_get_unk(int p0) { return _i(0x56CE820830EF040B, p0); } + static Any _0x53AFD64C6758F2F9() { return _i(0x53AFD64C6758F2F9); } + static bool network_session_host(int p0, int maxPlayers, bool p2) { return _i(0x6F3D4ED9BEE4E61D, p0, maxPlayers, p2); } + static bool network_session_host_closed(int p0, int maxPlayers) { return _i(0xED34C0C02C098BB7, p0, maxPlayers); } + static bool network_session_host_friends_only(int p0, int maxPlayers) { return _i(0xB9CFD27A5D578D83, p0, maxPlayers); } + static Void network_session_host_single_player(int p0) { return _i(0xC74C33FCA52856D5, p0); } + static Any _0xD313DE83394AF134() { return _i(0xD313DE83394AF134); } + static bool network_session_is_closed_crew() { return _i(0x74732C6CA90DA2B4); } + static bool network_session_is_closed_friends() { return _i(0xFBCFA2EA2E206890); } + static Any _0xBDB6F89C729CF388() { return _i(0xBDB6F89C729CF388); } + static bool _0x855BC38818F6F684() { return _i(0x855BC38818F6F684); } + static bool network_session_is_private() { return _i(0xCEF70AA5B3F89BA1); } + static bool network_session_is_solo() { return _i(0xF3929C2379B60CCE); } + static Any network_session_is_visible() { return _i(0xBA416D68C631496A); } + static Any _0xB5D3453C98456528() { return _i(0xB5D3453C98456528); } + static bool _0xEF0912DDF7C4CB4B() { return _i(0xEF0912DDF7C4CB4B); } + static Void _0xC6F8AB8A4189CF3A() { return _i(0xC6F8AB8A4189CF3A); } + static Void network_session_kick_player(Player player) { return _i(0xFA8904DC5F304220, player); } + static Void network_session_leave_single_player() { return _i(0x3442775428FD2DAA); } + static Void network_session_mark_visible(bool p0) { return _i(0x271CC6AB59EBF9A5, p0); } + static Any _0x041C7F2A6C9894E6(Any p0, Any p1, Any p2) { return _i(0x041C7F2A6C9894E6, p0, p1, p2); } + static Void _0x702BC4D605522539(Any p0) { return _i(0x702BC4D605522539, p0); } + static Void _0x5ECD378EE64450AB(Any p0) { return _i(0x5ECD378EE64450AB, p0); } + static Void _0x600F8CB31C7AAB6E(Any p0) { return _i(0x600F8CB31C7AAB6E, p0); } + static Void _0x49EC8030F5015F8B(int p0) { return _i(0x49EC8030F5015F8B, p0); } + static Void network_session_set_max_players(int playerType, int playerCount) { return _i(0x8B6A4DD0AF9CE215, playerType, playerCount); } + static Void _0xF1EEA2DDA9FFA69D(Any p0) { return _i(0xF1EEA2DDA9FFA69D, p0); } + static Void _0x3F52E880AAF6C8CA(bool p0) { return _i(0x3F52E880AAF6C8CA, p0); } + static Void _0x59D421683D31835A(Any p0) { return _i(0x59D421683D31835A, p0); } + static Void _0x1153FA02A659051C() { return _i(0x1153FA02A659051C); } + static Void _0xF49ABC20D8552257(Any p0) { return _i(0xF49ABC20D8552257, p0); } + static Void _0x4811BBAC21C5FCD5(Any p0) { return _i(0x4811BBAC21C5FCD5, p0); } + static Void _0x5539C3EBF104A53A(bool p0) { return _i(0x5539C3EBF104A53A, p0); } + static Void network_session_hosted(bool p0) { return _i(0xC19F6C8E7865A6FF, p0); } + static Void _0xABD5E88B8A2D3DB2(Any* globalPtr) { return _i(0xABD5E88B8A2D3DB2, globalPtr); } + static Void network_session_voice_host() { return _i(0x9C1556705F864230); } + static Void network_session_voice_leave() { return _i(0x6793E42BE02B575D); } + static Void network_set_keep_focuspoint(bool p0, Any p1) { return _i(0x7F8413B7FC2AA6B9, p0, p1); } + static Void _0x5B8ED3DB018927B1(Any p0) { return _i(0x5B8ED3DB018927B1, p0); } + static bool network_session_was_invited() { return _i(0x23DFB504655D0CE4); } + static Void _0x0E4F77F7B9D74D84(Any p0) { return _i(0x0E4F77F7B9D74D84, p0); } + static Void network_set_activity_spectator(bool toggle) { return _i(0x75138790B4359A74, toggle); } + static Void network_set_activity_spectator_max(int maxSpectators) { return _i(0x9D277B76D1D12222, maxSpectators); } + static Void _0x5C707A667DF8B9FA(bool p0, Any p1) { return _i(0x5C707A667DF8B9FA, p0, p1); } + static bool _0x0EDE326D47CD0F3E(Ped ped, Player player) { return _i(0x0EDE326D47CD0F3E, ped, player); } + static bool network_set_currently_selected_gamer_handle_from_invite_menu(Any* p0) { return _i(0x7206F674F2A3B1BB, p0); } + static bool _0x796A87B3B68D1F3D(Any* p0) { return _i(0x796A87B3B68D1F3D, p0); } + static Void _0xA2E9C1AB8A92E8CD(bool p0) { return _i(0xA2E9C1AB8A92E8CD, p0); } + static Void network_set_entity_can_blend(Entity entity, bool toggle) { return _i(0xD830567D88A1E873, entity, toggle); } + static Void network_set_entity_invisible_to_network(Entity entity, bool toggle) { return _i(0xF1CA12B18AEF5298, entity, toggle); } + static Void network_set_friendly_fire_option(bool toggle) { return _i(0xF808475FA571D823, toggle); } + static Void network_set_gamer_invited_to_transition(int* network_handle) { return _i(0xCA2C8073411ECDB6, network_handle); } + static Void _0x6A5D89D7769A40D8(bool p0) { return _i(0x6A5D89D7769A40D8, p0); } + static Void _0x0D77A82DC2D0DA59(Any* p0, Any* p1) { return _i(0x0D77A82DC2D0DA59, p0, p1); } + static Void _0x66F010A4B031A331(Any* p0) { return _i(0x66F010A4B031A331, p0); } + static Void _0xFC18DB55AE19E046(bool p0) { return _i(0xFC18DB55AE19E046, p0); } + static Void network_set_in_mp_cutscene(bool p0, bool p1) { return _i(0x9CA5DE655269FEC4, p0, p1); } + static Void _0x2CE9D95E4051AECD(Any p0) { return _i(0x2CE9D95E4051AECD, p0); } + static Void network_set_in_spectator_mode(bool toggle, Ped playerPed) { return _i(0x423DE3854BB50894, toggle, playerPed); } + static Void _0x419594E137637120(bool p0, Any p1, bool p2) { return _i(0x419594E137637120, p0, p1, p2); } + static Void network_set_local_player_invincible_time(int time) { return _i(0x2D95C7E2D7E07307, time); } + static Void _0x524FF0AEFF9C3973(Any p0) { return _i(0x524FF0AEFF9C3973, p0); } + static Void _0x7D395EA61622E116(bool p0) { return _i(0x7D395EA61622E116, p0); } + static Void _0x94538037EE44F5CF(bool p0) { return _i(0x94538037EE44F5CF, p0); } + static Void network_set_mission_finished() { return _i(0x3B3D11CD9FFCDFC9); } + static Void _0xF46A1E03E8755980(bool p0) { return _i(0xF46A1E03E8755980, p0); } + static Void _0x0379DAF89BA09AA5(Any p0, Any p1) { return _i(0x0379DAF89BA09AA5, p0, p1); } + static Void _0xBA7F0B77D80A4EB7() { return _i(0xBA7F0B77D80A4EB7); } + static Void network_set_override_spectator_mode(bool toggle) { return _i(0x70DA3BF8DACD3210, toggle); } + static Void _0x3C5C1E2C2FF814B1(bool p0) { return _i(0x3C5C1E2C2FF814B1, p0); } + static Void _0x1B857666604B1A74(bool p0) { return _i(0x1B857666604B1A74, p0); } + static Void _0x367EF5E2F439B4C6(int p0) { return _i(0x367EF5E2F439B4C6, p0); } + static Void network_set_property_id(Any p0) { return _i(0x1775961C2FBBCB5C, p0); } + static Void _0x9D7AFCBF21C51712(bool p0) { return _i(0x9D7AFCBF21C51712, p0); } + static Any _0x4348BFDA56023A2F(Any p0, Any p1) { return _i(0x4348BFDA56023A2F, p0, p1); } + static Any _0xB309EBEA797E001F(Any p0) { return _i(0xB309EBEA797E001F, p0); } + static Void _0x265559DA40B3F327(Any p0) { return _i(0x265559DA40B3F327, p0); } + static Void _0x7AC752103856FB20(bool p0) { return _i(0x7AC752103856FB20, p0); } + static Void network_set_talker_proximity(float p0) { return _i(0xCBF12D65F95AD686, p0); } + static Void network_set_team_only_chat(bool toggle) { return _i(0xD5B4883AC32F24C3, toggle); } + static Void network_set_this_script_is_network_script(int lobbySize, bool p1, int playerId) { return _i(0x1CA59E306ECB80A5, lobbySize, p1, playerId); } + static Void network_set_transition_activity_id(Any p0) { return _i(0x30DE938B516F0AD2, p0); } + static Void network_set_transition_creator_handle(Any* p0) { return _i(0xEF26739BCD9907D5, p0); } + static Void _0x0C978FDA19692C2C(bool p0, bool p1) { return _i(0x0C978FDA19692C2C, p0, p1); } + static Void network_set_voice_active(bool toggle) { return _i(0xBABEC9E69A91C57B, toggle); } + static Void network_set_voice_channel(Any p0) { return _i(0xEF6212C2EFEF1A23, p0); } + static Any _0x82A2B386716608F1() { return _i(0x82A2B386716608F1); } + static Void _0x83FE8D7229593017() { return _i(0x83FE8D7229593017); } + static Void network_show_profile_ui(int* network_handle) { return _i(0x859ED1CEA343FCA8, network_handle); } + static Void _0x9465E683B12D3F6B() { return _i(0x9465E683B12D3F6B); } + static Any _0x659CF2EF7F550C4F() { return _i(0x659CF2EF7F550C4F); } + static bool _0x5A6FFA2433E2F14C(Player player, float p1, float p2, float p3, float p4, float p5, float p6, float p7, int flags) { return _i(0x5A6FFA2433E2F14C, player, p1, p2, p3, p4, p5, p6, p7, flags); } + static bool _0x4BA92A18502BCA61(Player player, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, float p9, float p10, int flags) { return _i(0x4BA92A18502BCA61, player, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, flags); } + static Void _0x17E0198B3882C2CB() { return _i(0x17E0198B3882C2CB); } + static Void network_start_synchronised_scene(int netScene) { return _i(0x9A1B3FCDB36C8697, netScene); } + static int _0xD66C9E72B3CC4982(Any* p0, Any p1) { return _i(0xD66C9E72B3CC4982, p0, p1); } + static Any _0x36391F397731595D(Any p0) { return _i(0x36391F397731595D, p0); } + static Any _0xDEB2B99A1AF1A2A6(Any p0) { return _i(0xDEB2B99A1AF1A2A6, p0); } + static Void network_stop_synchronised_scene(int netScene) { return _i(0xC254481A4574CB2F, netScene); } + static Void _0xF814FEC6A19FD6E0() { return _i(0xF814FEC6A19FD6E0); } + static Void network_suppress_invite(bool toggle) { return _i(0xA0682D67EF1FBA3D, toggle); } + static bool network_is_text_chat_active() { return _i(0x5FCF4D7069B09026); } + static Any _0xC3BFED92026A2AAD(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xC3BFED92026A2AAD, p0, p1, p2, p3, p4); } + static Void _0x973D76AA760A6CB6(bool p0) { return _i(0x973D76AA760A6CB6, p0); } + static Any _0x04918A41BC9B8157(Any p0, Any p1, Any p2) { return _i(0x04918A41BC9B8157, p0, p1, p2); } + static Void _0xF6F4383B7C92F11A(Any p0) { return _i(0xF6F4383B7C92F11A, p0); } + static Void _0x1F8E00FB18239600(Any p0) { return _i(0x1F8E00FB18239600, p0); } + static Void _0x1398582B7F72B3ED(Any p0) { return _i(0x1398582B7F72B3ED, p0); } + static Any _0x8B4FFC790CA131EF(Any p0, Any p1, Any p2, Any p3) { return _i(0x8B4FFC790CA131EF, p0, p1, p2, p3); } + static bool network_access_tunable_bool_hash_fail_val(uint32_t tunableContext, uint32_t tunableName, bool defaultValue) { return _i(0xC7420099936CE286, tunableContext, tunableName, defaultValue); } + static bool network_set_this_script_marked(Any p0, bool p1, Any p2) { return _i(0xD1110739EEADB592, p0, p1, p2); } + static Void network_unregister_networked_entity(Entity entity) { return _i(0x7368E683BB9038D6, entity); } + static Void network_set_network_id_dynamic(int netID, bool toggle) { return _i(0x2B1813ABA29016C5, netID, toggle); } + static Void _0xCD71A4ECAB22709E(Entity entity) { return _i(0xCD71A4ECAB22709E, entity); } + static Any _0xB37E4E6A2388CA7B() { return _i(0xB37E4E6A2388CA7B); } + static bool _0x4237E822315D8BA9() { return _i(0x4237E822315D8BA9); } + static Void _0x58C21165F6545892(const char* p0, const char* p1, Any p2) { return _i(0x58C21165F6545892, p0, p1, p2); } + static Player participant_id() { return _i(0x90986E8876CE0A83); } + static int participant_id_to_int() { return _i(0x57A3BDDAD8E5AA0A); } + static bool _0xE26CCFF8094D8C74(Any p0) { return _i(0xE26CCFF8094D8C74, p0); } + static Void _0x72D0706CD6CCDB58() { return _i(0x72D0706CD6CCDB58); } + static Any _0x472841A026D26D8B() { return _i(0x472841A026D26D8B); } + static Void _0x715135F4B82AC90D(Entity entity, Any p1) { return _i(0x715135F4B82AC90D, entity, p1); } + static bool _0xA2F952104FC6DD4B(Any p0) { return _i(0xA2F952104FC6DD4B, p0); } + static Void _0x42613035157E4208(Any p0) { return _i(0x42613035157E4208, p0); } + static Void reserve_network_mission_objects(int p0) { return _i(0x4E5C93BD0C32FBF8, p0); } + static Void reserve_network_mission_peds(int p0) { return _i(0xB60FEBA45333D36F, p0); } + static Void reserve_network_mission_vehicles(int p0) { return _i(0x76B02E21ED27A469, p0); } + static Void _0x17330EBF2F2124A8() { return _i(0x17330EBF2F2124A8); } + static Void _0x444C4525ECE0A4B9() { return _i(0x444C4525ECE0A4B9); } + static Void _0x4BA166079D658ED4(Any p0, Any p1) { return _i(0x4BA166079D658ED4, p0, p1); } + static Void set_entity_locally_invisible(Entity entity) { return _i(0xE135A9FF3F5D05D8, entity); } + static Void set_entity_locally_visible(Entity entity) { return _i(0x241E289B5C059EDC, entity); } + static Void set_entity_visible_in_cutscene(Any p0, bool p1, bool p2) { return _i(0xE0031D3C8F36AB82, p0, p1, p2); } + static Void _0x658500AE6D723A7E(Any p0) { return _i(0x658500AE6D723A7E, p0); } + static Void _0xD7B6C73CAD419BCF(Any p0) { return _i(0xD7B6C73CAD419BCF, p0); } + static Void _0xFAE628F1E9ADB239(Any p0, Any p1, Any p2) { return _i(0xFAE628F1E9ADB239, p0, p1, p2); } + static Void use_player_colour_instead_of_team_colour(bool toggle, Any p1) { return _i(0x5FFE9B4144F9712F, toggle, p1); } + static Void set_local_player_invisible_locally(bool p0) { return _i(0xE5F773C1A1D9D168, p0); } + static Void set_local_player_visible_in_cutscene(bool p0, bool p1) { return _i(0xD1065D68947E7B6E, p0, p1); } + static Void set_local_player_visible_locally(bool p0) { return _i(0x7619364C82D3BF14, p0); } + static Void _0xAAA553E7DD28A457(bool p0) { return _i(0xAAA553E7DD28A457, p0); } + static Void _0x838DA0936A24ED4D(Any p0, Any p1) { return _i(0x838DA0936A24ED4D, p0, p1); } + static Void set_network_id_sync_to_player(int netId, Player player, bool toggle) { return _i(0xA8A024587329F36A, netId, player, toggle); } + static Void set_network_id_can_migrate(int netId, bool toggle) { return _i(0x299EEB23175895FC, netId, toggle); } + static Void set_network_id_exists_on_all_machines(int netId, bool toggle) { return _i(0xE05E81A888FA63C8, netId, toggle); } + static Void _0x3FA36981311FA4FF(int netId, bool state) { return _i(0x3FA36981311FA4FF, netId, state); } + static Void set_network_id_visible_in_cutscene(int netId, bool p1, bool p2) { return _i(0xA6928482543022B4, netId, p1, p2); } + static Void _0x32EBD154CB6B8B99(Any p0, Any p1, Any p2) { return _i(0x32EBD154CB6B8B99, p0, p1, p2); } + static Void set_network_vehicle_non_contact(Vehicle vehicle, bool toggle) { return _i(0x6274C4712850841E, vehicle, toggle); } + static Void _0xA2A707979FE754DC(Any p0, Any p1) { return _i(0xA2A707979FE754DC, p0, p1); } + static Void set_network_vehicle_respot_timer(int netId, int time, Any p2) { return _i(0xEC51713AB6EC36E8, netId, time, p2); } + static Void _0x13F1FCB111B820B0(Any p0) { return _i(0x13F1FCB111B820B0, p0); } + static Void set_player_invisible_locally(Player player, bool toggle) { return _i(0x12B37D54667DB0B8, player, toggle); } + static Void set_player_visible_locally(Player player, bool toggle) { return _i(0xFAA10F1FAFB11AF2, player, toggle); } + static Void _0xA7C511FA1C5BDA38(Any p0, Any p1) { return _i(0xA7C511FA1C5BDA38, p0, p1); } + static Void set_store_enabled(bool toggle) { return _i(0x9641A9FF718E9C5E, toggle); } + static Void shutdown_and_launch_single_player_game() { return _i(0x593850C16A36B692); } + static Any _0x9ECA15ADFE141431() { return _i(0x9ECA15ADFE141431); } + static const char* texture_download_get_name(int p0) { return _i(0x3448505B6E35262D, p0); } + static bool texture_download_has_failed(int p0) { return _i(0x5776ED562C134687, p0); } + static Void texture_download_release(int p0) { return _i(0x487EB90B98E9FB19, p0); } + static int texture_download_request(int* PlayerHandle, const char* FilePath, const char* Name, bool p3) { return _i(0x16160DA74A8E74A2, PlayerHandle, FilePath, Name, p3); } + static Any _0x0B203B4AFDE53A4F(Any* p0, Any* p1, bool p2) { return _i(0x0B203B4AFDE53A4F, p0, p1, p2); } + static Any _0xF287F506767CC8A9(Player player, uint64_t unk) { return _i(0xF287F506767CC8A9, player, unk); } + static bool _0x46FB3ED415C7641C(Player player, int p1, uint32_t scriptHash) { return _i(0x46FB3ED415C7641C, player, p1, scriptHash); } + static Any _0xA12D3A5A3753CC23() { return _i(0xA12D3A5A3753CC23); } + static Void _0xE9B99B6853181409() { return _i(0xE9B99B6853181409); } + static Void _0x17440AA15D1D3739() { return _i(0x17440AA15D1D3739); } + static Void _0xA1E5E0204A6FCC70() { return _i(0xA1E5E0204A6FCC70); } + static Void _0x61A885D3F7CFEE9A() { return _i(0x61A885D3F7CFEE9A); } + static Void _0xBA96394A0EECFA65() { return _i(0xBA96394A0EECFA65); } + static bool _0x152D90E4C1B4738A(Any* p0, Any* p1) { return _i(0x152D90E4C1B4738A, p0, p1); } + static Any _0x24E4E51FC16305F9() { return _i(0x24E4E51FC16305F9); } + static bool _0x162C23CA83ED0A62(Any p0) { return _i(0x162C23CA83ED0A62, p0); } + static Any _0x941E5306BCD7C2C7() { return _i(0x941E5306BCD7C2C7); } + static Any _0x793FF272D5B365F4() { return _i(0x793FF272D5B365F4); } + static Any _0x4D02279C83BE69FE() { return _i(0x4D02279C83BE69FE); } + static bool _0xD5A4B59980401588(Any p0, Any p1, Any* p2, Any* p3) { return _i(0xD5A4B59980401588, p0, p1, p2, p3); } + static Any _0x40F7E66472DF3E5C(Any p0, Any p1) { return _i(0x40F7E66472DF3E5C, p0, p1); } + static int get_content_category(int p0) { return _i(0xA7BAB11E7C9C6C5A, p0); } + static bool _0x8C8D2739BA44AF0F(Any p0) { return _i(0x8C8D2739BA44AF0F, p0); } + static bool _0x584770794D758C18(Any p0, Any* p1) { return _i(0x584770794D758C18, p0, p1); } + static int get_content_description_hash(Any p0) { return _i(0x7CF0448787B23758, p0); } + static Any get_content_file_version(Any p0, Any p1) { return _i(0x37025B27D9B658B1, p0, p1); } + static Any _0x3A17A27D75C74887() { return _i(0x3A17A27D75C74887); } + static bool _0x7FCC39C46C3C03BD(Any p0) { return _i(0x7FCC39C46C3C03BD, p0); } + static bool _0x1D610EB0FEA716D9(Any p0) { return _i(0x1D610EB0FEA716D9, p0); } + static bool _0x993CBE59D350D225(Any p0) { return _i(0x993CBE59D350D225, p0); } + static bool _0x70EA8DA57840F9BE(Any p0) { return _i(0x70EA8DA57840F9BE, p0); } + static const char* get_content_id(Any p0) { return _i(0x55AA95F481D694D2, p0); } + static bool _0x3054F114121C21EA(Any p0) { return _i(0x3054F114121C21EA, p0); } + static bool _0xAEAB987727C5A8A4(Any p0) { return _i(0xAEAB987727C5A8A4, p0); } + static bool _0xA9240A96C74CCA13(Any p0) { return _i(0xA9240A96C74CCA13, p0); } + static Any _0x32DD916F3F7C9672(Any p0) { return _i(0x32DD916F3F7C9672, p0); } + static Any _0xBF09786A7FCAB582(Any p0) { return _i(0xBF09786A7FCAB582, p0); } + static Any _0xE0A6138401BCB837() { return _i(0xE0A6138401BCB837); } + static Any _0xBAF6BABF9E7CCC13(Any p0, Any p1) { return _i(0xBAF6BABF9E7CCC13, p0, p1); } + static Any _0x1ACCFBA3D8DAB2EE(Any p0, Any p1) { return _i(0x1ACCFBA3D8DAB2EE, p0, p1); } + static Any _0x759299C5BB31D2A9(Any p0, Any p1) { return _i(0x759299C5BB31D2A9, p0, p1); } + static Any _0x4E548C0D7AE39FF9(Any p0, Any p1) { return _i(0x4E548C0D7AE39FF9, p0, p1); } + static Any _0x87E5C46C187FE0AE(Any p0, Any p1) { return _i(0x87E5C46C187FE0AE, p0, p1); } + static Any _0x769951E2455E2EB5() { return _i(0x769951E2455E2EB5); } + static Void _0xCFD115B373C0DF63(Any p0, Any* p1) { return _i(0xCFD115B373C0DF63, p0, p1); } + static const char* get_content_user_id(int p0) { return _i(0xCD67AD041A394C9C, p0); } + static Any _0x703F12425ECA8BF5(Any p0) { return _i(0x703F12425ECA8BF5, p0); } + static Any _0xC55A0B40FFB1ED23() { return _i(0xC55A0B40FFB1ED23); } + static Any _0xFBC5E768C7A77A6A() { return _i(0xFBC5E768C7A77A6A); } + static bool _0xB746D20B17F2A229(Any* p0, Any* p1) { return _i(0xB746D20B17F2A229, p0, p1); } + static Any _0x597F8DBA9B206FC7() { return _i(0x597F8DBA9B206FC7); } + static bool _0x9F6E2821885CAEE2(Any p0, Any p1, Any p2, Any* p3, Any* p4) { return _i(0x9F6E2821885CAEE2, p0, p1, p2, p3, p4); } + static bool _0xF9E1CCAE8BA4C281(Any p0, Any p1, Any* p2, Any* p3) { return _i(0xF9E1CCAE8BA4C281, p0, p1, p2, p3); } + static bool _0x678BB03C1A3BD51E(Any p0, Any p1, Any p2, Any* p3, Any* p4) { return _i(0x678BB03C1A3BD51E, p0, p1, p2, p3, p4); } + static bool set_balance_add_machine(Any* p0, Any* p1) { return _i(0x815E5E3073DA1D67, p0, p1); } + static bool set_balance_add_machines(Any* p0, Any p1, Any* p2) { return _i(0xB8322EEB38BE7C26, p0, p1, p2); } + static Any _0x5A0A3D1A186A5508() { return _i(0x5A0A3D1A186A5508); } + static bool _0xA7862BC5ED1DFD7E(Any p0, Any p1, Any* p2, Any* p3) { return _i(0xA7862BC5ED1DFD7E, p0, p1, p2, p3); } + static bool network_get_background_loading_recipients(Any p0, Any p1, Any* p2, Any* p3) { return _i(0x97A770BEEF227E2B, p0, p1, p2, p3); } + static bool _0x3195F8DD0D531052(Any p0, Any p1, Any* p2, Any* p3) { return _i(0x3195F8DD0D531052, p0, p1, p2, p3); } + static Any _0xEDF7F927136C224B() { return _i(0xEDF7F927136C224B); } + static const char* get_root_content_id(Any p0) { return _i(0xC0173D6BFF4E0348, p0); } + static bool _0x5324A0E3E4CE3570(Any p0, Any p1, Any* p2, Any* p3) { return _i(0x5324A0E3E4CE3570, p0, p1, p2, p3); } + static Any _0x5E24341A7F92A74B() { return _i(0x5E24341A7F92A74B); } + static bool _0xEBFA8D50ADDC54C4(Any p0) { return _i(0xEBFA8D50ADDC54C4, p0); } + static Any _0x02ADA21EA2F6918F() { return _i(0x02ADA21EA2F6918F); } + static Any _0x299EF3C576773506() { return _i(0x299EF3C576773506); } + static Any _0x63B406D7884BFA95() { return _i(0x63B406D7884BFA95); } + static Any _0x9FEDF86898F100E9() { return _i(0x9FEDF86898F100E9); } + static bool _0x2D5DC831176D0114(Any p0) { return _i(0x2D5DC831176D0114, p0); } + static Any _0xD53ACDBEF24A46E8() { return _i(0xD53ACDBEF24A46E8); } + static bool _0xF53E48461B71EECB(Any p0) { return _i(0xF53E48461B71EECB, p0); } + static Any _0x45E816772E93A9DB() { return _i(0x45E816772E93A9DB); } + static bool _0x5CAE833B0EE0C500(Any p0) { return _i(0x5CAE833B0EE0C500, p0); } + static bool _0x1DE0F5F50D723CAA(Any* p0, Any* p1, Any* p2) { return _i(0x1DE0F5F50D723CAA, p0, p1, p2); } + static bool _0x692D58DF40657E8C(Any p0, Any p1, Any p2, Any* p3, Any p4, bool p5) { return _i(0x692D58DF40657E8C, p0, p1, p2, p3, p4, p5); } + static bool _0x158EC424F35EC469(Any* p0, bool p1, Any* p2) { return _i(0x158EC424F35EC469, p0, p1, p2); } + static bool _0xC7397A83F7A2A462(Any* p0, Any p1, bool p2, Any* p3) { return _i(0xC7397A83F7A2A462, p0, p1, p2, p3); } + static bool _0x6D4CB481FAC835E8(Any p0, Any p1, Any* p2, Any p3) { return _i(0x6D4CB481FAC835E8, p0, p1, p2, p3); } + static bool _0x9BF438815F5D96EA(Any p0, Any p1, Any* p2, Any p3, Any p4, Any p5) { return _i(0x9BF438815F5D96EA, p0, p1, p2, p3, p4, p5); } + static Void _0x68103E2247887242() { return _i(0x68103E2247887242); } + static bool _0x5A34CD9C3C5BEC44(Any p0) { return _i(0x5A34CD9C3C5BEC44, p0); } + static Any _0x5E0165278F6339EE(Any p0) { return _i(0x5E0165278F6339EE, p0); } + static Any _0x171DF6A0C07FB3DC(Any p0, Any p1) { return _i(0x171DF6A0C07FB3DC, p0, p1); } + static Any _0x7FD2990AF016795E(Any* p0, Any* p1, Any p2, Any p3, Any p4) { return _i(0x7FD2990AF016795E, p0, p1, p2, p3, p4); } + static bool _0x274A1519DFC1094F(Any* p0, bool p1, Any* p2) { return _i(0x274A1519DFC1094F, p0, p1, p2); } + static bool _0xD05D1A6C74DA3498(Any* p0, bool p1, Any* p2) { return _i(0xD05D1A6C74DA3498, p0, p1, p2); } + static Void _0xF98DDE0A8ED09323(bool p0) { return _i(0xF98DDE0A8ED09323, p0); } + static Void _0xFD75DABC0957BF33(bool p0) { return _i(0xFD75DABC0957BF33, p0); } + static Any _0x308F96458B7087CC(Any* p0, Any p1, Any p2, Any p3, Any* p4, bool p5) { return _i(0x308F96458B7087CC, p0, p1, p2, p3, p4, p5); } + static Any _0xC87E740D9F3872CC() { return _i(0xC87E740D9F3872CC); } + static Void _0x77758139EC9B66C7(bool p0) { return _i(0x77758139EC9B66C7, p0); } + static int network_get_network_id_from_entity(Entity entity) { return _i(0xA11700682F3AD45C, entity); } + static int veh_to_net(Vehicle vehicle) { return _i(0xB4C94523F023419C, vehicle); } + static int ped_to_net(Ped ped) { return _i(0x0EDEC3C276198689, ped); } + static int obj_to_net(Object object) { return _i(0x99BFDC94A603E541, object); } + static Void _0x4A9FDE3A5A6D0437(Any p0) { return _i(0x4A9FDE3A5A6D0437, p0); } + static Void network_set_rich_presence(Any p0, Any p1, Any p2, Any p3) { return _i(0x1DCCACDCFC569362, p0, p1, p2, p3); } + static Void _0x3E200C2BCF4164EB(Any p0, Any p1) { return _i(0x3E200C2BCF4164EB, p0, p1); } + static Void _0xB606E6CC59664972(Any p0) { return _i(0xB606E6CC59664972, p0); } + static Void _0x966DD84FB6A46017() { return _i(0x966DD84FB6A46017); } + static Void _0x6BFF5F84102DF80A(Any p0) { return _i(0x6BFF5F84102DF80A, p0); } + static Void _0x5C497525F803486B() { return _i(0x5C497525F803486B); } + static Any _0xAEDF1BC1C133D6E3() { return _i(0xAEDF1BC1C133D6E3); } + static Any _0x2555CF7DA5473794() { return _i(0x2555CF7DA5473794); } + static Any _0x6FD992C4A1C1B986() { return _i(0x6FD992C4A1C1B986); } + + static Void add_door_to_system(uint32_t doorHash, uint32_t modelHash, float x, float y, float z, bool p5, bool p6, bool p7) { return _i(0x6F8838D03D1DC226, doorHash, modelHash, x, y, z, p5, p6, p7); } + static Void _0xAA059C615DE9DD03(Any p0, Any p1) { return _i(0xAA059C615DE9DD03, p0, p1); } + static Void _0x641F272B52E2F0F8(Any p0, Any p1) { return _i(0x641F272B52E2F0F8, p0, p1); } + static bool _0x85B6C850546FDDE2(Any p0, bool p1, bool p2, bool p3, Any p4) { return _i(0x85B6C850546FDDE2, p0, p1, p2, p3, p4); } + static Void attach_portable_pickup_to_ped(Ped ped, Any p1) { return _i(0x8DC39368BDD57755, ped, p1); } + static Void _0x1E3F1B1B891A2AAA(Any p0, Any p1) { return _i(0x1E3F1B1B891A2AAA, p0, p1); } + static Void _0xE7E4C198B0185900(Object p0, Any p1, bool p2) { return _i(0xE7E4C198B0185900, p0, p1, p2); } + static Void _0xA2C1F5E92AFE49ED() { return _i(0xA2C1F5E92AFE49ED); } + static Void _0xDA05194260CDCDF9(Any p0, Any p1) { return _i(0xDA05194260CDCDF9, p0, p1); } + static Void _0x190428512B240692(Any p0, bool p1, bool p2, bool p3, bool p4) { return _i(0x190428512B240692, p0, p1, p2, p3, p4); } + static Void _0x762DB2D380B48D04(Any p0) { return _i(0x762DB2D380B48D04, p0); } + static Void _0x701FDA1E82076BA4() { return _i(0x701FDA1E82076BA4); } + static Void _0x66A49D021870FE88() { return _i(0x66A49D021870FE88); } + static uint32_t get_pickup_hash(Pickup pickupHash) { return _i(0x5EAAD83F8CFB4575, pickupHash); } + static Pickup create_ambient_pickup(uint32_t pickupHash, float posX, float posY, float posZ, int p4, int value, uint32_t modelHash, bool p7, bool p8) { return _i(0x673966A0C0FD7171, pickupHash, posX, posY, posZ, p4, value, modelHash, p7, p8); } + static Void create_money_pickups(float x, float y, float z, int value, int amount, uint32_t model) { return _i(0x0589B5E791CE9B2B, x, y, z, value, amount, model); } + static Pickup create_portable_pickup2(uint32_t pickupHash, float x, float y, float z, bool placeOnGround, uint32_t modelHash) { return _i(0x125494B98A21AAF7, pickupHash, x, y, z, placeOnGround, modelHash); } + static Object create_object(uint32_t modelHash, float x, float y, float z, bool isNetwork, bool p5, bool dynamic) { return _i(0x509D5878EB39E842, modelHash, x, y, z, isNetwork, p5, dynamic); } + static Object create_object_no_offset(uint32_t modelHash, float x, float y, float z, bool isNetwork, bool p5, bool dynamic) { return _i(0x9A294B2138ABB884, modelHash, x, y, z, isNetwork, p5, dynamic); } + static Pickup create_pickup(uint32_t pickupHash, float posX, float posY, float posZ, int p4, int value, bool p6, uint32_t modelHash) { return _i(0xFBA08C503DD5FA58, pickupHash, posX, posY, posZ, p4, value, p6, modelHash); } + static Pickup create_pickup_rotate(uint32_t pickupHash, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, int flag, int amount, Any p9, bool p10, uint32_t modelHash) { return _i(0x891804727E0A98B7, pickupHash, posX, posY, posZ, rotX, rotY, rotZ, flag, amount, p9, p10, modelHash); } + static Pickup create_portable_pickup(uint32_t pickupHash, float x, float y, float z, bool placeOnGround, uint32_t modelHash) { return _i(0x2EAF1FDB2FB55698, pickupHash, x, y, z, placeOnGround, modelHash); } + static Void _0xE05F6AEEFEB0BB02(Any p0, Any p1, Any p2) { return _i(0xE05F6AEEFEB0BB02, p0, p1, p2); } + static Void delete_object(Object* object) { return _i(0x539E0AE3E6634B9F, object); } + static Void detach_portable_pickup_from_ped(Ped ped) { return _i(0xCF463D1E9A0AECB1, ped); } + static bool does_object_of_type_exist_at_coords(float x, float y, float z, float radius, uint32_t hash, bool p5) { return _i(0xBFA48E2FF417213F, x, y, z, radius, hash, p5); } + static bool does_pickup_exist(Pickup pickup) { return _i(0xAFC1CA75AD4074D1, pickup); } + static bool does_pickup_object_exist(Object pickupObject) { return _i(0xD9EFB6DBF7DAAEA3, pickupObject); } + static bool is_pickup_within_radius(uint32_t pickupHash, float x, float y, float z, float radius) { return _i(0xF9C36251F6E48E33, pickupHash, x, y, z, radius); } + static bool does_des_object_exist(int handle) { return _i(0x52AF537A0C5B8AAD, handle); } + static bool _0x589F80B325CC82C5(float p0, float p1, float p2, Any p3, Any* p4) { return _i(0x589F80B325CC82C5, p0, p1, p2, p3, p4); } + static int _0x4BC2854478F3A749(uint32_t doorHash) { return _i(0x4BC2854478F3A749, doorHash); } + static int _0x160AA1B32F6139B8(uint32_t doorHash) { return _i(0x160AA1B32F6139B8, doorHash); } + static bool _0xDF97CDD4FC08FD34(Any p0) { return _i(0xDF97CDD4FC08FD34, p0); } + static float _0x65499865FCA6E5EC(uint32_t doorHash) { return _i(0x65499865FCA6E5EC, doorHash); } + static Void _0x9BA001CB45CBF627(uint32_t doorHash, float heading, bool p2, bool p3) { return _i(0x9BA001CB45CBF627, doorHash, heading, p2, p3); } + static Void _0x03C27E13B42A0E82(uint32_t doorHash, float p1, bool p2, bool p3) { return _i(0x03C27E13B42A0E82, doorHash, p1, p2, p3); } + static Void _0xA85A21582451E951(uint32_t doorHash, bool p1) { return _i(0xA85A21582451E951, doorHash, p1); } + static Void set_door_acceleration_limit(uint32_t doorHash, int limit, bool p2, bool p3) { return _i(0x6BAB9442830C7F53, doorHash, limit, p2, p3); } + static Void _0xD9B71952F78A2640(uint32_t doorHash, bool p1) { return _i(0xD9B71952F78A2640, doorHash, p1); } + static Void set_door_ajar_angle(uint32_t doorHash, float ajar, bool p2, bool p3) { return _i(0xB6E6FBA95C7324AC, doorHash, ajar, p2, p3); } + static Void _0xC485E07E4F0B7958(uint32_t doorHash, bool p1, bool p2, bool p3) { return _i(0xC485E07E4F0B7958, doorHash, p1, p2, p3); } + static Void _0xF2E1A7133DD356A6(uint32_t hash, bool toggle) { return _i(0xF2E1A7133DD356A6, hash, toggle); } + static Void _0xF9C1681347C8BD15(Object object) { return _i(0xF9C1681347C8BD15, object); } + static Void _0x4C134B4DF76025D0(Any p0, Any p1) { return _i(0x4C134B4DF76025D0, p0, p1); } + static Void _0x758A5C1B3B1E1990(Any p0) { return _i(0x758A5C1B3B1E1990, p0); } + static Void _0x394CD08E31313C28() { return _i(0x394CD08E31313C28); } + static Object get_closest_object_of_type(float x, float y, float z, float radius, uint32_t modelHash, bool isMission, bool p6, bool p7) { return _i(0xE143FA2249364369, x, y, z, radius, modelHash, isMission, p6, p7); } + static Any _0x163F8B586BC95F2A(Any coords, float radius, uint32_t modelHash, float x, float y, float z, math::vector3* p6, int p7) { return _i(0x163F8B586BC95F2A, coords, radius, modelHash, x, y, z, p6, p7); } + static Any _0xDB41D07A45A6D4B7(Any p0) { return _i(0xDB41D07A45A6D4B7, p0); } + static Any _0x2542269291C6AC84(Any p0) { return _i(0x2542269291C6AC84, p0); } + static float get_object_fragment_damage_health(Any p0, bool p1) { return _i(0xB6FBFD079B8D0596, p0, p1); } + static Any _0xE84EB93729C5F36A(Any p0) { return _i(0xE84EB93729C5F36A, p0); } + static math::vector3 get_object_offset_from_coords(float xPos, float yPos, float zPos, float heading, float xOffset, float yOffset, float zOffset) { return _i>(0x163E252DE035A133, xPos, yPos, zPos, heading, xOffset, yOffset, zOffset); } + static math::vector3 get_pickup_coords(Pickup pickup) { return _i>(0x225B8B35C88029B3, pickup); } + static Any _0xB3ECA65C7317F174() { return _i(0xB3ECA65C7317F174); } + static Object get_pickup_object(Pickup pickup) { return _i(0x5099BC55630B25AE, pickup); } + static int get_des_object(float x, float y, float z, float rotation, const char* name) { return _i(0xB48FCED898292E52, x, y, z, rotation, name); } + static float _0x260EE4FDBDF4DB01(Any p0) { return _i(0x260EE4FDBDF4DB01, p0); } + static math::vector3 get_safe_pickup_coords(float x, float y, float z, Any p3, Any p4) { return _i>(0x6E16BC2503FF1FF0, x, y, z, p3, p4); } + static Void get_state_of_closest_door_of_type(uint32_t type, float x, float y, float z, bool* locked, float* heading) { return _i(0xEDC1A5B84AEF33FF, type, x, y, z, locked, heading); } + static Any get_des_object_state(int handle) { return _i(0x899BA936634A322E, handle); } + static uint32_t get_weapon_hash_from_pickup(Pickup pickupHash) { return _i(0x08F96CA6C551AD51, pickupHash); } + static bool has_closest_object_of_type_been_broken(float p0, float p1, float p2, float p3, uint32_t modelHash, Any p5) { return _i(0x761B0E69AC4D007E, p0, p1, p2, p3, modelHash, p5); } + static bool _0x46494A2475701343(float p0, float p1, float p2, float p3, uint32_t modelHash, bool p5) { return _i(0x46494A2475701343, p0, p1, p2, p3, modelHash, p5); } + static bool has_object_been_broken(Object object) { return _i(0x8ABFB70C49CC43E2, object); } + static bool has_pickup_been_collected(Pickup pickup) { return _i(0x80EC48E6679313F9, pickup); } + static Void _0x867458251D47CCB2(Any p0, Any p1) { return _i(0x867458251D47CCB2, p0, p1); } + static bool _0x673ED815D6E323B7(Any p0, bool p1, bool p2, bool p3, Any p4) { return _i(0x673ED815D6E323B7, p0, p1, p2, p3, p4); } + static bool is_any_object_near_point(float x, float y, float z, float range, bool p4) { return _i(0x397DC58FF00298D1, x, y, z, range, p4); } + static bool is_door_closed(uint32_t door) { return _i(0xC531EE8A1145A149, door); } + static bool does_door_exist(uint32_t doorHash) { return _i(0xC153C43EA202C8C1, doorHash); } + static bool is_garage_empty(Any garage, bool p1, int p2) { return _i(0x90E47239EA1980B8, garage, p1, p2); } + static bool _0x0378C08504160D0D(Any p0) { return _i(0x0378C08504160D0D, p0); } + static bool _0x372EF6699146A1E4(Any p0, Entity entity, float p2, int p3) { return _i(0x372EF6699146A1E4, p0, entity, p2, p3); } + static bool is_object_near_point(uint32_t objectHash, float x, float y, float z, float range) { return _i(0x8C90FE4B381BA60A, objectHash, x, y, z, range); } + static bool _0xF0EED5A6BC7B237A(Any p0, Entity entity, int p2) { return _i(0xF0EED5A6BC7B237A, p0, entity, p2); } + static bool is_object_visible(Object object) { return _i(0x8B32ACE6326A7546, object); } + static bool _0x11D1E53A726891FE(Object object) { return _i(0x11D1E53A726891FE, object); } + static bool _0x024A60DEB0EA69F0(Any p0, Player player, float p2, int p3) { return _i(0x024A60DEB0EA69F0, p0, player, p2, p3); } + static bool _0x1761DC5D8471CBAA(Any p0, Player player, int p2) { return _i(0x1761DC5D8471CBAA, p0, player, p2); } + static bool is_point_in_angled_area(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, float p9, bool p10, bool p11) { return _i(0x2A70BAE8883E4C81, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } + static Void mark_object_for_deletion(Object object) { return _i(0xADBE4809F19F927A, object); } + static Void _0xC7F29CA00F46350E(bool p0) { return _i(0xC7F29CA00F46350E, p0); } + static Any _0xD76EEEF746057FD6(Any p0) { return _i(0xD76EEEF746057FD6, p0); } + static bool place_object_on_ground_properly(Object object) { return _i(0x58A850EAEE20FAA3, object); } + static Void _0x92AEFB5F6E294023(Object object, bool p1, bool p2) { return _i(0x92AEFB5F6E294023, object, p1, p2); } + static Void remove_all_pickups_of_type(uint32_t pickupHash) { return _i(0x27F9D613092159CF, pickupHash); } + static Void remove_door_from_system(uint32_t doorHash) { return _i(0x464D8E1427156FE4, doorHash); } + static Void _0x4A39DB43E47CF3AA(Any p0) { return _i(0x4A39DB43E47CF3AA, p0); } + static Void remove_pickup(Pickup pickup) { return _i(0x3288D8ACAECD2AB2, pickup); } + static Void highlight_placement_coords(float x, float y, float z, int colorIndex) { return _i(0x3430676B11CDF21D, x, y, z, colorIndex); } + static Void set_activate_object_physics_as_soon_as_it_is_unfrozen(Object object, bool toggle) { return _i(0x406137F8EF90EAF5, object, toggle); } + static Void _0x826D1EE4D1CAFC78(Any p0, Any p1) { return _i(0x826D1EE4D1CAFC78, p0, p1); } + static Void _0xBCE595371A5FBAAF(Any p0, bool p1) { return _i(0xBCE595371A5FBAAF, p0, p1); } + static Void _0x8CAAB2BD3EA58BD4(Any p0) { return _i(0x8CAAB2BD3EA58BD4, p0); } + static Void _0xB2D0BDE54F0E8E5A(Object object, bool toggle) { return _i(0xB2D0BDE54F0E8E5A, object, toggle); } + static Void _0xD05A3241B9A86F19(Any p0, Any p1) { return _i(0xD05A3241B9A86F19, p0, p1); } + static Void set_force_object_this_frame(Any p0, Any p1, Any p2, Any p3) { return _i(0xF538081986E49E9D, p0, p1, p2, p3); } + static Void _0x78857FC65CADB909(bool p0) { return _i(0x78857FC65CADB909, p0); } + static Void _0x88EAEC617CD26926(uint32_t p0, bool p1) { return _i(0x88EAEC617CD26926, p0, p1); } + static Void door_control(uint32_t doorHash, float x, float y, float z, bool locked, float p5, float p6, float p7) { return _i(0x9B12F9A24FABEDB0, doorHash, x, y, z, locked, p5, p6, p7); } + static Void _0x0BF3B3BD47D79C08(Any p0, int p1) { return _i(0x0BF3B3BD47D79C08, p0, p1); } + static Void _0x4D89D607CB3DD1D2(Object object, bool toggle) { return _i(0x4D89D607CB3DD1D2, object, toggle); } + static Void _0x77F33F2CCF64B3AA(Object object, bool p1) { return _i(0x77F33F2CCF64B3AA, object, p1); } + static Void _0x62454A641B41F3C5(Any p0) { return _i(0x62454A641B41F3C5, p0); } + static Void _0xC6033D32241F6FB5(Any p0, bool p1) { return _i(0xC6033D32241F6FB5, p0, p1); } + static Void _0x3B2FD68DB5F8331C(Any p0, Any p1) { return _i(0x3B2FD68DB5F8331C, p0, p1); } + static Void set_object_physics_params(Object object, float weight, float p2, float p3, float p4, float p5, float gravity, float p7, float p8, float p9, float p10, float buoyancy) { return _i(0xF6DF6E90DE7DF90F, object, weight, p2, p3, p4, p5, gravity, p7, p8, p9, p10, buoyancy); } + static Void _0x96EE0EBA0163DF80(Any p0, Any p1) { return _i(0x96EE0EBA0163DF80, p0, p1); } + static Void _0xDF6CA0330F2E737B(Any p0, Any p1) { return _i(0xDF6CA0330F2E737B, p0, p1); } + static Void _0xEB6F1A9B5510A5D2(Any p0, bool p1) { return _i(0xEB6F1A9B5510A5D2, p0, p1); } + static Void set_object_targettable(Object object, bool targettable) { return _i(0x8A7391690F5AFD81, object, targettable); } + static Void set_object_texture_variant(Object object, int paintIndex) { return _i(0x971DA0055324D033, object, paintIndex); } + static Void _0x31F924B53EADDF65(bool p0) { return _i(0x31F924B53EADDF65, p0); } + static Void _0x318516E02DE3ECE2(float p0) { return _i(0x318516E02DE3ECE2, p0); } + static Void _0x0596843B34B95CE5(Any p0, Any p1) { return _i(0x0596843B34B95CE5, p0, p1); } + static Void _0x3ED2B83AB2E82799(Any p0, Any p1) { return _i(0x3ED2B83AB2E82799, p0, p1); } + static Void _0x8881C98A31117998(Any p0) { return _i(0x8881C98A31117998, p0); } + static Void _0x39A5FB7EAF150840(Any p0, Any p1) { return _i(0x39A5FB7EAF150840, p0, p1); } + static Void _0xA08FE5E49BDC39DD(Any p0, float p1, bool p2) { return _i(0xA08FE5E49BDC39DD, p0, p1, p2); } + static Void _0xA90E7227A9303FA9(Any p0, Any p1) { return _i(0xA90E7227A9303FA9, p0, p1); } + static Void set_pickup_regeneration_time(Pickup pickup, int time) { return _i(0x78015C9B4B3ECC9D, pickup, time); } + static Void _0x858EC9FD25DE04AA(Any p0, Any p1) { return _i(0x858EC9FD25DE04AA, p0, p1); } + static Void _0x1C1B69FAE509BA97(Any p0, Any p1) { return _i(0x1C1B69FAE509BA97, p0, p1); } + static Void _0x616093EC6B139DD9(Player player, uint32_t pickupHash, bool p2) { return _i(0x616093EC6B139DD9, player, pickupHash, p2); } + static Void _0x46F3ADD1E2D5BAF2(Any p0, Any p1) { return _i(0x46F3ADD1E2D5BAF2, p0, p1); } + static Void set_state_of_closest_door_of_type(uint32_t type, float x, float y, float z, bool locked, float heading, bool p6) { return _i(0xF82D8F1926A02C3D, type, x, y, z, locked, heading, p6); } + static Void set_des_object_state(int handle, int state) { return _i(0x5C29F698D404C5E1, handle, state); } + static Void set_team_pickup_object(Object object, Any p1, bool p2) { return _i(0x53E0DF1A2A3CF0CA, object, p1, p2); } + static Any _0xF12E33034D887F66(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0xF12E33034D887F66, p0, p1, p2, p3, p4, p5); } + static bool slide_object(Object object, float toX, float toY, float toZ, float speedX, float speedY, float speedZ, bool collision) { return _i(0x2FDFF4107B8C1147, object, toX, toY, toZ, speedX, speedY, speedZ, collision); } + static Void _0xF92099527DB8E2A7(Any p0, Any p1) { return _i(0xF92099527DB8E2A7, p0, p1); } + static Void _0x8DCA505A5C196F05(Any p0, Any p1) { return _i(0x8DCA505A5C196F05, p0, p1); } + static Void track_object_visibility(Any p0) { return _i(0xB252BC036B525623, p0); } + + static Void disable_input_group(int inputGroup) { return _i(0x7F4724035FDCA1DD, inputGroup); } + static Void _0xCB0360EFEFB2580D(Any p0) { return _i(0xCB0360EFEFB2580D, p0); } + static Void _0xA0CEFCEA390AAB9B(Any p0) { return _i(0xA0CEFCEA390AAB9B, p0); } + static Void disable_all_control_actions(int inputGroup) { return _i(0x5F4B6931816E599B, inputGroup); } + static Void disable_control_action(int inputGroup, int control, bool disable) { return _i(0xFE99B66D079CF6BC, inputGroup, control, disable); } + static Void enable_all_control_actions(int inputGroup) { return _i(0xA5FFE9B05F199DE7, inputGroup); } + static Void enable_control_action(int inputGroup, int control, bool enable) { return _i(0x351220255D64C155, inputGroup, control, enable); } + static bool _0xFC859E2374407556() { return _i(0xFC859E2374407556); } + static const char* _0x80C2FD58D720C801(int inputGroup, int control, bool p2) { return _i(0x80C2FD58D720C801, inputGroup, control, p2); } + static int _0xD7D22F5592AED8BA(int p0) { return _i(0xD7D22F5592AED8BA, p0); } + static const char* get_control_instructional_button(int inputGroup, int control, bool p2) { return _i(0x499D7B09FC9B407, inputGroup, control, p2); } + static float get_control_normal(int inputGroup, int control) { return _i(0xEC3C9B8D5327B563, inputGroup, control); } + static float _0x5B84D09CEC5209C5(int inputGroup, int control) { return _i(0x5B84D09CEC5209C5, inputGroup, control); } + static int get_control_value(int inputGroup, int control) { return _i(0xD95E79E8686D2C27, inputGroup, control); } + static float get_disabled_control_normal(int inputGroup, int control) { return _i(0x11E65974A982637C, inputGroup, control); } + static float _0x4F8A26A890FD62FB(int inputGroup, int control) { return _i(0x4F8A26A890FD62FB, inputGroup, control); } + static bool _0x0F70731BACCFBB96() { return _i(0x0F70731BACCFBB96); } + static int get_local_player_aim_state() { return _i(0xBB41AFBBBC0A0287); } + static Any _0x59B9A7AF4C95133C() { return _i(0x59B9A7AF4C95133C); } + static bool _0x6CD79468A1E595C6(int inputGroup) { return _i(0x6CD79468A1E595C6, inputGroup); } + static bool is_control_enabled(int inputGroup, int control) { return _i(0x1CEA6BFDF248E5D9, inputGroup, control); } + static bool is_control_just_pressed(int inputGroup, int control) { return _i(0x580417101DDB492F, inputGroup, control); } + static bool is_control_just_released(int inputGroup, int control) { return _i(0x50F940259D3841E6, inputGroup, control); } + static bool is_control_pressed(int inputGroup, int control) { return _i(0xF3A21BCD95725A4A, inputGroup, control); } + static bool is_control_released(int inputGroup, int control) { return _i(0x648EE3E7F38877DD, inputGroup, control); } + static bool is_disabled_control_just_pressed(int inputGroup, int control) { return _i(0x91AEF906BCA88877, inputGroup, control); } + static bool is_disabled_control_just_released(int inputGroup, int control) { return _i(0x305C8DCD79DA8B0F, inputGroup, control); } + static bool is_disabled_control_pressed(int inputGroup, int control) { return _i(0xE2587F8CBBD87B1D, inputGroup, control); } + static Any _0xFB6C4072E9A32E92(Any p0, Any p1) { return _i(0xFB6C4072E9A32E92, p0, p1); } + static bool is_look_inverted() { return _i(0x77B612531280010D); } + static bool _0xE1615EC03B3BB4FD() { return _i(0xE1615EC03B3BB4FD); } + static bool is_input_just_disabled(int inputGroup) { return _i(0x13337B38DB572509, inputGroup); } + static bool is_input_disabled(int inputGroup) { return _i(0xA571D46727E2B718, inputGroup); } + static bool _0x23F09EADC01449D6(bool p0) { return _i(0x23F09EADC01449D6, p0); } + static Void _0x8290252FFF36ACB5(int p0, int red, int green, int blue) { return _i(0x8290252FFF36ACB5, p0, red, green, blue); } + static Void set_pad_shake(int p0, int duration, int frequency) { return _i(0x48B3886C1358D0D5, p0, duration, frequency); } + static Void _0xF239400E16C23E08(Any p0, Any p1) { return _i(0xF239400E16C23E08, p0, p1); } + static bool set_control_normal(int inputGroup, int control, float amount) { return _i(0xE8A25867FBA3B05E, inputGroup, control, amount); } + static bool set_cursor_location(float x, float y) { return _i(0xFC695459D4D0E219, x, y); } + static Void set_input_exclusive(int inputGroup, int control) { return _i(0xEDE476E5EE29EDB1, inputGroup, control); } + static Void set_playerpad_shakes_when_controller_disabled(bool toggle) { return _i(0x798FDEB5B1575088, toggle); } + static Void _0x5B73C77D9EB66E24(bool p0) { return _i(0x5B73C77D9EB66E24, p0); } + static Void _0x643ED62D5EA3BEBD() { return _i(0x643ED62D5EA3BEBD); } + static Void stop_pad_shake(Any p0) { return _i(0x38C16A305E8CDC8D, p0); } + static bool _0x3D42B92563939375(const char* p0) { return _i(0x3D42B92563939375, p0); } + static bool _0x4683149ED1DDE7A1(const char* p0) { return _i(0x4683149ED1DDE7A1, p0); } + static Void _0x14D29BB12D47F68C(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x14D29BB12D47F68C, p0, p1, p2, p3, p4); } + + static Any add_navmesh_blocking_object(float p0, float p1, float p2, float p3, float p4, float p5, float p6, bool p7, Any p8) { return _i(0xFCD5C8E06E502F5A, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static Void add_navmesh_required_region(float x, float y, float radius) { return _i(0x387EAD7EE42F6685, x, y, radius); } + static Void _0xAA76052DDA9BFC3E(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0xAA76052DDA9BFC3E, p0, p1, p2, p3, p4, p5, p6); } + static bool are_all_navmesh_regions_loaded() { return _i(0x8415D95B194A3AEA); } + static bool _0xF7B79A50B905A30D(float p0, float p1, float p2, float p3) { return _i(0xF7B79A50B905A30D, p0, p1, p2, p3); } + static float calculate_travel_distance_between_points(float x1, float y1, float z1, float x2, float y2, float z2) { return _i(0xADD95C7005C4A197, x1, y1, z1, x2, y2, z2); } + static Void _0x2801D0012266DF07(Any p0) { return _i(0x2801D0012266DF07, p0); } + static Void disable_navmesh_in_area(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x4C8872D8CDBE1B8B, p0, p1, p2, p3, p4, p5, p6); } + static bool does_navmesh_blocking_object_exist(Any p0) { return _i(0x0EAEB0DB4B132399, p0); } + static int generate_directions_to_coord(float x, float y, float z, bool p3, float* direction, float* p5, float* distToNxJunction) { return _i(0xF90125F1F79ECDF8, x, y, z, p3, direction, p5, distToNxJunction); } + static float _0x3599D741C9AC6310(float p0, float p1, float p2, float p3) { return _i(0x3599D741C9AC6310, p0, p1, p2, p3); } + static float _0x336511A34F2E5185(float left, float right) { return _i(0x336511A34F2E5185, left, right); } + static float _0x8ABE8608576D9CE3(float p0, float p1, float p2, float p3) { return _i(0x8ABE8608576D9CE3, p0, p1, p2, p3); } + static float _0x29C24BFBED8AB8FB(float p0, float p1) { return _i(0x29C24BFBED8AB8FB, p0, p1); } + static bool get_closest_major_vehicle_node(float x, float y, float z, math::vector3* outPosition, float unknown1, int unknown2) { return _i(0x2EABE3B06F58C1BE, x, y, z, outPosition, unknown1, unknown2); } + static Any get_closest_road(float x, float y, float z, float p3, int p4, math::vector3* p5, math::vector3* p6, Any* p7, Any* p8, float* p9, bool p10) { return _i(0x132F52BBA570FE92, x, y, z, p3, p4, p5, p6, p7, p8, p9, p10); } + static bool get_closest_vehicle_node(float x, float y, float z, math::vector3* outPosition, int nodeType, float p5, float p6) { return _i(0x240A18690AE96513, x, y, z, outPosition, nodeType, p5, p6); } + static bool get_closest_vehicle_node_with_heading(float x, float y, float z, math::vector3* outPosition, float* outHeading, int nodeType, float p6, int p7) { return _i(0xFF071FB798B803B0, x, y, z, outPosition, outHeading, nodeType, p6, p7); } + static Any _0x869DAACBBE9FA006() { return _i(0x869DAACBBE9FA006); } + static Any _0xBBB45C3CF5C8AA85() { return _i(0xBBB45C3CF5C8AA85); } + static Any _0xD3A6A0EF48823A8C() { return _i(0xD3A6A0EF48823A8C); } + static bool get_nth_closest_vehicle_node(float x, float y, float z, int nthClosest, math::vector3* outPosition, Any unknown1, Any unknown2, Any unknown3) { return _i(0xE50E52416CCF948B, x, y, z, nthClosest, outPosition, unknown1, unknown2, unknown3); } + static bool get_nth_closest_vehicle_node_favour_direction(float x, float y, float z, float desiredX, float desiredY, float desiredZ, int nthClosest, math::vector3* outPosition, float* outHeading, int nodetype, Any p10, Any p11) { return _i(0x45905BE8654AE067, x, y, z, desiredX, desiredY, desiredZ, nthClosest, outPosition, outHeading, nodetype, p10, p11); } + static int get_nth_closest_vehicle_node_id(float x, float y, float z, int nth, int nodetype, float p5, float p6) { return _i(0x22D7275A79FE8215, x, y, z, nth, nodetype, p5, p6); } + static Any get_nth_closest_vehicle_node_id_with_heading(float x, float y, float z, int nthClosest, math::vector3* outPosition, float outHeading, Any p6, float p7, float p8) { return _i(0x6448050E9C2A7207, x, y, z, nthClosest, outPosition, outHeading, p6, p7, p8); } + static bool get_nth_closest_vehicle_node_with_heading(float x, float y, float z, int nthClosest, math::vector3* outPosition, float* heading, Any* unknown1, int unknown2, float unknown3, float unknown4) { return _i(0x80CA6A8B6C094CC4, x, y, z, nthClosest, outPosition, heading, unknown1, unknown2, unknown3, unknown4); } + static Any _0x01708E8DD3FF8C65(float p0, float p1, float p2, float p3, float p4, float p5) { return _i(0x01708E8DD3FF8C65, p0, p1, p2, p3, p4, p5); } + static Any _0x16F46FB18C8009E4(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x16F46FB18C8009E4, p0, p1, p2, p3, p4); } + static Any _0xF3162836C28F9DA5(Any p0, Any p1, Any p2, Any p3) { return _i(0xF3162836C28F9DA5, p0, p1, p2, p3); } + static bool get_random_vehicle_node(float x, float y, float z, float radius, bool p4, bool p5, bool p6, math::vector3* outPosition, int* nodeId) { return _i(0x93E0DB8440B73A7D, x, y, z, radius, p4, p5, p6, outPosition, nodeId); } + static Any _0xA0F8A7517A273C05(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xA0F8A7517A273C05, p0, p1, p2, p3, p4); } + static bool get_safe_coord_for_ped(float x, float y, float z, bool onGround, math::vector3* outPosition, int flags) { return _i(0xB61C8E878A4199CA, x, y, z, onGround, outPosition, flags); } + static Void get_street_name_at_coord(float x, float y, float z, uint32_t* streetName, uint32_t* crossingRoad) { return _i(0x2EB41072B4C1E4C0, x, y, z, streetName, crossingRoad); } + static bool get_supports_gps_route_flag(int nodeID) { return _i(0xA2AE5C478B96E3B6, nodeID); } + static bool get_is_slow_road_flag(int nodeID) { return _i(0x4F5070AA58F69279, nodeID); } + static Void get_vehicle_node_position(int nodeId, math::vector3* outPosition) { return _i(0x703123E5E7D429C2, nodeId, outPosition); } + static bool get_vehicle_node_properties(float x, float y, float z, int* density, int* flags) { return _i(0x0568566ACBB5DEDC, x, y, z, density, flags); } + static bool is_navmesh_loaded_in_area(float x1, float y1, float z1, float x2, float y2, float z2) { return _i(0xF813C7E63F9062A5, x1, y1, z1, x2, y2, z2); } + static Any _0x705A844002B39DC0() { return _i(0x705A844002B39DC0); } + static bool is_point_on_road(float x, float y, float z, Vehicle vehicle) { return _i(0x125BF4ABFC536B09, x, y, z, vehicle); } + static bool is_vehicle_node_id_valid(int vehicleNodeId) { return _i(0x1EAF30FCFBF5AF74, vehicleNodeId); } + static Void remove_navmesh_blocking_object(Any p0) { return _i(0x46399A7895957C0E, p0); } + static Void remove_navmesh_required_regions() { return _i(0x916F0A3CDEC3445E); } + static bool _0x07FB139B592FA687(float p0, float p1, float p2, float p3) { return _i(0x07FB139B592FA687, p0, p1, p2, p3); } + static Void _0x228E5C6AD4D74BFD(bool p0) { return _i(0x228E5C6AD4D74BFD, p0); } + static Void _0x0B919E1FB47CC4E0(float p0) { return _i(0x0B919E1FB47CC4E0, p0); } + static Void set_gps_disabled_zone(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0xDC20483CD3DD5201, p0, p1, p2, p3, p4, p5); } + static Void _0xD0BC1C6FB18EE154(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0xD0BC1C6FB18EE154, p0, p1, p2, p3, p4, p5, p6); } + static Void set_ignore_no_gps_flag(bool ignore) { return _i(0x72751156E7678833, ignore); } + static Void _0x1FC289A0C3FF470F(bool p0) { return _i(0x1FC289A0C3FF470F, p0); } + static Void set_ped_paths_back_to_original(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0xE04B48F2CC926253, p0, p1, p2, p3, p4, p5, p6); } + static Void set_ped_paths_in_area(float x1, float y1, float z1, float x2, float y2, float z2, bool unknown, Any p7) { return _i(0x34F060F4BF92E018, x1, y1, z1, x2, y2, z2, unknown, p7); } + static Void set_roads_back_to_original(float p0, float p1, float p2, float p3, float p4, float p5, Any p6) { return _i(0x1EE7063B80FFC77C, p0, p1, p2, p3, p4, p5, p6); } + static Void set_roads_back_to_original_in_angled_area(float x1, float y1, float z1, float x2, float y2, float z2, float p6, Any p7) { return _i(0x0027501B9F3B407E, x1, y1, z1, x2, y2, z2, p6, p7); } + static Void set_roads_in_angled_area(float x1, float y1, float z1, float x2, float y2, float z2, float angle, bool unknown1, bool unknown2, bool unknown3) { return _i(0x1A5AA1208AF5DB59, x1, y1, z1, x2, y2, z2, angle, unknown1, unknown2, unknown3); } + static Void set_roads_in_area(float x1, float y1, float z1, float x2, float y2, float z2, bool unknown1, bool unknown2) { return _i(0xBF1A602B5BA52FEE, x1, y1, z1, x2, y2, z2, unknown1, unknown2); } + static Void update_navmesh_blocking_object(Any p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, Any p8) { return _i(0x109E99373F290687, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + + static Void add_armour_to_ped(Ped ped, int amount) { return _i(0x5BA652A0CD14DF2F, ped, amount); } + static Void set_ped_decoration(Ped ped, uint32_t collection, uint32_t overlay) { return _i(0x5F5D1665E352A839, ped, collection, overlay); } + static Void set_ped_facial_decoration(Ped ped, uint32_t collection, uint32_t overlay) { return _i(0x5619BFA07CFD7833, ped, collection, overlay); } + static Any add_relationship_group(const char* name, uint32_t* groupHash) { return _i(0xF372BC22FCB88606, name, groupHash); } + static Any add_scenario_blocking_area(float p0, float p1, float p2, float p3, float p4, float p5, bool p6, bool p7, bool p8, bool p9) { return _i(0x1B5C85C612E5256E, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void apply_damage_to_ped(Ped ped, int damageAmount, bool p2) { return _i(0x697157CED63F18D4, ped, damageAmount, p2); } + static Void apply_ped_blood(Ped ped, int boneIndex, float xRot, float yRot, float zRot, const char* woundType) { return _i(0x83F7E01C7B769A26, ped, boneIndex, xRot, yRot, zRot, woundType); } + static Void apply_ped_blood_by_zone(Ped ped, Any p1, float p2, float p3, Any* p4) { return _i(0x3311E47B91EDCBBC, ped, p1, p2, p3, p4); } + static Void apply_ped_blood_damage_by_zone(Ped ped, Any p1, float p2, float p3, Any p4) { return _i(0x816F6981C60BF53B, ped, p1, p2, p3, p4); } + static Void apply_ped_blood_specific(Ped ped, Any p1, float p2, float p3, float p4, float p5, Any p6, float p7, Any* p8) { return _i(0xEF0D582CBF2D9B0F, ped, p1, p2, p3, p4, p5, p6, p7, p8); } + static Void apply_ped_damage_decal(Ped ped, int p1, float p2, float p3, float p4, float p5, float p6, int p7, bool p8, const char* p9) { return _i(0x397C38AA7B4A5F83, ped, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void apply_ped_damage_pack(Ped ped, const char* damagePack, float damage, float mult) { return _i(0x46DF918788CB093F, ped, damagePack, damage, mult); } + static Void attach_synchronized_scene_to_entity(int sceneID, Entity entity, int boneIndex) { return _i(0x272E4723B56A3B96, sceneID, entity, boneIndex); } + static Void _0xE43A13C9E4CCCBCF(Ped ped, bool p1) { return _i(0xE43A13C9E4CCCBCF, ped, p1); } + static bool can_create_random_bike_rider() { return _i(0xEACEEDA81751915C); } + static bool can_create_random_cops() { return _i(0x5EE2CAFF7F17770D); } + static bool can_create_random_driver() { return _i(0xB8EB95E5B4E56978); } + static bool can_create_random_ped(bool unk) { return _i(0x3E8349C08E4B82E4, unk); } + static bool can_knock_ped_off_vehicle(Ped ped) { return _i(0x51AC07A44D4F5B8A, ped); } + static bool can_ped_in_combat_see_target(Ped ped, Ped target) { return _i(0xEAD42DE3610D0721, ped, target); } + static bool can_ped_ragdoll(Ped ped) { return _i(0x128F79EDCECE4FD5, ped); } + static bool can_ped_see_ped(Ped ped1, Ped ped2) { return _i(0x6CD5A433374D4CFB, ped1, ped2); } + static Any _0x2DFC81C9B9608549(Any p0, Any p1) { return _i(0x2DFC81C9B9608549, p0, p1); } + static bool _0x9C6A6C19B6C0C496(Ped p0, Any* p1) { return _i(0x9C6A6C19B6C0C496, p0, p1); } + static Void clear_all_ped_props(Ped ped) { return _i(0xCD8A7537A9B52F06, ped); } + static Void _0xE6CA85E7259CE16B(Any p0) { return _i(0xE6CA85E7259CE16B, p0); } + static Void clear_facial_idle_anim_override(Ped ped) { return _i(0x726256CC1EEB182F, ped); } + static Void clear_ped_alternate_movement_anim(Ped ped, int stance, float p2) { return _i(0xD8D19675ED5FBDCE, ped, stance, p2); } + static Void clear_ped_alternate_walk_anim(Ped ped, float p1) { return _i(0x8844BBFCE30AA9E9, ped, p1); } + static Void clear_ped_blood_damage_by_zone(Ped ped, int p1) { return _i(0x56E3B78C5408D9F4, ped, p1); } + static Void clear_ped_damage_decal_by_zone(Ped ped, int p1, const char* p2) { return _i(0x523C79AEEFCC4A2A, ped, p1, p2); } + static Void clear_ped_decorations(Ped ped) { return _i(0x0E5173C163976E38, ped); } + static Void clear_ped_facial_decorations(Ped ped) { return _i(0xE3B27E70CEAB9F0C, ped); } + static Void clear_ped_drive_by_clipset_override(Ped ped) { return _i(0x4AFE3690D7E0B5AC, ped); } + static Void _0x6585D955A68452A5(Ped ped) { return _i(0x6585D955A68452A5, ped); } + static Void _0x80054D7FCC70EEC6(Any p0) { return _i(0x80054D7FCC70EEC6, p0); } + static Void clear_ped_last_damage_bone(Ped ped) { return _i(0x8EF6B7AC68E2F01B, ped); } + static Void _0xC79196DCB36F6121(Any p0) { return _i(0xC79196DCB36F6121, p0); } + static Void clear_ped_non_creation_area() { return _i(0x2E05208086BA0651); } + static Void _0x1280804F7CFD2D6C(Any p0) { return _i(0x1280804F7CFD2D6C, p0); } + static Void clear_ped_prop(Ped ped, int propId) { return _i(0x0943E5B8E078E76E, ped, propId); } + static Void _0xB50EB4CCB29704AC(Any p0) { return _i(0xB50EB4CCB29704AC, p0); } + static Void _0x687C0B594907D2E8(Ped ped) { return _i(0x687C0B594907D2E8, ped); } + static Void clear_ped_wetness(Ped ped) { return _i(0x9C720776DAA43E7E, ped); } + static Void reset_ped_ragdoll_blocking_flags(Ped ped, int flags) { return _i(0xD86D101FCFD00A4B, ped, flags); } + static Void clear_relationship_between_groups(int relationship, uint32_t group1, uint32_t group2) { return _i(0x5E29243FB56FC6D4, relationship, group1, group2); } + static Ped clone_ped(Ped ped, float heading, bool isNetwork, bool p3) { return _i(0xEF29A16337FACADB, ped, heading, isNetwork, p3); } + static Any _0x668FD40BCBA5DE48(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x668FD40BCBA5DE48, p0, p1, p2, p3, p4); } + static Void clone_ped_to_target(Ped ped, Ped targetPed) { return _i(0xE952D6431689AD9A, ped, targetPed); } + static Void _0x148B08C2D2ACB884(Any p0, Any p1, Any p2) { return _i(0x148B08C2D2ACB884, p0, p1, p2); } + static int _0x5407B7288D0478B7(Any p0) { return _i(0x5407B7288D0478B7, p0); } + static Any _0x336B3D200AB007CB(Any p0, float p1, float p2, float p3, float p4) { return _i(0x336B3D200AB007CB, p0, p1, p2, p3, p4); } + static int create_group(int unused) { return _i(0x90370EBE0FEE1A3D, unused); } + static Void create_nm_message(bool startImmediately, int messageId) { return _i(0x418EF2A1BCE56685, startImmediately, messageId); } + static Entity _0x8C4F3BF23B6237DB(Ped ped, bool p1, bool p2) { return _i(0x8C4F3BF23B6237DB, ped, p1, p2); } + static Ped create_ped(int pedType, uint32_t modelHash, float x, float y, float z, float heading, bool isNetwork, bool p7) { return _i(0xD49F9B0955C367DE, pedType, modelHash, x, y, z, heading, isNetwork, p7); } + static Ped create_ped_inside_vehicle(Vehicle vehicle, int pedType, uint32_t modelHash, int seat, bool isNetwork, bool p5) { return _i(0x7DD959874C1FD534, vehicle, pedType, modelHash, seat, isNetwork, p5); } + static Ped create_random_ped(float posX, float posY, float posZ) { return _i(0xB4AC7D0CF06BFE8F, posX, posY, posZ); } + static Ped create_random_ped_as_driver(Vehicle vehicle, bool returnHandle) { return _i(0x9B62392B474F44A0, vehicle, returnHandle); } + static int create_synchronized_scene(float x, float y, float z, float roll, float pitch, float yaw, int p6) { return _i(0x8C18E0F9080ADD73, x, y, z, roll, pitch, yaw, p6); } + static int create_synchronized_scene2(float x, float y, float z, float radius, uint32_t object) { return _i(0x62EC273D00187DCA, x, y, z, radius, object); } + static Void delete_ped(Ped* ped) { return _i(0x9614299DCB53E54B, ped); } + static Void detach_synchronized_scene(int sceneID) { return _i(0x6D38F1F04CBB37EA, sceneID); } + static Void _0xA21C118553BBDF02(Any p0) { return _i(0xA21C118553BBDF02, p0); } + static Void _0x600048C60D5C2C51(Any p0) { return _i(0x600048C60D5C2C51, p0); } + static Void _0x733C87D4CE22BEA2(Any p0) { return _i(0x733C87D4CE22BEA2, p0); } + static bool does_group_exist(int groupId) { return _i(0x7C6B0C22F9F40BBE, groupId); } + static Any _0xCC6E3B6BB69501F1(Any p0) { return _i(0xCC6E3B6BB69501F1, p0); } + static Any _0x8A24B067D175A7BD(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0x8A24B067D175A7BD, p0, p1, p2, p3, p4, p5); } + static Void _0xAFF4710E2A0A6C12(Ped ped) { return _i(0xAFF4710E2A0A6C12, ped); } + static Void explode_ped_head(Ped ped, uint32_t weaponHash) { return _i(0x2D05CED3A38D0F3A, ped, weaponHash); } + static Void _0x4668D80430D6C299(Ped ped) { return _i(0x4668D80430D6C299, ped); } + static Void freeze_ped_camera_rotation(Ped ped) { return _i(0xFF287323B0E2C69A, ped); } + static Void _0xED3C76ADFA6D07C4(Any p0) { return _i(0xED3C76ADFA6D07C4, p0); } + static Void _0x2208438012482A1A(Ped ped, bool p1, bool p2) { return _i(0x2208438012482A1A, ped, p1, p2); } + static bool force_ped_motion_state(Ped ped, uint32_t motionStateHash, bool p2, bool p3, bool p4) { return _i(0xF28965D04F570DCA, ped, motionStateHash, p2, p3, p4); } + static Void force_ped_to_open_parachute(Ped ped) { return _i(0x16E42E800B472221, ped); } + static Void _0xD33DAA36272177C4(Ped ped) { return _i(0xD33DAA36272177C4, ped); } + static math::vector3 get_anim_initial_offset_position(const char* animDict, const char* animName, float x, float y, float z, float xRot, float yRot, float zRot, float p8, int p9) { return _i>(0xBE22B26DD764C040, animDict, animName, x, y, z, xRot, yRot, zRot, p8, p9); } + static math::vector3 get_anim_initial_offset_rotation(const char* animDict, const char* animName, float x, float y, float z, float xRot, float yRot, float zRot, float p8, int p9) { return _i>(0x4B805E6046EE9E47, animDict, animName, x, y, z, xRot, yRot, zRot, p8, p9); } + static bool _0x03EA03AF85A85CB7(Ped ped, bool p1, bool p2, bool p3, bool p4, bool p5, bool p6, bool p7, Any p8) { return _i(0x03EA03AF85A85CB7, ped, p1, p2, p3, p4, p5, p6, p7, p8); } + static bool get_closest_ped(float x, float y, float z, float radius, bool p4, bool p5, Ped* outPed, bool p7, bool p8, int pedType) { return _i(0xC33AB876A77F8164, x, y, z, radius, p4, p5, outPed, p7, p8, pedType); } + static float get_combat_float(Ped ped, int p1) { return _i(0x52DFF8A10508090A, ped, p1); } + static math::vector3 get_dead_ped_pickup_coords(Ped ped, float p1, float p2) { return _i>(0xCD5003B097200F36, ped, p1, p2); } + static Any _0xAAA6A3698A69E048(Any p0) { return _i(0xAAA6A3698A69E048, p0); } + static int _0xEA9960D07DADCF10(Any p0) { return _i(0xEA9960D07DADCF10, p0); } + static Any _0xF033419D1B81FAE8(Any p0) { return _i(0xF033419D1B81FAE8, p0); } + static Any _0x1E77FA7A62EE6C4C(Any p0) { return _i(0x1E77FA7A62EE6C4C, p0); } + static Void get_group_size(int groupID, Any* unknown, int* sizeInMembers) { return _i(0x8DE69FE35CA09A45, groupID, unknown, sizeInMembers); } + static Any _0x76BBA2CEE66D47E9(Any p0) { return _i(0x76BBA2CEE66D47E9, p0); } + static Ped get_jack_target(Ped ped) { return _i(0x5486A79D9FBD342D, ped); } + static Ped get_melee_target_for_ped(Ped ped) { return _i(0x18A3E9EE1297FD39, ped); } + static bool is_ped_on_mount(Ped ped) { return _i(0x460BC76A0E10655E, ped); } + static Ped get_mount(Ped ped) { return _i(0xE7E11B8DCBED1058, ped); } + static bool _0x9E30E91FB03A2CAF(Any* p0, Any* p1) { return _i(0x9E30E91FB03A2CAF, p0, p1); } + static int get_number_of_ped_drawable_variations(Ped ped, int componentId) { return _i(0x27561561732A7842, ped, componentId); } + static int get_number_of_ped_prop_drawable_variations(Ped ped, int propId) { return _i(0x5FAF9754E789FB47, ped, propId); } + static int get_number_of_ped_prop_texture_variations(Ped ped, int propId, int drawableId) { return _i(0xA6E7F1CEB523E171, ped, propId, drawableId); } + static int get_number_of_ped_texture_variations(Ped ped, int componentId, int drawableId) { return _i(0x8F7156A3142A6BAD, ped, componentId, drawableId); } + static int get_num_hair_colors() { return _i(0xE5C0CF872C2AD150); } + static int get_num_makeup_colors() { return _i(0xD1F7CA1535D22818); } + static const char* get_pedheadshot_txd_string(int handle) { return _i(0xDB4EACD4AD0A5D6B, handle); } + static Ped get_peds_jacker(Ped ped) { return _i(0x9B128DC36C1E04CF, ped); } + static int get_ped_accuracy(Ped ped) { return _i(0x37F4AD56ECBC0CD6, ped); } + static int get_ped_alertness(Ped ped) { return _i(0xF6AA118530443FD2, ped); } + static int get_ped_armour(Ped ped) { return _i(0x9483AF821605B1D8, ped); } + static Ped get_ped_as_group_leader(int groupID) { return _i(0x5CCE68DBD5FE93EC, groupID); } + static Ped get_ped_as_group_member(int groupID, int memberNumber) { return _i(0x51455483CF23ED97, groupID, memberNumber); } + static math::vector3 get_ped_bone_coords(Ped ped, int boneId, float offsetX, float offsetY, float offsetZ) { return _i>(0x17C07FC640E86B4E, ped, boneId, offsetX, offsetY, offsetZ); } + static int get_ped_bone_index(Ped ped, int boneId) { return _i(0x3F428D08BE5AAE31, ped, boneId); } + static uint32_t get_ped_cause_of_death(Ped ped) { return _i(0x16FFE42AB2D2DC59, ped); } + static int get_ped_combat_movement(Ped ped) { return _i(0xDEA92412FCAEB3F5, ped); } + static Any get_ped_combat_range(Ped ped) { return _i(0xF9D9F7F2DB8E2FA0, ped); } + static bool get_ped_config_flag(Ped ped, int flagId, bool p2) { return _i(0x7EE53118C892B513, ped, flagId, p2); } + static bool _0xF60165E1D2C5370B(Ped ped, Any* p1, Any* p2) { return _i(0xF60165E1D2C5370B, ped, p1, p2); } + static Any get_ped_decorations_state(Ped ped) { return _i(0x71EAB450D86954A1, ped); } + static int get_tattoo_zone(uint32_t collection, uint32_t overlay) { return _i(0x9FD452BFBE7A7A8B, collection, overlay); } + static math::vector3 get_ped_defensive_area_position(Ped ped, bool p1) { return _i>(0x3C06B8786DD94CD1, ped, p1); } + static int get_ped_drawable_variation(Ped ped, int componentId) { return _i(0x67F3780DD425D4FC, ped, componentId); } + static Any _0x1461B28A06717D68(Any p0) { return _i(0x1461B28A06717D68, p0); } + static float get_ped_enveff_scale(Ped ped) { return _i(0x9C14D30395A51A3C, ped); } + static math::vector3 get_ped_extracted_displacement(Ped ped, bool worldSpace) { return _i>(0xE0AF41401ADF87E3, ped, worldSpace); } + static int get_ped_group_index(Ped ped) { return _i(0xF162E133B4E7A675, ped); } + static Void _0x4852FC386E2E1BB5(Any p0, Any* p1, Any* p2, Any* p3) { return _i(0x4852FC386E2E1BB5, p0, p1, p2, p3); } + static bool get_ped_head_blend_data(Ped ped, Any* headBlendData) { return _i(0x2746BD9D88C5C5D0, ped, headBlendData); } + static int get_first_parent_id_for_ped_type(int type) { return _i(0x68D353AB88B97E0C, type); } + static int get_num_parent_peds_of_type(int type) { return _i(0x5EF37013A6539C9D, type); } + static int get_ped_head_overlay_value(Ped ped, int overlayID) { return _i(0xA60EF3B6461A4D43, ped, overlayID); } + static int get_num_head_overlay_values(int overlayID) { return _i(0xCF1CE768BB43480E, overlayID); } + static Any _0x451294E859ECC018(Any p0) { return _i(0x451294E859ECC018, p0); } + static Any _0x9D728C1E12BF5518(Any p0) { return _i(0x9D728C1E12BF5518, p0); } + static bool get_ped_last_damage_bone(Ped ped, int* outBone) { return _i(0xD75960F6BD9EA49C, ped, outBone); } + static Void _0x013E5CFC38CD5387(Any p0, Any* p1, Any* p2, Any* p3) { return _i(0x013E5CFC38CD5387, p0, p1, p2, p3); } + static int get_ped_max_health(Ped ped) { return _i(0x4700A416E8324EF3, ped); } + static int get_ped_money(Ped ped) { return _i(0x3F69145BBA87BAE7, ped); } + static int get_ped_nearby_peds(Ped ped, int* sizeAndPeds, int ignore) { return _i(0x23F8F5FC7E8C4A6B, ped, sizeAndPeds, ignore); } + static int get_ped_nearby_vehicles(Ped ped, int* sizeAndVehs) { return _i(0xCFF869CBFA210D82, ped, sizeAndVehs); } + static int get_ped_palette_variation(Ped ped, int componentId) { return _i(0xE3DD5F2A84B42281, ped, componentId); } + static int get_ped_parachute_landing_type(Ped ped) { return _i(0x8B9F1FC6AE8166C0, ped); } + static int get_ped_parachute_state(Ped ped) { return _i(0x79CFD9827CC979B6, ped); } + static Void get_ped_parachute_tint_index(Ped ped, int* outTintIndex) { return _i(0xEAF5F7E5AE7C6C9D, ped, outTintIndex); } + static int get_ped_prop_index(Ped ped, int componentId) { return _i(0x898CC20EA75BACD8, ped, componentId); } + static int get_ped_prop_texture_index(Ped ped, int componentId) { return _i(0xE131A28626F81AB2, ped, componentId); } + static int get_ped_ragdoll_bone_index(Ped ped, int bone) { return _i(0x2057EF813397A772, ped, bone); } + static uint32_t get_ped_relationship_group_default_hash(Ped ped) { return _i(0x42FDD0F017B1E38E, ped); } + static uint32_t get_ped_relationship_group_hash(Ped ped) { return _i(0x7DBDD04862D95F04, ped); } + static bool get_ped_reset_flag(Ped ped, int flagId) { return _i(0xAF9E59B1B1FBF2A0, ped, flagId); } + static Entity get_ped_source_of_death(Ped ped) { return _i(0x93C8B64DEB84728C, ped); } + static bool get_ped_stealth_movement(Ped ped) { return _i(0x7C2AC9CA66575FBF, ped); } + static int get_ped_texture_variation(Ped ped, int componentId) { return _i(0x04A355E041E004E6, ped, componentId); } + static int get_ped_time_of_death(Ped ped) { return _i(0x1E98817B311AE98A, ped); } + static int get_ped_type(Ped ped) { return _i(0xFF059E1E4C01E63C, ped); } + static Player get_player_ped_is_following(Ped ped) { return _i(0x6A3975DEA89F9A17, ped); } + static Ped get_random_ped_at_coord(float x, float y, float z, float xRadius, float yRadius, float zRadius, int pedType) { return _i(0x876046A8E3A4B71C, x, y, z, xRadius, yRadius, zRadius, pedType); } + static int get_relationship_between_groups(uint32_t group1, uint32_t group2) { return _i(0x9E6B70061662AE5C, group1, group2); } + static int get_relationship_between_peds(Ped ped1, Ped ped2) { return _i(0xEBA5AD3A0EAF7121, ped1, ped2); } + static int get_seat_ped_is_trying_to_enter(Ped ped) { return _i(0x6F4C85ACD641BCD2, ped); } + static float get_synchronized_scene_phase(int sceneID) { return _i(0xE4A310B1D7FA73CC, sceneID); } + static float get_synchronized_scene_rate(int sceneID) { return _i(0xD80932D577274D40, sceneID); } + static Any _0x36B77BB84687C318(Ped ped, Any p1) { return _i(0x36B77BB84687C318, ped, p1); } + static Any _0xC56FBF2F228E1DAC(Any p0, Any p1, Any p2) { return _i(0xC56FBF2F228E1DAC, p0, p1, p2); } + static Any _0x511F1A683387C7E2(Any p0) { return _i(0x511F1A683387C7E2, p0); } + static Vehicle get_vehicle_ped_is_entering(Ped ped) { return _i(0xF92691AED837A5FC, ped); } + static Vehicle get_vehicle_ped_is_in(Ped ped, bool lastVehicle) { return _i(0x9A9112A0FE9A4713, ped, lastVehicle); } + static Vehicle get_vehicle_ped_is_trying_to_enter(Ped ped) { return _i(0x814FA8BE5449445D, ped); } + static Vehicle get_vehicle_ped_is_using(Ped ped) { return _i(0x6094AD011A2EA87D, ped); } + static Void give_ped_helmet(Ped ped, bool cannotRemove, int helmetFlag, int textureIndex) { return _i(0x54C7C4A94367717E, ped, cannotRemove, helmetFlag, textureIndex); } + static Void give_ped_nm_message(Ped ped) { return _i(0xB158DFCCC56E5C5B, ped); } + static bool has_action_mode_asset_loaded(const char* asset) { return _i(0xE4B5F4BF2CB24E65, asset); } + static Any _0x876928DDDFCCC9CD() { return _i(0x876928DDDFCCC9CD); } + static Any _0xE8A169E666CBC541() { return _i(0xE8A169E666CBC541); } + static bool has_ped_head_blend_finished(Ped ped) { return _i(0x654CD0A825161131, ped); } + static bool _0x784002A632822099(Ped ped) { return _i(0x784002A632822099, ped); } + static bool _0x66680A92700F43DF(Ped p0) { return _i(0x66680A92700F43DF, p0); } + static bool has_ped_received_event(Any p0, Any p1) { return _i(0x8507BCB710FA6DC0, p0, p1); } + static bool has_stealth_mode_asset_loaded(const char* asset) { return _i(0xE977FC5B08AF3441, asset); } + static bool _0x7350823473013C02(Ped ped) { return _i(0x7350823473013C02, ped); } + static Void hide_ped_blood_damage_by_zone(Ped ped, Any p1, bool p2) { return _i(0x62AB793144DE75DC, ped, p1, p2); } + static Void _0x4759CC730F947C81() { return _i(0x4759CC730F947C81); } + static bool _0x68772DB2B2526F9F(Ped ped, float x, float y, float z, float range) { return _i(0x68772DB2B2526F9F, ped, x, y, z, range); } + static bool is_any_ped_near_point(float x, float y, float z, float radius) { return _i(0x083961498679DC9F, x, y, z, radius); } + static bool is_any_ped_shooting_in_area(float x1, float y1, float z1, float x2, float y2, float z2, bool p6, bool p7) { return _i(0xA0D3D71EA1086C55, x1, y1, z1, x2, y2, z2, p6, p7); } + static bool is_conversation_ped_dead(Ped ped) { return _i(0xE0A0AEC214B1FABA, ped); } + static bool is_cop_ped_in_area3_d(float x1, float y1, float z1, float x2, float y2, float z2) { return _i(0x16EC4839969F9F5E, x1, y1, z1, x2, y2, z2); } + static bool _0xF2385935BFFD4D92(Any p0) { return _i(0xF2385935BFFD4D92, p0); } + static bool _0xA3F3564A5B3646C0(Ped ped) { return _i(0xA3F3564A5B3646C0, ped); } + static Any _0xEBB376779A760AA8() { return _i(0xEBB376779A760AA8); } + static bool is_pedheadshot_ready(int handle) { return _i(0x7085228842B13A67, handle); } + static bool is_pedheadshot_valid(int handle) { return _i(0xA0A9668F158129A2, handle); } + static bool is_ped_aiming_from_cover(Ped ped) { return _i(0x3998B1276A3300E5, ped); } + static bool is_ped_a_player(Ped ped) { return _i(0x12534C348C6CB68B, ped); } + static bool is_ped_being_jacked(Ped ped) { return _i(0x9A497FE2DF198913, ped); } + static bool is_ped_being_stealth_killed(Ped ped) { return _i(0x863B23EFDE9C5DF2, ped); } + static bool is_ped_being_stunned(Ped ped, int p1) { return _i(0x4FBACCE3B4138EE8, ped, p1); } + static bool is_ped_blush_color_valid(int colorID) { return _i(0x604E810189EE3A59, colorID); } + static bool _0xF41B5D290C99A3D6(Any p0) { return _i(0xF41B5D290C99A3D6, p0); } + static bool is_ped_climbing(Ped ped) { return _i(0x53E8CB4F48BFE623, ped); } + static bool is_ped_component_variation_valid(Ped ped, int componentId, int drawableId, int textureId) { return _i(0xE825F6B6CEA7671D, ped, componentId, drawableId, textureId); } + static bool is_ped_dead_or_dying(Ped ped, bool p1) { return _i(0x3317DEDB88C95038, ped, p1); } + static bool _0xBA63D9FE45412247(Ped ped, bool p1) { return _i(0xBA63D9FE45412247, ped, p1); } + static bool is_ped_diving(Ped ped) { return _i(0x5527B8246FEF9B11, ped); } + static Any _0x451D05012CCEC234(Any p0) { return _i(0x451D05012CCEC234, p0); } + static bool is_ped_doing_driveby(Ped ped) { return _i(0xB2C086CC1BF8F2BF, ped); } + static bool is_ped_ducking(Ped ped) { return _i(0xD125AE748725C6BC, ped); } + static bool is_ped_evasive_diving(Ped ped, Entity* evadingEntity) { return _i(0x414641C26E105898, ped, evadingEntity); } + static bool is_ped_facing_ped(Ped ped, Ped otherPed, float angle) { return _i(0xD71649DB0A545AA3, ped, otherPed, angle); } + static bool is_ped_falling(Ped ped) { return _i(0xFB92A102F1C4DFA3, ped); } + static bool is_ped_fatally_injured(Ped ped) { return _i(0xD839450756ED5A80, ped); } + static bool is_ped_fleeing(Ped ped) { return _i(0xBBCCE00B381F8482, ped); } + static bool is_ped_getting_into_a_vehicle(Ped ped) { return _i(0xBB062B2B5722478E, ped); } + static bool is_ped_going_into_cover(Ped ped) { return _i(0x9F65DBC537E59AD5, ped); } + static bool is_ped_group_member(Ped ped, int groupId) { return _i(0x9BB01E3834671191, ped, groupId); } + static bool is_ped_hair_color_valid(int colorID) { return _i(0xE0D36E5D9E99CC21, colorID); } + static bool _0xED6D8E27A43B8CDE(Any p0) { return _i(0xED6D8E27A43B8CDE, p0); } + static bool is_ped_hanging_on_to_vehicle(Ped ped) { return _i(0x1C86D8AEF8254B78, ped); } + static bool _0xFCF37A457CB96DC0(Any p0, float p1, float p2, float p3, float p4) { return _i(0xFCF37A457CB96DC0, p0, p1, p2, p3, p4); } + static bool is_ped_headtracking_entity(Ped ped, Entity entity) { return _i(0x813A0A7C9D2E831F, ped, entity); } + static bool is_ped_headtracking_ped(Ped ped1, Ped ped2) { return _i(0x5CD3CB88A7F8850D, ped1, ped2); } + static Any _0xB9496CE47546DB2C(Any p0) { return _i(0xB9496CE47546DB2C, p0); } + static bool is_ped_human(Ped ped) { return _i(0xB980061DA992779D, ped); } + static bool is_ped_hurt(Ped ped) { return _i(0x5983BB449D7FDB12, ped); } + static bool is_ped_injured(Ped ped) { return _i(0x84A2DD9AC37C35C1, ped); } + static bool is_ped_in_any_boat(Ped ped) { return _i(0x2E0E1C2B4F6CB339, ped); } + static bool is_ped_in_any_heli(Ped ped) { return _i(0x298B91AE825E5705, ped); } + static bool is_ped_in_any_plane(Ped ped) { return _i(0x5FFF4CFC74D8FB80, ped); } + static bool is_ped_in_any_police_vehicle(Ped ped) { return _i(0x0BD04E29640C9C12, ped); } + static bool is_ped_in_any_sub(Ped ped) { return _i(0xFBFC01CCFB35D99E, ped); } + static bool is_ped_in_any_taxi(Ped ped) { return _i(0x6E575D6A898AB852, ped); } + static bool is_ped_in_any_train(Ped ped) { return _i(0x6F972C1AB75A1ED0, ped); } + static bool is_ped_in_any_vehicle(Ped ped, bool atGetIn) { return _i(0x997ABD671D25CA0B, ped, atGetIn); } + static bool is_ped_in_combat(Ped ped, Ped target) { return _i(0x4859F1FC66A6278E, ped, target); } + static bool is_ped_in_cover(Ped ped, bool p1) { return _i(0x60DFD0691A170B88, ped, p1); } + static bool is_ped_in_cover_facing_left(Ped ped) { return _i(0x845333B3150583AB, ped); } + static bool is_ped_in_flying_vehicle(Ped ped) { return _i(0x9134873537FA419C, ped); } + static bool is_ped_in_group(Ped ped) { return _i(0x5891CAC5D4ACFF74, ped); } + static bool is_ped_standing_in_cover(Ped ped) { return _i(0x6A03BF943D767C93, ped); } + static bool is_ped_in_melee_combat(Ped ped) { return _i(0x4E209B2C1EAD5159, ped); } + static bool is_ped_in_model(Ped ped, uint32_t modelHash) { return _i(0x796D90EFB19AA332, ped, modelHash); } + static bool is_ped_in_parachute_free_fall(Ped ped) { return _i(0x7DCE8BDA0F1C1200, ped); } + static bool is_ped_in_vehicle(Ped ped, Vehicle vehicle, bool atGetIn) { return _i(0xA3EE4A07279BB9DB, ped, vehicle, atGetIn); } + static bool is_ped_jacking(Ped ped) { return _i(0x4AE4FF911DFB61DA, ped); } + static bool is_ped_jumping(Ped ped) { return _i(0xCEDABC5900A0BF97, ped); } + static bool is_ped_jumping_out_of_vehicle(Ped ped) { return _i(0x433DDFFE2044B636, ped); } + static Any _0x412F1364FA066CFB(Any p0) { return _i(0x412F1364FA066CFB, p0); } + static bool is_ped_lipstick_color_valid(int colorID) { return _i(0x0525A2C2562F3CD4, colorID); } + static bool _0x3E802F11FBE27674(Any p0) { return _i(0x3E802F11FBE27674, p0); } + static bool is_ped_male(Ped ped) { return _i(0x6D9F5FAA7488BA46, ped); } + static bool is_ped_model(Ped ped, uint32_t modelHash) { return _i(0xC9D55B1A358A5BF7, ped, modelHash); } + static bool is_ped_on_any_bike(Ped ped) { return _i(0x94495889E22C6479, ped); } + static bool is_ped_on_foot(Ped ped) { return _i(0x01FEE67DB37F59B2, ped); } + static bool is_ped_on_specific_vehicle(Ped ped, Vehicle vehicle) { return _i(0xEC5F66E459AF3BB2, ped, vehicle); } + static bool is_ped_on_vehicle(Ped ped) { return _i(0x67722AEB798E5FAB, ped); } + static bool _0x26AF0E8E30BD2A2C(Ped ped) { return _i(0x26AF0E8E30BD2A2C, ped); } + static bool _0xEBD0EDBA5BE957CF(Ped ped) { return _i(0xEBD0EDBA5BE957CF, ped); } + static bool _0xDCCA191DF9980FD7(Ped ped) { return _i(0xDCCA191DF9980FD7, ped); } + static bool is_ped_performing_stealth_kill(Ped ped) { return _i(0xFD4CCDBCC59941B7, ped); } + static bool is_ped_planting_bomb(Ped ped) { return _i(0xC70B5FAE151982D8, ped); } + static bool is_ped_prone(Ped ped) { return _i(0xD6A86331A537A7B9, ped); } + static bool is_ped_ragdoll(Ped ped) { return _i(0x47E4E977581C5B55, ped); } + static bool is_ped_reloading(Ped ped) { return _i(0x24B100C68C645951, ped); } + static bool is_ped_responding_to_event(Ped ped, Any event) { return _i(0x625B774D75C87068, ped, event); } + static bool _0xD1871251F3B5ACD7(Ped ped) { return _i(0xD1871251F3B5ACD7, ped); } + static bool is_ped_running_mobile_phone_task(Ped ped) { return _i(0x2AFE52F782F25775, ped); } + static bool is_ped_running_ragdoll_task(Ped ped) { return _i(0xE3B6097CC25AA69E, ped); } + static Any _0x81AA517FBBA05D39(Any p0) { return _i(0x81AA517FBBA05D39, p0); } + static bool _0xB8B52E498014F5B0(Ped ped) { return _i(0xB8B52E498014F5B0, ped); } + static bool is_ped_shooting(Ped ped) { return _i(0x34616828CD07F1A1, ped); } + static bool is_ped_shooting_in_area(Ped ped, float x1, float y1, float z1, float x2, float y2, float z2, bool p7, bool p8) { return _i(0x7E9DFE24AC1E58EF, ped, x1, y1, z1, x2, y2, z2, p7, p8); } + static bool is_ped_sitting_in_any_vehicle(Ped ped) { return _i(0x826AA586EDB9FEF8, ped); } + static bool is_ped_sitting_in_vehicle(Ped ped, Vehicle vehicle) { return _i(0xA808AA1D79230FC2, ped, vehicle); } + static bool is_ped_stopped(Ped ped) { return _i(0x530944F6F4B8A214, ped); } + static bool is_ped_swimming(Ped ped) { return _i(0x9DE327631295B4C2, ped); } + static bool is_ped_swimming_under_water(Ped ped) { return _i(0xC024869A53992F34, ped); } + static Any _0x3795688A307E1EB6(Any p0) { return _i(0x3795688A307E1EB6, p0); } + static bool _0x14590DDBEDB1EC85(Ped ped) { return _i(0x14590DDBEDB1EC85, ped); } + static bool is_ped_tracked(Ped ped) { return _i(0x4C5E1F087CD10BB7, ped); } + static bool is_ped_trying_to_enter_a_locked_vehicle(Ped ped) { return _i(0x44D28D5DDFE5F68C, ped); } + static bool is_ped_using_action_mode(Ped ped) { return _i(0x00E73468D085F745, ped); } + static bool is_ped_using_any_scenario(Ped ped) { return _i(0x57AB4A3080F85143, ped); } + static bool is_ped_using_scenario(Ped ped, const char* scenario) { return _i(0x1BF094736DD62C2E, ped, scenario); } + static bool is_ped_vaulting(Ped ped) { return _i(0x117C70D1F5730B5E, ped); } + static bool is_ped_wearing_helmet(Ped ped) { return _i(0xF33BDFE19B309B19, ped); } + static bool is_scripted_scenario_ped_using_conditional_anim(Ped ped, const char* animDict, const char* anim) { return _i(0x6EC47A344923E1ED, ped, animDict, anim); } + static bool _0x7F2F4F13AC5257EF(Any p0) { return _i(0x7F2F4F13AC5257EF, p0); } + static bool is_synchronized_scene_looped(int sceneID) { return _i(0x62522002E0C391BA, sceneID); } + static bool is_synchronized_scene_running(int sceneId) { return _i(0x25D39B935A038A26, sceneId); } + static bool _0x06087579E7AA85A9(Any p0, Any p1, float p2, float p3, float p4, float p5) { return _i(0x06087579E7AA85A9, p0, p1, p2, p3, p4, p5); } + static bool is_tracked_ped_visible(Ped ped) { return _i(0x91C8E617F64188AC, ped); } + static bool _0xFEC9A3B1820F3331(Any p0) { return _i(0xFEC9A3B1820F3331, p0); } + static Void knock_off_ped_prop(Ped ped, bool p1, bool p2, bool p3, bool p4) { return _i(0x6FD7816A36615F48, ped, p1, p2, p3, p4); } + static Void knock_ped_off_vehicle(Ped ped) { return _i(0x45BBCBA77C29A841, ped); } + static Void _0x2B694AFCF64E6994(Ped ped, bool p1) { return _i(0x2B694AFCF64E6994, ped, p1); } + static bool _0x46B05BCAE43856B0(Ped ped, int flag) { return _i(0x46B05BCAE43856B0, ped, flag); } + static Void play_facial_anim(Ped ped, const char* animName, const char* animDict) { return _i(0xE1E65CA8AC9C00ED, ped, animName, animDict); } + static Void register_hated_targets_around_ped(Ped ped, float radius) { return _i(0x9222F300BF8354FE, ped, radius); } + static int register_pedheadshot(Ped ped) { return _i(0x4462658788425076, ped); } + static Any _0xBA8805A1108A2515(Any p0) { return _i(0xBA8805A1108A2515, p0); } + static Any _0x953563CE563143AF(Any p0) { return _i(0x953563CE563143AF, p0); } + static Void register_target(Ped ped, Ped target) { return _i(0x2F25D9AEFA34FBA2, ped, target); } + static Void _0x5D517B27CF6ECD04(Any p0) { return _i(0x5D517B27CF6ECD04, p0); } + static Void _0xF79F9DEF0AADE61A(Ped ped) { return _i(0xF79F9DEF0AADE61A, ped); } + static Void _0x5AAB586FFEC0FD96(Any p0) { return _i(0x5AAB586FFEC0FD96, p0); } + static Void remove_action_mode_asset(const char* asset) { return _i(0x13E940F88470FA51, asset); } + static Void remove_group(int groupId) { return _i(0x8EB2F69076AF7053, groupId); } + static Void remove_ped_defensive_area(Ped ped, bool toggle) { return _i(0x74D4E028107450A9, ped, toggle); } + static Void remove_ped_elegantly(Ped* ped) { return _i(0xAC6D445B994DF95E, ped); } + static Void remove_ped_from_group(Ped ped) { return _i(0xED74007FFB146BC2, ped); } + static Void remove_ped_helmet(Ped ped, bool instantly) { return _i(0xA7B2458D0AD6DED8, ped, instantly); } + static Void remove_ped_preferred_cover_set(Ped ped) { return _i(0xFDDB234CF74073D9, ped); } + static Void remove_relationship_group(uint32_t groupHash) { return _i(0xB6BA2444AB393DA2, groupHash); } + static Void remove_scenario_blocking_area(Any p0, bool p1) { return _i(0x31D16B74C6E29D66, p0, p1); } + static Void remove_scenario_blocking_areas() { return _i(0xD37401D78A929A49); } + static Void remove_stealth_mode_asset(const char* asset) { return _i(0x9219857D21F0E842, asset); } + static Void request_action_mode_asset(const char* asset) { return _i(0x290E2780BB7AA598, asset); } + static bool _0xF0DAEF2F545BEE25(Any p0) { return _i(0xF0DAEF2F545BEE25, p0); } + static Void _0xCD018C591F94CB43(Any p0, bool p1) { return _i(0xCD018C591F94CB43, p0, p1); } + static Void _0x75BA1CB3B7D40CAF(Ped ped, bool p1) { return _i(0x75BA1CB3B7D40CAF, ped, p1); } + static Void _0x2BC338A7B21F4608(Ped ped, bool p1) { return _i(0x2BC338A7B21F4608, ped, p1); } + static Void _0x7D7A2E43E74E2EB8(Any p0) { return _i(0x7D7A2E43E74E2EB8, p0); } + static Void request_stealth_mode_asset(const char* asset) { return _i(0x2A0A62FCDEE16D4F, asset); } + static Void reset_ai_melee_weapon_damage_modifier() { return _i(0x46E56A7CD1D63C3F); } + static Void reset_ai_weapon_damage_modifier() { return _i(0xEA16670E7BA4743C); } + static Void reset_group_formation_default_spacing(int groupHandle) { return _i(0x63DAB4CCB3273205, groupHandle); } + static Void reset_ped_in_vehicle_context(Ped ped) { return _i(0x22EF8FF8778030EB, ped); } + static Void reset_ped_last_vehicle(Ped ped) { return _i(0xBB8DE8CF6A8DD8BB, ped); } + static Void reset_ped_movement_clipset(Ped ped, float p1) { return _i(0xAA74EC0CB0AAEA2C, ped, p1); } + static Void reset_ped_ragdoll_timer(Ped ped) { return _i(0x9FA4664CF62E47E8, ped); } + static Void reset_ped_strafe_clipset(Ped ped) { return _i(0x20510814175EA477, ped); } + static Void reset_ped_visible_damage(Ped ped) { return _i(0x3AC1F7B898F30C05, ped); } + static Void clear_ped_blood_damage(Ped ped) { return _i(0x8FE22675A5A45817, ped); } + static Void reset_ped_weapon_movement_clipset(Ped ped) { return _i(0x97B0DB5B4AA74E77, ped); } + static Void resurrect_ped(Ped ped) { return _i(0x71BC8E838B9C6035, ped); } + static Void revive_injured_ped(Ped ped) { return _i(0x8D8ACD8388CD99CE, ped); } + static Void set_ai_melee_weapon_damage_modifier(float modifier) { return _i(0x66460DEDDD417254, modifier); } + static Void set_ai_weapon_damage_modifier(float value) { return _i(0x1B1E2A40A65B8521, value); } + static Void _0x061CB768363D6424(Any p0, bool p1) { return _i(0x061CB768363D6424, p0, p1); } + static Void _0x87DDEB611B329A9C(Any p0) { return _i(0x87DDEB611B329A9C, p0); } + static Void _0x6B0E6172C9A4D902(bool p0) { return _i(0x6B0E6172C9A4D902, p0); } + static Void set_blocking_of_non_temporary_events(Ped ped, bool toggle) { return _i(0x9F8AA94D6D97DBF4, ped, toggle); } + static Void _0x9911F4A24485F653(bool p0) { return _i(0x9911F4A24485F653, p0); } + static Void set_can_attack_friendly(Ped ped, bool toggle, bool p2) { return _i(0xB3B1CB349FF9C75D, ped, toggle, p2); } + static Void set_combat_float(Ped ped, int combatType, float p2) { return _i(0xFF41B4B141ED981C, ped, combatType, p2); } + static Void _0x2F074C904D85129E(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x2F074C904D85129E, p0, p1, p2, p3, p4, p5, p6); } + static Void _0x2735233A786B1BEF(Ped ped, float p1) { return _i(0x2735233A786B1BEF, ped, p1); } + static Void set_create_random_cops(bool toggle) { return _i(0x102E68B2024D536D, toggle); } + static Void set_create_random_cops_not_on_scenarios(bool toggle) { return _i(0x8A4986851C4EF6E7, toggle); } + static Void set_create_random_cops_on_scenarios(bool toggle) { return _i(0x444CB7D7DBE6973D, toggle); } + static Void _0x711794453CFD692B(Any p0, Any p1) { return _i(0x711794453CFD692B, p0, p1); } + static Any _0xDFE68C4B787E1BFB() { return _i(0xDFE68C4B787E1BFB); } + static Void set_driver_ability(Ped driver, float ability) { return _i(0xB195FFA8042FC5C3, driver, ability); } + static Void set_driver_aggressiveness(Ped driver, float aggressiveness) { return _i(0xA731F608CA104E3C, driver, aggressiveness); } + static Void _0xDED5AF5A0EA4B297(Ped driver, float p1) { return _i(0xDED5AF5A0EA4B297, driver, p1); } + static Void set_enable_bound_ankles(Ped ped, bool toggle) { return _i(0xC52E0F855C58FC2E, ped, toggle); } + static Void set_enable_handcuffs(Ped ped, bool toggle) { return _i(0xDF1AF8B5D56542FA, ped, toggle); } + static Void set_enable_ped_enveff_scale(Ped ped, bool toggle) { return _i(0xD2C5AA0C0E8D0F1E, ped, toggle); } + static Void set_enable_scuba(Ped ped, bool toggle) { return _i(0xF99F62004024D506, ped, toggle); } + static Void set_facial_idle_anim_override(Ped ped, const char* animName, const char* animDict) { return _i(0xFFC24B988B938B38, ped, animName, animDict); } + static Void _0x129466ED55140F8D(Ped ped, bool toggle) { return _i(0x129466ED55140F8D, ped, toggle); } + static Void _0xCB968B53FC7F916D(Any p0, bool p1, Any p2, Any p3) { return _i(0xCB968B53FC7F916D, p0, p1, p2, p3); } + static Void set_group_formation(int groupId, int formationType) { return _i(0xCE2F5FC3AF7E8C1E, groupId, formationType); } + static Void set_group_formation_spacing(int groupId, float p1, float p2, float p3) { return _i(0x1D9D45004C28C916, groupId, p1, p2, p3); } + static Void set_group_separation_range(int groupHandle, float separationRange) { return _i(0x4102C7858CFEE4E4, groupHandle, separationRange); } + static Void set_ped_eye_color(Ped ped, int index) { return _i(0x50B56988B170AFDF, ped, index); } + static Void _0xCC9682B8951C5229(Ped ped, int r, int g, int b, int p4) { return _i(0xCC9682B8951C5229, ped, r, g, b, p4); } + static Void _0xFF4803BC019852D9(float p0, Any p1) { return _i(0xFF4803BC019852D9, p0, p1); } + static Void set_ik_target(Ped ped, int p1, Ped targetPed, int boneLookAt, float x, float y, float z, Any p7, int duration, int duration1) { return _i(0xC32779C16FCEECD9, ped, p1, targetPed, boneLookAt, x, y, z, p7, duration, duration1); } + static Void _0x1A330D297AAC6BC1(Ped ped, int p1) { return _i(0x1A330D297AAC6BC1, ped, p1); } + static Void _0x781DE8FA214E87D2(Ped ped, const char* p1) { return _i(0x781DE8FA214E87D2, ped, p1); } + static Void set_ped_accuracy(Ped ped, int accuracy) { return _i(0x7AEFB85C1D49DEB6, ped, accuracy); } + static Void set_ped_alertness(Ped ped, int value) { return _i(0xDBA71115ED9941A6, ped, value); } + static Void set_ped_allowed_to_duck(Ped ped, bool toggle) { return _i(0xDA1F1B7BE1A8766F, ped, toggle); } + static Void _0xF2BEBCDFAFDAA19E(bool toggle) { return _i(0xF2BEBCDFAFDAA19E, toggle); } + static Void _0x49E50BDB8BA4DAB2(Ped ped, bool p1) { return _i(0x49E50BDB8BA4DAB2, ped, p1); } + static Void set_ped_allow_vehicles_override(Ped ped, bool toggle) { return _i(0x3C028C636A414ED9, ped, toggle); } + static Void set_ped_alternate_movement_anim(Ped ped, int stance, const char* animDictionary, const char* animationName, float p4, bool p5) { return _i(0x90A43CC281FFAB46, ped, stance, animDictionary, animationName, p4, p5); } + static Void set_ped_alternate_walk_anim(Ped ped, const char* animDict, const char* animName, float p3, bool p4) { return _i(0x6C60394CB4F75E9A, ped, animDict, animName, p3, p4); } + static Void set_ped_angled_defensive_area(Ped ped, float p1, float p2, float p3, float p4, float p5, float p6, float p7, bool p8, bool p9) { return _i(0xC7F76DF27A5045A1, ped, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void _0x2B5AA717A181FB4C(Any p0, bool p1) { return _i(0x2B5AA717A181FB4C, p0, p1); } + static Void set_ped_armour(Ped ped, int amount) { return _i(0xCEA04D83135264CC, ped, amount); } + static Void set_ped_as_cop(Ped ped, bool toggle) { return _i(0xBB03C38DD3FB7FFD, ped, toggle); } + static Void set_ped_as_enemy(Ped ped, bool toggle) { return _i(0x02A0C9720B854BFA, ped, toggle); } + static Void set_ped_as_group_leader(Ped ped, int groupId) { return _i(0x2A7819605465FBCE, ped, groupId); } + static Void set_ped_as_group_member(Ped ped, int groupId) { return _i(0x9F3480FE65DB31B5, ped, groupId); } + static Void set_ped_blend_from_parents(Ped ped, Any p1, Any p2, float p3, float p4) { return _i(0x137BBD05230DB22D, ped, p1, p2, p3, p4); } + static Void _0x576594E8D64375E2(Any p0, bool p1) { return _i(0x576594E8D64375E2, p0, p1); } + static Void set_ped_bounds_orientation(Ped ped, float p1, float p2, float p3, float p4, float p5) { return _i(0x4F5F651ACCC9C4CF, ped, p1, p2, p3, p4, p5); } + static Void set_ped_can_arm_ik(Ped ped, bool toggle) { return _i(0x6C3B4D6D13B4C841, ped, toggle); } + static Void set_ped_can_be_dragged_out(Ped ped, bool toggle) { return _i(0xC1670E958EEE24E5, ped, toggle); } + static Void set_ped_can_be_knocked_off_vehicle(Ped ped, int state) { return _i(0x7A6535691B477C48, ped, state); } + static Void set_ped_can_be_shot_in_vehicle(Ped ped, bool toggle) { return _i(0xC7EF1BA83230BA07, ped, toggle); } + static Void set_ped_can_be_targeted_when_injured(Ped ped, bool toggle) { return _i(0x638C03B0F9878F57, ped, toggle); } + static Void set_ped_can_be_targeted_without_los(Ped ped, bool toggle) { return _i(0x4328652AE5769C71, ped, toggle); } + static Void set_ped_can_be_targetted(Ped ped, bool toggle) { return _i(0x63F58F7C80513AAD, ped, toggle); } + static Void set_ped_can_be_targetted_by_player(Ped ped, Player player, bool toggle) { return _i(0x66B57B72E0836A76, ped, player, toggle); } + static Void set_ped_can_be_targetted_by_team(Ped ped, int team, bool toggle) { return _i(0xBF1CA77833E58F2C, ped, team, toggle); } + static Void set_ped_can_cower_in_cover(Ped ped, bool toggle) { return _i(0xCB7553CDCEF4A735, ped, toggle); } + static Void set_ped_can_evasive_dive(Ped ped, bool toggle) { return _i(0x6B7A646C242A7059, ped, toggle); } + static Void set_ped_can_head_ik(Ped ped, bool toggle) { return _i(0xC11C18092C5530DC, ped, toggle); } + static Void set_ped_can_leg_ik(Ped ped, bool toggle) { return _i(0x73518ECE2485412B, ped, toggle); } + static Void _0xE861D0B05C7662B8(Any p0, bool p1, Any p2) { return _i(0xE861D0B05C7662B8, p0, p1, p2); } + static Void set_ped_can_peek_in_cover(Ped ped, bool toggle) { return _i(0xC514825C507E3736, ped, toggle); } + static Void set_ped_can_play_ambient_anims(Ped ped, bool toggle) { return _i(0x6373D1349925A70E, ped, toggle); } + static Void set_ped_can_play_ambient_base_anims(Ped ped, bool toggle) { return _i(0x0EB0585D15254740, ped, toggle); } + static Void set_ped_can_play_gesture_anims(Ped ped, bool toggle) { return _i(0xBAF20C5432058024, ped, toggle); } + static Void _0x820E9892A77E97CD(Any p0, Any p1) { return _i(0x820E9892A77E97CD, p0, p1); } + static Void set_ped_can_play_viseme_anims(Ped ped, bool toggle, bool p2) { return _i(0xF833DDBA3B104D43, ped, toggle, p2); } + static Void set_ped_can_ragdoll(Ped ped, bool toggle) { return _i(0xB128377056A54E2A, ped, toggle); } + static Void set_ped_can_ragdoll_from_player_impact(Ped ped, bool toggle) { return _i(0xDF993EE5E90ABA25, ped, toggle); } + static Void set_ped_can_smash_glass(Ped ped, bool p1, bool p2) { return _i(0x1CCE141467FF42A2, ped, p1, p2); } + static Void set_ped_can_switch_weapon(Ped ped, bool toggle) { return _i(0xED7F7EFE9FABF340, ped, toggle); } + static Void set_ped_can_teleport_to_group_leader(Ped pedHandle, int groupHandle, bool toggle) { return _i(0x2E2F4240B3F24647, pedHandle, groupHandle, toggle); } + static Void set_ped_can_torso_ik(Ped ped, bool toggle) { return _i(0xF2B7106D37947CE0, ped, toggle); } + static Void _0xF5846EDB26A98A24(Ped ped, bool p1) { return _i(0xF5846EDB26A98A24, ped, p1); } + static Void _0x6647C5F6F5792496(Ped ped, bool p1) { return _i(0x6647C5F6F5792496, ped, p1); } + static Void set_ped_can_use_auto_conversation_lookat(Ped ped, bool toggle) { return _i(0xEC4686EC06434678, ped, toggle); } + static Void set_ped_capsule(Ped ped, float value) { return _i(0x364DF566EC833DE2, ped, value); } + static Void set_ped_cloth_prone(Any p0, Any p1) { return _i(0x82A3D6D9CC2CB8E3, p0, p1); } + static Void _0x78C4E9961DB3EB5B(Any p0, Any p1) { return _i(0x78C4E9961DB3EB5B, p0, p1); } + static Void _0xA660FAF550EB37E5(Any p0, bool p1) { return _i(0xA660FAF550EB37E5, p0, p1); } + static Void set_ped_combat_ability(Ped ped, int p1) { return _i(0xC7622C0D36B2FDA8, ped, p1); } + static Void set_ped_combat_attributes(Ped ped, int attributeIndex, bool enabled) { return _i(0x9F7794730795E019, ped, attributeIndex, enabled); } + static Void set_ped_combat_movement(Ped ped, int combatMovement) { return _i(0x4D9CA1009AFBD057, ped, combatMovement); } + static Void set_ped_combat_range(Ped ped, int p1) { return _i(0x3C606747B23E497B, ped, p1); } + static Void set_ped_component_variation(Ped ped, int componentId, int drawableId, int textureId, int paletteId) { return _i(0x262B14F48D29DE80, ped, componentId, drawableId, textureId, paletteId); } + static Void set_ped_config_flag(Ped ped, int flagId, bool value) { return _i(0x1913FE4CBF41C463, ped, flagId, value); } + static Void set_ped_coords_keep_vehicle(Ped ped, float posX, float posY, float posZ) { return _i(0x9AFEFF481A85AB2E, ped, posX, posY, posZ); } + static Void set_ped_coords_no_gang(Ped ped, float posX, float posY, float posZ) { return _i(0x87052FE446E07247, ped, posX, posY, posZ); } + static Void set_ped_cower_hash(Ped ped, const char* p1) { return _i(0xA549131166868ED3, ped, p1); } + static Void set_ped_default_component_variation(Ped ped) { return _i(0x45EEE61580806D63, ped); } + static Void set_ped_defensive_area_attached_to_ped(Ped ped, Ped attachPed, float p2, float p3, float p4, float p5, float p6, float p7, float p8, bool p9, bool p10) { return _i(0x4EF47FE21698A8B6, ped, attachPed, p2, p3, p4, p5, p6, p7, p8, p9, p10); } + static Void set_ped_defensive_area_direction(Ped ped, float p1, float p2, float p3, bool p4) { return _i(0x413C6C763A4AFFAD, ped, p1, p2, p3, p4); } + static Void set_ped_defensive_sphere_attached_to_ped(Ped ped, Ped target, float xOffset, float yOffset, float zOffset, float radius, bool p6) { return _i(0xF9B8F91AAD3B953E, ped, target, xOffset, yOffset, zOffset, radius, p6); } + static Void _0xE4723DB6E736CCFF(Ped ped, Any p1, float p2, float p3, float p4, float p5, bool p6) { return _i(0xE4723DB6E736CCFF, ped, p1, p2, p3, p4, p5, p6); } + static Void set_ped_density_multiplier_this_frame(float multiplier) { return _i(0x95E3D6257B166CF2, multiplier); } + static Void set_ped_desired_heading(Ped ped, float heading) { return _i(0xAA5A7ECE2AA8FE70, ped, heading); } + static Void set_ped_dies_instantly_in_water(Ped ped, bool toggle) { return _i(0xEEB64139BA29A7CF, ped, toggle); } + static Void set_ped_dies_in_sinking_vehicle(Ped ped, bool toggle) { return _i(0xD718A22995E2B4BC, ped, toggle); } + static Void set_ped_dies_in_vehicle(Ped ped, bool toggle) { return _i(0x2A30922C90C9B42C, ped, toggle); } + static Void set_ped_dies_in_water(Ped ped, bool toggle) { return _i(0x56CEF0AC79073BDE, ped, toggle); } + static Void set_ped_dies_when_injured(Ped ped, bool toggle) { return _i(0x5BA7919BED300023, ped, toggle); } + static Void set_ped_drive_by_clipset_override(Ped ped, const char* clipset) { return _i(0xED34AB6C5CB36520, ped, clipset); } + static Void set_ped_ducking(Ped ped, bool toggle) { return _i(0x030983CA930B692D, ped, toggle); } + static Void _0x4E90D746056E273D(Any p0, Any p1) { return _i(0x4E90D746056E273D, p0, p1); } + static Void _0xE906EC930F5FE7C8(Any p0, Any p1) { return _i(0xE906EC930F5FE7C8, p0, p1); } + static Void set_ped_enable_weapon_blocking(Ped ped, bool toggle) { return _i(0x97A790315D3831FD, ped, toggle); } + static Void _0xD69411AA0CEBF9E9(Ped ped, int p1, int p2, int p3) { return _i(0xD69411AA0CEBF9E9, ped, p1, p2, p3); } + static Void _0x110F526AB784111F(Ped ped, float p1) { return _i(0x110F526AB784111F, ped, p1); } + static Void set_ped_enveff_scale(Ped ped, float value) { return _i(0xBF29516833893561, ped, value); } + static Void set_ped_firing_pattern(Ped ped, uint32_t patternHash) { return _i(0x9AC577F5A12AD8A9, ped, patternHash); } + static Void set_ped_flee_attributes(Ped ped, int attributes, bool p2) { return _i(0x70A2D1137C8ED7C9, ped, attributes, p2); } + static Void set_ped_generates_dead_body_events(Ped ped, bool toggle) { return _i(0x7FB17BA2E7DECA5B, ped, toggle); } + static Void set_ped_gesture_group(Ped ped, const char* animGroupGesture) { return _i(0xDDF803377F94AAA8, ped, animGroupGesture); } + static Void set_ped_get_out_upside_down_vehicle(Ped ped, bool toggle) { return _i(0xBC0ED94165A48BC2, ped, toggle); } + static Void set_ped_gravity(Ped ped, bool toggle) { return _i(0x9FF447B6B6AD960A, ped, toggle); } + static Void set_ped_group_member_passenger_index(Ped ped, int index) { return _i(0x0BDDB8D9EC6BCF3C, ped, index); } + static Void set_ped_hair_color(Ped ped, int colorID, int highlightColorID) { return _i(0x4CFFC65454C93A49, ped, colorID, highlightColorID); } + static Void set_ped_head_blend_data(Ped ped, int shapeFirstID, int shapeSecondID, int shapeThirdID, int skinFirstID, int skinSecondID, int skinThirdID, float shapeMix, float skinMix, float thirdMix, bool isParent) { return _i(0x9414E18B9434C2FE, ped, shapeFirstID, shapeSecondID, shapeThirdID, skinFirstID, skinSecondID, skinThirdID, shapeMix, skinMix, thirdMix, isParent); } + static Void set_ped_head_overlay(Ped ped, int overlayID, int index, float opacity) { return _i(0x48F44967FA05CC1E, ped, overlayID, index, opacity); } + static Void set_ped_head_overlay_color(Ped ped, int overlayID, int colorType, int colorID, int secondColorID) { return _i(0x497BF74A7B9CB952, ped, overlayID, colorType, colorID, secondColorID); } + static Void set_ped_hearing_range(Ped ped, float value) { return _i(0x33A8F7F7D5F7F33C, ped, value); } + static Void _0xC1F6EBF9A3D55538(Any p0, Any p1) { return _i(0xC1F6EBF9A3D55538, p0, p1); } + static Void set_ped_helmet(Ped ped, bool canWearHelmet) { return _i(0x560A43136EB58105, ped, canWearHelmet); } + static Void set_ped_helmet_flag(Ped ped, int helmetFlag) { return _i(0xC0E78D5C2CE3EB25, ped, helmetFlag); } + static Void set_ped_helmet_prop_index(Ped ped, int propIndex, Any p2) { return _i(0x26D83693ED99291C, ped, propIndex, p2); } + static Void set_ped_helmet_texture_index(Ped ped, int textureIndex) { return _i(0xF1550C4BD22582E2, ped, textureIndex); } + static Void _0x3F7325574E41B44D(Any p0, Any p1, Any p2, Any p3) { return _i(0x3F7325574E41B44D, p0, p1, p2, p3); } + static Void _0x52D59AB61DDC05DD(Ped ped, bool p1) { return _i(0x52D59AB61DDC05DD, ped, p1); } + static Void set_ped_id_range(Ped ped, float value) { return _i(0xF107E836A70DCE05, ped, value); } + static Void _0x570389D1C3DE3C6B(Any p0) { return _i(0x570389D1C3DE3C6B, p0); } + static Void _0xEC4B4B3B9908052A(Ped ped, float unk) { return _i(0xEC4B4B3B9908052A, ped, unk); } + static Void set_ped_into_vehicle(Ped ped, Vehicle vehicle, int seatIndex) { return _i(0xF75B0D629E1C063D, ped, vehicle, seatIndex); } + static Void set_ped_in_vehicle_context(Ped ped, uint32_t context) { return _i(0x530071295899A8C6, ped, context); } + static Void _0xA9B61A329BFDCBEA(Any p0, bool p1) { return _i(0xA9B61A329BFDCBEA, p0, p1); } + static Void _0x33A60D8BDD6E508C(Ped ped, bool p1) { return _i(0x33A60D8BDD6E508C, ped, p1); } + static Void set_ped_keep_task(Ped ped, bool toggle) { return _i(0x971D38760FBC02EF, ped, toggle); } + static Void set_ped_leg_ik_mode(Ped ped, int mode) { return _i(0xC396F5B86FF9FEBD, ped, mode); } + static Void set_ped_lod_multiplier(Ped ped, float multiplier) { return _i(0xDC2C5C242AAC342B, ped, multiplier); } + static Void set_ped_max_health(Ped ped, int value) { return _i(0xF5F6378C4F3419D3, ped, value); } + static Void set_ped_max_move_blend_ratio(Ped ped, float value) { return _i(0x433083750C5E064A, ped, value); } + static Void set_ped_max_time_in_water(Ped ped, float value) { return _i(0x43C851690662113D, ped, value); } + static Void set_ped_max_time_underwater(Ped ped, float value) { return _i(0x6BA428C528D9E522, ped, value); } + static Void set_ped_face_feature(Ped ped, int index, float scale) { return _i(0x71A5C1DBA060049E, ped, index, scale); } + static Void set_ped_min_ground_time_for_stungun(Ped ped, int ms) { return _i(0xFA0675AB151073FA, ped, ms); } + static Void set_ped_min_move_blend_ratio(Ped ped, float value) { return _i(0x01A898D26E2333DD, ped, value); } + static Void set_ped_model_is_suppressed(Ped ped, bool toggle) { return _i(0xE163A4BCE4DE6F11, ped, toggle); } + static Void set_ped_money(Ped ped, int amount) { return _i(0xA9C8960E8684C1B5, ped, amount); } + static Void set_ped_motion_blur(Ped ped, bool toggle) { return _i(0x0A986918B102B448, ped, toggle); } + static Void _0x9DBA107B4937F809(Any p0, const char* p1) { return _i(0x9DBA107B4937F809, p0, p1); } + static Void set_ped_movement_clipset(Ped ped, const char* clipSet, float p2) { return _i(0xAF8A94EDE7712BEF, ped, clipSet, p2); } + static Void set_ped_move_anims_blend_out(Ped ped) { return _i(0x9E8C908F41584ECD, ped); } + static Void _0x0B3E35AC043707D9(Any p0, Any p1) { return _i(0x0B3E35AC043707D9, p0, p1); } + static Void set_ped_move_rate_override(Ped ped, float value) { return _i(0x085BF80FA50A39D1, ped, value); } + static Void set_ped_never_leaves_group(Ped ped, bool toggle) { return _i(0x3DBFC55D5C9BB447, ped, toggle); } + static Void set_ped_non_creation_area(float x1, float y1, float z1, float x2, float y2, float z2) { return _i(0xEE01041D559983EA, x1, y1, z1, x2, y2, z2); } + static Void _0xA52D5247A4227E14(Any p0) { return _i(0xA52D5247A4227E14, p0); } + static Any _0xFE07FF6495D52E2A(Any p0, Any p1, Any p2, Any p3) { return _i(0xFE07FF6495D52E2A, p0, p1, p2, p3); } + static Void set_ped_parachute_tint_index(Ped ped, int tintIndex) { return _i(0x333FC8DB079B7186, ped, tintIndex); } + static Void _0x83A169EABCDB10A2(Any p0, Any p1) { return _i(0x83A169EABCDB10A2, p0, p1); } + static Any set_ped_pinned_down(Ped ped, bool pinned, int i) { return _i(0xAAD6D1ACF08F4612, ped, pinned, i); } + static Void set_ped_preferred_cover_set(Ped ped, Any itemSet) { return _i(0x8421EB4DA7E391B9, ped, itemSet); } + static bool is_ped_prop_valid(Ped ped, int componentId, int drawableId, int TextureId) { return _i(0x2B16A3BFF1FBCE49, ped, componentId, drawableId, TextureId); } + static Any _0x39D55A620FCB6A3A(Ped ped, int p1, int drawableId, int textureId) { return _i(0x39D55A620FCB6A3A, ped, p1, drawableId, textureId); } + static Void set_ped_primary_lookat(Ped ped, Ped lookAt) { return _i(0xCD17B554996A8D9E, ped, lookAt); } + static Void set_ped_prop_index(Ped ped, int componentId, int drawableId, int TextureId, bool attach) { return _i(0x93376B65A266EB5F, ped, componentId, drawableId, TextureId, attach); } + static Void set_ped_ragdoll_force_fall(Ped ped) { return _i(0x01F6594B923B9251, ped); } + static Void set_ped_ragdoll_on_collision(Ped ped, bool toggle) { return _i(0xF0A4F1BBF4FA7497, ped, toggle); } + static Void set_ped_random_component_variation(Ped ped, bool p1) { return _i(0xC8A9481A01E63C28, ped, p1); } + static Void set_ped_random_props(Ped ped) { return _i(0xC44AA05345C992C6, ped); } + static Void set_ped_relationship_group_default_hash(Ped ped, uint32_t hash) { return _i(0xADB3F206518799E8, ped, hash); } + static Void set_ped_relationship_group_hash(Ped ped, uint32_t hash) { return _i(0xC80A74AC829DDD92, ped, hash); } + static Void set_ped_reserve_parachute_tint_index(Ped ped, Any p1) { return _i(0xE88DA0751C22A2AD, ped, p1); } + static Void set_ped_reset_flag(Ped ped, int flagId, bool doReset) { return _i(0xC1E8A365BF3B29F2, ped, flagId, doReset); } + static Void _0x36C6984C3ED0C911(Any p0) { return _i(0x36C6984C3ED0C911, p0); } + static Void set_ped_seeing_range(Ped ped, float value) { return _i(0xF29CF591C4BF6CEE, ped, value); } + static Void set_ped_shoots_at_coord(Ped ped, float x, float y, float z, bool toggle) { return _i(0x96A05E4FB321B1BA, ped, x, y, z, toggle); } + static Void set_ped_shoot_rate(Ped ped, int shootRate) { return _i(0x614DA022990752DC, ped, shootRate); } + static Void _0x425AECF167663F48(Ped ped, bool p1) { return _i(0x425AECF167663F48, ped, p1); } + static Void _0x5B6010B3CBC29095(Any p0, bool p1) { return _i(0x5B6010B3CBC29095, p0, p1); } + static Any _0xEC6935EBE0847B90(Any p0, Any p1, Any p2, Any p3) { return _i(0xEC6935EBE0847B90, p0, p1, p2, p3); } + static Any _0xEEED8FAFEC331A70(Any p0, Any p1, Any p2, Any p3) { return _i(0xEEED8FAFEC331A70, p0, p1, p2, p3); } + static Void _0xF1C03A5352243A30(Any p0) { return _i(0xF1C03A5352243A30, p0); } + static Void _0xA3A9299C4F2ADB98(Any p0) { return _i(0xA3A9299C4F2ADB98, p0); } + static Void _0xCEDA60A74219D064(Any p0, bool p1) { return _i(0xCEDA60A74219D064, p0, p1); } + static Void set_ped_sphere_defensive_area(Ped ped, float x, float y, float z, float radius, bool p5, bool p6) { return _i(0x9D3151A373974804, ped, x, y, z, radius, p5, p6); } + static Void set_ped_stay_in_vehicle_when_jacked(Ped ped, bool toggle) { return _i(0xEDF4079F9D54C9A1, ped, toggle); } + static Void set_ped_stealth_movement(Ped ped, bool p1, const char* action) { return _i(0x88CBB5CEB96B7BD2, ped, p1, action); } + static Void _0x2016C603D6B8987C(Any p0, bool p1) { return _i(0x2016C603D6B8987C, p0, p1); } + static Void set_ped_steers_around_objects(Ped ped, bool toggle) { return _i(0x1509C089ADC208BF, ped, toggle); } + static Void set_ped_steers_around_peds(Ped ped, bool toggle) { return _i(0x46F2193B3AD1D891, ped, toggle); } + static Void set_ped_steers_around_vehicles(Ped ped, bool toggle) { return _i(0xEB6FB9D48DDE23EC, ped, toggle); } + static Void _0x288DF530C92DAD6F(Any p0, float p1) { return _i(0x288DF530C92DAD6F, p0, p1); } + static Void set_ped_strafe_clipset(Ped ped, const char* clipSet) { return _i(0x29A28F3F8CF6D854, ped, clipSet); } + static Void set_ped_suffers_critical_hits(Ped ped, bool toggle) { return _i(0xEBD76F2359F190AC, ped, toggle); } + static Void set_ped_sweat(Ped ped, float sweat) { return _i(0x27B0405F59637D1F, ped, sweat); } + static Void set_ped_target_loss_response(Ped ped, int responseType) { return _i(0x0703B9079823DA4A, ped, responseType); } + static Void set_ped_to_inform_respected_friends(Ped ped, float radius, int maxFriends) { return _i(0x112942C6E708F70B, ped, radius, maxFriends); } + static Void set_ped_to_load_cover(Ped ped, bool toggle) { return _i(0x332B562EEDA62399, ped, toggle); } + static bool set_ped_to_ragdoll(Ped ped, int time1, int time2, int ragdollType, bool p4, bool p5, bool p6) { return _i(0xAE99FB955581844A, ped, time1, time2, ragdollType, p4, p5, p6); } + static bool set_ped_to_ragdoll_with_fall(Ped ped, int time, int p2, int ragdollType, float x, float y, float z, float p7, float p8, float p9, float p10, float p11, float p12, float p13) { return _i(0xD76632D99E4966C8, ped, time, p2, ragdollType, x, y, z, p7, p8, p9, p10, p11, p12, p13); } + static Void _0x0F62619393661D6E(Any p0, Any p1, Any p2) { return _i(0x0F62619393661D6E, p0, p1, p2); } + static Void _0xAFC976FD0580C7B3(Ped ped, bool toggle) { return _i(0xAFC976FD0580C7B3, ped, toggle); } + static Void set_ped_using_action_mode(Ped ped, bool p1, Any p2, const char* action) { return _i(0xD75ACCF5E0FB5367, ped, p1, p2, action); } + static Void _0x952F06BEECD775CC(Any p0, Any p1, Any p2, Any p3) { return _i(0x952F06BEECD775CC, p0, p1, p2, p3); } + static Void set_ped_visual_field_center_angle(Ped ped, float angle) { return _i(0x3B6405E8AB34A907, ped, angle); } + static Void set_ped_visual_field_max_angle(Ped ped, float value) { return _i(0x70793BDCA1E854D4, ped, value); } + static Void set_ped_visual_field_max_elevation_angle(Ped ped, float angle) { return _i(0x78D0B67629D75856, ped, angle); } + static Void set_ped_visual_field_min_angle(Ped ped, float value) { return _i(0x2DB492222FB21E26, ped, value); } + static Void set_ped_visual_field_min_elevation_angle(Ped ped, float angle) { return _i(0x7A276EB2C224D70F, ped, angle); } + static Void set_ped_visual_field_peripheral_range(Ped ped, float range) { return _i(0x9C74B0BC831B753A, ped, range); } + static Void set_ped_weapon_movement_clipset(Ped ped, const char* clipSet) { return _i(0x2622E35B77D3ACA2, ped, clipSet); } + static Void set_ped_wetness_enabled_this_frame(Ped ped) { return _i(0xB5485E4907B53019, ped); } + static Void set_ped_wetness_height(Ped ped, float height) { return _i(0x44CB6447D2571AA0, ped, height); } + static Void _0x3E9679C1DFCF422C(Any p0, Any p1) { return _i(0x3E9679C1DFCF422C, p0, p1); } + static Void _0xD8C3BE3EE94CAF2D(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xD8C3BE3EE94CAF2D, p0, p1, p2, p3, p4); } + static Void set_ped_ragdoll_blocking_flags(Ped ped, int flags) { return _i(0x26695EC767728D84, ped, flags); } + static Void set_relationship_between_groups(int relationship, uint32_t group1, uint32_t group2) { return _i(0xBF25EB89375A37AD, relationship, group1, group2); } + static Void _0x5615E0C5EB2BC6E2(Any p0, Any p1) { return _i(0x5615E0C5EB2BC6E2, p0, p1); } + static Void set_scenario_peds_spawn_in_sphere_area(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x28157D43CF600981, p0, p1, p2, p3, p4); } + static Void set_scenario_peds_to_be_returned_by_next_command(bool value) { return _i(0x14F19A8782C8071E, value); } + static Void set_scenario_ped_density_multiplier_this_frame(float p0, float p1) { return _i(0x7A556143A1C03898, p0, p1); } + static Void set_scripted_anim_seat_offset(Ped ped, float p1) { return _i(0x5917BBA32D06C230, ped, p1); } + static Void set_scripted_conversion_coord_this_frame(float x, float y, float z) { return _i(0x5086C7843552CF85, x, y, z); } + static Void set_synchronized_scene_occlusion_portal(Any sceneID, bool p1) { return _i(0x394B9CD12435C981, sceneID, p1); } + static Void set_synchronized_scene_looped(int sceneID, bool toggle) { return _i(0xD9A897A4C6C2974F, sceneID, toggle); } + static Void set_synchronized_scene_origin(int sceneID, float x, float y, float z, float roll, float pitch, float yaw, bool p7) { return _i(0x6ACF6B7225801CD7, sceneID, x, y, z, roll, pitch, yaw, p7); } + static Void set_synchronized_scene_phase(int sceneID, float phase) { return _i(0x734292F4F0ABF6D0, sceneID, phase); } + static Void set_synchronized_scene_rate(int sceneID, float rate) { return _i(0xB6C49F8A5E295A5D, sceneID, rate); } + static Void _0x2F3C3D9F50681DE4(Any p0, bool p1) { return _i(0x2F3C3D9F50681DE4, p0, p1); } + static Void _0xFD325494792302D7(Any p0, bool p1) { return _i(0xFD325494792302D7, p0, p1); } + static Void _0xFEE4A5459472A9F8() { return _i(0xFEE4A5459472A9F8); } + static Any _0xA635C11B8C44AFC2() { return _i(0xA635C11B8C44AFC2); } + static Void _0x280C7E3AC7F56E90(Any p0, Any* p1, Any* p2, Any* p3) { return _i(0x280C7E3AC7F56E90, p0, p1, p2, p3); } + static Void _0xB782F8238512BAD5(Any p0, Any* p1) { return _i(0xB782F8238512BAD5, p0, p1); } + static Any _0x3C67506996001F5E() { return _i(0x3C67506996001F5E); } + static Any _0xA586FBEB32A53DBB() { return _i(0xA586FBEB32A53DBB); } + static Any _0xF445DE8DA80A1792() { return _i(0xF445DE8DA80A1792); } + static Void _0x2DF9038C90AD5264(float p0, float p1, float p2, float p3, float p4, int interiorFlags, float scale, int duration) { return _i(0x2DF9038C90AD5264, p0, p1, p2, p3, p4, interiorFlags, scale, duration); } + static Void _0xB2AFF10216DEFA2F(float x, float y, float z, float p3, float p4, float p5, float p6, int interiorFlags, float scale, int duration) { return _i(0xB2AFF10216DEFA2F, x, y, z, p3, p4, p5, p6, interiorFlags, scale, duration); } + static Void _0xF9ACF4A08098EA25(Ped ped, bool p1) { return _i(0xF9ACF4A08098EA25, ped, p1); } + static Void stop_any_ped_model_being_suppressed() { return _i(0xB47BD05FA66B40CF); } + static Void stop_ped_weapon_firing_when_dropped(Ped ped) { return _i(0xC158D28142A34608, ped); } + static Void _0x5A7F62FDA59759BD() { return _i(0x5A7F62FDA59759BD); } + static Void dispose_synchronized_scene(int scene) { return _i(0xCD9CC7E200A52A6F, scene); } + static Void _0x9A77DFD295E29B09(Any p0, bool p1) { return _i(0x9A77DFD295E29B09, p0, p1); } + static Void _0xC2EE020F5FB4DB53(Ped ped) { return _i(0xC2EE020F5FB4DB53, ped); } + static Any _0x25361A96E0F7E419(Any p0, Any p1, Any p2, Any p3) { return _i(0x25361A96E0F7E419, p0, p1, p2, p3); } + static Void unregister_pedheadshot(int handle) { return _i(0x96B1361D9B24C2FF, handle); } + static Void update_ped_head_blend_data(Ped ped, float shapeMix, float skinMix, float thirdMix) { return _i(0x723538F61C647C5A, ped, shapeMix, skinMix, thirdMix); } + static bool was_ped_killed_by_stealth(Ped ped) { return _i(0xF9800AA1A771B000, ped); } + static bool was_ped_killed_by_takedown(Ped ped) { return _i(0x7F08E26039C7347C, ped); } + static bool _0x61767F73EACEED21(Ped ped) { return _i(0x61767F73EACEED21, ped); } + static bool was_ped_skeleton_updated(Ped ped) { return _i(0x11B499C1E0FF8559, ped); } + static Void _0xB282749D5E028163(Any p0, Any p1) { return _i(0xB282749D5E028163, p0, p1); } + static Void set_ped_name_debug(Ped ped, const char* name) { return _i(0x98EFA132A4117BE1, ped, name); } + static Void set_ped_plays_head_on_horn_aniwhen_dies_in_vehicle(Ped ped, bool toggle) { return _i(0x94D94BF1A75AED3D, ped, toggle); } + static Void _0x1216E0BFA72CC703(Any p0, Any p1) { return _i(0x1216E0BFA72CC703, p0, p1); } + + static Void activate_physics(Entity entity) { return _i(0x710311ADF0E20730, entity); } + static Object add_rope(float x, float y, float z, float rotX, float rotY, float rotZ, float length, int ropeType, float maxLength, float minLength, float p10, bool p11, bool p12, bool rigid, float p14, bool breakWhenShot, Any* unkPtr) { return _i(0xE832D760399EB220, x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, p10, p11, p12, rigid, p14, breakWhenShot, unkPtr); } + static Void apply_impulse_to_cloth(float posX, float posY, float posZ, float vecX, float vecY, float vecZ, float impulse) { return _i(0xE37F721824571784, posX, posY, posZ, vecX, vecY, vecZ, impulse); } + static Void attach_entities_to_rope(Object rope, Entity ent1, Entity ent2, float ent1_x, float ent1_y, float ent1_z, float ent2_x, float ent2_y, float ent2_z, float length, bool p10, bool p11, Any* p12, Any* p13) { return _i(0x3D95EC8B6D940AC3, rope, ent1, ent2, ent1_x, ent1_y, ent1_z, ent2_x, ent2_y, ent2_z, length, p10, p11, p12, p13); } + static Void attach_rope_to_entity(Object rope, Entity entity, float x, float y, float z, bool p5) { return _i(0x4B490A6832559A65, rope, entity, x, y, z, p5); } + static Void break_entity_glass(Any p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, float p8, Any p9, bool p10) { return _i(0x2E648D16F6E308F3, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } + static Void delete_child_rope(Object rope) { return _i(0xAA5D6B1888E4DB20, rope); } + static Void delete_rope(Object* rope) { return _i(0x52B4829281364649, rope); } + static Void detach_rope_from_entity(Object rope, Entity entity) { return _i(0xBCF3026912A8647D, rope, entity); } + static bool does_rope_exist(Object* rope) { return _i(0xFD5448BE3111ED96, rope); } + static bool _0x271C9D3ACA5D6409(Object rope) { return _i(0x271C9D3ACA5D6409, rope); } + static math::vector3 get_cgoffset(Object rope) { return _i>(0x8214A4B5A7A33612, rope); } + static Any _0x0C112765300C7E1E(Any p0) { return _i(0x0C112765300C7E1E, p0); } + static math::vector3 get_rope_last_vertex_coord(Object rope) { return _i>(0x21BB0FBD3E217C2D, rope); } + static math::vector3 get_rope_vertex_coord(Object rope, int vertex) { return _i>(0xEA61CA8E80F09E4D, rope, vertex); } + static int get_rope_vertex_count(Object rope) { return _i(0x3655F544CD30F0B5, rope); } + static bool _0x84DE3B5FB3E666F0(Any* p0) { return _i(0x84DE3B5FB3E666F0, p0); } + static Void load_rope_data(Object rope, const char* rope_preset) { return _i(0xCBB203C04D1ABD27, rope, rope_preset); } + static Void pin_rope_vertex(Object rope, int vertex, float x, float y, float z) { return _i(0x2B320CF14146B69A, rope, vertex, x, y, z); } + static Void _0xCC6E963682533882(Any p0) { return _i(0xCC6E963682533882, p0); } + static bool rope_are_textures_loaded() { return _i(0xF2D0E6A75CC05597); } + static Void _0xBC0CE682D4D05650(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9, Any p10, Any p11, Any p12, Any p13) { return _i(0xBC0CE682D4D05650, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); } + static Void _0xB1B6216CA2E7B55E(Any p0, bool p1, bool p2) { return _i(0xB1B6216CA2E7B55E, p0, p1, p2); } + static Void rope_convert_to_simple(Object rope) { return _i(0x5389D48EFA2F079A, rope); } + static Void rope_draw_shadow_enabled(Object* rope, bool toggle) { return _i(0xF159A63806BB5BA8, rope, toggle); } + static Void rope_force_length(Object rope, float length) { return _i(0xD009F759A723DB1B, rope, length); } + static float get_rope_length(Object rope) { return _i(0x73040398DFF9A4A6, rope); } + static Void rope_load_textures() { return _i(0x9B9039DBF2D258C1); } + static Void rope_reset_length(Object rope, bool length) { return _i(0xC16DE94D9BEA14A0, rope, length); } + static Void _0xB743F735C03D7810(Any p0, Any p1) { return _i(0xB743F735C03D7810, p0, p1); } + static Void _0x36CCB9BE67B970FD(Any p0, bool p1) { return _i(0x36CCB9BE67B970FD, p0, p1); } + static Void _0xDC57A637A20006ED(Any p0, Any p1) { return _i(0xDC57A637A20006ED, p0, p1); } + static Void rope_set_update_pinverts(Object rope) { return _i(0xC8D667EE52114ABA, rope); } + static Void rope_unload_textures() { return _i(0x6CE36C35C1AC8163); } + static Void set_cgoffset(Object rope, float x, float y, float z) { return _i(0xD8FA3908D7B86904, rope, x, y, z); } + static Void set_cg_at_boundcenter(Object rope) { return _i(0xBE520D9761FF811F, rope); } + static Void set_damping(Object rope, int vertex, float value) { return _i(0xEEA3B200A6FEB65B, rope, vertex, value); } + static Void set_disable_breaking(Object rope, bool enabled) { return _i(0x5CEC1A84620E7D5B, rope, enabled); } + static Void set_disable_frag_damage(Object object, bool toggle) { return _i(0x01BA3AED21C16CFB, object, toggle); } + static Void _0x9EBD751E5787BAF2(Any p0) { return _i(0x9EBD751E5787BAF2, p0); } + static Void _0x15F944730C832252(Any p0, Any p1) { return _i(0x15F944730C832252, p0, p1); } + static Void start_rope_unwinding_front(Object rope) { return _i(0x538D1179EC1AA9A9, rope); } + static Void start_rope_winding(Object rope) { return _i(0x1461C72C889E343E, rope); } + static Void stop_rope_unwinding_front(Object rope) { return _i(0xFFF3A50779EFBBB3, rope); } + static Void stop_rope_winding(Object rope) { return _i(0xCB2D4AB84A19AA7C, rope); } + static Void unpin_rope_vertex(Object rope, int vertex) { return _i(0x4B5AE2EEE4A8F180, rope, vertex); } + + static Player int_to_playerindex(int value) { return _i(0x41BD2A6B006AF756, value); } + static int int_to_participantindex(int value) { return _i(0x9EC6603812C24710, value); } + static Void _0x2F41A3BAE005E5FA(Any p0, Any p1) { return _i(0x2F41A3BAE005E5FA, p0, p1); } + static bool are_player_flashing_stars_about_to_drop(Player player) { return _i(0xAFAF86043E5874E9, player); } + static bool are_player_stars_greyed_out(Player player) { return _i(0x0A6EB355EE14A2DB, player); } + static Void assisted_movement_close_route() { return _i(0xAEBF081FFC0A0E5E); } + static Void assisted_movement_flush_route() { return _i(0x8621390F0CDCFE1F); } + static bool can_ped_hear_player(Player player, Ped ped) { return _i(0xF297383AA91DCA29, player, ped); } + static bool can_player_start_mission(Player player) { return _i(0xDE7465A27D403C06, player); } + static Void change_player_ped(Player player, Ped ped, bool b2, bool b3) { return _i(0x048189FAC643DEEE, player, ped, b2, b3); } + static Void clear_player_has_damaged_at_least_one_non_animal_ped(Player player) { return _i(0x4AACB96203D11A31, player); } + static Void clear_player_has_damaged_at_least_one_ped(Player player) { return _i(0xF0B67A4DE6AB5F98, player); } + static Void clear_player_parachute_model_override(Player player) { return _i(0x8753997EB5F6EE3F, player); } + static Void clear_player_parachute_pack_model_override(Player player) { return _i(0x10C54E4389C12B42, player); } + static Void clear_player_parachute_variation_override(Player player) { return _i(0x0F4CC924CF8C7B21, player); } + static Void clear_player_wanted_level(Player player) { return _i(0xB302540597885499, player); } + static Void _0x5501B7A5CDB79D37(Any p0) { return _i(0x5501B7A5CDB79D37, p0); } + static Void disable_player_firing(Player player, bool toggle) { return _i(0x5E6CC07646BBEAB8, player, toggle); } + static Void _0xB885852C39CC265D() { return _i(0xB885852C39CC265D); } + static Void disable_player_vehicle_rewards(Player player) { return _i(0xC142BE3BB9CE125F, player); } + static Void display_system_signin_ui(bool unk) { return _i(0x94DD7888C10A979E, unk); } + static Void enable_special_ability(Player player, bool toggle) { return _i(0x181EC197DAEFE121, player, toggle); } + static Void expand_world_limits(float x, float y, float z) { return _i(0x5006D96C995A5827, x, y, z); } + static Void force_cleanup(int cleanupFlags) { return _i(0xBC8983F38F78ED51, cleanupFlags); } + static Void force_cleanup_for_all_threads_with_this_name(const char* name, int cleanupFlags) { return _i(0x4C68DDDDF0097317, name, cleanupFlags); } + static Void force_cleanup_for_thread_with_this_id(int id, int cleanupFlags) { return _i(0xF745B37630DF176B, id, cleanupFlags); } + static Void _0xAD73CE5A09E42D12(Player player) { return _i(0xAD73CE5A09E42D12, player); } + static Cam _0x1C186837D0619335(Any p0) { return _i(0x1C186837D0619335, p0); } + static bool is_player_cam_control_disabled() { return _i(0x7C814D2FB49F40C0); } + static int get_cause_of_most_recent_force_cleanup() { return _i(0x9A41CF4674A12272); } + static bool get_entity_player_is_free_aiming_at(Player player, Entity* entity) { return _i(0x2975C866E6713290, player, entity); } + static bool is_player_logging_in_np() { return _i(0x74556E1420867ECA); } + static bool _0xDD2620B7B9D16FF1(Player player, float p1) { return _i(0xDD2620B7B9D16FF1, player, p1); } + static bool _0x5FC472C501CCADB3(Player player) { return _i(0x5FC472C501CCADB3, player); } + static bool _0xF10B44FD479D69F3(Player player, int p1) { return _i(0xF10B44FD479D69F3, player, p1); } + static Any _0xB9CF1F793A9F1BF1() { return _i(0xB9CF1F793A9F1BF1); } + static Any _0xCB645E85E97EA48B() { return _i(0xCB645E85E97EA48B); } + static int get_max_wanted_level() { return _i(0x462E0DB9B137DC5F); } + static int get_number_of_players() { return _i(0x407C7F91DDB46C16); } + static Any _0x1FC200409F10E6F1(Any p0) { return _i(0x1FC200409F10E6F1, p0); } + static Vehicle get_players_last_vehicle() { return _i(0xB6997A7EB3F5C8C0); } + static float get_player_current_stealth_noise(Player player) { return _i(0x2F395D61F3A1F877, player); } + static Player _0x56105E599CAB0EFA(int* p0) { return _i(0x56105E599CAB0EFA, p0); } + static int get_player_group(Player player) { return _i(0x0D127585F77030AF, player); } + static bool get_player_has_reserve_parachute(Player player) { return _i(0x5DDFE2FF727F3CA3, player); } + static Any _0x8BC515BAE4AAF8FF(Any p0) { return _i(0x8BC515BAE4AAF8FF, p0); } + static bool get_player_invincible(Player player) { return _i(0xB721981B2B939E07, player); } + static int get_player_max_armour(Player player) { return _i(0x92659B4CE1863CB3, player); } + static const char* get_player_name(Player player) { return _i(0x6D0DE6A7B5DA71F8, player); } + static Void get_player_parachute_pack_tint_index(Player player, int* tintIndex) { return _i(0x6E9C742F340CE5A2, player, tintIndex); } + static Void get_player_parachute_smoke_trail_color(Player player, int* r, int* g, int* b) { return _i(0xEF56DBABD3CD4887, player, r, g, b); } + static Void get_player_parachute_tint_index(Player player, int* tintIndex) { return _i(0x75D3F7A1B0D9B145, player, tintIndex); } + static Ped get_player_ped(Player player) { return _i(0x43A66C31C68491C0, player); } + static Entity get_player_ped_script_index(Player player) { return _i(0x50FAC3A3E030A6E1, player); } + static bool _0xBC0753C9CA14B506(Player player, int p1, bool p2) { return _i(0xBC0753C9CA14B506, player, p1, p2); } + static Void get_player_reserve_parachute_tint_index(Player player, int* index) { return _i(0xD5A016BC3C09CF40, player, index); } + static Void get_player_rgb_colour(Player player, int* r, int* g, int* b) { return _i(0xE902EF951DCE178F, player, r, g, b); } + static float get_player_sprint_stamina_remaining(Player player) { return _i(0x3F9F16F8E65A7ED7, player); } + static float get_player_sprint_time_remaining(Player player) { return _i(0x1885BC9B108B4C99, player); } + static bool get_player_target_entity(Player player, Entity* entity) { return _i(0x13EDE1A5DBF797C9, player, entity); } + static int get_player_team(Player player) { return _i(0x37039302F4E0A008, player); } + static float get_player_underwater_time_remaining(Player player) { return _i(0xA1FCF8E6AF40B731, player); } + static math::vector3 get_player_wanted_centre_position(Player player) { return _i>(0x0C92BA89F1AF26F8, player); } + static int get_player_wanted_level(Player player) { return _i(0xE28E54788CE8F12D, player); } + static int get_time_since_last_arrest() { return _i(0x5063F92F07C2A316); } + static int get_time_since_last_death() { return _i(0xC7034807558DDFCA); } + static int get_time_since_player_drove_against_traffic(Player player) { return _i(0xDB89591E290D9182, player); } + static int get_time_since_player_drove_on_pavement(Player player) { return _i(0xD559D2BE9E37853B, player); } + static int get_time_since_player_hit_ped(Player player) { return _i(0xE36A25322DC35F42, player); } + static int get_time_since_player_hit_vehicle(Player player) { return _i(0x5D35ECF3A81A0EE0, player); } + static float get_wanted_level_radius(Player player) { return _i(0x085DEB493BE80812, player); } + static int get_wanted_level_threshold(int wantedLevel) { return _i(0xFDD179EAF45B556C, wantedLevel); } + static bool give_achievement_to_player(int achievement) { return _i(0xBEC7076D64130195, achievement); } + static Void give_player_ragdoll_control(Player player, bool toggle) { return _i(0x3C49C870E66F0A28, player, toggle); } + static bool has_achievement_been_passed(int achievement) { return _i(0x867365E111A3B6EB, achievement); } + static bool has_force_cleanup_occurred(int cleanupFlags) { return _i(0xC968670BFACE42D9, cleanupFlags); } + static bool has_player_been_spotted_in_stolen_vehicle(Player player) { return _i(0xD705740BB0A1CF4C, player); } + static bool has_player_damaged_at_least_one_non_animal_ped(Player player) { return _i(0xE4B90F367BD81752, player); } + static bool has_player_damaged_at_least_one_ped(Player player) { return _i(0x20CE80B0C2BF4ACC, player); } + static bool has_player_left_the_world(Player player) { return _i(0xD55DDFB47991A294, player); } + static Void _0x9EDD76E87D5D51BA(Player player) { return _i(0x9EDD76E87D5D51BA, player); } + static bool _0x38D28DA81E4E9BF9(Player player) { return _i(0x38D28DA81E4E9BF9, player); } + static bool is_player_being_arrested(Player player, bool atArresting) { return _i(0x388A47C51ABDAC8E, player, atArresting); } + static bool _0x65FAEE425DE637B0(Player p0) { return _i(0x65FAEE425DE637B0, p0); } + static bool is_player_climbing(Player player) { return _i(0x95E8F73DC65EFB9C, player); } + static bool is_player_control_on(Player player) { return _i(0x49C32D60007AFA47, player); } + static bool is_player_dead(Player player) { return _i(0x424D4687FA1E5652, player); } + static bool is_player_free_aiming(Player player) { return _i(0x2E397FD2ECD37C87, player); } + static bool is_player_free_aiming_at_entity(Player player, Entity entity) { return _i(0x3C06B5C839B38F7B, player, entity); } + static bool is_player_free_for_ambient_task(Player player) { return _i(0xDCCFD3F106C36AB4, player); } + static bool is_player_online() { return _i(0xF25D331DC2627BBC); } + static bool is_player_playing(Player player) { return _i(0x5E9564D8246B909A, player); } + static bool is_player_pressing_horn(Player player) { return _i(0xFA1E2BF8B10598F9, player); } + static bool is_player_ready_for_cutscene(Player player) { return _i(0x908CBECC2CAA3690, player); } + static bool is_player_riding_train(Player player) { return _i(0x4EC12697209F2196, player); } + static bool is_player_script_control_on(Player player) { return _i(0x8A876A65283DD7D7, player); } + static bool is_player_targetting_anything(Player player) { return _i(0x78CFE51896B6B8A4, player); } + static bool is_player_targetting_entity(Player player, Entity entity) { return _i(0x7912F7FC4F6264B6, player, entity); } + static bool is_player_teleport_active() { return _i(0x02B15662D7F8886F); } + static Any _0x6E4361FF3E8CD7CA(Any p0) { return _i(0x6E4361FF3E8CD7CA, p0); } + static bool is_player_wanted_level_greater(Player player, int wantedLevel) { return _i(0x238DB2A2C23EE9EF, player, wantedLevel); } + static bool _0x690A61A6D13583F6(Any p0) { return _i(0x690A61A6D13583F6, p0); } + static bool is_special_ability_active(Player player) { return _i(0x3E5F7FC85D854E15, player); } + static bool is_special_ability_enabled(Player player) { return _i(0xB1D200FE26AEF3CB, player); } + static bool is_special_ability_meter_full(Player player) { return _i(0x05A1FE504B7F2587, player); } + static bool is_special_ability_unlocked(uint32_t playerModel) { return _i(0xC6017F6A6CDFA694, playerModel); } + static bool is_system_ui_being_displayed() { return _i(0x5D511E3867C87139); } + static Any _0x7E07C78925D5FD96(Any p0) { return _i(0x7E07C78925D5FD96, p0); } + static Player get_player_index() { return _i(0xA5EDC40EF369B48D); } + static Player player_id() { return _i(0x4F8644AF03D0E0D6); } + static int network_player_id_to_int() { return _i(0xEE68096F9F37341E); } + static Void player_attach_virtual_bound(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7) { return _i(0xED51733DC73AED51, p0, p1, p2, p3, p4, p5, p6, p7); } + static Void player_detach_virtual_bound() { return _i(0x1DD5897E2FA6E7C9); } + static Ped player_ped_id() { return _i(0xD80958FC74E988A6); } + static Void remove_player_helmet(Player player, bool p2) { return _i(0xF3AC26D3CC576528, player, p2); } + static Void report_crime(Player player, int crimeType, int wantedLvlThresh) { return _i(0xE9B09589827545E7, player, crimeType, wantedLvlThresh); } + static Void _0xDC64D2C53493ED12(Player player) { return _i(0xDC64D2C53493ED12, player); } + static Void _0x0032A6DBA562C518() { return _i(0x0032A6DBA562C518); } + static Void reset_player_arrest_state(Player player) { return _i(0x2D03E13C460760D6, player); } + static Void reset_player_input_gait(Player player) { return _i(0x19531C47A2ABD691, player); } + static Void reset_player_stamina(Player player) { return _i(0xA6F312FCCE9C1DFE, player); } + static Void reset_wanted_level_difficulty(Player player) { return _i(0xB9D0DD990DC141DD, player); } + static Void _0xDA1DF03D5A315F4E() { return _i(0xDA1DF03D5A315F4E); } + static Void restore_player_stamina(Player player, float p1) { return _i(0xA352C1B864CAFD33, player, p1); } + static bool _0xC2AFFFDABBDC2C5C(Any p0, Any p1) { return _i(0xC2AFFFDABBDC2C5C, p0, p1); } + static Void set_air_drag_multiplier_for_players_vehicle(Player player, float multiplier) { return _i(0xCA7DC8329F0A1E9E, player, multiplier); } + static Void _0xDE45D1A1EF45EE61(Player player, bool toggle) { return _i(0xDE45D1A1EF45EE61, player, toggle); } + static Void _0xC3376F42B1FACCC6(Player player) { return _i(0xC3376F42B1FACCC6, player); } + static Void set_all_random_peds_flee(Player player, bool toggle) { return _i(0x056E0FE8534C2949, player, toggle); } + static Void set_all_random_peds_flee_this_frame(Player player) { return _i(0x471D2FF42A94B4F2, player); } + static Void _0x2382AB11450AE7BA(Any p0, Any p1) { return _i(0x2382AB11450AE7BA, p0, p1); } + static Void set_auto_give_parachute_when_enter_plane(Player player, bool toggle) { return _i(0x9F343285A00B4BB6, player, toggle); } + static Void _0xD2B315B6689D537D(Player player, bool p1) { return _i(0xD2B315B6689D537D, player, p1); } + static Void set_disable_ambient_melee_move(Player player, bool toggle) { return _i(0x2E8AABFA40A84F8C, player, toggle); } + static Void set_dispatch_cops_for_player(Player player, bool toggle) { return _i(0xDB172424876553F4, player, toggle); } + static Void set_everyone_ignore_player(Player player, bool toggle) { return _i(0x8EEDA153AD141BA4, player, toggle); } + static Void set_ignore_low_priority_shocking_events(Player player, bool toggle) { return _i(0x596976B02B6B5700, player, toggle); } + static Void _0xFAC75988A7D078D3(Any p0) { return _i(0xFAC75988A7D078D3, p0); } + static Void _0xB45EFF719D8427A6(float p0) { return _i(0xB45EFF719D8427A6, p0); } + static Void set_max_wanted_level(int maxWantedLevel) { return _i(0xAA5F02DB48D704B9, maxWantedLevel); } + static Void _0x5DC40A8869C22141(bool p0, ScrHandle p1) { return _i(0x5DC40A8869C22141, p0, p1); } + static Void set_player_can_be_hassled_by_gangs(Player player, bool toggle) { return _i(0xD5E460AD7020A246, player, toggle); } + static Void _0xCAC57395B151135F(Player player, bool p1) { return _i(0xCAC57395B151135F, player, p1); } + static Void _0x55FCC0C390620314(Any p0, Any p1, Any p2) { return _i(0x55FCC0C390620314, p0, p1, p2); } + static Void set_player_can_do_drive_by(Player player, bool toggle) { return _i(0x6E8834B52EC20C77, player, toggle); } + static Void set_player_can_leave_parachute_smoke_trail(Player player, bool enabled) { return _i(0xF401B182DBA8AF53, player, enabled); } + static Void set_player_can_use_cover(Player player, bool toggle) { return _i(0xD465A8599DFF6814, player, toggle); } + static Void set_player_cloth_lock_counter(int value) { return _i(0x14D913B777DFF5DA, value); } + static Void set_player_cloth_package_index(int index) { return _i(0x9F7BBA2EA6372500, index); } + static Void set_player_cloth_pin_frames(Player player, bool toggle) { return _i(0x749FADDF97DFE930, player, toggle); } + static Void set_player_control(Player player, bool toggle, int possiblyFlags) { return _i(0x8D32347D6D4C40A2, player, toggle, possiblyFlags); } + static Void _0xD821056B9ACF8052(Any p0, Any p1) { return _i(0xD821056B9ACF8052, p0, p1); } + static Void _0xEFD79FA81DFBA9CB(Any p0, Any p1) { return _i(0xEFD79FA81DFBA9CB, p0, p1); } + static Void set_player_forced_aim(Player player, bool toggle) { return _i(0x0FEE4F80AC44A726, player, toggle); } + static Void set_player_forced_zoom(Player player, bool toggle) { return _i(0x75E7D505F2B15902, player, toggle); } + static Void set_player_force_skip_aim_intro(Player player, bool toggle) { return _i(0x7651BC64AE59E128, player, toggle); } + static Void set_player_has_reserve_parachute(Player player) { return _i(0x7DDAB28D31FAC363, player); } + static Void _0xC388A0F065F5BC34(Any p0, Any p1) { return _i(0xC388A0F065F5BC34, p0, p1); } + static Void set_player_health_recharge_multiplier(Player player, float regenRate) { return _i(0x5DB660B38DD98A31, player, regenRate); } + static Void _0xEE4EBDD2593BA844(Any p0, Any p1) { return _i(0xEE4EBDD2593BA844, p0, p1); } + static Void set_player_invincible(Player player, bool toggle) { return _i(0x239528EACDC3E7DE, player, toggle); } + static Void _0x6BC97F4F4BB3C04B(Any p0, Any p1) { return _i(0x6BC97F4F4BB3C04B, p0, p1); } + static Void _0xFF300C7649724A0B(Player player, bool p1) { return _i(0xFF300C7649724A0B, player, p1); } + static Void set_player_lockon(Player player, bool toggle) { return _i(0x5C8B2F450EE4328E, player, toggle); } + static Void set_player_lockon_range_override(Player player, float range) { return _i(0x29961D490E5814FD, player, range); } + static Void set_player_max_armour(Player player, int value) { return _i(0x77DFCCF5948B8C71, player, value); } + static Void _0x8D768602ADEF2245(Any p0, Any p1) { return _i(0x8D768602ADEF2245, p0, p1); } + static Void set_player_may_not_enter_any_vehicle(Player player) { return _i(0x1DE37BBF9E9CC14A, player); } + static Void set_player_may_only_enter_this_vehicle(Player player, Vehicle vehicle) { return _i(0x8026FF78F208978A, player, vehicle); } + static Void set_player_melee_weapon_damage_modifier(Player player, float modifier, Any p2) { return _i(0x4A3DC7ECCC321032, player, modifier, p2); } + static Void set_player_melee_weapon_defense_modifier(Player player, float modifier) { return _i(0xAE540335B4ABC4E2, player, modifier); } + static Void set_player_model(Player player, uint32_t model) { return _i(0xA1CADD00108836, player, model); } + static Void set_player_noise_multiplier(Player player, float multiplier) { return _i(0xDB89EF50FF25FCE9, player, multiplier); } + static Void set_player_parachute_model_override(Player player, uint32_t model) { return _i(0x977DB4641F6FC3DB, player, model); } + static Void set_player_parachute_pack_model_override(Player player, uint32_t model) { return _i(0xDC80A4C2F18A2B64, player, model); } + static Void set_player_parachute_pack_tint_index(Player player, int tintIndex) { return _i(0x93B0FB27C9A04060, player, tintIndex); } + static Void set_player_parachute_smoke_trail_color(Player player, int r, int g, int b) { return _i(0x8217FD371A4625CF, player, r, g, b); } + static Void set_player_parachute_tint_index(Player player, int tintIndex) { return _i(0xA3D0E54541D9A5E5, player, tintIndex); } + static Void set_player_parachute_variation_override(Player player, int p1, Any p2, Any p3, bool p4) { return _i(0xD9284A8C0D48352C, player, p1, p2, p3, p4); } + static Void set_player_reset_flag_prefer_rear_seats(Player player, int flags) { return _i(0x11D5F725F0E780E0, player, flags); } + static Void set_player_reserve_parachute_tint_index(Player player, int index) { return _i(0xAF04C87F5DC1DF38, player, index); } + static Void set_player_simulate_aiming(Player player, bool toggle) { return _i(0xC54C95DA968EC5B5, player, toggle); } + static Void set_player_sneaking_noise_multiplier(Player player, float multiplier) { return _i(0xB2C1A29588A9F47C, player, multiplier); } + static Void _0x2F7CEB6520288061(bool p0) { return _i(0x2F7CEB6520288061, p0); } + static Void set_player_sprint(Player player, bool toggle) { return _i(0xA01B8075D8B92DF4, player, toggle); } + static Void set_player_stealth_perception_modifier(Player player, float value) { return _i(0x4E9021C1FCDD507A, player, value); } + static Void set_player_targeting_mode(int targetMode) { return _i(0xB1906895227793F3, targetMode); } + static Void _0x5702B917B99DB1CD(Any p0) { return _i(0x5702B917B99DB1CD, p0); } + static Void set_player_team(Player player, int team) { return _i(0x0299FA38396A4940, player, team); } + static Any _0xA0D3E4F7AAFB7E78(Any p0, Any p1) { return _i(0xA0D3E4F7AAFB7E78, p0, p1); } + static Void set_player_vehicle_damage_modifier(Player player, float damageAmount) { return _i(0xA50E117CDDF82F0C, player, damageAmount); } + static Void set_player_vehicle_defense_modifier(Player player, float modifier) { return _i(0x4C60E6EFDAFF2462, player, modifier); } + static Void set_player_wanted_centre_position(Player player, float x, float y, float z) { return _i(0x520E541A97A13354, player, x, y, z); } + static Void set_player_wanted_level(Player player, int wantedLevel, bool disableNoMission) { return _i(0x39FF19C64EF7DA5B, player, wantedLevel, disableNoMission); } + static Void set_player_wanted_level_now(Player player, bool p1) { return _i(0xE0A7D1E497FFCD6F, player, p1); } + static Void set_player_wanted_level_no_drop(Player player, int wantedLevel, bool p2) { return _i(0x340E61DE7F471565, player, wantedLevel, p2); } + static Void set_player_weapon_damage_modifier(Player player, float damageAmount) { return _i(0xCE07B9F7817AADA3, player, damageAmount); } + static Void set_player_weapon_defense_modifier(Player player, float modifier) { return _i(0x2D83BC011CA14A3C, player, modifier); } + static Void _0xBCFDE9EDE4CF27DC(Any p0, Any p1) { return _i(0xBCFDE9EDE4CF27DC, p0, p1); } + static Void _0x31E90B8873A4CD3B(Any p0, Any p1) { return _i(0x31E90B8873A4CD3B, p0, p1); } + static Void set_police_ignore_player(Player player, bool toggle) { return _i(0x32C62AA929C2DA6A, player, toggle); } + static Void set_police_radar_blips(bool toggle) { return _i(0x43286D561B72B8BF, toggle); } + static Void set_run_sprint_multiplier_for_player(Player player, float multiplier) { return _i(0x6DB47AA77FD94E09, player, multiplier); } + static Void _0xB214D570EAD7F81A(Any p0, Any p1) { return _i(0xB214D570EAD7F81A, p0, p1); } + static Void set_special_ability_multiplier(float multiplier) { return _i(0xA49C426ED0CA4AB7, multiplier); } + static Void set_swim_multiplier_for_player(Player player, float multiplier) { return _i(0xA91C6F0FF7D16A13, player, multiplier); } + static Void set_wanted_level_difficulty(Player player, float difficulty) { return _i(0x9B0BB33B04405E7A, player, difficulty); } + static Void set_wanted_level_multiplier(float multiplier) { return _i(0x020E5F00CDA207BA, multiplier); } + static Void simulate_player_input_gait(Player player, float amount, int gaitType, float speed, bool p4, bool p5) { return _i(0x477D5D63E63ECA5D, player, amount, gaitType, speed, p4, p5); } + static Void _0x821FDC827D6F4090(Any p0) { return _i(0x821FDC827D6F4090, p0); } + static Void special_ability_charge_absolute(Player player, int p1, bool p2) { return _i(0xB7B0870EB531D08D, player, p1, p2); } + static Void special_ability_charge_continuous(Player player, Ped p2) { return _i(0xED481732DFF7E997, player, p2); } + static Void special_ability_charge_large(Player player, bool p1, bool p2) { return _i(0xF733F45FA4497D93, player, p1, p2); } + static Void special_ability_charge_medium(Player player, bool p1, bool p2) { return _i(0xF113E3AA9BC54613, player, p1, p2); } + static Void special_ability_charge_normalized(Player player, float normalizedValue, bool p2) { return _i(0xA0696A65F009EE18, player, normalizedValue, p2); } + static Void _0xC9A763D8FE87436A(Player player) { return _i(0xC9A763D8FE87436A, player); } + static Void special_ability_charge_small(Player player, bool p1, bool p2) { return _i(0x2E7B9B683481687D, player, p1, p2); } + static Void special_ability_deactivate(Player player) { return _i(0xD6A953C6D1492057, player); } + static Void special_ability_deactivate_fast(Player player) { return _i(0x9CB5CE07A3968D5A, player); } + static Void _0x17F7471EACA78290(Any p0) { return _i(0x17F7471EACA78290, p0); } + static Void special_ability_deplete_meter(Player player, bool p1) { return _i(0x1D506DBBBC51E64B, player, p1); } + static Void special_ability_fill_meter(Player player, bool p1) { return _i(0x3DACA8DDC6FD4980, player, p1); } + static Void special_ability_lock(uint32_t playerModel) { return _i(0x6A09D0D590A47D13, playerModel); } + static Void special_ability_reset(Player player) { return _i(0x375F0E738F861A94, player); } + static Void special_ability_unlock(uint32_t playerModel) { return _i(0xF145F3BE2EFA9A3B, playerModel); } + static Void start_firing_amnesty(int duration) { return _i(0xBF9BD71691857E48, duration); } + static Void start_player_teleport(Player player, float x, float y, float z, float heading, bool p5, bool p6, bool p7) { return _i(0xAD15F075A4DA0FDE, player, x, y, z, heading, p5, p6, p7); } + static Void stop_player_teleport() { return _i(0xC449EDED9D73009C); } + static Void switch_crime_type(Player player, int p1) { return _i(0x9A987297ED8BD838, player, p1); } + static Void _0x4669B3ED80F24B4E(Player player) { return _i(0x4669B3ED80F24B4E, player); } + static Void _0x36F1B38855F2A8DF(Player player) { return _i(0x36F1B38855F2A8DF, player); } + static bool has_player_teleport_finished(Player player) { return _i(0xE23D5873C2394C61, player); } + static Void _0xFFEE8FA29AB9A18E(Player player) { return _i(0xFFEE8FA29AB9A18E, player); } + static Void _0xBC9490CA15AEA8FB(Player player) { return _i(0xBC9490CA15AEA8FB, player); } + + static Void stop_recording_and_discard_clip() { return _i(0x88BB3507ED41A240); } + static Any _0x4282E08174868BE3() { return _i(0x4282E08174868BE3); } + static Any _0xDF4B952F7D381B95() { return _i(0xDF4B952F7D381B95); } + static bool is_recording() { return _i(0x1897CA71995A90B4); } + static bool _0x33D47E85B476ABCD(bool p0) { return _i(0x33D47E85B476ABCD, p0); } + static Void _0x13B350B8AD0EEE10() { return _i(0x13B350B8AD0EEE10); } + static Void _0xAF66DCEE6609B148() { return _i(0xAF66DCEE6609B148); } + static Void _0xEB2D525B57F42B40() { return _i(0xEB2D525B57F42B40); } + static Void _0x293220DA1B46CEBC(float p0, float p1, bool p2) { return _i(0x293220DA1B46CEBC, p0, p1, p2); } + static Void _0xF854439EFBB3B583() { return _i(0xF854439EFBB3B583); } + static Void _0x48621C9FCA3EBD28(bool p0) { return _i(0x48621C9FCA3EBD28, p0); } + static Void _0x81CBAE94390F9F89() { return _i(0x81CBAE94390F9F89); } + static bool _0x644546EC5287471B() { return _i(0x644546EC5287471B); } + static Void start_recording(int mode) { return _i(0xC3AC2FFF9612AC81, mode); } + static Void stop_recording_and_save_clip() { return _i(0x071A5197D6AFC8B3); } + static Void _0x208784099002BC30(const char* missionNameLabel, Any p1) { return _i(0x208784099002BC30, missionNameLabel, p1); } + static Void _0x66972397E0757E7A(Any p0, Any p1, Any p2) { return _i(0x66972397E0757E7A, p0, p1, p2); } + + static Void activate_rockstar_editor() { return _i(0x49DA8145672B2725); } + static Void reset_editor_values() { return _i(0x3353D13F09307691); } + static bool is_interior_rendering_disabled() { return _i(0x95AB8B5C992C7B58); } + static Void _0xE058175F8EAFE79A(bool p0) { return _i(0xE058175F8EAFE79A, p0); } + static Void _0x5AD3932DAEB1E5D3() { return _i(0x5AD3932DAEB1E5D3); } + static Void _0x7E2BD3EF6C205F09(Any p0, Any p1) { return _i(0x7E2BD3EF6C205F09, p0, p1); } + + static Any _0x0F6F1EBBC4E1D5E6() { return _i(0x0F6F1EBBC4E1D5E6); } + static Any _0xDC2BACD920D0A0DD() { return _i(0xDC2BACD920D0A0DD); } + static Any _0x107E5CC7CA942BC1() { return _i(0x107E5CC7CA942BC1); } + static Any _0x22E21FBCFC88C149() { return _i(0x22E21FBCFC88C149); } + static Any _0x829CD22E043A2577() { return _i(0x829CD22E043A2577); } + static Any _0x836B62713E0534CA() { return _i(0x836B62713E0534CA); } + static Any _0x760910B49D2B98EA() { return _i(0x760910B49D2B98EA); } + static Any _0x9D5A25BADB742ACD() { return _i(0x9D5A25BADB742ACD); } + static Any _0x75B18E49607874C7() { return _i(0x75B18E49607874C7); } + static Void _0xB1577667C3708F9B() { return _i(0xB1577667C3708F9B); } + static bool does_script_exist(const char* scriptName) { return _i(0xFC04745FBE67C19A, scriptName); } + static bool does_script_with_name_hash_exist(uint32_t scriptHash) { return _i(0xF86AA3C56BA31381, scriptHash); } + static int get_event_at_index(bool p0, int eventNum) { return _i(0xD8F66A3A60C62153, p0, eventNum); } + static bool get_event_data(bool p0, int eventNum, int* argStruct, int argStructSize) { return _i(0x2902843FCD2B2D79, p0, eventNum, argStruct, argStructSize); } + static bool get_event_exists(bool p0, int p1) { return _i(0x936E6168A9BCEDB5, p0, p1); } + static uint32_t get_hash_of_this_script_name() { return _i(0x8A1C8B1738FFE87E); } + static int get_id_of_this_thread() { return _i(0xC30338E8088E2E21); } + static const char* get_name_of_thread(int threadId) { return _i(0x05A42BA9FC8DA96B, threadId); } + static bool get_no_loading_screen() { return _i(0x18C1270EA7F199BC); } + static int get_number_of_events(bool p0) { return _i(0x5F92A689A06620AA, p0); } + static int get_number_of_instances_of_script_with_name_hash(uint32_t scriptHash) { return _i(0x2C83A9DA6BFFC4F9, scriptHash); } + static const char* get_this_script_name() { return _i(0x442E0A7EDE4A738A); } + static bool has_script_loaded(const char* scriptName) { return _i(0xE6CC9F3BA0FB9EF1, scriptName); } + static bool has_script_with_name_hash_loaded(uint32_t scriptHash) { return _i(0x5F0F0C783EB16C04, scriptHash); } + static bool is_thread_active(int threadId) { return _i(0x46E9AE36D8FA6417, threadId); } + static Void request_script(const char* scriptName) { return _i(0x6EB5F71AA68F2E8E, scriptName); } + static Void request_script_with_name_hash(uint32_t scriptHash) { return _i(0xD62A67D26D9653E6, scriptHash); } + static int get_id_of_next_thread_in_enumeration() { return _i(0x30B4FA1C82DD4B9F); } + static Void begin_enumerating_threads() { return _i(0xDADFADA5A20143A8); } + static Void trigger_script_event(bool p0, int64_t* args, int argCount, int bit) { return _i(0x5AE99C571D5BBE5D, p0, args, argCount, bit); } + static Void set_no_loading_screen(bool toggle) { return _i(0x5262CC1995D07E09, toggle); } + static Void set_script_as_no_longer_needed(const char* scriptName) { return _i(0xC90D2DCACD56184C, scriptName); } + static Void set_script_with_name_hash_as_no_longer_needed(uint32_t scriptHash) { return _i(0xC5BC038960E9DB27, scriptHash); } + static Void shutdown_loading_screen() { return _i(0x078EBE9809CCD637); } + static Void terminate_this_thread() { return _i(0x1090044AD1DA76FA); } + static Void terminate_thread_(int threadId) { return _i(0xC8B189ED9138BCD4, threadId); } + + static int get_shape_test_result(int rayHandle, bool* hit, math::vector3* endCoords, math::vector3* surfaceNormal, Entity* entityHit) { return _i(0x3D87450E15D98694, rayHandle, hit, endCoords, surfaceNormal, entityHit); } + static int get_shape_test_result_ex(int rayHandle, bool* hit, math::vector3* endCoords, math::vector3* surfaceNormal, uint32_t* materialHash, Entity* entityHit) { return _i(0x65287525D951F6BE, rayHandle, hit, endCoords, surfaceNormal, materialHash, entityHit); } + static Void _0x2B3334BCA57CD799(Entity p0) { return _i(0x2B3334BCA57CD799, p0); } + static int start_shape_test_ray(float x1, float y1, float z1, float x2, float y2, float z2, int flags, Entity entity, int p8) { return _i(0x377906D8A31E5586, x1, y1, z1, x2, y2, z2, flags, entity, p8); } + static int start_shape_test_bound(Entity entity, int flags1, int flags2) { return _i(0x37181417CE7C8900, entity, flags1, flags2); } + static int start_shape_test_bounding_box(Entity entity, int flags1, int flags2) { return _i(0x052837721A854EC7, entity, flags1, flags2); } + static int start_shape_test_box(float x, float y, float z, float x1, float y2, float z2, float rotX, float rotY, float rotZ, Any p9, Any p10, Any entity, Any p12) { return _i(0xFE466162C4401D18, x, y, z, x1, y2, z2, rotX, rotY, rotZ, p9, p10, entity, p12); } + static int start_shape_test_capsule(float x1, float y1, float z1, float x2, float y2, float z2, float radius, int flags, Entity entity, int p9) { return _i(0x28579D1B8F8AAC80, x1, y1, z1, x2, y2, z2, radius, flags, entity, p9); } + static int start_shape_test_los_probe(float x1, float y1, float z1, float x2, float y2, float z2, int flags, Entity entity, int p8) { return _i(0x7EE9F5D83DD4F90E, x1, y1, z1, x2, y2, z2, flags, entity, p8); } + static int _0xFF6BE494C7987F34(math::vector3* pVec1, math::vector3* pVec2, int flag, Entity entity, int flag2) { return _i(0xFF6BE494C7987F34, pVec1, pVec2, flag, entity, flag2); } + static int _0xE6AC6C45FBE83004(float x1, float y1, float z1, float x2, float y2, float z2, float radius, int flags, Entity entity, Any p9) { return _i(0xE6AC6C45FBE83004, x1, y1, z1, x2, y2, z2, radius, flags, entity, p9); } + + static const char* sc_get_nickname() { return _i(0x198D161F458ECC7F); } + static bool _0x225798743970412B(int* p0) { return _i(0x225798743970412B, p0); } + static Void _0xBFA0A56A817C6C7D(bool p0) { return _i(0xBFA0A56A817C6C7D, p0); } + static Any _0xC2C97EA97711D1AE() { return _i(0xC2C97EA97711D1AE); } + static bool _0x19853B5B17D77BCA(Any p0, Any* p1) { return _i(0x19853B5B17D77BCA, p0, p1); } + static Any _0x33DF47CC0642061B() { return _i(0x33DF47CC0642061B); } + static Any _0x4ED9C8D6DA297639() { return _i(0x4ED9C8D6DA297639); } + static Any _0x4A7D6E727F941747(Any* p0) { return _i(0x4A7D6E727F941747, p0); } + static Any _0x50A8A36201DBF83E() { return _i(0x50A8A36201DBF83E); } + static Any _0xC5A35C73B68F3C49() { return _i(0xC5A35C73B68F3C49); } + static Any _0x2570E26BE63964E3() { return _i(0x2570E26BE63964E3); } + static Any _0x710BCDA8071EDED1() { return _i(0x710BCDA8071EDED1); } + static bool _0x8CC469AB4D349B7C(int p0, const char* p1, Any* p2) { return _i(0x8CC469AB4D349B7C, p0, p1, p2); } + static Any _0xE75A4A2E5E316D86() { return _i(0xE75A4A2E5E316D86); } + static Any _0x9DE5D2F723575ED0() { return _i(0x9DE5D2F723575ED0); } + static bool _0x699E4A5C8C893A18(int p0, const char* p1, Any* p2) { return _i(0x699E4A5C8C893A18, p0, p1, p2); } + static Any _0x1D12A56FC95BE92E() { return _i(0x1D12A56FC95BE92E); } + static Any _0xFF8F3A92B75ED67A() { return _i(0xFF8F3A92B75ED67A); } + static Any _0xA468E0BE12B12C70() { return _i(0xA468E0BE12B12C70); } + static Any _0x450819D8CF90C416() { return _i(0x450819D8CF90C416); } + static Void _0x44ACA259D67651DB(Any* p0, Any p1) { return _i(0x44ACA259D67651DB, p0, p1); } + static bool _0x4737980E8A283806(int p0, Any* p1) { return _i(0x4737980E8A283806, p0, p1); } + static Any _0x7DB18CA8CAD5B098() { return _i(0x7DB18CA8CAD5B098); } + static Any _0x16DA8172459434AA() { return _i(0x16DA8172459434AA); } + static Void sc_email_message_clear_recip_list() { return _i(0x55DF6DB45179236E); } + static Void sc_email_message_push_gamer_to_recip_list(Player* player) { return _i(0x2330C12A7A605D16, player); } + static Void sc_inbox_get_emails(int offset, int limit) { return _i(0x040ADDCBAFA1018A, offset, limit); } + static Void _0x116FB94DC4B79F17(const char* p0) { return _i(0x116FB94DC4B79F17, p0); } + static Any _0x07DBD622D9533857(Any p0) { return _i(0x07DBD622D9533857, p0); } + static Any _0x2D874D4AE612A65F() { return _i(0x2D874D4AE612A65F); } + static bool _0x8416FE4E4629D7D7(const char* p0) { return _i(0x8416FE4E4629D7D7, p0); } + static Any _0xA770C8EEC6FB2AC5() { return _i(0xA770C8EEC6FB2AC5); } + static Any _0xC85A7127E7AD02AA() { return _i(0xC85A7127E7AD02AA); } + static Any _0x7FFCBFEE44ECFABF() { return _i(0x7FFCBFEE44ECFABF); } + static Any _0xDF649C4E9AFDD788() { return _i(0xDF649C4E9AFDD788); } + static bool _0x418DC16FAE452C1C(int p0) { return _i(0x418DC16FAE452C1C, p0); } + static Any _0xBC1CC91205EC8D6E() { return _i(0xBC1CC91205EC8D6E); } + static bool _0x87E0052F08BD64E6(Any p0, int* p1) { return _i(0x87E0052F08BD64E6, p0, p1); } + static bool is_sc_inbox_valid(int p0) { return _i(0x93028F1DB42BFD08, p0); } + static uint32_t sc_inbox_message_init(int p0) { return _i(0xBB8EA16ECBC976C4, p0); } + static int get_total_sc_inbox_ids() { return _i(0x03A93FF1A2CA0864); } + static bool sc_inbox_message_push(int p0) { return _i(0x9A2C8064B6C1E41A, p0); } + static bool sc_inbox_message_get_data_bool(int p0, const char* p1) { return _i(0xFFE5C16F402D851D, p0, p1); } + static bool sc_inbox_message_get_data_int(int p0, const char* context, int* out) { return _i(0xA00EFE4082C4056E, p0, context, out); } + static bool sc_inbox_message_get_data_string(int p0, const char* context, const char* out) { return _i(0x7572EF42FC6A9B6D, p0, context, out); } + static const char* sc_inbox_message_get_string(int p0) { return _i(0xF3E31D16CBDCB304, p0); } + static bool sc_inbox_message_get_ugcdata(Any p0, Any* p1) { return _i(0x69D82604A1A5A254, p0, p1); } + static Void _0xDA024BDBD600F44A(int* p0) { return _i(0xDA024BDBD600F44A, p0); } + static bool _0x6AFD2CD753FEEF83(const char* p0) { return _i(0x6AFD2CD753FEEF83, p0); } + static Void _0xA68D3D229F4F3B06(const char* p0) { return _i(0xA68D3D229F4F3B06, p0); } + static bool sc_inbox_message_pop(int p0) { return _i(0x2C015348CF19CA1D, p0); } + static bool _0x1989C6E6F67E76A8(Any* p0, Any* p1, Any* p2) { return _i(0x1989C6E6F67E76A8, p0, p1, p2); } + static bool _0xF6BAAAF762E1BF40(const char* p0, int* p1) { return _i(0xF6BAAAF762E1BF40, p0, p1); } + static Any _0x07C61676E5BB52CD(Any p0) { return _i(0x07C61676E5BB52CD, p0); } + static Any _0x8147FFF6A718E1AD(Any p0) { return _i(0x8147FFF6A718E1AD, p0); } + static Any _0x9237E334F6E43156(Any p0) { return _i(0x9237E334F6E43156, p0); } + static bool _0xF22CA0FD74B80E7A(Any p0) { return _i(0xF22CA0FD74B80E7A, p0); } + static Any _0x700569DBA175A77C(Any p0) { return _i(0x700569DBA175A77C, p0); } + static Any _0xD302E99EDF0449CF(Any p0) { return _i(0xD302E99EDF0449CF, p0); } + static Any _0x5C4EBFFA98BDB41C(Any p0) { return _i(0x5C4EBFFA98BDB41C, p0); } + static Any _0x1D4446A62D35B0D0(Any p0, Any p1) { return _i(0x1D4446A62D35B0D0, p0, p1); } + static Any _0x2E89990DDFF670C3(Any p0, Any p1) { return _i(0x2E89990DDFF670C3, p0, p1); } + static bool _0x0F73393BAC7E6730(Any* p0, int* p1) { return _i(0x0F73393BAC7E6730, p0, p1); } + static bool _0xD0EE05FE193646EA(Any* p0, Any* p1, Any* p2) { return _i(0xD0EE05FE193646EA, p0, p1, p2); } + static Any _0xC4C4575F62534A24() { return _i(0xC4C4575F62534A24); } + static bool _0x1F1E9682483697C7(Any p0, Any p1) { return _i(0x1F1E9682483697C7, p0, p1); } + static bool _0x287F1F75D2803595(Any p0, Any* p1) { return _i(0x287F1F75D2803595, p0, p1); } + static bool _0x487912FD248EFDDF(Any p0, float p1) { return _i(0x487912FD248EFDDF, p0, p1); } + static bool sc_profanity_check_string(const char* string, int* taskHandle) { return _i(0x75632C5ECD7ED843, string, taskHandle); } + static Any _0xEB2BF817463DFA28(Any p0, Any p1) { return _i(0xEB2BF817463DFA28, p0, p1); } + static int sc_profanity_get_check_is_pending(int taskHandle) { return _i(0x82E4A58BABC15AE7, taskHandle); } + static bool sc_has_check_string_task_completed(int taskHandle) { return _i(0x1753344C770358AE, taskHandle); } + static Any _0x85535ACF97FC0969(Any p0) { return _i(0x85535ACF97FC0969, p0); } + static int sc_profanity_get_string_status(int p0) { return _i(0x930DE22F07B1CCE3, p0); } + static Void _0x675721C9F644D161() { return _i(0x675721C9F644D161); } + static bool _0x92DA6E70EF249BD1(const char* p0, int* p1) { return _i(0x92DA6E70EF249BD1, p0, p1); } + static bool _0x3001BEF2FECA3680() { return _i(0x3001BEF2FECA3680); } + static bool _0x6BFB12CE158E3DD4(Any p0) { return _i(0x6BFB12CE158E3DD4, p0); } + static Any _0xD8122C407663B995() { return _i(0xD8122C407663B995); } + static bool _0xFE4C1D0D3B9CC17E(Any p0, Any p1) { return _i(0xFE4C1D0D3B9CC17E, p0, p1); } + + static Any _0xB3DA2606774A8E2D() { return _i(0xB3DA2606774A8E2D); } + static Void _0x44919CC079BB60BF(Any p0) { return _i(0x44919CC079BB60BF, p0); } + static Void _0xD1C9B92BDD3F151D(Any p0, Any p1, Any p2) { return _i(0xD1C9B92BDD3F151D, p0, p1, p2); } + static Void _0xA3C53804BDB68ED2(Any p0, Any p1) { return _i(0xA3C53804BDB68ED2, p0, p1); } + static Void _0x6BCCF9948492FD85(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x6BCCF9948492FD85, p0, p1, p2, p3, p4); } + static Void _0x6F361B8889A792A3() { return _i(0x6F361B8889A792A3); } + static Void _0x6BC0ACD0673ACEBE(Any p0, Any p1, Any p2) { return _i(0x6BC0ACD0673ACEBE, p0, p1, p2); } + static uint32_t get_pstat_bool_hash(int index, bool spStat, bool charStat, int character) { return _i(0x80C75307B1C42837, index, spStat, charStat, character); } + static uint32_t get_pstat_int_hash(int index, bool spStat, bool charStat, int character) { return _i(0x61E111E323419E07, index, spStat, charStat, character); } + static uint32_t get_ngstat_bool_hash(int index, bool spStat, bool charStat, int character, const char* section) { return _i(0xBA52FF538ED2BC71, index, spStat, charStat, character, section); } + static uint32_t get_ngstat_int_hash(int index, bool spStat, bool charStat, int character, const char* section) { return _i(0x2B4CDCA6F07FF3DA, index, spStat, charStat, character, section); } + static uint32_t get_tupstat_bool_hash(int index, bool spStat, bool charStat, int character) { return _i(0xC4BB08EE7907471E, index, spStat, charStat, character); } + static uint32_t get_tupstat_int_hash(int index, bool spStat, bool charStat, int character) { return _i(0xD16C2AD6B8E32854, index, spStat, charStat, character); } + static bool _0x5EAD2BF6484852E4() { return _i(0x5EAD2BF6484852E4); } + static Void _0x792271AB35C356A4(Any p0, Any p1) { return _i(0x792271AB35C356A4, p0, p1); } + static bool leaderboards2_read_by_handle(Any* p0, Any* p1) { return _i(0xC30713A383BFBF0E, p0, p1); } + static bool _0xF1AE5DCDBFCA2721(Any* p0, Any* p1, Any* p2) { return _i(0xF1AE5DCDBFCA2721, p0, p1, p2); } + static bool leaderboards2_read_by_radius(Any* p0, Any p1, Any* p2) { return _i(0x5CE587FB5A42C8C4, p0, p1, p2); } + static bool leaderboards2_read_by_rank(Any* p0, Any p1, Any p2) { return _i(0xBA2C7DB0C129449A, p0, p1, p2); } + static bool leaderboards2_read_by_row(Any* p0, Any* p1, Any p2, Any* p3, Any p4, Any* p5, Any p6) { return _i(0xA9CDB1E3F0A49883, p0, p1, p2, p3, p4, p5, p6); } + static bool leaderboards2_read_by_score_float(Any* p0, float p1, Any p2) { return _i(0xE662C8B759D08F3C, p0, p1, p2); } + static bool leaderboards2_read_by_score_int(Any* p0, Any p1, Any p2) { return _i(0x7EEC7E4F6984A16A, p0, p1, p2); } + static bool leaderboards2_read_friends_by_row(Any* p0, Any* p1, Any p2, bool p3, Any p4, Any p5) { return _i(0x918B101666F9CB83, p0, p1, p2, p3, p4, p5); } + static Void _0x71B008056E5692D6() { return _i(0x71B008056E5692D6); } + static float _0x38491439B6BA7F7D(Any p0, Any p1) { return _i(0x38491439B6BA7F7D, p0, p1); } + static bool _0x34770B9CE0E03B91(Any p0, Any* p1) { return _i(0x34770B9CE0E03B91, p0, p1); } + static Any _0x88578F6EC36B4A3A(Any p0, Any p1) { return _i(0x88578F6EC36B4A3A, p0, p1); } + static bool _0xA0F93D5465B3094D(Any* p0) { return _i(0xA0F93D5465B3094D, p0); } + static bool _0xC38DC1E90D22547C(Any* p0, Any* p1, Any* p2) { return _i(0xC38DC1E90D22547C, p0, p1, p2); } + static bool leaderboards2_write_data(Any* p0) { return _i(0xAE2206545888AE49, p0); } + static bool _0xC980E62E33DF1D5C(Any* p0, Any* p1) { return _i(0xC980E62E33DF1D5C, p0, p1); } + static bool leaderboards_cache_data_row(Any* p0) { return _i(0xB9BB18E2C40142ED, p0); } + static Void leaderboards_clear_cache_data() { return _i(0xD4B02A6B476E1FDC); } + static Void _0x8EC74CEB042E7CFF(Any p0) { return _i(0x8EC74CEB042E7CFF, p0); } + static bool leaderboards_get_cache_data_row(Any p0, Any p1, Any* p2) { return _i(0x9120E8DBA3D69273, p0, p1, p2); } + static bool leaderboards_get_cache_exists(Any p0) { return _i(0x9C51349BE6CDFE2C, p0); } + static Any _0x58A651CD201D89AD(Any p0) { return _i(0x58A651CD201D89AD, p0); } + static Any leaderboards_get_cache_time(Any p0) { return _i(0xF04C1C27DA35F6C8, p0); } + static Any leaderboards_get_column_id(Any p0, Any p1, Any p2) { return _i(0xC4B5467A1886EA7E, p0, p1, p2); } + static Any leaderboards_get_column_type(Any p0, Any p1, Any p2) { return _i(0xBF4FEF46DB7894D3, p0, p1, p2); } + static Any leaderboards_get_number_of_columns(Any p0, Any p1) { return _i(0x117B45156D7EFF2E, p0, p1); } + static Any _0xA31FD15197B192BD() { return _i(0xA31FD15197B192BD); } + static Any leaderboards_read_clear(Any p0, Any p1, Any p2) { return _i(0x7CCE5C737A665701, p0, p1, p2); } + static Any leaderboards_read_clear_all() { return _i(0xA34CB6E6F0DF4A0B); } + static bool leaderboards_read_pending(Any p0, Any p1, Any p2) { return _i(0xAC392C8483342AC2, p0, p1, p2); } + static bool leaderboards_read_successful(Any p0, Any p1, Any p2) { return _i(0x2FB19228983E832C, p0, p1, p2); } + static Void _0x0BCA1D2C47B0D269(Any p0, Any p1, float p2) { return _i(0x0BCA1D2C47B0D269, p0, p1, p2); } + static Void _0x2E65248609523599(Any p0, Any p1, Any p2) { return _i(0x2E65248609523599, p0, p1, p2); } + static Void _0xCEA553E35C2246E1(Any p0, Any p1, Any p2) { return _i(0xCEA553E35C2246E1, p0, p1, p2); } + static int _0xF4D8E7AC2A27758C(int p0) { return _i(0xF4D8E7AC2A27758C, p0); } + static int _0x94F12ABF9C79E339(int p0) { return _i(0x94F12ABF9C79E339, p0); } + static Void _0xD558BEC0BBA7E8D2(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xD558BEC0BBA7E8D2, p0, p1, p2, p3, p4); } + static Void _0x79AB33F0FBFAC40C(Any p0) { return _i(0x79AB33F0FBFAC40C, p0); } + static Void _0xA071E0ED98F91286(Any p0, Any p1) { return _i(0xA071E0ED98F91286, p0, p1); } + static Void _0x46326E13DA4E0546(Any* p0) { return _i(0x46326E13DA4E0546, p0); } + static Void _0x47B32F5611E6E483(Any p0) { return _i(0x47B32F5611E6E483, p0); } + static Void playstats_award_xp(Any p0, Any p1, Any p2) { return _i(0x46F917F6B4128FE4, p0, p1, p2); } + static Void _0x5009DFD741329729(const char* p0, Any p1) { return _i(0x5009DFD741329729, p0, p1); } + static Void _0x516FC96EB88EEFE5(Any p0) { return _i(0x516FC96EB88EEFE5, p0); } + static Void _0x7B18DA61F6BAE9D5(Any p0) { return _i(0x7B18DA61F6BAE9D5, p0); } + static Void _0x53CAE13E9B426993(Any p0) { return _i(0x53CAE13E9B426993, p0); } + static Void _0xE3261D791EB44ACB(Any p0) { return _i(0xE3261D791EB44ACB, p0); } + static Void _0x930F504203F561C9(Any p0) { return _i(0x930F504203F561C9, p0); } + static Void _0x73001E34F85137F8(Any p0) { return _i(0x73001E34F85137F8, p0); } + static Void _0x14EDA9EE27BD1626(Any p0) { return _i(0x14EDA9EE27BD1626, p0); } + static Void _0x7D36291161859389(Any p0) { return _i(0x7D36291161859389, p0); } + static Void _0x06EAF70AE066441E(Any p0) { return _i(0x06EAF70AE066441E, p0); } + static Void _0xD6781E42755531F7(Any p0) { return _i(0xD6781E42755531F7, p0); } + static Void _0xF06A6F41CB445443(Any p0) { return _i(0xF06A6F41CB445443, p0); } + static Void _0x678F86D8FC040BDB(Any p0) { return _i(0x678F86D8FC040BDB, p0); } + static Void _0xA6F54BB2FFCA35EA(Any p0) { return _i(0xA6F54BB2FFCA35EA, p0); } + static Void _0x8D8ADB562F09A245(Any p0) { return _i(0x8D8ADB562F09A245, p0); } + static Void _0x282B6739644F4347(Any p0) { return _i(0x282B6739644F4347, p0); } + static Void _0x5FF2C33B13A02A11(Any p0) { return _i(0x5FF2C33B13A02A11, p0); } + static Void _0x88087EE1F28024AE(Any p0) { return _i(0x88087EE1F28024AE, p0); } + static Void _0xFCC228E07217FCAC(Any p0) { return _i(0xFCC228E07217FCAC, p0); } + static Void _0xD1A1EE3B4FA8E760(Any p0) { return _i(0xD1A1EE3B4FA8E760, p0); } + static Void _0x28ECB8AC2F607DB2(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x28ECB8AC2F607DB2, p0, p1, p2, p3, p4); } + static Void _0x0B565B0AAE56A0E8(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x0B565B0AAE56A0E8, p0, p1, p2, p3, p4, p5, p6); } + static Void playstats_cheat_applied(const char* cheat) { return _i(0x6058665D72302D3F, cheat); } + static Void playstats_cloth_change(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x34B973047A2268B9, p0, p1, p2, p3, p4); } + static Void _0xB7257BA2550EA10A(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0xB7257BA2550EA10A, p0, p1, p2, p3, p4, p5, p6); } + static Void playstats_ambient_mission_crate_created(float p0, float p1, float p2) { return _i(0xAFC7E5E075A96F46, p0, p1, p2); } + static Void _0x1CAE5D2E3F9A07F0(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7) { return _i(0x1CAE5D2E3F9A07F0, p0, p1, p2, p3, p4, p5, p6, p7); } + static bool _0x6DEE77AFF8C21BD1(Any* p0, Any* p1) { return _i(0x6DEE77AFF8C21BD1, p0, p1); } + static Void _0x2605663BD4F23B5D(Any p0) { return _i(0x2605663BD4F23B5D, p0); } + static Void _0x848B66100EE33B05(Any p0) { return _i(0x848B66100EE33B05, p0); } + static Void _0x501478855A6074CE(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0x501478855A6074CE, p0, p1, p2, p3, p4, p5); } + static Void _0xBAA2F0490E146BE8(Any p0) { return _i(0xBAA2F0490E146BE8, p0); } + static Void _0x6A60E43998228229(Any p0) { return _i(0x6A60E43998228229, p0); } + static Void _0x3DE3AA516FB126A4(Any p0) { return _i(0x3DE3AA516FB126A4, p0); } + static Void _0x6551B1F7F6CD46EA(Any p0) { return _i(0x6551B1F7F6CD46EA, p0); } + static Void _0xEDBF6C9B0D2C65C8(Any p0) { return _i(0xEDBF6C9B0D2C65C8, p0); } + static Void _0x0A9C7F36E5D7B683(Any p0) { return _i(0x0A9C7F36E5D7B683, p0); } + static Void _0x84DFC579C2FC214C(Any p0) { return _i(0x84DFC579C2FC214C, p0); } + static Void _0x2CD90358F67D0AA8(Any p0) { return _i(0x2CD90358F67D0AA8, p0); } + static Void _0x164C5FF663790845(Any p0) { return _i(0x164C5FF663790845, p0); } + static Void _0x419615486BBF1956(Any p0) { return _i(0x419615486BBF1956, p0); } + static Void _0x1A7CE7CD3E653485(Any p0) { return _i(0x1A7CE7CD3E653485, p0); } + static Void _0x8C9D11605E59D955(Any p0) { return _i(0x8C9D11605E59D955, p0); } + static Void _0xBFAFDB5FAAA5C5AB(Any p0) { return _i(0xBFAFDB5FAAA5C5AB, p0); } + static Void playstats_friend_activity(Any p0, Any p1) { return _i(0x0F71DE29AB2258F1, p0, p1); } + static Void _0x0EACDF8487D5155A(Any p0) { return _i(0x0EACDF8487D5155A, p0); } + static Void _0xDAF80797FC534BEC(Any p0) { return _i(0xDAF80797FC534BEC, p0); } + static Void _0xF4FF020A08BC8863(Any p0, Any p1) { return _i(0xF4FF020A08BC8863, p0, p1); } + static Void _0x60EEDC12AF66E846(Any p0) { return _i(0x60EEDC12AF66E846, p0); } + static Void _0xCB00196B31C39EB1(Any p0, Any p1, Any p2, Any p3) { return _i(0xCB00196B31C39EB1, p0, p1, p2, p3); } + static Void _0x5DA3A8DE8CB6226F(int time) { return _i(0x5DA3A8DE8CB6226F, time); } + static Void _0x7D8BA05688AD64C7(Any p0) { return _i(0x7D8BA05688AD64C7, p0); } + static Void _0x2B69F5074C894811(Any p0, Any p1, Any p2, Any p3) { return _i(0x2B69F5074C894811, p0, p1, p2, p3); } + static Void _0xF8C54A461C3E11DC(Any* p0, Any* p1, Any* p2, Any* p3) { return _i(0xF8C54A461C3E11DC, p0, p1, p2, p3); } + static Void _0xF5BB8DAC426A52C0(Any* p0, Any* p1, Any* p2, Any* p3) { return _i(0xF5BB8DAC426A52C0, p0, p1, p2, p3); } + static Void _0xA736CF7FB7C5BFF4(Any* p0, Any* p1, Any* p2, Any* p3) { return _i(0xA736CF7FB7C5BFF4, p0, p1, p2, p3); } + static Void _0x14E0B2D1AD1044E0(Any* p0, Any* p1, Any* p2, Any* p3) { return _i(0x14E0B2D1AD1044E0, p0, p1, p2, p3); } + static Void _0xC5BE134EC7BA96A0(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xC5BE134EC7BA96A0, p0, p1, p2, p3, p4); } + static Void playstats_match_started(Any p0, Any p1, Any p2) { return _i(0xBC80E22DED931E3D, p0, p1, p2); } + static Void _0x8989CBD7B4E82534(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x8989CBD7B4E82534, p0, p1, p2, p3, p4, p5, p6); } + static Void _0x03C2EEBB04B3FB72(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0x03C2EEBB04B3FB72, p0, p1, p2, p3, p4, p5, p6); } + static Void _0xF534D94DFA2EAD26(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xF534D94DFA2EAD26, p0, p1, p2, p3, p4); } + static Void _0xCC25A4553DFBF9EA(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xCC25A4553DFBF9EA, p0, p1, p2, p3, p4); } + static Void playstats_mission_checkpoint(Any* p0, Any p1, Any p2, Any p3) { return _i(0xC900596A63978C1D, p0, p1, p2, p3); } + static Void _0xBF371CD2B64212FD(Any p0) { return _i(0xBF371CD2B64212FD, p0); } + static Void playstats_mission_over(Any* p0, Any p1, Any p2, bool p3, bool p4, bool p5) { return _i(0x7C4BB33A8CED7324, p0, p1, p2, p3, p4, p5); } + static Void playstats_mission_started(Any* p0, Any p1, Any p2, bool p3) { return _i(0xC19A2925C34D2231, p0, p1, p2, p3); } + static Void playstats_npc_invite(Any* p0) { return _i(0x93054C88E6AA7C44, p0); } + static Void _0x9572BD4DD6B72122(Any p0) { return _i(0x9572BD4DD6B72122, p0); } + static Void _0x203B381133817079(Any p0) { return _i(0x203B381133817079, p0); } + static Void playstats_prop_change(Any p0, Any p1, Any p2, Any p3) { return _i(0xBA739D6D5A05D6E7, p0, p1, p2, p3); } + static Void _0x90D0622866E80445(int p0, const char* p1) { return _i(0x90D0622866E80445, p0, p1); } + static Void playstats_race_checkpoint(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x9C375C315099DDE4, p0, p1, p2, p3, p4); } + static Void _0xADDD1C754E2E2914(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9) { return _i(0xADDD1C754E2E2914, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void _0x71862B1D855F32E1(Any* p0, Any p1, Any p2, Any p3) { return _i(0x71862B1D855F32E1, p0, p1, p2, p3); } + static Void playstats_rank_up(Any p0) { return _i(0xC7F2DE41D102BFB4, p0); } + static Void _0x04D90BA8207ADA2D(Any p0) { return _i(0x04D90BA8207ADA2D, p0); } + static Void _0x27AA1C973CACFE63(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9) { return _i(0x27AA1C973CACFE63, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } + static Void _0x121FB4DDDC2D5291(Any p0, Any p1, Any p2, float p3) { return _i(0x121FB4DDDC2D5291, p0, p1, p2, p3); } + static Void _0xC729991A9065376E(Any p0) { return _i(0xC729991A9065376E, p0); } + static Void _0xD1032E482629049E(bool p0) { return _i(0xD1032E482629049E, p0); } + static Void playstats_shop_item(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x176852ACAAC173D1, p0, p1, p2, p3, p4); } + static Void _0x320C35147D5B5DDD(Any p0) { return _i(0x320C35147D5B5DDD, p0); } + static Void _0xBE509B0A3693DE8B(Any p0) { return _i(0xBE509B0A3693DE8B, p0); } + static Void _0x098760C7461724CD() { return _i(0x098760C7461724CD); } + static Void _0x928DBFB892638EF3() { return _i(0x928DBFB892638EF3); } + static Void _0x8A800DACCC0DA55D() { return _i(0x8A800DACCC0DA55D); } + static Void _0x0A50D2604E05CB94(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x0A50D2604E05CB94, p0, p1, p2, p3, p4); } + static Void _0xE95C8A1875A02CA4(Any p0, Any p1, Any p2) { return _i(0xE95C8A1875A02CA4, p0, p1, p2); } + static Void playstats_website_visited(uint32_t scaleformHash, int p1) { return _i(0xDDF24D535060F811, scaleformHash, p1); } + static Void _0x30A6614C1F7799B8(Any p0, float p1, Any p2) { return _i(0x30A6614C1F7799B8, p0, p1, p2); } + //STATS::_0x11FF1C80276097ED(joaat("num_hidden_packages_0"), 50, 0); + static Void _0x11FF1C80276097ED(Any p0, Any p1, Any p2) { return _i(0x11FF1C80276097ED, p0, p1, p2); } + static Void _0x6483C25849031C4F(Any p0, Any p1, Any p2, Any* p3) { return _i(0x6483C25849031C4F, p0, p1, p2, p3); } + static Void _0x7033EEFD9B28088E(Any p0) { return _i(0x7033EEFD9B28088E, p0); } + static Void _0x015B03EE1C43E6EC(Any p0) { return _i(0x015B03EE1C43E6EC, p0); } + static Void _0xAA525DFF66BB82F5(Any p0, Any p1, Any p2) { return _i(0xAA525DFF66BB82F5, p0, p1, p2); } + static Void _0x0D01D20616FC73FB(Any p0, Any p1) { return _i(0x0D01D20616FC73FB, p0, p1); } + static Void _0xC141B8917E0017EC() { return _i(0xC141B8917E0017EC); } + static Void set_has_content_unlocks_flags(Any p0) { return _i(0xDAC073C7901F9E15, p0); } + static Void _0x723C1CE13FBFDB67(Any p0, Any p1) { return _i(0x723C1CE13FBFDB67, p0, p1); } + static Void _0x55384438FC55AD8E(int value) { return _i(0x55384438FC55AD8E, value); } + static Void _0x38BAAA5DD4C9D19F(int value) { return _i(0x38BAAA5DD4C9D19F, value); } + static Void _0xF1A1803D3476F215(int value) { return _i(0xF1A1803D3476F215, value); } + static Void _0xB475F27C6A994D65() { return _i(0xB475F27C6A994D65); } + static Void _0xF6792800AC95350D(Any p0) { return _i(0xF6792800AC95350D, p0); } + static Void _0x3EBEAC6C3F81F6BD(Any p0) { return _i(0x3EBEAC6C3F81F6BD, p0); } + static Void _0x96E6D5150DBF1C09(Any p0, Any p1, Any p2) { return _i(0x96E6D5150DBF1C09, p0, p1, p2); } + static Void _0x9B4BD21D69B1E609() { return _i(0x9B4BD21D69B1E609); } + static Void _0xA8733668D1047B51(Any p0) { return _i(0xA8733668D1047B51, p0); } + static Any stat_clear_slot_for_reload(int statSlot) { return _i(0xEB0A72181D4AA4AD, statSlot); } + static bool _0x7F2C4CDF2E82DF4C(Any p0) { return _i(0x7F2C4CDF2E82DF4C, p0); } + static Any _0xE496A53BA5F50A56(Any p0) { return _i(0xE496A53BA5F50A56, p0); } + static bool _0x7E6946F68A38B74F(Any p0) { return _i(0x7E6946F68A38B74F, p0); } + static bool _0xBED9F5693F34ED17(uint32_t statName, int p1, float* outValue) { return _i(0xBED9F5693F34ED17, statName, p1, outValue); } + static bool _0x5A556B229A169402() { return _i(0x5A556B229A169402); } + static bool _0xB1D2BB1E1631F5B1() { return _i(0xB1D2BB1E1631F5B1); } + static Any stat_delete_slot(Any p0) { return _i(0x49A49BED12794D70, p0); } + static Void _0x629526ABA383BCAA() { return _i(0x629526ABA383BCAA); } + static Void _0x98E2BC1CA26287C3() { return _i(0x98E2BC1CA26287C3); } + static bool stat_get_bool(uint32_t statHash, bool* outValue, int p2) { return _i(0x11B5E6D2AE73F48E, statHash, outValue, p2); } + static bool stat_get_bool_masked(uint32_t statName, int mask, int p2) { return _i(0x10FE3F1B79F9B071, statName, mask, p2); } + static Any _0x567384DFA67029E6() { return _i(0x567384DFA67029E6); } + static Any _0x6E0A5253375C4584() { return _i(0x6E0A5253375C4584); } + static Any _0xBA9749CC94C1FD85() { return _i(0xBA9749CC94C1FD85); } + static Any _0x32CAC93C9DE73D32() { return _i(0x32CAC93C9DE73D32); } + static Any _0x84A810B375E69C0E() { return _i(0x84A810B375E69C0E); } + static Any _0x9EC8858184CD253A() { return _i(0x9EC8858184CD253A); } + static Any _0xE8853FBCE7D8D0D6() { return _i(0xE8853FBCE7D8D0D6); } + static Any _0xA943FD1722E11EFD() { return _i(0xA943FD1722E11EFD); } + static Any _0xAFF47709F1D5DCCE() { return _i(0xAFF47709F1D5DCCE); } + static Any _0x55A8BECAF28A4EB7() { return _i(0x55A8BECAF28A4EB7); } + static bool stat_get_date(uint32_t statHash, Any* p1, Any p2, Any p3) { return _i(0x8B0FACEFC36C824B, statHash, p1, p2, p3); } + static bool stat_get_float(uint32_t statHash, float* outValue, int p2) { return _i(0xD7AE6C9C9C6AC54C, statHash, outValue, p2); } + static Any _0x1A8EA222F9C67DBB(Any p0) { return _i(0x1A8EA222F9C67DBB, p0); } + static int stat_get_int(uint32_t statHash, int* outValue, int p2) { return _i(0x767FBC2AC802EF3D, statHash, outValue, p2); } + static const char* stat_get_license_plate(uint32_t statName) { return _i(0x5473D4195058B2E4, statName); } + static Any _0xC0E0D686DDFC6EAE() { return _i(0xC0E0D686DDFC6EAE); } + static bool stat_get_masked_int(Any p0, Any* p1, Any p2, Any p3, Any p4) { return _i(0x655185A06D9EEAAB, p0, p1, p2, p3, p4); } + static int stat_get_number_of_days(uint32_t statName) { return _i(0xE0E854F5280FB769, statName); } + static int stat_get_number_of_hours(uint32_t statName) { return _i(0xF2D4B2FE415AAFC3, statName); } + static int stat_get_number_of_minutes(uint32_t statName) { return _i(0x7583B4BE4C5A41B5, statName); } + static int stat_get_number_of_seconds(uint32_t statName) { return _i(0x2CE056FF3723F00B, statName); } + static bool stat_get_pos(Any p0, Any* p1, Any* p2, Any* p3, Any p4) { return _i(0x350F82CCB186AA1B, p0, p1, p2, p3, p4); } + static Any _0xF11F01D98113536A(Any p0) { return _i(0xF11F01D98113536A, p0); } + static Any _0xCE5AA445ABA8DEE0(Any* p0) { return _i(0xCE5AA445ABA8DEE0, p0); } + static Any _0x886913BBEACA68C1(Any* p0) { return _i(0x886913BBEACA68C1, p0); } + static const char* stat_get_string(uint32_t statHash, int p1) { return _i(0xE50384ACC2C3DB74, statHash, p1); } + static const char* stat_get_user_id(Any p0) { return _i(0x2365C388E393BBE2, p0); } + static Any _0x0B8B7F74BF061C6D() { return _i(0x0B8B7F74BF061C6D); } + static Void stat_increment(uint32_t statName, float value) { return _i(0x9B5A68C6489E9909, statName, value); } + static Any _0xF9F2922717B819EC() { return _i(0xF9F2922717B819EC); } + static Any _0x8B9CDBD6C566C38C() { return _i(0x8B9CDBD6C566C38C); } + static Any _0xBE3DB208333D9844() { return _i(0xBE3DB208333D9844); } + static bool stat_load(int p0) { return _i(0xA651443F437B1CE6, p0); } + static bool _0xECB41AC6AB754401() { return _i(0xECB41AC6AB754401); } + static bool stat_load_pending(Any p0) { return _i(0xA1750FFAFA181661, p0); } + static Void _0xA78B8FA58200DA56(int p0) { return _i(0xA78B8FA58200DA56, p0); } + static Any _0x4C89FE2BDEB3F169() { return _i(0x4C89FE2BDEB3F169); } + static Any _0x5BD5F255321C4AAF(Any p0) { return _i(0x5BD5F255321C4AAF, p0); } + static Any _0xDEAAF77EB3687E97(Any p0, Any* p1) { return _i(0xDEAAF77EB3687E97, p0, p1); } + static Any _0xC6E0E2616A7576BB() { return _i(0xC6E0E2616A7576BB); } + static Void _0xC847B43F369AC0B5() { return _i(0xC847B43F369AC0B5); } + static Any _0x9A62EC95AE10E011() { return _i(0x9A62EC95AE10E011); } + static bool _0xA5C80D8E768A9E66(Any* p0) { return _i(0xA5C80D8E768A9E66, p0); } + static Void _0x428EAF89E24F6C36(Any p0, float p1) { return _i(0x428EAF89E24F6C36, p0, p1); } + static Void _0x26D7399B9587FE89(int p0) { return _i(0x26D7399B9587FE89, p0); } + static bool stat_save(int p0, bool p1, int p2) { return _i(0xE07BCA305B82D2FD, p0, p1, p2); } + static Any _0x4FEF53183C3C6414() { return _i(0x4FEF53183C3C6414); } + static bool _0x3270F67EED31FBC1(Any p0, Any* p1, Any* p2) { return _i(0x3270F67EED31FBC1, p0, p1, p2); } + static Any _0xC70DDCE56D0D3A99() { return _i(0xC70DDCE56D0D3A99); } + static Any stat_save_pending() { return _i(0x7D3A583856F2C5AC); } + static Any stat_save_pending_or_requested() { return _i(0xBBB6AD006F1BBEA3); } + static Void _0xF434A10BA01C37D0(bool p0) { return _i(0xF434A10BA01C37D0, p0); } + static bool stat_set_bool(uint32_t statName, bool value, bool save) { return _i(0x4B33C4243DE0C432, statName, value, save); } + static bool stat_set_bool_masked(uint32_t statName, bool value, int mask, bool save) { return _i(0x5BC62EC1937B9E5B, statName, value, mask, save); } + static Void _0x047CBED6F6F8B63C() { return _i(0x047CBED6F6F8B63C); } + static bool stat_set_current_posix_time(uint32_t statName, bool p1) { return _i(0xC2F84B7F9C4D0C61, statName, p1); } + static bool stat_set_date(uint32_t statName, Any* value, int numFields, bool save) { return _i(0x2C29BFB64F4FCBE4, statName, value, numFields, save); } + static bool stat_set_float(uint32_t statName, float value, bool save) { return _i(0x4851997F37FE9B3C, statName, value, save); } + static bool stat_set_gxt_label(uint32_t statName, const char* value, bool save) { return _i(0x17695002FD8B2AE0, statName, value, save); } + static bool stat_set_int(uint32_t statName, int value, bool save) { return _i(0xB3271D7AB655B441, statName, value, save); } + static bool stat_set_license_plate(uint32_t statName, const char* str) { return _i(0x69FF13266D7296DA, statName, str); } + static bool stat_set_masked_int(uint32_t statName, Any p1, Any p2, int p3, bool save) { return _i(0x7BBB1B54583ED410, statName, p1, p2, p3, save); } + static Void _0x5688585E6D563CD8(Any p0) { return _i(0x5688585E6D563CD8, p0); } + static bool stat_set_pos(uint32_t statName, float x, float y, float z, bool save) { return _i(0xDB283FDE680FE72E, statName, x, y, z, save); } + static Void stat_set_profile_setting(int profileSetting, int value) { return _i(0x68F01422BE1D838F, profileSetting, value); } + static bool stat_set_string(uint32_t statName, const char* value, bool save) { return _i(0xA87B2335D12531D7, statName, value, save); } + static bool stat_set_user_id(uint32_t statName, const char* value, bool save) { return _i(0x8CDDF1E452BABE11, statName, value, save); } + static bool stat_slot_is_loaded(Any p0) { return _i(0x0D0A9F0E7BD91E3C, p0); } + static Any _0x33D72899E24C3365(Any p0, Any p1) { return _i(0x33D72899E24C3365, p0, p1); } + static Any _0xA761D4AC6115623D() { return _i(0xA761D4AC6115623D); } + static Void playstats_oddjob_done(Any p0, Any p1, Any p2) { return _i(0x69DEA3E9DB727B4C, p0, p1, p2); } + + static bool _0x0BC3144DEB678666(uint32_t modelHash) { return _i(0x0BC3144DEB678666, modelHash); } + static Void _0x8E2A065ABDAE6994() { return _i(0x8E2A065ABDAE6994); } + static Void _0xAD5FDF34B81BFE79() { return _i(0xAD5FDF34B81BFE79); } + static Void _0x74DE2E8739086740() { return _i(0x74DE2E8739086740); } + static Void _0x43D1680C6D19A8E9() { return _i(0x43D1680C6D19A8E9); } + static Void begin_srl() { return _i(0x9BADDC94EF83B823); } + static Void clear_focus() { return _i(0x31B73D1EA9F01DA2); } + static Void clear_hd_area() { return _i(0xCE58B1CFB9290813); } + static Void _0xBD605B8E0E18B3BB() { return _i(0xBD605B8E0E18B3BB); } + static bool does_anim_dict_exist(const char* animDict) { return _i(0x2DA49C3B79856961, animDict); } + static Void _0xD4793DFF3AF2ABCD() { return _i(0xD4793DFF3AF2ABCD); } + static Void end_srl() { return _i(0x0A41540E63C9EE17); } + static Void _0x03F1A106BDA7DD3E() { return _i(0x03F1A106BDA7DD3E); } + static int get_ideal_player_switch_type(float x1, float y1, float z1, float x2, float y2, float z2) { return _i(0xB5D7B26B45720E05, x1, y1, z1, x2, y2, z2); } + static Any _0x0C15B0E443B2349D() { return _i(0x0C15B0E443B2349D); } + static int get_number_of_streaming_requests() { return _i(0x4060057271CEBC89); } + static int get_player_short_switch_state() { return _i(0x20F898A5D9782800); } + static Any _0x5B48A06DD0E792A5() { return _i(0x5B48A06DD0E792A5); } + static int _0x08C2D6C52A3104BB() { return _i(0x08C2D6C52A3104BB); } + static Any _0x78C0D93253149435() { return _i(0x78C0D93253149435); } + static int get_player_switch_state() { return _i(0x470555300D10B2A5); } + static int get_player_switch_type() { return _i(0xB3C94A90D9FC9E62); } + static Any _0x3D3D8B3BE5A83D35() { return _i(0x3D3D8B3BE5A83D35); } + static bool has_anim_dict_loaded(const char* animDict) { return _i(0xD031A9162D01088C, animDict); } + static bool has_anim_set_loaded(const char* animSet) { return _i(0xC4EA073D86FB29B0, animSet); } + static bool has_clipset_loaded(const char* clipSet) { return _i(0x318234F4F3738AF3, clipSet); } + static bool has_collision_for_model_loaded(uint32_t model) { return _i(0x22CCA434E368F03A, model); } + static bool has_model_loaded(uint32_t model) { return _i(0x98A4EB5D89A0C952, model); } + static bool has_named_ptfx_asset_loaded(const char* fxName) { return _i(0x8702416E512EC454, fxName); } + static bool has_ptfx_asset_loaded() { return _i(0xCA7D9B86ECA7481B); } + static Void _0xB5A4DB34FE89B88A() { return _i(0xB5A4DB34FE89B88A); } + static Void _0x63EB2B972A218CAC() { return _i(0x63EB2B972A218CAC); } + static Void _0xF4A0DADB70F57FA6() { return _i(0xF4A0DADB70F57FA6); } + static Any _0x5068F488DDB54DD8() { return _i(0x5068F488DDB54DD8); } + static Any _0xFB199266061F820A() { return _i(0xFB199266061F820A); } + static Void _0x95A7DABDDBB78AE7(Any* p0, Any* p1) { return _i(0x95A7DABDDBB78AE7, p0, p1); } + static bool is_entity_focus(Entity entity) { return _i(0x2DDFF3FB9075D747, entity); } + static bool is_ipl_active(const char* iplName) { return _i(0x88A741E44A2B3495, iplName); } + static bool is_model_a_ped(uint32_t modelHash) { return _i(0x75816577FEA6DAD5, modelHash); } + static bool is_model_a_vehicle(uint32_t model) { return _i(0x19AAC8F07BFEC53E, model); } + static bool is_model_in_cdimage(uint32_t model) { return _i(0x35B9E0803292B641, model); } + static bool is_model_valid(uint32_t model) { return _i(0xC0296A2EDF545E92, model); } + static bool is_network_loading_scene() { return _i(0x41CA5A33160EA4AB); } + static bool is_new_load_scene_active() { return _i(0xA41A05B6CB741B85); } + static bool is_new_load_scene_loaded() { return _i(0x01B8247A7A8B9AD1); } + static bool is_player_switch_in_progress() { return _i(0xD9D2CFFF49FAB35F); } + static Any _0x71E7B2E657449AAD() { return _i(0x71E7B2E657449AAD); } + static bool is_srl_loaded() { return _i(0xD0263801A4C5B0BB); } + static Any _0x07C313F94746702C(Any p0) { return _i(0x07C313F94746702C, p0); } + static Any _0xBC9823AB80A3DCAC() { return _i(0xBC9823AB80A3DCAC); } + static Any _0xDFA80CB25D0A19B3() { return _i(0xDFA80CB25D0A19B3); } + static Any _0x5B74EA8CFD5E3E7E() { return _i(0x5B74EA8CFD5E3E7E); } + static Any _0x933BBEEB8C61B5F4() { return _i(0x933BBEEB8C61B5F4); } + static Void load_all_objects_now() { return _i(0xBD6E84632DD4CB3F); } + static Void load_scene(float x, float y, float z) { return _i(0x4448EB75B4904BDB, x, y, z); } + static Any network_update_load_scene() { return _i(0xC4582015556D1C46); } + static bool new_load_scene_start(float p0, float p1, float p2, float p3, float p4, float p5, float p6, Any p7) { return _i(0x212A8D0D2BABFAC2, p0, p1, p2, p3, p4, p5, p6, p7); } + static bool new_load_scene_start_sphere(float x, float y, float z, float radius, Any p4) { return _i(0xACCFB4ACF53551B0, x, y, z, radius, p4); } + static Void new_load_scene_stop() { return _i(0xC197616D221FF4A4); } + static Void _0xA76359FC80B2438E(float p0) { return _i(0xA76359FC80B2438E, p0); } + static Void prefetch_srl(const char* srl) { return _i(0x3D245789CE12982C, srl); } + static Void _0xBED8CA5FF5E04113(float p0, float p1, float p2, float p3) { return _i(0xBED8CA5FF5E04113, p0, p1, p2, p3); } + static Void remove_anim_dict(const char* animDict) { return _i(0xF66A602F829E2A06, animDict); } + static Void remove_anim_set(const char* animSet) { return _i(0x16350528F93024B3, animSet); } + static Void remove_clip_set(const char* clipSet) { return _i(0x01F73A131C18CD94, clipSet); } + static Void remove_ipl(const char* iplName) { return _i(0xEE6C5AD3ECE0A82D, iplName); } + static Void _0xF086AD9354FAC3A3(Any p0) { return _i(0xF086AD9354FAC3A3, p0); } + static Void remove_named_ptfx_asset(const char* fxName) { return _i(0x5F61EBBE1A00F96D, fxName); } + static Void remove_ptfx_asset() { return _i(0x88C6814073DD4A73); } + static Void request_collision_at_coord(float x, float y, float z) { return _i(0x07503F7948F491A7, x, y, z); } + static Void request_additional_collision_at_coord(float p0, float p1, float p2) { return _i(0xC9156DC11411A9EA, p0, p1, p2); } + static Void request_anim_dict(const char* animDict) { return _i(0xD3BD40951412FEF6, animDict); } + static Void request_anim_set(const char* animSet) { return _i(0x6EA47DAE7FAD0EED, animSet); } + static Void request_clipset(const char* clipSet) { return _i(0xD2A71E1A77418A49, clipSet); } + static Void request_ipl(const char* iplName) { return _i(0x41B4893843BBDB74, iplName); } + static Void request_menu_ped_model(uint32_t model) { return _i(0xA0261AEF7ACFC51E, model); } + static Void request_model(uint32_t model) { return _i(0x963D27A58DF860AC, model); } + static Void request_collision_for_model(uint32_t model) { return _i(0x923CB32A3B874FCB, model); } + static Void request_interior_room_by_name(int interiorID, const char* roomName) { return _i(0x8A7A40100EDFEC58, interiorID, roomName); } + static Void request_named_ptfx_asset(const char* fxName) { return _i(0xB80D8756B4668AB6, fxName); } + static Void request_ptfx_asset() { return _i(0x944955FB2A3935C8); } + static Void set_focus_entity(Entity entity) { return _i(0x198F77705FA0931D, entity); } + static Void set_focus_area(float x, float y, float z, float offsetX, float offsetY, float offsetZ) { return _i(0xBB7454BAFF08FE25, x, y, z, offsetX, offsetY, offsetZ); } + static Void set_game_pauses_for_streaming(bool toggle) { return _i(0x717CD6E6FAEBBEDC, toggle); } + static Void set_hd_area(float x, float y, float z, float ground) { return _i(0xB85F26619073E775, x, y, z, ground); } + static Void set_interior_active(int interiorID, bool toggle) { return _i(0xE37B76C387BE28ED, interiorID, toggle); } + static Void _0xAF12610C644A35C9(const char* p0, bool p1) { return _i(0xAF12610C644A35C9, p0, p1); } + static Void set_model_as_no_longer_needed(uint32_t model) { return _i(0xE532F5D78798DAAB, model); } + static Void set_ped_population_budget(int p0) { return _i(0x8C95333CFC3340F3, p0); } + static Void _0x5F2013F8BC24EE69(int p0) { return _i(0x5F2013F8BC24EE69, p0); } + static Void _0x0FDE9DBFC0A6BC65(Any* p0) { return _i(0x0FDE9DBFC0A6BC65, p0); } + static Void set_player_switch_outro(float p0, float p1, float p2, float p3, float p4, float p5, float p6, float p7, Any p8) { return _i(0xC208B673CE446B61, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static Void set_reduce_ped_model_budget(bool toggle) { return _i(0x77B5F9A36BF96710, toggle); } + static Void set_reduce_vehicle_model_budget(bool toggle) { return _i(0x80C527893080CCF3, toggle); } + static Void _0x40AEFD1A244741F2(bool p0) { return _i(0x40AEFD1A244741F2, p0); } + static Void _0x0811381EF5062FEC(Entity p0) { return _i(0x0811381EF5062FEC, p0); } + static Void _0x1E9057A74FD73E23() { return _i(0x1E9057A74FD73E23); } + static Void _0xF8155A7F03DDFC8E(Any p0) { return _i(0xF8155A7F03DDFC8E, p0); } + static Void _0x20C6C7E4EB082A7F(bool p0) { return _i(0x20C6C7E4EB082A7F, p0); } + static Void _0xEF39EE20C537E98C(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0xEF39EE20C537E98C, p0, p1, p2, p3, p4, p5); } + static Void _0xBEB2D9A1D9A8F55A(Any p0, Any p1, Any p2, Any p3) { return _i(0xBEB2D9A1D9A8F55A, p0, p1, p2, p3); } + static Void set_srl_time(float p0) { return _i(0xA74A541C6884E7B8, p0); } + static Void set_streaming(bool toggle) { return _i(0x6E0C692677008888, toggle); } + static Void set_vehicle_population_budget(int p0) { return _i(0xCB9E1EB3BE2AF4E9, p0); } + static Void shutdown_creator_budget() { return _i(0xCCE26000E9A6FAD7); } + static Void start_player_switch(Ped from, Ped to, int flags, int switchType) { return _i(0xFAA23F2CBA159D67, from, to, flags, switchType); } + static Void stop_player_switch() { return _i(0x95C0A5BBDC189AA1); } + static Any _0x1F3F018BC3AFA77C(float p0, float p1, float p2, float p3, float p4, float p5, float p6, Any p7, Any p8) { return _i(0x1F3F018BC3AFA77C, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static Any _0x0AD9710CEE2F590F(float p0, float p1, float p2, float p3, float p4, float p5, Any p6) { return _i(0x0AD9710CEE2F590F, p0, p1, p2, p3, p4, p5, p6); } + static Any format_focus_heading(float x, float y, float z, float rad, Any p4, Any p5) { return _i(0x219C7B8D53E429FD, x, y, z, rad, p4, p5); } + static Void _0x1EE7D8DF4425F053(Any p0) { return _i(0x1EE7D8DF4425F053, p0); } + static Any _0x7D41E9D2D17C5B2D(Any p0) { return _i(0x7D41E9D2D17C5B2D, p0); } + static Void _0x472397322E92A856() { return _i(0x472397322E92A856); } + static Void switch_out_player(Ped ped, int flags, int unknown) { return _i(0xAAB3200ED59016BC, ped, flags, unknown); } + static Void _0xD8295AF639FD9CB8(Any p0) { return _i(0xD8295AF639FD9CB8, p0); } + static Void set_ditch_police_models(bool toggle) { return _i(0x42CBE54462D92634, toggle); } + static Void _0x4E52E752C76E7E7A(Any p0) { return _i(0x4E52E752C76E7E7A, p0); } + + static Void add_script_to_random_ped(const char* name, uint32_t model, float p2, float p3) { return _i(0x4EE5367468A65CCC, name, model, p2, p3); } + static Void disable_script_brain_set(int brainSet) { return _i(0x14D8518E9760F08F, brainSet); } + static Void enable_script_brain_set(int brainSet) { return _i(0x67AA4D73F0CFA86B, brainSet); } + static bool is_object_within_brain_activation_range(Object object) { return _i(0xCCBA154209823057, object); } + static bool is_world_point_within_brain_activation_range() { return _i(0xC5042CC6F5E3D450); } + static Void _0x4D953DF78EBF8158() { return _i(0x4D953DF78EBF8158); } + static Void _0x0B40ED49D7D6FF84() { return _i(0x0B40ED49D7D6FF84); } + static Void _0x6E91B04E08773030(const char* action) { return _i(0x6E91B04E08773030, action); } + static Void _0x6D6840CEE8845831(const char* action) { return _i(0x6D6840CEE8845831, action); } + static Void register_object_script_brain(const char* scriptName, uint32_t objectName, int p2, float p3, int p4, int p5) { return _i(0x0BE84C318BA6EC22, scriptName, objectName, p2, p3, p4, p5); } + static Void register_world_point_script_brain(Any* p0, float p1, Any p2) { return _i(0x3CDC7136613284BD, p0, p1, p2); } + + static Any _0x0419B167EE128F33(Any p0, Any p1) { return _i(0x0419B167EE128F33, p0, p1); } + static Any _0xF3B0E0AED097A3F5(Any p0, Any p1) { return _i(0xF3B0E0AED097A3F5, p0, p1); } + static Any _0xD3E51C0AB8C26EEE(Any p0, Any p1) { return _i(0xD3E51C0AB8C26EEE, p0, p1); } + static Any _0x2CE544C68FB812A0(float p0, float p1, float p2, float p3, float p4, bool p5) { return _i(0x2CE544C68FB812A0, p0, p1, p2, p3, p4, p5); } + static Any _0x54B0F614960F4A5F(float p0, float p1, float p2, float p3, float p4, float p5, float p6) { return _i(0x54B0F614960F4A5F, p0, p1, p2, p3, p4, p5, p6); } + static Void _0x99AD4CCCB128CBC9(Vehicle vehicle) { return _i(0x99AD4CCCB128CBC9, vehicle); } + static Void add_vehicle_stuck_check_with_warp(Any p0, float p1, Any p2, bool p3, bool p4, bool p5, Any p6) { return _i(0x2FA9923062DD396C, p0, p1, p2, p3, p4, p5, p6); } + static Void add_vehicle_upsidedown_check(Vehicle vehicle) { return _i(0xB72E26D81006005B, vehicle); } + static Void _0xC1F981A6F74F0C23(Any p0, bool p1) { return _i(0xC1F981A6F74F0C23, p0, p1); } + static Void _0x0F3B4D4E43177236(Any p0, bool p1) { return _i(0x0F3B4D4E43177236, p0, p1); } + static bool are_all_vehicle_windows_intact(Vehicle vehicle) { return _i(0x11D862A3E977A9EF, vehicle); } + static bool are_any_vehicle_seats_free(Vehicle vehicle) { return _i(0x2D34FC3BC4ADB780, vehicle); } + static bool _0xF78F94D60248C737(Any p0, bool p1) { return _i(0xF78F94D60248C737, p0, p1); } + static bool are_propellers_undamaged(Vehicle vehicle) { return _i(0x755D6D5267CBBD7E, vehicle); } + static bool are_vehicle_wings_intact(Vehicle vehicle) { return _i(0x5991A01434CE9677, vehicle); } + static Void _0x6A98C2ECF57FA5D4(Vehicle vehicle, Entity entity) { return _i(0x6A98C2ECF57FA5D4, vehicle, entity); } + static Void _0xA1DD82F3CCF9A01E(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0xA1DD82F3CCF9A01E, p0, p1, p2, p3, p4, p5); } + static Void _0x16B5E274BDE402F8(Vehicle vehicle, Vehicle trailer, float p2, float p3, float p4, float p5, float p6, float p7, float p8, float p9, float p10, float p11) { return _i(0x16B5E274BDE402F8, vehicle, trailer, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } + static Void attach_vehicle_to_cargobob(Vehicle vehicle, Vehicle cargobob, int p2, float x, float y, float z) { return _i(0x4127F1D84E347769, vehicle, cargobob, p2, x, y, z); } + static Void attach_vehicle_to_tow_truck(Vehicle towTruck, Vehicle vehicle, bool rear, float hookOffsetX, float hookOffsetY, float hookOffsetZ) { return _i(0x29A16F8D621C4508, towTruck, vehicle, rear, hookOffsetX, hookOffsetY, hookOffsetZ); } + static Void attach_vehicle_to_trailer(Vehicle vehicle, Vehicle trailer, float radius) { return _i(0x3C7D42D58F770B54, vehicle, trailer, radius); } + static Void set_vehicle_halt(Vehicle vehicle, float distance, int killEngine, bool unknown) { return _i(0x260BE8F09E326A20, vehicle, distance, killEngine, unknown); } + static Any _0x2467A2D807D37CA3(Any p0) { return _i(0x2467A2D807D37CA3, p0); } + static bool get_boat_anchor(Vehicle vehicle) { return _i(0x26C10ECBDA5D043B, vehicle); } + static Any _0x2C1D8B3B19E517CC(Any p0, Any p1) { return _i(0x2C1D8B3B19E517CC, p0, p1); } + static bool can_shuffle_seat(Vehicle vehicle, Any p1) { return _i(0x30785D90C956BF35, vehicle, p1); } + static Void _0xE01903C47C7AC89E() { return _i(0xE01903C47C7AC89E); } + static Void clear_vehicle_custom_primary_colour(Vehicle vehicle) { return _i(0x55E1D2758F34E437, vehicle); } + static Void clear_vehicle_custom_secondary_colour(Vehicle vehicle) { return _i(0x5FFBDEEC3E8E2009, vehicle); } + static Void _0x0A436B8643716D14() { return _i(0x0A436B8643716D14); } + static Void _0x4419966C9936071A(Any p0) { return _i(0x4419966C9936071A, p0); } + static Void _0xAA3F739ABDDCF21F() { return _i(0xAA3F739ABDDCF21F); } + static Void _0x6D6AF961B72728AE(Vehicle vehicle) { return _i(0x6D6AF961B72728AE, vehicle); } + static Void close_bomb_bay_doors(Vehicle vehicle) { return _i(0x3556041742A0DC74, vehicle); } + static Void control_landing_gear(Vehicle vehicle, int state) { return _i(0xCFC8BE9A5E1FE575, vehicle, state); } + static Void _0xE44A982368A4AF23(Vehicle vehicle, Vehicle vehicle2) { return _i(0xE44A982368A4AF23, vehicle, vehicle2); } + static Vehicle create_mission_train(int variation, float x, float y, float z, bool direction) { return _i(0x63C6CCA8E68AE8C8, variation, x, y, z, direction); } + static Void create_pick_up_rope_for_cargobob(Vehicle cargobob, int state) { return _i(0x7BEB0C7A235F6F3B, cargobob, state); } + static int create_script_vehicle_generator(float x, float y, float z, float heading, float p4, float p5, uint32_t modelHash, int p7, int p8, int p9, int p10, bool p11, bool p12, bool p13, bool p14, bool p15, int p16) { return _i(0x9DEF883114668116, x, y, z, heading, p4, p5, modelHash, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16); } + static Vehicle create_vehicle(uint32_t modelHash, float x, float y, float z, float heading, bool isNetwork, bool p6, Any p7) { return _i(0xAF35D0D2583051B0, modelHash, x, y, z, heading, isNetwork, p6, p7); } + static Void delete_all_trains() { return _i(0x736A718577F39C7D); } + static Void delete_mission_train(Vehicle* train) { return _i(0x5B76B14AE875C795, train); } + static Void delete_script_vehicle_generator(int vehicleGenerator) { return _i(0x22102C9ABFCF125D, vehicleGenerator); } + static Void delete_vehicle(Vehicle* vehicle) { return _i(0xEA386986E786A54F, vehicle); } + static Void _0x7C0043FDFF6436BC(Vehicle vehicle) { return _i(0x7C0043FDFF6436BC, vehicle); } + static Any _0xAF03011701811146(Any p0, Any p1) { return _i(0xAF03011701811146, p0, p1); } + static bool detach_vehicle_from_any_cargobob(Vehicle vehicle) { return _i(0xADF7BE450512C12F, vehicle); } + static bool detach_vehicle_from_any_tow_truck(Vehicle vehicle) { return _i(0xD0E9CE05A1E68CD8, vehicle); } + static Void detach_vehicle_from_cargobob(Vehicle vehicle, Vehicle cargobob) { return _i(0x0E21D3DF1051399D, vehicle, cargobob); } + static Void detach_vehicle_from_tow_truck(Vehicle towTruck, Vehicle vehicle) { return _i(0xC2DB6B6708350ED8, towTruck, vehicle); } + static Void detach_vehicle_from_trailer(Vehicle vehicle) { return _i(0x90532EDF0D2BDD86, vehicle); } + static Void _0xEF49CF0270307CBE() { return _i(0xEF49CF0270307CBE); } + static Void _0x500873A45724C863(Vehicle vehicle, Any p1) { return _i(0x500873A45724C863, vehicle, p1); } + static Void disable_plane_aileron(Vehicle vehicle, bool p1, bool p2) { return _i(0x23428FC53C60919C, vehicle, p1, p2); } + static Void _0xF0E4BA16D1DB546C(Vehicle vehicle, int p1, int p2) { return _i(0xF0E4BA16D1DB546C, vehicle, p1, p2); } + static Void _0xF25E02CB9C5818F8() { return _i(0xF25E02CB9C5818F8); } + static Void _0x32CAEDF24A583345(Any p0) { return _i(0x32CAEDF24A583345, p0); } + static Void disable_vehicle_weapon(bool disabled, uint32_t weaponHash, Vehicle vehicle, Ped owner) { return _i(0xF4FC6A6F67D8D856, disabled, weaponHash, vehicle, owner); } + static bool does_cargobob_have_pickup_magnet(Vehicle cargobob) { return _i(0x6E08BF5B3722BAC9, cargobob); } + static bool does_cargobob_have_pick_up_rope(Vehicle cargobob) { return _i(0x1821D91AD4B56108, cargobob); } + static bool does_extra_exist(Vehicle vehicle, int extraId) { return _i(0x1262D55792428154, vehicle, extraId); } + static bool does_script_vehicle_generator_exist(int vehicleGenerator) { return _i(0xF6086BC836400876, vehicleGenerator); } + static Any _0x4E417C547182C84D(Any p0) { return _i(0x4E417C547182C84D, p0); } + static bool does_vehicle_exist_with_decorator(const char* decorator) { return _i(0x956B409B984D9BF7, decorator); } + static bool does_vehicle_have_roof(Vehicle vehicle) { return _i(0x8AC862B0B32C5B80, vehicle); } + static bool does_vehicle_have_stuck_vehicle_check(Vehicle vehicle) { return _i(0x57E4C39DE5EE8470, vehicle); } + static bool does_vehicle_have_weapons(Vehicle vehicle) { return _i(0x25ECB9F8017D98E0, vehicle); } + static Void _0xF87D9F2301F7D206(Any p0) { return _i(0xF87D9F2301F7D206, p0); } + static Void explode_vehicle(Vehicle vehicle, bool isAudible, bool isInvisible) { return _i(0xBA71116ADF5B514C, vehicle, isAudible, isInvisible); } + static Void explode_vehicle_in_cutscene(Vehicle vehicle, bool p1) { return _i(0x786A4EB67B01BF0B, vehicle, p1); } + static Vehicle get_vehicle_attached_to_entity(Object object) { return _i(0x375E7FC44F21C8AB, object); } + static Void fix_vehicle_window(Vehicle vehicle, int index) { return _i(0x772282EBEB95E682, vehicle, index); } + static Void _0x1F2E4E06DEA8992B(Any p0, bool p1) { return _i(0x1F2E4E06DEA8992B, p0, p1); } + static Void _0x33506883545AC0DF(Vehicle vehicle, bool p1) { return _i(0x33506883545AC0DF, vehicle, p1); } + static Void _0x99CAD8E7AFDB60FA(Vehicle vehicle, float p1, float p2) { return _i(0x99CAD8E7AFDB60FA, vehicle, p1, p2); } + static bool _0xA4822F1CF23F4810(math::vector3* outVec, Any p1, math::vector3* outVec1, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8) { return _i(0xA4822F1CF23F4810, outVec, p1, outVec1, p3, p4, p5, p6, p7, p8); } + static int get_all_vehicles(Any* vehArray) { return _i(0x9B8E1BF04B51F2E8, vehArray); } + static Any get_are_bomb_bay_doors_open(Any p0) { return _i(0xD0917A423314BBA8, p0); } + static math::vector3 get_cargobob_hook_position(Vehicle cargobob) { return _i>(0xCBDB9B923CACC92D, cargobob); } + static float _0x6636C535F6CC2725(Vehicle vehicle) { return _i(0x6636C535F6CC2725, vehicle); } + static float _0x5AA3F878A178C4FC(uint32_t modelHash) { return _i(0x5AA3F878A178C4FC, modelHash); } + static Any _0xEC69ADF931AAE0C3(Any p0) { return _i(0xEC69ADF931AAE0C3, p0); } + static Any _0x51F30DB60626A20E(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8) { return _i(0x51F30DB60626A20E, p0, p1, p2, p3, p4, p5, p6, p7, p8); } + static Any has_vehicle_jumping_ability(Vehicle vehicle) { return _i(0x9078C0C5EF8C19E9, vehicle); } + static Vehicle get_closest_vehicle(float x, float y, float z, float radius, uint32_t modelHash, int flags) { return _i(0xF73EB622C4F1689B, x, y, z, radius, modelHash, flags); } + static int get_convertible_roof_state(Vehicle vehicle) { return _i(0xF8C397922FC03F41, vehicle); } + static Any get_current_playback_for_vehicle(Any p0) { return _i(0x42BC05C27A946054, p0); } + static const char* get_display_name_from_vehicle_model(uint32_t modelHash) { return _i(0xB215AAC32D25D019, modelHash); } + static bool is_vehicle_damaged(Vehicle vehicle) { return _i(0xBCDC5017D3CE1E9E, vehicle); } + static Any _0x99093F60746708CA(Any p0) { return _i(0x99093F60746708CA, p0); } + static Entity get_entity_attached_to_tow_truck(Vehicle towTruck) { return _i(0xEFEA18DCF10F8F75, towTruck); } + static math::vector3 get_entry_position_of_door(Vehicle vehicle, int doorIndex) { return _i>(0xC0572928C0ABFDA3, vehicle, doorIndex); } + static float get_vehicle_suspension_height(Vehicle vehicle) { return _i(0x53952FD2BAA19F17, vehicle); } + static float _0xC6AD107DDC9054CC(uint32_t modelHash) { return _i(0xC6AD107DDC9054CC, modelHash); } + static Any get_has_lowerable_wheels(Vehicle vehicle) { return _i(0xDCA174A42133F08C, vehicle); } + static bool has_vehicle_rocket_boost(Vehicle vehicle) { return _i(0x36D782F68B309BDA, vehicle); } + static float get_heli_main_rotor_health(Vehicle vehicle) { return _i(0xE4CB7541F413D2C5, vehicle); } + static float get_heli_engine_health(Vehicle vehicle) { return _i(0xAC51915D27E4A5F7, vehicle); } + static float get_heli_tail_rotor_health(Vehicle vehicle) { return _i(0xAE8CE82A4219AC8C, vehicle); } + static Any _0xA01BC64DD4BFBBAC(Vehicle vehicle, int p1) { return _i(0xA01BC64DD4BFBBAC, vehicle, p1); } + static Any _0xBA91D045575699AD(Any p0) { return _i(0xBA91D045575699AD, p0); } + static Any does_vehicle_have_door(Vehicle vehicle, int doorIndex) { return _i(0x645F4B6E8499F632, vehicle, doorIndex); } + static bool get_is_left_vehicle_headlight_damaged(Vehicle vehicle) { return _i(0x5EF77C9ADD3B11A3, vehicle); } + static bool get_is_right_vehicle_headlight_damaged(Vehicle vehicle) { return _i(0xA7ECB73355EB2F20, vehicle); } + static bool get_is_vehicle_engine_running(Vehicle vehicle) { return _i(0xAE31E7DF9B5B132E, vehicle); } + static bool get_is_vehicle_primary_colour_custom(Vehicle vehicle) { return _i(0xF095C0405307B21B, vehicle); } + static bool get_is_vehicle_secondary_colour_custom(Vehicle vehicle) { return _i(0x910A32E7AAD2656C, vehicle); } + static Any _0x1DA0DA9CB3F0C8BF(Any p0) { return _i(0x1DA0DA9CB3F0C8BF, p0); } + static int get_landing_gear_state(Vehicle vehicle) { return _i(0x9B0F3DCA3DB0F4CD, vehicle); } + static Vehicle get_last_driven_vehicle() { return _i(0xB2D06FAEDE65B577); } + static Ped get_last_ped_in_vehicle_seat(Vehicle vehicle, int seatIndex) { return _i(0x83F969AA1EE2A664, vehicle, seatIndex); } + static const char* get_livery_name(Vehicle vehicle, int liveryIndex) { return _i(0xB4C7A93837C91A1F, vehicle, liveryIndex); } + static const char* get_mod_slot_name(Vehicle vehicle, int modType) { return _i(0x51F0FEB9F6AE98C0, vehicle, modType); } + static const char* get_mod_text_label(Vehicle vehicle, int modType, int modValue) { return _i(0x8935624F8C5592CC, vehicle, modType, modValue); } + static int get_number_of_vehicle_colours(Vehicle vehicle) { return _i(0x3B963160CD65D41E, vehicle); } + static Any get_number_of_vehicle_doors(Vehicle vehicle) { return _i(0x92922A607497B14D, vehicle); } + static int get_number_of_vehicle_number_plates() { return _i(0x4C4D6B2644F458CB); } + static int get_num_mod_colors(int p0, bool p1) { return _i(0xA551BE18C11A476D, p0, p1); } + static int get_num_mod_kits(Vehicle vehicle) { return _i(0x33F2E3FE70EAAE1D, vehicle); } + static int get_num_vehicle_mods(Vehicle vehicle, int modType) { return _i(0xE38E9162A2500646, vehicle, modType); } + static int get_num_vehicle_window_tints() { return _i(0x9D1224004B3A6707); } + static Ped get_ped_in_vehicle_seat(Vehicle vehicle, int index, Any p2) { return _i(0xBB40DD2270B65366, vehicle, index, p2); } + static Ped get_ped_using_vehicle_door(Vehicle vehicle, int doorIndex) { return _i(0x218297BF0CFD853B, vehicle, doorIndex); } + static float get_position_in_recording(Any p0) { return _i(0x2DACD605FC681475, p0); } + static math::vector3 get_position_of_vehicle_recording_at_time(int p0, float p1, const char* p2) { return _i>(0xD242728AA6F0FBA2, p0, p1, p2); } + static math::vector3 _0x92523B76657A517D(Any p0, float p1) { return _i>(0x92523B76657A517D, p0, p1); } + static Vehicle get_random_vehicle_back_bumper_in_sphere(float p0, float p1, float p2, float p3, int p4, int p5, int p6) { return _i(0xB50807EABE20A8DC, p0, p1, p2, p3, p4, p5, p6); } + static Vehicle get_random_vehicle_front_bumper_in_sphere(float p0, float p1, float p2, float p3, int p4, int p5, int p6) { return _i(0xC5574E0AEB86BA68, p0, p1, p2, p3, p4, p5, p6); } + static Vehicle get_random_vehicle_in_sphere(float x, float y, float z, float radius, uint32_t modelHash, int flags) { return _i(0x386F6CE5BAF6091C, x, y, z, radius, modelHash, flags); } + static math::vector3 get_rotation_of_vehicle_recording_at_time(Any p0, float p1, Any* p2) { return _i>(0x2058206FBE79A8AD, p0, p1, p2); } + static math::vector3 _0xF0F2103EFAF8CBA7(Any p0, float p1) { return _i>(0xF0F2103EFAF8CBA7, p0, p1); } + static float get_time_position_in_recording(Any p0) { return _i(0x5746F3A7AB7FE544, p0); } + static Any get_total_duration_of_vehicle_recording(Any p0, Any p1) { return _i(0x0E48D1C262390950, p0, p1); } + static float get_total_duration_of_vehicle_recording_id(Any p0) { return _i(0x102D125411A7B6E6, p0); } + static Entity get_train_carriage(Vehicle train, int trailerNumber) { return _i(0x08AAFD0814722BC3, train, trailerNumber); } + static float get_vehicle_acceleration(Vehicle vehicle) { return _i(0x5DD35C8D074E57AE, vehicle); } + static Vehicle get_vehicle_attached_to_cargobob(Vehicle cargobob) { return _i(0x873B82D42AC2B9E5, cargobob); } + static float get_vehicle_body_health(Vehicle vehicle) { return _i(0xF271147EB7B40F12, vehicle); } + static Any set_vehicle_bombs(Any p0) { return _i(0xEA12BD130D7569A1, p0); } + static Any can_vehicle_parachute_be_activated(Vehicle vehicle) { return _i(0xA916396DF4154EE3, vehicle); } + static uint32_t get_vehicle_cause_of_destruction(Vehicle vehicle) { return _i(0xE495D1EF4C91FD20, vehicle); } + static int get_vehicle_class(Vehicle vehicle) { return _i(0x29439776AAA00A62, vehicle); } + static float get_vehicle_class_estimated_speed(int vehicleClass) { return _i(0x00C09F246ABEDD82, vehicleClass); } + static int get_vehicle_class_from_name(uint32_t modelHash) { return _i(0xDEDF1C8BD47C2200, modelHash); } + static float get_vehicle_class_max_acceleration(int vehicleClass) { return _i(0x2F83E7E45D9EA7AE, vehicleClass); } + static float get_vehicle_class_max_agility(int vehicleClass) { return _i(0x4F930AD022D6DE3B, vehicleClass); } + static float get_vehicle_class_max_braking(int vehicleClass) { return _i(0x4BF54C16EC8FEC03, vehicleClass); } + static float get_vehicle_class_max_traction(int vehicleClass) { return _i(0xDBC86D85C5059461, vehicleClass); } + static Void get_vehicle_color(Vehicle vehicle, int* r, int* g, int* b) { return _i(0xF3CC740D36221548, vehicle, r, g, b); } + static Void get_vehicle_colours(Vehicle vehicle, int* colorPrimary, int* colorSecondary) { return _i(0xA19435F193E081AC, vehicle, colorPrimary, colorSecondary); } + static int _0xEEBFC7A7EFDC35B4(Vehicle vehicle) { return _i(0xEEBFC7A7EFDC35B4, vehicle); } + static int get_vehicle_colour_combination(Vehicle vehicle) { return _i(0x6A842D197F845D56, vehicle); } + static Any get_vehicle_countermeasures(Any p0) { return _i(0xF846AA63DF56B804, p0); } + static Any _0x36492C2F0D134C56(Any p0) { return _i(0x36492C2F0D134C56, p0); } + static Void get_vehicle_custom_primary_colour(Vehicle vehicle, int* r, int* g, int* b) { return _i(0xB64CF2CCA9D95F52, vehicle, r, g, b); } + static Void get_vehicle_custom_secondary_colour(Vehicle vehicle, int* r, int* g, int* b) { return _i(0x8389CD56CA8072DC, vehicle, r, g, b); } + static math::vector3 get_vehicle_deformation_at_pos(Vehicle vehicle, float offsetX, float offsetY, float offsetZ) { return _i>(0x4EC6CFBC7B2E9536, vehicle, offsetX, offsetY, offsetZ); } + static float get_vehicle_dirt_level(Vehicle vehicle) { return _i(0x8F17BC8BA08DA62B, vehicle); } + static bool get_vehicle_doors_locked_for_player(Vehicle vehicle, Player player) { return _i(0xF6AF6CB341349015, vehicle, player); } + static float get_vehicle_door_angle_ratio(Vehicle vehicle, int door) { return _i(0xFE3F9C29F7B32BD5, vehicle, door); } + static int get_vehicle_door_lock_status(Vehicle vehicle) { return _i(0x25BC98A59C2EA962, vehicle); } + static float get_vehicle_engine_health(Vehicle vehicle) { return _i(0xC45D23BAF168AAB8, vehicle); } + static float get_vehicle_enveff_scale(Vehicle vehicle) { return _i(0xA82819CAC9C4C403, vehicle); } + static float get_vehicle_estimated_max_speed(Vehicle vehicle) { return _i(0x53AF99BAA671CA47, vehicle); } + static Void get_vehicle_extra_colours(Vehicle vehicle, int* pearlescentColor, int* wheelColor) { return _i(0x3BC4245933A166F7, vehicle, pearlescentColor, wheelColor); } + static Void get_vehicle_interior_colour(Vehicle vehicle, int* color) { return _i(0x7D1464D472D32136, vehicle, color); } + static Void get_vehicle_dashboard_colour(Vehicle vehicle, int* color) { return _i(0xB7635E80A5C31BFF, vehicle, color); } + static Any get_vehicle_hover_mode_percentage(Any p0) { return _i(0xDA62027C8BDB326E, p0); } + static Any _0x50634E348C8D44EF(Any p0) { return _i(0x50634E348C8D44EF, p0); } + static Any _0xE43701C36CAFF1A4(Any p0) { return _i(0xE43701C36CAFF1A4, p0); } + static Any has_vehicle_parachute(Vehicle vehicle) { return _i(0xBC9CFF381338CB4F, vehicle); } + static float get_vehicle_body_health2(Vehicle vehicle, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6) { return _i(0xB8EF61207C2393A9, vehicle, p1, p2, p3, p4, p5, p6); } + static Any _0x6EAAEFC76ACC311F(Any p0) { return _i(0x6EAAEFC76ACC311F, p0); } + static int _0xE6B0E8CFC3633BF0(Vehicle vehicle) { return _i(0xE6B0E8CFC3633BF0, vehicle); } + static Any _0xCA4AC3EAAE46EC7B(Any p0, Any p1) { return _i(0xCA4AC3EAAE46EC7B, p0, p1); } + static Any _0x8533CAFDE1F0F336(Any p0) { return _i(0x8533CAFDE1F0F336, p0); } + static bool _0xD4C4642CB7F50B5D(Vehicle vehicle) { return _i(0xD4C4642CB7F50B5D, vehicle); } + static uint32_t get_vehicle_layout_hash(Vehicle vehicle) { return _i(0x28D37D4F71AC5C58, vehicle); } + static bool get_vehicle_lights_state(Vehicle vehicle, bool* lightsOn, bool* highbeamsOn) { return _i(0xB91B4C20085BD12F, vehicle, lightsOn, highbeamsOn); } + static Any _0x60190048C0764A26(Any p0) { return _i(0x60190048C0764A26, p0); } + static Any _0x5ECB40269053C0D4(Any p0) { return _i(0x5ECB40269053C0D4, p0); } + static int get_vehicle_livery(Vehicle vehicle) { return _i(0x2BB9230590DA5E8A, vehicle); } + static int get_vehicle_livery_count(Vehicle vehicle) { return _i(0x87B63E25A529D526, vehicle); } + static bool get_vehicle_owner(Vehicle vehicle, Entity* entity) { return _i(0x8F5EBAB1F260CFCE, vehicle, entity); } + static float get_vehicle_max_braking(Vehicle vehicle) { return _i(0xAD7E85FC227197C4, vehicle); } + static int get_vehicle_max_number_of_passengers(Vehicle vehicle) { return _i(0xA7C4F2C6E744A550, vehicle); } + static float get_vehicle_max_traction(Vehicle vehicle) { return _i(0xA132FB5370554DB0, vehicle); } + static int get_vehicle_mod(Vehicle vehicle, int modType) { return _i(0x772960298DA26FDB, vehicle, modType); } + static float get_vehicle_model_acceleration(uint32_t modelHash) { return _i(0x8C044C5C84505B6A, modelHash); } + static float _0x53409B5163D5B846(uint32_t modelHash) { return _i(0x53409B5163D5B846, modelHash); } + static float get_vehicle_model_max_speed(uint32_t modelHash) { return _i(0xF417C2502FFFED43, modelHash); } + static float get_vehicle_model_max_braking(uint32_t modelHash) { return _i(0xDC53FD41B4ED944C, modelHash); } + static float _0xBFBA3BA79CFF7EBF(uint32_t modelHash) { return _i(0xBFBA3BA79CFF7EBF, modelHash); } + static float get_vehicle_model_max_traction(uint32_t modelHash) { return _i(0x539DE94D44FDFD0D, modelHash); } + static int get_vehicle_model_number_of_seats(uint32_t modelHash) { return _i(0x2AD93716F184EDA4, modelHash); } + static Any _0x5873C14A52D74236(Any p0) { return _i(0x5873C14A52D74236, p0); } + static Void get_vehicle_mod_color1(Vehicle vehicle, int* paintType, int* color, int* p3) { return _i(0xE8D65CA700C9A693, vehicle, paintType, color, p3); } + static const char* get_vehicle_mod_color1_name(Vehicle vehicle, bool p1) { return _i(0xB45085B721EFD38C, vehicle, p1); } + static Void get_vehicle_mod_color2(Vehicle vehicle, int* paintType, int* color) { return _i(0x81592BE4E3878728, vehicle, paintType, color); } + static const char* get_vehicle_mod_color2_name(Vehicle vehicle) { return _i(0x4967A516ED23A5A1, vehicle); } + static Any get_vehicle_mod_data(Vehicle vehicle, int modType, int modIndex) { return _i(0x4593CF82AA179706, vehicle, modType, modIndex); } + static int get_vehicle_mod_kit(Vehicle vehicle) { return _i(0x6325D1A044AE510D, vehicle); } + static int get_vehicle_mod_kit_type(Vehicle vehicle) { return _i(0xFC058F5121E54C32, vehicle); } + static Any get_vehicle_mod_modifier_value(Vehicle vehicle, int modType, int modIndex) { return _i(0x90A38E9838E0A8C1, vehicle, modType, modIndex); } + static bool get_vehicle_mod_variation(Vehicle vehicle, int modType) { return _i(0xB3924ECD70E095DC, vehicle, modType); } + static Void get_vehicle_neon_lights_colour(Vehicle vehicle, int* r, int* g, int* b) { return _i(0x7619EEE8C886757F, vehicle, r, g, b); } + static bool is_vehicle_neon_light_enabled(Vehicle vehicle, int index) { return _i(0x8C4B92553E4766A5, vehicle, index); } + static int get_vehicle_number_of_passengers(Vehicle vehicle) { return _i(0x24CB2137731FFE89, vehicle); } + static const char* get_vehicle_number_plate_text(Vehicle vehicle) { return _i(0x7CE1CCB9B293020E, vehicle); } + static int get_vehicle_number_plate_text_index(Vehicle vehicle) { return _i(0xF11BC2DD9A3E7195, vehicle); } + static Any _0x2C8CBFE1EA5FC631(Any p0) { return _i(0x2C8CBFE1EA5FC631, p0); } + static Any _0x42A4BEB35D372407(Any p0) { return _i(0x42A4BEB35D372407, p0); } + static float get_vehicle_petrol_tank_health(Vehicle vehicle) { return _i(0x7D5DABE888D2D074, vehicle); } + static int get_vehicle_plate_type(Vehicle vehicle) { return _i(0x9CCC9525BF2408E0, vehicle); } + static Any get_vehicle_recording_id(int p0, const char* p1) { return _i(0x21543C612379DB3C, p0, p1); } + static Void _0xDF7E3EEB29642C38(Vehicle vehicle, math::vector3* out1, math::vector3* out2) { return _i(0xDF7E3EEB29642C38, vehicle, out1, out2); } + static bool get_vehicle_trailer_vehicle(Vehicle vehicle, Vehicle* trailer) { return _i(0x1CDD6BADC297830D, vehicle, trailer); } + static bool get_vehicle_tyres_can_burst(Vehicle vehicle) { return _i(0x678B9BB8C3F58FEB, vehicle); } + static bool get_vehicle_tyres_are_low_grip(Vehicle vehicle) { return _i(0x2F5A72430E78C8D3, vehicle); } + static Void get_vehicle_tyre_smoke_color(Vehicle vehicle, int* r, int* g, int* b) { return _i(0xB635392A4938B3C3, vehicle, r, g, b); } + static Any _0x8181CE2F25CB9BB7(Any p0, Any p1) { return _i(0x8181CE2F25CB9BB7, p0, p1); } + static int get_vehicle_wheel_type(Vehicle vehicle) { return _i(0xB3ED1BFB4BE636DC, vehicle); } + static int get_vehicle_window_tint(Vehicle vehicle) { return _i(0x0EE21293DAD47C95, vehicle); } + static bool _0x91D6DD290888CBAB() { return _i(0x91D6DD290888CBAB); } + static bool has_preload_mods_finished(Any p0) { return _i(0x06F43E5175EB6D96, p0); } + static bool has_vehicle_asset_loaded(int vehicleAsset) { return _i(0x1BBE0523B8DB9A21, vehicleAsset); } + static Any _0x5BA68A0840D546AC(Any p0, Any p1) { return _i(0x5BA68A0840D546AC, p0, p1); } + static Any _0x6ADAABD3068C5235() { return _i(0x6ADAABD3068C5235); } + static bool has_vehicle_recording_been_loaded(Any p0, Any* p1) { return _i(0x300D614A4C785FC4, p0, p1); } + static bool is_vehicle_mod_load_done(Vehicle vehicle) { return _i(0x9A83F5F9963775EF, vehicle); } + static Void _0x48ADC8A773564670() { return _i(0x48ADC8A773564670); } + static bool _0x62CA17B74C435651(Vehicle vehicle) { return _i(0x62CA17B74C435651, vehicle); } + static bool any_passengers_rappeling(Vehicle vehicle) { return _i(0x291E373D483E7EE7, vehicle); } + static bool is_any_vehicle_near_point(float x, float y, float z, float radius) { return _i(0x61E1DD6125A3EEE6, x, y, z, radius); } + static bool is_big_vehicle(Vehicle vehicle) { return _i(0x9F243D3919F442FE, vehicle); } + static Any _0xB0AD1238A709B1A2(Any p0) { return _i(0xB0AD1238A709B1A2, p0); } + static bool is_cop_vehicle_in_area3_d(float x1, float x2, float y1, float y2, float z1, float z2) { return _i(0x7EEF65D5F153E26A, x1, x2, y1, y2, z1, z2); } + static bool is_vehicle_near_entity(Vehicle vehicle, Entity entity) { return _i(0x57715966069157AD, vehicle, entity); } + static bool _0x639431E895B9AA57(Ped ped, Vehicle vehicle, bool p2, bool p3, bool p4) { return _i(0x639431E895B9AA57, ped, vehicle, p2, p3, p4); } + static bool _0x89D630CF5EA96D23(Vehicle vehicle, Entity entity) { return _i(0x89D630CF5EA96D23, vehicle, entity); } + static bool _0x634148744F385576(Vehicle vehicle) { return _i(0x634148744F385576, vehicle); } + static bool is_heli_part_broken(Vehicle vehicle, bool p1, bool p2, bool p3) { return _i(0xBC74B4BE25EB6C8A, vehicle, p1, p2, p3); } + static Any _0xB09D25E77C33EB3F(Any p0, Any p1, Any p2) { return _i(0xB09D25E77C33EB3F, p0, p1, p2); } + static bool vehicle_has_landing_gear(Vehicle vehicle) { return _i(0x4198AB0022B15F87, vehicle); } + static bool is_playback_going_on_for_vehicle(Any p0) { return _i(0x1C8A4C2C19E68EEC, p0); } + static bool is_playback_using_ai_going_on_for_vehicle(Any p0) { return _i(0xAEA8FD591FAD4106, p0); } + static bool is_vehicle_rocket_boost_active(Vehicle vehicle) { return _i(0x3D34E80EED4AE3BE, vehicle); } + static bool _0xF7F203E31F96F6A1(Vehicle vehicle, bool flag) { return _i(0xF7F203E31F96F6A1, vehicle, flag); } + static bool is_taxi_light_on(Vehicle vehicle) { return _i(0x7504C0F113AB50FC, vehicle); } + static Any is_this_model_an_amphibious_car(uint32_t model) { return _i(0x633F6F44A537EBB6, model); } + static Any _0xA1A9FC1C76A6730D(Any p0) { return _i(0xA1A9FC1C76A6730D, p0); } + static bool is_this_model_a_bicycle(uint32_t model) { return _i(0xBF94DD42F63BDED2, model); } + static bool is_this_model_a_bike(uint32_t model) { return _i(0xB50C0B0CEDC6CE84, model); } + static bool is_this_model_a_boat(uint32_t model) { return _i(0x45A9187928F4B9E3, model); } + static bool is_this_model_a_car(uint32_t model) { return _i(0x7F6DB52EEFC96DF8, model); } + static bool is_this_model_a_heli(uint32_t model) { return _i(0xDCE4334788AF94EA, model); } + static bool is_this_model_an_emergency_boat(uint32_t model) { return _i(0x9537097412CF75FE, model); } + static bool is_this_model_a_plane(uint32_t model) { return _i(0xA0948AB42D7BA0DE, model); } + static bool is_this_model_a_quadbike(uint32_t model) { return _i(0x39DAC362EE65FA28, model); } + static bool is_this_model_a_train(uint32_t model) { return _i(0xAB935175B22E822B, model); } + static bool is_toggle_mod_on(Vehicle vehicle, int modType) { return _i(0x84B233A8C8FC8AE7, vehicle, modType); } + static bool _0xE33FFA906CE74880(Vehicle vehicle, Any p1) { return _i(0xE33FFA906CE74880, vehicle, p1); } + static bool is_vehicle_alarm_activated(Vehicle vehicle) { return _i(0x4319E335B71FFF34, vehicle); } + static bool is_vehicle_attached_to_cargobob(Vehicle cargobob, Vehicle vehicleAttached) { return _i(0xD40148F22E81A1D9, cargobob, vehicleAttached); } + static bool is_vehicle_attached_to_tow_truck(Vehicle towTruck, Vehicle vehicle) { return _i(0x146DF9EC4C4B9FD4, towTruck, vehicle); } + static bool is_vehicle_attached_to_trailer(Vehicle vehicle) { return _i(0xE7CF3C4F9F489F0C, vehicle); } + static bool is_vehicle_a_convertible(Vehicle vehicle, bool p1) { return _i(0x52F357A30698BCCE, vehicle, p1); } + static bool _0x27B926779DEB502D(Vehicle vehicle, bool p1) { return _i(0x27B926779DEB502D, vehicle, p1); } + static bool is_vehicle_bumper_broken_off(Vehicle vehicle, bool front) { return _i(0x468056A6BB6F3846, vehicle, front); } + static bool is_vehicle_door_damaged(Vehicle veh, int doorID) { return _i(0xB8E181E559464527, veh, doorID); } + static bool is_vehicle_door_fully_open(Vehicle vehicle, int doorIndex) { return _i(0x3E933CFF7B111C22, vehicle, doorIndex); } + static bool is_vehicle_driveable(Vehicle vehicle, bool isOnFireCheck) { return _i(0x4C241E39B23DF959, vehicle, isOnFireCheck); } + static bool is_vehicle_extra_turned_on(Vehicle vehicle, int extraId) { return _i(0xD2E6822DBFD6C8BD, vehicle, extraId); } + static bool is_vehicle_high_detail(Vehicle vehicle) { return _i(0x1F25887F3C104278, vehicle); } + static bool is_vehicle_in_burnout(Vehicle vehicle) { return _i(0x1297A88E081430EB, vehicle); } + static bool is_vehicle_in_garage_area(const char* garageName, Vehicle vehicle) { return _i(0xCEE4490CD57BB3C2, garageName, vehicle); } + static bool is_vehicle_model(Vehicle vehicle, uint32_t model) { return _i(0x423E8DE37D934D89, vehicle, model); } + static bool is_vehicle_on_all_wheels(Vehicle vehicle) { return _i(0xB104CD1BABF302E2, vehicle); } + static Any _0x3DE51E9C80B116CF(Any p0) { return _i(0x3DE51E9C80B116CF, p0); } + static Any _0x48C633E94A8142A7(Any p0) { return _i(0x48C633E94A8142A7, p0); } + static bool is_vehicle_searchlight_on(Vehicle vehicle) { return _i(0xC0F97FCE55094987, vehicle); } + static bool is_vehicle_seat_free(Vehicle vehicle, int seatIndex, Any p2) { return _i(0x22AC59A870E6A669, vehicle, seatIndex, p2); } + static bool is_vehicle_siren_sound_on(Vehicle vehicle) { return _i(0xB5CC40FBCB586380, vehicle); } + static bool is_vehicle_siren_on(Vehicle vehicle) { return _i(0x4C9BF537BE2634B2, vehicle); } + static bool is_vehicle_shop_respray_allowed(Vehicle vehicle) { return _i(0x8D474C8FAEFF6CDE, vehicle); } + static bool is_vehicle_stolen(Vehicle vehicle) { return _i(0x4AF9BD80EEBEB453, vehicle); } + static bool is_vehicle_stopped(Vehicle vehicle) { return _i(0x5721B434AD84D57A, vehicle); } + static bool is_vehicle_stopped_at_traffic_lights(Vehicle vehicle) { return _i(0x2959F696AE390A99, vehicle); } + static bool is_vehicle_stuck_on_roof(Vehicle vehicle) { return _i(0xB497F06B288DCFDF, vehicle); } + static bool is_vehicle_stuck_timer_up(Vehicle vehicle, int p1, int p2) { return _i(0x679BE1DAF71DA874, vehicle, p1, p2); } + static bool is_vehicle_tyre_burst(Vehicle vehicle, int wheelID, bool completely) { return _i(0xBA291848A0815CA9, vehicle, wheelID, completely); } + static bool is_vehicle_visible(Vehicle vehicle) { return _i(0xAA0A52D24FB98293, vehicle); } + static Any _0x563B65A643ED072E(Any p0, Any p1, Any p2) { return _i(0x563B65A643ED072E, p0, p1, p2); } + static bool is_vehicle_window_intact(Vehicle vehicle, int windowIndex) { return _i(0x46E571A0E20D01F1, vehicle, windowIndex); } + static Void _0xCFD778E7904C255E(Vehicle vehicle) { return _i(0xCFD778E7904C255E, vehicle); } + static Void lower_convertible_roof(Vehicle vehicle, bool instantlyLower) { return _i(0xDED51F703D0FA83D, vehicle, instantlyLower); } + static Void set_vehicle_engine_power_multiplier(Vehicle vehicle, float value) { return _i(0x93A3996368C94158, vehicle, value); } + static Void _0x51DB102F4A3BA5E0(bool p0) { return _i(0x51DB102F4A3BA5E0, p0); } + static Void open_bomb_bay_doors(Vehicle vehicle) { return _i(0x87E7F24270732CB1, vehicle); } + static Void _0x5EE5632F47AE9695(Any p0, Any p1) { return _i(0x5EE5632F47AE9695, p0, p1); } + static Void pause_playback_recorded_vehicle(Any p0) { return _i(0x632A689BF42301B1, p0); } + static Void eject_jb700_roof(Vehicle vehicle, float x, float y, float z) { return _i(0xE38CB9D7D39FDBCC, vehicle, x, y, z); } + static Void detach_vehicle_windscreen(Vehicle vehicle) { return _i(0x6D645D59FB5F5AD3, vehicle); } + static Void preload_vehicle_mod(Any p0, Any p1, Any p2) { return _i(0x758F49C24925568A, p0, p1, p2); } + static Void raise_convertible_roof(Vehicle vehicle, bool instantlyRaise) { return _i(0x8F5FB35D7E88FC70, vehicle, instantlyRaise); } + static Void release_preload_mods(Vehicle vehicle) { return _i(0x445D79F995508307, vehicle); } + static Void remove_pick_up_rope_for_cargobob(Vehicle cargobob) { return _i(0x9768CF648F54C804, cargobob); } + static bool _0x1033371FC8E842A7(Any p0) { return _i(0x1033371FC8E842A7, p0); } + static Void remove_vehicles_from_generators_in_area(float x1, float y1, float z1, float x2, float y2, float z2, Any unk) { return _i(0x46A1E1A299EC4BBA, x1, y1, z1, x2, y2, z2, unk); } + static Void remove_vehicle_asset(int vehicleAsset) { return _i(0xACE699C71AB9DEB5, vehicleAsset); } + static Void _0xE30524E1871F481D(Any p0) { return _i(0xE30524E1871F481D, p0); } + static Void remove_vehicle_high_detail_model(Vehicle vehicle) { return _i(0x00689CDE5F7C6787, vehicle); } + static Void remove_vehicle_mod(Vehicle vehicle, int modType) { return _i(0x92D619E420858204, vehicle, modType); } + static Void remove_vehicle_recording(Any p0, Any* p1) { return _i(0xF1160ACCF98A3FC8, p0, p1); } + static Void remove_vehicle_stuck_check(Vehicle vehicle) { return _i(0x8386BFB614D06749, vehicle); } + static Void remove_vehicle_upsidedown_check(Vehicle vehicle) { return _i(0xC53EB42A499A7E90, vehicle); } + static Void remove_vehicle_window(Vehicle vehicle, int windowIndex) { return _i(0xA711568EEDB43069, vehicle, windowIndex); } + static Void request_vehicle_asset(uint32_t vehicleHash, int vehicleAsset) { return _i(0x81A15811460FAB3A, vehicleHash, vehicleAsset); } + static Void _0xDBA3C090E3D74690(Vehicle vehicle) { return _i(0xDBA3C090E3D74690, vehicle); } + static Void request_vehicle_high_detail_model(Vehicle vehicle) { return _i(0xA6E9FDCB2C76785E, vehicle); } + static Void request_vehicle_recording(Any p0, Any* p1) { return _i(0xAF514CABE74CBF15, p0, p1); } + static Void _0xE2F53F172B45EDE1() { return _i(0xE2F53F172B45EDE1); } + static Void reset_vehicle_stuck_timer(Vehicle vehicle, int nullAttributes) { return _i(0xD7591B0065AFAA7A, vehicle, nullAttributes); } + static Void reset_vehicle_wheels(Vehicle vehicle, bool toggle) { return _i(0x21D2E5662C1F6FED, vehicle, toggle); } + static Void roll_down_window(Vehicle vehicle, int windowIndex) { return _i(0x7AD9E6CE657D69E3, vehicle, windowIndex); } + static Void roll_down_windows(Vehicle vehicle) { return _i(0x85796B0549DDE156, vehicle); } + static Void roll_up_window(Vehicle vehicle, int windowIndex) { return _i(0x602E548F46E24D59, vehicle, windowIndex); } + static Void _0x5845066D8A1EA7F7(Vehicle vehicle, float x, float y, float z, Any p4) { return _i(0x5845066D8A1EA7F7, vehicle, x, y, z, p4); } + static Void _0xE5810AC70602F2F5(Vehicle vehicle, float p1) { return _i(0xE5810AC70602F2F5, vehicle, p1); } + static Void _0x80E3357FDEF45C21(Any p0, Any p1) { return _i(0x80E3357FDEF45C21, p0, p1); } + static Void _0x3441CAD2F2231923(Vehicle vehicle, bool p1) { return _i(0x3441CAD2F2231923, vehicle, p1); } + static Void set_all_low_priority_vehicle_generators_active(bool active) { return _i(0x608207E7A8FB787C, active); } + static Void set_all_vehicle_generators_active() { return _i(0x34AD89078831A4BC); } + static Void set_all_vehicle_generators_active_in_area(float x1, float y1, float z1, float x2, float y2, float z2, bool p6, bool p7) { return _i(0xC12321827687FE4D, x1, y1, z1, x2, y2, z2, p6, p7); } + static Void _0x35E0654F4BAD7971(bool p0) { return _i(0x35E0654F4BAD7971, p0); } + static Void set_some_vehicle_density_multiplier_this_frame(float value) { return _i(0x90B6DA738A9A25DA, value); } + static Void _0x73561D4425A021A2(Any p0, Any p1) { return _i(0x73561D4425A021A2, p0, p1); } + static Void set_bike_lean_angle(Vehicle vehicle, float x, float y) { return _i(0x9CFA4896C3A53CBB, vehicle, x, y); } + static Void set_boat_anchor(Vehicle vehicle, bool toggle) { return _i(0x75DBEC174AEEAD10, vehicle, toggle); } + static Void _0x0A6A279F3AA4FD70(Vehicle vehicle, bool p1) { return _i(0x0A6A279F3AA4FD70, vehicle, p1); } + static Void _0xED5EDE9E676643C9(Any p0, Any p1) { return _i(0xED5EDE9E676643C9, p0, p1); } + static Void _0xE842A9398079BD82(Vehicle vehicle, float p1) { return _i(0xE842A9398079BD82, vehicle, p1); } + static Void _0xE3EBAAE484798530(Vehicle vehicle, bool p1) { return _i(0xE3EBAAE484798530, vehicle, p1); } + static Void _0x8F719973E1445BA2(Vehicle vehicle, bool p1) { return _i(0x8F719973E1445BA2, vehicle, p1); } + static Void _0xBD32E46AA95C1DD2(Any p0) { return _i(0xBD32E46AA95C1DD2, p0); } + static Void _0xA7DCDF4DED40A8F4(Vehicle vehicle, bool p1) { return _i(0xA7DCDF4DED40A8F4, vehicle, p1); } + static Void set_can_respray_vehicle(Vehicle vehicle, bool state) { return _i(0x52BBA29D5EC69356, vehicle, state); } + static Void _0x1201E8A3290A3B98(Any p0, Any p1) { return _i(0x1201E8A3290A3B98, p0, p1); } + static Void _0x1F34B0626C594380(Any p0, Any p1) { return _i(0x1F34B0626C594380, p0, p1); } + static Void _0x72BECCF4B829522E(Any p0, Any p1) { return _i(0x72BECCF4B829522E, p0, p1); } + static Void _0x571FEB383F629926(Vehicle cargobob, bool p1) { return _i(0x571FEB383F629926, cargobob, p1); } + static Void set_cargobob_pickup_magnet_active(Vehicle cargobob, bool isActive) { return _i(0x9A665550F8DA349B, cargobob, isActive); } + static Void _0x56EB5E94318D3FB6(Vehicle vehicle, bool p1) { return _i(0x56EB5E94318D3FB6, vehicle, p1); } + static Void _0xA17BAD153B51547E(Vehicle cargobob, float p1) { return _i(0xA17BAD153B51547E, cargobob, p1); } + static Void _0x685D5561680D088B(Vehicle vehicle, float p1) { return _i(0x685D5561680D088B, vehicle, p1); } + static Void _0xED8286F71A819BAA(Vehicle cargobob, float p1) { return _i(0xED8286F71A819BAA, cargobob, p1); } + static Void _0x6D8EAC07506291FB(Vehicle cargobob, float p1) { return _i(0x6D8EAC07506291FB, cargobob, p1); } + static Void _0x66979ACF5102FD2F(Vehicle cargobob, float p1) { return _i(0x66979ACF5102FD2F, cargobob, p1); } + static Void _0x9BDDC73CC6A115D4(Vehicle vehicle, bool p1, bool p2) { return _i(0x9BDDC73CC6A115D4, vehicle, p1, p2); } + static Void _0xE301BD63E9E13CF0(Vehicle vehicle, Vehicle cargobob) { return _i(0xE301BD63E9E13CF0, vehicle, cargobob); } + static Void set_cargobob_pickup_magnet_strength(Vehicle cargobob, float strength) { return _i(0xBCBFCD9D1DAC19E2, cargobob, strength); } + static Void _0xCF1182F682F65307(Any p0, float p1) { return _i(0xCF1182F682F65307, p0, p1); } + static Void _0x0D5F65A8F4EBDAB5(Any p0, Any p1) { return _i(0x0D5F65A8F4EBDAB5, p0, p1); } + static Void _0xB9562064627FF9DB(Any p0, Any p1) { return _i(0xB9562064627FF9DB, p0, p1); } + static Void _0xFC40CBF7B90CA77C(Any p0) { return _i(0xFC40CBF7B90CA77C, p0); } + static Void set_car_high_speed_bump_severity_multiplier(float multiplier) { return _i(0x84FD40F56075E816, multiplier); } + static Void _0xB2E0C0D6922D31F2(Any p0, Any p1) { return _i(0xB2E0C0D6922D31F2, p0, p1); } + static Void set_convertible_roof(Vehicle vehicle, bool p1) { return _i(0xF39C4F538B5124C2, vehicle, p1); } + static Void _0x1A78AD3D8240536F(Vehicle vehicle, bool p1) { return _i(0x1A78AD3D8240536F, vehicle, p1); } + static Void _0x97841634EF7DF1D6(Any p0, Any p1) { return _i(0x97841634EF7DF1D6, p0, p1); } + static Void _0x26D99D5A82FD18E8(Any p0) { return _i(0x26D99D5A82FD18E8, p0); } + static Any _0xD4196117AF7BB974(Any p0, Any p1) { return _i(0xD4196117AF7BB974, p0, p1); } + static Void _0xEDBC8405B3895CC9(Any p0, Any p1) { return _i(0xEDBC8405B3895CC9, p0, p1); } + static Any _0x75627043C6AA90AD() { return _i(0x75627043C6AA90AD); } + static Void _0x8235F1BEAD557629(Any p0, Any p1) { return _i(0x8235F1BEAD557629, p0, p1); } + static Void _0x25367DE49D64CF16(Vehicle vehicle, bool p1) { return _i(0x25367DE49D64CF16, vehicle, p1); } + static Void _0xD4B8E3D1917BC86B(bool toggle) { return _i(0xD4B8E3D1917BC86B, toggle); } + static Void _0xB088E9A47AE6EDD5(Vehicle vehicle, bool p1) { return _i(0xB088E9A47AE6EDD5, vehicle, p1); } + static Void _0x91A0BD635321F145(Vehicle vehicle, bool p1) { return _i(0x91A0BD635321F145, vehicle, p1); } + static Void set_disable_vehicle_petrol_tank_damage(Vehicle vehicle, bool toggle) { return _i(0x37C8252A7C92D017, vehicle, toggle); } + static Void set_disable_vehicle_petrol_tank_fires(Vehicle vehicle, bool toggle) { return _i(0x465BF26AB9684352, vehicle, toggle); } + static Void display_distant_vehicles(bool toggle) { return _i(0xF796359A959DF65D, toggle); } + static Void _0xDBC631F109350B8C(Vehicle vehicle, bool p1) { return _i(0xDBC631F109350B8C, vehicle, p1); } + static Void _0x1087BC8EC540DAEB(Any p0, Any p1) { return _i(0x1087BC8EC540DAEB, p0, p1); } + static Void set_vehicle_door_can_break(Vehicle vehicle, int doorIndex, bool isBreakable) { return _i(0x2FA133A4A9D37ED8, vehicle, doorIndex, isBreakable); } + static Void _0xE6C0C80B8C867537(bool p0) { return _i(0xE6C0C80B8C867537, p0); } + static Void set_far_draw_vehicles(bool toggle) { return _i(0x26324F33423F3CC3, toggle); } + static Void _0xA247F9EF01D8082E(Any p0) { return _i(0xA247F9EF01D8082E, p0); } + static Void set_force_hd_vehicle(Vehicle vehicle, bool toggle) { return _i(0x97CE68CB032583F0, vehicle, toggle); } + static Void _0xB28B1FE5BFADD7F5(Vehicle vehicle, bool p1) { return _i(0xB28B1FE5BFADD7F5, vehicle, p1); } + static Void _0x4D9D109F63FEE1D4(Any p0, bool p1) { return _i(0x4D9D109F63FEE1D4, p0, p1); } + static Void _0x37EBBF3117BD6A25(Vehicle vehicle, float height) { return _i(0x37EBBF3117BD6A25, vehicle, height); } + static Void _0x428AD3E26C8D9EB0(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0x428AD3E26C8D9EB0, p0, p1, p2, p3, p4); } + static Void set_garbage_trucks(bool toggle) { return _i(0x2AFD795EEAC8D30D, toggle); } + static Void _0x544996C0081ABDEB(Any p0, Any p1) { return _i(0x544996C0081ABDEB, p0, p1); } + static Void _0xFAF2A78061FD9EF4(Any p0, float p1, float p2, float p3) { return _i(0xFAF2A78061FD9EF4, p0, p1, p2, p3); } + static Void _0xAB31EF4DE6800CE9(Any p0, Any p1) { return _i(0xAB31EF4DE6800CE9, p0, p1); } + static Void _0x430A7631A84C9BE7(Any p0) { return _i(0x430A7631A84C9BE7, p0); } + static Void set_heli_blades_full_speed(Vehicle vehicle) { return _i(0xA178472EBB8AE60D, vehicle); } + static Void set_heli_blades_speed(Vehicle vehicle, float speed) { return _i(0xFD280B4D7F3ABC4D, vehicle, speed); } + static Void _0x94A68DA412C4007D(Any p0, Any p1) { return _i(0x94A68DA412C4007D, p0, p1); } + static Void _0x0A3F820A9A9A9AC5(Any p0, Any p1, Any p2, Any p3) { return _i(0x0A3F820A9A9A9AC5, p0, p1, p2, p3); } + static Void set_helicopter_roll_pitch_yaw_mult(Vehicle helicopter, float multiplier) { return _i(0x6E0859B530A365CC, helicopter, multiplier); } + static Void _0x4056EA1105F5ABD7(Any p0, Any p1) { return _i(0x4056EA1105F5ABD7, p0, p1); } + static bool _0x3EC8BF18AA453FE9(Vehicle vehicle, Any p1) { return _i(0x3EC8BF18AA453FE9, vehicle, p1); } + static Void _0xFE205F38AAA58E5B(Any p0, Any p1) { return _i(0xFE205F38AAA58E5B, p0, p1); } + static Void _0xE6F13851780394DA(Vehicle vehicle, float p1) { return _i(0xE6F13851780394DA, vehicle, p1); } + static Void _0x28B18377EB6E25F6(Any p0, Any p1) { return _i(0x28B18377EB6E25F6, p0, p1); } + static Void _0x84EA99C62CB3EF0C(Any p0, Any p1, Any p2) { return _i(0x84EA99C62CB3EF0C, p0, p1, p2); } + static Void _0x8EA86DF356801C7D(Any p0, Any p1) { return _i(0x8EA86DF356801C7D, p0, p1); } + static Void _0xC24075310A8B9CD1(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xC24075310A8B9CD1, p0, p1, p2, p3, p4); } + static Void _0x5B91B229243351A8(Any p0, Any p1) { return _i(0x5B91B229243351A8, p0, p1); } + static Void set_last_driven_vehicle(Vehicle vehicle) { return _i(0xACFB2463CC22BED2, vehicle); } + static Void _0xBC3CCA5844452B06(float p0) { return _i(0xBC3CCA5844452B06, p0); } + static Void set_mission_train_as_no_longer_needed(Vehicle* train, bool p1) { return _i(0xBBE7648349B49BE8, train, p1); } + static Void set_mission_train_coords(Vehicle train, float x, float y, float z) { return _i(0x591CA673AA6AB736, train, x, y, z); } + static Void set_number_of_parked_vehicles(int value) { return _i(0xCAA15F13EBD417FF, value); } + static Void _0x1B212B26DD3C04DF(Any p0, Any p1) { return _i(0x1B212B26DD3C04DF, p0, p1); } + static Void _0x66E3AAFACE2D1EB8(Any p0, Any p1, Any p2) { return _i(0x66E3AAFACE2D1EB8, p0, p1, p2); } + static Void set_parked_vehicle_density_multiplier_this_frame(float multiplier) { return _i(0xEAE6DCC7EEE3DB1D, multiplier); } + static Void set_cargobob_hook_position(Any p0, float p1, float p2, int state) { return _i(0x877C1EAEAC531023, p0, p1, p2, state); } + static Void _0xC0ED6438E6D39BA8(Any p0, Any p1, Any p2) { return _i(0xC0ED6438E6D39BA8, p0, p1, p2); } + static Void _0x2A86A0475B6A1434(Any p0, Any p1) { return _i(0x2A86A0475B6A1434, p0, p1); } + static Any _0x4C815EB175086F84(Any p0, Any p1) { return _i(0x4C815EB175086F84, p0, p1); } + static Void _0xE16142B94664DEFD(Vehicle vehicle, bool p1) { return _i(0xE16142B94664DEFD, vehicle, p1); } + static Void _0xAD2D28A1AFDFF131(Vehicle vehicle, float value) { return _i(0xAD2D28A1AFDFF131, vehicle, value); } + static Void set_playback_speed(Vehicle vehicle, float speed) { return _i(0x6683AB880E427778, vehicle, speed); } + static Void set_playback_to_use_ai(Vehicle vehicle, int flag) { return _i(0xA549C3B37EA28131, vehicle, flag); } + static Void set_playback_to_use_ai_try_to_revert_back_later(Any p0, Any p1, Any p2, bool p3) { return _i(0x6E63860BBB190730, p0, p1, p2, p3); } + static Void set_players_last_vehicle(Vehicle vehicle) { return _i(0xBCDF8BAF56C87B6A, vehicle); } + static Void _0x4E74E62E0A97E901(Vehicle vehicle, bool p1) { return _i(0x4E74E62E0A97E901, vehicle, p1); } + static Void _0x796A877E459B99EA(Any p0, float p1, float p2, float p3) { return _i(0x796A877E459B99EA, p0, p1, p2, p3); } + static Void set_random_boats(bool toggle) { return _i(0x84436EC293B1415F, toggle); } + static Void set_random_trains(bool toggle) { return _i(0x80D9F74197EA47D9, toggle); } + static Void set_random_vehicle_density_multiplier_this_frame(float multiplier) { return _i(0xB3B3359379FE77D3, multiplier); } + static Void set_render_train_as_derailed(Vehicle train, bool toggle) { return _i(0x317B11A312DF5534, train, toggle); } + static Void set_vehicle_rocket_boost_active(Vehicle vehicle, bool active) { return _i(0x81E1552E35DC3839, vehicle, active); } + static Void set_vehicle_rocket_boost_percentage(Vehicle vehicle, float percentage) { return _i(0xFEB2DDED3509562E, vehicle, percentage); } + static Void _0xEFC13B1CE30D755D(Any p0, Any p1) { return _i(0xEFC13B1CE30D755D, p0, p1); } + static Void set_vehicle_rocket_boost_refill_time(Vehicle vehicle, float time) { return _i(0xE00F2AB100B76E89, vehicle, time); } + static Void set_script_vehicle_generator(Any vehicleGenerator, bool enabled) { return _i(0xD9D620E0AC6DC4B0, vehicleGenerator, enabled); } + static Void _0x063AE2B2CC273588(Any p0, bool p1) { return _i(0x063AE2B2CC273588, p0, p1); } + static Void _0x78CEEE41F49F421F(Any p0, Any p1) { return _i(0x78CEEE41F49F421F, p0, p1); } + static Void _0x65B080555EA48149(Any p0) { return _i(0x65B080555EA48149, p0); } + static Void _0x7BBE7FF626A591FE(Any p0) { return _i(0x7BBE7FF626A591FE, p0); } + static Void jitter_vehicle(Vehicle vehicle, bool p1, float yaw, float pitch, float roll) { return _i(0xC59872A5134879C7, vehicle, p1, yaw, pitch, roll); } + static Void set_plane_min_height_above_ground(Vehicle plane, int height) { return _i(0xB893215D8D4C015B, plane, height); } + static Void set_taxi_lights(Vehicle vehicle, bool state) { return _i(0x598803E85E8448D9, vehicle, state); } + static Void _0x2FA2494B47FDD009(Any p0, Any p1) { return _i(0x2FA2494B47FDD009, p0, p1); } + static Void _0x2A8F319B392E7B3F(Vehicle vehicle, float p1) { return _i(0x2A8F319B392E7B3F, vehicle, p1); } + static Any _0x878C75C09FBDB942() { return _i(0x878C75C09FBDB942); } + static Void _0x95CF53B3D687F9FA(Vehicle vehicle) { return _i(0x95CF53B3D687F9FA, vehicle); } + static Void set_train_cruise_speed(Vehicle train, float speed) { return _i(0x16469284DB8C62B5, train, speed); } + static Void set_train_speed(Vehicle train, float speed) { return _i(0xAA0BC91BE0B796E3, train, speed); } + static Void _0x21973BBF8D17EDFA(Any p0, Any p1) { return _i(0x21973BBF8D17EDFA, p0, p1); } + static Void _0xF06A16CA55D138D8(Any p0, Any p1) { return _i(0xF06A16CA55D138D8, p0, p1); } + static Void _0xDFFCEF48E511DB48(Any p0, bool p1) { return _i(0xDFFCEF48E511DB48, p0, p1); } + static Void _0x21115BCD6E44656A(Any p0, bool p1) { return _i(0x21115BCD6E44656A, p0, p1); } + static Void _0x9BECD4B9FEF3F8A6(Vehicle vehicle, bool p1) { return _i(0x9BECD4B9FEF3F8A6, vehicle, p1); } + static Void _0x1F9FB66F3A3842D2(Vehicle vehicle, bool p1) { return _i(0x1F9FB66F3A3842D2, vehicle, p1); } + static Void set_vehicle_exclusive_driver(Vehicle vehicle, bool p1) { return _i(0x41062318F23ED854, vehicle, p1); } + static Void set_vehicle_alarm(Vehicle vehicle, bool state) { return _i(0xCDE5E70C1DDB954C, vehicle, state); } + static Void _0x7D6F9A3EF26136A0(Vehicle vehicle, bool p1, bool p2) { return _i(0x7D6F9A3EF26136A0, vehicle, p1, p2); } + static Void _0x1DDA078D12879EEE(Any p0, Any p1, Any p2) { return _i(0x1DDA078D12879EEE, p0, p1, p2); } + static Void set_vehicle_allow_no_passengers_lockon(Vehicle veh, bool toggle) { return _i(0x5D14D4154BFE7B2C, veh, toggle); } + static Any set_vehicle_automatically_attaches(Vehicle vehicle, Any p1, Any p2) { return _i(0x8BA6F76BC53A1493, vehicle, p1, p2); } + static Void _0xD3301660A57C9272(Any p0) { return _i(0xD3301660A57C9272, p0); } + static Void _0x9F3F689B814F2599(Vehicle vehicle, bool p1) { return _i(0x9F3F689B814F2599, vehicle, p1); } + static Void _0x870B8B7A766615C8(Any p0, Any p1, Any p2) { return _i(0x870B8B7A766615C8, p0, p1, p2); } + static Void set_vehicle_body_health(Vehicle vehicle, float value) { return _i(0xB77D05AC8C78AADB, vehicle, value); } + static Void set_vehicle_bombs(Vehicle vehicle, int amount) { return _i(0xF4B2ED59DEB5D774, vehicle, amount); } + static Void _0xE4E2FD323574965C(Any p0, Any p1) { return _i(0xE4E2FD323574965C, p0, p1); } + static Void set_vehicle_brake_lights(Vehicle vehicle, bool toggle) { return _i(0x92B35082E0B42F66, vehicle, toggle); } + static Void _0xC361AA040D6637A8(Vehicle vehicle, bool p1) { return _i(0xC361AA040D6637A8, vehicle, p1); } + static Void _0xF8EBCCC96ADB9FB7(Any p0, float p1, bool p2) { return _i(0xF8EBCCC96ADB9FB7, p0, p1, p2); } + static Void set_vehicle_burnout(Vehicle vehicle, bool toggle) { return _i(0xFB8794444A7D60FB, vehicle, toggle); } + static Void set_vehicle_can_be_targetted(Vehicle vehicle, bool state) { return _i(0x3750146A28097A82, vehicle, state); } + static Void set_vehicle_can_be_used_by_fleeing_peds(Vehicle vehicle, bool toggle) { return _i(0x300504B23BD3B711, vehicle, toggle); } + static Void set_vehicle_can_be_visibly_damaged(Vehicle vehicle, bool state) { return _i(0x4C7028F78FFD3681, vehicle, state); } + static Void set_vehicle_can_break(Vehicle vehicle, bool toggle) { return _i(0x59BF8C3D52C92F66, vehicle, toggle); } + static Void _0x0CDDA42F9E360CA6(Vehicle vehicle, bool p1) { return _i(0x0CDDA42F9E360CA6, vehicle, p1); } + static Void _0x065D03A9D6B2C6B5(Any p0, Any p1) { return _i(0x065D03A9D6B2C6B5, p0, p1); } + static Void _0x206BC5DC9D1AC70A(Vehicle vehicle, bool p1) { return _i(0x206BC5DC9D1AC70A, vehicle, p1); } + static Void _0x51BB2D88D31A914B(Vehicle vehicle, bool p1) { return _i(0x51BB2D88D31A914B, vehicle, p1); } + static Void _0x192547247864DFDD(Vehicle vehicle, bool p1) { return _i(0x192547247864DFDD, vehicle, p1); } + static Void _0x428BACCDF5E26EAD(Vehicle vehicle, bool p1) { return _i(0x428BACCDF5E26EAD, vehicle, p1); } + static Void set_vehicle_ceiling_height(Vehicle vehicle, float p1) { return _i(0xA46413066687A328, vehicle, p1); } + static Void set_vehicle_engine_torque_multiplier(Vehicle vehicle, float value) { return _i(0xB59E4BD37AE292DB, vehicle, value); } + static Void set_vehicle_colours(Vehicle vehicle, int colorPrimary, int colorSecondary) { return _i(0x4F1D4BE3A7F24601, vehicle, colorPrimary, colorSecondary); } + static Void set_vehicle_colour_combination(Vehicle vehicle, int colorCombination) { return _i(0x33E8CD3322E2FE31, vehicle, colorCombination); } + static Void set_vehicle_countermeasures(Vehicle vehicle, int amount) { return _i(0x9BDA23BF666F0855, vehicle, amount); } + static Void _0x182F266C2D9E2BEB(Vehicle vehicle, float p1) { return _i(0x182F266C2D9E2BEB, vehicle, p1); } + static Void set_vehicle_custom_primary_colour(Vehicle vehicle, int r, int g, int b) { return _i(0x7141766F91D15BEA, vehicle, r, g, b); } + static Void set_vehicle_custom_secondary_colour(Vehicle vehicle, int r, int g, int b) { return _i(0x36CED73BFED89754, vehicle, r, g, b); } + static Void set_vehicle_damage(Vehicle vehicle, float xOffset, float yOffset, float zOffset, float damage, float radius, bool p6) { return _i(0xA1DD317EA8FD4F29, vehicle, xOffset, yOffset, zOffset, damage, radius, p6); } + static Any _0x4E20D2A627011E8E(Any p0, Any p1) { return _i(0x4E20D2A627011E8E, p0, p1); } + static Void set_vehicle_deformation_fixed(Vehicle vehicle) { return _i(0x953DA1E1B12C0491, vehicle); } + static Void set_vehicle_density_multiplier_this_frame(float multiplier) { return _i(0x245A6883D966D537, multiplier); } + static Void set_vehicle_dirt_level(Vehicle vehicle, float dirtLevel) { return _i(0x79D3B596FE44EE8B, vehicle, dirtLevel); } + static Void _0xAF60E6A2936F982A(Any p0, Any p1) { return _i(0xAF60E6A2936F982A, p0, p1); } + static Void _0x8AA9180DE2FEDD45(Vehicle vehicle, bool p1) { return _i(0x8AA9180DE2FEDD45, vehicle, p1); } + static Void _0x2B6747FAA9DB9D6B(Vehicle vehicle, bool p1) { return _i(0x2B6747FAA9DB9D6B, vehicle, p1); } + static Void _0x76D26A22750E849E(Any p0) { return _i(0x76D26A22750E849E, p0); } + static Void set_vehicle_doors_locked(Vehicle vehicle, int doorLockStatus) { return _i(0xB664292EAECF7FA6, vehicle, doorLockStatus); } + static Void set_vehicle_doors_locked_for_all_players(Vehicle vehicle, bool toggle) { return _i(0xA2F80B8D040727CC, vehicle, toggle); } + static Void _0x9737A37136F07E75(Vehicle vehicle, bool toggle) { return _i(0x9737A37136F07E75, vehicle, toggle); } + static Void set_vehicle_doors_locked_for_player(Vehicle vehicle, Player player, bool toggle) { return _i(0x517AAF684BB50CD1, vehicle, player, toggle); } + static Void set_vehicle_doors_locked_for_team(Vehicle vehicle, int team, bool toggle) { return _i(0xB81F6D4A8F5EEBA8, vehicle, team, toggle); } + static Void set_vehicle_doors_shut(Vehicle vehicle, bool closeInstantly) { return _i(0x781B3D62BB013EF5, vehicle, closeInstantly); } + static Void _0x3B458DDB57038F08(Any p0, Any p1, Any p2) { return _i(0x3B458DDB57038F08, p0, p1, p2); } + static Void set_vehicle_door_broken(Vehicle vehicle, int doorIndex, bool deleteDoor) { return _i(0xD4D4F6A4AB575A33, vehicle, doorIndex, deleteDoor); } + static Void set_vehicle_door_control(Vehicle vehicle, int doorIndex, int speed, float angle) { return _i(0xF2BFA0430F0A0FCB, vehicle, doorIndex, speed, angle); } + static Void set_vehicle_door_latched(Vehicle vehicle, int doorIndex, bool p2, bool p3, bool p4) { return _i(0xA5A9653A8D2CAF48, vehicle, doorIndex, p2, p3, p4); } + static Void set_vehicle_door_open(Vehicle vehicle, int doorIndex, bool loose, bool openInstantly) { return _i(0x7C65DAC73C35C862, vehicle, doorIndex, loose, openInstantly); } + static Void set_vehicle_door_shut(Vehicle vehicle, int doorIndex, bool closeInstantly) { return _i(0x93D9BD300D7789E5, vehicle, doorIndex, closeInstantly); } + static Void set_vehicle_creates_money_pickups_when_exploded(Vehicle vehicle, bool toggle) { return _i(0x068F64F2470F9656, vehicle, toggle); } + static Void set_vehicle_engine_can_degrade(Vehicle vehicle, bool toggle) { return _i(0x983765856F2564F9, vehicle, toggle); } + static Void set_vehicle_engine_health(Vehicle vehicle, float health) { return _i(0x45F6D8EEF34ABEF1, vehicle, health); } + static Void set_vehicle_engine_on(Vehicle vehicle, bool value, bool instantly, bool otherwise) { return _i(0x2497C4717C8B881E, vehicle, value, instantly, otherwise); } + static Void set_vehicle_enveff_scale(Vehicle vehicle, float fade) { return _i(0x3AFDC536C3D01674, vehicle, fade); } + static Void set_vehicle_exclusive_driver2(Vehicle vehicle, Ped ped, int p2) { return _i(0xB5C51B5502E85E83, vehicle, ped, p2); } + static Void _0xD565F438137F0E10(Any p0, Any p1) { return _i(0xD565F438137F0E10, p0, p1); } + static Void set_vehicle_explodes_on_high_explosion_damage(Vehicle vehicle, bool toggle) { return _i(0x71B0892EC081D60A, vehicle, toggle); } + static Void _0x79DF7E806202CE01(Any p0, Any p1) { return _i(0x79DF7E806202CE01, p0, p1); } + static Void set_vehicle_extra(Vehicle vehicle, int extraId, bool toggle) { return _i(0x7EE3A3C5E4A40CC9, vehicle, extraId, toggle); } + static Void set_vehicle_extra_colours(Vehicle vehicle, int pearlescentColor, int wheelColor) { return _i(0x2036F561ADD12E33, vehicle, pearlescentColor, wheelColor); } + static Void set_vehicle_interior_colour(Vehicle vehicle, int color) { return _i(0xF40DD601A65F7F19, vehicle, color); } + static Void set_vehicle_dashboard_colour(Vehicle vehicle, int color) { return _i(0x6089CDF6A57F326C, vehicle, color); } + static Void set_vehicle_fixed(Vehicle vehicle) { return _i(0x115722B1B9C14C1C, vehicle); } + static Void _0x30D779DE7C4F6DD3(Any p0, float p1) { return _i(0x30D779DE7C4F6DD3, p0, p1); } + static Void _0x9AA47FFF660CB932(Any p0, float p1) { return _i(0x9AA47FFF660CB932, p0, p1); } + static Void _0xB055A34527CB8FD7(Vehicle vehicle, bool p1) { return _i(0xB055A34527CB8FD7, vehicle, p1); } + static Void set_vehicle_forward_speed(Vehicle vehicle, float speed) { return _i(0xAB54A438726D25D5, vehicle, speed); } + static Void _0x6501129C9E0FFA05(Any p0, Any p1) { return _i(0x6501129C9E0FFA05, p0, p1); } + static Void set_vehicle_friction_override(Vehicle vehicle, float friction) { return _i(0x1837AF7C627009BA, vehicle, friction); } + static Void set_vehicle_fullbeam(Vehicle vehicle, bool toggle) { return _i(0x8B7FD87F0DDB421E, vehicle, toggle); } + static Void _0x279D50DE5652D935(Any p0, bool p1) { return _i(0x279D50DE5652D935, p0, p1); } + static Void _0x9A75585FB2E54FAD(float p0, float p1, float p2, float p3) { return _i(0x9A75585FB2E54FAD, p0, p1, p2, p3); } + static Void set_vehicle_gravity(Vehicle vehicle, bool toggle) { return _i(0x89F149B6131E57DA, vehicle, toggle); } + static Void set_vehicle_handbrake(Vehicle vehicle, bool toggle) { return _i(0x684785568EF26A22, vehicle, toggle); } + static Void _0x02398B627547189C(Vehicle p0, bool p1) { return _i(0x02398B627547189C, p0, p1); } + static Void set_vehicle_has_been_owned_by_player(Vehicle vehicle, bool owned) { return _i(0x2B5F9D2AF1F1722D, vehicle, owned); } + static Void set_vehicle_siren_sound(Vehicle vehicle, bool toggle) { return _i(0xD8050E0EB60CF274, vehicle, toggle); } + static Void set_vehicle_has_strong_axles(Vehicle vehicle, bool toggle) { return _i(0x92F0CF722BC4202F, vehicle, toggle); } + static Void _0x1AA8A837D2169D94(Vehicle vehicle, bool p1) { return _i(0x1AA8A837D2169D94, vehicle, p1); } + static Void set_vehicle_lights_mode(Vehicle vehicle, int p1) { return _i(0x1FD09E7390A74D54, vehicle, p1); } + static Void _0x10655FAB9915623D(Any p0, Any p1) { return _i(0x10655FAB9915623D, p0, p1); } + static Void _0x06582AFF74894C75(Any p0, bool p1) { return _i(0x06582AFF74894C75, p0, p1); } + static Void set_vehicle_indicator_lights(Vehicle vehicle, int turnSignal, bool toggle) { return _i(0xB5D45264751B7DF0, vehicle, turnSignal, toggle); } + static Void set_ped_targettable_vehicle_destroy(Vehicle vehicle, int vehicleComponent, int destroyType) { return _i(0xBE70724027F85BCD, vehicle, vehicleComponent, destroyType); } + static Void _0x0AD9E8F87FF7C16F(Any p0, bool p1) { return _i(0x0AD9E8F87FF7C16F, p0, p1); } + static Void set_vehicle_interiorlight(Vehicle vehicle, bool toggle) { return _i(0xBC2042F090AF6AD3, vehicle, toggle); } + static Void set_vehicle_silent(Vehicle vehicle, bool toggle) { return _i(0x9D44FCCE98450843, vehicle, toggle); } + static Void set_vehicle_is_considered_by_player(Vehicle vehicle, bool toggle) { return _i(0x31B927BBC44156CD, vehicle, toggle); } + static Void _0x07116E24E9D1929D(Vehicle vehicle, bool toggle) { return _i(0x07116E24E9D1929D, vehicle, toggle); } + static Void set_vehicle_is_stolen(Vehicle vehicle, bool isStolen) { return _i(0x67B2C79AA7FF5738, vehicle, isStolen); } + static Void set_vehicle_is_wanted(Vehicle vehicle, bool state) { return _i(0xF7EC25A3EBEEC726, vehicle, state); } + static Void set_vehicle_jet_engine_on(Vehicle vehicle, bool toggle) { return _i(0xB8FBC8B1330CA9B4, vehicle, toggle); } + static Void set_vehicle_hud_special_ability_bar_active(Vehicle vehicle, bool active) { return _i(0x99C82F8A139F3E4E, vehicle, active); } + static Void set_vehicle_lights(Vehicle vehicle, int state) { return _i(0x34E710FF01247C5A, vehicle, state); } + static Void set_vehicle_light_multiplier(Vehicle vehicle, float multiplier) { return _i(0xB385454F8791F57C, vehicle, multiplier); } + static Void _0xC50CE861B55EAB8B(Vehicle vehicle, bool p1) { return _i(0xC50CE861B55EAB8B, vehicle, p1); } + static Void _0xA6D3A8750DC73270(Any p0, Any p1) { return _i(0xA6D3A8750DC73270, p0, p1); } + static Void set_vehicle_livery(Vehicle vehicle, int livery) { return _i(0x60BF608F1B8CD1B6, vehicle, livery); } + static Void set_vehicle_lod_multiplier(Vehicle vehicle, float multiplier) { return _i(0x93AE6A61BE015BF1, vehicle, multiplier); } + static Void _0xBAA045B4E42F3C06(Any p0, Any p1) { return _i(0xBAA045B4E42F3C06, p0, p1); } + static Void _0xE851E480B814D4BA(Vehicle vehicle, bool p1) { return _i(0xE851E480B814D4BA, vehicle, p1); } + static Void set_vehicle_xenon_lights_colour(Vehicle vehicle, int color) { return _i(0xE41033B25D003A07, vehicle, color); } + static int get_vehicle_xenon_lights_colour(Vehicle vehicle) { return _i(0x3DFF319A831E0CDB, vehicle); } + static Void set_vehicle_mod(Vehicle vehicle, int modType, int modIndex, bool customTires) { return _i(0x6AF0636DDEDCB6DD, vehicle, modType, modIndex, customTires); } + static Void set_vehicle_model_is_suppressed(uint32_t model, bool suppressed) { return _i(0x0FC2D89AC25A5814, model, suppressed); } + static Void set_vehicle_mod_color1(Vehicle vehicle, int paintType, int color, int p3) { return _i(0x43FEB945EE7F85B8, vehicle, paintType, color, p3); } + static Void set_vehicle_mod_color2(Vehicle vehicle, int paintType, int color) { return _i(0x816562BADFDEC83E, vehicle, paintType, color); } + static Void set_vehicle_mod_kit(Vehicle vehicle, int modKit) { return _i(0x1F2AA07F00B3217A, vehicle, modKit); } + static Void set_vehicle_needs_to_be_hotwired(Vehicle vehicle, bool toggle) { return _i(0xFBA550EA44404EE6, vehicle, toggle); } + static Void set_vehicle_neon_lights_colour(Vehicle vehicle, int r, int g, int b) { return _i(0x8E0A582209A62695, vehicle, r, g, b); } + static Void set_vehicle_neon_light_enabled(Vehicle vehicle, int index, bool toggle) { return _i(0x2AA720E4287BF269, vehicle, index, toggle); } + static Void _0xAB04325045427AAE(Vehicle vehicle, bool p1) { return _i(0xAB04325045427AAE, vehicle, p1); } + static Void _0x5E569EC46EC21CAE(Vehicle vehicle, bool toggle) { return _i(0x5E569EC46EC21CAE, vehicle, toggle); } + static Void set_vehicle_number_plate_text(Vehicle vehicle, const char* plateText) { return _i(0x95A88F0B409CDA47, vehicle, plateText); } + static Void set_vehicle_number_plate_text_index(Vehicle vehicle, int plateIndex) { return _i(0x9088EB5A43FFB0A1, vehicle, plateIndex); } + static Void _0x35BB21DE06784373(Any p0, Any p1) { return _i(0x35BB21DE06784373, p0, p1); } + static bool set_vehicle_on_ground_properly(Vehicle vehicle, Any p1) { return _i(0x49733E92263139D1, vehicle, p1); } + static Void set_vehicle_out_of_control(Vehicle vehicle, bool killDriver, bool explodeOnImpact) { return _i(0xF19D095E42D430CC, vehicle, killDriver, explodeOnImpact); } + static Void set_vehicle_petrol_tank_health(Vehicle vehicle, float health) { return _i(0x70DB57649FA8D0D8, vehicle, health); } + static Void set_vehicle_provides_cover(Vehicle vehicle, bool toggle) { return _i(0x5AFEEDD9BB2899D7, vehicle, toggle); } + static Void _0xCF9159024555488C(Any p0) { return _i(0xCF9159024555488C, p0); } + static Void set_vehicle_reduce_grip(Vehicle vehicle, bool toggle) { return _i(0x222FF6A823D122E2, vehicle, toggle); } + static Void _0xC4B3347BD68BD609(Any p0) { return _i(0xC4B3347BD68BD609, p0); } + static Void _0x2311DD7159F00582(Vehicle vehicle, bool p1) { return _i(0x2311DD7159F00582, vehicle, p1); } + static Void set_vehicle_rudder_broken(Vehicle vehicle, bool p1) { return _i(0x09606148B6C71DEF, vehicle, p1); } + static Void set_vehicle_searchlight(Vehicle heli, bool toggle, bool canBeUsedByAI) { return _i(0x14E85C5EE7A4D542, heli, toggle, canBeUsedByAI); } + static Void set_vehicle_shoot_at_target(Ped driver, Entity entity, float xTarget, float yTarget, float zTarget) { return _i(0x74CD9A9327A282EA, driver, entity, xTarget, yTarget, zTarget); } + static Void set_vehicle_siren(Vehicle vehicle, bool toggle) { return _i(0xF4924635A19EB37D, vehicle, toggle); } + static Void _0xF051D9BFB6BA39C0(Any p0) { return _i(0xF051D9BFB6BA39C0, p0); } + static Void _0x1CF38D529D7441D9(Vehicle vehicle, bool toggle) { return _i(0x1CF38D529D7441D9, vehicle, toggle); } + static Void _0x9007A2F21DC108D4(Any p0, float p1) { return _i(0x9007A2F21DC108D4, p0, p1); } + static Void set_vehicle_steer_bias(Vehicle vehicle, float value) { return _i(0x42A8EC77D5150CBE, vehicle, value); } + static Any _0xDCE97BDF8A0EABC8() { return _i(0xDCE97BDF8A0EABC8); } + static Void _0x6EBFB22D646FFC18(Vehicle vehicle, bool p1) { return _i(0x6EBFB22D646FFC18, vehicle, p1); } + static Void set_vehicle_strong(Vehicle vehicle, bool toggle) { return _i(0x3E8C8727991A8A0B, vehicle, toggle); } + static Void _0x737E398138550FFF(Any p0, Any p1) { return _i(0x737E398138550FFF, p0, p1); } + static Void _0x56B94C6D7127DFBA(Any p0, float p1, bool p2) { return _i(0x56B94C6D7127DFBA, p0, p1, p2); } + static Void set_vehicle_timed_explosion(Vehicle vehicle, Ped ped, bool toggle) { return _i(0x2E0A74E1002380B1, vehicle, ped, toggle); } + static Void set_tow_truck_crane_height(Vehicle towTruck, float height) { return _i(0xFE54B92A344583CA, towTruck, height); } + static Void _0x1093408B4B9D1146(Any p0, float p1) { return _i(0x1093408B4B9D1146, p0, p1); } + static Void _0x0581730AB9380412(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5) { return _i(0x0581730AB9380412, p0, p1, p2, p3, p4, p5); } + static Void set_vehicle_tyres_can_burst(Vehicle vehicle, bool toggle) { return _i(0xEB9DC3C7D8596C46, vehicle, toggle); } + static Void set_vehicle_tyres_low_grip(Vehicle vehicle, bool toggle) { return _i(0x5AC79C98C5C17F05, vehicle, toggle); } + static Void set_vehicle_tyre_burst(Vehicle vehicle, int index, bool onRim, float p3) { return _i(0xEC6A202EE4960385, vehicle, index, onRim, p3); } + static Void set_vehicle_tyre_fixed(Vehicle vehicle, int tyreIndex) { return _i(0x6E13FC662B882D1D, vehicle, tyreIndex); } + static Void set_vehicle_tyre_smoke_color(Vehicle vehicle, int r, int g, int b) { return _i(0xB5BA80F839791C0F, vehicle, r, g, b); } + static Void set_vehicle_undriveable(Vehicle vehicle, bool toggle) { return _i(0x8ABA6AF54B942B95, vehicle, toggle); } + static Void _0xE05DD0E9707003A3(Any p0, bool p1) { return _i(0xE05DD0E9707003A3, p0, p1); } + static Void _0xCAC66558B944DA67(Vehicle vehicle, bool p1) { return _i(0xCAC66558B944DA67, vehicle, p1); } + static Void _0xBB2333BB87DDD87F(Any p0, Any p1) { return _i(0xBB2333BB87DDD87F, p0, p1); } + static Void _0x1D97D1E3A70A649F(Vehicle vehicle, bool p1) { return _i(0x1D97D1E3A70A649F, vehicle, p1); } + static Void _0x41290B40FA63E6DA(Any p0) { return _i(0x41290B40FA63E6DA, p0); } + static Any _0xE023E8AC4EF7C117(Vehicle p0, bool p1, bool p2, bool p3) { return _i(0xE023E8AC4EF7C117, p0, p1, p2, p3); } + static Void _0x88BC673CA9E0AE99(Vehicle vehicle, bool p1) { return _i(0x88BC673CA9E0AE99, vehicle, p1); } + static Void _0xC45C27EF50F36ADC(Vehicle vehicle, bool p1) { return _i(0xC45C27EF50F36ADC, vehicle, p1); } + static Void _0x86B4B6212CB8B627(Any p0, Any p1) { return _i(0x86B4B6212CB8B627, p0, p1); } + static Any _0x45A561A9421AB6AD(Any p0, Any p1) { return _i(0x45A561A9421AB6AD, p0, p1); } + static Void _0x44CD1F493DB2A0A6(Any p0, Any p1, Any p2) { return _i(0x44CD1F493DB2A0A6, p0, p1, p2); } + static Void set_vehicle_wheels_can_break(Vehicle vehicle, bool enabled) { return _i(0x29B18B4FD460CA8F, vehicle, enabled); } + static Void set_vehicle_wheels_can_break_off_when_blow_up(Vehicle vehicle, bool toggle) { return _i(0xA37B9A517B133349, vehicle, toggle); } + static Void set_vehicle_wheel_type(Vehicle vehicle, int WheelType) { return _i(0x487EB21CC7295BA1, vehicle, WheelType); } + static Void _0xBE5C1255A1830FF5(Vehicle vehicle, bool toggle) { return _i(0xBE5C1255A1830FF5, vehicle, toggle); } + static Void _0x2C4A1590ABF43E8B(Vehicle vehicle, bool p1) { return _i(0x2C4A1590ABF43E8B, vehicle, p1); } + static Void set_vehicle_window_tint(Vehicle vehicle, int tint) { return _i(0x57C51E6BAD752696, vehicle, tint); } + static Void _0x1312DDD8385AEE4E(Any p0, Any p1) { return _i(0x1312DDD8385AEE4E, p0, p1); } + static Void raise_lowerable_wheels(Vehicle vehicle) { return _i(0xF660602546D27BA8, vehicle); } + static Void _0x5335BE58C083E74E(Any p0) { return _i(0x5335BE58C083E74E, p0); } + static Void skip_time_in_playback_recorded_vehicle(Any p0, float p1) { return _i(0x9438F7AD68771A20, p0, p1); } + static Void skip_to_end_and_stop_playback_recorded_vehicle(Any p0) { return _i(0xAB8E2EDA0C0A5883, p0); } + static Void smash_vehicle_window(Vehicle vehicle, int index) { return _i(0x9E5B5E4D2CCD2259, vehicle, index); } + static Void _0x374706271354CB18(Vehicle vehicle, Entity p1, float p2) { return _i(0x374706271354CB18, vehicle, p1, p2); } + static Void start_playback_recorded_vehicle(Vehicle vehicle, int p1, const char* playback, bool p3) { return _i(0x3F878F92B3A7A071, vehicle, p1, playback, p3); } + static Void start_playback_recorded_vehicle_using_ai(Any p0, Any p1, Any* p2, float p3, Any p4) { return _i(0x29DE5FA52D00428C, p0, p1, p2, p3, p4); } + static Void start_playback_recorded_vehicle_with_flags(Vehicle vehicle, Any p1, const char* playback, Any p3, Any p4, Any p5) { return _i(0x7D80FD645D4DA346, vehicle, p1, playback, p3, p4, p5); } + static Void start_vehicle_alarm(Vehicle vehicle) { return _i(0xB8FF7AB45305C345, vehicle); } + static Void start_vehicle_horn(Vehicle vehicle, int duration, uint32_t mode, bool forever) { return _i(0x9C8C6504B5B63D2C, vehicle, duration, mode, forever); } + static Void stop_all_garage_activity() { return _i(0x0F87E938BDF29D66); } + static Void _0x7C06330BFDDA182E(Any p0) { return _i(0x7C06330BFDDA182E, p0); } + static Void stop_playback_recorded_vehicle(Any p0) { return _i(0x54833611C17ABDEA, p0); } + static Void _0x83F813570FF519DE(Any p0, Any p1) { return _i(0x83F813570FF519DE, p0, p1); } + static Void _0xF488C566413B4232(Any p0, float p1) { return _i(0xF488C566413B4232, p0, p1); } + static Void switch_train_track(int intersectionId, bool state) { return _i(0xFD813BB7DB977F20, intersectionId, state); } + static Void toggle_vehicle_mod(Vehicle vehicle, int modType, bool toggle) { return _i(0x2A1F4F37F95BAD08, vehicle, modType, toggle); } + static Void track_vehicle_visibility(Vehicle vehicle) { return _i(0x64473AEFDCF47DCA, vehicle); } + static Void unpause_playback_recorded_vehicle(Any p0) { return _i(0x8879EE09268305D5, p0); } + static Void _0x756AE6E962168A04(Any p0, Any p1) { return _i(0x756AE6E962168A04, p0, p1); } + static Void _0x1BBAC99C0BC53656(Any p0, Any p1) { return _i(0x1BBAC99C0BC53656, p0, p1); } + static Void _0x9D30687C57BAA0BB(Any p0) { return _i(0x9D30687C57BAA0BB, p0); } + static Void set_vehicle_parachute_model(Vehicle vehicle, uint32_t parachuteModel) { return _i(0x4D610C6B56031351, vehicle, parachuteModel); } + static Void set_vehicle_parachute_texture(Vehicle vehicle, int colorIndex) { return _i(0xA74AD2439468C883, vehicle, colorIndex); } + static Void set_ramp_vehicle_receives_ramp_damage(Vehicle vehicle, bool receivesDamage) { return _i(0x28D034A93FE31BF5, vehicle, receivesDamage); } + static Void set_vehicle_parachute_active(Vehicle vehicle, bool active) { return _i(0x0BFFB028B3DD0A97, vehicle, active); } + static Void get_random_vehicle_model_in_memory(bool p0, uint32_t* modelHash, int* p2) { return _i(0x055BF0AC0C34F4FD, p0, modelHash, p2); } + static Void set_vehicle_name_debug(Vehicle vehicle, const char* name) { return _i(0xBFDF984E2C22B94F, vehicle, name); } + static Void _0xB264C4D2F2B0A78B(Vehicle vehicle) { return _i(0xB264C4D2F2B0A78B, vehicle); } + + static int _0xFDBF4CDBC07E1706(float x, float y, float z, float radius, float unk) { return _i(0xFDBF4CDBC07E1706, x, y, z, radius, unk); } + static float get_waves_intensity() { return _i(0x2B2A2CC86778B619); } + static bool get_water_height(float x, float y, float z, float* height) { return _i(0xF6829842C06AE524, x, y, z, height); } + static bool get_water_height_no_waves(float x, float y, float z, float* height) { return _i(0x8EE6B53CE13A9794, x, y, z, height); } + static Void modify_water(float x, float y, float radius, float height) { return _i(0xC443FD757C3BA637, x, y, radius, height); } + static Void _0xB1252E3E59A82AAF(int p0) { return _i(0xB1252E3E59A82AAF, p0); } + static Void reset_waves_intensity() { return _i(0x5E5E99285AE812DB); } + static Void _0x547237AA71AB44DE(Any p0) { return _i(0x547237AA71AB44DE, p0); } + static Void set_waves_intensity(float intensity) { return _i(0xB96B00E976BE977F, intensity); } + static bool test_probe_against_all_water(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7) { return _i(0x8974647ED222EA5F, p0, p1, p2, p3, p4, p5, p6, p7); } + static bool test_probe_against_water(float x1, float y1, float z1, float x2, float y2, float z2, math::vector3* result) { return _i(0xFFA5D878809819DB, x1, y1, z1, x2, y2, z2, result); } + static bool test_vertical_probe_against_all_water(float x, float y, float z, Any p3, Any* p4) { return _i(0x2B3451FA1E3142E2, x, y, z, p3, p4); } + + static Void add_ammo_to_ped(Ped ped, uint32_t weaponHash, int ammo) { return _i(0x78F0424C34306220, ped, weaponHash, ammo); } + static Void _0x2472622CE1F2D45F(Any p0, Any p1, Any p2) { return _i(0x2472622CE1F2D45F, p0, p1, p2); } + static bool can_use_weapon_on_parachute(uint32_t weaponHash) { return _i(0xBC7BE5ABC0879F74, weaponHash); } + static Void clear_entity_last_weapon_damage(Entity entity) { return _i(0xAC678E40BE7C74D2, entity); } + static Void clear_ped_last_weapon_damage(Ped ped) { return _i(0x0E98F88A24C5F4B8, ped); } + static Any _0x9DA58CDBF6BDBC08(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7, Any p8, Any p9, Any p10) { return _i(0x9DA58CDBF6BDBC08, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } + static Any _0x91EF34584710BE99(Any p0, Any p1, Any p2, Any p3, Any p4, Any p5, Any p6, Any p7) { return _i(0x91EF34584710BE99, p0, p1, p2, p3, p4, p5, p6, p7); } + static Object create_weapon_object(uint32_t weaponHash, int ammoCount, float x, float y, float z, bool showWorldModel, float heading, Any p7, Any p8, Any p9) { return _i(0x9541D3CF0D398F36, weaponHash, ammoCount, x, y, z, showWorldModel, heading, p7, p8, p9); } + static Any _0xCD79A550999D7D4F(Any p0) { return _i(0xCD79A550999D7D4F, p0); } + static bool does_weapon_take_weapon_component(uint32_t weaponHash, uint32_t componentHash) { return _i(0x5CEE3DF569CECAB0, weaponHash, componentHash); } + static Void enable_laser_sight_rendering(bool toggle) { return _i(0xC8B46D7727D864AA, toggle); } + static Void explode_projectiles(Ped ped, uint32_t weaponHash, bool p2) { return _i(0xFC4BD125DE7611E4, ped, weaponHash, p2); } + static Void _0x44F1012B69313374(Any p0, Any p1, Any p2, Any p3) { return _i(0x44F1012B69313374, p0, p1, p2, p3); } + static bool get_ammo_in_clip(Ped ped, uint32_t weaponHash, int* ammo) { return _i(0x2E1202248937775C, ped, weaponHash, ammo); } + static int get_ammo_in_ped_weapon(Ped ped, uint32_t weaponhash) { return _i(0x015A522136D7F951, ped, weaponhash); } + static uint32_t get_best_ped_weapon(Ped ped, bool p1) { return _i(0x8483E98E8B888AE2, ped, p1); } + static bool get_current_ped_vehicle_weapon(Ped ped, uint32_t* weaponHash) { return _i(0x1017582BCD3832DC, ped, weaponHash); } + static bool get_current_ped_weapon(Ped ped, uint32_t* weaponHash, bool p2) { return _i(0x3A87E44BB9A01D54, ped, weaponHash, p2); } + static Entity get_current_ped_weapon_entity_index(Ped ped) { return _i(0x3B390A939AF0B5FC, ped); } + static bool get_is_ped_gadget_equipped(Ped ped, uint32_t gadgetHash) { return _i(0xF731332072F5156C, ped, gadgetHash); } + static float get_lockon_range_of_current_ped_weapon(Ped ped) { return _i(0x840F03E9041E2C9C, ped); } + static bool get_max_ammo(Ped ped, uint32_t weaponHash, int* ammo) { return _i(0xDC16122C7A20C933, ped, weaponHash, ammo); } + static bool get_max_ammo_by_type(Ped p0, int p1, int* p2) { return _i(0x585847C5E4E11709, p0, p1, p2); } + static int get_max_ammo_in_clip(Ped ped, uint32_t weaponHash, bool p2) { return _i(0xA38DCFFCEA8962FA, ped, weaponHash, p2); } + static float get_max_range_of_current_ped_weapon(Ped ped) { return _i(0x814C9D19DFD69679, ped); } + static int get_ped_ammo_by_type(Ped ped, Any ammoType) { return _i(0x39D22031557946C1, ped, ammoType); } + static uint32_t get_ped_ammo_type_froweapon(Ped ped, uint32_t weaponHash) { return _i(0x7FEAD38B326B9F74, ped, weaponHash); } + static bool get_ped_last_weapon_impact_coord(Ped ped, math::vector3* coords) { return _i(0x6C4D0409BA1A2BC2, ped, coords); } + static uint32_t get_ped_ammo_type_from_weapon2(Ped ped, uint32_t weaponHash) { return _i(0xF489B44DD5AF4BD9, ped, weaponHash); } + static uint32_t get_ped_weapontype_in_slot(Ped ped, uint32_t weaponSlot) { return _i(0xEFFED78E9011134D, ped, weaponSlot); } + static Any _0xA2C9AC24B4061285(Any p0, Any p1) { return _i(0xA2C9AC24B4061285, p0, p1); } + static Any _0xF0A60040BE558F2D(Any p0, Any p1, Any p2) { return _i(0xF0A60040BE558F2D, p0, p1, p2); } + static int get_ped_weapon_tint_index(Ped ped, uint32_t weaponHash) { return _i(0x2B9EEDC07BD06B9F, ped, weaponHash); } + static uint32_t get_selected_ped_weapon(Ped ped) { return _i(0x0A6DB4965674D243, ped); } + static uint32_t get_weapontype_group(uint32_t weaponHash) { return _i(0xC3287EE3050FB74C, weaponHash); } + static uint32_t get_weapontype_model(uint32_t weaponHash) { return _i(0xF46CDC33180FDA94, weaponHash); } + static uint32_t get_weapontype_slot(uint32_t weaponHash) { return _i(0x4215460B9B8B7FA0, weaponHash); } + static int get_weapon_clip_size(uint32_t weaponHash) { return _i(0x583BE370B1EC6EB4, weaponHash); } + static bool get_weapon_component_hud_stats(uint32_t componentHash, int* outData) { return _i(0xB3CAF387AE12E9F8, componentHash, outData); } + static uint32_t get_weapon_component_type_model(uint32_t componentHash) { return _i(0x0DB57B41EC1DB083, componentHash); } + static Any _0x6558AC7C17BFEF58(Any p0) { return _i(0x6558AC7C17BFEF58, p0); } + static Any _0x4D1CB8DC40208A17(Any p0, Any p1) { return _i(0x4D1CB8DC40208A17, p0, p1); } + static float _0x3133B907D8B32053(Any p0, Any p1) { return _i(0x3133B907D8B32053, p0, p1); } + static int get_weapon_damage_type(uint32_t weaponHash) { return _i(0x3BE0BB12D25FB305, weaponHash); } + static bool get_weapon_hud_stats(uint32_t weaponHash, int* outData) { return _i(0xD92C739EE34C9EBA, weaponHash, outData); } + static Any _0xB3EA4FEABF41464B(Any p0, Any p1) { return _i(0xB3EA4FEABF41464B, p0, p1); } + static Object get_weapon_object_from_ped(Ped ped, bool p1) { return _i(0xCAE1DC9A0E22A16D, ped, p1); } + static int get_weapon_object_tint_index(Object weapon) { return _i(0xCD183314F7CD2E57, weapon); } + static int get_weapon_tint_count(uint32_t weaponHash) { return _i(0x5DCF6C5CAB2E9BF7, weaponHash); } + static Void give_delayed_weapon_to_ped(Ped ped, uint32_t weaponHash, int time, bool equipNow) { return _i(0xB282DC6EBD803C75, ped, weaponHash, time, equipNow); } + static Void _0x68F8BE6AF5CDF8A6(Any p0, Any p1) { return _i(0x68F8BE6AF5CDF8A6, p0, p1); } + static Void give_weapon_component_to_ped(Ped ped, uint32_t weaponHash, uint32_t componentHash) { return _i(0xD966D51AA5B28BB9, ped, weaponHash, componentHash); } + static Void give_weapon_component_to_weapon_object(Object weaponObject, uint32_t addonHash) { return _i(0x33E179436C0B31DB, weaponObject, addonHash); } + static Void give_weapon_object_to_ped(Object weaponObject, Ped ped) { return _i(0xB1FA61371AF7C4B7, weaponObject, ped); } + static Void give_weapon_to_ped(Ped ped, uint32_t weaponHash, int ammoCount, bool isHidden, bool equipNow) { return _i(0xBF0FD6E56C964FCB, ped, weaponHash, ammoCount, isHidden, equipNow); } + static bool has_entity_been_damaged_by_weapon(Entity entity, uint32_t weaponHash, int weaponType) { return _i(0x131D401334815E94, entity, weaponHash, weaponType); } + static bool has_ped_been_damaged_by_weapon(Ped ped, uint32_t weaponHash, int weaponType) { return _i(0x2D343D2219CD027A, ped, weaponHash, weaponType); } + static bool has_ped_got_weapon(Ped ped, uint32_t weaponHash, bool p2) { return _i(0x8DECB02F88F428BC, ped, weaponHash, p2); } + static bool has_ped_got_weapon_component(Ped ped, uint32_t weaponHash, uint32_t componentHash) { return _i(0xC593212475FAE340, ped, weaponHash, componentHash); } + static bool has_vehicle_got_projectile_attached(Ped driver, Vehicle vehicle, uint32_t weaponHash, Any p3) { return _i(0x717C8481234E3B88, driver, vehicle, weaponHash, p3); } + static bool has_weapon_asset_loaded(uint32_t weaponHash) { return _i(0x36E353271F0E90EE, weaponHash); } + static bool has_weapon_got_weapon_component(Object weapon, uint32_t addonHash) { return _i(0x76A18844E743BF91, weapon, addonHash); } + static Void hide_ped_weapon_for_scripted_cutscene(Ped ped, bool toggle) { return _i(0x6F6981D2253C208F, ped, toggle); } + static Any _0xDAB963831DBFD3F4(Any p0, Any p1, Any p2, Any p3, Any p4) { return _i(0xDAB963831DBFD3F4, p0, p1, p2, p3, p4); } + static bool is_flash_light_on(Ped ped) { return _i(0x4B7620C47217126C, ped); } + static bool is_ped_armed(Ped ped, int p1) { return _i(0x475768A975D5AD17, ped, p1); } + static bool is_ped_current_weapon_silenced(Ped ped) { return _i(0x65F0C5AE05943EC7, ped); } + static bool is_ped_weapon_component_active(Ped ped, uint32_t weaponHash, uint32_t componentHash) { return _i(0x0D78DE0572D3969E, ped, weaponHash, componentHash); } + static bool is_ped_weapon_ready_to_shoot(Ped ped) { return _i(0xB80CA294F2F26749, ped); } + static bool is_weapon_valid(uint32_t weaponHash) { return _i(0x937C71165CF334B3, weaponHash); } + static bool make_ped_reload(Ped ped) { return _i(0x20AE33F3AC9C0033, ped); } + static bool ped_skip_next_reloading(Ped ped) { return _i(0x8C0D57EA686FAD87, ped); } + static Any _0x0ABF535877897560(Any p0) { return _i(0x0ABF535877897560, p0); } + static Void _0x1E45B34ADEBEE48E() { return _i(0x1E45B34ADEBEE48E); } + static Void remove_all_ped_weapons(Ped ped, bool p1) { return _i(0xF25DF915FA38C5F3, ped, p1); } + static Void remove_all_projectiles_of_type(uint32_t weaponHash, bool p1) { return _i(0xFC52E0F37E446528, weaponHash, p1); } + static Void remove_weapon_asset(uint32_t weaponHash) { return _i(0xAA08EF13F341C8FC, weaponHash); } + static Void remove_weapon_component_from_ped(Ped ped, uint32_t weaponHash, uint32_t componentHash) { return _i(0x1E8BE90C74FB4C09, ped, weaponHash, componentHash); } + static Void remove_weapon_component_froweapon_object(Any p0, Any p1) { return _i(0xF7D82B0D66777611, p0, p1); } + static Void remove_weapon_from_ped(Ped ped, uint32_t weaponHash) { return _i(0x4899CB088EDF59B8, ped, weaponHash); } + static Void request_weapon_asset(uint32_t weaponHash, int p1, int p2) { return _i(0x5443438F033E29C3, weaponHash, p1, p2); } + static Void request_weapon_high_detail_model(Entity weaponObject) { return _i(0x48164DBB970AC3F0, weaponObject); } + static bool set_ammo_in_clip(Ped ped, uint32_t weaponHash, int ammo) { return _i(0xDCD2A934D65CB497, ped, weaponHash, ammo); } + static Void _0xEFF296097FF1E509(Any p0, Any p1) { return _i(0xEFF296097FF1E509, p0, p1); } + static Void _0xB4771B9AAF4E68E4(Any p0, Any p1, Any p2) { return _i(0xB4771B9AAF4E68E4, p0, p1, p2); } + static bool set_current_ped_vehicle_weapon(Ped ped, uint32_t weaponHash) { return _i(0x75C55983C2C39DAA, ped, weaponHash); } + static Void set_current_ped_weapon(Ped ped, uint32_t weaponHash, bool equipNow) { return _i(0xADF692B254977C0C, ped, weaponHash, equipNow); } + static Void _0xE4DCEC7FD5B739A5(Ped ped) { return _i(0xE4DCEC7FD5B739A5, ped); } + static Any set_flash_light_fade_distance(float distance) { return _i(0xCEA66DAD478CD39B, distance); } + static Void set_ped_ammo(Ped ped, uint32_t weaponHash, int ammo, Any p3) { return _i(0x14E56BC5B5DB6A19, ped, weaponHash, ammo, p3); } + static Void set_ped_ammo_by_type(Ped ped, Any ammoType, int ammo) { return _i(0x5FD1E1F011E76D7E, ped, ammoType, ammo); } + static Void set_ped_ammo_to_drop(Any p0, Any p1) { return _i(0xA4EFEF9440A5B0EF, p0, p1); } + static Void set_ped_chance_of_firing_blanks(Ped ped, float xBias, float yBias) { return _i(0x8378627201D5497D, ped, xBias, yBias); } + static Void set_ped_current_weapon_visible(Ped ped, bool visible, bool deselectWeapon, bool p3, bool p4) { return _i(0x0725A4CCFDED9A70, ped, visible, deselectWeapon, p3, p4); } + static Void set_ped_drops_inventory_weapon(Ped ped, uint32_t weaponHash, float xOffset, float yOffset, float zOffset, Any p5) { return _i(0x208A1888007FC0E6, ped, weaponHash, xOffset, yOffset, zOffset, p5); } + static Void set_ped_drops_weapon(Ped ped) { return _i(0x6B7513D9966FBEC0, ped); } + static Void set_ped_drops_weapons_when_dead(Ped ped, bool toggle) { return _i(0x476AE72C1D19D1A8, ped, toggle); } + static Void set_ped_gadget(Ped ped, uint32_t gadgetHash, bool p2) { return _i(0xD0D7B1E680ED4A1A, ped, gadgetHash, p2); } + static Void set_ped_infinite_ammo(Ped ped, bool toggle, uint32_t weaponHash) { return _i(0x3EDCB0505123623B, ped, toggle, weaponHash); } + static Void set_ped_infinite_ammo_clip(Ped ped, bool toggle) { return _i(0x183DADC6AA953186, ped, toggle); } + static Entity _0xB4C8D77C80C0421E(Ped ped, float p1) { return _i(0xB4C8D77C80C0421E, ped, p1); } + static Void _0x9FE5633880ECD8ED(Any p0, Any p1, Any p2, Any p3) { return _i(0x9FE5633880ECD8ED, p0, p1, p2, p3); } + static Void set_ped_weapon_tint_index(Ped ped, uint32_t weaponHash, int tintIndex) { return _i(0x50969B9B89ED5738, ped, weaponHash, tintIndex); } + static Void _0xE620FD3512A04F18(float p0) { return _i(0xE620FD3512A04F18, p0); } + static Void _0xECDC202B25E5CF48(Any p0, Any p1, Any p2) { return _i(0xECDC202B25E5CF48, p0, p1, p2); } + static Void set_weapon_animation_override(Ped ped, uint32_t animStyle) { return _i(0x1055AC3A667F09D9, ped, animStyle); } + static Void _0x4757F00BC6323CFE(Any p0, Any p1) { return _i(0x4757F00BC6323CFE, p0, p1); } + static Void _0x977CA98939E82E4B(Any p0, Any p1) { return _i(0x977CA98939E82E4B, p0, p1); } + static Void _0x5DA825A85D0EA6E6(Any p0, Any p1, Any p2) { return _i(0x5DA825A85D0EA6E6, p0, p1, p2); } + static Void set_weapon_object_tint_index(Object weapon, int tintIndex) { return _i(0xF827589017D4E4A9, weapon, tintIndex); } + + static Void clear_popschedule_override_vehicle_model(int scheduleId) { return _i(0x5C0DE367AA0D911C, scheduleId); } + static uint32_t get_hash_of_map_area_at_coords(float x, float y, float z) { return _i(0x7EE64D51E8498728, x, y, z); } + static const char* get_name_of_zone(float x, float y, float z) { return _i(0xCD90657D4C30E1CA, x, y, z); } + static int get_zone_at_coords(float x, float y, float z) { return _i(0x27040C25DE6CB2F4, x, y, z); } + static int get_zone_from_name_id(const char* zoneName) { return _i(0x98CD1D2934B76CC1, zoneName); } + static int get_zone_popschedule(int zoneId) { return _i(0x4334BC40AA0CB4BB, zoneId); } + static int get_zone_scumminess(int zoneId) { return _i(0x5F7B268D15BA0739, zoneId); } + static Void override_popschedule_vehicle_model(int scheduleId, uint32_t vehicleHash) { return _i(0x5F7D596BAC2E7777, scheduleId, vehicleHash); } + static Void set_zone_enabled(int zoneId, bool toggle) { return _i(0xBA5ECEEA120E5611, zoneId, toggle); } +} diff --git a/GTAV/src/rage/types/base_types.cpp b/GTAV/src/rage/types/base_types.cpp new file mode 100644 index 0000000..94d6f74 --- /dev/null +++ b/GTAV/src/rage/types/base_types.cpp @@ -0,0 +1,20 @@ +#include "base_types.h" +#include "rage/engine.h" +#include "global/vars.h" + +void guid_pool::for_each(std::function callback) { + for (uint32_t i = 0; i < m_count; i++) { + if (get(i)) { + callback(rage::engine::get_entity_handle((uint64_t)get(i)), get(i)); + } + } +} + +void vehicle_pool::for_each(std::function callback) { + for (uint32_t i = 0; i < m_count; i++) { + uint64_t address = get(i); + if (address && is_valid_vtable(*(uint64_t*)address)) { + callback(rage::engine::get_entity_handle(address), (void*)address); + } + } +} \ No newline at end of file diff --git a/GTAV/src/rage/types/base_types.h b/GTAV/src/rage/types/base_types.h new file mode 100644 index 0000000..4f64af0 --- /dev/null +++ b/GTAV/src/rage/types/base_types.h @@ -0,0 +1,1562 @@ +#pragma once +#include "stdafx.h" +#include +#include + +typedef int Void; +typedef int Any; +typedef int BOOL; +typedef int Entity; +typedef int Player; +typedef int FireId; +typedef int Ped; +typedef int Vehicle; +typedef int Cam; +typedef int CarGenerator; +typedef int Group; +typedef int Train; +typedef int Pickup; +typedef int Object; +typedef int Weapon; +typedef int Interior; +typedef int Blip; +typedef int TextureDict; +typedef int CoverPoint; +typedef int Camera; +typedef int TaskSequence; +typedef int ColourIndex; +typedef int Sphere; +typedef int ScrHandle; + +struct alignment_test { + bool m_monitor; + bool m_block; + uint32_t m_thread_id; +}; + +struct patches { + uint64_t m_address; + std::vector m_bytes; + std::vector m_patch = {}; + + void read(int size) { + for (int i = 0; i < size; i++) { + m_bytes.push_back(*(uint8_t*)(m_address + i)); + } + } + + patches() { + m_address = 0; + m_bytes = {}; + m_patch = {}; + } + + patches(uint64_t a, std::vector b, std::vector c = {}) + : m_address(a), m_bytes(b), m_patch(c) + {} +}; + +struct resource_streamed_script { + uint64_t m_vtable; + uint16_t m_resource_id; + char _0x000A[0xE]; + resource_streamed_script* m_next; + resource_streamed_script* m_previous; +}; + +struct resource_streamed_script_handler { + uint64_t m_vtable; + char _0x0008[0x28]; + resource_streamed_script* m_first; + resource_streamed_script* m_last; +}; + +struct guid_pool { +public: + char* m_data; + int8_t* m_flags; + uint32_t m_max; + uint32_t m_size; + uint32_t m_count; + + template + T* get(int index) { + if (m_flags[index] < 0) return nullptr; + return (T*)(m_data + (index * m_size)); + } + + void for_each(std::function callback); +}; + +struct vehicle_pool { +public: + uint64_t* m_data; + uint32_t m_max; + char _0x0000[0x4]; + uint32_t m_count; + + uint64_t get(int index) { + if (!m_data) return 0; + return m_data[index]; + } + + void for_each(std::function callback); +}; + +struct network_object_pool { + char* m_data; + int8_t* m_flags; + uint32_t m_max; + uint32_t m_size; + char _0x0018[0x8]; + uint16_t m_count; + + template + T* get(int index) { + if (m_flags[index] < 0) return nullptr; + return (T*)(m_data + (index * m_size)); + } +}; + +struct queue_pool { + char* m_data; + int8_t* m_flags; + uint32_t m_max; + uint32_t m_size; + uint32_t m_count; + uint32_t m_next_free_index; + + template + T* get(int index) { + if (m_flags[index] < 0) return nullptr; + return (T*)(m_data + (index * m_size)); + } +}; + +struct hash_list { + uint64_t m_count; + uint64_t m_list; +}; + +struct session_browser { + uint64_t m_rockstar_id; + uint64_t m_peer_token; + std::string m_name; + bool m_requested; + uint32_t m_local_ip; + uint64_t m_peer_token2; + uint64_t m_peer_token3; +}; + +struct desyncs { + uint64_t m_target; + uint32_t m_last; + int m_count; + bool m_possibility; +}; + +struct relay_usage { + char m_name[0x20]; + uint64_t m_rockstar_id; + uint32_t m_external_ip; +}; + +struct geo_ip { + std::string m_country; + std::string m_country_code; + std::string m_region_name; + std::string m_city; + std::string m_zip; + std::string m_timezone; + std::string m_isp; + std::string m_org; +}; + +enum eThreadState { + STATE_IDLE, + STATE_RUNNING, + STATE_KILLED +}; + +enum eJoinResponses : uint8_t { + JOIN_OK, + FAILED_TO_JOIN_INTENDED_SESSION, + FAILED_TO_JOIN_INTENDED_SESSION_2, + FAILED_TO_JOIN_INTENDED_SESSION_3, + FAILED_TO_JOIN_INTENDED_SESSION_4, + YOU_HAVE_BEEN_VOTED_OUT, // BAIL_BLACKLIST + FAILED_TO_JOIN_INTENDED_SESSION_6, + FAILED_TO_JOIN_DUE_TO_INCOMPATIBLE_ASSETS, // BAIL_COMPATASSE + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_CURRENTLY_FULL, // BAIL_SESSIONFUL + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_CURRENTLY_FULL_OF_PLAYERS_DO_YOU_WANT_TO_JOIN_QUEUE, // BAIL_TEAMFUL4 + PLEASE_MAKE_SURE_ALL_PLAYERS_HAVE_THE_LATEST_TITLE_UPDATE, // BAIL_WRNGVER + FAILED_TO_JOIN_INTENDED_SESSION_11, + INVITES_ARE_CURRENTLY_DISABLED_IN_THIS_SESSION, // BAIL_BLOCKING + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_USING_A_DIFFERENT_TARGETING_PREFERENCE, // BAIL_AIMPREF + YOU_ARE_CLASSED_AS_A_CHEAT_AND_CAN_ONLY_PLAY_WITH_OTHER_CHEATS_UNTIL_YOU_ARE_FORGIVEN, // BAIL_CHEAT + FAILED_TO_JOIN_INTENDED_SESSION_15, + INCOMPATILBLE_DOWNLOADABLE_CONTENT, // BAIL_DATA_HASH + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_HAS_AN_ACTIVE_CREW_LIMIT, // BAIL_CREWLIM / BAIL_CLOSEDCREW + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_FOR_PEOPLE_WHO_ARE_NOT_BADSPORT_OR_CHEATERS_YOU_ARE_BADSPORT, // BAIL_NORMCHT / BAIL_NORMBAD + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_FOR_BADSPORTS_ONLY, // BAIL_BADSPONLY + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_FOR_CHEATERS_ONLY, // BAIL_CHEATONLY + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_NO_LONGER_EXISTS, // BAIL_SESSGONE + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_PRIVATE, // BAIL_PRIVONLY + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_A_DIFFERENT_BUILD_TYPE, // BAIL_DIFFBUILD + FAILED_TO_JOIN_INTENDED_SESSION_24, + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_NOT_USING_THE_SAME_CONTENT, // BAIL_DIFFCONT + THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_FRIENDS_ONLY, // BAIL_FRIENDSONLY + UNABLE_TO_JOIN_THIS_SESSION_YOUR_ACCOUNT_HAS_A_BAD_REPUTATION, // HUD_REPUTATION + UNABLE_TO_CONNECT_TO_SESSION, // HUD_ESTAB + UNABLE_TO_JOIN_THE_SESSION_YOU_ARE_TRYING_TO_JOIN_IS_A_PREMIUM_RACE, // TRAN_JOINPRF + FAILED_TO_JOIN_INTENDED_GTA_ONLINE_SESSION +}; + +enum eNetworkEvent { + OBJECT_ID_FREED_EVENT, + OBJECT_ID_REQUEST_EVENT, + ARRAY_DATA_VERIFY_EVENT, + SCRIPT_ARRAY_DATA_VERIFY_EVENT, + REQUEST_CONTROL_EVENT, + GIVE_CONTROL_EVENT, + WEAPON_DAMAGE_EVENT, + REQUEST_PICKUP_EVENT, + REQUEST_MAP_PICKUP_EVENT, + GAME_CLOCK_EVENT, + GAME_WEATHER_EVENT, + RESPAWN_PLAYER_PED_EVENT, // + GIVE_WEAPON_EVENT, + REMOVE_WEAPON_EVENT, + REMOVE_ALL_WEAPONS_EVENT, + VEHICLE_COMPONENT_CONTROL_EVENT, + FIRE_EVENT, + EXPLOSION_EVENT, + START_PROJECTILE_EVENT, + UPDATE_PROJECTILE_TARGET_EVENT, + REMOVE_PROJECTILE_ENTITY_EVENT, + BREAK_PROJECTILE_TARGET_LOCK_EVENT, + ALTER_WANTED_LEVEL_EVENT, + CHANGE_RADIO_STATION_EVENT, + RAGDOLL_REQUEST_EVENT, + PLAYER_TAUNT_EVENT, + PLAYER_CARD_STAT_EVENT, + DOOR_BREAK_EVENT, + SCRIPTED_GAME_EVENT, + REMOTE_SCRIPT_INFO_EVENT, + REMOTE_SCRIPT_LEAVE_EVENT, + MARK_AS_NO_LONGER_NEEDED_EVENT, + CONVERT_TO_SCRIPT_ENTITY_EVENT, + SCRIPT_WORLD_STATE_EVENT, + CLEAR_AREA_EVENT, + CLEAR_RECTANGLE_AREA_EVENT, + NETWORK_REQUEST_SYNCED_SCENE_EVENT, + NETWORK_START_SYNCED_SCENE_EVENT, + NETWORK_STOP_SYNCED_SCENE_EVENT, + NETWORK_UPDATE_SYNCED_SCENE_EVENT, + INCIDENT_ENTITY_EVENT, + GIVE_PED_SCRIPTED_TASK_EVENT, + GIVE_PED_SEQUENCE_TASK_EVENT, + NETWORK_CLEAR_PED_TASKS_EVENT, + NETWORK_START_PED_ARREST_EVENT, + NETWORK_START_PED_UNCUFF_EVENT, + NETWORK_SOUND_CAR_HORN_EVENT, + NETWORK_ENTITY_AREA_STATUS_EVENT, + NETWORK_GARAGE_OCCUPIED_STATUS_EVENT, + PED_CONVERSATION_LINE_EVENT, + SCRIPT_ENTITY_STATE_CHANGE_EVENT, + NETWORK_PLAY_SOUND_EVENT, + NETWORK_STOP_SOUND_EVENT, + NETWORK_PLAY_AIRDEFENSE_FIRE_EVENT, + NETWORK_BANK_REQUEST_EVENT, + NETWORK_AUDIO_BARK_EVENT, // New 1.47 + REQUEST_DOOR_EVENT, + NETWORK_TRAIN_REPORT_EVENT, + NETWORK_TRAIN_REQUEST_EVENT, + NETWORK_INCREMENT_STAT_EVENT, + MODIFY_VEHICLE_LOCK_WORD_STATE_DATA, + MODIFY_PTFX_WORD_STATE_DATA_SCRIPTED_EVOLVE_EVENT, // New 1.46 + REQUEST_PHONE_EXPLOSION_EVENT, + REQUEST_DETACHMENT_EVENT, + KICK_VOTES_EVENT, + GIVE_PICKUP_REWARDS_EVENT, + NETWORK_CRC_HASH_CHECK_EVENT, + BLOW_UP_VEHICLE_EVENT, + NETWORK_SPECIAL_FIRE_EQUIPPED_WEAPON, + NETWORK_RESPONDED_TO_THREAT_EVENT, + NETWORK_SHOUT_TARGET_POSITION, + VOICE_DRIVEN_MOUTH_MOVEMENT_FINISHED_EVENT, + PICKUP_DESTROYED_EVENT, + UPDATE_PLAYER_SCARS_EVENT, + NETWORK_CHECK_EXE_SIZE_EVENT, + NETWORK_PTFX_EVENT, + NETWORK_PED_SEEN_DEAD_PED_EVENT, + REMOVE_STICKY_BOMB_EVENT, + NETWORK_CHECK_CODE_CRCS_EVENT, + INFORM_SILENCED_GUNSHOT_EVENT, + PED_PLAY_PAIN_EVENT, + CACHE_PLAYER_HEAD_BLEND_DATA_EVENT, + REMOVE_PED_FROM_PEDGROUP_EVENT, + REPORT_MYSELF_EVENT, + REPORT_CASH_SPAWN_EVENT, + ACTIVATE_VEHICLE_SPECIAL_ABILITY_EVENT, + BLOCK_WEAPON_SELECTION, + NETWORK_CHECK_CATALOG_CRC +}; + +enum eVehicleModTypes { + MOD_SPOILER, + MOD_FRONTBUMPER, + MOD_REARBUMPER, + MOD_SIDESKIRT, + MOD_EXHAUST, + MOD_CHASSIS, //Or roll cage + MOD_GRILLE, + MOD_HOOD, + MOD_FENDER, + MOD_RIGHTFENDER, + MOD_ROOF, + MOD_ENGINE, + MOD_BRAKES, + MOD_TRANSMISSION, + MOD_HORNS, + MOD_SUSPENSION, + MOD_ARMOR, + MOD_UNK17 = 17, + MOD_TURBO = 18, + MOD_UNK19 = 19, + MOD_TIRESMOKE = 20, + MOD_UNK21 = 21, + MOD_XENONLIGHTS = 22, + MOD_FRONTWHEELS = 23, + MOD_BACKWHEELS = 24, //Bikes only + + // Benny's + MOD_PLATEHOLDER = 25, + MOD_VANITY_PLATES = 26, + MOD_TRIM_DESIGN = 27, + MOD_ORNAMENTS = 28, + MOD_DASHBOARD = 29, + MOD_DIAL = 30, + MOD_DOOR_SPEAKER = 31, + MOD_SEATS = 32, + MOD_STEERINGWHEEL = 33, + MOD_SHIFTER_LEAVERS = 34, + MOD_PLAQUES = 35, + MOD_SPEAKERS = 36, // might be 36 + MOD_TRUNK = 37, + MOD_HYDRULICS = 38, + MOD_ENGINE_BLOCK = 39, + MOD_AIR_FILTER = 40, + MOD_STRUTS = 41, + MOD_ARCH_COVER = 42, + MOD_AERIALS = 43, + MOD_TRIM = 44, + MOD_TANK = 45, + MOD_WINDOWS = 46, + MOD_UNK47 = 47, + MOD_LIVERY = 48, + + MOD_SPECIAL_FRONT_RIMS = 62, + MOD_SPECIAL_REAR_RIMS = 63, + + // custom + MOD_NEON, + MOD_HORN_STANDARD, + MOD_HORN_MUSICAL, + MOD_HORN_LOOP, + MOD_WINDOWS_CUSTOM, + MOD_PLATES +}; + +enum eScaleformButtons { + ARROW_UP, + ARROW_DOWN, + ARROW_LEFT, + ARROW_RIGHT, + BUTTON_DPAD_UP, + BUTTON_DPAD_DOWN, + BUTTON_DPAD_RIGHT, + BUTTON_DPAD_LEFT, + BUTTON_DPAD_BLANK, + BUTTON_DPAD_ALL, + BUTTON_DPAD_UP_DOWN, + BUTTON_DPAD_LEFT_RIGHT, + BUTTON_LSTICK_UP, + BUTTON_LSTICK_DOWN, + BUTTON_LSTICK_LEFT, + BUTTON_LSTICK_RIGHT, + BUTTON_LSTICK, + BUTTON_LSTICK_ALL, + BUTTON_LSTICK_UP_DOWN, + BUTTON_LSTICK_LEFT_RIGHT, + BUTTON_LSTICK_ROTATE, + BUTTON_RSTICK_UP, + BUTTON_RSTICK_DOWN, + BUTTON_RSTICK_LEFT, + BUTTON_RSTICK_RIGHT, + BUTTON_RSTICK, + BUTTON_RSTICK_ALL, + BUTTON_RSTICK_UP_DOWN, + BUTTON_RSTICK_LEFT_RIGHT, + BUTTON_RSTICK_ROTATE, + BUTTON_A, + BUTTON_B, + BUTTON_X, + BUTTON_Y, + BUTTON_LB, + BUTTON_LT, + BUTTON_RB, + BUTTON_RT, + BUTTON_START, + BUTTON_BACK, + RED_BOX, + RED_BOX_1, + RED_BOX_2, + RED_BOX_3, + LOADING_HALF_CIRCLE_LEFT, + ARROW_UP_DOWN, + ARROW_LEFT_RIGHT, + ARROW_ALL, + LOADING_HALF_CIRCLE_LEFT_2, + SAVE_HALF_CIRCLE_LEFT, + LOADING_HALF_CIRCLE_RIGHT, +}; + +enum ExplosionTypes { + EXPLOSION_GRENADE, + EXPLOSION_GRENADELAUNCHER, + EXPLOSION_STICKYBOMB, + EXPLOSION_MOLOTOV, + EXPLOSION_ROCKET, + EXPLOSION_TANKSHELL, + EXPLOSION_HI_OCTANE, + EXPLOSION_CAR, + EXPLOSION_PLANE, + EXPLOSION_PETROL_PUMP, + EXPLOSION_BIKE, + EXPLOSION_DIR_STEAM, + EXPLOSION_DIR_FLAME, + EXPLOSION_DIR_WATER_HYDRANT, + EXPLOSION_DIR_GAS_CANISTER, + EXPLOSION_BOAT, + EXPLOSION_SHIP_DESTROY, + EXPLOSION_TRUCK, + EXPLOSION_BULLET, + EXPLOSION_SMOKEGRENADELAUNCHER, + EXPLOSION_SMOKEGRENADE, + EXPLOSION_BZGAS, + EXPLOSION_FLARE, + EXPLOSION_GAS_CANISTER, + EXPLOSION_EXTINGUISHER, + EXPLOSION_PROGRAMMABLEAR, + EXPLOSION_TRAIN, + EXPLOSION_BARREL, + EXPLOSION_PROPANE, + EXPLOSION_BLIMP, + EXPLOSION_DIR_FLAME_EXPLODE, + EXPLOSION_TANKER, + EXPLOSION_PLANE_ROCKET, + EXPLOSION_VEHICLE_BULLET, + EXPLOSION_GAS_TANK, + EXPLOSION_BIRD_CRAP +}; + +enum game_state { + GameStatePlaying, + GameStateIntro, + GameStateLicense = 3, + GameStateMainMenu = 5, + GameStateLoadingSP_MP = 6 +}; + +enum Font { + FontChaletLondon = 0, + FontHouseScript = 1, + FontMonoSpace = 2, + FontWindlings = 3, + FontChaletComprimeCologne = 4, + FontChaletComprimeCologne2 = 5, + FontChaletComprimeCologne3 = 6, + FontPricedown = 7 +}; + +enum eControlsGay { + INPUT_NEXT_CAMERA = 0, + INPUT_LOOK_LR = 1, + INPUT_LOOK_UD = 2, + INPUT_LOOK_UP_ONLY = 3, + INPUT_LOOK_DOWN_ONLY = 4, + INPUT_LOOK_LEFT_ONLY = 5, + INPUT_LOOK_RIGHT_ONLY = 6, + INPUT_CINEMATIC_SLOWMO = 7, + INPUT_SCRIPTED_FLY_UD = 8, + INPUT_SCRIPTED_FLY_LR = 9, + INPUT_SCRIPTED_FLY_ZUP = 10, + INPUT_SCRIPTED_FLY_ZDOWN = 11, + INPUT_WEAPON_WHEEL_UD = 12, + INPUT_WEAPON_WHEEL_LR = 13, + INPUT_WEAPON_WHEEL_NEXT = 14, + INPUT_WEAPON_WHEEL_PREV = 15, + INPUT_SELECT_NEXT_WEAPON = 16, + INPUT_SELECT_PREV_WEAPON = 17, + INPUT_SKIP_CUTSCENE = 18, + INPUT_CHARACTER_WHEEL = 19, + INPUT_MULTIPLAYER_INFO = 20, + INPUT_SPRINT = 21, + INPUT_JUMP = 22, + INPUT_ENTER = 23, + INPUT_ATTACK = 24, + INPUT_AIM = 25, + INPUT_LOOK_BEHIND = 26, + INPUT_PHONE = 27, + INPUT_SPECIAL_ABILITY = 28, + INPUT_SPECIAL_ABILITY_SECONDARY = 29, + INPUT_MOVE_LR = 30, + INPUT_MOVE_UD = 31, + INPUT_MOVE_UP_ONLY = 32, + INPUT_MOVE_DOWN_ONLY = 33, + INPUT_MOVE_LEFT_ONLY = 34, + INPUT_MOVE_RIGHT_ONLY = 35, + INPUT_DUCK = 36, + INPUT_SELECT_WEAPON = 37, + INPUT_PICKUP = 38, + INPUT_SNIPER_ZOOM = 39, + INPUT_SNIPER_ZOOM_IN_ONLY = 40, + INPUT_SNIPER_ZOOM_OUT_ONLY = 41, + INPUT_SNIPER_ZOOM_IN_SECONDARY = 42, + INPUT_SNIPER_ZOOM_OUT_SECONDARY = 43, + INPUT_COVER = 44, + INPUT_RELOAD = 45, + INPUT_TALK = 46, + INPUT_DETONATE = 47, + INPUT_HUD_SPECIAL = 48, + INPUT_ARREST = 49, + INPUT_ACCURATE_AIM = 50, + INPUT_CONTEXT = 51, + INPUT_CONTEXT_SECONDARY = 52, + INPUT_WEAPON_SPECIAL = 53, + INPUT_WEAPON_SPECIAL_TWO = 54, + INPUT_DIVE = 55, + INPUT_DROP_WEAPON = 56, + INPUT_DROP_AMMO = 57, + INPUT_THROW_GRENADE = 58, + INPUT_VEH_MOVE_LR = 59, + INPUT_VEH_MOVE_UD = 60, + INPUT_VEH_MOVE_UP_ONLY = 61, + INPUT_VEH_MOVE_DOWN_ONLY = 62, + INPUT_VEH_MOVE_LEFT_ONLY = 63, + INPUT_VEH_MOVE_RIGHT_ONLY = 64, + INPUT_VEH_SPECIAL = 65, + INPUT_VEH_GUN_LR = 66, + INPUT_VEH_GUN_UD = 67, + INPUT_VEH_AIM = 68, + INPUT_VEH_ATTACK = 69, + INPUT_VEH_ATTACK2 = 70, + INPUT_VEH_ACCELERATE = 71, + INPUT_VEH_BRAKE = 72, + INPUT_VEH_DUCK = 73, + INPUT_VEH_HEADLIGHT = 74, + INPUT_VEH_EXIT = 75, + INPUT_VEH_HANDBRAKE = 76, + INPUT_VEH_HOTWIRE_LEFT = 77, + INPUT_VEH_HOTWIRE_RIGHT = 78, + INPUT_VEH_LOOK_BEHIND = 79, + INPUT_VEH_CIN_CAM = 80, + INPUT_VEH_NEXT_RADIO = 81, + INPUT_VEH_PREV_RADIO = 82, + INPUT_VEH_NEXT_RADIO_TRACK = 83, + INPUT_VEH_PREV_RADIO_TRACK = 84, + INPUT_VEH_RADIO_WHEEL = 85, + INPUT_VEH_HORN = 86, + INPUT_VEH_FLY_THROTTLE_UP = 87, + INPUT_VEH_FLY_THROTTLE_DOWN = 88, + INPUT_VEH_FLY_YAW_LEFT = 89, + INPUT_VEH_FLY_YAW_RIGHT = 90, + INPUT_VEH_PASSENGER_AIM = 91, + INPUT_VEH_PASSENGER_ATTACK = 92, + INPUT_VEH_SPECIAL_ABILITY_FRANKLIN = 93, + INPUT_VEH_STUNT_UD = 94, + INPUT_VEH_CINEMATIC_UD = 95, + INPUT_VEH_CINEMATIC_UP_ONLY = 96, + INPUT_VEH_CINEMATIC_DOWN_ONLY = 97, + INPUT_VEH_CINEMATIC_LR = 98, + INPUT_VEH_SELECT_NEXT_WEAPON = 99, + INPUT_VEH_SELECT_PREV_WEAPON = 100, + INPUT_VEH_ROOF = 101, + INPUT_VEH_JUMP = 102, + INPUT_VEH_GRAPPLING_HOOK = 103, + INPUT_VEH_SHUFFLE = 104, + INPUT_VEH_DROP_PROJECTILE = 105, + INPUT_VEH_MOUSE_CONTROL_OVERRIDE = 106, + INPUT_VEH_FLY_ROLL_LR = 107, + INPUT_VEH_FLY_ROLL_LEFT_ONLY = 108, + INPUT_VEH_FLY_ROLL_RIGHT_ONLY = 109, + INPUT_VEH_FLY_PITCH_UD = 110, + INPUT_VEH_FLY_PITCH_UP_ONLY = 111, + INPUT_VEH_FLY_PITCH_DOWN_ONLY = 112, + INPUT_VEH_FLY_UNDERCARRIAGE = 113, + INPUT_VEH_FLY_ATTACK = 114, + INPUT_VEH_FLY_SELECT_NEXT_WEAPON = 115, + INPUT_VEH_FLY_SELECT_PREV_WEAPON = 116, + INPUT_VEH_FLY_SELECT_TARGET_LEFT = 117, + INPUT_VEH_FLY_SELECT_TARGET_RIGHT = 118, + INPUT_VEH_FLY_VERTICAL_FLIGHT_MODE = 119, + INPUT_VEH_FLY_DUCK = 120, + INPUT_VEH_FLY_ATTACK_CAMERA = 121, + INPUT_VEH_FLY_MOUSE_CONTROL_OVERRIDE = 122, + INPUT_VEH_SUB_TURN_LR = 123, + INPUT_VEH_SUB_TURN_LEFT_ONLY = 124, + INPUT_VEH_SUB_TURN_RIGHT_ONLY = 125, + INPUT_VEH_SUB_PITCH_UD = 126, + INPUT_VEH_SUB_PITCH_UP_ONLY = 127, + INPUT_VEH_SUB_PITCH_DOWN_ONLY = 128, + INPUT_VEH_SUB_THROTTLE_UP = 129, + INPUT_VEH_SUB_THROTTLE_DOWN = 130, + INPUT_VEH_SUB_ASCEND = 131, + INPUT_VEH_SUB_DESCEND = 132, + INPUT_VEH_SUB_TURN_HARD_LEFT = 133, + INPUT_VEH_SUB_TURN_HARD_RIGHT = 134, + INPUT_VEH_SUB_MOUSE_CONTROL_OVERRIDE = 135, + INPUT_VEH_PUSHBIKE_PEDAL = 136, + INPUT_VEH_PUSHBIKE_SPRINT = 137, + INPUT_VEH_PUSHBIKE_FRONT_BRAKE = 138, + INPUT_VEH_PUSHBIKE_REAR_BRAKE = 139, + INPUT_MELEE_ATTACK_LIGHT = 140, + INPUT_MELEE_ATTACK_HEAVY = 141, + INPUT_MELEE_ATTACK_ALTERNATE = 142, + INPUT_MELEE_BLOCK = 143, + INPUT_PARACHUTE_DEPLOY = 144, + INPUT_PARACHUTE_DETACH = 145, + INPUT_PARACHUTE_TURN_LR = 146, + INPUT_PARACHUTE_TURN_LEFT_ONLY = 147, + INPUT_PARACHUTE_TURN_RIGHT_ONLY = 148, + INPUT_PARACHUTE_PITCH_UD = 149, + INPUT_PARACHUTE_PITCH_UP_ONLY = 150, + INPUT_PARACHUTE_PITCH_DOWN_ONLY = 151, + INPUT_PARACHUTE_BRAKE_LEFT = 152, + INPUT_PARACHUTE_BRAKE_RIGHT = 153, + INPUT_PARACHUTE_SMOKE = 154, + INPUT_PARACHUTE_PRECISION_LANDING = 155, + INPUT_MAP = 156, + INPUT_SELECT_WEAPON_UNARMED = 157, + INPUT_SELECT_WEAPON_MELEE = 158, + INPUT_SELECT_WEAPON_HANDGUN = 159, + INPUT_SELECT_WEAPON_SHOTGUN = 160, + INPUT_SELECT_WEAPON_SMG = 161, + INPUT_SELECT_WEAPON_AUTO_RIFLE = 162, + INPUT_SELECT_WEAPON_SNIPER = 163, + INPUT_SELECT_WEAPON_HEAVY = 164, + INPUT_SELECT_WEAPON_SPECIAL = 165, + INPUT_SELECT_CHARACTER_MICHAEL = 166, + INPUT_SELECT_CHARACTER_FRANKLIN = 167, + INPUT_SELECT_CHARACTER_TREVOR = 168, + INPUT_SELECT_CHARACTER_MULTIPLAYER = 169, + INPUT_SAVE_REPLAY_CLIP = 170, + INPUT_SPECIAL_ABILITY_PC = 171, + INPUT_CELLPHONE_UP = 172, + INPUT_CELLPHONE_DOWN = 173, + INPUT_CELLPHONE_LEFT = 174, + INPUT_CELLPHONE_RIGHT = 175, + INPUT_CELLPHONE_SELECT = 176, + INPUT_CELLPHONE_CANCEL = 177, + INPUT_CELLPHONE_OPTION = 178, + INPUT_CELLPHONE_EXTRA_OPTION = 179, + INPUT_CELLPHONE_SCROLL_FORWARD = 180, + INPUT_CELLPHONE_SCROLL_BACKWARD = 181, + INPUT_CELLPHONE_CAMERA_FOCUS_LOCK = 182, + INPUT_CELLPHONE_CAMERA_GRID = 183, + INPUT_CELLPHONE_CAMERA_SELFIE = 184, + INPUT_CELLPHONE_CAMERA_DOF = 185, + INPUT_CELLPHONE_CAMERA_EXPRESSION = 186, + INPUT_FRONTEND_DOWN = 187, + INPUT_FRONTEND_UP = 188, + INPUT_FRONTEND_LEFT = 189, + INPUT_FRONTEND_RIGHT = 190, + INPUT_FRONTEND_RDOWN = 191, + INPUT_FRONTEND_RUP = 192, + INPUT_FRONTEND_RLEFT = 193, + INPUT_FRONTEND_RRIGHT = 194, + INPUT_FRONTEND_AXIS_X = 195, + INPUT_FRONTEND_AXIS_Y = 196, + INPUT_FRONTEND_RIGHT_AXIS_X = 197, + INPUT_FRONTEND_RIGHT_AXIS_Y = 198, + INPUT_FRONTEND_PAUSE = 199, + INPUT_FRONTEND_PAUSE_ALTERNATE = 200, + INPUT_FRONTEND_ACCEPT = 201, + INPUT_FRONTEND_CANCEL = 202, + INPUT_FRONTEND_X = 203, + INPUT_FRONTEND_Y = 204, + INPUT_FRONTEND_LB = 205, + INPUT_FRONTEND_RB = 206, + INPUT_FRONTEND_LT = 207, + INPUT_FRONTEND_RT = 208, + INPUT_FRONTEND_LS = 209, + INPUT_FRONTEND_RS = 210, + INPUT_FRONTEND_LEADERBOARD = 211, + INPUT_FRONTEND_SOCIAL_CLUB = 212, + INPUT_FRONTEND_SOCIAL_CLUB_SECONDARY = 213, + INPUT_FRONTEND_DELETE = 214, + INPUT_FRONTEND_ENDSCREEN_ACCEPT = 215, + INPUT_FRONTEND_ENDSCREEN_EXPAND = 216, + INPUT_FRONTEND_SELECT = 217, + INPUT_SCRIPT_LEFT_AXIS_X = 218, + INPUT_SCRIPT_LEFT_AXIS_Y = 219, + INPUT_SCRIPT_RIGHT_AXIS_X = 220, + INPUT_SCRIPT_RIGHT_AXIS_Y = 221, + INPUT_SCRIPT_RUP = 222, + INPUT_SCRIPT_RDOWN = 223, + INPUT_SCRIPT_RLEFT = 224, + INPUT_SCRIPT_RRIGHT = 225, + INPUT_SCRIPT_LB = 226, + INPUT_SCRIPT_RB = 227, + INPUT_SCRIPT_LT = 228, + INPUT_SCRIPT_RT = 229, + INPUT_SCRIPT_LS = 230, + INPUT_SCRIPT_RS = 231, + INPUT_SCRIPT_PAD_UP = 232, + INPUT_SCRIPT_PAD_DOWN = 233, + INPUT_SCRIPT_PAD_LEFT = 234, + INPUT_SCRIPT_PAD_RIGHT = 235, + INPUT_SCRIPT_SELECT = 236, + INPUT_CURSOR_ACCEPT = 237, + INPUT_CURSOR_CANCEL = 238, + INPUT_CURSOR_X = 239, + INPUT_CURSOR_Y = 240, + INPUT_CURSOR_SCROLL_UP = 241, + INPUT_CURSOR_SCROLL_DOWN = 242, + INPUT_ENTER_CHEAT_CODE = 243, + INPUT_INTERACTION_MENU = 244, + INPUT_MP_TEXT_CHAT_ALL = 245, + INPUT_MP_TEXT_CHAT_TEAM = 246, + INPUT_MP_TEXT_CHAT_FRIENDS = 247, + INPUT_MP_TEXT_CHAT_CREW = 248, + INPUT_PUSH_TO_TALK = 249, + INPUT_CREATOR_LS = 250, + INPUT_CREATOR_RS = 251, + INPUT_CREATOR_LT = 252, + INPUT_CREATOR_RT = 253, + INPUT_CREATOR_MENU_TOGGLE = 254, + INPUT_CREATOR_ACCEPT = 255, + INPUT_CREATOR_DELETE = 256, + INPUT_ATTACK2 = 257, + INPUT_RAPPEL_JUMP = 258, + INPUT_RAPPEL_LONG_JUMP = 259, + INPUT_RAPPEL_SMASH_WINDOW = 260, + INPUT_PREV_WEAPON = 261, + INPUT_NEXT_WEAPON = 262, + INPUT_MELEE_ATTACK1 = 263, + INPUT_MELEE_ATTACK2 = 264, + INPUT_WHISTLE = 265, + INPUT_MOVE_LEFT = 266, + INPUT_MOVE_RIGHT = 267, + INPUT_MOVE_UP = 268, + INPUT_MOVE_DOWN = 269, + INPUT_LOOK_LEFT = 270, + INPUT_LOOK_RIGHT = 271, + INPUT_LOOK_UP = 272, + INPUT_LOOK_DOWN = 273, + INPUT_SNIPER_ZOOM_IN = 274, + INPUT_SNIPER_ZOOM_OUT = 275, + INPUT_SNIPER_ZOOM_IN_ALTERNATE = 276, + INPUT_SNIPER_ZOOM_OUT_ALTERNATE = 277, + INPUT_VEH_MOVE_LEFT = 278, + INPUT_VEH_MOVE_RIGHT = 279, + INPUT_VEH_MOVE_UP = 280, + INPUT_VEH_MOVE_DOWN = 281, + INPUT_VEH_GUN_LEFT = 282, + INPUT_VEH_GUN_RIGHT = 283, + INPUT_VEH_GUN_UP = 284, + INPUT_VEH_GUN_DOWN = 285, + INPUT_VEH_LOOK_LEFT = 286, + INPUT_VEH_LOOK_RIGHT = 287, + INPUT_REPLAY_START_STOP_RECORDING = 288, + INPUT_REPLAY_START_STOP_RECORDING_SECONDARY = 289, + INPUT_SCALED_LOOK_LR = 290, + INPUT_SCALED_LOOK_UD = 291, + INPUT_SCALED_LOOK_UP_ONLY = 292, + INPUT_SCALED_LOOK_DOWN_ONLY = 293, + INPUT_SCALED_LOOK_LEFT_ONLY = 294, + INPUT_SCALED_LOOK_RIGHT_ONLY = 295, + INPUT_REPLAY_MARKER_DELETE = 296, + INPUT_REPLAY_CLIP_DELETE = 297, + INPUT_REPLAY_PAUSE = 298, + INPUT_REPLAY_REWIND = 299, + INPUT_REPLAY_FFWD = 300, + INPUT_REPLAY_NEWMARKER = 301, + INPUT_REPLAY_RECORD = 302, + INPUT_REPLAY_SCREENSHOT = 303, + INPUT_REPLAY_HIDEHUD = 304, + INPUT_REPLAY_STARTPOINT = 305, + INPUT_REPLAY_ENDPOINT = 306, + INPUT_REPLAY_ADVANCE = 307, + INPUT_REPLAY_BACK = 308, + INPUT_REPLAY_TOOLS = 309, + INPUT_REPLAY_RESTART = 310, + INPUT_REPLAY_SHOWHOTKEY = 311, + INPUT_REPLAY_CYCLEMARKERLEFT = 312, + INPUT_REPLAY_CYCLEMARKERRIGHT = 313, + INPUT_REPLAY_FOVINCREASE = 314, + INPUT_REPLAY_FOVDECREASE = 315, + INPUT_REPLAY_CAMERAUP = 316, + INPUT_REPLAY_CAMERADOWN = 317, + INPUT_REPLAY_SAVE = 318, + INPUT_REPLAY_TOGGLETIME = 319, + INPUT_REPLAY_TOGGLETIPS = 320, + INPUT_REPLAY_PREVIEW = 321, + INPUT_REPLAY_TOGGLE_TIMELINE = 322, + INPUT_REPLAY_TIMELINE_PICKUP_CLIP = 323, + INPUT_REPLAY_TIMELINE_DUPLICATE_CLIP = 324, + INPUT_REPLAY_TIMELINE_PLACE_CLIP = 325, + INPUT_REPLAY_CTRL = 326, + INPUT_REPLAY_TIMELINE_SAVE = 327, + INPUT_REPLAY_PREVIEW_AUDIO = 328, + INPUT_VEH_DRIVE_LOOK = 329, + INPUT_VEH_DRIVE_LOOK2 = 330, + INPUT_VEH_FLY_ATTACK2 = 331, + INPUT_RADIO_WHEEL_UD = 332, + INPUT_RADIO_WHEEL_LR = 333, + INPUT_VEH_SLOWMO_UD = 334, + INPUT_VEH_SLOWMO_UP_ONLY = 335, + INPUT_VEH_SLOWMO_DOWN_ONLY = 336, + INPUT_MAP_POI = 337 +}; + +enum eControls { + ControlNextCamera = 0, + ControlLookLeftRight = 1, + ControlLookUpDown = 2, + ControlLookUpOnly = 3, + ControlLookDownOnly = 4, + ControlLookLeftOnly = 5, + ControlLookRightOnly = 6, + ControlCinematicSlowMo = 7, + ControlFlyUpDown = 8, + ControlFlyLeftRight = 9, + ControlScriptedFlyZUp = 10, + ControlScriptedFlyZDown = 11, + ControlWeaponWheelUpDown = 12, + ControlWeaponWheelLeftRight = 13, + ControlWeaponWheelNext = 14, + ControlWeaponWheelPrev = 15, + ControlSelectNextWeapon = 16, + ControlSelectPrevWeapon = 17, + ControlSkipCutscene = 18, + ControlCharacterWheel = 19, + ControlMultiplayerInfo = 20, + ControlSprint = 21, + ControlJump = 22, + ControlEnter = 23, + ControlAttack = 24, + ControlAim = 25, + ControlLookBehind = 26, + ControlPhone = 27, + ControlSpecialAbility = 28, + ControlSpecialAbilitySecondary = 29, + ControlMoveLeftRight = 30, + ControlMoveUpDown = 31, + ControlMoveUpOnly = 32, + ControlMoveDownOnly = 33, + ControlMoveLeftOnly = 34, + ControlMoveRightOnly = 35, + ControlDuck = 36, + ControlSelectWeapon = 37, + ControlPickup = 38, + ControlSniperZoom = 39, + ControlSniperZoomInOnly = 40, + ControlSniperZoomOutOnly = 41, + ControlSniperZoomInSecondary = 42, + ControlSniperZoomOutSecondary = 43, + ControlCover = 44, + ControlReload = 45, + ControlTalk = 46, + ControlDetonate = 47, + ControlHUDSpecial = 48, + ControlArrest = 49, + ControlAccurateAim = 50, + ControlContext = 51, + ControlContextSecondary = 52, + ControlWeaponSpecial = 53, + ControlWeaponSpecial2 = 54, + ControlDive = 55, + ControlDropWeapon = 56, + ControlDropAmmo = 57, + ControlThrowGrenade = 58, + ControlVehicleMoveLeftRight = 59, + ControlVehicleMoveUpDown = 60, + ControlVehicleMoveUpOnly = 61, + ControlVehicleMoveDownOnly = 62, + ControlVehicleMoveLeftOnly = 63, + ControlVehicleMoveRightOnly = 64, + ControlVehicleSpecial = 65, + ControlVehicleGunLeftRight = 66, + ControlVehicleGunUpDown = 67, + ControlVehicleAim = 68, + ControlVehicleAttack = 69, + ControlVehicleAttack2 = 70, + ControlVehicleAccelerate = 71, + ControlVehicleBrake = 72, + ControlVehicleDuck = 73, + ControlVehicleHeadlight = 74, + ControlVehicleExit = 75, + ControlVehicleHandbrake = 76, + ControlVehicleHotwireLeft = 77, + ControlVehicleHotwireRight = 78, + ControlVehicleLookBehind = 79, + ControlVehicleCinCam = 80, + ControlVehicleNextRadio = 81, + ControlVehiclePrevRadio = 82, + ControlVehicleNextRadioTrack = 83, + ControlVehiclePrevRadioTrack = 84, + ControlVehicleRadioWheel = 85, + ControlVehicleHorn = 86, + ControlVehicleFlyThrottleUp = 87, + ControlVehicleFlyThrottleDown = 88, + ControlVehicleFlyYawLeft = 89, + ControlVehicleFlyYawRight = 90, + ControlVehiclePassengerAim = 91, + ControlVehiclePassengerAttack = 92, + ControlVehicleSpecialAbilityFranklin = 93, + ControlVehicleStuntUpDown = 94, + ControlVehicleCinematicUpDown = 95, + ControlVehicleCinematicUpOnly = 96, + ControlVehicleCinematicDownOnly = 97, + ControlVehicleCinematicLeftRight = 98, + ControlVehicleSelectNextWeapon = 99, + ControlVehicleSelectPrevWeapon = 100, + ControlVehicleRoof = 101, + ControlVehicleJump = 102, + ControlVehicleGrapplingHook = 103, + ControlVehicleShuffle = 104, + ControlVehicleDropProjectile = 105, + ControlVehicleMouseControlOverride = 106, + ControlVehicleFlyRollLeftRight = 107, + ControlVehicleFlyRollLeftOnly = 108, + ControlVehicleFlyRollRightOnly = 109, + ControlVehicleFlyPitchUpDown = 110, + ControlVehicleFlyPitchUpOnly = 111, + ControlVehicleFlyPitchDownOnly = 112, + ControlVehicleFlyUnderCarriage = 113, + ControlVehicleFlyAttack = 114, + ControlVehicleFlySelectNextWeapon = 115, + ControlVehicleFlySelectPrevWeapon = 116, + ControlVehicleFlySelectTargetLeft = 117, + ControlVehicleFlySelectTargetRight = 118, + ControlVehicleFlyVerticalFlightMode = 119, + ControlVehicleFlyDuck = 120, + ControlVehicleFlyAttackCamera = 121, + ControlVehicleFlyMouseControlOverride = 122, + ControlVehicleSubTurnLeftRight = 123, + ControlVehicleSubTurnLeftOnly = 124, + ControlVehicleSubTurnRightOnly = 125, + ControlVehicleSubPitchUpDown = 126, + ControlVehicleSubPitchUpOnly = 127, + ControlVehicleSubPitchDownOnly = 128, + ControlVehicleSubThrottleUp = 129, + ControlVehicleSubThrottleDown = 130, + ControlVehicleSubAscend = 131, + ControlVehicleSubDescend = 132, + ControlVehicleSubTurnHardLeft = 133, + ControlVehicleSubTurnHardRight = 134, + ControlVehicleSubMouseControlOverride = 135, + ControlVehiclePushbikePedal = 136, + ControlVehiclePushbikeSprint = 137, + ControlVehiclePushbikeFrontBrake = 138, + ControlVehiclePushbikeRearBrake = 139, + ControlMeleeAttackLight = 140, + ControlMeleeAttackHeavy = 141, + ControlMeleeAttackAlternate = 142, + ControlMeleeBlock = 143, + ControlParachuteDeploy = 144, + ControlParachuteDetach = 145, + ControlParachuteTurnLeftRight = 146, + ControlParachuteTurnLeftOnly = 147, + ControlParachuteTurnRightOnly = 148, + ControlParachutePitchUpDown = 149, + ControlParachutePitchUpOnly = 150, + ControlParachutePitchDownOnly = 151, + ControlParachuteBrakeLeft = 152, + ControlParachuteBrakeRight = 153, + ControlParachuteSmoke = 154, + ControlParachutePrecisionLanding = 155, + ControlMap = 156, + ControlSelectWeaponUnarmed = 157, + ControlSelectWeaponMelee = 158, + ControlSelectWeaponHandgun = 159, + ControlSelectWeaponShotgun = 160, + ControlSelectWeaponSmg = 161, + ControlSelectWeaponAutoRifle = 162, + ControlSelectWeaponSniper = 163, + ControlSelectWeaponHeavy = 164, + ControlSelectWeaponSpecial = 165, + ControlSelectCharacterMichael = 166, + ControlSelectCharacterFranklin = 167, + ControlSelectCharacterTrevor = 168, + ControlSelectCharacterMultiplayer = 169, + ControlSaveReplayClip = 170, + ControlSpecialAbilityPC = 171, + ControlPhoneUp = 172, + ControlPhoneDown = 173, + ControlPhoneLeft = 174, + ControlPhoneRight = 175, + ControlPhoneSelect = 176, + ControlPhoneCancel = 177, + ControlPhoneOption = 178, + ControlPhoneExtraOption = 179, + ControlPhoneScrollForward = 180, + ControlPhoneScrollBackward = 181, + ControlPhoneCameraFocusLock = 182, + ControlPhoneCameraGrid = 183, + ControlPhoneCameraSelfie = 184, + ControlPhoneCameraDOF = 185, + ControlPhoneCameraExpression = 186, + ControlFrontendDown = 187, + ControlFrontendUp = 188, + ControlFrontendLeft = 189, + ControlFrontendRight = 190, + ControlFrontendRdown = 191, + ControlFrontendRup = 192, + ControlFrontendRleft = 193, + ControlFrontendRright = 194, + ControlFrontendAxisX = 195, + ControlFrontendAxisY = 196, + ControlFrontendRightAxisX = 197, + ControlFrontendRightAxisY = 198, + ControlFrontendPause = 199, + ControlFrontendPauseAlternate = 200, + ControlFrontendAccept = 201, + ControlFrontendCancel = 202, + ControlFrontendX = 203, + ControlFrontendY = 204, + ControlFrontendLb = 205, + ControlFrontendRb = 206, + ControlFrontendLt = 207, + ControlFrontendRt = 208, + ControlFrontendLs = 209, + ControlFrontendRs = 210, + ControlFrontendLeaderboard = 211, + ControlFrontendSocialClub = 212, + ControlFrontendSocialClubSecondary = 213, + ControlFrontendDelete = 214, + ControlFrontendEndscreenAccept = 215, + ControlFrontendEndscreenExpand = 216, + ControlFrontendSelect = 217, + ControlScriptLeftAxisX = 218, + ControlScriptLeftAxisY = 219, + ControlScriptRightAxisX = 220, + ControlScriptRightAxisY = 221, + ControlScriptRUp = 222, + ControlScriptRDown = 223, + ControlScriptRLeft = 224, + ControlScriptRRight = 225, + ControlScriptLB = 226, + ControlScriptRB = 227, + ControlScriptLT = 228, + ControlScriptRT = 229, + ControlScriptLS = 230, + ControlScriptRS = 231, + ControlScriptPadUp = 232, + ControlScriptPadDown = 233, + ControlScriptPadLeft = 234, + ControlScriptPadRight = 235, + ControlScriptSelect = 236, + ControlCursorAccept = 237, + ControlCursorCancel = 238, + ControlCursorX = 239, + ControlCursorY = 240, + ControlCursorScrollUp = 241, + ControlCursorScrollDown = 242, + ControlEnterCheatCode = 243, + ControlInteractionMenu = 244, + ControlMpTextChatAll = 245, + ControlMpTextChatTeam = 246, + ControlMpTextChatFriends = 247, + ControlMpTextChatCrew = 248, + ControlPushToTalk = 249, + ControlCreatorLS = 250, + ControlCreatorRS = 251, + ControlCreatorLT = 252, + ControlCreatorRT = 253, + ControlCreatorMenuToggle = 254, + ControlCreatorAccept = 255, + ControlCreatorDelete = 256, + ControlAttack2 = 257, + ControlRappelJump = 258, + ControlRappelLongJump = 259, + ControlRappelSmashWindow = 260, + ControlPrevWeapon = 261, + ControlNextWeapon = 262, + ControlMeleeAttack1 = 263, + ControlMeleeAttack2 = 264, + ControlWhistle = 265, + ControlMoveLeft = 266, + ControlMoveRight = 267, + ControlMoveUp = 268, + ControlMoveDown = 269, + ControlLookLeft = 270, + ControlLookRight = 271, + ControlLookUp = 272, + ControlLookDown = 273, + ControlSniperZoomIn = 274, + ControlSniperZoomOut = 275, + ControlSniperZoomInAlternate = 276, + ControlSniperZoomOutAlternate = 277, + ControlVehicleMoveLeft = 278, + ControlVehicleMoveRight = 279, + ControlVehicleMoveUp = 280, + ControlVehicleMoveDown = 281, + ControlVehicleGunLeft = 282, + ControlVehicleGunRight = 283, + ControlVehicleGunUp = 284, + ControlVehicleGunDown = 285, + ControlVehicleLookLeft = 286, + ControlVehicleLookRight = 287, + ControlReplayStartStopRecording = 288, + ControlReplayStartStopRecordingSecondary = 289, + ControlScaledLookLeftRight = 290, + ControlScaledLookUpDown = 291, + ControlScaledLookUpOnly = 292, + ControlScaledLookDownOnly = 293, + ControlScaledLookLeftOnly = 294, + ControlScaledLookRightOnly = 295, + ControlReplayMarkerDelete = 296, + ControlReplayClipDelete = 297, + ControlReplayPause = 298, + ControlReplayRewind = 299, + ControlReplayFfwd = 300, + ControlReplayNewmarker = 301, + ControlReplayRecord = 302, + ControlReplayScreenshot = 303, + ControlReplayHidehud = 304, + ControlReplayStartpoint = 305, + ControlReplayEndpoint = 306, + ControlReplayAdvance = 307, + ControlReplayBack = 308, + ControlReplayTools = 309, + ControlReplayRestart = 310, + ControlReplayShowhotkey = 311, + ControlReplayCycleMarkerLeft = 312, + ControlReplayCycleMarkerRight = 313, + ControlReplayFOVIncrease = 314, + ControlReplayFOVDecrease = 315, + ControlReplayCameraUp = 316, + ControlReplayCameraDown = 317, + ControlReplaySave = 318, + ControlReplayToggletime = 319, + ControlReplayToggletips = 320, + ControlReplayPreview = 321, + ControlReplayToggleTimeline = 322, + ControlReplayTimelinePickupClip = 323, + ControlReplayTimelineDuplicateClip = 324, + ControlReplayTimelinePlaceClip = 325, + ControlReplayCtrl = 326, + ControlReplayTimelineSave = 327, + ControlReplayPreviewAudio = 328, + ControlVehicleDriveLook = 329, + ControlVehicleDriveLook2 = 330, + ControlVehicleFlyAttack2 = 331, + ControlRadioWheelUpDown = 332, + ControlRadioWheelLeftRight = 333, + ControlVehicleSlowMoUpDown = 334, + ControlVehicleSlowMoUpOnly = 335, + ControlVehicleSlowMoDownOnly = 336, + ControlMapPointOfInterest = 337, +}; + +enum eAnimationFlags { + AnimationNormal = 0, + AnimationRepeat = 1, + AnimationStopLastFrame = 2, + AnimationUpperBody = 16, + AnimationEnablePlayerControl = 32, + AnimationCancelable = 120, + AnimationCreature = 256 +}; + +enum eDispatchType { + DT_PoliceAutomobile = 1, + DT_PoliceHelicopter = 2, + DT_FireDepartment = 3, + DT_SwatAutomobile = 4, + DT_AmbulanceDepartment = 5, + DT_PoliceRiders = 6, + DT_PoliceVehicleRequest = 7, + DT_PoliceRoadBlock = 8, + DT_PoliceAutomobileWaitPulledOver = 9, + DT_PoliceAutomobileWaitCruising = 10, + DT_Gangs = 11, + DT_SwatHelicopter = 12, + DT_PoliceBoat = 13, + DT_ArmyVehicle = 14, + DT_BikerBackup = 15 +}; + +enum eHudColors { + HUD_COLOUR_PURE_WHITE, + HUD_COLOUR_WHITE, + HUD_COLOUR_BLACK, + HUD_COLOUR_GREY, + HUD_COLOUR_GREYLIGHT, + HUD_COLOUR_GREYDARK, + HUD_COLOUR_RED, + HUD_COLOUR_REDLIGHT, + HUD_COLOUR_REDDARK, + HUD_COLOUR_BLUE, + HUD_COLOUR_BLUELIGHT, + HUD_COLOUR_BLUEDARK, + HUD_COLOUR_YELLOW, + HUD_COLOUR_YELLOWLIGHT, + HUD_COLOUR_YELLOWDARK, + HUD_COLOUR_ORANGE, + HUD_COLOUR_ORANGELIGHT, + HUD_COLOUR_ORANGEDARK, + HUD_COLOUR_GREEN, + HUD_COLOUR_GREENLIGHT, + HUD_COLOUR_GREENDARK, + HUD_COLOUR_PURPLE, + HUD_COLOUR_PURPLELIGHT, + HUD_COLOUR_PURPLEDARK, + HUD_COLOUR_PINK, + HUD_COLOUR_RADAR_HEALTH, + HUD_COLOUR_RADAR_ARMOUR, + HUD_COLOUR_RADAR_DAMAGE, + HUD_COLOUR_NET_PLAYER1, + HUD_COLOUR_NET_PLAYER2, + HUD_COLOUR_NET_PLAYER3, + HUD_COLOUR_NET_PLAYER4, + HUD_COLOUR_NET_PLAYER5, + HUD_COLOUR_NET_PLAYER6, + HUD_COLOUR_NET_PLAYER7, + HUD_COLOUR_NET_PLAYER8, + HUD_COLOUR_NET_PLAYER9, + HUD_COLOUR_NET_PLAYER10, + HUD_COLOUR_NET_PLAYER11, + HUD_COLOUR_NET_PLAYER12, + HUD_COLOUR_NET_PLAYER13, + HUD_COLOUR_NET_PLAYER14, + HUD_COLOUR_NET_PLAYER15, + HUD_COLOUR_NET_PLAYER16, + HUD_COLOUR_NET_PLAYER17, + HUD_COLOUR_NET_PLAYER18, + HUD_COLOUR_NET_PLAYER19, + HUD_COLOUR_NET_PLAYER20, + HUD_COLOUR_NET_PLAYER21, + HUD_COLOUR_NET_PLAYER22, + HUD_COLOUR_NET_PLAYER23, + HUD_COLOUR_NET_PLAYER24, + HUD_COLOUR_NET_PLAYER25, + HUD_COLOUR_NET_PLAYER26, + HUD_COLOUR_NET_PLAYER27, + HUD_COLOUR_NET_PLAYER28, + HUD_COLOUR_NET_PLAYER29, + HUD_COLOUR_NET_PLAYER30, + HUD_COLOUR_NET_PLAYER31, + HUD_COLOUR_NET_PLAYER32, + HUD_COLOUR_SIMPLEBLIP_DEFAULT, + HUD_COLOUR_MENU_BLUE, + HUD_COLOUR_MENU_GREY_LIGHT, + HUD_COLOUR_MENU_BLUE_EXTRA_DARK, + HUD_COLOUR_MENU_YELLOW, + HUD_COLOUR_MENU_YELLOW_DARK, + HUD_COLOUR_MENU_GREEN, + HUD_COLOUR_MENU_GREY, + HUD_COLOUR_MENU_GREY_DARK, + HUD_COLOUR_MENU_HIGHLIGHT, + HUD_COLOUR_MENU_STANDARD, + HUD_COLOUR_MENU_DIMMED, + HUD_COLOUR_MENU_EXTRA_DIMMED, + HUD_COLOUR_BRIEF_TITLE, + HUD_COLOUR_MID_GREY_MP, + HUD_COLOUR_NET_PLAYER1_DARK, + HUD_COLOUR_NET_PLAYER2_DARK, + HUD_COLOUR_NET_PLAYER3_DARK, + HUD_COLOUR_NET_PLAYER4_DARK, + HUD_COLOUR_NET_PLAYER5_DARK, + HUD_COLOUR_NET_PLAYER6_DARK, + HUD_COLOUR_NET_PLAYER7_DARK, + HUD_COLOUR_NET_PLAYER8_DARK, + HUD_COLOUR_NET_PLAYER9_DARK, + HUD_COLOUR_NET_PLAYER10_DARK, + HUD_COLOUR_NET_PLAYER11_DARK, + HUD_COLOUR_NET_PLAYER12_DARK, + HUD_COLOUR_NET_PLAYER13_DARK, + HUD_COLOUR_NET_PLAYER14_DARK, + HUD_COLOUR_NET_PLAYER15_DARK, + HUD_COLOUR_NET_PLAYER16_DARK, + HUD_COLOUR_NET_PLAYER17_DARK, + HUD_COLOUR_NET_PLAYER18_DARK, + HUD_COLOUR_NET_PLAYER19_DARK, + HUD_COLOUR_NET_PLAYER20_DARK, + HUD_COLOUR_NET_PLAYER21_DARK, + HUD_COLOUR_NET_PLAYER22_DARK, + HUD_COLOUR_NET_PLAYER23_DARK, + HUD_COLOUR_NET_PLAYER24_DARK, + HUD_COLOUR_NET_PLAYER25_DARK, + HUD_COLOUR_NET_PLAYER26_DARK, + HUD_COLOUR_NET_PLAYER27_DARK, + HUD_COLOUR_NET_PLAYER28_DARK, + HUD_COLOUR_NET_PLAYER29_DARK, + HUD_COLOUR_NET_PLAYER30_DARK, + HUD_COLOUR_NET_PLAYER31_DARK, + HUD_COLOUR_NET_PLAYER32_DARK, + HUD_COLOUR_BRONZE, + HUD_COLOUR_SILVER, + HUD_COLOUR_GOLD, + HUD_COLOUR_PLATINUM, + HUD_COLOUR_GANG1, + HUD_COLOUR_GANG2, + HUD_COLOUR_GANG3, + HUD_COLOUR_GANG4, + HUD_COLOUR_SAME_CREW, + HUD_COLOUR_FREEMODE, + HUD_COLOUR_PAUSE_BG, + HUD_COLOUR_FRIENDLY, + HUD_COLOUR_ENEMY, + HUD_COLOUR_LOCATION, + HUD_COLOUR_PICKUP, + HUD_COLOUR_PAUSE_SINGLEPLAYER, + HUD_COLOUR_FREEMODE_DARK, + HUD_COLOUR_INACTIVE_MISSION, + HUD_COLOUR_DAMAGE, + HUD_COLOUR_PINKLIGHT, + HUD_COLOUR_PM_MITEM_HIGHLIGHT, + HUD_COLOUR_SCRIPT_VARIABLE, + HUD_COLOUR_YOGA, + HUD_COLOUR_TENNIS, + HUD_COLOUR_GOLF, + HUD_COLOUR_SHOOTING_RANGE, + HUD_COLOUR_FLIGHT_SCHOOL, + HUD_COLOUR_NORTH_BLUE, + HUD_COLOUR_SOCIAL_CLUB, + HUD_COLOUR_PLATFORM_BLUE, + HUD_COLOUR_PLATFORM_GREEN, + HUD_COLOUR_PLATFORM_GREY, + HUD_COLOUR_FACEBOOK_BLUE, + HUD_COLOUR_INGAME_BG, + HUD_COLOUR_DARTS, + HUD_COLOUR_WAYPOINT, + HUD_COLOUR_MICHAEL, + HUD_COLOUR_FRANKLIN, + HUD_COLOUR_TREVOR, + HUD_COLOUR_GOLF_P1, + HUD_COLOUR_GOLF_P2, + HUD_COLOUR_GOLF_P3, + HUD_COLOUR_GOLF_P4, + HUD_COLOUR_WAYPOINTLIGHT, + HUD_COLOUR_WAYPOINTDARK, + HUD_COLOUR_PANEL_LIGHT, + HUD_COLOUR_MICHAEL_DARK, + HUD_COLOUR_FRANKLIN_DARK, + HUD_COLOUR_TREVOR_DARK, + HUD_COLOUR_OBJECTIVE_ROUTE, + HUD_COLOUR_PAUSEMAP_TINT, + HUD_COLOUR_PAUSE_DESELECT, + HUD_COLOUR_PwEAPONS_PURCHASABLE, + HUD_COLOUR_PwEAPONS_LOCKED, + HUD_COLOUR_END_SCREEN_BG, + HUD_COLOUR_CHOP, + HUD_COLOUR_PAUSEMAP_TINT_HALF, + HUD_COLOUR_NORTH_BLUE_OFFICIAL, + HUD_COLOUR_SCRIPT_VARIABLE_2, + HUD_COLOUR_H, + HUD_COLOUR_HDARK, + HUD_COLOUR_T, + HUD_COLOUR_TDARK, + HUD_COLOUR_HSHARD, + HUD_COLOUR_CONTROLLER_MICHAEL, + HUD_COLOUR_CONTROLLER_FRANKLIN, + HUD_COLOUR_CONTROLLER_TREVOR, + HUD_COLOUR_CONTROLLER_CHOP, + HUD_COLOUR_VIDEO_EDITOR_VIDEO, + HUD_COLOUR_VIDEO_EDITOR_AUDIO, + HUD_COLOUR_VIDEO_EDITOR_TEXT, + HUD_COLOUR_HB_BLUE, + HUD_COLOUR_HB_YELLOW, + HUD_COLOUR_VIDEO_EDITOR_SCORE, + HUD_COLOUR_VIDEO_EDITOR_AUDIO_FADEOUT, + HUD_COLOUR_VIDEO_EDITOR_TEXT_FADEOUT, + HUD_COLOUR_VIDEO_EDITOR_SCORE_FADEOUT, + HUD_COLOUR_HEIST_BACKGROUND, + HUD_COLOUR_VIDEO_EDITOR_AMBIENT, + HUD_COLOUR_VIDEO_EDITOR_AMBIENT_FADEOUT, + HUD_COLOUR_GB, + HUD_COLOUR_G, + HUD_COLOUR_B, + HUD_COLOUR_LOW_FLOW, + HUD_COLOUR_LOW_FLOW_DARK, + HUD_COLOUR_G1, + HUD_COLOUR_G2, + HUD_COLOUR_G3, + HUD_COLOUR_G4, + HUD_COLOUR_G5, + HUD_COLOUR_G6, + HUD_COLOUR_G7, + HUD_COLOUR_G8, + HUD_COLOUR_G9, + HUD_COLOUR_G10, + HUD_COLOUR_G11, + HUD_COLOUR_G12, + HUD_COLOUR_G13, + HUD_COLOUR_G14, + HUD_COLOUR_G15, + HUD_COLOUR_ADVERSARY, + HUD_COLOUR_DEGEN_RED, + HUD_COLOUR_DEGEN_YELLOW, + HUD_COLOUR_DEGEN_GREEN, + HUD_COLOUR_DEGEN_CYAN, + HUD_COLOUR_DEGEN_BLUE, + HUD_COLOUR_DEGEN_MAGENTA, + HUD_COLOUR_STUNT_1, + HUD_COLOUR_STUNT_2 +}; + +enum eNetObjectTypes : uint16_t { + NetObjectAutomobile, + NetObjectBike, + NetObjectBoat, + NetObjectDoor, + NetObjectHeli, + NetObjectObject, + NetObjectPed, + NetObjectPickup, + NetObjectPickupPlacement, + NetObjectPlane, + NetObjectSubmarine, + NetObjectPlayer, + NetObjectTrailer, + NetObjectTrain, + INVALID +}; + +enum PresenceEvent { + PRESENCE_GAME_SERVER = 0x76849AA6, + PRESENCE_UGC_STAT_UPDATE = 0x2190F9E1, + PRESENCE_BOUNTY = 0xECB54731, + PRESENCE_STAT_UPDATE = 0xEDF54CE2, + PRESENCE_FRIEND_CREW_JOINED = 0x12859620, + PRESENCE_FRIEND_CREW_CREATED = 0x3F1009B2, + PRESENCE_MISSION_VERIFIED = 0x8C571656, + PRESENCE_ROCKSTAR_MESSAGE = 0x70E4D0E1, + PRESENCE_CREW_MESSAGE = 0xCBB12972, + PRESENCE_GAME_AWARD = 0xD36120CE, + PRESENCE_VOICE_SESSION_INVITE = 0xB7AECB0C, + PRESENCE_VOICE_SESSION_RESPONSE = 0x7EC656F7, + PRESENCE_GAME_INVITE = 0x04ED840B, + PRESENCE_GAME_INVITED_CANCEL = 0xFCEFA1A2, + PRESENCE_GAME_INVITE_REPLY = 0x227E6048, + PRESENCE_TOURNAMENT_INVITE = 0xCFDF8DF4, + PRESENCE_FOLLOW_INVITE = 0x13F209B2, + PRESENCE_ADMIN_INVITE = 0x255FF988, + PRESENCE_JOIN_QUEUE_REQUEST = 0x0FD33101, + PRESENCE_JOIN_QUEUE_UPDATE = 0x33A53ACB, + PRESENCE_FINGER_OF_GOD = 0xB07F4711, + PRESENCE_NEWS_ITEM = 0x6EAF6B7D, + PRESENCE_FORCE_SESSION_UPDATE = 0xECAA6FA0, + PRESENCE_GAME_TRIGGER_EVENT = 0x28C617D9, + PRESENCE_TEXT_MESSAGE = 0x1A8A9221 +}; + +enum PlayerMenuType { + SELECTED_PLAYER, + ALL_PLAYERS, +}; + +enum eBone { + SKEL_ROOT = 0x0, + SKEL_Pelvis = 0x2e28, + SKEL_L_Thigh = 0xe39f, + SKEL_L_Calf = 0xf9bb, + SKEL_L_Foot = 0x3779, + SKEL_L_Toe0 = 0x83c, + IK_L_Foot = 0xfedd, + PH_L_Foot = 0xe175, + MH_L_Knee = 0xb3fe, + SKEL_R_Thigh = 0xca72, + SKEL_R_Calf = 0x9000, + SKEL_R_Foot = 0xcc4d, + SKEL_R_Toe0 = 0x512d, + IK_R_Foot = 0x8aae, + PH_R_Foot = 0x60e6, + MH_R_Knee = 0x3fcf, + RB_L_ThighRoll = 0x5c57, + RB_R_ThighRoll = 0x192a, + SKEL_Spine_Root = 0xe0fd, + SKEL_Spine0 = 0x5c01, + SKEL_Spine1 = 0x60f0, + SKEL_Spine2 = 0x60f1, + SKEL_Spine3 = 0x60f2, + SKEL_L_Clavicle = 0xfcd9, + SKEL_L_UpperArm = 0xb1c5, + SKEL_L_Forearm = 0xeeeb, + SKEL_L_Hand = 0x49d9, + SKEL_L_Finger00 = 0x67f2, + SKEL_L_Finger01 = 0xff9, + SKEL_L_Finger02 = 0xffa, + SKEL_L_Finger10 = 0x67f3, + SKEL_L_Finger11 = 0x1049, + SKEL_L_Finger12 = 0x104a, + SKEL_L_Finger20 = 0x67f4, + SKEL_L_Finger21 = 0x1059, + SKEL_L_Finger22 = 0x105a, + SKEL_L_Finger30 = 0x67f5, + SKEL_L_Finger31 = 0x1029, + SKEL_L_Finger32 = 0x102a, + SKEL_L_Finger40 = 0x67f6, + SKEL_L_Finger41 = 0x1039, + SKEL_L_Finger42 = 0x103a, + PH_L_Hand = 0xeb95, + IK_L_Hand = 0x8cbd, + RB_L_ForeArmRoll = 0xee4f, + RB_L_ArmRoll = 0x1470, + MH_L_Elbow = 0x58b7, + SKEL_R_Clavicle = 0x29d2, + SKEL_R_UpperArm = 0x9d4d, + SKEL_R_Forearm = 0x6e5c, + SKEL_R_Hand = 0xdead, + SKEL_R_Finger00 = 0xe5f2, + SKEL_R_Finger01 = 0xfa10, + SKEL_R_Finger02 = 0xfa11, + SKEL_R_Finger10 = 0xe5f3, + SKEL_R_Finger11 = 0xfa60, + SKEL_R_Finger12 = 0xfa61, + SKEL_R_Finger20 = 0xe5f4, + SKEL_R_Finger21 = 0xfa70, + SKEL_R_Finger22 = 0xfa71, + SKEL_R_Finger30 = 0xe5f5, + SKEL_R_Finger31 = 0xfa40, + SKEL_R_Finger32 = 0xfa41, + SKEL_R_Finger40 = 0xe5f6, + SKEL_R_Finger41 = 0xfa50, + SKEL_R_Finger42 = 0xfa51, + PH_R_Hand = 0x6f06, + IK_R_Hand = 0x188e, + RB_R_ForeArmRoll = 0xab22, + RB_R_ArmRoll = 0x90ff, + MH_R_Elbow = 0xbb0, + SKEL_Neck_1 = 0x9995, + SKEL_Head = 0x796e, + IK_Head = 0x322c, + FACIAL_facialRoot = 0xfe2c, + FB_L_Brow_Out_000 = 0xe3db, + FB_L_Lid_Upper_000 = 0xb2b6, + FB_L_Eye_000 = 0x62ac, + FB_L_CheekBone_000 = 0x542e, + FB_L_Lip_Corner_000 = 0x74ac, + FB_R_Lid_Upper_000 = 0xaa10, + FB_R_Eye_000 = 0x6b52, + FB_R_CheekBone_000 = 0x4b88, + FB_R_Brow_Out_000 = 0x54c, + FB_R_Lip_Corner_000 = 0x2ba6, + FB_Brow_Centre_000 = 0x9149, + FB_UpperLipRoot_000 = 0x4ed2, + FB_UpperLip_000 = 0xf18f, + FB_L_Lip_Top_000 = 0x4f37, + FB_R_Lip_Top_000 = 0x4537, + FB_Jaw_000 = 0xb4a0, + FB_LowerLipRoot_000 = 0x4324, + FB_LowerLip_000 = 0x508f, + FB_L_Lip_Bot_000 = 0xb93b, + FB_R_Lip_Bot_000 = 0xc33b, + FB_Tongue_000 = 0xb987, + RB_Neck_1 = 0x8b93, + IK_Root = 0xdd1c +}; \ No newline at end of file diff --git a/GTAV/src/rage/types/bit_buffer.cpp b/GTAV/src/rage/types/bit_buffer.cpp new file mode 100644 index 0000000..769d2e2 --- /dev/null +++ b/GTAV/src/rage/types/bit_buffer.cpp @@ -0,0 +1,75 @@ +#include "bit_buffer.h" +#include "global/vars.h" +#include "util/caller.h" + +namespace rage { + bit_buffer_sync_instance bit_buffer::create_reader() { + bit_buffer_sync_instance instance; + instance.m_VTable = (uint64_t)global::vars::g_sync_data_reader_vtable; + instance.m_type = 1; + instance.m_sub_type = 0; + instance.m_buffer = this; + return instance; + } + + void bit_buffer::update_bit(uint32_t LastSize) { + m_next_bit += LastSize; + + if (m_next_bit > m_current_bit) { + m_current_bit = m_next_bit; + } + } + + bool bit_buffer::read_bool(bool* output) { + return caller::call(global::vars::g_read_bool_from_bit_buffer, this, output); + } + + bool bit_buffer::read_int(int* output, uint32_t bit_offset) { + return caller::call(global::vars::g_read_int_from_bit_buffer, this, output, bit_offset); + } + + bool bit_buffer::read_uint(uint32_t* output, uint32_t bit_offset) { + return caller::call(global::vars::g_read_uint_from_bit_buffer, this, output, bit_offset); + } + + bool bit_buffer::read_ulonglong(uint64_t* output, uint32_t bit_offset) { + return caller::call(global::vars::g_read_ulonglong_from_bit_Buffer, this, output, bit_offset); + } + + bool bit_buffer::read_short(int16_t* output, uint32_t bit_offset) { + return caller::call(global::vars::g_read_short_from_bit_buffer, this, output, bit_offset); + } + + bool bit_buffer::read_ushort(uint16_t* output, uint32_t bit_offset) { + return caller::call(global::vars::g_read_short_from_bit_buffer, this, output, bit_offset); + } + + void bit_buffer::read_vector3(bit_buffer_sync_instance* instance, math::vector3_* output, uint32_t unk, uint32_t bit_offset) { + caller::call(global::vars::g_read_vector3_from_bit_buffer, instance, output, unk, bit_offset); + } + + bool bit_buffer::read_array(int* output, uint32_t count, uint32_t Unk) { + return caller::call(global::vars::g_read_array_from_bit_buffer, this, output, count, Unk); + } + + bool bit_buffer::read_msg_header(int* OutID) { + return caller::call(global::vars::g_read_msg_header_from_bit_buffer, OutID, this); + } + + bool bit_buffer::read_string(char* buffer, int size) { + return caller::call(global::vars::g_read_string_from_bit_buffer, this, buffer, size); + } + + bool bit_buffer::read_token(uint64_t* out_token) { + return caller::call(global::vars::g_read_token_from_bit_buffer, this, out_token); + } + + void bit_buffer::write_uint(uint32_t input, uint32_t bit_size, uint32_t bit_offset) { + caller::call(global::vars::g_write_uint_to_bit_buffer, this, input, bit_size, bit_offset); + update_bit(bit_size); + } + + bool bit_buffer::read_byte(uint8_t* out, uint32_t bit_offset) { + return caller::call(global::vars::g_read_byte_from_bit_buffer, this, out, bit_offset); + } +} \ No newline at end of file diff --git a/GTAV/src/rage/types/bit_buffer.h b/GTAV/src/rage/types/bit_buffer.h new file mode 100644 index 0000000..056a8d8 --- /dev/null +++ b/GTAV/src/rage/types/bit_buffer.h @@ -0,0 +1,97 @@ +#pragma once +#include "stdafx.h" +#include "util/math.h" + +#pragma pack(push) +#pragma pack(1) +namespace rage { + struct bit_buffer_sync_instance; + + struct bit_buffer { + uint64_t m_raw_buffer; // 0x0 + uint32_t m_unk1; // 0x8 + uint32_t m_max_bit; // 0xC + uint32_t m_next_bit; // 0x10 + uint32_t m_current_bit; // 0x14 + uint32_t m_unk2; // 0x18 + uint8_t m_bit_flag; // 0x1C + + bit_buffer() { + memset(this, 0, sizeof(bit_buffer)); + m_bit_flag &= 0xFC; + } + + void prepare(uint64_t raw_buffer, uint32_t size) { + m_bit_flag &= 0xFD; + m_bit_flag |= 1; + m_raw_buffer = raw_buffer; + m_max_bit = 8 * size; + } + + void prepare_sync(uint64_t raw_buffer, uint32_t size) { + m_bit_flag &= 0xFC; + m_raw_buffer = raw_buffer; + m_max_bit = 8 * size; + } + + void prepare_sync_local(uint64_t raw_buffer, uint32_t size, uint32_t unk) { + m_bit_flag &= 0xFD; + m_bit_flag |= 1; + m_raw_buffer = raw_buffer; + m_max_bit = size; + m_unk1 = unk; + } + + uint32_t get_position() { + return m_next_bit; + } + + bool set_position(uint32_t bits) { + if (bits >= 0) { + uint32_t Length = (m_bit_flag & 1) ? m_max_bit : m_current_bit; + + if (bits <= Length) { + m_next_bit = bits; + return true; + } + } + + return false; + } + + void add_offset(uint32_t Offset) { + m_next_bit += Offset; + } + + size_t get_data_length() { + return (m_current_bit / 8) + (m_current_bit % 8) ? 1 : 0; + } + + bit_buffer_sync_instance create_reader(); + void update_bit(uint32_t LastSize); + + bool read_bool(bool* output); + bool read_int(int* output, uint32_t bit_offset); + bool read_uint(uint32_t* output, uint32_t bit_offset); + bool read_ulonglong(uint64_t* output, uint32_t bit_offset); + bool read_short(int16_t* output, uint32_t bit_offset); + bool read_ushort(uint16_t* output, uint32_t bit_offset); + bool read_array(int* output, uint32_t count, uint32_t Unk); + bool read_msg_header(int* out_id); + bool read_string(char* buffer, int size); + bool read_token(uint64_t* out_token); + bool read_byte(uint8_t* out, uint32_t bit_offset); + + void read_vector3(bit_buffer_sync_instance* instance, math::vector3_* output, uint32_t unk, uint32_t bit_offset); + void write_uint(uint32_t input, uint32_t bit_size, uint32_t bit_offset); + }; + + struct bit_buffer_sync_instance { + uint64_t m_VTable; + uint8_t m_type; // 1 = reader, 2 = writer, 3 = calculator, 4 = logger + char _0x0009[0x7]; + uint64_t m_sub_type; // 0 = reader, 2 = writer, 3 = calculator, 4 = logger + bit_buffer* m_buffer; + }; +} +#pragma pack(pop) \ No newline at end of file diff --git a/GTAV/src/rage/types/generic_types.cpp b/GTAV/src/rage/types/generic_types.cpp new file mode 100644 index 0000000..16c3613 --- /dev/null +++ b/GTAV/src/rage/types/generic_types.cpp @@ -0,0 +1,47 @@ +#include "generic_types.h" +#include "rage/engine.h" +#include "util/caller.h" +#include "global/vars.h" +#include "util/log.h" + +namespace rage::types { + void replay_interface_camera::for_each(std::function callback) { + for (int i = 0; i < m_count; i++) { + if (m_camera_list[i].m_entity) { + callback(rage::engine::get_entity_handle((uint64_t)m_camera_list[i].m_entity), m_camera_list[i].m_entity); + } + } + } + + void replay_interface_veh::for_each(std::function callback) { + for (int i = 0; i < m_count; i++) { + if (m_veh_list[i].m_entity) { + callback(rage::engine::get_entity_handle((uint64_t)m_veh_list[i].m_entity), m_veh_list[i].m_entity); + } + } + } + + void replay_interface_ped::for_each(std::function callback) { + for (int i = 0; i < m_count; i++) { + if (m_ped_list[i].m_entity) { + callback(rage::engine::get_entity_handle((uint64_t)m_ped_list[i].m_entity), m_ped_list[i].m_entity); + } + } + } + + void replay_interface_pickup::for_each(std::function callback) { + for (int i = 0; i < m_count; i++) { + if (m_pickup_list[i].m_entity) { + callback(rage::engine::get_entity_handle((uint64_t)m_pickup_list[i].m_entity), m_pickup_list[i].m_entity); + } + } + } + + void replay_interface_object::for_each(std::function callback) { + for (int i = 0; i < m_count; i++) { + if (m_object_list[i].m_entity) { + callback(rage::engine::get_entity_handle((uint64_t)m_object_list[i].m_entity), m_object_list[i].m_entity); + } + } + } +} \ No newline at end of file diff --git a/GTAV/src/rage/types/generic_types.h b/GTAV/src/rage/types/generic_types.h new file mode 100644 index 0000000..f5acf7e --- /dev/null +++ b/GTAV/src/rage/types/generic_types.h @@ -0,0 +1,1110 @@ +#pragma once +#include "stdafx.h" +#include "util/math.h" +#include "network_types.h" +#include + +namespace rage::types { + struct ped; + struct ammo_info; + struct aiming_info; + struct weapon_info; + struct base_model_info; + struct vehicle_model_info; + struct replay_interface_camera; + struct replay_interface_veh; + struct replay_interface_ped; + struct replay_interface_pickup; + struct replay_interface_object; + + struct ped_model_info {}; + struct ped_draw_handler {}; + struct ped_inventory {}; + + struct memory_heap_pt { + virtual ~memory_heap_pt(); + virtual void _0x1(); + virtual void _0x2(); + virtual void _0x3(); + virtual void _0x4(); + virtual void _0x5(); + virtual void _0x6(); + virtual void _0x7(); + virtual void _0x8(); + virtual void _0x9(); + virtual uint64_t allocate(uint32_t size); + }; + +#pragma pack(push) +#pragma pack(1) + struct marker_table { + char _0x0000[0x70]; + bool m_in_use; + char _0x0071[0x5F]; + }; +#pragma pack(pop) + + struct store_entry { + uint32_t m_handle; + uint32_t m_flag; + }; + + struct store_module { + char _0x0000[0x8]; + uint32_t m_base_index; + char _0x000C[0x2C]; + guid_pool m_pool; + }; + + struct store_module_manager {}; + + struct store_manager { + store_entry* m_entries; + char _0x0008[0x1B0]; + store_module_manager m_module; + }; + + struct xml_node { + const char* m_name; + char _0x0008[0x20]; + xml_node* m_next; + }; + + struct waypoint_data { + math::vector4* m_points; + char _0x0008[0x3C]; + uint32_t m_count; + }; + + struct grc_texture_dx11 { // grcTexture + char _0x0000[0x28]; + char* m_name; + char _0x0030[0x8]; + void* m_texture; // ID3D11Resource + char _0x0040[0x10]; + uint16_t m_width; + uint16_t m_height; + uint16_t m_depth; + char _0x0056[0xA]; + grc_texture_dx11* m_previous; + grc_texture_dx11* m_next; + char _0x0070[0x8]; + void* m_shader; // ID3D11ShaderResourceView + char _0x0080[0x20]; + }; + + struct dictionary { // 0x40- + char _0x0000[0x28]; + short m_count; + char _0x002A[0x6]; + grc_texture_dx11** m_items; + }; + + struct dictionary_pool { + dictionary* m_pool; + char _0x0008[0x4]; + uint32_t m_dictionary_hash; + char _0x0010[0x8]; + }; + + struct texture_store { + char _0x0000[0x38]; + dictionary_pool* m_pool; + uint8_t* m_mask; + uint32_t m_count; + uint32_t m_size; + }; + + struct ui_element_vector { + int m_index; + char _0x0004[0xC]; + math::vector4 m_value; + }; + + struct ui_element_vector_constant { + math::vector4 m_value; + char _0x0004[0xC]; + int m_index; + }; + + struct ui_index { + int m_index; + }; + + struct ui_element_integer { + ui_index m_index; + int m_value; + }; + + struct ui_element_shader { + uint64_t m_raw_element; + grc_texture_dx11* m_shader; + }; + + struct ui_visual_settings { + char _0x0000[0x2874]; + float m_rim_light; + float m_global_environment_reflection; + float m_gamma; + float m_mid_blur; + float m_far_blur; + float m_sky_multiplier; + float m_desaturation; + }; + + struct ui_weather { + char _0x0000[0x10]; + ui_element_vector m_azimuth_east_color; + char _0x0030[0x10]; + ui_element_vector m_azimuth_west_color; + char _0x0060[0x10]; + ui_element_vector m_azimuth_transition_color; + char _0x0090[0x4]; + ui_element_integer m_azimuth_transition_position; + char _0x009c[0x4]; + ui_element_vector m_zenith_color; + char _0x00c0[0x10]; + ui_element_vector m_zenith_transition_color; + char _0x00f0[0x4]; + ui_element_vector_constant m_zenith_constants; + char _0x0114[0x1C]; + ui_element_vector m_sky_plane_color; + char _0x0150[0x10]; + ui_index m_sky_plane_params; + char _0x0164[0x34]; + ui_index m_sun_direction; + ui_index m_sun_position; + char _0x01a0[0x10]; + ui_element_vector m_sun_color; + ui_element_vector m_sun_color_hdr; + char _0x01f0[0x10]; + ui_element_vector m_sun_disc_color_hdr; + char _0x0220[0x20]; + ui_element_vector m_sun_constants; + ui_element_shader m_high_detail_noise; + ui_element_vector_constant m_cloud_constant1; + char _0x0290[0x10]; + ui_element_vector_constant m_cloud_constant2; + char _0x02c0[0x10]; + ui_element_vector_constant m_cloud_constant3; + char _0x02f0[0x10]; + ui_element_vector_constant m_cloud_detail_constants; + char _0x0320[0x30]; + ui_element_vector m_cloud_base_minus_mid_colour; + ui_element_vector m_cloud_mid_color; + ui_element_vector m_cloud_shadow_minus_base_colour_times_shadow_strength; + ui_element_vector_constant m_small_cloud_constants; + char _0x03d0[0x20]; + ui_element_vector m_small_cloud_color_hdr; + char _0x0410[0x10]; + ui_index m_cloudgen_frequency; + char _0x0424[0x1C]; + ui_element_vector m_noise_phase; + char _0x0460[0x20]; + ui_index m_speed_constants; + char _0x0484[0x1C]; + ui_element_integer m_horizon_level; + char _0x04a8[0x10]; + ui_element_shader m_dither; + char _0x04c8[0x18]; + ui_element_shader m_star_field; + ui_element_integer m_starfield_intensity; + ui_element_shader m_moon; + char _0x0508[0x28]; + ui_element_integer m_moon_intensity; + char _0x0538[0x8]; + ui_element_vector m_moon_color; + char _0x0560[0x10]; + ui_index m_lunar_cycle; + char _0x0574[0x1C]; + ui_index m_moon_direction; + ui_index m_moon_position; + char _0x0598[0x18]; + ui_element_integer m_noise_frequency; + ui_element_integer m_noise_scale; + ui_element_integer m_noise_threshold; + ui_element_integer m_noise_softness; + ui_element_integer m_noise_density_offset; + ui_element_shader m_noise; + + void set_sky(bool enabled) { + *(bool*)((uint64_t)this - 0x60) = enabled; + } + }; + + struct ui_puddle_ripple { + char _0x0000[0xF50]; + float m_ripple_max_size; + float m_ripple_min_size; + float m_ripple_min_duration; + float m_ripple_max_duration; + float m_ripple_speed; + float m_ripple_drop_factor; + float m_ripple_wind_strength; + char _0x0f6c[0x4]; + float m_ripple_strength; + char _0x0f74[0x14]; + float m_ripple_player_map_size; + float m_ripple_player_speed; + char _0x0f90[0x4]; + float m_ripple_wind_damping; + }; + + struct ui_puddle { + char _0x0000[0x70]; + float m_scale; + float m_range; + float m_depth; + float m_depth_test; + float m_reflectivity; + char _0x0084[0x2C]; + ui_puddle_ripple* m_ripples; + }; + + struct ui_element_color_struct { + float m_intensity; + float m_radius; + float m_falloff_exp; + float m_inner_cone_angle; + float m_outer_cone_angle; + float m_corona_hdr; + float m_corona_size; + float m_shadow_blur; + float m_capsule_length; + char _0x0024[0xC]; + math::vector3_ m_color; + char _0x003C[0x4]; + uint32_t m_flags; // 0x200 = using sun, 0x140 = using dynamic shadows + }; + + struct vehicle_stream_render { + char _0x0000[0x8]; + float m_tire_size; + char _0x000C[0xB94]; + float m_tire_width; + }; + + struct custom_shader_effect_vehicle { + char _0x0000[0xE0]; + grc_texture_dx11* m_unk_texture; + char _0x00E8[0x38]; + grc_texture_dx11* m_plate_texture; + grc_texture_dx11* m_plate_texture2; + }; + + struct vehicle_draw_handler { + char _0x0000[0x20]; + custom_shader_effect_vehicle* m_damage_shader_effect; + char _0x0028[0x8]; + custom_shader_effect_vehicle* m_shader_effect; + char _0x0038[0x338]; //0x0000 + vehicle_stream_render* m_vehicle_stream_render; //0x0370 + char _0x0378[0x8B0]; //0x0378 + }; + + struct flying_handling_data { + char _0x0000[0x8]; //0x0000 + float m_thrust; //0x0008 + float m_thrust_fall_off; //0x000C + float m_thrust_vectoring; //0x0010 + char _0x0014[0x8]; //0x0014 + float m_yaw_mult; //0x001C + float m_yaw_stabilise; //0x0020 + float m_side_slip_mult; //0x0024 + char _0x0028[0x4]; //0x0028 + float m_roll_mult; //0x002C + float m_roll_stabilise; //0x0030 + float N000026D3; //0x0034 + float m_pitch_mult; //0x0038 + float m_pitch_stabilise; //0x003C + char _0x0040[0x4]; //0x0040 + float m_form_lift_mult; //0x0044 + float m_attack_lift_mult; //0x0048 + float m_attack_dive_mult; //0x004C + float m_gear_down_drag_v; //0x0050 + float m_gear_down_lift_mult; //0x0054 + float m_wind_mult; //0x0058 + float m_move_res; //0x005C + math::vector3_ m_vec_turn_resistance; //0x0060 + char _0x006C[0x4]; //0x006C + math::vector3_ m_vec_speed_resistance; //0x0070 + char _0x007C[0x4]; //0x007C + float m_gear_door_front_open; //0x0080 + float m_gear_door_rear_open; //0x0084 + float m_gear_door_rear_open2; //0x0088 + float m_gear_door_rear_m_open; //0x008C + float m_turublence_magnitude_max; //0x0090 + float m_turublence_force_multi; //0x0094 + float m_turublence_roll_torque_multi; //0x0098 + float m_turublence_pitch_torque_multi; //0x009C + float m_body_damage_control_effect_mult; //0x00A0 + float m_input_sensitivity_for_difficulty; //0x00A4 + float m_on_ground_yaw_boost_speed_peak; //0x00A8 + float m_on_ground_yaw_boost_speed_cap; //0x00AC + float m_engine_off_glide_multi; //0x00B0 + }; //Size=0x00B4 + + struct boat_handling_data { + char _0x0000[0x8]; //0x0000 + float m_box_front_mult; //0x0008 + float m_box_rear_mult; //0x000C + float m_box_side_mult; //0x0010 + float m_sample_top; //0x0014 + float m_sample_bottom; //0x0018 + float N000028C4; //0x001C + float m_aquaplane_force; //0x0020 + float m_aquaplane_push_water_mult; //0x0024 + float m_aquaplane_push_water_cap; //0x0028 + float m_aquaplane_push_water_apply; //0x002C + float m_rudder_force; //0x0030 + float m_rudder_offset_submerge; //0x0034 + float m_rudder_offset_force; //0x0038 + float m_rudder_offset_force_z_mult; //0x003C + float m_wave_audio_mult; //0x0040 + float N000028CE; //0x0044 + float N0000283E; //0x0048 + float N000028D0; //0x004C + math::vector3_ m_vec_move_resistance; //0x0050 + float N000028D4; //0x005C + math::vector3_ m_vec_turn_resistance; //0x0060 + float N000028D8; //0x006C + float m_look_lr_cam_height; //0x0070 + float m_drag_coefficient; //0x0074 + float m_keel_sphere_size; //0x0078 + float m_prop_radius; //0x007C + float m_low_lod_ang_offset; //0x0080 + float m_low_lod_draught_offset; //0x0084 + float m_impeller_offset; //0x0088 + float m_impeller_force_mult; //0x008C + float m_dinghy_sphere_buoy_const; //0x0090 + float m_prow_raise_mult; //0x0094 + }; //Size=0x0098 + + struct bike_handling_data { + char _0x0000[0x8]; //0x0000 + float m_lean_fwd_com_mult; //0x0008 + float m_lean_fwd_force_mult; //0x000C + float m_lean_bak_com_mult; //0x0010 + float m_lean_bak_force_mult; //0x0014 + float m_max_bank_angle; //0x0018 + char _0x001C[0x4]; //0x001C + float m_full_anim_angle; //0x0020 + float m_des_lean_return_frac; //0x0024 + float m_stick_lean_mult; //0x0028 + float m_braking_stability_mult; //0x002C + float m_in_air_steer_mult; //0x0030 + float m_wheelie_balance_point; //0x0034 + float m_stoppie_balance_point; //0x0038 + float m_wheelie_steer_mult; //0x003C + float m_rear_balance_mult; //0x0040 + float m_front_balance_mult; //0x0044 + float m_bike_ground_side_friction_mult; //0x0048 + float m_bike_wheel_ground_side_friction_mult; //0x004C + float m_bike_on_stand_lean_angle; //0x0050 c + float m_bike_on_stand_steer_angle; //0x0054 + float m_jump_force; //0x0058 + }; //Size=0x005C + + typedef union { + flying_handling_data m_flying_handling_data; + bike_handling_data m_bike_handling_data; + boat_handling_data m_boat_handling_data; + } sub_handling_data_type; + + struct SubHandlingData { + sub_handling_data_type* m_sub_handling_data; //0x0000 + void* m_vehicle_weapon_handling_data; //0x0008 + char _0x0010[0x8]; //0x0010 + }; + + struct handling_data { + char _0x0000[0x8]; //0x0000 + int m_hash; //0x0008 + float m_mass; //0x000C + char _0x0010[0x4]; //0x0010 + float m_downforce_modifier; //0x0014 + char _0x0018[0x8]; //0x0018 + math::vector3_ m_vec_centre_of_mass_offset; //0x0020 + char _0x002C[0x4]; //0x002C + math::vector3_ m_vec_inertia_multiplier; //0x0030 + char _0x003C[0x4]; //0x003C + float m_percent_submerged; //0x0040 + char _0x0044[0x8]; //0x0044 + float m_drive_bias_front; //0x004C + unsigned char m_initial_drive_gears; //0x0050 + char _0x0051[0x3]; //0x0051 + float m_drive_inertia; //0x0054 + float m_clutch_change_rate_scale_up_shift; //0x0058 + float m_clutch_change_rate_scale_down_shift; //0x005C + float m_initial_drive_force; //0x0060 + char _0x0064[0x8]; //0x0064 + float m_brake_force; //0x006C + char _0x0070[0x4]; //0x0070 + float m_initial_drive_max_flat_vel; //0x0074 + char _0x0078[0x4]; //0x0078 + float m_hand_brake_force; //0x007C + float m_steering_lock; //0x0080 + char _0x0084[0x4]; //0x0084 + float m_traction_curve_max; //0x0088 + char _0x008C[0x14]; //0x008C + float m_traction_spring_delta_max; //0x00A0 + char _0x00A4[0x4]; //0x00A4 + float m_low_speed_traction_loss_mult; //0x00A8 + float m_camber_stiffness; //0x00AC + char _0x00B0[0x8]; //0x00B0 + float m_traction_loss_mult; //0x00B8 + float m_suspension_force; //0x00BC + float m_suspension_comp_damp; //0x00C0 + float m_suspension_rebound_damp; //0x00C4 + float m_suspension_upper_limit; //0x00C8 + float m_suspension_lower_limit; //0x00CC + char _0x00D0[0xC]; //0x00D0 + float m_anti_roll_bar_force; //0x00DC + char _0x00E0[0x8]; //0x00E0 + float m_roll_centre_height_front; //0x00E8 + float m_roll_centre_height_rear; //0x00EC + float m_collision_damage_mult; //0x00F0 + float m_weapon_damage_mult; //0x00F4 + float m_deformation_damage_mult; //0x00F8 + float m_engine_damage_mult; //0x00FC + float m_petrol_tank_volume; //0x0100 + float m_oil_volume; //0x0104 + char _0x0108[0x4]; //0x0108 + math::vector3_ m_seat_offset; //0x010C + int m_monetary_value; //0x0118 + char _0x011C[0x30]; //0x011C + unsigned char N00002337; //0x014C + unsigned char N0000239F; //0x014D + char _0x014E[0x2]; //0x014E + void* m_a_i_handling_info; //0x0150 + SubHandlingData* m_sub_handling_data; //0x0158 + }; //Size=0x0160 + + struct vehicle { + char _0x0000[0x20]; //0x0000 + vehicle_model_info* m_model_info; + char _0x0028[0x8]; + void* m_frag_inst; //0x0030 + char _0x0038[0x10]; //0x0038 + vehicle_draw_handler* m_vehicle_draw_handler; //0x0048 + char _0x0050[0x230]; //0x0050 + float m_health; //0x0280 + char _0x0284[0x1C]; //0x0284 + float m_max_health; //0x02A0 + char _0x02A4[0x77]; //0x02A4 + unsigned char m_rocket_state; //0x031B + char _0x031C[0x1]; //0x031C + unsigned char m_rocket_energy; //0x031D + char _0x031E[0x5FA + 0x20]; //0x031E + handling_data* m_handling_data; //0x0918 - NOW 0x938 + char _0x0920[0x48]; //0x0920 + vehicle* m_vehicle; //0x0968 + char _0x0970[0x8]; //0x0970 + void* m_vehicle_deformation; //0x0978 + char _0x0980[0x101C]; //0x0980 + float m_visual_suspension; //0x199C + char _0x19A0[0x240]; //0x19A0 + + math::matrix* get_matrix() { + return (math::matrix*)((uint64_t)this + 0x60); + } + + rage::network::net_object* get_net_obj() { + return *(rage::network::net_object**)((uint64_t)this + 0xD0); + } + }; + + struct object { + char _0x0000[0x20]; + base_model_info* m_model_info; + char _0x0028[0x20]; + void* m_object_draw_handler; + char _0x0050[0x10]; + math::matrix m_matrix; + + // m_up[3] = width + // m_forward[3] = height + }; + + struct ped_weapon_manager { + char _0x0000[0x20]; //0x0000 + rage::types::weapon_info* m_weapon_info; //0x0020 + char _0x0028[0x178]; //0x0028 + math::vector3_ m_last_aimed_position; //0x01A0 + char _0x01AC[0x4]; //0x01AC + math::vector3_ m_impact_position; //0x01B0 + char _0x01BC[0x2E4]; //0x01BC + + weapon_info* get_vehicle_weapon() { + return *(weapon_info**)(this + 0x70); + } + }; + + struct navigation { + char _0x0000[0x20]; + float m_last_heading; + float m_heading; + char _0x0028[0x8]; + math::vector3_ m_rotation; + char _0x003C[0x14]; + math::vector3_ m_position; + }; + + struct ped { + char _0x0000[0x10]; + uint64_t m_decor_info; + char _0x0018[0x8]; + ped_model_info* m_ped_model_info; + char _0x0028[0x8]; + navigation* m_navigation; + char _0x0038[0x10]; + ped_draw_handler* m_ped_draw_handler; // 0x48 + char _0x0050[0x10]; + math::matrix m_transform; + char _0x00A0[0x1E0]; + float m_health; + char _0x0284[0x1C]; + float m_max_health; + char _0x02A4[0xA8C]; // 0xA8C + vehicle* m_vehicle; + char _0x0D30[0x390]; + rage::network::player_info* m_player_info; // 0x10C8 + ped_inventory* m_ped_inventory; + ped_weapon_manager* m_ped_weapon_manager; + + rage::network::net_object* get_net_obj() { + return *(rage::network::net_object**)((uint64_t)this + 0xD0); + } + + void set_flag(uint32_t flag) { + *(uint32_t*)((uint64_t)this + 0x141C) = flag; + } + }; + + struct ped_factory { + char _0x0000[8]; + ped* m_local_ped; + }; + + struct ammo_info { + char _0x0008[0x10]; //0x0008 + uint32_t m_ammo_hash; //0x0010 + uint32_t m_name; //0x0014 + uint32_t m_model; //0x0018 + uint32_t m_slot; //0x001C + unsigned char m_ammo_max; //0x0020 + char _0x0021[0x3]; //0x0021 + unsigned char m_ammo_max50; //0x0024 + char _0x0025[0x3]; //0x0025 + unsigned char m_ammo_max100; //0x0028 + char _0x0029[0x3]; //0x0029 + unsigned char m_ammo_max_m_p; //0x002C + char _0x002D[0x3]; //0x002D + unsigned char m_ammo_max50_m_p; //0x0030 + char _0x0031[0x3]; //0x0031 + unsigned char m_ammo_max100_m_p; //0x0034 + char _0x0035[0xB]; //0x0035 + float m_damage; //0x0040 + float m_life_time; //0x0044 + float m_from_vehicle_life_time; //0x0048 + float m_life_time_after_impact; //0x004C + float m_life_time_after_explosion; //0x0050 + float m_explosion_time; //0x0054 + float m_launch_speed; //0x0058 + float m_separation_time; //0x005C + float m_time_to_reach_target; //0x0060 + float m_damping; //0x0064 + float m_gravity_factor; //0x0068 + float m_ricochet_tolerance; //0x006C + float m_ped_ricochet_tolerance; //0x0070 + float m_vehicle_ricochet_tolerance; //0x0074 + float m_friction_multiplier; //0x0078 + char _0x007C[0x64]; //0x007C + math::vector3_ m_light_color; //0x00E0 + char _0x00EC[0x4]; //0x00EC + float m_light_intensity; //0x00F0 + float m_light_range; //0x00F4 + float m_light_falloff_exp; //0x00F8 + float m_light_frequency; //0x00FC + float m_light_power; //0x0100 + float m_corona_size; //0x0104 + float m_corona_intensity; //0x0108 + float m_corona_z_bias; //0x010C + char _0x0110[0x40]; //0x0110 + unsigned char m_ammo_max_m_p_bonus; //0x0150 + char _0x0151[0x7]; //0x0151 + }; + + struct aiming_info { + int m_hash; //0x0000 + float m_heading_limit; //0x0004 + float m_sweep_pitch_min; //0x0008 + float m_sweep_pitch_max; //0x000C + }; + + struct weapon_info { + uint64_t m_vmt; //0x0000 + char _0x0008[8]; //0x0008 + uint32_t m_name_hash; //0x0010 + uint32_t m_model_hash; //0x0014 + uint32_t m_audio; //0x0018 + uint32_t m_slot; //0x001C + int m_damage_type; //0x0020 + uint32_t m_explosion_default; //0x0024 + uint32_t m_explosion_hit_car; //0x0028 + uint32_t m_explosion_hit_truck; //0x002C + uint32_t m_explosion_hit_bike; //0x0030 + uint32_t m_explosion_hit_boat; //0x0034 + uint32_t m_explosion_hit_plane; //0x0038 + char _0x003C[24]; //0x003C + int m_fire_type; //0x0054 + int m_wheel_slot; //0x0058 + uint32_t m_group_hash; //0x005C + rage::types::ammo_info* m_ammo_info; //0x0060 + rage::types::aiming_info* m_aiming_info; //0x0068 + uint32_t m_clip_size; //0x0070 + float m_accuracy_spread; //0x0074 + float m_accurate_mode_accuracy_modifier; //0x0078 + float m_run_and_gun_accuracy_modifier; //0x007C + float m_run_and_gun_accuracy_max_modifier; //0x0080 + float m_recoil_accuracy_max; //0x0084 + float m_recoil_error_time; //0x0088 + float m_recoil_recovery_rate; //0x008C + float m_recoil_accuracy_to_allow_head_shot_a_i; //0x0090 + float m_min_head_shot_distance_a_i; //0x0094 + float m_max_head_shot_distance_a_i; //0x0098 + float m_head_shot_damage_modifier_a_i; //0x009C + float m_recoil_accuracy_to_allow_head_shot_player; //0x00A0 + float m_min_head_shot_distance_player; //0x00A4 + float m_max_head_shot_distance_player; //0x00A8 + float m_head_shot_damage_modifier_player; //0x00AC + float m_damage; //0x00B0 + float m_damage_time; //0x00B4 + float m_damage_time_in_vehicle; //0x00B8 + float m_damage_time_in_vehicle_head_shot; //0x00BC + char _0x00C0[8]; //0x00C0 + float m_hit_limbs_damage_modifier; //0x00C8 + float m_network_hit_limbs_damage_modifier; //0x00CC + float m_lightly_armoured_damage_modifier; //0x00D0 + float m_vehicle_damage_modifier; //0x00D4 + float m_force; //0x00D8 + float m_force_hit_ped; //0x00DC + float m_force_hit_vehicle; //0x00E0 + float m_force_hit_flying_heli; //0x00E4 + uint64_t m_override_forces; //0x00E8 + int16_t m_override_forces_count; //0x00F0 + int16_t m_override_forces_capacity; //0x00F2 + char _0x00F4[4]; //0x00F4 + float m_force_max_strength_mult; //0x00F8 + float m_force_falloff_range_start; //0x00FC + float m_force_falloff_range_end; //0x0100 + float m_force_falloff_min; //0x0104 + float m_projectile_force; //0x0108 + float m_frag_impulse; //0x010C + float m_penetration; //0x0110 + float m_vertical_launch_adjustment; //0x0114 + float m_drop_forward_velocity; //0x0118 + float m_speed; //0x011C + int m_bullets_in_batch; //0x0120 + float m_batch_spread; //0x0124 + float m_reload_time_m_p; //0x0128 + float m_reload_time_s_p; //0x012C + float m_vehicle_reload_time; //0x0130 + float m_anim_reload_rate; //0x0134 + int m_bullets_per_anim_loop; //0x0138 + float m_time_between_shots; //0x013C + float m_time_left_between_shots_where_should_fire_is_cached; //0x0140 + float m_spin_up_time; //0x0144 + float m_spin_time; //0x0148 + float m_spin_down_time; //0x014C + float m_alternate_wait_time; //0x0150 + float m_bullet_bending_near_radius; //0x0154 + float m_bullet_bending_far_radius; //0x0158 + float m_bullet_bending_zoomed_radius; //0x015C + float m_first_person_bullet_bending_near_radius; //0x0160 + float m_first_person_bullet_bending_far_radius; //0x0164 + float m_first_person_bullet_bending_zoomed_radius; //0x0168 + char _0x016C[4]; //0x016C + int m_effect_group; //0x0170 + uint32_t m_flash_fx; //0x0174 + uint32_t m_flash_fx_alt; //0x0178 + uint32_t m_flash_fx_fp; //0x017C + uint32_t m_flash_fx_alt_fp; //0x0180 + uint32_t m_muzzle_smoke_fx; //0x0184 + uint32_t m_muzzle_smoke_fx_fp; //0x0188 + float m_muzzle_smoke_fx_min_level; //0x018C + float m_muzzle_smoke_fx_inc_per_shot; //0x0190 + float m_muzzle_smoke_fx_dec_per_sec; //0x0194 + char _0x0198[28]; //0x0198 + uint32_t m_shell_fx; //0x01B4 + uint32_t m_shell_fx_fp; //0x01B8 + uint32_t m_tracer_fx; //0x01BC + uint32_t m_ped_damage_hash; //0x01C0 + float m_tracer_fx_chance_sp; //0x01C4 + float m_tracer_fx_chance_mp; //0x01C8 + char _0x01CC[4]; //0x01CC + float m_flash_fx_chance_sp; //0x01D0 + float m_flash_fx_chance_mp; //0x01D4 + float m_flash_fx_alt_chance; //0x01D8 + float m_flash_fx_scale; //0x01DC + char _0x01E0[76]; //0x01E0 + float m_ground_disturb_fx_dist; //0x022C + char _0x0230[32]; //0x0230 + int m_initial_rumble_duration; //0x0250 + float m_initial_rumble_intensity; //0x0254 + float m_initial_rumble_intensity_trigger; //0x0258 + int m_rumble_duration; //0x025C + float m_rumble_intensity; //0x0260 + float m_rumble_intensity_trigger; //0x0264 + float m_rumble_damage_intensity; //0x0268 + int m_initial_rumble_duration_fps; //0x026C + float m_initial_rumble_intensity_fps; //0x0270 + int m_rumble_duration_fps; //0x0274 + float m_rumble_intensity_fps; //0x0278 + float m_network_player_damage_modifier; //0x027C + float m_network_ped_damage_modifier; //0x0280 + float m_network_head_shot_player_damage_modifier; //0x0284 + float m_lock_on_range; //0x0288 + float weapon_range; //0x028C + float m_ai_sound_range; //0x0290 + float m_ai_potential_blast_event_range; //0x0294 + float m_damage_fall_off_range_min; //0x0298 + float m_damage_fall_off_range_max; //0x029C + char _0x02A0[8]; //0x02A0 + float m_damage_fall_off_modifier; //0x02A8 + char _0x02AC[4]; //0x02AC + float m_damage_fall_off_modifier1; //0x02B0 + char _0x02B4[60]; //0x02B4 + int m_min_time_between_recoil_shakes; //0x02F0 + float m_recoil_shake_amptitude; //0x02F4 + float m_explosion_shake_amplitude; //0x02F8 + float m_camera_fov; //0x02FC + char _0x0300[8]; //0x0300 + float m_first_person_scope_fov; //0x0308 + float m_first_person_scope_attachment_fov; //0x030C + char _0x0310[736]; //0x0310 + char* m_label_text; //0x05F0 + char _0x05F8[872]; //0x05F8 + }; + + struct weapon { + char _0x0000[0x40]; + weapon_info* m_weapon_info; + }; + + struct explosion_data { + const char* m_explosion_name; + int m_unk1; + int m_unk2; + float m_damage_at_centre; + float m_damage_at_edge; + float m_network_player_modifier; + float m_network_ped_modifier; + float m_end_radius; + float m_init_speed; + float m_decay_factor; + float m_force_factor; + float m_ragdoll_force_modifier; + float m_self_force_modifier; + float m_directed_width; + float m_directed_lifetime; + float m_cam_shake; + float m_cam_shake_roll_off_scaling; + float m_shocking_event_visual_range_override; + float m_shocking_event_audio_range_override; + float m_frag_damage; + bool m_minor_explosion; + bool m_applies_continuous_damage; + bool m_post_process_collisions_with_no_force; + bool m_damage_vehicles; + bool m_damage_objects; + bool m_only_affects_live_peds; + bool m_ignore_exploding_entity; + bool m_no_occlusion; + bool m_explode_attach_entity_when_finished; + bool m_can_set_ped_on_fire; + bool m_can_set_player_on_fire; + bool m_suppress_crime; + bool m_use_distance_damage_calc; + bool m_prevent_water_explosion_vfx; + bool m_ignore_ratio_check_for_fire; + bool m_allow_underwater_explosion; + int m_unk3; + float m_unk4; + float m_unk5; + char m_unk6[12]; + int m_cam_shake_name_hash; + int m_vfx_tag_name_hash; + int m_unk_size; + }; + + struct explosion_fx { + uint32_t m_name_hash; + char Unk[0x20]; + float m_scale; + char Unk2[0x38]; + }; + + struct blip { + char _0x0000[0x4]; + int m_handle; + char _0x0008[0x8]; + math::vector3_ m_coords; + char _0x001C[0x24]; + int m_sprite; + char _0x0044[0x4]; + int m_color; + int m_color2; + math::vector2 m_scale; + float m_rotation; + + bool is_visible() { + return *(bool*)((uint64_t)this + 0x10); + } + }; + + struct blip_list { + blip* m_blips[1500]; + }; + + struct ocean_wave_quad { + math::vector2 m_min; + math::vector2 m_max; + short m_amplitude; + math::vector2 m_direction; + }; + + struct ocean_calming_quad { + math::vector2 m_min; + math::vector2 m_max; + float m_dampening; + }; + + struct ocean_quad { + math::vector2 m_min; + math::vector2 m_max; + uint32_t m_alpha; + char _0x000C[0x8]; + float m_height; + char _0x0024[0x4]; + }; + + struct ocean_quad_info { + uint64_t m_quad_pool; + short m_quad_count; + }; + + struct ocean_quads { + ocean_quad_info* m_ocean; + ocean_quad_info* m_wave; + ocean_quad_info* m_calming; + }; + + struct water_tune { + int m_water_color; + float m_ripple_scale; + float m_ocean_foam_scale; + float m_specular_falloff; + float m_fog_pierce_intensity; + float m_refraction_blend; + float m_refraction_exponent; + float m_water_cycle_depth; + float m_water_cycle_fade; + float m_water_lightning_depth; + float m_water_lightning_fade; + float m_deep_water_mod_depth; + float m_deep_water_mod_fade; + float m_god_rays_lerp_start; + float m_god_rays_lerp_end; + float m_disturb_foam_scale; + math::vector2 m_fog_min; + math::vector2 m_fog_max; + }; + + struct base_model_info { + char _0x0000[24]; + uint32_t m_model; + }; + + struct building { + char _0x0000[32]; + base_model_info* m_model_info; + uint8_t m_type; // 1 + char _0x0029[55]; + math::matrix m_matrix; + char _0x00A0[16]; + int m_lod; + }; + + struct vfx_liquid { + float m_duration_foot; + float m_duration_wheel_in; + float m_life_foot; + float m_life_wheel; + char _0x0010[0x48]; + uint8_t r; + uint8_t g; + uint8_t b; + uint8_t a; + char _0x005C[0x4]; + }; + + struct vfx_wheel { + float m_slip_min; //0x0004 + float m_slip_max; //0x0008 + float m_pressure_min; //0x000C + float m_pressure_max; //0x0010 + int m_type1; //0x0014 + BOOL m_unk1; //0x0018 + int m_type2; //0x001c + BOOL m_unk2; //0x0010 + int m_type3; //0x0024 + BOOL m_unk3; //0x0028 + int m_type4; //0x002c + BOOL m_unk4; //0x0030 + uint8_t m_r; //0x0034 + uint8_t m_g; //0x0035 + uint8_t m_b; //0x0036 + char _0x0037[1]; //0x0037 + float m_friction_thresh_min; //0x0038 + float m_friction_thresh_max; //0x003C + uint32_t m_friction_fx1; //0x0040 + uint32_t m_friction_fx2; //0x0044 + uint32_t m_friction_fx3; //0x0048 + float m_disp_thresh_min; //0x004C + float m_disp_thresh_max; //0x0050 + uint32_t m_displacement_fx1; //0x0054 + uint32_t m_displacement_fx2; //0x0058 + uint32_t m_displacement_fx3; //0x005C + uint32_t m_displacement_fx_lod; //0x0060 + float m_burn_friction_evo_min; //0x0064 + float m_burn_friction_evo_max; //0x0068 + float m_burn_temp_evo_min; //0x006C + float m_burn_temp_evo_max; //0x0070 + uint32_t m_burnout_fx1; //0x0074 + uint32_t m_burnout_fx2; //0x0078 + uint32_t m_burnout_fx3; //0x007C + bool m_lights_on; //0x0080 + uint8_t m_lights_col_min_r; //0x0081 + uint8_t m_lights_col_min_g; //0x0082 + uint8_t m_lights_col_min_b; //0x0083 + uint8_t m_lights_col_max_r; //0x0084 + uint8_t m_lights_col_max_g; //0x0085 + uint8_t m_lights_col_max_b; //0x0086 + char _0x0087[1]; //0x0087 + float m_lights_intensity_min; //0x0088 + float m_lights_intensity_max; //0x008C + float m_lights_range_min; //0x0090 + float m_lights_range_max; //0x0094 + float m_lights_falloff_min; //0x0098 + float m_lights_falloff_max; //0x009C + }; + + struct vehicle_model_info { + char _0x0000[0x298]; + char m_model_name[0xC]; + char m_manufacturer_name[0xC]; + uint16_t* m_mod_kits; + uint16_t m_mod_kit_count; + }; + + template + struct replay_interface_list { + T* m_entity; + char _0x000C[0x8]; + }; + + struct replay_interface { + void* m_game; + replay_interface_camera* m_camera; + replay_interface_veh* m_veh; + replay_interface_ped* m_ped; + replay_interface_pickup* m_pickup; + replay_interface_object* m_object; + }; + + struct replay_interface_camera { + char _0x0000[256]; + replay_interface_list* m_camera_list; + int m_max; + char _0x010C[4]; + int m_count; + + void for_each(std::function callback); + }; + + struct replay_interface_veh { + char _0x0000[384]; + replay_interface_list* m_veh_list; + int m_max; + char _0x018C[4]; + int m_count; + + void for_each(std::function callback); + }; + + struct replay_interface_ped { + char _0x0000[256]; + replay_interface_list* m_ped_list; + int m_max; + char _0x010C[4]; + int m_count; + + void for_each(std::function callback); + }; + + struct replay_interface_pickup { + char _0x0000[256]; + replay_interface_list* m_pickup_list; + int m_max; + char _0x010C[4]; + int m_count; + + void for_each(std::function callback); + }; + + struct replay_interface_object { + char _0x0000[344]; + replay_interface_list* m_object_list; + int m_max; + char _0x0164[4]; + int m_count; + + void for_each(std::function callback); + }; + + struct drop_shader { + uint32_t m_name_hash; + char _1[4]; + float m_velocity; + float m_gravity; + char _2[16]; + math::vector4 m_box_centre_offset; + math::vector4 m_box_size; + math::vector4 m_life_min_max; + math::vector4 m_velocity_min; + math::vector4 m_velocity_max; + char _3[32]; + grc_texture_dx11* m_texture_1; + grc_texture_dx11* m_texture_2; + math::vector4 m_texture_rows_cols_start_end; + math::vector4 m_texture_anim_rate_scale_over_life_start_2_end_2; + math::vector4 m_size_min_max; + math::vector4 m_color; + math::vector2 m_fade_in_out; + math::vector2 m_fade_near_far; + math::vector4 m_fade_grd_off_lo_hi; + math::vector4 m_rot_speed_min_max; + math::vector4 m_directional_z_offset_min_max; + math::vector4 m_dir_vel_add_cam_speed_min_max_mult; + float m_edge_softness; + char _4[8]; + float m_particle_color_percentage; + float m_background_distortion_visibility_percentage; + float m_background_distortion_alpha_booster; + float m_background_distortion_amount; + uint32_t m_background_distortion_blur_level; + float m_local_lights_multiplier; + char _5[12]; + }; +} \ No newline at end of file diff --git a/GTAV/src/rage/types/global_types.h b/GTAV/src/rage/types/global_types.h new file mode 100644 index 0000000..396e478 --- /dev/null +++ b/GTAV/src/rage/types/global_types.h @@ -0,0 +1,105 @@ +#pragma once +#include "stdafx.h" + +namespace rage::global { + constexpr int host_drop_kick = 1622591; // 1 + constexpr int apartment_teleport = 1249026189; // 1 + constexpr int island_teleport = -1479371259; // 1 + constexpr int block_passive = 1472357458; // 1 + constexpr int give_off_the_radar = -397188359; // 1 + constexpr int give_cops_turn_blind_eye = -151720011; // 1 + constexpr int remove_wanted_level = 1187364773; // 1 + constexpr int invite = 1537221257; // 1 + constexpr int network_bail = 2092565704; // 1 + constexpr int kick_from_ceo = -316948135; // 1 + constexpr int ban_from_ceo = 1355230914; // 1 + constexpr int set_vehicle_can_be_locked_on = -194543830; // 1 + constexpr int set_weather = 315658550; // 1 + constexpr int message_handler = 153488394; // 1 + constexpr int destroyed_personal_vehicle = 299217086; // 1 + constexpr int kick_from_vehicle = -1005623606; // 1 + constexpr int force_into_mission = 15745542; // 1 + constexpr int transition_session = 1312860; // 1 + constexpr int transition_session_flag = 1312443; // 1 + + // NEW + constexpr int _155_give_off_the_radar_global = 1630816; + constexpr int _155_give_off_the_radar_global_size = 597; + constexpr int _155_give_off_the_radar_global_index = 508; + + constexpr int _155_sc_crash_1 = -988842806; + constexpr int _155_sc_crash_2 = -2043109205; + constexpr int _155_sc_crash_3 = 1926582096; + + constexpr int _155_force_into_moc_mission = -1147284669; + constexpr int _155_screen_flicker = 1376436345; + constexpr int _155_transaction_error = -2041535807; + constexpr int _155_spawn_dlc_in_sp = 4270934; + + constexpr int _155_disable_phone_type = 19798; + constexpr int _155_disable_phone_bool_1 = 19984; + constexpr int _155_disable_phone_phone_pos_set = 19726; + constexpr int _155_disable_phone_phone_pos_get = 19735; + constexpr int _155_disable_phone_bitset_1 = 7669; + constexpr int _155_disable_phone_bitset_2 = 7668; + constexpr int _155_disable_phone_unk_1 = 21125; + + constexpr int _155_outfit_editor_base = 2097152; + constexpr int _155_outfit_editor_base_offset = 675; + constexpr int _155_outfit_editor_offset_1 = 1879; // from 1878 + constexpr int _155_outfit_editor_offset_2 = 2090; // from 2089 + constexpr int _155_outfit_editor_offset_3 = 1331; // from 1330 + constexpr int _155_outfit_editor_offset_4 = 1605; // from 1604 + constexpr int _155_outfit_editor_offset_5 = 2301; // from 2300 + constexpr int _155_outfit_editor_offset_6 = 2455; // from 2454 + + constexpr int _155_outfit_editor_base2 = 2533708; // from 2530205 + constexpr int _155_outfit_editor_base2_offset = 9241; // from 9146 + + constexpr int _155_convert_rp_to_level = 293361; // from 293361 + constexpr int _155_get_player_blip_handle = 2416162; // from 2416085 + + constexpr int _155_player_stats_struct = 1590908; // from 1590682 + constexpr int _155_player_stats_size = 874; // from 883 + constexpr int _155_player_stats_start = 205; // from 211 + + + constexpr int _155_garage_base = 1323703; // from 1323678 + constexpr int _155_garage_size = 142; // from 141 + constexpr int _155_tunables = 262145; + constexpr int _155_property_int_offset1 = 14397; + constexpr int _155_property_int_offset2 = 14398; + constexpr int _155_property_int_offset3 = 14396; + constexpr int _155_property_int_offset4 = 14399; + constexpr int _155_property_int_offset5 = 14401; + constexpr int _155_property_int_offset6 = 14400; + constexpr int _155_property_int_offset7 = 18848; + constexpr int _155_property_int_offset8 = 18850; + constexpr int _155_property_int_offset9 = 18854; + constexpr int _155_property_int_offset10 = 18851; + constexpr int _155_property_int_offset11 = 18858; + constexpr int _155_property_int_offset12 = 18856; + constexpr int _155_property_int_offset13 = 18861; + constexpr int _155_property_int_offset14 = 20806; + constexpr int _155_property_int_offset15 = 20807; + constexpr int _155_property_int_offset_16 = 267; // from 274 + constexpr int _155_property_int_offset_16_1 = 353; // from 351 + constexpr int _155_property_int_offset_16_2 = 266; // from 264 + constexpr int _155_property_int_offset_16_3 = 273; // from 271 + constexpr int _155_property_int_offset_17 = 10335; // from 10165 + + constexpr int _155_property_base2 = 2426865; // from 2426097 + constexpr int _155_property_base2_size = 449; // from 443 + constexpr int _155_property_base2_flag = 199; + constexpr int _155_property_base2_offset1 = 319; // from 314 + constexpr int _155_property_base3 = 1590744; // from 1590518 + constexpr int _155_property_base4 = 1049961; // from 1049924 + constexpr int _155_property_base4_size = 1951; + constexpr int _155_property_base4_flag = 33; + constexpr int _155_property_base5 = 1678528; // from 1672965 + + constexpr int _155_customs_base = 2544210; // from 2540612 + constexpr int _155_customs_base2 = 102139; // from 101708 + + constexpr int _155_time_base = 2441237; // from 2440277 +} \ No newline at end of file diff --git a/GTAV/src/rage/types/invoker_types.cpp b/GTAV/src/rage/types/invoker_types.cpp new file mode 100644 index 0000000..767d415 --- /dev/null +++ b/GTAV/src/rage/types/invoker_types.cpp @@ -0,0 +1,9 @@ +#include "invoker_types.h" +#include "util/caller.h" +#include "global/vars.h" + +namespace rage::invoker { + uint64_t native_registration::get_handler(uint64_t hash) { + return caller::call(global::vars::g_translate_native, global::vars::g_native_registration, hash); + } +} \ No newline at end of file diff --git a/GTAV/src/rage/types/invoker_types.h b/GTAV/src/rage/types/invoker_types.h new file mode 100644 index 0000000..23f2dbb --- /dev/null +++ b/GTAV/src/rage/types/invoker_types.h @@ -0,0 +1,49 @@ +#pragma once +#include "stdafx.h" + +namespace rage::invoker { + struct native_registration { + uint64_t m_next_registration1; + uint64_t m_next_registration2; + uint64_t m_handlers[7]; + uint32_t m_num_entries1; + uint32_t m_num_entries2; + uint64_t m_hashes; + + /*__declspec(noinline) native_registration* get_next_registration() { + uintptr_t result; + auto v5 = reinterpret_cast(&m_next_registration1); + auto v12 = 2i64; + auto v13 = v5 ^ m_next_registration2; + auto v14 = (char*)&result - v5; + do { + *(DWORD*)&v14[v5] = v13 ^ *(DWORD*)v5; + v5 += 4i64; + --v12; + } while (v12); + + return reinterpret_cast(result); + } + + __declspec(noinline) uint32_t get_num_entries() { + return (uint32_t)(((uintptr_t)&m_num_entries1) ^ m_num_entries1 ^ m_num_entries2); + } + + __declspec(noinline) uint64_t get_hash(uint32_t index) { + auto naddr = 16 * index + reinterpret_cast(&m_next_registration1) + 0x54; + auto v8 = 2i64; + uint64_t result; + auto v11 = (char*)&result - naddr; + auto v10 = naddr ^ *(DWORD*)(naddr + 8); + do { + *(DWORD*)&v11[naddr] = v10 ^ *(DWORD*)(naddr); + naddr += 4i64; + --v8; + } while (v8); + + return result; + }*/ + + static uint64_t get_handler(uint64_t hash); + }; +} \ No newline at end of file diff --git a/GTAV/src/rage/types/network_types.cpp b/GTAV/src/rage/types/network_types.cpp new file mode 100644 index 0000000..7f292f7 --- /dev/null +++ b/GTAV/src/rage/types/network_types.cpp @@ -0,0 +1,8 @@ +#include "network_types.h" +#include "global/vars.h" + +namespace rage::network { + void network_base_config::set_network_session_was_invited(bool invited) { + *(bool*)((uint64_t)this + 0x86A5) = invited; // updated + } +} \ No newline at end of file diff --git a/GTAV/src/rage/types/network_types.h b/GTAV/src/rage/types/network_types.h new file mode 100644 index 0000000..3c9b0e9 --- /dev/null +++ b/GTAV/src/rage/types/network_types.h @@ -0,0 +1,473 @@ +#pragma once +#include "stdafx.h" +#include "util/math.h" +#include "base_types.h" +#include "bit_buffer.h" + +#pragma pack(push) +#pragma pack(1) +namespace rage::network { + struct player_info; + struct camera_manager_angles; + struct camera_angles; + struct player_angles; + struct net_object; + + struct read_stats_by_gamer { + uint32_t m_bank_balance; + uint32_t m_wallet_balance; + uint32_t m_rank; + int m_kills; + int m_deaths; + }; + + struct stat_response_item { + int m_padding; + uint8_t m_type; // 0 = int, 3 = float + + union { + int m_int; + uint32_t m_uint; + float m_float; + } value; + }; + + struct stat_response { + stat_response_item* m_stats; + }; + + struct attach_data_node { + char _0x0000[0xC0]; + bool m_attached; + bool m_unk; + uint16_t m_network_id; + }; + + struct transaction { + int m_id; + int m_variation; + int m_price; + int m_multiplier; + int m_value; + }; + + struct net_shop_transaction_basket { + char _0x0000[0x8]; + int m_transaction_id; + char _0x000C[0xC]; + int m_category; + char _0x001C[0x8]; + int m_action; + int m_target; // 4 = bank etc + char _0x002C[0xB4]; + transaction m_transactions[71]; + int m_transaction_count; + }; + + struct transaction_node { + char _0x0000[0x8]; + net_shop_transaction_basket* m_transaction; + transaction_node* m_next; + }; + + struct metric { + virtual ~metric(); + virtual int get_type(); + virtual int get_sub_type(); + virtual const char* get_name(); + virtual bool create_json(uint64_t Json); + virtual int get_size(); + virtual uint32_t get_hashed_name(); + }; + + struct net_shop_queue { + char _0x0000[32]; + void* m_first; + void* m_last; + char _0x0030[9]; + bool m_is_busy1; + char _0x003A[14]; + bool m_is_busy2; + char _0x0049[7]; + bool m_is_busy3; + }; + + struct rockstar_identifier { + uint64_t m_rockstar_id; + uint32_t m_type; + uint32_t m_sub_type; + }; + + struct gs_session { + uint64_t m_peer_token; + uint64_t m_peer_token2; + uint64_t m_peer_token3; + rockstar_identifier m_rockstar_id; + char _0x0028[0x48]; + + uint32_t get_local_ip() { + return *(uint32_t*)((uint64_t)this + 0x64); + } + }; + + struct join_request { + uint32_t m_flags; + char _0x0004[0x4]; + uint64_t m_net_game_player_data_msg; + uint32_t m_game_version; // 0x10 + char _0x0014[0x4]; + int m_ros_flags; // 0x18 + char m_yeet[0x300]; + }; + + struct player_gamer_data_node { + char _0x0000[0xC8]; + int m_crew_id; + char _0x00cc[0x12]; + char m_crew_name[0x19]; + char m_crew_abbr[0x5]; + char m_crew_motto[0x4C]; + char m_crew_rank[0x18]; + }; + + struct global_msg_context { + char m_message[0x100]; + uint64_t m_sender_chat_token; + bool m_flag0_is_neg1; + }; + + struct player_peer { + uint8_t get_bitset() { + return *(uint8_t*)((uint64_t)this + 0x28); + } + + uint8_t get_flag() { + return *(uint8_t*)((uint64_t)this + 0x18); + } + + int get_player_key() { + return *(int*)((uint64_t)this); + } + + int get_secondary_key() { + return *(int*)((uint64_t)this + 0x4); + } + + uint32_t get_ip() { + return *(uint32_t*)((uint64_t)this + 0xC); + } + }; + + struct global_chat_raw { + char _0x0000[0x180]; + int m_flag0; + char _0x0184[0x1D24]; + player_peer* m_player_peers[0x20]; + int m_player_count; + char _0x1fac[0xC]; + uint64_t m_manager_ptr; + int m_flag1; + int m_flag2; + char _0x1fc8[0x30]; + uint8_t m_bitset; + }; + + struct rs_info { + char m_scs_ticket[0x100]; + char _0x0100[0x100]; + char m_session_ticket[0x90]; + uint64_t m_peer; + char _0x0298[0xA7]; + char m_email[0x50]; + char _0x038f[0x20]; + char m_name[0x20]; + char _0x03cf[0x29]; + uint32_t m_rockstar_id; + char _0x03FC[0x1DC]; + uint8_t m_session_key[0x10]; + }; + + struct network_handle { + int m_handle; + char _0x0[48]; + }; + + struct net_msg_identifier { + uint64_t m_rockstar_id; + uint8_t m_type; + char _0x0009[0xB]; + }; + + struct net_msg_text_message { + char m_message[0x100]; + net_msg_identifier m_sender; + }; + + struct network_gamer_cmd { + char _0x0000[0x10]; + uint64_t m_rockstar_id; // 0x10 + char _0x0018[0x3C]; + uint32_t m_ip; // 0x54 + char _0x0058[0x10]; + uint64_t m_host_token; // 0x68 + uint64_t m_chat_token; // 0x70 + net_msg_identifier m_identifier; // 0x78 + char m_name[0x14]; // 0x8C + char _0x00A0[0x8]; + uint32_t m_msg_ip; // 0xA8 + + void set_ip(int index, uint8_t ip) { + uint8_t* val = (uint8_t*)&m_ip; + val[index] = ip; + + val = (uint8_t*)&m_msg_ip; + val[index] = ip; + } + }; + + struct game_camera_angles { + camera_manager_angles* m_camera_manager_angles; + char _0x0008[56]; + }; + + struct camera_manager_angles { + camera_angles* m_camera_angles; + }; + + struct camera_angles { + char _0x0000[0x3C0]; + player_angles* m_fps_player_angles; + char _0x03C8[0x10]; + uint64_t m_ped; + }; + + struct player_angles { + char _0x0000[0x40]; + math::vector3_ m_view_angles; + char _0x0004C[0x14]; + math::vector3_ m_crosshair_location; + }; + + struct player_info { + char _0x0000[0x20]; + uint64_t m_host_token2; + uint64_t m_rockstar_id; + char _0x0030[0x3C]; + uint32_t m_external_ip; + uint32_t m_external_port; + uint32_t m_internal_ip; + uint32_t m_internal_port; + char _0x007C[0x4]; + uint64_t m_host_token; + uint64_t m_chat_token; + net_msg_identifier m_identifier; + char m_name[0x14]; // A4 + char _0x00B8[0xB4]; + float m_swim_speed; // 16C + float m_run_speed; // 170 + char _0x0174[0xA4]; + uint32_t m_frame_flags; // 218 + char _0x021C[0xDD4]; + char _new_padding[0x10]; + uint32_t m_aim_flag; // FF0 + + bool is_free_aiming() { + return m_aim_flag >> 6 & 1; + } + + void set_ip(int Index, uint8_t IP) { + uint8_t* Val = (uint8_t*)&m_external_ip; + Val[Index] = IP; + } + + void set_run_speed(float Speed) { + *(float*)((uint64_t)this + 0xCF0) = Speed; + } + }; + + struct net_game_player { + char _0x0000[0x21]; + int8_t m_id; + char _0x0022[0x7E]; + player_info* m_player_info; + char _0x00b8[0xF1]; + bool m_is_rockstar_developer; // 1A9 + bool m_is_rockstar_qa; // 1AA + bool m_is_cheater; // 1AB + char _0x01AB[0x94]; + uint8_t m_report_bits; // 240 + char _0x0241[0x3]; + int* m_report_reasons; // 244 + char _0x024C[0x48]; + int m_max_report_reasons; // 294 + + const char* get_crew_motto() { + return (const char*)((uint64_t)this + 0x104); + } + + const char* get_crew_name() { + return (const char*)((uint64_t)this + 0xE6); + } + + const char* get_crew_tag() { + return (const char*)((uint64_t)this + 0xFF); + } + + const char* get_crew_rank() { + return (const char*)((uint64_t)this + 0x150); + } + + int get_crew_id() { + return *(int*)((uint64_t)this + 0x148); + } + }; + + struct net_object { + uint64_t m_vtable; + eNetObjectTypes m_type; + int16_t m_network_id; + char _0x000C[0x14]; + int8_t m_player_sync_intervals[0x20]; + char _0x0040[0x9]; + uint8_t m_owner; // 0x49 + char _0x004A[0x6]; + uint64_t m_entity; + char _0x0058[0x4C0]; + int16_t m_spectating_network_id; + }; + + struct data_node_common_operations { + virtual ~data_node_common_operations(); + + uint64_t m_data; + }; + + struct data_node { + virtual ~data_node() = 0; + virtual bool is_data_node() = 0; + virtual bool is_parent_node() = 0; + + data_node* m_next; //0x0008 + data_node* m_previous; //0x0010 + uint64_t m_sync_tree; //0x0018 + data_node* m_parent; //0x0020 + uint32_t m_flag; //0x0028 + uint32_t m_flag2; //0x002C + uint32_t m_flag3; //0x0030 + char _0x0034[0x4]; //0x0034 + data_node* m_first_child; //0x0038 + data_node* m_last_child; //0x0040 + uint64_t m_unk_data; //0x0048 + uint32_t m_child_count; //0x0050 + char _0x0054[0x54]; + data_node_common_operations* m_data_node_common_operations; // 0xA8 + + bool is_writing() { + return *(bool*)((uint64_t)this + 0x40); + } + }; + + struct friends { + char _0x0000[128]; //0x0000 + char m_name[32]; //0x0080 + char _0x00A0[24]; //0x00A0 + uint64_t m_rockstar_id; //0x00B8 + char _0x00C0[4]; //0x00C0 + int m_state; //0x00C4 + char _0x00C8[312]; //0x00C8 + }; + + struct event_added_gamer { + char _0x0000[0x6C]; + uint32_t m_external_ip; // 0x006C + char _0x0070[0x20]; // 0x0070 + uint64_t m_rockstar_id; // 0x0090 + char _0x00098[0xC]; // 0x0098 + char m_name[0x14]; // 0x00A4 + }; + + struct blacklisted_player { + net_msg_identifier m_player; + uint32_t m_timestamp; + blacklisted_player* m_next; + blacklisted_player* m_last; + }; + + struct network_base_config { + char _0x0000[0x20]; + uint64_t m_unk_ptr; + uint64_t m_unk_ptr2; + char _0x0030[0x198F8]; + net_msg_identifier m_last_blacklisted; // 0x19928 + uint32_t m_last_blacklisted_timestamp; + char _0x184b0[0x280]; + blacklisted_player* m_first_blacklisted_player; + blacklisted_player* m_last_blacklisted_player; + + void set_network_session_was_invited(bool invited); + + gs_session* get_gs_session() { + return (gs_session*)((uint64_t)this + 0x178); + } + + uint64_t get_net_msg_manager() { + return *(uint64_t*)((uint64_t)this + 0x48); + } + }; + + struct kick_peer { + uint64_t m_peer; + char _0x0008[5]; + bool m_kicked; + char _0x000E[2]; + }; + + struct list_kick_peers { + kick_peer m_peers[0x20]; + }; + + struct sync_tree { + void* m_vtable; + net_object* m_object; + data_node* m_parent_node; + char _0x0018[0x8]; + int m_data_node_count; + char _0x0024[0xC]; + data_node** m_nodes; + }; + + struct game_invite { + char _0x0000[8]; //0x0000 + gs_session gssession_start; //0x0008 + uint64_t h; //0x0058 + uint64_t h2; //0x0060 + char s[125]; //0x0068 + char n[17]; //0x00B5 + char _0x00C6[2]; //0x00C6 + uint32_t gm; //0x00C8 + char c[23]; //0x00CC + char _0x00E3[5]; //0x00E3 + uint64_t cc; //0x00E8 + uint64_t cc2; + char mid[30]; //0x00F8 + char _0x0116[2]; //0x0116 + uint32_t if_; //0x0118 + uint32_t it; //0x011C + uint32_t l; //0x0120 + uint32_t p; //0x0124 + uint32_t f; //0x0128 + uint32_t cr; //0x012C + uint32_t u; //0x0130 + uint32_t d; //0x0134 + uint32_t jq; //0x0138 + }; + + struct chat_config { + char _0x0000[0x10]; + uint32_t m_override_gxt; // only works when it's a team message + char _0x0014[0x134]; + uint32_t m_chat_color; + bool m_using_chat_color; + }; +} +#pragma pack(pop) \ No newline at end of file diff --git a/GTAV/src/rage/types/script_types.h b/GTAV/src/rage/types/script_types.h new file mode 100644 index 0000000..7076492 --- /dev/null +++ b/GTAV/src/rage/types/script_types.h @@ -0,0 +1,125 @@ +#pragma once +#include "stdafx.h" +#include "base_types.h" + +namespace rage::script { + struct script_header { + char _0x0000[0x10]; + unsigned char** m_code_blocks_offset; + char _0x0018[0x4]; + int m_code_length; + char _0x0020[0x4]; + int m_local_count; + char _0x0028[0x4]; + int m_native_count; + uint64_t* m_local_offset; + char _0x0038[0x8]; + uint64_t* m_natives; + char _0x0048[0x10]; + uint32_t m_name_hash; + char _0x005C[0x4]; + const char* m_name; + char** m_strings_offset; + int m_string_size; + char _0x0074[0xC]; + }; + + struct script_table_item { + script_header* m_header; + char _0x0008[0x4]; + uint32_t m_script_hash; + }; + + struct script_table { + script_table_item* m_table; + char _0x0008[0x10]; + int m_count; + + script_table_item* find(uint32_t script_hash) { + if (m_table == nullptr) { + return nullptr; + } + + for (int i = 0; i < m_count; i++) { + if (m_table[i].m_script_hash == script_hash) { + return &m_table[i]; + } + } + + return nullptr; + } + }; + + struct game_script_handler; + struct game_script_handler_network_component; + + struct script_thread_context { + uint32_t m_thread_id; + uint32_t m_script_hash; + eThreadState m_state; + uint32_t m_instruction_pointer; + uint32_t m_frame_pointer; + uint32_t m_stack_pointer; + float m_timer_a; + float m_timer_b; + float m_timer_c; + char _0x0024[0x2C]; + uint32_t m_stack_size; + char _0x0054[0x54]; + }; + + struct script_thread { + uint64_t m_vtable; + script_thread_context m_context; + void* m_stack; + char _0x00B8[0x10]; + const char* m_exit_message; + char m_name[0x40]; + game_script_handler* m_handler; + game_script_handler_network_component* m_net_component; + }; + + struct gta_thread : script_thread { + uint32_t m_script_hash; + char _0x0124[0x14]; + uint32_t m_instance_id; + char _0x013C[0x4]; + uint8_t m_flag; + bool m_safe_for_network; + char _0x0142[0x2]; + bool m_is_minigame; + bool m_is_paused; + char _0x0146[0x1]; + bool m_can_be_paused; + bool m_can_remove_blips; + char _0x0149[0xF]; + }; + + struct game_script_id { + char _0x0000[0x8]; + uint32_t m_hash; + char m_name[0x20]; + char _0x002C[0x4]; + uint32_t m_timestamp; + uint32_t m_script_id; + uint32_t m_instance_id; + uint32_t m_instance_hash; + char _0x0040[0x10]; + }; + + struct game_script_handler_network_component { + uint64_t m_vtable; + game_script_handler* m_component; + int m_state; + int m_pending_player_join_bitset; + }; + + struct game_script_handler { + char _0x0000[0x18]; + gta_thread* m_thread; + char _0x0020[0x28]; + game_script_handler_network_component* m_net_component; + char _0x0050[0x10]; + game_script_id m_script_id; + }; +} \ No newline at end of file diff --git a/GTAV/src/stdafx.h b/GTAV/src/stdafx.h new file mode 100644 index 0000000..08b47b7 --- /dev/null +++ b/GTAV/src/stdafx.h @@ -0,0 +1,102 @@ +#pragma once +#pragma warning(disable: 4996) +#pragma warning(disable: 4309) + +#define WIN32_LEAN_AND_MEAN + +#include +#include +#include +#include +#include +#include +#pragma comment(lib, "Winmm.lib") + +#include "../Dependencies/XOR/XOR.h" +#include "../Dependencies/VMProtectSDK.h" + +#pragma comment(lib, "VMProtectSDK64.lib") +#pragma comment(lib, "libMinHook.x64.lib") + +#undef min +#undef max + +#define VERSION 34 +// #define DEV_MODE +// #define TESTER_MODE +#define RELEASE_MODE + +#ifdef DEV_MODE +#undef RELEASE_MODE +#undef TESTER_MODE +#define VERSION_TYPE "DEV" +#endif + +#ifdef TESTER_MODE +#undef DEV_MODE +#undef RELEASE_MODE +#define VERSION_TYPE "TESTER" +#endif + +#ifdef RELEASE_MODE +#undef DEV_MODE +#undef TESTER_MODE +#define VERSION_TYPE "" +#endif + +#define TRANSLATE(name) name.get().c_str() + +template +constexpr int NUMOF(T(&)[N]) { return N; } + +template +inline bool is_valid_ptr(T ptr) { + uint64_t address = (uint64_t)ptr; + if (address < 0x5000) return false; + if ((address & 0xFFFFFFFF) == 0xFFFFFFFF) return false; + if ((address & 0xFFFFFFFF) <= 0xFF) return false; + + if (*(uint8_t*)((uint64_t)&address + 6) != 0 || *(uint8_t*)((uint64_t)&address + 7) != 0) return false; + + return true; +} + +#define is_valid_vtable(address) \ + [=]() -> bool { \ + if (!is_valid_ptr(address)) return false; \ + return address > global::vars::g_game_address.first && address < (global::vars::g_game_address.first + global::vars::g_game_address.second); \ + }() + +constexpr char CharacterMap[] = { + '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', + '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', + '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', '_', + '_', '_', '_', '_', '_', '_', '_', '.', '/', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '_', '_', '_', '_', '_', '_', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', +}; + +constexpr static __forceinline uint32_t JenkinsHash32(const char* String, uint32_t CurrentHashValue = NULL) { + while (*String != NULL) { + CurrentHashValue += CharacterMap[*(String++)]; + CurrentHashValue += (CurrentHashValue << 10); + CurrentHashValue ^= (CurrentHashValue >> 6); + } + + CurrentHashValue += (CurrentHashValue << 3); + CurrentHashValue ^= (CurrentHashValue >> 11); + CurrentHashValue += (CurrentHashValue << 15); + + return CurrentHashValue; +} + +#define joaat(String) \ + []( ) -> auto { \ + constexpr auto HashValue = JenkinsHash32( String ); \ + \ + return HashValue; \ + }( ) \ No newline at end of file diff --git a/GTAV/src/util/caller.h b/GTAV/src/util/caller.h new file mode 100644 index 0000000..fa5fa50 --- /dev/null +++ b/GTAV/src/util/caller.h @@ -0,0 +1,158 @@ +#pragma once +#include "stdafx.h" + +class caller { +public: + template + static T call(uint64_t address) { return ((T(*)())address)(); } + + template + static T call(uint64_t address, P1 p1) { return ((T(*)(P1))address)(p1); } + + template + static T call(uint64_t address, P1 p1, P2 p2) { return ((T(*)(P1, P2))address)(p1, p2); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3) { return ((T(*)(P1, P2, P3))address)(p1, p2, p3); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4) { return ((T(*)(P1, P2, P3, P4))address)(p1, p2, p3, p4); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { return ((T(*)(P1, P2, P3, P4, P5))address)(p1, p2, p3, p4, p5); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { return ((T(*)(P1, P2, P3, P4, P5, P6))address)(p1, p2, p3, p4, p5, p6); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7))address)(p1, p2, p3, p4, p5, p6, p7); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8))address)(p1, p2, p3, p4, p5, p6, p7, p8); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41, P42 p42) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41, P42 p42, P43 p43) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41, P42 p42, P43 p43, P44 p44) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43, p44); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41, P42 p42, P43 p43, P44 p44, P45 p45) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43, p44, p45); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41, P42 p42, P43 p43, P44 p44, P45 p45, P46 p46) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43, p44, p45, p46); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41, P42 p42, P43 p43, P44 p44, P45 p45, P46 p46, P47 p47) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43, p44, p45, p46, p47); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41, P42 p42, P43 p43, P44 p44, P45 p45, P46 p46, P47 p47, P48 p48) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43, p44, p45, p46, p47, p48); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41, P42 p42, P43 p43, P44 p44, P45 p45, P46 p46, P47 p47, P48 p48, P49 p49) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43, p44, p45, p46, p47, p48, p49); } + + template + static T call(uint64_t address, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12, P13 p13, P14 p14, P15 p15, P16 p16, P17 p17, P18 p18, P19 p19, P20 p20, P21 p21, P22 p22, P23 p23, P24 p24, P25 p25, P26 p26, P27 p27, P28 p28, P29 p29, P30 p30, P31 p31, P32 p32, P33 p33, P34 p34, P35 p35, P36 p36, P37 p37, P38 p38, P39 p39, P40 p40, P41 p41, P42 p42, P43 p43, P44 p44, P45 p45, P46 p46, P47 p47, P48 p48, P49 p49, P50 p50) { return ((T(*)(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50))address)(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22, p23, p24, p25, p26, p27, p28, p29, p30, p31, p32, p33, p34, p35, p36, p37, p38, p39, p40, p41, p42, p43, p44, p45, p46, p47, p48, p49, p50); } +}; diff --git a/GTAV/src/util/config.cpp b/GTAV/src/util/config.cpp new file mode 100644 index 0000000..b131ceb --- /dev/null +++ b/GTAV/src/util/config.cpp @@ -0,0 +1,306 @@ +#include "config.h" +#include "json.h" +#include "dirs.h" +#include +#include + +namespace util::config { + nlohmann::json read_config_contents() { + nlohmann::json json; + + if (std::filesystem::exists(dirs::get_path(config))) { + std::ifstream input(dirs::get_path(config)); + if (input.good()) { + input >> json; + input.close(); + } + } + + return json; + } + + void write_config_contents(nlohmann::json json) { + std::ofstream Output(dirs::get_path(config)); + if (Output.good()) { + Output << json.dump(4); + Output.close(); + } + } + + template + void build_stack(nlohmann::json& contents, std::stack menu_stack, std::string key, T value) { + std::vector names; + while (!menu_stack.empty()) { + names.push_back(menu_stack.top()); + menu_stack.pop(); + } + + switch (names.size()) { + case 1: + contents[names.at(0)][key] = value; + break; + case 2: + contents[names.at(0)][names.at(1)][key] = value; + break; + case 3: + contents[names.at(0)][names.at(1)][names.at(2)][key] = value; + break; + case 4: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][key] = value; + break; + case 5: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][key] = value; + break; + case 6: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][key] = value; + break; + case 7: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][key] = value; + break; + case 8: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][key] = value; + break; + case 9: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][key] = value; + break; + case 10: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][key] = value; + break; + case 11: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][names.at(10)][key] = value; + break; + case 12: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][names.at(10)][names.at(11)][key] = value; + break; + case 13: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][names.at(10)][names.at(11)][names.at(12)][key] = value; + break; + case 14: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][names.at(10)][names.at(11)][names.at(12)][names.at(13)][key] = value; + break; + case 15: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][names.at(10)][names.at(11)][names.at(12)][names.at(13)][names.at(14)][key] = value; + break; + case 16: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][names.at(10)][names.at(11)][names.at(12)][names.at(13)][names.at(14)][names.at(15)][key] = value; + break; + case 17: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][names.at(10)][names.at(11)][names.at(12)][names.at(13)][names.at(14)][names.at(15)][names.at(16)][key] = value; + break; + case 18: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][names.at(10)][names.at(11)][names.at(12)][names.at(13)][names.at(14)][names.at(15)][names.at(16)][names.at(17)][key] = value; + break; + case 19: + contents[names.at(0)][names.at(1)][names.at(2)][names.at(3)][names.at(4)][names.at(5)][names.at(6)][names.at(7)][names.at(8)][names.at(9)][names.at(10)][names.at(11)][names.at(12)][names.at(13)][names.at(14)][names.at(15)][names.at(16)][names.at(17)][names.at(18)][key] = value; + break; + } + } + + nlohmann::json get_stack_value(std::stack menu_stack, std::string key) { + nlohmann::json contents = read_config_contents(); + if (!contents.empty()) { + bool error = false; + while (!menu_stack.empty()) { + contents = contents[menu_stack.top()]; + if (contents.is_null()) { + error = true; + break; + } + + menu_stack.pop(); + } + + if (error) return nlohmann::json(); + + if (!contents[key].is_null()) { + return contents[key]; + } + } + + return nlohmann::json(); + } + + std::stack increase_stack(std::stack menu_stack, std::vector Stacks) { + std::vector tmp; + while (!menu_stack.empty()) { + tmp.push_back(menu_stack.top()); + menu_stack.pop(); + } + + for (std::string stack : Stacks) tmp.push_back(stack); + + std::reverse(tmp.begin(), tmp.end()); + + std::stack return_; + for (std::string stack : tmp) return_.push(stack); + return return_; + } + + std::string config::read_string(std::stack name_stack, std::string key, std::string default_string, std::vector additional_stacks) { + if (!std::filesystem::exists(dirs::get_path(config))) return default_string; + + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json json = get_stack_value(name_stack, key); + if (json.is_null() || !json.is_string()) return default_string; + return json.get(); + } + + int config::read_int(std::stack name_stack, std::string key, int default_int, std::vector additional_stacks) { + if (!std::filesystem::exists(dirs::get_path(config))) return default_int; + + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json json = get_stack_value(name_stack, key); + if (json.is_null() || !json.is_number_integer()) return default_int; + return json.get(); + } + + uint64_t config::read_uint64(std::stack name_stack, std::string key, uint64_t default_int, std::vector additional_stacks) { + if (!std::filesystem::exists(dirs::get_path(config))) return default_int; + + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json json = get_stack_value(name_stack, key); + if (json.is_null() || !json.is_number_integer()) return default_int; + return json.get(); + } + + float config::read_float(std::stack name_stack, std::string key, float default_float, std::vector additional_stacks) { + if (!std::filesystem::exists(dirs::get_path(config))) return default_float; + + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json json = get_stack_value(name_stack, key); + if (json.is_null() || !json.is_number_float()) return default_float; + return json.get(); + } + + bool config::read_bool(std::stack name_stack, std::string key, bool default_bool, std::vector additional_stacks) { + if (!std::filesystem::exists(dirs::get_path(config))) return default_bool; + + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json json = get_stack_value(name_stack, key); + if (json.is_null() || !json.is_boolean()) return default_bool; + return json.get(); + } + + bool config::read_color(std::stack name_stack, std::string key, color_rgba* color, std::vector additional_stacks) { + if (!std::filesystem::exists(dirs::get_path(config))) return false; + + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json json = get_stack_value(name_stack, key); + if (json.is_null() || !json.is_array() || json.size() != 4) return false; + + color->r = json[0].get(); + color->g = json[1].get(); + color->b = json[2].get(); + color->a = json[3].get(); + return true; + } + + bool config::read_vector(std::stack name_stack, std::string key, math::vector3_* vec, std::vector additional_stacks) { + if (!std::filesystem::exists(dirs::get_path(config))) return false; + + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json json = get_stack_value(name_stack, key); + if (json.is_null() || !json.is_array() || json.size() != 3) return false; + + vec->x = json[0].get(); + vec->y = json[1].get(); + vec->z = json[2].get(); + return true; + } + + void config::write_string(std::stack name_stack, std::string key, std::string value, std::vector additional_stacks) { + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json contents = read_config_contents(); + build_stack(contents, name_stack, key, value); + write_config_contents(contents); + } + + void config::write_int(std::stack name_stack, std::string key, int value, std::vector additional_stacks) { + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json contents = read_config_contents(); + build_stack(contents, name_stack, key, value); + write_config_contents(contents); + } + + void config::write_uint64(std::stack name_stack, std::string key, uint64_t value, std::vector additional_stacks) { + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json contents = read_config_contents(); + build_stack(contents, name_stack, key, value); + write_config_contents(contents); + } + + void config::write_float(std::stack name_stack, std::string key, float value, std::vector additional_stacks) { + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json contents = read_config_contents(); + build_stack(contents, name_stack, key, value); + write_config_contents(contents); + } + + void config::write_bool(std::stack name_stack, std::string key, bool value, std::vector additional_stacks) { + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json contents = read_config_contents(); + build_stack(contents, name_stack, key, value); + write_config_contents(contents); + } + + void config::write_color(std::stack name_stack, std::string key, color_rgba value, std::vector additional_stacks) { + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json contents = read_config_contents(); + build_stack(contents, name_stack, key, nlohmann::json::array({ value.r, value.g, value.b, value.a })); + write_config_contents(contents); + } + + void config::write_vector(std::stack name_stack, std::string key, math::vector3_ value, std::vector additional_stacks) { + if (additional_stacks.size()) { + name_stack = increase_stack(name_stack, additional_stacks); + } + + nlohmann::json contents = read_config_contents(); + build_stack(contents, name_stack, key, nlohmann::json::array({ value.x, value.y, value.z })); + write_config_contents(contents); + } + + config* get_config() { + static config instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/util/config.h b/GTAV/src/util/config.h new file mode 100644 index 0000000..deff6d2 --- /dev/null +++ b/GTAV/src/util/config.h @@ -0,0 +1,84 @@ +#pragma once +#include "stdafx.h" +#include "global/ui_vars.h" +#include +#include + +namespace util::config { + class config { + public: + std::string read_string(std::stack name_stack, std::string key, std::string default_string = "", std::vector additional_stacks = {}); + int read_int(std::stack name_stack, std::string key, int default_int = 0, std::vector additional_stacks = {}); + uint64_t read_uint64(std::stack name_stack, std::string key, uint64_t default_int = 0, std::vector additional_stacks = {}); + float read_float(std::stack name_stack, std::string key, float default_float = 0.f, std::vector additional_stacks = {}); + bool read_bool(std::stack name_stack, std::string key, bool default_bool = false, std::vector additional_stacks = {}); + bool read_color(std::stack name_stack, std::string key, color_rgba* color, std::vector additional_stacks = {}); + bool read_vector(std::stack name_stack, std::string key, math::vector3_* vec, std::vector additional_stacks = {}); + + void write_string(std::stack name_stack, std::string key, std::string value, std::vector additional_stacks = {}); + void write_int(std::stack name_stack, std::string key, int value, std::vector additional_stacks = {}); + void write_uint64(std::stack name_stack, std::string key, uint64_t value, std::vector additional_stacks = {}); + void write_float(std::stack name_stack, std::string key, float value, std::vector additional_stacks = {}); + void write_bool(std::stack name_stack, std::string key, bool value, std::vector additional_stacks = {}); + void write_color(std::stack name_stack, std::string key, color_rgba value, std::vector additional_stacks = {}); + void write_vector(std::stack name_stack, std::string key, math::vector3_ value, std::vector additional_stacks = {}); + }; + + config* get_config(); + + inline std::string read_string(std::stack name_stack, std::string key, std::string default_string = "", std::vector additional_stacks = {}) { + return get_config()->read_string(name_stack, key, default_string, additional_stacks); + } + + inline int read_int(std::stack name_stack, std::string key, int default_int = 0, std::vector additional_stacks = {}) { + return get_config()->read_int(name_stack, key, default_int, additional_stacks); + } + + inline uint64_t read_uint64(std::stack name_stack, std::string key, uint64_t default_int = 0, std::vector additional_stacks = {}) { + return get_config()->read_uint64(name_stack, key, default_int, additional_stacks); + } + + inline float read_float(std::stack name_stack, std::string key, float default_float = 0.f, std::vector additional_stacks = {}) { + return get_config()->read_float(name_stack, key, default_float, additional_stacks); + } + + inline bool read_bool(std::stack name_stack, std::string key, bool default_bool = false, std::vector additional_stacks = {}) { + return get_config()->read_bool(name_stack, key, default_bool, additional_stacks); + } + + inline bool read_color(std::stack name_stack, std::string key, color_rgba* color, std::vector additional_stacks = {}) { + return get_config()->read_color(name_stack, key, color, additional_stacks); + } + + inline bool read_vector(std::stack name_stack, std::string key, math::vector3_* vec, std::vector additional_stacks = {}) { + return get_config()->read_vector(name_stack, key, vec, additional_stacks); + } + + inline void write_string(std::stack name_stack, std::string key, std::string value, std::vector additional_stacks = {}) { + return get_config()->write_string(name_stack, key, value, additional_stacks); + } + + inline void write_int(std::stack name_stack, std::string key, int value, std::vector additional_stacks = {}) { + return get_config()->write_int(name_stack, key, value, additional_stacks); + } + + inline void write_uint64(std::stack name_stack, std::string key, uint64_t value, std::vector additional_stacks = {}) { + return get_config()->write_uint64(name_stack, key, value, additional_stacks); + } + + inline void write_float(std::stack name_stack, std::string key, float value, std::vector additional_stacks = {}) { + return get_config()->write_float(name_stack, key, value, additional_stacks); + } + + inline void write_bool(std::stack name_stack, std::string key, bool value, std::vector additional_stacks = {}) { + return get_config()->write_bool(name_stack, key, value, additional_stacks); + } + + inline void write_color(std::stack name_stack, std::string key, color_rgba value, std::vector additional_stacks = {}) { + return get_config()->write_color(name_stack, key, value, additional_stacks); + } + + inline void write_vector(std::stack name_stack, std::string key, math::vector3_ value, std::vector additional_stacks = {}) { + return get_config()->write_vector(name_stack, key, value, additional_stacks); + } +} \ No newline at end of file diff --git a/GTAV/src/util/dirs.cpp b/GTAV/src/util/dirs.cpp new file mode 100644 index 0000000..cfd3810 --- /dev/null +++ b/GTAV/src/util/dirs.cpp @@ -0,0 +1,108 @@ +#include "dirs.h" +#include "va.h" +#include +#include + +namespace util::dirs { + bool create_directories(std::vector directories) { + for (std::string dir : directories) { + std::error_code error; + std::filesystem::create_directories(dir, error); + + if (error.value()) { + printf("[Dirs] Failed creating dir \"%s\" -> %s\n", dir.c_str(), error.message().c_str()); + return false; + } + } + + return true; + } + + std::vector directories::get_files_in_directory(std::string dir, std::string extension) { + std::vector buffer; + + WIN32_FIND_DATAA fd; + HANDLE vit = FindFirstFileA((dir + "*" + extension).c_str(), &fd); + + if (vit != INVALID_HANDLE_VALUE) { + do { + if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { + std::string original = fd.cFileName; + buffer.push_back(original.substr(0, original.length() - extension.length())); + } + } while (FindNextFileA(vit, &fd)); + + FindClose(vit); + } + + return buffer; + } + + std::string directories::create_string(std::string base, std::string folder) { + return base + "\\" + folder; + } + + bool directories::load() { + if (SHGetFolderPathA(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, m_paths[PATH_DOCUMENTS]) != S_OK) { + printf("[Dirs] Failed to get documents folder\n"); + return false; + } + + char tmp[MAX_PATH]; + SHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, SHGFP_TYPE_CURRENT, tmp); + + sprintf_s(m_paths[PATH_TMP], XOR("%s\\"), tmp); + sprintf_s(m_paths[PATH_OZARK], XOR("%s\\Ozark\\Grand Theft Auto V"), m_paths[PATH_DOCUMENTS]); + sprintf_s(m_paths[PATH_GFX], XOR("%s\\Fonts\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_OUTFIT], XOR("%s\\Outfits\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_SCRIPTHOOK], XOR("%s\\ScriptHook\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_TEXTURES], XOR("%s\\Textures\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_TRANSLATION], XOR("%s\\Translations\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_THEME], XOR("%s\\Themes\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_MODDED_VEHICLES], XOR("%s\\Modded Vehicles\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_HANDLING], XOR("%s\\Handling\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_GAMEFX], XOR("%s\\FX\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_JOIN_BLOCKING], XOR("%s\\Join Blocking\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_SPOOFING_PROFILES], XOR("%s\\Profiles\\"), m_paths[PATH_OZARK]); + sprintf_s(m_paths[PATH_LSC], XOR("%s\\LSC\\"), m_paths[PATH_OZARK]); + + sprintf_s(m_paths[PATH_AUTH], XOR("%s\\Ozark\\Ozark.auth"), m_paths[PATH_DOCUMENTS]); + sprintf_s(m_paths[PATH_LOG], create_string(m_paths[PATH_OZARK], XOR("Log.txt")).c_str()); + sprintf_s(m_paths[PATH_CONFIG], create_string(m_paths[PATH_OZARK], XOR("config.json")).c_str()); + sprintf_s(m_paths[PATH_AMMO_MODIFIER], create_string(m_paths[PATH_OZARK], XOR("Ammo Modifiers.json")).c_str()); + sprintf_s(m_paths[PATH_TEXTURE_SWAP], create_string(m_paths[PATH_OZARK], XOR("Texture Swap.json")).c_str()); + sprintf_s(m_paths[PATH_MODEL_SWAP], create_string(m_paths[PATH_OZARK], XOR("Model Swap.json")).c_str()); + sprintf_s(m_paths[PATH_TELEPORT], create_string(m_paths[PATH_OZARK], XOR("Teleports.json")).c_str()); + sprintf_s(m_paths[PATH_RAINBOW], create_string(m_paths[PATH_OZARK], XOR("Rainbow.json")).c_str()); + sprintf_s(m_paths[PATH_ENTITY_LIMITS], create_string(m_paths[PATH_OZARK], XOR("Entity Limits.json")).c_str()); + sprintf_s(m_paths[PATH_RECENT_PLAYERS], create_string(m_paths[PATH_OZARK], XOR("Recent Players.json")).c_str()); + sprintf_s(m_paths[PATH_TEXT_MESSAGES], create_string(m_paths[PATH_OZARK], XOR("Text Messages.json")).c_str()); + sprintf_s(m_paths[PATH_OVERSEER], create_string(m_paths[PATH_OZARK], XOR("Overseer.json")).c_str()); + + bool success = create_directories({ + m_paths[PATH_OZARK], + create_string(m_paths[PATH_OZARK], XOR("Modded Vehicles")), + create_string(m_paths[PATH_OZARK], XOR("Fonts")), + create_string(m_paths[PATH_OZARK], XOR("FX")), + create_string(m_paths[PATH_OZARK], XOR("Outfits")), + create_string(m_paths[PATH_OZARK], XOR("ScriptHook")), + create_string(m_paths[PATH_OZARK], XOR("Themes")), + create_string(m_paths[PATH_OZARK], XOR("Translations")), + create_string(m_paths[PATH_OZARK], XOR("Textures")), + create_string(m_paths[PATH_OZARK], XOR("Handling")), + create_string(m_paths[PATH_OZARK], XOR("Modded Vehicles")), + create_string(m_paths[PATH_OZARK], XOR("Join Blocking")), + create_string(m_paths[PATH_OZARK], XOR("LSC")), + create_string(m_paths[PATH_OZARK], XOR("Profiles")), + }); + + if (success == false) return success; + + return true; + } + + directories* get_directories() { + static directories instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/util/dirs.h b/GTAV/src/util/dirs.h new file mode 100644 index 0000000..c7caaee --- /dev/null +++ b/GTAV/src/util/dirs.h @@ -0,0 +1,93 @@ +#pragma once +#include "stdafx.h" +#include + +#undef GetTempPath + +namespace util::dirs { + class directories { + public: + bool load(); + std::string create_string(std::string base, std::string folder); + std::vector get_files_in_directory(std::string dir, std::string extension); + + const char* get_log() { return get_path(PATH_LOG); } + const char* get_auth() { return get_path(PATH_AUTH); } + const char* get_gfx() { return get_path(PATH_GFX); } + const char* get_config() { return get_path(PATH_CONFIG); } + const char* get_outfit() { return get_path(PATH_OUTFIT); } + const char* get_ozark() { return get_path(PATH_OZARK); } + const char* get_ammo_modifier() { return get_path(PATH_AMMO_MODIFIER); } + const char* get_scripthook() { return get_path(PATH_SCRIPTHOOK); } + const char* get_tmp() { return get_path(PATH_TMP); } + const char* get_textures() { return get_path(PATH_TEXTURES); } + const char* get_texture_swap() { return get_path(PATH_TEXTURE_SWAP); } + const char* get_model_swap() { return get_path(PATH_MODEL_SWAP); } + const char* get_translation() { return get_path(PATH_TRANSLATION); } + const char* get_theme() { return get_path(PATH_THEME); } + const char* get_teleport() { return get_path(PATH_TELEPORT); } + const char* get_modded_vehicles() { return get_path(PATH_MODDED_VEHICLES); } + const char* get_rainbow() { return get_path(PATH_RAINBOW); } + const char* get_handling() { return get_path(PATH_HANDLING); } + const char* get_gamefx() { return get_path(PATH_GAMEFX); } + const char* get_entity_limits() { return get_path(PATH_ENTITY_LIMITS); } + const char* get_join_blocking() { return get_path(PATH_JOIN_BLOCKING); } + const char* get_recent_players() { return get_path(PATH_RECENT_PLAYERS); } + const char* get_spoofing_profiles() { return get_path(PATH_SPOOFING_PROFILES); } + const char* get_text_messages() { return get_path(PATH_TEXT_MESSAGES); } + const char* get_overseer() { return get_path(PATH_OVERSEER); } + const char* get_lsc() { return get_path(PATH_LSC); } + + enum Paths { + PATH_DOCUMENTS, + PATH_OZARK, + PATH_LOG, + PATH_AUTH, + PATH_GFX, + PATH_CONFIG, + PATH_OUTFIT, + PATH_AMMO_MODIFIER, + PATH_SCRIPTHOOK, + PATH_TMP, + PATH_TEXTURES, + PATH_TEXTURE_SWAP, + PATH_MODEL_SWAP, + PATH_TRANSLATION, + PATH_THEME, + PATH_TELEPORT, + PATH_MODDED_VEHICLES, + PATH_RAINBOW, + PATH_HANDLING, + PATH_GAMEFX, + PATH_ENTITY_LIMITS, + PATH_JOIN_BLOCKING, + PATH_RECENT_PLAYERS, + PATH_SPOOFING_PROFILES, + PATH_TEXT_MESSAGES, + PATH_OVERSEER, + PATH_LSC + }; + private: + std::unordered_map m_paths; + + const char* get_path(Paths path) { + return m_paths[path]; + } + }; + + directories* get_directories(); + + inline std::vector get_files_in_directory(std::string dir, std::string extension = ".txt") { + return get_directories()->get_files_in_directory(dir, extension); + } + + inline bool load() { + return get_directories()->load(); + } + + inline std::string create_string(std::string base, std::string folder) { + return get_directories()->create_string(base, folder); + } + +#define get_path(name) get_directories()->get_##name##() +} \ No newline at end of file diff --git a/GTAV/src/util/fiber.cpp b/GTAV/src/util/fiber.cpp new file mode 100644 index 0000000..da5203a --- /dev/null +++ b/GTAV/src/util/fiber.cpp @@ -0,0 +1,87 @@ +#include "fiber.h" +#include "global/vars.h" +#include + +namespace util::fiber { + void fiber_manager::load() { + if (m_loaded) return; + m_loaded = true; + + ConvertThreadToFiber(nullptr); + m_main_fiber = GetCurrentFiber(); + } + + void fiber_manager::update() { + if (!m_loaded || !m_current) return; + + for (fiber_context& fiber : m_fibers) { + if (fiber.m_running) { + if (timeGetTime() >= fiber.m_wake_time) { + SwitchToFiber(fiber.m_handle); + } + } + } + + m_current = m_current->m_next; + } + + void fiber_manager::add(std::string name, std::function function) { + struct Arguments { + std::function m_function; + void* m_main; + }; + + Arguments* arguments = new Arguments(); + arguments->m_function = function; + arguments->m_main = m_main_fiber; + + void* fiber_handle = CreateFiber(0, [](void* param) { + Arguments* arguments = (Arguments*)param; + while (!global::vars::g_unloading) { + arguments->m_function(); + SwitchToFiber(arguments->m_main); + } + + delete[] arguments; + }, arguments); + + m_fibers.push_back({ nullptr, fiber_handle, timeGetTime(), true, name }); + + for (auto fiber = m_fibers.begin(); fiber != m_fibers.end(); ++fiber) { + auto next = fiber + 1; + if (next != m_fibers.end()) fiber->m_next = &*next; + else fiber->m_next = &m_fibers.front(); + } + + m_current = &m_fibers.front(); + } + + void fiber_manager::sleep(uint32_t time) { + auto vit = std::find_if(begin(m_fibers), end(m_fibers), [](fiber_context& fiber) { return fiber.m_handle == GetCurrentFiber(); }); + if (vit != end(m_fibers)) { + vit->m_wake_time = timeGetTime() + time; + SwitchToFiber(m_main_fiber); + } + } + + void fiber_manager::go_to_main() { + SwitchToFiber(m_main_fiber); + } + + void fiber_manager::cleanup() { + for (fiber_context& fiber : m_fibers) { + fiber.m_running = false; + DeleteFiber(fiber.m_handle); + } + } + + fiber_manager* get_fiber_manager() { + static fiber_manager instance; + return &instance; + } + + fiber_manager* get_fiber_manager_shv() { + static fiber_manager instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/util/fiber.h b/GTAV/src/util/fiber.h new file mode 100644 index 0000000..69f03f0 --- /dev/null +++ b/GTAV/src/util/fiber.h @@ -0,0 +1,82 @@ +#pragma once +#include "stdafx.h" +#include + +namespace util::fiber { + struct fiber_context { + fiber_context* m_next = nullptr; + void* m_handle = nullptr; + uint32_t m_wake_time = 0; + bool m_running = true; + std::string m_name = ""; + }; + + class fiber_manager { + public: + void load(); + void update(); + void add(std::string name, std::function function); + void sleep(uint32_t time); + void go_to_main(); + void cleanup(); + + std::vector& get_fibers() { return m_fibers; } + private: + bool m_loaded; + void* m_main_fiber; + fiber_context* m_current; + std::vector m_fibers; + }; + + fiber_manager* get_fiber_manager(); + fiber_manager* get_fiber_manager_shv(); + + inline void load() { + get_fiber_manager()->load(); + } + + inline void update() { + get_fiber_manager()->update(); + } + + inline void add(std::string name, std::function function) { + get_fiber_manager()->add(name, function); + } + + inline void sleep(uint32_t time) { + get_fiber_manager()->sleep(time); + } + + inline void go_to_main() { + get_fiber_manager()->go_to_main(); + } + + inline void cleanup() { + get_fiber_manager()->cleanup(); + get_fiber_manager_shv()->cleanup(); + } + + inline void load_shv() { + get_fiber_manager_shv()->load(); + } + + inline void update_shv() { + get_fiber_manager_shv()->update(); + } + + inline void add_shv(std::string name, std::function function) { + get_fiber_manager_shv()->add(name, function); + } + + inline void sleep_shv(uint32_t time) { + get_fiber_manager_shv()->sleep(time); + } + + inline void go_to_main_shv() { + get_fiber_manager_shv()->go_to_main(); + } + + inline std::vector& get_fibers() { + return get_fiber_manager_shv()->get_fibers(); + } +} \ No newline at end of file diff --git a/GTAV/src/util/fiber_pool.cpp b/GTAV/src/util/fiber_pool.cpp new file mode 100644 index 0000000..ecba1e7 --- /dev/null +++ b/GTAV/src/util/fiber_pool.cpp @@ -0,0 +1,43 @@ +#include "fiber_pool.h" +#include "fiber.h" + +namespace util::fiber::pool { + void fiber_pool::load() { + static std::function job1; + static std::function job2; + static std::function job3; + static std::function job4; + static std::function job5; + static std::function job6; + static std::function job7; + static std::function job8; + + util::fiber::add("F_JOB1", [] { get_fiber_pool()->update(job1); }); + util::fiber::add("F_JOB2", [] { get_fiber_pool()->update(job2); }); + util::fiber::add("F_JOB3", [] { get_fiber_pool()->update(job3); }); + util::fiber::add("F_JOB4", [] { get_fiber_pool()->update(job4); }); + util::fiber::add("F_JOB5", [] { get_fiber_pool()->update(job5); }); + util::fiber::add("F_JOB6", [] { get_fiber_pool()->update(job6); }); + util::fiber::add("F_JOB7", [] { get_fiber_pool()->update(job7); }); + util::fiber::add("F_JOB8", [] { get_fiber_pool()->update(job8); }); + } + + void fiber_pool::update(std::function& function) { + if (m_jobs.empty()) return; + function = m_jobs.front(); + m_jobs.pop(); + function(); + } + + void fiber_pool::add(std::function function) { + if (m_jobs.size() >= 200) + return; + + m_jobs.emplace(function); + } + + fiber_pool* get_fiber_pool() { + static fiber_pool instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/util/fiber_pool.h b/GTAV/src/util/fiber_pool.h new file mode 100644 index 0000000..437074d --- /dev/null +++ b/GTAV/src/util/fiber_pool.h @@ -0,0 +1,25 @@ +#pragma once +#include "stdafx.h" +#include +#include + +namespace util::fiber::pool { + class fiber_pool { + public: + void load(); + void update(std::function& function); + void add(std::function function); + private: + std::queue> m_jobs; + }; + + fiber_pool* get_fiber_pool(); + + inline void load() { + get_fiber_pool()->load(); + } + + inline void add(std::function function) { + get_fiber_pool()->add(function); + } +} \ No newline at end of file diff --git a/GTAV/src/util/hooking/hooking.cpp b/GTAV/src/util/hooking/hooking.cpp new file mode 100644 index 0000000..133cebe --- /dev/null +++ b/GTAV/src/util/hooking/hooking.cpp @@ -0,0 +1,113 @@ +#include "hooking.h" +#include "global/vars.h" +#include "rage/invoker/invoker.h" +#include "rage/engine.h" +#include "rage/types/script_types.h" + +namespace hooking { + void Hooking::crypt_detour(detour_context* detour) { + for (int i = 0; i < detour->m_name.second; i++) { + detour->m_name.first[i] ^= detour->m_encryption; + } + + uint8_t* address = (uint8_t*)&detour->m_address; + for (int i = 0; i < 8; i++) { + address[i] ^= detour->m_encryption; + } + + for (int i = 0; i < HOOK_SIZE; i++) { + detour->m_hooked[i] ^= detour->m_encryption; + detour->m_original[i] ^= detour->m_encryption; + } + } + + void Hooking::crypt_vmt(virtual_context* vmt) { + for (int i = 0; i < vmt->m_name.second; i++) { + vmt->m_name.first[i] ^= vmt->m_encryption; + } + + uint8_t* address = (uint8_t*)&vmt->m_address; + for (int i = 0; i < 8; i++) { + address[i] ^= vmt->m_encryption; + } + + address = (uint8_t*)&vmt->m_original; + for (int i = 0; i < 8; i++) { + address[i] ^= vmt->m_encryption; + } + } + + void Hooking::cleanup() { + for (detour_context& detour : m_detours) { + crypt_detour(&detour); + MH_QueueDisableHook((void*)detour.m_address); + LOG_CUSTOM_SUCCESS("Hook", "Unhooked %s", detour.m_name); + } + + MH_ApplyQueued(); + MH_Uninitialize(); + + for (virtual_context& vmt : m_vmts) { + crypt_vmt(&vmt); + memory::write(vmt.m_address, vmt.m_original); + LOG_CUSTOM_SUCCESS("Hook", "Unhooked %s", vmt.m_name); + } + + for (script_context& script : m_scripts) { + if (is_valid_ptr(global::vars::g_game_streamed_scripts)) { + uint64_t table = *(uint64_t*)global::vars::g_game_streamed_scripts; + + int index = 0; + rage::engine::get_streamed_script_index(&index, script.m_script_name); + + if (index != -1) { + rage::script::script_header* header = rage::engine::get_script_program(table, index); + if (is_valid_ptr(header)) { + header->m_natives[script.m_position] = script.m_original; + LOG_CUSTOM_SUCCESS("Hook", "Unhooked function in %s", script.m_script_name); + } + } + } + } + } + + bool Hooking::script(const char* name, const char* script_name, uint64_t native, void* function) { + if (is_valid_ptr(global::vars::g_game_streamed_scripts)) { + uint64_t native_function = (uint64_t)rage::invoker::get_native_handler(native); + if (is_valid_ptr(native_function)) { + uint64_t table = *(uint64_t*)global::vars::g_game_streamed_scripts; + if (is_valid_ptr(table)) { + int index = 0; + rage::engine::get_streamed_script_index(&index, script_name); + + if (index != -1) { + rage::script::script_header* header = rage::engine::get_script_program(table, index); + if (is_valid_ptr(header)) { + for (int i = 0; i < header->m_native_count; i++) { + if (header->m_natives[i] == native_function) { + header->m_natives[i] = (uint64_t)function; + + script_context script; + script.m_script_name = script_name; + script.m_position = i; + script.m_original = native_function; + m_scripts.push_back(script); + + LOG_CUSTOM("Hook", "Hooked %s", name); + return true; + } + } + } + } + } + } + } + + return false; + } + + Hooking* get_hooking() { + static Hooking instance; + return &instance; + } +} \ No newline at end of file diff --git a/GTAV/src/util/hooking/hooking.h b/GTAV/src/util/hooking/hooking.h new file mode 100644 index 0000000..181a14e --- /dev/null +++ b/GTAV/src/util/hooking/hooking.h @@ -0,0 +1,136 @@ +#pragma once +#include "stdafx.h" +#include "minhook.h" +#include "util/log.h" +#include "util/memory/memory.h" +#include +#include + +namespace hooking { +#define HOOK_SIZE 20 + + struct detour_context { + std::pair m_name; + uint64_t m_address; + uint8_t m_original[HOOK_SIZE]; + uint8_t m_hooked[HOOK_SIZE]; + uint8_t m_encryption; + }; + + struct virtual_context { + std::pair m_name; + uint64_t m_address; + uint64_t m_original; + uint8_t m_encryption; + }; + + struct script_context { + const char* m_script_name; + uint64_t m_original; + int m_position; + }; + + class Hooking { + public: + template + __declspec(noinline) bool detour(const char* name, uint64_t address, void* function, T** trampoline) { + MH_STATUS init_status = MH_Initialize(); + if (init_status == MH_OK || init_status == MH_ERROR_ALREADY_INITIALIZED) { + if (address && function) { + uint8_t original[HOOK_SIZE]; + memcpy(original, (void*)address, HOOK_SIZE); + + MH_STATUS hook_status = MH_CreateHook((void*)address, function, (void**)trampoline); + if (hook_status == MH_OK || hook_status == MH_ERROR_ALREADY_CREATED) { + hook_status = MH_EnableHook((void*)address); + if (hook_status == MH_OK) { + std::random_device r; + std::seed_seq seed2 { r(), r(), r(), r(), r(), r(), r(), r() }; + std::mt19937 rng(seed2); + std::uniform_int_distribution val(0, 255); + + detour_context detour; + detour.m_name = std::make_pair(std::string(name), strlen(name)); + detour.m_address = address; + detour.m_encryption = (uint8_t)val(rng); + + memcpy(detour.m_original, original, HOOK_SIZE); + memcpy(detour.m_hooked, (void*)address, HOOK_SIZE); + + crypt_detour(&detour); + m_detours.push_back(detour); + + LOG_CUSTOM("Hook", "Hooked %s", name); + return true; + } + } + } + } + + return false; + }; + + template + __declspec(noinline) bool vmt(const char* name, uint64_t address, int index, void* function, T** trampoline) { + if (!address || !function) { + return false; + } + + uint64_t table = address + (8 * index); + uint64_t original = *(uint64_t*)table; + + if (*((void**)trampoline) == nullptr) { + *((void**)trampoline) = (void*)original; + } + + std::random_device r; + std::seed_seq seed2 { r(), r(), r(), r(), r(), r(), r(), r() }; + std::mt19937 rng(seed2); + std::uniform_int_distribution val(0, 255); + + virtual_context vmt; + vmt.m_name = std::make_pair(std::string(name), strlen(name)); + vmt.m_address = table; + vmt.m_original = original; + vmt.m_encryption = (uint8_t)val(rng); + + crypt_vmt(&vmt); + m_vmts.push_back(vmt); + + memory::write(table, (uint64_t)function); + + LOG_CUSTOM("Hook", "Hooked %s", name); + return true; + } + + __declspec(noinline) bool script(const char* name, const char* script, uint64_t native, void* function); + + void crypt_detour(detour_context* detour); + void crypt_vmt(virtual_context* vmt); + void cleanup(); + private: + std::vector m_scripts; + std::vector m_detours; + std::vector m_vmts; + }; + + Hooking* get_hooking(); + + template + inline bool detour(const char* name, uint64_t address, void* function, T** trampoline) { + return get_hooking()->detour(name, address, function, trampoline); + } + + template + inline bool vmt(const char* name, uint64_t address, int index, void* function, T** trampoline) { + return get_hooking()->vmt(name, address, index, function, trampoline); + } + + inline bool script(const char* name, const char* script, uint64_t native, void* function) { + return get_hooking()->script(name, script, native, function); + } + + inline void cleanup() { + get_hooking()->cleanup(); + } +} \ No newline at end of file diff --git a/GTAV/src/util/hooking/minhook.h b/GTAV/src/util/hooking/minhook.h new file mode 100644 index 0000000..5a06ab8 --- /dev/null +++ b/GTAV/src/util/hooking/minhook.h @@ -0,0 +1,168 @@ +/* + * MinHook - The Minimalistic API Hooking Library for x64/x86 + * Copyright (C) 2009-2015 Tsuda Kageyu. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +#if !(defined _M_IX86) && !(defined _M_X64) +#error MinHook supports only x86 and x64 systems. +#endif + +#include + + // MinHook Error Codes. +typedef enum MH_STATUS { + // Unknown error. Should not be returned. + MH_UNKNOWN = -1, + + // Successful. + MH_OK = 0, + + // MinHook is already initialized. + MH_ERROR_ALREADY_INITIALIZED, + + // MinHook is not initialized yet, or already uninitialized. + MH_ERROR_NOT_INITIALIZED, + + // The hook for the specified target function is already created. + MH_ERROR_ALREADY_CREATED, + + // The hook for the specified target function is not created yet. + MH_ERROR_NOT_CREATED, + + // The hook for the specified target function is already enabled. + MH_ERROR_ENABLED, + + // The hook for the specified target function is not enabled yet, or already + // disabled. + MH_ERROR_DISABLED, + + // The specified pointer is invalid. It points the address of non-allocated + // and/or non-executable region. + MH_ERROR_NOT_EXECUTABLE, + + // The specified target function cannot be hooked. + MH_ERROR_UNSUPPORTED_FUNCTION, + + // Failed to allocate memory. + MH_ERROR_MEMORY_ALLOC, + + // Failed to change the memory protection. + MH_ERROR_MEMORY, + + // The specified module is not loaded. + MH_ERROR_MODULE_NOT_FOUND, + + // The specified function is not found. + MH_ERROR_FUNCTION_NOT_FOUND +} +MH_STATUS; + +// Can be passed as a parameter to MH_EnableHook, MH_DisableHook, +// MH_QueueEnableHook or MH_QueueDisableHook. +#define MH_ALL_HOOKS NULL + +#ifdef __cplusplus +extern "C" { +#endif + + // Initialize the MinHook library. You must call this function EXACTLY ONCE + // at the beginning of your program. + MH_STATUS WINAPI MH_Initialize(VOID); + + // Uninitialize the MinHook library. You must call this function EXACTLY + // ONCE at the end of your program. + MH_STATUS WINAPI MH_Uninitialize(VOID); + + // Creates a Hook for the specified target function, in disabled state. + // Parameters: + // pTarget [in] A pointer to the target function, which will be + // overridden by the detour function. + // pDetour [in] A pointer to the detour function, which will override + // the target function. + // ppOriginal [out] A pointer to the trampoline function, which will be + // used to call the original target function. + // This parameter can be NULL. + MH_STATUS WINAPI MH_CreateHook(LPVOID pTarget, LPVOID pDetour, LPVOID* ppOriginal); + + // Creates a Hook for the specified API function, in disabled state. + // Parameters: + // pszModule [in] A pointer to the loaded module name which contains the + // target function. + // pszTarget [in] A pointer to the target function name, which will be + // overridden by the detour function. + // pDetour [in] A pointer to the detour function, which will override + // the target function. + // ppOriginal [out] A pointer to the trampoline function, which will be + // used to call the original target function. + // This parameter can be NULL. + MH_STATUS WINAPI MH_CreateHookApi( + LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID* ppOriginal); + + // Removes an already created hook. + // Parameters: + // pTarget [in] A pointer to the target function. + MH_STATUS WINAPI MH_RemoveHook(LPVOID pTarget); + + // Enables an already created hook. + // Parameters: + // pTarget [in] A pointer to the target function. + // If this parameter is MH_ALL_HOOKS, all created hooks are + // enabled in one go. + MH_STATUS WINAPI MH_EnableHook(LPVOID pTarget); + + // Disables an already created hook. + // Parameters: + // pTarget [in] A pointer to the target function. + // If this parameter is MH_ALL_HOOKS, all created hooks are + // disabled in one go. + MH_STATUS WINAPI MH_DisableHook(LPVOID pTarget); + + // Queues to enable an already created hook. + // Parameters: + // pTarget [in] A pointer to the target function. + // If this parameter is MH_ALL_HOOKS, all created hooks are + // queued to be enabled. + MH_STATUS WINAPI MH_QueueEnableHook(LPVOID pTarget); + + // Queues to disable an already created hook. + // Parameters: + // pTarget [in] A pointer to the target function. + // If this parameter is MH_ALL_HOOKS, all created hooks are + // queued to be disabled. + MH_STATUS WINAPI MH_QueueDisableHook(LPVOID pTarget); + + // Applies all queued changes in one go. + MH_STATUS WINAPI MH_ApplyQueued(VOID); + + // Translates the MH_STATUS to its name as a string. + const char* WINAPI MH_StatusToString(MH_STATUS status); + +#ifdef __cplusplus +} +#endif + diff --git a/GTAV/src/util/json.h b/GTAV/src/util/json.h new file mode 100644 index 0000000..e98ea69 --- /dev/null +++ b/GTAV/src/util/json.h @@ -0,0 +1,21291 @@ +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.7.3 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License . +SPDX-License-Identifier: MIT +Copyright (c) 2013-2019 Niels Lohmann . + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ + +#define NLOHMANN_JSON_VERSION_MAJOR 3 +#define NLOHMANN_JSON_VERSION_MINOR 7 +#define NLOHMANN_JSON_VERSION_PATCH 3 + +#include // all_of, find, for_each +#include // assert +#include // and, not, or +#include // nullptr_t, ptrdiff_t, size_t +#include // hash, less +#include // initializer_list +#include // istream, ostream +#include // random_access_iterator_tag +#include // unique_ptr +#include // accumulate +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap +#include // vector + +// #include + + +#include + +// #include + + +#include // transform +#include // array +#include // and, not +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +// #include + + +#include // exception +#include // runtime_error +#include // to_string + +// #include + + +#include // size_t + +namespace nlohmann { + namespace detail { + /// struct to capture the start position of the current token + struct position_t { + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const { + return chars_read_total; + } + }; + + } // namespace detail +} // namespace nlohmann + +// #include + + +#include // pair +// #include +/* Hedley - https://nemequ.github.io/hedley + * Created by Evan Nemerson + * + * To the extent possible under law, the author(s) have dedicated all + * copyright and related and neighboring rights to this software to + * the public domain worldwide. This software is distributed without + * any warranty. + * + * For details, see . + * SPDX-License-Identifier: CC0-1.0 + */ + +#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 11) +#if defined(JSON_HEDLEY_VERSION) +#undef JSON_HEDLEY_VERSION +#endif +#define JSON_HEDLEY_VERSION 11 + +#if defined(JSON_HEDLEY_STRINGIFY_EX) +#undef JSON_HEDLEY_STRINGIFY_EX +#endif +#define JSON_HEDLEY_STRINGIFY_EX(x) #x + +#if defined(JSON_HEDLEY_STRINGIFY) +#undef JSON_HEDLEY_STRINGIFY +#endif +#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) + +#if defined(JSON_HEDLEY_CONCAT_EX) +#undef JSON_HEDLEY_CONCAT_EX +#endif +#define JSON_HEDLEY_CONCAT_EX(a,b) a##b + +#if defined(JSON_HEDLEY_CONCAT) +#undef JSON_HEDLEY_CONCAT +#endif +#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) + +#if defined(JSON_HEDLEY_VERSION_ENCODE) +#undef JSON_HEDLEY_VERSION_ENCODE +#endif +#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) +#undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) +#undef JSON_HEDLEY_VERSION_DECODE_MINOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) +#undef JSON_HEDLEY_VERSION_DECODE_REVISION +#endif +#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) + +#if defined(JSON_HEDLEY_GNUC_VERSION) +#undef JSON_HEDLEY_GNUC_VERSION +#endif +#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) +#define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#elif defined(__GNUC__) +#define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) +#endif + +#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) +#undef JSON_HEDLEY_GNUC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GNUC_VERSION) +#define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION) +#undef JSON_HEDLEY_MSVC_VERSION +#endif +#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) +#define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) +#elif defined(_MSC_FULL_VER) +#define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) +#elif defined(_MSC_VER) +#define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) +#undef JSON_HEDLEY_MSVC_VERSION_CHECK +#endif +#if !defined(_MSC_VER) +#define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +#define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) +#elif defined(_MSC_VER) && (_MSC_VER >= 1200) +#define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) +#else +#define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION) +#undef JSON_HEDLEY_INTEL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) +#define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) +#elif defined(__INTEL_COMPILER) +#define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) +#undef JSON_HEDLEY_INTEL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_VERSION) +#define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION) +#undef JSON_HEDLEY_PGI_VERSION +#endif +#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) +#define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) +#undef JSON_HEDLEY_PGI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PGI_VERSION) +#define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION) +#undef JSON_HEDLEY_SUNPRO_VERSION +#endif +#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) +#define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) +#elif defined(__SUNPRO_C) +#define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) +#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) +#define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) +#elif defined(__SUNPRO_CC) +#define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) +#undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_SUNPRO_VERSION) +#define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) +#undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#endif +#if defined(__EMSCRIPTEN__) +#define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) +#undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) +#define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION) +#undef JSON_HEDLEY_ARM_VERSION +#endif +#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) +#define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) +#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) +#define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) +#undef JSON_HEDLEY_ARM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_ARM_VERSION) +#define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION) +#undef JSON_HEDLEY_IBM_VERSION +#endif +#if defined(__ibmxl__) +#define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) +#elif defined(__xlC__) && defined(__xlC_ver__) +#define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) +#elif defined(__xlC__) +#define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) +#undef JSON_HEDLEY_IBM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IBM_VERSION) +#define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_VERSION) +#undef JSON_HEDLEY_TI_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) +#define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_VERSION_CHECK) +#undef JSON_HEDLEY_TI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_VERSION) +#define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION) +#undef JSON_HEDLEY_CRAY_VERSION +#endif +#if defined(_CRAYC) +#if defined(_RELEASE_PATCHLEVEL) +#define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) +#else +#define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) +#endif +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) +#undef JSON_HEDLEY_CRAY_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_CRAY_VERSION) +#define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION) +#undef JSON_HEDLEY_IAR_VERSION +#endif +#if defined(__IAR_SYSTEMS_ICC__) +#if __VER__ > 1000 +#define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) +#else +#define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(VER / 100, __VER__ % 100, 0) +#endif +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) +#undef JSON_HEDLEY_IAR_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IAR_VERSION) +#define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION) +#undef JSON_HEDLEY_TINYC_VERSION +#endif +#if defined(__TINYC__) +#define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) +#undef JSON_HEDLEY_TINYC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TINYC_VERSION) +#define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION) +#undef JSON_HEDLEY_DMC_VERSION +#endif +#if defined(__DMC__) +#define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) +#undef JSON_HEDLEY_DMC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_DMC_VERSION) +#define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION) +#undef JSON_HEDLEY_COMPCERT_VERSION +#endif +#if defined(__COMPCERT_VERSION__) +#define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) +#undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_COMPCERT_VERSION) +#define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION) +#undef JSON_HEDLEY_PELLES_VERSION +#endif +#if defined(__POCC__) +#define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) +#undef JSON_HEDLEY_PELLES_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PELLES_VERSION) +#define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION) +#undef JSON_HEDLEY_GCC_VERSION +#endif +#if \ + defined(JSON_HEDLEY_GNUC_VERSION) && \ + !defined(__clang__) && \ + !defined(JSON_HEDLEY_INTEL_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_ARM_VERSION) && \ + !defined(JSON_HEDLEY_TI_VERSION) && \ + !defined(__COMPCERT__) +#define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) +#undef JSON_HEDLEY_GCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GCC_VERSION) +#define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else +#define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) +#undef JSON_HEDLEY_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) +#define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) +#else +#define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) +#undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) +#define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute) +#else +#define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) +#undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) +#define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute) +#else +#define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) +#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#endif +#if \ + defined(__has_cpp_attribute) && \ + defined(__cplusplus) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) +#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) +#else +#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) +#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#endif +#if !defined(__cplusplus) || !defined(__has_cpp_attribute) +#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#elif \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ + (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) +#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) +#else +#define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) +#undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) +#define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else +#define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) +#undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) +#define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else +#define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_BUILTIN) +#undef JSON_HEDLEY_HAS_BUILTIN +#endif +#if defined(__has_builtin) +#define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) +#else +#define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) +#undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#endif +#if defined(__has_builtin) +#define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else +#define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) +#undef JSON_HEDLEY_GCC_HAS_BUILTIN +#endif +#if defined(__has_builtin) +#define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else +#define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_FEATURE) +#undef JSON_HEDLEY_HAS_FEATURE +#endif +#if defined(__has_feature) +#define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) +#else +#define JSON_HEDLEY_HAS_FEATURE(feature) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) +#undef JSON_HEDLEY_GNUC_HAS_FEATURE +#endif +#if defined(__has_feature) +#define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else +#define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) +#undef JSON_HEDLEY_GCC_HAS_FEATURE +#endif +#if defined(__has_feature) +#define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else +#define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_EXTENSION) +#undef JSON_HEDLEY_HAS_EXTENSION +#endif +#if defined(__has_extension) +#define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) +#else +#define JSON_HEDLEY_HAS_EXTENSION(extension) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) +#undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#endif +#if defined(__has_extension) +#define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else +#define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) +#undef JSON_HEDLEY_GCC_HAS_EXTENSION +#endif +#if defined(__has_extension) +#define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else +#define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) +#undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) +#define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) +#else +#define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) +#undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) +#define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else +#define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) +#undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) +#define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else +#define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_WARNING) +#undef JSON_HEDLEY_HAS_WARNING +#endif +#if defined(__has_warning) +#define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) +#else +#define JSON_HEDLEY_HAS_WARNING(warning) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) +#undef JSON_HEDLEY_GNUC_HAS_WARNING +#endif +#if defined(__has_warning) +#define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else +#define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_WARNING) +#undef JSON_HEDLEY_GCC_HAS_WARNING +#endif +#if defined(__has_warning) +#define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else +#define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + + /* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#endif +#if defined(__cplusplus) && JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +#else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x +#endif + +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + defined(__clang__) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) +#define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) +#define JSON_HEDLEY_PRAGMA(value) __pragma(value) +#else +#define JSON_HEDLEY_PRAGMA(value) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) +#undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#endif +#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) +#undef JSON_HEDLEY_DIAGNOSTIC_POP +#endif +#if defined(__clang__) +#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") +#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") +#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) +#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") +#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) +#define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) +#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) +#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") +#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") +#elif JSON_HEDLEY_TI_VERSION_CHECK(8,1,0) +#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") +#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) +#define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") +#define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#else +#define JSON_HEDLEY_DIAGNOSTIC_PUSH +#define JSON_HEDLEY_DIAGNOSTIC_POP +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) +#elif JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") +#else +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) +#elif JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") +#else +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") +#elif JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") +#else +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) +#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") +#else +#define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif + +#if defined(JSON_HEDLEY_DEPRECATED) +#undef JSON_HEDLEY_DEPRECATED +#endif +#if defined(JSON_HEDLEY_DEPRECATED_FOR) +#undef JSON_HEDLEY_DEPRECATED_FOR +#endif +#if defined(__cplusplus) && (__cplusplus >= 201402L) +#define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) +#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) +#elif \ + JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,3,0) +#define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) +#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) +#define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) +#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) +#define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) +#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) +#define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) +#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") +#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") +#else +#define JSON_HEDLEY_DEPRECATED(since) +#define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) +#endif + +#if defined(JSON_HEDLEY_UNAVAILABLE) +#undef JSON_HEDLEY_UNAVAILABLE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +#define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) +#else +#define JSON_HEDLEY_UNAVAILABLE(available_since) +#endif + +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) +#undef JSON_HEDLEY_WARN_UNUSED_RESULT +#endif +#if defined(__cplusplus) && (__cplusplus >= 201703L) +#define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) +#define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) +#elif defined(_Check_return_) /* SAL */ +#define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ +#else +#define JSON_HEDLEY_WARN_UNUSED_RESULT +#endif + +#if defined(JSON_HEDLEY_SENTINEL) +#undef JSON_HEDLEY_SENTINEL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) +#define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) +#else +#define JSON_HEDLEY_SENTINEL(position) +#endif + +#if defined(JSON_HEDLEY_NO_RETURN) +#undef JSON_HEDLEY_NO_RETURN +#endif +#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_NO_RETURN __noreturn +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +#define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#define JSON_HEDLEY_NO_RETURN _Noreturn +#elif defined(__cplusplus) && (__cplusplus >= 201103L) +#define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(18,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(17,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) +#define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +#define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) +#define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) && defined(__cplusplus) +#define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) +#define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) +#define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#else +#define JSON_HEDLEY_NO_RETURN +#endif + +#if defined(JSON_HEDLEY_NO_ESCAPE) +#undef JSON_HEDLEY_NO_ESCAPE +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) +#define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) +#else +#define JSON_HEDLEY_NO_ESCAPE +#endif + +#if defined(JSON_HEDLEY_UNREACHABLE) +#undef JSON_HEDLEY_UNREACHABLE +#endif +#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) +#undef JSON_HEDLEY_UNREACHABLE_RETURN +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) +#define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) +#define JSON_HEDLEY_UNREACHABLE() __assume(0) +#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) +#if defined(__cplusplus) +#define JSON_HEDLEY_UNREACHABLE() std::_nassert(0) +#else +#define JSON_HEDLEY_UNREACHABLE() _nassert(0) +#endif +#define JSON_HEDLEY_UNREACHABLE_RETURN(value) return value +#elif defined(EXIT_FAILURE) +#define JSON_HEDLEY_UNREACHABLE() abort() +#else +#define JSON_HEDLEY_UNREACHABLE() +#define JSON_HEDLEY_UNREACHABLE_RETURN(value) return value +#endif +#if !defined(JSON_HEDLEY_UNREACHABLE_RETURN) +#define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() +#endif + +#if defined(JSON_HEDLEY_ASSUME) +#undef JSON_HEDLEY_ASSUME +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +#define JSON_HEDLEY_ASSUME(expr) __assume(expr) +#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) +#define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) +#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) +#if defined(__cplusplus) +#define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) +#else +#define JSON_HEDLEY_ASSUME(expr) _nassert(expr) +#endif +#elif \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && !defined(JSON_HEDLEY_ARM_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) +#define JSON_HEDLEY_ASSUME(expr) ((void) ((expr) ? 1 : (__builtin_unreachable(), 1))) +#else +#define JSON_HEDLEY_ASSUME(expr) ((void) (expr)) +#endif + +JSON_HEDLEY_DIAGNOSTIC_PUSH +#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") +#pragma clang diagnostic ignored "-Wpedantic" +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) +#pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif +#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) +#if defined(__clang__) +#pragma clang diagnostic ignored "-Wvariadic-macros" +#elif defined(JSON_HEDLEY_GCC_VERSION) +#pragma GCC diagnostic ignored "-Wvariadic-macros" +#endif +#endif +#if defined(JSON_HEDLEY_NON_NULL) +#undef JSON_HEDLEY_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) +#define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) +#else +#define JSON_HEDLEY_NON_NULL(...) +#endif +JSON_HEDLEY_DIAGNOSTIC_POP + +#if defined(JSON_HEDLEY_PRINTF_FORMAT) +#undef JSON_HEDLEY_PRINTF_FORMAT +#endif +#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) +#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) +#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) +#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) +#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) +#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) +#else +#define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) +#endif + +#if defined(JSON_HEDLEY_CONSTEXPR) +#undef JSON_HEDLEY_CONSTEXPR +#endif +#if defined(__cplusplus) +#if __cplusplus >= 201103L +#define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) +#endif +#endif +#if !defined(JSON_HEDLEY_CONSTEXPR) +#define JSON_HEDLEY_CONSTEXPR +#endif + +#if defined(JSON_HEDLEY_PREDICT) +#undef JSON_HEDLEY_PREDICT +#endif +#if defined(JSON_HEDLEY_LIKELY) +#undef JSON_HEDLEY_LIKELY +#endif +#if defined(JSON_HEDLEY_UNLIKELY) +#undef JSON_HEDLEY_UNLIKELY +#endif +#if defined(JSON_HEDLEY_UNPREDICTABLE) +#undef JSON_HEDLEY_UNPREDICTABLE +#endif +#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) +#define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable(!!(expr)) +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) +# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability(expr, value, probability) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1, probability) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0, probability) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) +#if !defined(JSON_HEDLEY_BUILTIN_UNPREDICTABLE) +#define JSON_HEDLEY_BUILTIN_UNPREDICTABLE(expr) __builtin_expect_with_probability(!!(expr), 1, 0.5) +#endif +#elif \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) +# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ + (((probability) >= 0.9) ? __builtin_expect(!!(expr), (expected)) : (((void) (expected)), !!(expr))) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ + (__extension__ ({ \ + JSON_HEDLEY_CONSTEXPR double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ + })) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ + (__extension__ ({ \ + JSON_HEDLEY_CONSTEXPR double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ + })) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) +#else +# define JSON_HEDLEY_PREDICT(expr, expected, probability) (((void) (expected)), !!(expr)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) +# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) +#endif +#if !defined(JSON_HEDLEY_UNPREDICTABLE) +#define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) +#endif + +#if defined(JSON_HEDLEY_MALLOC) +#undef JSON_HEDLEY_MALLOC +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) +#define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +#define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(14, 0, 0) +#define JSON_HEDLEY_MALLOC __declspec(restrict) +#else +#define JSON_HEDLEY_MALLOC +#endif + +#if defined(JSON_HEDLEY_PURE) +#undef JSON_HEDLEY_PURE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) +#define JSON_HEDLEY_PURE __attribute__((__pure__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +#define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") +#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) && defined(__cplusplus) +#define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") +#else +#define JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_CONST) +#undef JSON_HEDLEY_CONST +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) +#define JSON_HEDLEY_CONST __attribute__((__const__)) +#elif \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +#define JSON_HEDLEY_CONST _Pragma("no_side_effect") +#else +#define JSON_HEDLEY_CONST JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_RESTRICT) +#undef JSON_HEDLEY_RESTRICT +#endif +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) +#define JSON_HEDLEY_RESTRICT restrict +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + defined(__clang__) +#define JSON_HEDLEY_RESTRICT __restrict +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) +#define JSON_HEDLEY_RESTRICT _Restrict +#else +#define JSON_HEDLEY_RESTRICT +#endif + +#if defined(JSON_HEDLEY_INLINE) +#undef JSON_HEDLEY_INLINE +#endif +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + (defined(__cplusplus) && (__cplusplus >= 199711L)) +#define JSON_HEDLEY_INLINE inline +#elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) +#define JSON_HEDLEY_INLINE __inline__ +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_INLINE __inline +#else +#define JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_ALWAYS_INLINE) +#undef JSON_HEDLEY_ALWAYS_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) +#define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) +#define JSON_HEDLEY_ALWAYS_INLINE __forceinline +#elif JSON_HEDLEY_TI_VERSION_CHECK(7,0,0) && defined(__cplusplus) +#define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") +#else +#define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_NEVER_INLINE) +#undef JSON_HEDLEY_NEVER_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) +#define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) +#define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) +#define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") +#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) && defined(__cplusplus) +#define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +#define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) +#define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) +#define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#else +#define JSON_HEDLEY_NEVER_INLINE +#endif + +#if defined(JSON_HEDLEY_PRIVATE) +#undef JSON_HEDLEY_PRIVATE +#endif +#if defined(JSON_HEDLEY_PUBLIC) +#undef JSON_HEDLEY_PUBLIC +#endif +#if defined(JSON_HEDLEY_IMPORT) +#undef JSON_HEDLEY_IMPORT +#endif +#if defined(_WIN32) || defined(__CYGWIN__) +#define JSON_HEDLEY_PRIVATE +#define JSON_HEDLEY_PUBLIC __declspec(dllexport) +#define JSON_HEDLEY_IMPORT __declspec(dllimport) +#else +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_EABI__) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) +#define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) +#define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) +#else +#define JSON_HEDLEY_PRIVATE +#define JSON_HEDLEY_PUBLIC +#endif +#define JSON_HEDLEY_IMPORT extern +#endif + +#if defined(JSON_HEDLEY_NO_THROW) +#undef JSON_HEDLEY_NO_THROW +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +#define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) +#define JSON_HEDLEY_NO_THROW __declspec(nothrow) +#else +#define JSON_HEDLEY_NO_THROW +#endif + +#if defined(JSON_HEDLEY_FALL_THROUGH) +#undef JSON_HEDLEY_FALL_THROUGH +#endif +#if JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(fallthrough,7,0,0) && !defined(JSON_HEDLEY_PGI_VERSION) +#define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) +#define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) +#define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) +#elif defined(__fallthrough) /* SAL */ +#define JSON_HEDLEY_FALL_THROUGH __fallthrough +#else +#define JSON_HEDLEY_FALL_THROUGH +#endif + +#if defined(JSON_HEDLEY_RETURNS_NON_NULL) +#undef JSON_HEDLEY_RETURNS_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) +#define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) +#elif defined(_Ret_notnull_) /* SAL */ +#define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ +#else +#define JSON_HEDLEY_RETURNS_NON_NULL +#endif + +#if defined(JSON_HEDLEY_ARRAY_PARAM) +#undef JSON_HEDLEY_ARRAY_PARAM +#endif +#if \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ + !defined(__STDC_NO_VLA__) && \ + !defined(__cplusplus) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_TINYC_VERSION) +#define JSON_HEDLEY_ARRAY_PARAM(name) (name) +#else +#define JSON_HEDLEY_ARRAY_PARAM(name) +#endif + +#if defined(JSON_HEDLEY_IS_CONSTANT) +#undef JSON_HEDLEY_IS_CONSTANT +#endif +#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) +#undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#endif +/* JSON_HEDLEY_IS_CONSTEXPR_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) +#undef JSON_HEDLEY_IS_CONSTEXPR_ +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(6,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) +#define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) +#endif +#if !defined(__cplusplus) +# if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) +#if defined(__INTPTR_TYPE__) +#define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) +#else +#include +#define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) +#endif +# elif \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(JSON_HEDLEY_SUNPRO_VERSION) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ + JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) +#if defined(__INTPTR_TYPE__) +#define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) +#else +#include +#define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) +#endif +# elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + defined(JSON_HEDLEY_INTEL_VERSION) || \ + defined(JSON_HEDLEY_TINYC_VERSION) || \ + defined(JSON_HEDLEY_TI_VERSION) || \ + defined(__clang__) +# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ + sizeof(void) != \ + sizeof(*( \ + 1 ? \ + ((void*) ((expr) * 0L) ) : \ +((struct { char v[sizeof(void) * 2]; } *) 1) \ + ) \ + ) \ + ) +# endif +#endif +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) +#if !defined(JSON_HEDLEY_IS_CONSTANT) +#define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) +#endif +#define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) +#else +#if !defined(JSON_HEDLEY_IS_CONSTANT) +#define JSON_HEDLEY_IS_CONSTANT(expr) (0) +#endif +#define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) +#endif + +#if defined(JSON_HEDLEY_BEGIN_C_DECLS) +#undef JSON_HEDLEY_BEGIN_C_DECLS +#endif +#if defined(JSON_HEDLEY_END_C_DECLS) +#undef JSON_HEDLEY_END_C_DECLS +#endif +#if defined(JSON_HEDLEY_C_DECL) +#undef JSON_HEDLEY_C_DECL +#endif +#if defined(__cplusplus) +#define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { +#define JSON_HEDLEY_END_C_DECLS } +#define JSON_HEDLEY_C_DECL extern "C" +#else +#define JSON_HEDLEY_BEGIN_C_DECLS +#define JSON_HEDLEY_END_C_DECLS +#define JSON_HEDLEY_C_DECL +#endif + +#if defined(JSON_HEDLEY_STATIC_ASSERT) +#undef JSON_HEDLEY_STATIC_ASSERT +#endif +#if \ + !defined(__cplusplus) && ( \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ + JSON_HEDLEY_HAS_FEATURE(c_static_assert) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + defined(_Static_assert) \ + ) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) +#elif \ + (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \ + (defined(__cplusplus) && JSON_HEDLEY_TI_VERSION_CHECK(8,3,0)) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) +#else +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) +#endif + +#if defined(JSON_HEDLEY_CONST_CAST) +#undef JSON_HEDLEY_CONST_CAST +#endif +#if defined(__cplusplus) +# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) +#elif \ + JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_REINTERPRET_CAST) +#undef JSON_HEDLEY_REINTERPRET_CAST +#endif +#if defined(__cplusplus) +#define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) +#else +#define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (*((T*) &(expr))) +#endif + +#if defined(JSON_HEDLEY_STATIC_CAST) +#undef JSON_HEDLEY_STATIC_CAST +#endif +#if defined(__cplusplus) +#define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) +#else +#define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_CPP_CAST) +#undef JSON_HEDLEY_CPP_CAST +#endif +#if defined(__cplusplus) +#define JSON_HEDLEY_CPP_CAST(T, expr) static_cast(expr) +#else +#define JSON_HEDLEY_CPP_CAST(T, expr) (expr) +#endif + +#if defined(JSON_HEDLEY_NULL) +#undef JSON_HEDLEY_NULL +#endif +#if defined(__cplusplus) +#if __cplusplus >= 201103L +#define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) +#elif defined(NULL) +#define JSON_HEDLEY_NULL NULL +#else +#define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) +#endif +#elif defined(NULL) +#define JSON_HEDLEY_NULL NULL +#else +#define JSON_HEDLEY_NULL ((void*) 0) +#endif + +#if defined(JSON_HEDLEY_MESSAGE) +#undef JSON_HEDLEY_MESSAGE +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_MESSAGE(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(message msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) +#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_WARNING) +#undef JSON_HEDLEY_WARNING +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_WARNING(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(clang warning msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_REQUIRE) +#undef JSON_HEDLEY_REQUIRE +#endif +#if defined(JSON_HEDLEY_REQUIRE_MSG) +#undef JSON_HEDLEY_REQUIRE_MSG +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) +# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") +# define JSON_HEDLEY_REQUIRE(expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), #expr, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), msg, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) +# endif +#else +# define JSON_HEDLEY_REQUIRE(expr) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) +#endif + +#if defined(JSON_HEDLEY_FLAGS) +#undef JSON_HEDLEY_FLAGS +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) +#define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) +#endif + +#if defined(JSON_HEDLEY_FLAGS_CAST) +#undef JSON_HEDLEY_FLAGS_CAST +#endif +#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) +# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("warning(disable:188)") \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) +#endif + +#if defined(JSON_HEDLEY_EMPTY_BASES) +#undef JSON_HEDLEY_EMPTY_BASES +#endif +#if JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0) +#define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) +#else +#define JSON_HEDLEY_EMPTY_BASES +#endif + + /* Remaining macros are deprecated. */ + +#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) +#undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#endif +#if defined(__clang__) +#define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) +#else +#define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) +#undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) +#undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) +#undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#endif +#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) + +#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) +#undef JSON_HEDLEY_CLANG_HAS_FEATURE +#endif +#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) + +#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) +#undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#endif +#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) + +#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) +#undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) +#undef JSON_HEDLEY_CLANG_HAS_WARNING +#endif +#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) + +#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ + + +// This file contains All internal macro definitions +// You MUST include macro_unscope.hpp at the end of json.hpp to undef All of them + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) +#if defined(__clang__) +#if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 +#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" +#endif +#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) +#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 +#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" +#endif +#endif +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 +#define JSON_HAS_CPP_17 +#define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) +#define JSON_HAS_CPP_14 +#endif + +// disable float-equal warnings on GCC/clang +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +// disable documentation warnings on clang +#if defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdocumentation" +#endif + +// allow to disable exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) +#define JSON_THROW(exception) throw exception +#define JSON_TRY try +#define JSON_CATCH(exception) catch(exception) +#define JSON_INTERNAL_CATCH(exception) catch(exception) +#else +#include +#define JSON_THROW(exception) std::abort() +#define JSON_TRY if(true) +#define JSON_CATCH(exception) if(false) +#define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) +#undef JSON_THROW +#define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) +#undef JSON_TRY +#define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) +#undef JSON_CATCH +#define JSON_CATCH JSON_CATCH_USER +#undef JSON_INTERNAL_CATCH +#define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) +#undef JSON_INTERNAL_CATCH +#define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [&j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + + +namespace nlohmann { + namespace detail { + //////////////// + // exceptions // + //////////////// + + /*! + @brief general exception of the @ref basic_json class + + This class is an extension of `std::exception` objects with a member @a id for + exception ids. It is used as the base class for All exceptions thrown by the + @ref basic_json class. This class can hence be used as "wildcard" to catch + exceptions. + + Subclasses: + - @ref parse_error for exceptions indicating a parse error + - @ref invalid_iterator for exceptions indicating errors with iterators + - @ref type_error for exceptions indicating executing a member function with + a wrong type + - @ref out_of_range for exceptions indicating access out of the defined range + - @ref other_error for exceptions indicating other library errors + + @internal + @note To have nothrow-copy-constructible exceptions, we internally use + `std::runtime_error` which can cope with arbitrary-length error messages. + Intermediate strings are built with static functions and then passed to + the actual constructor. + @endinternal + + @liveexample{The following code shows how arbitrary library exceptions can be + caught.,exception} + + @since version 3.0.0 + */ + class exception : public std::exception { + public: + /// returns the explanatory string + JSON_HEDLEY_RETURNS_NON_NULL + const char* what() const noexcept override { + return m.what(); + } + + /// the id of the exception + const int id; + + protected: + JSON_HEDLEY_NON_NULL(3) + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} + + static std::string name(const std::string& ename, int id_) { + return "[json.exception." + ename + "." + std::to_string(id_) + "] "; + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; + }; + + /*! + @brief exception indicating a parse error + + This exception is thrown by the library when a parse error occurs. Parse errors + can occur during the deserialization of JSON text, CBOR, MessagePack, as well + as when using JSON Patch. + + Member @a byte holds the byte index of the last read character in the input + file. + + Exceptions have ids 1xx. + + name / id | example message | description + ------------------------------ | --------------- | ------------------------- + json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. + json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. + json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. + json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. + json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. + json.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`. + json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. + json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences. + json.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number. + json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. + json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not All types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. + json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. + json.exception.parse_error.114 | parse error: Unsupported BSON record type 0x0F | The parsing of the corresponding BSON record type is not implemented (yet). + + @note For an input with n bytes, 1 is the index of the first character and n+1 + is the index of the terminating null byte or the end of file. This also + holds true when reading a byte vector (CBOR or MessagePack). + + @liveexample{The following code shows how a `parse_error` exception can be + caught.,parse_error} + + @sa - @ref exception for the base class of the library exceptions + @sa - @ref invalid_iterator for exceptions indicating errors with iterators + @sa - @ref type_error for exceptions indicating executing a member function with + a wrong type + @sa - @ref out_of_range for exceptions indicating access out of the defined range + @sa - @ref other_error for exceptions indicating other library errors + + @since version 3.0.0 + */ + class parse_error : public exception { + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] pos the position where the error occurred (or with + chars_read_total=0 if the position cannot be + determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + static parse_error create(int id_, const position_t& pos, const std::string& what_arg) { + std::string w = exception::name("parse_error", id_) + "parse error" + + position_string(pos) + ": " + what_arg; + return parse_error(id_, pos.chars_read_total, w.c_str()); + } + + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg) { + std::string w = exception::name("parse_error", id_) + "parse error" + + (byte_ != 0 ? (" at byte " + std::to_string(byte_)) : "") + + ": " + what_arg; + return parse_error(id_, byte_, w.c_str()); + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} + + static std::string position_string(const position_t& pos) { + return " at line " + std::to_string(pos.lines_read + 1) + + ", column " + std::to_string(pos.chars_read_current_line); + } + }; + + /*! + @brief exception indicating errors with iterators + + This exception is thrown if iterators passed to a library function do not match + the expected semantics. + + Exceptions have ids 2xx. + + name / id | example message | description + ----------------------------------- | --------------- | ------------------------- + json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. + json.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. + json.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. + json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid. + json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. + json.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. + json.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. + json.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. + json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. + json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. + json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to. + json.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container. + json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compared, because JSON objects are unordered. + json.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin(). + + @liveexample{The following code shows how an `invalid_iterator` exception can be + caught.,invalid_iterator} + + @sa - @ref exception for the base class of the library exceptions + @sa - @ref parse_error for exceptions indicating a parse error + @sa - @ref type_error for exceptions indicating executing a member function with + a wrong type + @sa - @ref out_of_range for exceptions indicating access out of the defined range + @sa - @ref other_error for exceptions indicating other library errors + + @since version 3.0.0 + */ + class invalid_iterator : public exception { + public: + static invalid_iterator create(int id_, const std::string& what_arg) { + std::string w = exception::name("invalid_iterator", id_) + what_arg; + return invalid_iterator(id_, w.c_str()); + } + + private: + JSON_HEDLEY_NON_NULL(3) + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} + }; + + /*! + @brief exception indicating executing a member function with a wrong type + + This exception is thrown in case of a type error; that is, a library function is + executed on a JSON value whose type does not match the expected semantics. + + Exceptions have ids 3xx. + + name / id | example message | description + ----------------------------- | --------------- | ------------------------- + json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. + json.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. + json.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t &. + json.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types. + json.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. + json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types. + json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types. + json.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. + json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types. + json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types. + json.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types. + json.exception.type_error.312 | cannot use update() with string | The @ref update() member functions can only be executed for certain JSON types. + json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. + json.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers. + json.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive. + json.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. | + json.exception.type_error.317 | JSON value cannot be serialized to requested format | The dynamic type of the object cannot be represented in the requested serialization format (e.g. a raw `true` or `null` JSON object cannot be serialized to BSON) | + + @liveexample{The following code shows how a `type_error` exception can be + caught.,type_error} + + @sa - @ref exception for the base class of the library exceptions + @sa - @ref parse_error for exceptions indicating a parse error + @sa - @ref invalid_iterator for exceptions indicating errors with iterators + @sa - @ref out_of_range for exceptions indicating access out of the defined range + @sa - @ref other_error for exceptions indicating other library errors + + @since version 3.0.0 + */ + class type_error : public exception { + public: + static type_error create(int id_, const std::string& what_arg) { + std::string w = exception::name("type_error", id_) + what_arg; + return type_error(id_, w.c_str()); + } + + private: + JSON_HEDLEY_NON_NULL(3) + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} + }; + + /*! + @brief exception indicating access out of the defined range + + This exception is thrown in case a library function is called on an input + parameter that exceeds the expected range, for instance in case of array + indices or nonexisting object keys. + + Exceptions have ids 4xx. + + name / id | example message | description + ------------------------------- | --------------- | ------------------------- + json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1. + json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. + json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. + json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. + json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. + json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. + json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. | + json.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. | + json.exception.out_of_range.409 | BSON key cannot contain code point U+0000 (at byte 2) | Key identifiers to be serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string | + + @liveexample{The following code shows how an `out_of_range` exception can be + caught.,out_of_range} + + @sa - @ref exception for the base class of the library exceptions + @sa - @ref parse_error for exceptions indicating a parse error + @sa - @ref invalid_iterator for exceptions indicating errors with iterators + @sa - @ref type_error for exceptions indicating executing a member function with + a wrong type + @sa - @ref other_error for exceptions indicating other library errors + + @since version 3.0.0 + */ + class out_of_range : public exception { + public: + static out_of_range create(int id_, const std::string& what_arg) { + std::string w = exception::name("out_of_range", id_) + what_arg; + return out_of_range(id_, w.c_str()); + } + + private: + JSON_HEDLEY_NON_NULL(3) + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} + }; + + /*! + @brief exception indicating other library errors + + This exception is thrown in case of errors that cannot be classified with the + other exception types. + + Exceptions have ids 5xx. + + name / id | example message | description + ------------------------------ | --------------- | ------------------------- + json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. + + @sa - @ref exception for the base class of the library exceptions + @sa - @ref parse_error for exceptions indicating a parse error + @sa - @ref invalid_iterator for exceptions indicating errors with iterators + @sa - @ref type_error for exceptions indicating executing a member function with + a wrong type + @sa - @ref out_of_range for exceptions indicating access out of the defined range + + @liveexample{The following code shows how an `other_error` exception can be + caught.,other_error} + + @since version 3.0.0 + */ + class other_error : public exception { + public: + static other_error create(int id_, const std::string& what_arg) { + std::string w = exception::name("other_error", id_) + what_arg; + return other_error(id_, w.c_str()); + } + + private: + JSON_HEDLEY_NON_NULL(3) + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} + }; + } // namespace detail +} // namespace nlohmann + +// #include + +// #include + + +#include // not +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type + +namespace nlohmann { + namespace detail { + // alias templates to reduce boilerplate + template + using enable_if_t = typename std::enable_if::type; + + template + using uncvref_t = typename std::remove_cv::type>::type; + + // implementation of C++14 index_sequence and affiliates + // source: https://stackoverflow.com/a/32223343 + template + struct index_sequence { + using type = index_sequence; + using value_type = std::size_t; + static constexpr std::size_t size() noexcept { + return sizeof...(Ints); + } + }; + + template + struct merge_and_renumber; + + template + struct merge_and_renumber, index_sequence> + : index_sequence < I1..., (sizeof...(I1) + I2)... > {}; + + template + struct make_index_sequence + : merge_and_renumber < typename make_index_sequence < N / 2 >::type, + typename make_index_sequence < N - N / 2 >::type > {}; + + template<> struct make_index_sequence<0> : index_sequence<> {}; + template<> struct make_index_sequence<1> : index_sequence<0> {}; + + template + using index_sequence_for = make_index_sequence; + + // dispatch utility (taken from ranges-v3) + template struct priority_tag : priority_tag < N - 1 > {}; + template<> struct priority_tag<0> {}; + + // taken from ranges-v3 + template + struct static_const { + static constexpr T value{}; + }; + + template + constexpr T static_const::value; + } // namespace detail +} // namespace nlohmann + +// #include + + +#include // not +#include // numeric_limits +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval + +// #include + + +#include // random_access_iterator_tag + +// #include + + +namespace nlohmann { + namespace detail { + template struct make_void { + using type = void; + }; + template using void_t = typename make_void::type; + } // namespace detail +} // namespace nlohmann + +// #include + + +namespace nlohmann { + namespace detail { + template + struct iterator_types {}; + + template + struct iterator_types < + It, + void_t> + { + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; + }; + + // This is required as some compilers implement std::iterator_traits in a way that + // doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. + template + struct iterator_traits {}; + + template + struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> + : iterator_types {}; + + template + struct iterator_traits::value>> { + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; + }; + } // namespace detail +} // namespace nlohmann + +// #include + +// #include + +// #include + + +#include + +// #include + + +// http://en.cppreference.com/w/cpp/experimental/is_detected +namespace nlohmann { + namespace detail { + struct nonesuch { + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; + }; + + template class Op, + class... Args> + struct detector { + using value_t = std::false_type; + using type = Default; + }; + + template class Op, class... Args> + struct detector>, Op, Args...> { + using value_t = std::true_type; + using type = Op; + }; + + template