Engine Toggle Script


#1

I’m working on an engine toggle script which allows the player to toggle their engine off and on with a key press. I’ve got it somewhat working, however when the vehicle turns off, it starts right back up again. It will not stay turned off.

Any help would be appreciated.

Using the following:


#2

void SET_VEHICLE_UNDRIVEABLE(Vehicle vehicle, BOOL toggle)


#3

Thanks, but using that I am not getting anything now. I’m assuming vehicle vehicle is set to the current vehicle your in, which it is, and BOOL toggle should be set to true, correct?


#4

Yep, it should work that way. Set it to true when the engine is off, and to false when it’s on again.


#5

Hmmm ok. I guess this script will be a little more in depth than I originally thought. Thanks.


#6

Did you ever get this working bro?


#7

#8

thx my dude! :slight_smile: helps alot