Simple medical system for ox_core that leverages StateBags, statuses and the CEventNetworkEntityDamage game event.
Our goal was to decouple the EMS job from the medical system to allow more flexibility. This system will not include EMS but we do plan on writing that as a separate resource.
This script handles:
- Wounding statuses using ox_core's status system.
- bleed
- stagger
- unconscious
- Player death and respawning using player state.
- Usage of Pillbox (default configured to AshiroDev's hospital map) for self-serve care.
Many lines of code have been borrowed from qbox-ambulancejob and their efforts have saved us a significant amount of work and time. Thanks guys.
Please open an issue prior to spending time coding any major changes to avoid wasting your time.
Revive player:
exports.rp_medical:Revive(target)
- ox_core
- ox_lib
- scully_emotemenu
- OneSync Infinity
- FXServer >=
5484
Drop script into resources folder
Create config file: medical.cfg
to adjust default settings
## respawn countdown (in seconds) | 180 by default
setr medical:deathTimer 60
## 0 to disable 1 to enable | 0 by default
setr medical:debug 1
Update required to run this script properly.
Run statuses.sql to update your database for compatibility or manually update the ox_statuses table.
INSERT INTO `ox_statuses` (`name`, `ontick`) VALUES ('unconscious', -0.1);
INSERT INTO `ox_statuses` (`name`, `ontick`) VALUES ('stagger', -0.1);
INSERT INTO `ox_statuses` (`name`, `ontick`) VALUES ('bleed', 0);