Page cover

🀿Dive Zones

  • You can define any dive zone location you wish around the map to suit your server requirements

  • You can create item specific zones e.g. Medical crate zones, Weapon crate zones and more


  • The key is the diving zone name and must be unique

['My Diving Zone Name'] = {
    ---
},

  • Define zone settings

  • Set debug to true to visually debug the dive zone locations

  • Define coords for the dive zone (this should typically be the centre of the zone you wish to create) these must be vector3

  • Define the radius of the zone

  • Define the tickness of the zone

  • Define blip settings (blip info can be found here: https://docs.fivem.net/docs/game-references/blips/

['My Diving Zone Name'] = {
    zone = { -- define zone settings
        debug = true, -- debug zone
        coords = vector3(3454.71, 5720.94, -23.5), -- zone coords
        radius = 100, -- zone radius
        thickness = 10, -- zone thickness
        blip = { -- define blip settings
            enabled = true, -- enable blip for this shipwreck location
            id = 410, -- blip id
            colour = 3, -- blip colour
            scale = 0.6, -- blip scale
            title = 'Diving Zone', -- blip title
        },
    },
    ---
},
    

  • You can enable a ped to spawn for players to get equipment from, rent a boat, change clothes and view xp (if enabled)

  • If you do not use a ped you must make sure that players have a method to obtain the items required to dive

  • Coords for the ped must be vector4

['My Diving Zone Name'] = {
    ---
    
    ped = { -- define ped settings
        enabled = true,
        coords = vector4(3856.44, 4459.88, 1.85, 183.97), -- coords to spawn worker ped must be vector4
        model = 'hc_gunman', -- ped model
        icon = 'fa-solid fa-hand-point-up', -- target icon
        label = 'Diving Instructor', -- target label
        distance = 3.0, -- target distance
        blip = { -- define blip settings
            enabled = true, -- enable blip for this shipwreck location
            id = 409, -- blip id
            colour = 3, -- blip colour
            scale = 0.6, -- blip scale
            title = 'Diving Instructor', -- blip title
        },
    },
    
    ---
},

  • You can allow players to rent boats from the Diving Instuctor peds if enabled

  • The name is the spawn code of the boat used (usually a dinghy)

  • The cost is the price to rent the boat (this is returned minus the admin fee when boat returned)

  • The fee is the percentage of admin fee applied to the players refund deposit

  • Spawn coords is the spawn coords for the boatr and must be vector4

['My Diving Zone Name'] = {
    ---
    
    boat = {
        enabled = true, -- set to true to enable boat hire
        name = 'dinghy', -- spawn name of boat
        cost = 1000, -- cost to rent boat
        fee = 25, -- percentage of admin fee when returning boat
        spawnCoords = vector4(3856.48, 4455.75, 0.12, 271.33), -- spawn coords for boat
    },

    ---
},

  • You can enable ship wreck props to spawn under the water to aid in immersion

  • Set enable to true to spawn a ship wreck

  • The model is the prop model of the object you wish to spawn (this does not have to be a shipwreck you could use a shipping container or something)

  • The coords must be vector4

['My Diving Zone Name'] = {
    ---
    
    wrecks = { -- define wreck settings
        enabled = true, -- set to true to enable spawning a shipwreck
        info = { -- define prop info
            model = 'hei_prop_heist_tug', -- prop model
        },
        coords = { -- define shipwreck spawn coords must be vector4
            vector4(3454.71, 5720.94, -23.5, 172.67),
        },
    },

    ---
},

  • Players must target crates and if enabled perform a skillcheck to search the crates for rewards

  • The model is the prop name of the crates you wish to use and can be a single prop or multiple

  • You can define a required item to interact with the crates if enabled and define that item name

  • You can define skillcheck settings and amount of times players must perform the skillchecks etc

  • You can define rewards and their respective amounts (if XP is enabled the XP level will determine the return amount based off your config values)

  • The coords must be vector4

['My Diving Zone Name'] = {
    ---
    
    crates = { -- define crate settings
        info = { -- define target settings
            icon = 'fa-solid fa-ship', -- target icon
            label = 'Search Crate', -- target label
            distance = 3.0, -- target distance
            models = {
                'sm_prop_smug_crate_s_bones',
            },
        },
        requiredItem = { -- define required item settings
            enabled = true, -- enable a required item
            name = 'crowbar', -- name of required item
            breakChance = 5, -- chance for required item to break when searching crates
        },
        skillCheck = {
            enabled = true, -- enable skillcheck when searching crates
            repeated = true, -- enable repeating skillcheck when searching crates
            repeatAmount = 3, -- if enabled how many times does a player repeat the skillCheck
            sequence = { 'easy', 'easy', 'easy' }, -- skillCheck difficulty sequence
            keys = { 'w' }, -- skillCheck keys
        },
        rewards = { -- define item rewards and amounts (if XP is enabled the XP level will determine the reward amount so dont set too high)
            { name = 'salvagedcrate', amount = { min = 1, max = 2, }, }, -- make sure the salvaged crate and the chest key are ALWAYS available in the rewards list
            { name = 'chestkey', amount = { min = 1, max = 2, }, }, -- make sure the salvaged crate and the chest key are ALWAYS available in the rewards list
            { name = 'seaglass', amount = { min = 1, max = 4, }, },
            { name = 'fishinglure', amount = { min = 1, max = 4, }, },
            --add more items as required
        },
        coords = { -- definecrate spawn coords  must be vector4
            vector4(3462.25, 5719.06, -21.76, 147.32),
            vector4(3463.76, 5725.51, -22.78, 220.81),
            --add more coords as requuired
        },
    },

    ---
},

Last updated