STG ScriptsDocumentation
Fossil Hunt Job

Configuration

Every option in STG Multiplayer Fossil Hunt Job config.lua and settings.lua, from excavation sites and fossils to levels, NPCs, the job truck, job lock and Discord avatars.

All settings live in stg-fossil/config.lua, the Discord bot token lives in stg-fossil/settings.lua. Both files stay editable in the escrow version, together with stg-fossil/locales/ and stg-fossil/client/editable/. Restart the resource after a change.

Language

Config.Language = "en"

Available: en, de, fr, es, pt, it, nl, pl, sv, no, fi, ar, he, jp, zh. To change a text, edit the matching file in stg-fossil/locales/. The web block inside each file holds the menu texts.

Framework

Config.Framework = "auto"

auto uses qb-core when it is started, otherwise es_extended. Set esx or qb to force one.

Interaction

Config.Target = true

With true, players open the menu through the Open Fossil Menu option on the job NPC (ox_target or qb-target). With false, they stand within 3 metres of the NPC and press E.

The finish point at the end of a job always uses the target system, so ox_target or qb-target must run even when Config.Target is false.

Progress bar

Config.ProgressBar = "lib"

Progress bar shown while digging. lib uses the ox_lib progress bar, qb uses the QBCore progress bar.

Dig time

Config.digTime = 2

Seconds a player digs when the shovel hits an empty spot. Digging on a fossil uses the dig_time of that fossil instead.

Job lock

Config.Job = {
    enabled = false,
    jobs = {
        'fossil',
    },
}

Prop

Type

Vehicle keys and fuel

function giveKey(vehicle, plate)
    if GetResourceState('qb-vehiclekeys') == 'started' then
        TriggerEvent("vehiclekeys:client:SetOwner", plate)
    else
        -- your code
    end
end

function setFuel(vehicle)
    -- ox_fuel, LegacyFuel, cdn-fuel, ps-fuel, stg-fuel, otherwise the native fuel level
end
  • giveKey: runs for every lobby member once the job truck spawns. It gives the keys through qb-vehiclekeys when it runs. Replace the -- your code line to use another key script.
  • setFuel: fills the job truck to 100. It detects ox_fuel, LegacyFuel, cdn-fuel, ps-fuel and stg-fuel, and falls back to the native fuel level. Add your own fuel script here if it is not listed.

Job NPC and truck

Config.Menu = {
    coord = vec4(315.0173, -705.7099, 28.3188, 337.0935),
    npc = "cs_joeminuteman",

    finish_point = {
        coord = vec3(314.3983, -700.9951, 29.3306),

        marker = {
            color = { r = 0, g = 255, b = 0, a = 150 },
            type = 1,
            size = vector3(2.0, 2.0, 2.0)
        }
    },

    vehicle = {
        model = "bison",
        coord = vec4(318.0098, -702.0175, 29.3404, 271.2518),
        plate = {
            active = true,
            prefix = "FOSSIL",
        }
    },

    blip = {
        label = "Fossil Hunter",
        sprite = 540,
        scale = 0.7,
        color = 5,
        visible = true
    }
}

Prop

Type

The bed of the truck has 16 spots for fossils. Keep the total fossil count of a site at 16 or less, extra fossils still count but are not shown in the truck.

Delivery NPC

Config.delivery = {
    npc = "cs_joeminuteman",
    coord = vec4(43.9228, -1313.3883, 28.3189, 324.6807)
}

Prop

Type

Levels

Config.Levels = {
    { level = 1, nextLevel = 200 },
    { level = 2, nextLevel = 400 },
    { level = 3, nextLevel = 800 },
    { level = 4, nextLevel = 1500 },
    { level = 5, nextLevel = false },
}

Prop

Type

Fossils

Config.Fossils = {
    {
        name = "trex",
        label = "T-Rex",
        prop = "qua_rock_fossil_2b",
        clean_prop = "qua_fossil_2",
        description = "This fossil shows clear signs of exposure and sedimentation, likely dating back millions of years.",
        dig_time = 7,
    },
    -- body (Raptor body), ammonite (Ammonite)
}

Prop

Type

Excavation sites

The script ships with 4 sites. Each entry describes one site in the menu:

Config.Tasks = {
    {
        label = "Fosil Site A",
        icon = "fossile_1.png",
        coord = vec3(-831.0305, -1906.1584, 19.1896),
        radius = 25.0,
        details = "This coastal excavation site stretches along an ancient dried riverbed...",
        level = false,
        players = {
            min = 1,
            max = 4,
        },
        reward = {
            exp = 50,
            money = 100,
        },
        list = {
            { name = "ammonite", amount = 2 },
            { name = "body", amount = 1 },
        }
    },
    -- Site B (level 2), Site C (level 3), Site D (level 4, 2 to 4 players)
}

Prop

Type

The 4 default sites share the same coordinate. Move each one to its own spot to spread the job around the map.

Discord avatars

Settings = {
    botToken = ""
}

In stg-fossil/settings.lua. Paste a Discord bot token (not a webhook) to show each player's Discord avatar on their profile and in the lobby. Leave it empty to use the default picture. See how to create a bot token.

Editable client files

The files in stg-fossil/client/editable/ stay open in the escrow version:

  • notify.lua: the notify function uses ox_lib notifications. Replace its body to use your own notification system.
  • target.lua: the job NPC option and the finish point for ox_target and qb-target. Edit it to use another target system.
  • job.lua: reads the player's job for the job lock.

Still having trouble?

Open a ticket on our Discord. Our team answers around 15 hours a day.

Get help on Discord

On this page