2022-05-04 19:16:40 +02:00
# include "views/view.hpp"
namespace big
{
2023-07-15 23:19:38 +02:00
static inline void set_all_protections ( bool state )
{
for ( size_t i = ( size_t ) & g . protections ; i < = ( size_t ) & ( g . protections . kick_rejoin ) ; i + + )
* ( bool * ) i = state ;
}
2022-05-04 19:16:40 +02:00
void view : : protection_settings ( )
{
2023-07-15 23:19:38 +02:00
auto initial_protections = g . protections ;
2022-05-04 19:16:40 +02:00
ImGui : : BeginGroup ( ) ;
2023-02-01 19:46:33 +01:00
ImGui : : Checkbox ( " BOUNTY " _T . data ( ) , & g . protections . script_events . bounty ) ;
ImGui : : Checkbox ( " CEO_MONEY " _T . data ( ) , & g . protections . script_events . ceo_money ) ;
ImGui : : Checkbox ( " FAKE_DEPOSIT " _T . data ( ) , & g . protections . script_events . fake_deposit ) ;
ImGui : : Checkbox ( " FORCE_MISSION " _T . data ( ) , & g . protections . script_events . force_mission ) ;
ImGui : : Checkbox ( " FORCE_TELEPORT " _T . data ( ) , & g . protections . script_events . force_teleport ) ;
ImGui : : Checkbox ( " GTA_BANNER " _T . data ( ) , & g . protections . script_events . gta_banner ) ;
ImGui : : Checkbox ( " MC_TELEPORT " _T . data ( ) , & g . protections . script_events . mc_teleport ) ;
2022-05-04 19:16:40 +02:00
ImGui : : EndGroup ( ) ;
ImGui : : SameLine ( ) ;
ImGui : : BeginGroup ( ) ;
2023-02-01 19:46:33 +01:00
ImGui : : Checkbox ( " SEND_TO_CUTSCENE " _T . data ( ) , & g . protections . script_events . send_to_cutscene ) ;
ImGui : : Checkbox ( " SEND_TO_LOCATION " _T . data ( ) , & g . protections . script_events . send_to_location ) ;
ImGui : : Checkbox ( " SOUND_SPAM " _T . data ( ) , & g . protections . script_events . sound_spam ) ;
ImGui : : Checkbox ( " PERSONAL_VEHICLE_DESTROYED " _T . data ( ) , & g . protections . script_events . personal_vehicle_destroyed ) ;
ImGui : : Checkbox ( " REMOTE_OFF_RADAR " _T . data ( ) , & g . protections . script_events . remote_off_radar ) ;
ImGui : : Checkbox ( " ROTATE_CAM " _T . data ( ) , & g . protections . script_events . rotate_cam ) ;
ImGui : : Checkbox ( " TELEPORT_TO_WAREHOUSE " _T . data ( ) , & g . protections . script_events . teleport_to_warehouse ) ;
2022-05-04 19:16:40 +02:00
ImGui : : EndGroup ( ) ;
ImGui : : SameLine ( ) ;
ImGui : : BeginGroup ( ) ;
2023-02-01 19:46:33 +01:00
ImGui : : Checkbox ( " START_ACTIVITY " _T . data ( ) , & g . protections . script_events . start_activity ) ;
ImGui : : Checkbox ( " SEND_SMS " _T . data ( ) , & g . protections . script_events . send_sms ) ;
ImGui : : Checkbox ( " SPECTATE " _T . data ( ) , & g . protections . script_events . spectate ) ;
ImGui : : Checkbox ( " VEHICLE_KICK " _T . data ( ) , & g . protections . script_events . vehicle_kick ) ;
ImGui : : Checkbox ( " WANTED_LEVEL " _T . data ( ) , & g . protections . script_events . clear_wanted_level ) ;
2022-05-04 19:16:40 +02:00
ImGui : : EndGroup ( ) ;
2022-08-29 10:26:18 +00:00
ImGui : : SameLine ( ) ;
ImGui : : BeginGroup ( ) ;
2023-02-01 19:46:33 +01:00
ImGui : : Checkbox ( " BLOCK_RID_JOINING " _T . data ( ) , & g . protections . rid_join ) ;
2022-11-13 16:34:44 +00:00
if ( ImGui : : IsItemHovered ( ) )
2023-02-01 19:46:33 +01:00
ImGui : : SetTooltip ( " BLOCK_RID_JOINING_DESCRIPTION " _T . data ( ) ) ;
2023-06-10 09:21:57 -04:00
ImGui : : Checkbox ( " RECEIVE_PICKUP " _T . data ( ) , & g . protections . receive_pickup ) ;
2023-02-04 23:20:49 +01:00
if ( ImGui : : IsItemHovered ( ) )
2023-06-30 22:03:17 +00:00
ImGui : : SetTooltip ( " This prevents the collection of pickups such as unwanted money bags \n Note: Normal pickups are also no longer possible to collect with this enabled " ) ;
2023-06-10 09:21:57 -04:00
ImGui : : Checkbox ( " ADMIN_CHECK " _T . data ( ) , & g . protections . admin_check ) ;
2023-07-12 17:03:29 +00:00
ImGui : : Checkbox ( " Kick Rejoin " , & g . protections . kick_rejoin ) ;
2022-08-29 10:26:18 +00:00
ImGui : : EndGroup ( ) ;
2022-05-04 19:16:40 +02:00
2023-07-15 23:19:38 +02:00
ImGui : : SeparatorText ( " Options " ) ;
ImGui : : BeginGroup ( ) ;
if ( ImGui : : Button ( " Enable All Protections " ) )
set_all_protections ( true ) ;
ImGui : : SameLine ( ) ;
if ( ImGui : : Button ( " Disable All Protections " ) )
set_all_protections ( false ) ;
ImGui : : SameLine ( ) ;
if ( ImGui : : Button ( " Reset Protections " ) )
g . protections = initial_protections ;
ImGui : : EndGroup ( ) ;
} ;
2022-05-04 19:16:40 +02:00
}