Configuration
This guide covers the configurable options for the NeedForScripts Customs Script and provides information on available events and exports for integration with other scripts.
Configurable Options
The main configuration file is config.lua
. Here are the key aspects you can modify:
Prices: Adjust the costs for various customization options.
Categories: Modify the available customization categories to suit your server's needs.
Images: Set custom images for different parts of the user interface.
Camera Angles: Configure camera positions for various customization views.
Tuner Shop Locations: Set the locations where players can access the customization features.
Blips: Adjust settings for map blips, including whether to display them.
Job Restrictions: Configure which jobs are allowed to access the customization features.
Translations: Customize text displayed in the script to support multiple languages.
For detailed information on how to adjust these settings, please refer to the comments in the config.lua
file.
Events
Client Event
This event is triggered when the customs UI is opened or closed. The show
parameter is a boolean indicating if the UI is being shown (true
) or hidden (false
).
Server Event
This event is triggered on the server when a player opens or closes the customs UI. The show
parameter works the same as in the client event.
Exports
toggleCustoms
Use this export to programmatically open or close the customs UI.
show
: boolean - Set totrue
to open the UI,false
to close it.
Get specified vehicle stancers
local data = exports['nfs-customs']:getVehicleStancers(vehicleEntity)
Set specified vehicle stancers
exports['nfs-customs']:setVehicleStancers(vehicleEntity, data)
Integration Tips
Use the provided events to sync other scripts with the customs UI state.
Adjust job restrictions to integrate with your server's job system.
Customize blip settings to match your server's map style.
Use translations to support multiple languages on your server.
Remember to restart your server after making changes to the configuration file.
For more detailed information on each configuration option, please refer to the comments in the config.lua
file.
Last updated