Skip to content

Commands & permissions

Commands, keys and permissions of Cuxial Diving, and who can use each one.

Cuxial Diving adds two player commands and three staff commands. Everything else is done from the job NPC and with keys.

Commands ​

CommandWhoWhat it does
/divinggearEveryoneTakes off the tank and the mask. The tank is not returned.
/divingresetCrew ownerResets the job in progress. The boat is removed, nobody is paid and the job is saved in the history as reset.
/divinglistStaff, consoleLists the crews: number, members, region and phase.
/divingclose <crew>Staff, consoleCloses the crew with that number. A job in progress is cancelled without payment.
/divingfast [count]StaffCompletes the required tasks of your own job: count pieces per task, or all of them if omitted. Only with debug enabled.

<crew> is required and [count] is optional. The crew number is the one shown by /divinglist. Command names can be changed, or the command disabled, in the commands block of shared/config.lua.

/divingfast only works when debug is on at the moment the resource starts: debug = true in shared/config.lua, or the convar cuxial_diving_debug set to 1 before starting. Do not leave it on in a live server.

Keys ​

KeyWhat it does
HDrops or raises the anchor. Only while seated in the job boat.
EDelivers the boat at the drop-off point, throws the rope to a floating box, and closes the final summary.
YAccepts a crew invite.
NDeclines a crew invite.
BackspaceHides the tip on screen.

These are the defaults of the keys block. Each player can rebind them in the GTA settings, under key bindings for FiveM.

Interactions ​

WhereOptionRequirement
Job NPCDiving jobBe allowed to do the job (job in the config).
CoralCut coralJob in progress, at the site.
TrashCollect trashJob in progress, at the site.
SuitcaseOpen suitcaseHold the weapon set in suitcase.weapon, a knife by default.
Open suitcaseLoot suitcaseNone.
Box on the seabedAttach lift bagCarry a lift bag. It is spent, along with some oxygen.
Box with a lift bagRaise boxNone.

Once a box floats, the rope is thrown with E from the boat, with the anchor down.

Gear ​

The tanks and the mask are used from the inventory.

  • A tank fills the oxygen and is spent on use. Using another tank fills it again.
  • The mask needs a tank on. It lets the player breathe underwater and turns on the light.
  • The gear cannot be put on inside a vehicle.
  • With gear.requireRun = true, the default, the gear only works during a job.
  • The gear is removed when the job ends, when the oxygen runs out or with /divinggear.

Crew roles ​

ActionWho
Invite and kick players, pick the region, start the jobCrew owner
Share the money by percentageCrew owner, with crew.splitRewards = true
Reset the jobCrew owner
Deliver the boatAny member seated in the boat
Leave the crewAny member. The owner cannot leave during a job: they reset it first.

If the owner disconnects during a job, another connected member becomes the owner. If nobody is left connected, the job is cancelled.

Permissions ​

FeatureRequirement
Open the panel, join a crew, use the gearHave a job allowed by job in shared/config.lua. With 'all', everyone.
Pick a regionEvery member of the crew at the region's minLevel or above.
/divinglist, /divingclose, /divingfastBelong to the group set in restricted, group.admin by default.

To give the staff commands to another group, change restricted in the commands block:

shared/config.lua
lua
commands = {
    gear = { name = 'divinggear' },
    reset = { name = 'divingreset' },
    list = { name = 'divinglist', restricted = 'group.mod' },
    close = { name = 'divingclose', restricted = 'group.mod' },
    fast = { name = 'divingfast', restricted = 'group.admin' },
},

A player belongs to a group through the usual lines of server.cfg:

server.cfg
cfg
add_principal identifier.license:xxxxxxxx group.admin

© Cuxial