βοΈ Configuration
Editable Files
config/shared.lua
Main configuration file. Here you can change most of the options visible in the game: NPC location, blips, vehicle, treasure amount/payment, work clothes appearance, zones, notifications, and auxiliary functions (key hook, fuel, etc.).
server/main.lua
Server logic for team creation, payment distribution, box/item generation, and public events. You can modify how payments are distributed or add server hooks.
Configuration File
Config, Lang, NPC, Noti, Veh, Finish, Blips = {}, {}, {}, {}, {}, {}, {}
Framework Settings
Configure your server's framework:
-- Use "esx", "qb" or "qbox"
Config.Framework = "qb"
Display Settings
-- Font type for drawtext default text. Default = 4. Set 0 to chinese language
Config.alertTextFont = 4
-- Interaction key to perform some actions
Config.interactionKey = "E"
Economy Settings
-- Set the price for each treasure collected
Config.priceForItem = 100
Gender Configuration
-- How the male gender is displayed in your database
Config.genderMale = 0
-- How the female gender is displayed in your database
Config.genderFemale = 1
Gameplay Options
-- Set true if you want to use cam when you pick up a box
Config.useCam = true
-- Set to true if you want to force to use the job clothes
Config.forceUseClothes = false
-- Set to true if you want to freeze the boat when you are in the water
Config.freezeBoat = true
-- Set to true if you want to use the final animation
Config.useFinalAnimation = true
Treasure Configuration
-- Prop to be used as treasure
Config.treasureProp = "ba_prop_battle_case_sm_03"
-- Number of treasures that will spawn in the point
Config.treasuresAmountInZone = 30
-- Radius of space for which the treasures can be in the point
Config.treasuresRadiusInZone = 40
-- Minimum distance between treasures
Config.miniumDistanceBetweenTreasures = 4
Blip Configuration
Configure the job location blip on the map:
Blips.coord = vector3(3858.78, 4459.14, 1.83)
Blips.blip = 478
Blips.blipColor = 43
Blips.blipScale = 0.7
Blips.blipText = "Treasure Hunter Job"
NPC Configuration
Configure the NPC that starts the job:
-- Location where the NPC is positioned for job selection
NPC.location = vector4(3858.78, 4459.14, 1.83, 86.55)
-- Model of the NPC
NPC.model = "s_m_y_grip_01"
Vehicle Configuration
Configure the boat that players will use:
-- Location where the vehicle will spawn when the job is selected
Veh.location = vector4(3869.15, 4471.97, 0.0, 270.16)
-- Motor power. In FiveM the default is 1.0. If you see that the vehicle has a hard time carrying the load you can raise it.
Veh.torque = 2.0
-- Model of the vehicle
Veh.model = "tug"
-- Height of the marker
Veh.markerHeight = 5.1
Vehicle Keys Integration
Configure vehicle key delivery:
-- Function for the delivery of vehicle keys to the user when spawning
function giveVehicleKeys(entity, plate)
TriggerEvent("vehiclekeys:client:SetOwner", plate)
end
function removeVehicleKeys(entity, plate)
-- TriggerEvent('vehiclekeys:client:RemoveOwner', plate)
end
Custom Fuel System
-- If you want to use a custom fuel system set true and fill the function below
Config.useCustomFuel = false
function customFuel(vehicle)
-- insert your trigger here for your fuel system
end
Finish Configuration
Configure the job completion area:
Finish.location = vector4(3858.64, 4483.69, 1.0, 68.7)
Finish.markerType = 23
Finish.markerSize = vector3(10.0, 10.0, 10.0)
Finish.markerColor = vector3(0, 100, 58)
Finish.blipType = 427
Finish.blipScale = 0.7
Finish.blipColor = 43
Finish.blipText = "Finish Job"
Finish Animation Configuration
Finish.pedFirstSpawn = vector3(3842.79, 4465.16, 1.7)
Finish.propHeight = 0.7
Finish.cameraPosition = vector3(3851.03, 4459.63, 2.85)
Work Clothes Configuration
Configure uniforms for male and female characters.
ESX Framework Clothes
if Config.Framework == "esx" then
Clothesmale = {
['tshirt_1'] = 15, ['tshirt_2'] = 0,
['torso_1'] = 15, ['torso_2'] = 0,
['decals_1'] = 0, ['decals_2'] = 0,
['arms'] = 40,
['pants_1'] = 16, ['pants_2'] = 2,
['shoes_1'] = 34, ['shoes_2'] = 0,
['helmet_1'] = -1, ['helmet_2'] = 0,
['chain_1'] = 0, ['chain_2'] = 0,
['ears_1'] = -1, ['ears_2'] = 0
}
Clothesfemale = {
['tshirt_1'] = 3, ['tshirt_2'] = 0,
['torso_1'] = 15, ['torso_2'] = 11,
['decals_1'] = 0, ['decals_2'] = 0,
['arms'] = 32,
['pants_1'] = 15, ['pants_2'] = 11,
['shoes_1'] = 35, ['shoes_2'] = 0,
['helmet_1'] = -1, ['helmet_2'] = 0,
['chain_1'] = 0, ['chain_2'] = 0,
['ears_1'] = -1, ['ears_2'] = 0
}
end
QBCore Framework Clothes
elseif Config.Framework == "qb" then
Clothesmale = {
outfitData = {
["pants"] = { item = 16, texture = 2 },
["arms"] = { item = 40, texture = 0 },
["t-shirt"] = { item = 15, texture = 0 },
["vest"] = { item = 0, texture = 0 },
["torso2"] = { item = 15, texture = 0 },
["shoes"] = { item = 34, texture = 0 },
["accessory"] = { item = 0, texture = 0 },
["bag"] = { item = 0, texture = 0 },
["hat"] = { item = 0, texture = 0 },
["glass"] = { item = 0, texture = 0 },
["mask"] = { item = 0, texture = 0 }
}
}
Clothesfemale = {
outfitData = {
["pants"] = { item = 15, texture = 11 },
["arms"] = { item = 32, texture = 0 },
["t-shirt"] = { item = 3, texture = 0 },
["vest"] = { item = 0, texture = 0 },
["torso2"] = { item = 15, texture = 11 },
["shoes"] = { item = 35, texture = 0 },
["accessory"] = { item = 0, texture = 0 },
["bag"] = { item = 0, texture = 0 },
["hat"] = { item = 0, texture = 0 },
["glass"] = { item = 0, texture = 0 },
["mask"] = { item = 0, texture = 0 }
}
}
end
Treasure Zones
Configure the treasure hunting locations:
Zones = {
[1] = vector3(4278.4, 4477.52, -1.03),
[2] = vector3(4099.89, 4722.47, 0.87),
[3] = vector3(3984.05, 5104.59, -1.09),
[4] = vector3(4311.02, 4120.05, 0.67),
[5] = vector3(4209.42, 2567.4, 0.41),
[6] = vector3(3581.35, 6460.85, -0.43)
}
Note: You can add more zones by following the same pattern. Each zone will randomly spawn treasures based on your configured amount and radius.
Target System Configuration
[!WARNING] These functions are available in the file config/shared.lua
QB-Target
function entityTarget(entity, event, label)
exports['qb-target']:AddTargetEntity(entity, {
options = {{
type = "client",
event = event,
icon = "fas fa-box-circle-check",
label = label
}},
distance = 3.0
})
end
function removeTarget(element)
exports['qb-target']:RemoveTargetModel(element)
end
OX-Target
function entityTarget(entity, event, label)
NetworkRegisterEntityAsNetworked(entity)
local netId = NetworkGetNetworkIdFromEntity(entity)
local options = {
event = event,
icon = "fas fa-box-circle-check",
label = label
}
exports.ox_target:addEntity(netId, options)
end
function removeTarget(element)
exports.ox_target:removeModel(element, nil)
end
Configuration Tips
- Framework: Ensure you select the correct framework (esx, qb, or qbox)
- Treasure Price: Adjust based on your server's economy balance
- Treasure Amount: More treasures = longer job duration
- Spawn Radius: Larger radius = more spread out treasures
- Force Clothes: Enable if you want immersive job uniforms
- Boat Freeze: Enable for easier underwater treasure collection
- Camera Effects: Optional visual enhancements, disable if causing issues
- Vehicle Keys: Match your server's key system
- Custom Fuel: Only enable if using a custom fuel script
- Zones: Add or modify locations based on your map
- Blips: Use distinctive icons and colors for easy player identification
- NPC Model: Choose a ped that fits your server's theme
- Boat Model: Default is "tug", can be changed to any boat model
- Torque: Increase if boat struggles with multiple players
- Gender Values: Match your database configuration (usually 0/1 or "m"/"f")
Advanced Tips
- Test treasure spawn locations before going live
- Adjust minimum distance to prevent clipping
- Configure clothes to match your server's aesthetic
- Set appropriate prices based on job difficulty and time
- Use target system that matches your server's standard
- Test animations on both male and female characters
- Verify blips don't conflict with other server jobs
- Ensure finish location is accessible by boat