Help!
#1

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 ?

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;
}
see what I mean about the
pawn Код:
GetPlayerVehicleID(playerid) == 49 || GetPlayerVehicleID(playerid) == 50 || GetPlayerVehicleID(playerid) == 51 || GetPlayerVehicleID(playerid) == 52
So basicly all I'm saying is how can I get it all in 1 function?
Reply


Messages In This Thread
Help! - by vincee - 02.01.2012, 15:35
Re: Help! - by Babul - 02.01.2012, 15:59
Re: Help! - by vincee - 02.01.2012, 16:07
Re: Help! - by Babul - 02.01.2012, 16:49
Re: Help! - by vincee - 02.01.2012, 17:35

Forum Jump:


Users browsing this thread: 3 Guest(s)