Skip to main content

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​

OptionDefaultWhat it does
debugfalsePrints 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'.
bleedOutTimenilSeconds 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).
mousetrueShows the cursor so buttons are clickable. The E and G keys still work.
showKillerfalseShows the killer's name and ID. Can cause meta-gaming on serious RP servers.
showWeapontrueShows the weapon under the cause of death.
clock24htrueTime of death as 24h (15:42) or 12h (3:42 PM).
syncInterval30Seconds between EMS count and timer syncs with the server.

Respawn​

config.lua
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) },
},
},
OptionWhat it does
timeSeconds a dead player waits before respawn unlocks, when enough EMS are on duty.
timeNoEmsSeconds to wait when fewer than minEms EMS are on duty.
minEmsEMS on duty needed for the long time to apply.
holdTimeSeconds the respawn key must be held.
control / keyLabelThe respawn key (control IDs) and the label shown on screen.
autoRespawn automatically when the timer ends, instead of hold-to-respawn.
toleranceSeconds of leeway on the server's timer check, for network delay.
costFallbackHospital 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'.
locationsRespawn points. The player goes to the nearest one. Keys match qbx_ambulancejob hospital names, so 'bed' mode can show the label too.
tip

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:

BlockUsed withOptions
hospitalqb-ambulancejob and ESXrespawnCost = 2000, wipeInventory = false
wasabiwasabi_ambulancerespawnCost = 2000, wipeInventory = false
ak47ak47_ambulancejobrespawnCost = 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.

config.lua
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​

config.lua
ems = {
jobs = { 'ambulance' },
control = 47, -- G
keyLabel = 'G',
cooldown = 60,
dispatch = 'auto',
custom = function(phase) end,
},
OptionWhat it does
jobsQBCore and ESX: jobs counted as EMS on duty. Qbox counts every job of type ems.
control / keyLabelThe Call EMS key and its label.
cooldownSeconds 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'.
customYour own dispatch function, used when dispatch = 'custom'. See Developers.

Voice​

OptionDefaultWhat it does
voice.muteDeadtruepma-voice: dead players can't talk or hear.
voice.muteDownedfalseSame, for downed players.

Look and feel​

Branding​

config.lua
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​

config.lua
colors = {
downed = '#1de9ff',
dead = '#1de9ff',
},

The accent colour of each screen, as a hex code. For example, '#ff2b45' gives a red downed screen.

Effects​

OptionDefaultWhat it does
effects.timecycletrueApplies a screen filter while downed or dead.
effects.downedTimecycle'rply_saturation_neg'Filter while downed. 'REDMIST' gives a red tint.
effects.downedStrength0.5Filter strength while downed (0 to 1).
effects.deadTimecycle'rply_saturation_neg'Filter while dead.
effects.deadStrength1.0Filter strength while dead.
effects.shaketrueLight camera shake while downed.
effects.hideRadarfalseHides 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.

config.lua
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.