disabling some commands for battle royale

This commit is contained in:
Stev 2019-02-17 21:13:32 +00:00
parent 8237e7047f
commit dab9197012
4 changed files with 11 additions and 3 deletions

View File

@ -235,6 +235,7 @@ stock TazePlayer( victimid, playerid )
//else if ( victimid == playerid ) return SendError( playerid, "You cannot taze yourself." ); //else if ( victimid == playerid ) return SendError( playerid, "You cannot taze yourself." );
else if ( !IsPlayerConnected( victimid ) ) return SendError( playerid, "There are no players around to taze." ); else if ( !IsPlayerConnected( victimid ) ) return SendError( playerid, "There are no players around to taze." );
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." ); else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 5.0 && IsPlayerConnected( victimid ) ) else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 5.0 && IsPlayerConnected( victimid ) )
{ {
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." ); if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." );
@ -288,6 +289,7 @@ stock ArrestPlayer( victimid, playerid )
// else if ( victimid == playerid ) return SendError( playerid, "You cannot arrest yourself." ); // else if ( victimid == playerid ) return SendError( playerid, "You cannot arrest yourself." );
else if ( !IsPlayerConnected( victimid ) ) return SendError( playerid, "This player is not connected." ); else if ( !IsPlayerConnected( victimid ) ) return SendError( playerid, "This player is not connected." );
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." ); else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) ) else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
{ {
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." ); if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." );
@ -347,6 +349,7 @@ stock CuffPlayer( victimid, playerid )
//else if ( victimid == playerid ) return SendError( playerid, "You cannot cuff yourself." ); //else if ( victimid == playerid ) return SendError( playerid, "You cannot cuff yourself." );
else if ( !IsPlayerConnected( victimid ) || IsPlayerNPC( victimid ) ) return SendError( playerid, "This player is not connected." ); else if ( !IsPlayerConnected( victimid ) || IsPlayerNPC( victimid ) ) return SendError( playerid, "This player is not connected." );
else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." ); else if ( p_Spectating{ playerid } ) return SendError( playerid, "You cannot use such commands while you're spectating." );
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) ) else if ( GetDistanceBetweenPlayers( playerid, victimid ) < 4.0 && IsPlayerConnected( victimid ) )
{ {
if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." ); if ( p_Class[ victimid ] == p_Class[ playerid ] ) return SendError( playerid, "This player is in your team." );

View File

@ -568,6 +568,9 @@ CMD:sync( playerid, params[ ] )
if ( IsPlayerPassive( playerid ) ) if ( IsPlayerPassive( playerid ) )
return SendError( playerid, "You cannot use this feature while in passive mode." ); return SendError( playerid, "You cannot use this feature while in passive mode." );
if ( IsPlayerInBattleRoyale( playerid ) )
return SendError( playerid, "You cannot use this command while in Battle Royale." );
new new
curr_server_time = GetServerTime( ); curr_server_time = GetServerTime( );

View File

@ -217,7 +217,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
/* ** Commands ** */ /* ** Commands ** */
CMD:perks( playerid, params[ ] ) CMD:perks( playerid, params[ ] )
{ {
if ( IsPlayerInEvent( playerid ) ) { if ( IsPlayerInEvent( playerid ) || IsPlayerInBattleRoyale( playerid ) ) {
return SendError( playerid, "You cannot use this command since you're in an event." ); return SendError( playerid, "You cannot use this command since you're in an event." );
} }
return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Player Perks\nVehicle Perks", "Select", "Cancel" ); return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Player Perks\nVehicle Perks", "Select", "Cancel" );

View File

@ -2363,6 +2363,7 @@ CMD:mech( playerid, params[ ] )
if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "You must be a civilian to use this command." ); if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "You must be a civilian to use this command." );
else if ( !IsPlayerJob( playerid, JOB_DIRTY_MECHANIC ) ) return SendError( playerid, "You are not a dirty mechanic." ); else if ( !IsPlayerJob( playerid, JOB_DIRTY_MECHANIC ) ) return SendError( playerid, "You are not a dirty mechanic." );
else if ( IsPlayerBelowSeaLevel( playerid ) ) return SendError( playerid, "You cannot use this command while below sea level." ); else if ( IsPlayerBelowSeaLevel( playerid ) ) return SendError( playerid, "You cannot use this command while below sea level." );
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
else if ( isnull( params ) ) return SendUsage( playerid, "/(mech)anic [FIX/NOS/REMP/FLIP/FLIX/PRICE/NEARBY]" ); else if ( isnull( params ) ) return SendUsage( playerid, "/(mech)anic [FIX/NOS/REMP/FLIP/FLIX/PRICE/NEARBY]" );
else if ( strmatch( params, "fix" ) ) else if ( strmatch( params, "fix" ) )
{ {
@ -3442,6 +3443,7 @@ CMD:track( playerid, params[ ] )
if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to civilians only." ); if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to civilians only." );
else if ( !IsPlayerJob( playerid, JOB_HITMAN ) ) return SendError( playerid, "You have to be a hitman to use this command." ); else if ( !IsPlayerJob( playerid, JOB_HITMAN ) ) return SendError( playerid, "You have to be a hitman to use this command." );
else if ( IsPlayerInBattleRoyale( playerid ) ) return SendError( playerid, "You cannot use this command while in Battle Royale." );
else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/track [PLAYER_ID]" ); else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/track [PLAYER_ID]" );
else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "This player isn't connected!" ); else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "This player isn't connected!" );
else if ( pID == playerid ) return SendError( playerid, "You cannot apply this to yourself." ); else if ( pID == playerid ) return SendError( playerid, "You cannot apply this to yourself." );