How to check if an int is in an array
#3

or
pawn Код:
new vehs[2];

public OnGamemodeInit()
{
    vehs[0] = AddStaticVehicleEx(411,1528.7384000,-1683.8818400,5.6906000,270.0000000,-1,-1,1600);
    AddStaticVehicleEx(411,1528.7384000,-1688.0616500,5.6906000,270.0000000,-1,-1,1600);
    AddStaticVehicleEx(415,1544.5936300,-1663.1635700,5.7401000,90.0000000,-1,-1,1600);
    AddStaticVehicleEx(415,1544.5927700,-1659.0278300,5.7401000,90.0000000,-1,-1,1600);
    AddStaticVehicleEx(415,1544.5927700,-1655.0069600,5.7401000,90.0000000,-1,-1,1600);
    AddStaticVehicleEx(415,1544.5927700,-1651.2161900,5.7401000,90.0000000,-1,-1,1600);
    AddStaticVehicleEx(541,1538.7780800,-1645.0030500,5.8306000,180.0000000,-1,-1,1600);
    AddStaticVehicleEx(541,1534.6420900,-1645.0029300,5.8306000,180.0000000,-1,-1,1600);
    AddStaticVehicleEx(541,1530.6212200,-1645.0029300,5.8306000,180.0000000,-1,-1,1600);
    vehs[1] = AddStaticVehicleEx(541,1526.6007100,-1645.0029300,5.8306000,180.0000000,-1,-1,1600);
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
        if((vehs[0] <= vehicleid <= vehs[1])) // you get what i mean
        { don't let him in unless cop...}
}
Reply


Messages In This Thread
How to check if an int is in an array - by adithegman - 18.01.2016, 12:43
Re: How to check if an int is in an array - by BroZeus - 18.01.2016, 14:31
Re: How to check if an int is in an array - by Jefff - 18.01.2016, 14:59
Re: How to check if an int is in an array - by Pottus - 18.01.2016, 15:49
Re: How to check if an int is in an array - by adithegman - 18.01.2016, 16:26
Re: How to check if an int is in an array - by adithegman - 18.01.2016, 16:38

Forum Jump:


Users browsing this thread: 1 Guest(s)