Vehicles States?
#2

Sure.

pawn Код:
new bool:EngineRunning[MAX_VEHICLES];
new OldVehicle[MAX_PLAYERS];

public OnPlayerStateChange(playerid,newstate,oldstate)
{
   if(newstate == 2)
   {
     new vehi = GetPlayerVehicleID(playerid);
     OldVehicle[playerid] = vehi;
     EngineRunning[vehi] = true;
   }
   if(newstate == 1 && oldstate == 2)
   {
     EngineRunning[OldVehicle[playerid]] = false;
   }
   return 1;
}
I don't think GetPlayerVehicleID will work when his new state equals on foot so I made a variable to store his last vehicle. That should work though. Edit: I think you mean to turn vehicles on and off. This will just store if someone is in it. Shit...
Reply


Messages In This Thread
Vehicles States? - by almighty - 16.09.2009, 00:09
Re: Vehicles States? - by Backwardsman97 - 16.09.2009, 00:48
Re: Vehicles States? - by almighty - 16.09.2009, 03:02
Re: Vehicles States? - by Donny_k - 16.09.2009, 09:57

Forum Jump:


Users browsing this thread: 1 Guest(s)