27.05.2014, 13:54
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;
}