when engine run can all drive
#9

Make something like this:

pawn Код:
new Engine[MAX_VEHICLES];
When engine is turned on:

pawn Код:
Engine[vehicleid] = 1;
When engine is turned off:

pawn Код:
Engine[vehicleid] = 0;
When checking if the vehicle has the engine off or on:
(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:
}
You will obvoiusly have to define vehicle id in places it cannot be used (Such as commands).

pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);

I hope you understand.
Reply


Messages In This Thread
when engine run can all drive - by whitedragon - 08.12.2009, 19:13
Re: when engine run can all drive - by RyDeR` - 08.12.2009, 19:40
Re: when engine run can all drive - by whitedragon - 09.12.2009, 11:05
Re: when engine run can all drive - by LarzI - 09.12.2009, 11:21
Re: when engine run can all drive - by whitedragon - 09.12.2009, 11:47
Re: when engine run can all drive - by whitedragon - 12.12.2009, 12:26
Re: when engine run can all drive - by LarzI - 12.12.2009, 12:39
Re: when engine run can all drive - by Deat_Itself - 12.12.2009, 12:43
Re: when engine run can all drive - by miokie - 12.12.2009, 12:56
Re: when engine run can all drive - by LarzI - 12.12.2009, 13:03

Forum Jump:


Users browsing this thread: 1 Guest(s)