Configuration
All settings live in config.lua. The defaults work out of the box, so only change what you need. Restart the resource after editing.
General
| Option | Default | What it does |
|---|---|---|
debug | false | Prints debug info to the F8 console and enables the /dsbed helper command. |
framework | 'auto' | 'auto' detects qbx_core, qb-core or es_extended. Or force 'qbx', 'qb' or 'esx'. |
medical | 'auto' | Which ambulance script handles death and revives. 'auto' picks ak47 or wasabi if one is running, otherwise your framework's own. Or force 'qbx', 'qb', 'esx', 'wasabi' or 'ak47'. |
bleedOutTime | nil | Seconds a downed player lasts before dying. nil uses the ambulance script's own time (qbx_medical's laststand time, ak47's Config.BleedOutTime, or 120 for the others). |
mouse | true | Shows the cursor so buttons are clickable. The E and G keys still work. |
showKiller | false | Shows the killer's name and ID. Can cause meta-gaming on serious RP servers. |
showWeapon | true | Shows the weapon under the cause of death. |
clock24h | true | Time of death as 24h (15:42) or 12h (3:42 PM). |
syncInterval | 30 | Seconds between EMS count and timer syncs with the server. |
Respawn
respawn = {
time = 300,
timeNoEms = 60,
minEms = 1,
holdTime = 3,
control = 38,
keyLabel = 'E',
auto = false,
tolerance = 2,
costFallback = 2000,
mode = 'direct',
locations = {
pillbox = { label = 'Pillbox Hill', coords = vec4(246.86, -567.63, 43.28, 242.27) },
paleto = { label = 'Paleto Bay', coords = vec4(-247.03, 6330.94, 32.43, 225.0) },
},
},
| Option | What it does |
|---|---|
time | Seconds a dead player waits before respawn unlocks, when enough EMS are on duty. |
timeNoEms | Seconds to wait when fewer than minEms EMS are on duty. |
minEms | EMS on duty needed for the long time to apply. |
holdTime | Seconds the respawn key must be held. |
control / keyLabel | The respawn key (control IDs) and the label shown on screen. |
auto | Respawn automatically when the timer ends, instead of hold-to-respawn. |
tolerance | Seconds of leeway on the server's timer check, for network delay. |
costFallback | Hospital bill used when the ambulance script's cost can't be read. |
mode | 'direct' revives the player standing at the nearest location. 'bed' (Qbox only) uses qbx_ambulancejob's hospital beds. Every other ambulance script uses 'direct'. |
locations | Respawn points. The player goes to the nearest one. Keys match qbx_ambulancejob hospital names, so 'bed' mode can show the label too. |
For 'bed' mode, your qbx_ambulancejob bed coordinates must be correct. Set debug = true, stand next to a hospital bed and type /dsbed to check them.
Hospital bill
On Qbox the bill and inventory wipe come from qbx_ambulancejob's own config (checkInCost and wipeInvOnRespawn). For the other scripts, set them here:
| Block | Used with | Options |
|---|---|---|
hospital | qb-ambulancejob and ESX | respawnCost = 2000, wipeInventory = false |
wasabi | wasabi_ambulance | respawnCost = 2000, wipeInventory = false |
ak47 | ak47_ambulancejob | respawnCost = nil (uses the first hospital's TotalCost in ak47's Config.RespawnOptions), wipeInventory = false |
The bill is taken from cash first, then bank. If the player can't afford it, they still respawn.
Face Death
Lets a dead player pay to skip the rest of the respawn timer.
faceDeath = {
enabled = true,
time = 30, -- seconds after death before the button unlocks
price = 1000,
},
The fee is charged on top of the hospital bill and must be paid in full (cash first, then bank). Set enabled = false to turn the feature off.
EMS calls
ems = {
jobs = { 'ambulance' },
control = 47, -- G
keyLabel = 'G',
cooldown = 60,
dispatch = 'auto',
custom = function(phase) end,
},
| Option | What it does |
|---|---|
jobs | QBCore and ESX: jobs counted as EMS on duty. Qbox counts every job of type ems. |
control / keyLabel | The Call EMS key and its label. |
cooldown | Seconds between EMS calls. |
dispatch | 'auto' uses ps-dispatch if it's started, otherwise the ambulance script's own alert. Or force 'ps-dispatch' or 'custom'. |
custom | Your own dispatch function, used when dispatch = 'custom'. See Developers. |
Voice
| Option | Default | What it does |
|---|---|---|
voice.muteDead | true | pma-voice: dead players can't talk or hear. |
voice.muteDowned | false | Same, for downed players. |
Look and feel
Branding
brand = {
show = true, -- logo + name in the top-left corner
name = 'GRAVITY',
sub = 'STUDIOS',
logo = 'img/logo.png', -- relative to web/
credit = true, -- "GRAVITY DEATH SCREEN" in the bottom-right corner
},
To use your own logo, put the image in web/img/ and set logo to its path.
Colours
colors = {
downed = '#1de9ff',
dead = '#1de9ff',
},
The accent colour of each screen, as a hex code. For example, '#ff2b45' gives a red downed screen.
Effects
| Option | Default | What it does |
|---|---|---|
effects.timecycle | true | Applies a screen filter while downed or dead. |
effects.downedTimecycle | 'rply_saturation_neg' | Filter while downed. 'REDMIST' gives a red tint. |
effects.downedStrength | 0.5 | Filter strength while downed (0 to 1). |
effects.deadTimecycle | 'rply_saturation_neg' | Filter while dead. |
effects.deadStrength | 1.0 | Filter strength while dead. |
effects.shake | true | Light camera shake while downed. |
effects.hideRadar | false | Hides the minimap while the screen is open. Leave off if your HUD controls the radar. |
effects.holdStyle | 'ekg' | Hold-to-respawn style: 'ekg' (heartbeat line), 'segments' (charge meter) or 'classic' (striped bar). |
Tips
Rotating tips in the bottom-left corner. Use an empty table (tips = {}) to hide them.
tips = {
'Stay safe out there...',
'New Life Rule: you forget the events that led to your death.',
},
Translations
All on-screen text, causes of death, dispatch messages and notifications are in locales/en.json. Edit it to change the wording, or copy it to another language file (for example locales/de.json) and set ox_lib's locale with setr ox:locale de in server.cfg.