cannot leave battle royale unless spawned
This commit is contained in:
parent
5a166dbfa5
commit
6929b4a653
@ -622,6 +622,9 @@ CMD:battleroyale( playerid, params[ ] )
|
|||||||
}
|
}
|
||||||
else if ( strmatch ( params, "leave" ) )
|
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_SendMessage( lobbyid, "%s(%d) has disconnected from the match!", ReturnPlayerName( playerid ), playerid );
|
||||||
BattleRoyale_RemovePlayer( playerid, true );
|
BattleRoyale_RemovePlayer( playerid, true );
|
||||||
SpawnPlayer( playerid );
|
SpawnPlayer( playerid );
|
||||||
|
Loading…
Reference in New Issue
Block a user