when engine run can all drive
#1

How i do that when the player is not turn off engine can drive all players with it
Reply
#2

what? explain more ..
Reply
#3

Quote:
Originally Posted by [WsR
RyDeR ]
what? explain more ..
lets say that you start your vehicle. You drive to bank. You dont turn off your car engine. In street walks another user and he go to your car and drive it away(engine works.)
Reply
#4

make a toggle command?
Reply
#5

Quote:
Originally Posted by lrZ^ aka LarzI
make a toggle command?
no i want to do that when engine work all players can drive with that car
Reply
#6

can anyone help me?
i have try to edit EngineOn system but no help
Reply
#7

Explain exactly what you want.
If you're not english-speaking, try using a translator so we can understand better.
Reply
#8

Quote:
Originally Posted by lrZ^ aka LarzI
Explain exactly what you want.
If you're not english-speaking, try using a translator so we can understand better.
he means that when i sit in a car and turn the engine on so i may go to bank somewhere and if i forgotten to turn engine off so if the another user sit in that car can directly drives a car without turning on the engine !

Reply
#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
#10

Or just use v1 of my EngineOn script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)