12.12.2009, 12:56
Make something like this:
When engine is turned on:
When engine is turned off:
When checking if the vehicle has the engine off or on:
(This would usually go in OnPlayerStateChange)
You will obvoiusly have to define vehicle id in places it cannot be used (Such as commands).
I hope you understand.
pawn Код:
new Engine[MAX_VEHICLES];
pawn Код:
Engine[vehicleid] = 1;
pawn Код:
Engine[vehicleid] = 0;
(This would usually go in OnPlayerStateChange)
pawn Код:
if(Engine[vehicleid] == 0) //Vehicle Engine is off
{
//Do what ever you want like freeze the player if the engine is off, so the player cannot just drive away
}
else
{
//If the vehicle is on, do something here:
}
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
I hope you understand.

