JCKSDocs
JCKS JobsV2Funktionen

Door locks

Create doors, double doors and gates in game, set who may open them, fire breaching and the ox_doorlock import.

Doors, double doors, gates and garage doors are created in game: /jobadmin, Doors, New door, Pick in game, aim at the door and press E. The model and position are read from the world. For double doors the second leaf of the same model within 3 m is found automatically, otherwise you pick it too. Test in place locks the picked door before saving: walk to it, E locks or unlocks, Backspace goes back to the editor.

/doors opens the door list, /doorlabels shows door labels in the world. Both need admin or the bridge permission jobs.doors.

Access per door

  • jobs with a minimum grade,
  • duty,
  • items (key cards), optionally used up on opening,
  • character identifiers, picked from online players or every character in the framework database through jcks_bridge,
  • opening hours by server time, either open to everyone in the hours or usable only in the hours.

A door can lock again by itself after a set number of seconds, play sounds and stay open when unlocked. JCKS Jobs 2.0.0 has no door lockpicking. In a job group with the doors switch on, a door of one job also lets in the other jobs of the group.

The server owns every door state. Clients only register doors within streamDistance. The server checks distance, access and spam before anything changes.

Door list

Numbered list with search by number, name, job or player, a job filter, filters for nearby, public and player doors, teleport, and floating labels for admins (#12 Mission Row armory, red locked, green open). Multi select allows bulk give to or take from a player, add or remove a job, clear access, lock, unlock and delete. A right click on a door duplicates it or copies its access and settings (auto lock, sounds, locked after restart) to one door or every selected door.

Import from ox_doorlock

The Doors page imports existing ox_doorlock doors with one button. The ox_doorlock table stays untouched.

Fire breaching

Firefighters on duty (jobs in Config.Dispatch.fire) can force any locked door while a fire from the fire module burns within breach.fireRadius. Job, duty, distance, the fire and the time are checked on the server. Every forced door is logged.

Options

All keys are under Config.Doors in settings/config.doors.lua.

Key Type Default What it changes
enabled boolean true false registers no doors, hides the page and refuses door requests
streamDistance number 50.0 Metres in which doors exist for a player (20 to 150)
interactDistance number 2.0 Metres for the prompt on single and double doors (1.0 to 3.0)
gateDistance number 6.0 Metres for gates and garage doors (2.0 to 12.0)
maxDistance number 3.0 Hard limit the server accepts for doors (1.5 to 3.0)
adminBypass boolean true Admins open every door
multiJob boolean false A second job of a multijob player counts
toggleCooldown number 0.6 Seconds between two changes by one player (0.2 to 5)
gateRate number 1.0 Speed of gates and garage doors (0.1 to 5.0), per door override in the editor
doorRate number 10.0 Speed at which a single or double door swings shut when it is locked while open (0.5 to 20.0)
logToggles boolean true Every lock and unlock goes to the activity log, false logs only admin changes and forced doors
soundRange number 8 Metres in which door sounds play
sounds table lock, unlock, denied GTA frontend sounds
labelRadius number 30.0 Metres for floating labels (5 to 150)
nearbyRadius number 40.0 Metres for the Nearby filter (5 to 500)
breach.enabled boolean true Fire breaching
breach.fireRadius number 30.0 Metres to the nearest burning spot (5 to 200)
breach.duration number 5000 ms the action takes (1000 to 30000)
command string 'doors' Door list command, '' = off
labelsCommand string 'doorlabels' Labels command, '' = off

Doors are stored in jcks_job_doors.