Enter more vehicle to drive.
#2

The size of DriversTest is 4 so the valid indexes are 0-3. You can loop through all its indexes and see if the vehicleid matches.

pawn Код:
if (IsVehicleForDrivingTest(vehicleid))
{
    // vehicle is for driving tests..
}
pawn Код:
IsVehicleForDrivingTest(vehicleid)
{
    for (new i; i != sizeof (DriversTest); ++i)
    {
        if (vehicleid == DriversTest[i]) return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Enter more vehicle to drive. - by Mey6155 - 27.05.2014, 13:50
Re: Enter more vehicle to drive. - by Konstantinos - 27.05.2014, 13:54
Re: Enter more vehicle to drive. - by NaClchemistryK - 27.05.2014, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)