๐จConfig.lua
The config.lua file contains essential settings for the Collectibles Pickup Script, allowing you to customize development options, debugging, collectible props, and framework-specific events.
Configuration Options
๐ง devMode
devMode
Type: Boolean (
true
/false
)Default:
false
Description: Activates development mode, which may include additional logging or features for testing purposes.
Example Use Case:
Set devMode = true
to enable development mode while placing pickups. Disable it (devMode = false
) when you deploy to the live server.
๐ debug
debug
Type: Boolean (
true
/false
)Default:
false
Description: Enables debugging mode, showing the coordinates of pickups in the game world for testing and setup.
โ ๏ธ Warning: Do not enable this on live servers, as it reveals pickup locations and could be exploited.
๐ฆ propList
propList
Type: Array of Strings
Default:
{ "vw_prop_vw_colle_prbubble", "vw_prop_vw_colle_rsrcomm", "vw_prop_vw_colle_rsrgeneric", "vw_prop_vw_colle_sasquatch", "vw_prop_vw_colle_alien", "vw_prop_vw_colle_beast", "vw_prop_vw_colle_imporage", "vw_prop_vw_colle_pogo" }
Description: A list of props used as collectibles in the game. You can add or remove props based on your serverโs requirements.
Tips for Custom Props:
Use FiveM Prop Search Tools to find additional props.
Ensure that all props added to this list are valid in FiveM to avoid errors.
๐ฎ playerLoadedEvent
playerLoadedEvent
Type: String
Default:
'QBCore:Client:OnPlayerLoaded'
Description: Specifies the event triggered when a player is fully loaded into the game. Adjust this based on the framework your server uses:
For QBCore, use
'QBCore:Client:OnPlayerLoaded'
.For ESX, use
'esx:playerLoaded'
.
Framework Compatibility Example:
QBCore Configuration:
playerLoadedEvent = 'QBCore:Client:OnPlayerLoaded'
ESX Configuration:
playerLoadedEvent = 'esx:playerLoaded'
Default Configuration
Below is the default configuration. Use this to restore settings if needed or as a reference for customization:
Config = {
devMode = false,
debug = false, -- Do not use this in live servers; shows pickup coordinates.
propList = {
"vw_prop_vw_colle_prbubble",
"vw_prop_vw_colle_rsrcomm",
"vw_prop_vw_colle_rsrgeneric",
"vw_prop_vw_colle_sasquatch",
"vw_prop_vw_colle_alien",
"vw_prop_vw_colle_beast",
"vw_prop_vw_colle_imporage",
"vw_prop_vw_colle_pogo"
},
playerLoadedEvent = 'QBCore:Client:OnPlayerLoaded' -- Use 'esx:playerLoaded' for ESX.
}
At a Glance
Option
Type
Default
Description
devMode
Boolean
false
Activates development mode for testing.
debug
Boolean
false
Shows pickup coordinates; not recommended for live servers.
propList
Array
See default list above
Defines the props used as collectibles.
playerLoadedEvent
String
'QBCore:Client:OnPlayerLoaded'
Event triggered when a player loads; adjust for ESX or QBCore.
Tips and Recommendations
๐ ๏ธ Testing Mode
Use devMode
and debug
during setup or testing to verify that pickups are placed correctly. Disable these settings for live servers.
๐ฆ Custom Props
Make sure props in the propList
are valid and available in FiveM. Invalid props can cause errors or prevent pickups from appearing.
๐ Framework Integration
Ensure the playerLoadedEvent
matches your framework (ESX or QBCore) to avoid compatibility issues.
Last updated