From 6929b4a65351a2ab64767e0ed9e6be6b914066fa Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Sat, 23 Feb 2019 19:27:08 +1100 Subject: [PATCH] cannot leave battle royale unless spawned --- .../irresistible/cnr/features/battleroyale/battleroyale.pwn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gamemodes/irresistible/cnr/features/battleroyale/battleroyale.pwn b/gamemodes/irresistible/cnr/features/battleroyale/battleroyale.pwn index 5b257b3..bd4402b 100644 --- a/gamemodes/irresistible/cnr/features/battleroyale/battleroyale.pwn +++ b/gamemodes/irresistible/cnr/features/battleroyale/battleroyale.pwn @@ -622,6 +622,9 @@ CMD:battleroyale( playerid, params[ ] ) } else if ( strmatch ( params, "leave" ) ) { + if ( ! p_battleRoyaleSpawned{ playerid } && br_lobbyData[ lobbyid ] [ E_STATUS ] == E_STATUS_STARTED ) { + return SendError( playerid, "You must be spawned before you can leave the match." ); + } BattleRoyale_SendMessage( lobbyid, "%s(%d) has disconnected from the match!", ReturnPlayerName( playerid ), playerid ); BattleRoyale_RemovePlayer( playerid, true ); SpawnPlayer( playerid );