gpt-4-0314· openai
Suzhen/CodeChat
Fivem scripting lua I'm working on a NOS script how could I make it so if i use the…
- User
Fivem scripting lua
I'm working on a NOS script how could I make it so if i use the command /enableNOS in a vehicle it will then let me use nos in that vehicle and also save that even if i restart the script so i don't need to type /enableNOS everytime
- Assistant
You can create a server-side script to handle the /enableNOS command and store the allowed vehicles in a table. When a player tries to use NOS, check if their vehicle is in the allowed list. To save the allowed vehicles list between script restarts, you can use a database or a file. I'll show you an example using a JSON file.