From 097cece22460d81a1b79fe0152642ec9358014c6 Mon Sep 17 00:00:00 2001 From: Cloudy <36423427+meCloudy@users.noreply.github.com> Date: Sun, 2 Jun 2019 01:11:00 +0300 Subject: [PATCH] viewpbchat command The command /viewpbchat, enables level 5 admins or higher to view pb lobby chats. --- .../irresistible/cnr/commands/admin/admin_five.pwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn b/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn index a423ef9..2013ba5 100644 --- a/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn @@ -32,6 +32,18 @@ CMD:viewpolicechat( playerid, params[ ] ) return 1; } +CMD:viewpbchat( playerid, params[ ] ) +{ + if ( p_AdminLevel[ playerid ] < 5 && !IsPlayerUnderCover( playerid ) ) return SendError( playerid, ADMIN_COMMAND_REJECT ); + p_TogglePBChat{ playerid } = !p_TogglePBChat{ playerid }; + + SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have %s viewing paint-ball chat.", p_TogglePBChat{ playerid } == true ? ("toggled") : ("un-toggled") ); + if ( !IsPlayerUnderCover( playerid ) ) { + AddAdminLogLineFormatted( "%s(%d) has %s viewing paintball chat", ReturnPlayerName( playerid ), playerid, p_TogglePBChat{ playerid } == true ? ("toggled") : ("un-toggled") ); + } + return 1; +} + CMD:check( playerid, params[ ] ) { new