Storing data in FiveM

I am learning the ecosystem in FiveM and I haven’t been able to find a ton of material relating to how you should store certain types of data.

For example I am looking to store a fuel value for a vehicle. I have checked out convars and decorators but decorators can be modified using Cheat Engine locally if I am not mistaken?

I would like to know how someone would store a fuel value for a car so it cannot be manipulated by players and if it should actually be stored using Decorators. If anyone could help please let me know. Thanks.

I’ll ignore the second part of your message so I can dump this list:

Fuel specifically actually has its own native but you could also store it in a Decor or a State Bag. To address the second part of your question, probably, I’m not sure honestly. You’ve got to pick and choose your battles, and do as much as your can server-side.

I’ll leave these here in case you haven’t seen them yet. Good luck.

RIP @d0p3t

4 Likes

Flawless reply. Thank you for the response! I’ll try to read up more into it just needed to actually know the basics since I don’t think there’s really a good docs page that discusses this.

Any way I could add something relating to this into the fivem docs or is the fivem team not allowing user wiki edits?

2 Likes

You can submit documentation changes to fivem-docs repository

2 Likes