Engine Toggle Script

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 Likes

void SET_VEHICLE_UNDRIVEABLE(Vehicle vehicle, BOOL toggle)

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?

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

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

1 Like

Did you ever get this working bro?

1 Like

thx my dude! :slight_smile: helps alot