The most frequent problems after installing Cuxial Medical, with the cause and the fix for each one.
The resource does not start
Cause. A dependency is missing or starts later than the script. Cuxial Medical needs OneSync, ox_lib, oxmysql and cuxial_bridge.
Fix. Enable OneSync and start the dependencies first:
ensure ox_lib
ensure oxmysql
ensure cuxial_bridge
ensure cuxial_medicalI changed shared/config.lua or data/hospitals.lua and nothing changed in game
Cause. On first start the script copies those values to the database, and from then on the database copy wins for every section of the admin panel.
Fix. Change the option from /medadmin. To load the values of the file instead, restart the resource and press Factory on that section of the panel. The blocks debug, ui, admin, commands, hospital and compat are always read from the file and only need a restart.
Players die and respawn, get revived or teleported at random
Cause. Another death or ambulance script is running. Cuxial Medical provides qb-ambulancejob and cannot share that role.
Fix. Remove every other medical script from server.cfg and restart the server.
The death screen or the admin panel never shows
Cause. The interface is not loading. The folder web/dist is missing or incomplete, usually after a partial upload.
Fix. Make sure web/dist/index.html and the folder web/dist/assets exist inside the resource. If they do not, copy the resource again from the original package and restart the server.
/medadmin answers that I have no access
Cause. Your framework does not grant you the permission in admin.permission ('admin' by default).
Fix. Give yourself that permission in your framework, or change admin.permission in shared/config.lua and restart the resource.
/revive, /heal or /kill are not available to my staff
Cause. By default those commands are restricted to the ACE group group.mod, not to the framework permission.
Fix. Add the staff member to the group:
add_principal identifier.license:xxxxxxxxxxxxxxxx group.modOr set restricted = false on the command in shared/config.lua, so it uses admin.permission.
"You are not on duty as EMS" when using an item
Cause. The job of the player is not in jobs, or the player is off duty. Every medical item, the medical bag and the stretcher need both.
Fix. Add the job in the EMS jobs section of the panel and go on duty with the duty system of your framework. On ESX, check that your version stores the duty state of the job.
Using a medical item does nothing
Cause. One of these:
- The item does not exist in your inventory under the name set in the config.
- The inventory is not one supported by
cuxial_bridge. - The item name was changed in the Items or Extras section of the panel and the resource has not been restarted.
Fix. Check the item names against install/items.lua, and restart the resource after changing them.
The defibrillator asks for a medkit
Cause. The defib item starts the CPR mode set in treatment.reviveAnimMode. The default mode, fast, requires and consumes the item in treatment.cpr.fast, a medkit.
Fix. Set reviveAnimMode to full to revive with the defibrillator only, or change the items in treatment.cpr.
A downed player cannot respawn
Cause. One of these:
- The current phase has
respawn = false. With the defaults, the first phase does not allow it. respawn.checkIn.enabledistrueand enough EMS are on duty.- The player cannot pay the fee of the phase from the account in
respawn.payAccount.
Fix. Wait for the next phase or for a medic, or adjust the phases in the Death and phases section. When the last phase ends the player respawns at no cost.
The player respawns standing at the hospital instead of in a bed
Cause. respawn.useBed is false, or the hospital has no free public bed. Beds marked as private are never assigned.
Fix. Enable useBed and add more public beds to the hospital.
The player lies in the air or inside the bed
Cause. The bed model has no entry in data/beds.lua, or its offset does not match the prop.
Fix. Add your bed model to data/beds.lua with the right offset and heading, restart the resource and pick that model for the beds in the panel.
Saving in the panel answers "Invalid setting shape"
Cause. The section did not pass the validation:
- A phase or hospital
idis repeated, or has characters other than lowercase letters, numbers and_. - A phase lasts less than 1 second, or its icon is not
heart,droporskull. - The account is not
cashorbank. - A bed uses a model that is not in
data/beds.lua.
Fix. Correct the value and save again.
There is no NPC at the reception
Cause. One of these:
cuxial_interactionsis not running.hospital.reception.enabledisfalse.- The hospital is disabled, or its reception is disabled or has no position.
Fix. Start cuxial_interactions, then open Hospitals and beds in the panel and place the NPC with Place. The NPC appears without restarting.
The stretcher does not appear or cannot be loaded into the ambulance
Cause. One of these:
stretcher.enabledisfalse.- The player is not EMS on duty.
stretcher.modelwas changed to a model the server does not stream.- The vehicle model is not listed in
stretcher.vehicles, or the medic is further than itsdist.
Fix. Keep the default model, which is included in the resource, and add your ambulance models to Compatible vehicles in the Stretcher section.
The police do not receive the distress calls
Cause. cuxial_police is not running, or dispatch.police is false.
Fix. Start cuxial_police and enable Send to cuxial_police in the Dispatch section. EMS on duty are notified in any case.
Logs do not reach Discord
Cause. The webhook convar is empty, has a different name from logs.convar, or was set after the resource started.
Fix. Add the convar to server.cfg before the resource starts. It is read once:
set cuxial_medical_webhook "https://discord.com/api/webhooks/..."Then check that death, revive and combat are enabled in the Logs section.
I changed a key in death.keys but the old key still works
Cause. death.keys holds only the defaults. Once a player has joined, FiveM remembers their key binding.
Fix. Each player changes it in the GTA settings, under key bindings for FiveM. New players get the new default after a restart.
A player joins the server already downed
Cause. They disconnected while downed. The state is saved with the character and restored on the next login, in the phase that matches the time elapsed.
Fix. None needed. It is intended. Staff can use /revive.
A player takes no injuries and never goes down
Cause. The player has the state bag inDuel or inEvent. Cuxial Medical ignores them on purpose so duel and event resources can handle death themselves. It also happens with injury.enabled = false, which disables injuries only.
Fix. Clear the state bag from the resource that set it.
Hunger and thirst are not restored after a revive on ESX
Cause. The script resets hunger and thirst through the player metadata hunger and thirst. Status scripts that keep their own values do not read them.
Fix. Reset your status script from a server hook:
exports.cuxial_medical:onTreatment('revive', function(medic, target)
-- reset hunger and thirst of target in your status script
end)Texts appear in the wrong language
Cause. The script follows the ox:locale convar. Phase labels and the name and role of the reception NPC are plain text set in the panel.
Fix. Set the convar in server.cfg and restart. en and es are included, and both files in locales/ can be edited:
setr ox:locale "en"Then rename the phases in Death and phases.
Visible wounds do not appear
Cause. wounds.enabled is false, or the cause of death has no entry in data/wounds.lua.
Fix. Set wounds.enabled = true in shared/config.lua and restart the resource. Check that the cause and its layers exist in data/wounds.lua.
