removes ability to use /perks will in army vehicles
This commit is contained in:
parent
654b304d2f
commit
c95767b7fa
@ -217,9 +217,12 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
|
||||
/* ** Commands ** */
|
||||
CMD:perks( playerid, params[ ] )
|
||||
{
|
||||
if ( IsPlayerInEvent( playerid ) || IsPlayerInBattleRoyale( playerid ) ) {
|
||||
if ( IsPlayerInEvent( playerid ) || IsPlayerInBattleRoyale( playerid ) )
|
||||
return SendError( playerid, "You cannot use this command since you're in an event." );
|
||||
}
|
||||
|
||||
if ( IsPlayerInArmyVehicle( playerid ) )
|
||||
return SendError( playerid, "You cannot use this command while in an army vehicle." );
|
||||
|
||||
return ShowPlayerDialog( playerid, DIALOG_PERKS, DIALOG_STYLE_LIST, "{FFFFFF}Game Perks", "Player Perks\nVehicle Perks", "Select", "Cancel" );
|
||||
}
|
||||
|
||||
|
@ -7063,4 +7063,17 @@ stock IsPlayerDead( playerid )
|
||||
return health <= 0.0;
|
||||
|
||||
return GetPlayerState( playerid ) == PLAYER_STATE_WASTED;
|
||||
}
|
||||
|
||||
stock IsPlayerInArmyVehicle( playerid )
|
||||
{
|
||||
new
|
||||
vehicleid = GetPlayerVehicleID( playerid ),
|
||||
vehiclemodelid = GetVehicleModel( vehicleid )
|
||||
;
|
||||
|
||||
if ( vehiclemodelid == 425 || vehiclemodelid == 432 || vehiclemodelid == 520 ) //Rhino, Tank, Hydra
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
Loading…
Reference in New Issue
Block a user