Set up death and hospital
Make players who die stay down until a medic revives them or takes them to hospital. Set the respawn timer, who counts as a medic, how long hospital stays last, the bill, and where each hospital is in game.
Death and hospital is part of the Mechanics module. When a player dies, they stay on the ground instead of respawning. They can look around but can't move, and you can mute them and stop them using chat. A medic on duty can get them up where they are, or take them to hospital.
If nobody comes, a timer counts down. When it runs out, they can hold E to wake up in the nearest hospital.
Before you start#
- Death and hospital is in beta, so it's only switched on for some communities for now. If you'd like to try it, ask us in support.
- The Mechanics module and the CAD need to be installed. Medics are units on duty in the CAD, and the hospitals are the CAD's.
- Your game server needs the LonexOne FiveM resource, version 0.19.0 or newer. See Install the LonexOne FiveM resource.
- To change the settings, you need the Set up death and hospital permission. Owners and admins have it already. Give it to others under Roles.
- Take any other death or ambulance script off your server, like esx_ambulancejob, qb-ambulancejob or wasabi_ambulance. While one of those is running, LonexOne leaves death alone and says so in the server console.
Turn it on#
- On the website, go to Mechanics → Death & hospital.
- Tick Use death and hospital.
- Set the timers and the hospital stay, then click Save settings.
Your servers pick up the change within a minute.
The settings#
| Setting | What it does |
|---|---|
| Respawn after, in minutes | How long a downed player waits before they can wake up in hospital. |
| When no medic is on duty | The wait when nobody in a medic department is signed on. Keep it short so players aren't stuck on quiet nights. |
| Mute their voice | Nobody hears them while they're down. |
| Stop them using chat | Their chat messages don't send while they're down. Commands like /report still work. |
| Stay, in minutes | How long they stay in hospital before they're let out healed. |
| Bill | Taken from their character's bank account for each stay. 0 means free. It needs banking switched on in the CAD settings. If they don't have enough, nothing is taken and they're told. |
| Patient care report | When a medic takes someone to hospital, a patient care report goes in the CAD under the medic's name with the patient, hospital and time filled in. Pick Started for the medic to finish to leave it in their drafts, so they add the details and send it in themselves. Pick Sent in automatically to send it straight to review and the patient's medical history. Or pick None. |
Waking up in hospital after the timer counts as a hospital stay, so the stay and the bill apply then too. No report is started, because no medic was there.
Choose who are medics#
Under Who are medics, tick the departments whose units on duty can revive people and take them to hospital. With none ticked, every fire and EMS department counts.
Set up the hospitals#
The hospitals are the ones in the CAD settings under Fire & EMS. Each one needs a spot in game, where patients leave from and where people wake up. The CAD's starter hospitals, like Pillbox Hill Medical Center, already use their front door until you set your own.
The quickest way is in game:
- Stand where patients should come out, facing the way they should face.
- Type /hospitalspot and part of the hospital's name, like /hospitalspot pillbox.
Beds are optional. To add one, lie or stand where a patient should lie, facing the way they should face, and type /hospitalbed. It goes to the nearest hospital, or add part of a hospital's name after it. Each hospital can have up to 40 beds.
Patients lie in a free bed for their stay. If a hospital has no beds, or every bed is taken, they wait at the spot and can't walk away until they're let out.
You can also type spots and beds on the website as x, y, z, heading, one bed per line.
Both commands need the Set up death and hospital permission.
What medics do#
Medics need to be signed on in the CAD in a medic department and standing next to the patient.
- /revive gets the downed player next to you up where they are. Add their server ID to pick someone, like /revive 12.
- /hospital takes the downed player next to you to the nearest hospital. Add their server ID, a hospital's name, or both, like /hospital 12 sandy.
Staff can also get someone up with Heal in the staff menu.
You can rename or switch off these commands under Status & servers → Game resource.
If something isn't working#
- Players still respawn straight away: another death script is probably running. Look for a message about it in your server console, and take that script off your server.
- /revive says only medics on duty can do that: sign on in the CAD in a department ticked under Who are medics.
- /hospital says no hospital is set up in game yet: give at least one hospital a spot with /hospitalspot.
- Nobody was billed: check banking is on in the CAD settings, and that the player has a character with a bank account.
See also
Can't find what you need?
Open a ticket in our Discord and someone from the team will help. Found a bug, or missing a feature? Tell us on the feedback board.