From bfa237c5e45d345d8becb8f93acb6240f08ea15d Mon Sep 17 00:00:00 2001 From: Cloudy <36423427+meCloudy@users.noreply.github.com> Date: Wed, 29 May 2019 17:34:54 +0300 Subject: [PATCH 1/6] Update jail.pwn --- gamemodes/irresistible/cnr/features/cop/jail.pwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gamemodes/irresistible/cnr/features/cop/jail.pwn b/gamemodes/irresistible/cnr/features/cop/jail.pwn index 2a13ec1..c6df2e5 100644 --- a/gamemodes/irresistible/cnr/features/cop/jail.pwn +++ b/gamemodes/irresistible/cnr/features/cop/jail.pwn @@ -264,6 +264,7 @@ stock JailPlayer( playerid, seconds, admin = 0 ) p_DetainedLabel [ playerid ] = Text3D: INVALID_3DTEXT_ID; p_DetainedBy [ playerid ] = INVALID_PLAYER_ID; + RemovePlayerFromEvent ( playerid, true ); CancelEdit ( playerid ); RemovePlayerStolensFromHands( playerid ); StopPlayerUsingSlotMachine ( playerid ); @@ -541,4 +542,4 @@ stock jailDoors( playerid, remove = false, set_closed = true ) DestroyDynamicObject( p_AlcatrazObject[ playerid ] ), p_AlcatrazObject[ playerid ] = INVALID_OBJECT_ID; } -} \ No newline at end of file +} From a2f11b3786b8fda141ac9f200ccd0451daf69cbb Mon Sep 17 00:00:00 2001 From: Cloudy <36423427+meCloudy@users.noreply.github.com> Date: Thu, 30 May 2019 09:10:05 +0300 Subject: [PATCH 2/6] Update jail.pwn --- gamemodes/irresistible/cnr/features/cop/jail.pwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gamemodes/irresistible/cnr/features/cop/jail.pwn b/gamemodes/irresistible/cnr/features/cop/jail.pwn index c6df2e5..df75ad4 100644 --- a/gamemodes/irresistible/cnr/features/cop/jail.pwn +++ b/gamemodes/irresistible/cnr/features/cop/jail.pwn @@ -264,7 +264,9 @@ stock JailPlayer( playerid, seconds, admin = 0 ) p_DetainedLabel [ playerid ] = Text3D: INVALID_3DTEXT_ID; p_DetainedBy [ playerid ] = INVALID_PLAYER_ID; + #if defined __cloudy_event_system RemovePlayerFromEvent ( playerid, true ); + #endif CancelEdit ( playerid ); RemovePlayerStolensFromHands( playerid ); StopPlayerUsingSlotMachine ( playerid ); From 1460db6af77dd21fc38ccf4505da0f724dd94761 Mon Sep 17 00:00:00 2001 From: Cloudy <36423427+meCloudy@users.noreply.github.com> Date: Sun, 2 Jun 2019 01:01:26 +0300 Subject: [PATCH 3/6] Adds variable Adds the p_TogglePBChat variable to player.pwn --- gamemodes/irresistible/cnr/player.pwn | 1 + 1 file changed, 1 insertion(+) diff --git a/gamemodes/irresistible/cnr/player.pwn b/gamemodes/irresistible/cnr/player.pwn index 0ac02ff..ea5a19b 100644 --- a/gamemodes/irresistible/cnr/player.pwn +++ b/gamemodes/irresistible/cnr/player.pwn @@ -38,6 +38,7 @@ new bool: p_Kidnapped [ MAX_PLAYERS char ], bool: p_ToggledViewPM [ MAX_PLAYERS char ], bool: p_ToggleCopChat [ MAX_PLAYERS char ], + bool: p_TogglePBChat [ MAX_PLAYERS char ], bool: p_pausedToLoad [ MAX_PLAYERS char ], bool: p_CantUseReport [ MAX_PLAYERS char ], p_pausedToLoadTimer [ MAX_PLAYERS ], From 80637fd0cb7244b3a27e6e10320d5fab75f1b934 Mon Sep 17 00:00:00 2001 From: Cloudy <36423427+meCloudy@users.noreply.github.com> Date: Sun, 2 Jun 2019 01:09:57 +0300 Subject: [PATCH 4/6] Adds /viewpbchat to /acmds Adds the new /viewpbchat command to level 5 admin commands list. --- gamemodes/irresistible/cnr/commands/admin/_admin.pwn | 1 + 1 file changed, 1 insertion(+) diff --git a/gamemodes/irresistible/cnr/commands/admin/_admin.pwn b/gamemodes/irresistible/cnr/commands/admin/_admin.pwn index a4eede9..5d519e8 100644 --- a/gamemodes/irresistible/cnr/commands/admin/_admin.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/_admin.pwn @@ -163,6 +163,7 @@ static stock { 5, "/seteventhost", "Setting event host to player" }, { 5, "/weather", "Settings world weather" }, { 5, "/viewpolicechat", "Viewing the police radio/chat" }, + { 5, "/viewpbchat", "Viewing all paintball lobbies chats" }, /* ** Level 6 Commands ** */ { 6, "/reloadeditor", "Reloads object editer script" }, 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 5/6] 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 From 3b36340f3e8a49ed8f937ccea9d53035a7785edc Mon Sep 17 00:00:00 2001 From: Cloudy <36423427+meCloudy@users.noreply.github.com> Date: Sun, 2 Jun 2019 01:11:26 +0300 Subject: [PATCH 6/6] Update for /viewpbchat Sends a message to all admins who are viewing pb chats. --- gamemodes/irresistible/cnr/features/paintball.pwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gamemodes/irresistible/cnr/features/paintball.pwn b/gamemodes/irresistible/cnr/features/paintball.pwn index 54b10a4..a35c8d7 100644 --- a/gamemodes/irresistible/cnr/features/paintball.pwn +++ b/gamemodes/irresistible/cnr/features/paintball.pwn @@ -417,6 +417,10 @@ CMD:p( playerid, params[ ] ) else { SendClientMessageToPaintball( id, -1, ""COL_GREY" %s(%d):"COL_WHITE" %s", ReturnPlayerName( playerid ), playerid, msg ); + + foreach ( new i : Player ) if ( ( p_AdminLevel[ i ] >= 5 || IsPlayerUnderCover( i ) ) && p_TogglePBChat{ i } == true ) { + SendClientMessageFormatted( i, -1, ""COL_GREY" %s(%d):"COL_WHITE" %s", id, ReturnPlayerName( playerid ), playerid, msg ); + } } return 1; }