From b0f2c13c1bbac7ecbbc1e780358b950ef183c407 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Fri, 3 Jun 2022 18:32:23 -0400 Subject: [PATCH] Admin2Admin for SA in-game --- Classic/scripts/autoexec/VoteMenu.cs | 32 +++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index 19f8e0f..9bd3446 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -240,7 +240,16 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) messageClient(%client, 'MsgVoteItem', "", %key, 'VoteTeamDamage', 'enable team damage', 'Enable Team Damage'); } } - //Super Admin Only - Disabled for now + + //Super Admin Only + if(%client.isSuperAdmin) + { + if($Host::AllowAdmin2Admin) //Toggle Admin2Admin + messageClient( %client, 'MsgVoteItem', "", %key, 'Admins2Admin', 'Disable Admins to Admin', "Disable Admins to Admin" ); + else + messageClient( %client, 'MsgVoteItem', "", %key, 'Admins2Admin', 'Enable Admins to Admin', "Enable Admins to Admin" ); + } + //Disabled for now // if(%client.isSuperAdmin) // { // if($Host::EnableNetTourneyClient) //Toggle Tournament Net Client @@ -248,6 +257,7 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) // else // messageClient( %client, 'MsgVoteItem', "", %key, 'ToggleTourneyNetClient', 'Enable Tournament Net Client', "Enable Tournament Net Client" ); // } + //Everyone if ($Host::ServerRules[1] !$= "" ) messageClient( %client, 'MsgVoteItem', "", %key, 'showServerRules', 'show server rules', "Show Server Rules" ); @@ -606,6 +616,26 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % } return; + case "Admins2Admin": + if(%client.isSuperAdmin) + { + if($Host::AllowAdmin2Admin) + { + $Host::AllowAdmin2Admin = 0; + + messageAdmins('', %client.nameBase @ " has disabled Admins to Admin.~wfx/powered/vehicle_screen_on.wav" ); + adminLog(%client, " has disabled Admins to Admin."); + } + else + { + $Host::AllowAdmin2Admin = 1; + + messageAdmins('', %client.nameBase @ " has enabled Admins to Admin.~wfx/powered/vehicle_screen_on.wav" ); + adminLog(%client, " has enabled Admins to Admin."); + } + } + return; + case "ToggleTourneyNetClient": if(%client.isSuperAdmin) {