Merge branch 'master' of ssh://bitbucket.org/lorenc/cnr

This commit is contained in:
Lorenc Pekaj 2018-09-17 05:58:02 +10:00
commit 5b05305b17

View File

@ -560,6 +560,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." );
@ -614,16 +625,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]" );