02.01.2012, 15:35
Alright, I have my vehicle check script to check if a players allowed in that vehicle ( faction vehicle )
but I have to create a SWAT base which as 30 vehicles and I don't want to create a massive if() line which checks the vehicles ids
I'm wondering if I can stock() the GetPlayerVehicleID ?
see what I mean about the
So basicly all I'm saying is how can I get it all in 1 function?
but I have to create a SWAT base which as 30 vehicles and I don't want to create a massive if() line which checks the vehicles ids
I'm wondering if I can stock() the GetPlayerVehicleID ?
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerVehicleID(playerid) == 45 || GetPlayerVehicleID(playerid) == 46 || GetPlayerVehicleID(playerid) == 47 || GetPlayerVehicleID(playerid) == 48 && Taxijob[playerid] == 0)
{
RemovePlayerFromVehicle(playerid);
ShowPlayerDialog(playerid, 3702, DIALOG_STYLE_MSGBOX, "No Keys", "You do not have the keys to this vehicle\nThis means you either don't have the Job/Faction .", "Ok", "");
return 1;
}
if(GetPlayerVehicleID(playerid) == 49 || GetPlayerVehicleID(playerid) == 50 || GetPlayerVehicleID(playerid) == 51 || GetPlayerVehicleID(playerid) == 52)
{
if(ispolice[playerid] == 0)
{
RemovePlayerFromVehicle(playerid);
ShowPlayerDialog(playerid, 3702, DIALOG_STYLE_MSGBOX, "No Keys", "You do not have the keys to this vehicle\nSimply because you are not in the {FF0000}BCSD.", "Ok", "");
return 1;
}
}
return 1;
}
pawn Код:
GetPlayerVehicleID(playerid) == 49 || GetPlayerVehicleID(playerid) == 50 || GetPlayerVehicleID(playerid) == 51 || GetPlayerVehicleID(playerid) == 52