fixes "/pb leave"

This commit is contained in:
Steven Howard 2018-09-16 15:47:22 +01:00
parent 2b0f96e0d1
commit 22532b95f1

View File

@ -557,6 +557,17 @@ CMD:paintball( playerid, params[ ] )
if ( !IsPlayerInPaintBall( playerid ) )
return SendError( playerid, "You're not in any paintball lobby." );
if ( strmatch( params, "leave" ) )
{
if ( !IsPlayerInPaintBall( playerid ) )
return SendError( playerid, "You're not inside the paintball." );
LeavePlayerPaintball( playerid );
SetPlayerHealth( playerid, -1 );
SendServerMessage( playerid, "You have left the paintball arena." );
return 1;
}
if ( !hasPaintBallArena( playerid ) )
return SendError( playerid, "This command requires you to be the host of a lobby." );
@ -611,16 +622,6 @@ CMD:paintball( playerid, params[ ] )
g_paintballData[ id ] [ E_CD_TIMER ] = SetTimerEx( "paintballCountDown", 960, false, "dd", id, iSeconds - 1 );
}
}
else if ( strmatch( params, "leave" ) )
{
if ( !IsPlayerInPaintBall( playerid ) )
return SendError( playerid, "You're not inside the paintball." );
LeavePlayerPaintball( playerid );
SetPlayerHealth( playerid, -1 );
SendServerMessage( playerid, "You have left the paintball arena." );
return 1;
}
else
{
SendUsage( playerid, "/paintball [LEAVE/EDIT/KICK/COUNTDOWN/LEADER]" );