[Request] Server side natives to turn on/of vehicle engines

Hello.

At the moment there are some vehicle natives server sided like
SetVehicleDoorsLocked or SetVehicleAlarm for example.

However I would also like to see a native like
SetVehicleEngineOn

Is there a reason why not all vehicle natives are server side(Just curious :slight_smile: )

With this you can make for example a vehicle lock system completely server sided.

What’s the point of that?

If you use that on a client it’ll get networked anyways

1 Like

Why not?
I think it will always be applicable.

Its more a quality of life thing I guess.
I have wrote a whole system with vehicle keys server sided. However now I need to send an event to a client to turn on the vehicle when the key is used. This aint an issue or anything but its less clearer that way. It would be nicer if I also can have those things server sided.

Any server-side natives for controlling entities is very convenient

… make a PR but ensure you’ve tested the natives you’re adding: fivem/rpc_spec_natives.lua at master · citizenfx/fivem · GitHub

Nooby question of me. But how do I test those natives? Or do I need to rebuild the server for that?

Ok, ive added the native to that given file. And I builded the server in vs. But get a attempt to call a nil value (global SetVehicleEngineOn). Are there some steps that I missed