Feature request: expose GET_VEHICLE_FUEL_LEVEL as a server native via RPC #3833
Angelo90810
started this conversation in
Engineering Discussion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'd like to request exposing
GET_VEHICLE_FUEL_LEVELas a server-side native, implemented in the same way as the existing RPC-backed vehicle health natives (e.g.GET_VEHICLE_ENGINE_HEALTH).Currently, vehicle fuel level can only be read on the client. Having this available on the server (through an RPC to the entity owner) would align it with other vehicle state getters that are already available in server scripts.
Motivation / Use cases
Being able to read vehicle fuel level on the server side would help with several common use cases:
Right now, the usual workaround is to mirror fuel state manually from client to server (e.g. via events or state bags), which adds boilerplate and room for desync.
Proposed behaviour
GET_VEHICLE_FUEL_LEVELas a CFX server native.GET_VEHICLE_FUEL_LEVEL.From the script author's point of view, once a valid vehicle entity exists on the server, it would look like this:
Beta Was this translation helpful? Give feedback.
All reactions