[Release] Engine ON/OFF Toggle



you’re the best, thank you buddy



I added a second Version, check the first Post


what’s the 2nd version for? any different from the first or duplicate ?


Lol. check the first post :grin:


oooh my bad buddy sorry, thanks a lot


out of curiosity what happens when you exit the vehicle? does it shut off or stay running?


The vehicle stays running.


After some testing I determined that this script does not work properly for helicopters and planes. When getting in you have to manually start them like normal but when you get out the engine does not stay running. Also once you get back in, the engine auto starts. Turning the engine off keeps it off like normal too.

All other vehicles seem to work as intended with the script. Just aircraft that I noticed caused issues.


Thanks for the feedback, I will look into this.


Any updates on this? I have been combing through and trying a few things out myself too, but haven’t had any luck.


I hadn’t much time to work on this, I will do so today.


Unfortunately I wasn’t able to find a solution for this problem. But atleast I was able to fix this for planes with a jet engine. I will release it soon.


I’ve also determined this script has caused some desync on my server with players. Removing this script stopped the desync.


could you make a version with a button? the one that the engine is always off when you get in a vehicle unless you kept it running.


I updated both version and used each for ~30 Minutes, I didn’t notice any framedrops and hope the problem is fully fixed.

I am looking forward to your feedback.


Updated to v2.1.0

  • Fixed the problem with Helicopters & Planes
  • Added chat confirmations

Download in the First Post!


Mine seems to be working fine despite this popping up in the command window when starting the server.

InvokeNative: execution failed: type must be object, but is array
Error loading script server/server.lua in resource EngineToggle: Execution of na
tive 000000008e8cc653 in script host failed.
stack traceback:
[C]: in upvalue '_in’
citizen:/scripting/lua/natives_server.lua:190: in function 'PerformHttpR
citizen:/scripting/lua/scheduler.lua:233: in function 'PerformHttpReques
server/server.lua:12: in main chunk
Failed to load script server/server.lua.

Any idea why this might be happening?


Any way to add in a hot key for this instead of the chat command?


I am sorry, but I don’t know why this happens, this just seems to happen for some ppl.

Tell me which Key and I will do this for you.


The u key if it’s possible. I’m using the toggle on at enter version. Thank You!