02.01.2012, 15:59
make a huge array for all created vehicles (only using max 2000 cells, so who the fuck cares), and set it to 1 at each created vehicle, in your case at vehicle ids 45 to 48, and 49 to 51:
i dont know about your faction system or how you set the jobs, but this could give you the idea on how to trade memory for runtime
edit:
its a good idea to move that stuff from OnPlayerUpdate() to OnPlayerStateChange() or OnPlayerEnterVehicle
pawn Код:
new VehicleAllowed[MAX_VEHICLES];
new TempID;
TempID=AddStaticVehcile(blablabla);
VehicleAllowed[TempID]=1;
public OnPlayerUpdate(playerid)
{
if(VehicleAllowed[GetPlayerVehicleID(playerid)] == 1 && Taxijob[playerid] == 0)
edit:
its a good idea to move that stuff from OnPlayerUpdate() to OnPlayerStateChange() or OnPlayerEnterVehicle