Setup
WP Neons Setup Instructions
Setup for WP Neons is quick and easy.
Configuration
Add the script to your server config.
Open the config.lua
file and make any necessary adjustments.
Make sure to update the framework / script configuration section with the relevant scripts that you use.
Framework Implementations
External script implementations are handled in the framework.lua
file. This file provides the necessary functions and hooks to integrate with different frameworks and scripts.
Out of the box, the script includes implementations for:
Framework
Notify
Add Items to Inventory
If you want your users to use the neonkit item to open the UI, add the item to the item file in your inventory script.
Copy / paste the image from the images/
folder into your inventory script.
Don't forget to add a way for users to acquire the item (ex: add it a shop).
Xenon Headlights
Choose whether to allow players to change their Xenon headlights from the UI via Config.EnableHeadlightColorChanger
.
If set to true, players will be able to select from 12 preselected colors. Changes using one of these colors automatically syncs to all clients.
Choose whether to allow players to change their Xenon headlights using full RGB color picker via Config.EnableHeadlightRGBColorPicker
(requires Config.EnableHeadlightColorChanger = true
)
If set to true, players can use a full RGB color picker to set their xenon headlight colors. The underlying native does not sync to clients by default, however I've implemented custom logic to keep all clients in sync, it does have a slight hit to perf, that is mostly negligible.
Note that changes from the RGB color picker are not saved to the DB so they will not persist through server restarts. Be sure to inform your players that this is by design, else you can disable this flag if you don't want to deal with complaints. The 12 default colors via the dropdown will save to DB and persist through restarts.
Additional Notes
The left and right neons may be reversed on some vehicles (ex: Entity), if using such a vehicle, the UI left and right will also be reversed. It seems this is a bug within the native functions.
If a player changes their Xenons to a custom RGB color while they are outside of the FiveM entity culling distance (400m) of another player, there could be a 0-20 second delay in updating the color once that player does come into range.
Last updated