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 = {}, {}, {}, {}, {}, {}, {}
--  $$$$$$\   $$$$$$\  $$\   $$\ $$$$$$$$\ $$$$$$\  $$$$$$\  $$\   $$\ $$$$$$$\   $$$$$$\ $$$$$$$$\ $$$$$$\  $$$$$$\  $$\   $$\
-- $$  __$$\ $$  __$$\ $$$\  $$ |$$  _____|\_$$  _|$$  __$$\ $$ |  $$ |$$  __$$\ $$  __$$\\__$$  __|\_$$  _|$$  __$$\ $$$\  $$ |
-- $$ /  \__|$$ /  $$ |$$$$\ $$ |$$ |        $$ |  $$ /  \__|$$ |  $$ |$$ |  $$ |$$ /  $$ |  $$ |     $$ |  $$ /  $$ |$$$$\ $$ |
-- $$ |      $$ |  $$ |$$ $$\$$ |$$$$$\      $$ |  $$ |$$$$\ $$ |  $$ |$$$$$$$  |$$$$$$$$ |  $$ |     $$ |  $$ |  $$ |$$ $$\$$ |
-- $$ |      $$ |  $$ |$$ \$$$$ |$$  __|     $$ |  $$ |\_$$ |$$ |  $$ |$$  __$$< $$  __$$ |  $$ |     $$ |  $$ |  $$ |$$ \$$$$ |
-- $$ |  $$\ $$ |  $$ |$$ |\$$$ |$$ |        $$ |  $$ |  $$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |  $$ |     $$ |  $$ |  $$ |$$ |\$$$ |
-- \$$$$$$  | $$$$$$  |$$ | \$$ |$$ |      $$$$$$\ \$$$$$$  |\$$$$$$  |$$ |  $$ |$$ |  $$ |  $$ |   $$$$$$\  $$$$$$  |$$ | \$$ |
-- \______/  \______/ \__|  \__|\__|      \______| \______/  \______/ \__|  \__|\__|  \__|  \__|   \______| \______/ \__|  \__|
-- Use "esx", "qb" or "qbox"
Config.Framework = "qb"
-- 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"
-- Set the price for each treasure collected
Config.priceForItem = 100
-- How the male gender is displayed in your database
Config.genderMale = 0
-- How the female gender is displayed in your database
Config.genderFemale = 1
-- Set true if you want tu 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
-- 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
-- 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

-- $$$$$$$\  $$\       $$$$$$\ $$$$$$$\
-- $$  __$$\ $$ |      \_$$  _|$$  __$$\
-- $$ |  $$ |$$ |        $$ |  $$ |  $$ |
-- $$$$$$$\ |$$ |        $$ |  $$$$$$$  |
-- $$  __$$\ $$ |        $$ |  $$  ____/
-- $$ |  $$ |$$ |        $$ |  $$ |
-- $$$$$$$  |$$$$$$$$\ $$$$$$\ $$ |
-- \_______/ \________|\______|\__|

Blips.coord = vector3(3858.78, 4459.14, 1.83)
Blips.blip = 478
Blips.blipColor = 43
Blips.blipScale = 0.7
Blips.blipText = "Treasure Hunter 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"

-- $$\    $$\ $$$$$$$$\ $$\   $$\ $$$$$$\  $$$$$$\  $$\       $$$$$$$$\
-- $$ |   $$ |$$  _____|$$ |  $$ |\_$$  _|$$  __$$\ $$ |      $$  _____|
-- $$ |   $$ |$$ |      $$ |  $$ |  $$ |  $$ /  \__|$$ |      $$ |
-- \$$\  $$  |$$$$$\    $$$$$$$$ |  $$ |  $$ |      $$ |      $$$$$\
--  \$$\$$  / $$  __|   $$  __$$ |  $$ |  $$ |      $$ |      $$  __|
--   \$$$  /  $$ |      $$ |  $$ |  $$ |  $$ |  $$\ $$ |      $$ |
--    \$  /   $$$$$$$$\ $$ |  $$ |$$$$$$\ \$$$$$$  |$$$$$$$$\ $$$$$$$$\
--     \_/    \________|\__|  \__|\______| \______/ \________|\________|

-- 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

-- 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

-- 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.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.pedFirstSpawn = vector3(3842.79, 4465.16, 1.7)
Finish.propHeight = 0.7
Finish.cameraPosition = vector3(3851.03, 4459.63, 2.85)
Finish.cameraRotation = 210.0
Finish.pedWalkToLocation = vector3(3855.5, 4462.67, 2.72)
Finish.pedWalkDuration = 5000
Finish.pedFinalSpawn = vector3(3855.5, 4462.67, 2.72)

-- $$\   $$\  $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$$$\ $$$$$$\  $$$$$$\   $$$$$$\ $$$$$$$$\ $$$$$$\  $$$$$$\  $$\   $$\  $$$$$$\
-- $$$\  $$ |$$  __$$\\__$$  __|\_$$  _|$$  _____|\_$$  _|$$  __$$\ $$  __$$\\__$$  __|\_$$  _|$$  __$$\ $$$\  $$ |$$  __$$\
-- $$$$\ $$ |$$ /  $$ |  $$ |     $$ |  $$ |        $$ |  $$ /  \__|$$ /  $$ |  $$ |     $$ |  $$ /  $$ |$$$$\ $$ |$$ /  \__|
-- $$ $$\$$ |$$ |  $$ |  $$ |     $$ |  $$$$$\      $$ |  $$ |      $$$$$$$$ |  $$ |     $$ |  $$ |  $$ |$$ $$\$$ |\$$$$$$\
-- $$ \$$$$ |$$ |  $$ |  $$ |     $$ |  $$  __|     $$ |  $$ |      $$  __$$ |  $$ |     $$ |  $$ |  $$ |$$ \$$$$ | \____$$\
-- $$ |\$$$ |$$ |  $$ |  $$ |     $$ |  $$ |        $$ |  $$ |  $$\ $$ |  $$ |  $$ |     $$ |  $$ |  $$ |$$ |\$$$ |$$\   $$ |
-- $$ | \$$ | $$$$$$  |  $$ |   $$$$$$\ $$ |      $$$$$$\ \$$$$$$  |$$ |  $$ |  $$ |   $$$$$$\  $$$$$$  |$$ | \$$ |\$$$$$$  |
-- \__|  \__| \______/   \__|   \______|\__|      \______| \______/ \__|  \__|  \__|   \______| \______/ \__|  \__| \______/

function notifications(notitype, message, time)
    -- Change this trigger for your notification system keeping the variables
    TriggerEvent("codem-notification", message, time, notitype)
end

-- Notifications types:
Noti.info = "info"
Noti.check = "check"
Noti.error = "error"

-- Notification time:
Noti.time = 5000

-- $$$$$$$$\  $$$$$$\  $$$$$$$\   $$$$$$\  $$$$$$$$\ $$$$$$$$\
-- \__$$  __|$$  __$$\ $$  __$$\ $$  __$$\ $$  _____|\__$$  __|
--    $$ |   $$ /  $$ |$$ |  $$ |$$ /  \__|$$ |         $$ |
--    $$ |   $$$$$$$$ |$$$$$$$  |$$ |$$$$\ $$$$$\       $$ |
--    $$ |   $$  __$$ |$$  __$$< $$ |\_$$ |$$  __|      $$ |
--    $$ |   $$ |  $$ |$$ |  $$ |$$ |  $$ |$$ |         $$ |
--    $$ |   $$ |  $$ |$$ |  $$ |\$$$$$$  |$$$$$$$$\    $$ |
--    \__|   \__|  \__|\__|  \__| \______/ \________|   \__|

Config.useTarget = false

-- Function for the use of the target in entities (e.g., the npc delivering the job).
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 for remove of target on items.
function removeTarget(element)
    exports["qb-target"]:RemoveTargetModel(element)
end

-- $$$$$$$\  $$$$$$$\   $$$$$$\  $$\      $$\ $$$$$$$$\ $$\   $$\ $$$$$$$$\
-- $$  __$$\ $$  __$$\ $$  __$$\ $$ | $\  $$ |\__$$  __|$$ |  $$ |\__$$  __|
-- $$ |  $$ |$$ |  $$ |$$ /  $$ |$$ |$$$\ $$ |   $$ |   \$$\ $$  |   $$ |
-- $$ |  $$ |$$$$$$$  |$$$$$$$$ |$$ $$ $$\$$ |   $$ |    \$$$$  /    $$ |
-- $$ |  $$ |$$  __$$< $$  __$$ |$$$$  _$$$$ |   $$ |    $$  $$<     $$ |
-- $$ |  $$ |$$ |  $$ |$$ |  $$ |$$$  / \$$$ |   $$ |   $$  /\$$\    $$ |
-- $$$$$$$  |$$ |  $$ |$$ |  $$ |$$  /   \$$ |   $$ |   $$ /  $$ |   $$ |
-- \_______/ \__|  \__|\__|  \__|\__/     \__|   \__|   \__|  \__|   \__|

function drawTxt(key, text, font, centre, x, y, scale, r, g, b, a)
    TriggerEvent("bit-interact:Start", key, text)

    -- default drawtxt:

    --[[SetTextFont(font)
    SetTextProportional(0)
    SetTextScale(scale, scale)
    SetTextColour(r, g, b, a)
    SetTextDropShadow(0, 0, 0, 0, 255)
    SetTextEdge(1, 0, 0, 0, 255)
    SetTextDropShadow()
    SetTextOutline()
    SetTextCentre(centre)
    SetTextEntry("STRING")
    AddTextComponentString(text)
    DrawText(x, y)]]
end

-- $$\        $$$$$$\  $$\   $$\  $$$$$$\  $$\   $$\  $$$$$$\   $$$$$$\  $$$$$$$$\
-- $$ |      $$  __$$\ $$$\  $$ |$$  __$$\ $$ |  $$ |$$  __$$\ $$  __$$\ $$  _____|
-- $$ |      $$ /  $$ |$$$$\ $$ |$$ /  \__|$$ |  $$ |$$ /  $$ |$$ /  \__|$$ |
-- $$ |      $$$$$$$$ |$$ $$\$$ |$$ |$$$$\ $$ |  $$ |$$$$$$$$ |$$ |$$$$\ $$$$$\
-- $$ |      $$  __$$ |$$ \$$$$ |$$ |\_$$ |$$ |  $$ |$$  __$$ |$$ |\_$$ |$$  __|
-- $$ |      $$ |  $$ |$$ |\$$$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |$$ |  $$ |$$ |
-- $$$$$$$$\ $$ |  $$ |$$ | \$$ |\$$$$$$  |\$$$$$$  |$$ |  $$ |\$$$$$$  |$$$$$$$$\
-- \________|\__|  \__|\__|  \__| \______/  \______/ \__|  \__| \______/ \________|

Lang.pickUp = "Pick up box"
Lang.openJobMenu = "Open job menu"
Lang.noJob = "You are not working as a treasure hunter, you cannot perform this action"
Lang.startJob = "You are now working as a treasure hunter"
Lang.finishJob = "You have finished your work as a treasure hunter, you have received a payment of"
Lang.noClothes = "You don't have the right clothes to start the job"
Lang.noClothesOff = "You must wear your work clothes during the working day"

-- $$$$$$\  $$\       $$$$$$\ $$$$$$$$\ $$\   $$\ $$$$$$$$\  $$$$$$\
-- $$  __$$\ $$ |     $$  __$$\\__$$  __|$$ |  $$ |$$  _____|$$  __$$\
-- $$ /  \__|$$ |     $$ /  $$ |  $$ |   $$ |  $$ |$$ |      $$ /  \__|
-- $$ |      $$ |     $$ |  $$ |  $$ |   $$$$$$$$ |$$$$$\    \$$$$$$\
-- $$ |      $$ |     $$ |  $$ |  $$ |   $$  __$$ |$$  __|    \____$$\
-- $$ |  $$\ $$ |     $$ |  $$ |  $$ |   $$ |  $$ |$$ |      $$\   $$ |
-- \$$$$$$  |$$$$$$$$\ $$$$$$  |  $$ |   $$ |  $$ |$$$$$$$$\ \$$$$$$  |
-- \______/ \________|\______/   \__|   \__|  \__|\________| \______/

function customResetClothes()
    -- insert your trigger here for reset clothes
end

if Config.Framework == "esx" then
    Clothes = {
        male = {
            ["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"] = 0,
            ["helmet_2"] = 0,
            ["chain_1"] = 0,
            ["chain_2"] = 0,
            ["ears_1"] = 0,
            ["ears_2"] = 0
        },
        female = {
            ["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"] = 0,
            ["helmet_2"] = 0,
            ["chain_1"] = 0,
            ["chain_2"] = 0,
            ["ears_1"] = 0,
            ["ears_2"] = 0
        }
    }
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

-- ZONES
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)
}

Last updated