Config = {}Config.MinimalDoctors =2-- How many players with the ambulance job to prevent the hospital check-in system from being usedConfig.WipeInventoryOnRespawn =true/false-- Enable or disable removing all the players items when they respawn at the hospitalConfig.Locations = {} -- Edit the various interaction points for players or create new onesConfig.AuthorizedVehicles = {} -- Vehicles players can use based on their ambulance job grade levelConfig.Helicopter ="polmav" -- Helicopter model that players with the ambulance job can useConfig.Items = {} -- Items found in the ambulance shop for players with the ambulance job to purchaseConfig.BillCost =2000-- Price that players are charged for using the hospital check-in systemConfig.DeathTime =300-- How long the timer is for players to bleed out completely and respawn at the hospitalConfig.PainkillerInterval =60-- Set the length of time painkillers last (per one)Config.HealthDamage =5-- Minumum damage done to health before checking for injuriesConfig.ArmorDamage =5-- Minumum damage done to armor before checking for injuriesConfig.ForceInjury =35-- Maximum amount of damage a player can take before limb damage & effects are forced to occurConfig.AlwaysBleedChance =70-- Set the chance out of 100 that if a player is hit with a weapon, that also has a random chance, it will cause bleedingConfig.MessageTimer =12-- How long it will take to display limb/bleed messageConfig.AIHealTimer =20-- How long it will take to be healed after checking in, in secondsConfig.BleedTickRate =30-- How much time, in seconds, between bleed ticksConfig.BleedMovementTick =10-- How many seconds is taken away from the bleed tick rate if the player is walking, jogging, or sprintingConfig.BleedMovementAdvance =3-- How much time moving while bleeding addsConfig.BleedTickDamage =8-- The base damage that is multiplied by bleed level everytime a bleed tick occursConfig.FadeOutTimer =2-- How many bleed ticks occur before fadeout happensConfig.BlackoutTimer =10-- How many bleed ticks occur before blacking outConfig.AdvanceBleedTimer =10-- How many bleed ticks occur before bleed level increasesConfig.HeadInjuryTimer =30-- How much time, in seconds, do head injury effects chance occurConfig.ArmInjuryTimer =30-- How much time, in seconds, do arm injury effects chance occurConfig.LegInjuryTimer =15-- How much time, in seconds, do leg injury effects chance occurConfig.HeadInjuryChance =25-- The chance, in percent, that head injury side-effects get appliedConfig.LegInjuryChance = { -- The chance, in percent, that leg injury side-effects get applied Running =50, Walking =15}Config.MajorArmoredBleedChance =45-- The chance, in percent, that a player will get a bleed effect when taking heavy damage while wearing armorConfig.DamageMinorToMajor =35-- How much damage would have to be applied for a minor weapon to be considered a major damage event. Put this at 100 if you want to disable itConfig.AlertShowInfo =2-- How many injuries a player must have before being alerted about themConfig.WeaponClasses = {} -- Define gta weapon classe numbersConfig.MinorInjurWeapons = {} -- Define which weapons cause small injuriesConfig.MajorInjurWeapons = {} -- Define which weapons cause large injuriesConfig.AlwaysBleedChanceWeapons = {} -- Define which weapons will always cause bleedignConfig.ForceInjuryWeapons = {} -- Define which weapons will always cause injuriesConfig.CriticalAreas = {} -- Define body areas that will always cause bleeding if wearing armor or notConfig.StaggerAreas = {} -- Define body areas that will always cause staggering if wearing armor or notConfig.WoundStates = {} -- Translate wound alertsConfig.BleedingStates = {} -- Translate bleeding alertsConfig.MovementRate = {} -- Set the player movement rate based on the level of damage they haveConfig.Bones = {} -- Correspond bone hash numbers to their labelConfig.BoneIndexes = {} -- Correspond bone labels to their hash numberConfig.Weapons = {} -- Correspond weapon names to their class numberConfig.VehicleSettings = {} -- Enable or disable vehicle extras when pulling them from the ambulance job vehicle spawner
Items
ifaks - Relieves player stress and heals them by + 10
bandage - Heals player by + 10 and has 50% chance of removing 1 level of bleeding
firstaid - Completely heals closest player as long as they are in last-stand
painkillers - Stops bleeding temporarily but wears off over time
Events
Calling this event will modify the players isdead metadata to the passed bool (true/false)
-- Server eventRegisterNetEvent('hospital:server:SetDeathStatus', function(isDead)-- ExampleTriggerServerEvent('hospital:server:SetDeathStatus', true)
Calling this event will modify the players inlaststand metadata to the passed bool (true/false)
-- Server eventRegisterNetEvent('hospital:server:SetLaststandStatus', function(bool)-- ExampleTriggerServerEvent('hospital:server:SetLaststandStatus', true)
Calling this event will send a notification to all players with the ambulance job title
-- Server eventRegisterNetEvent('hospital:server:ambulanceAlert', function(text)-- ExampleTriggerServerEvent('hospital:server:ambulanceAlert', 'I need help')
Calling this event will revive a player for free or a fee with a true bool
Could be used for a revive spot/ped that charges money
This event always removes a first aid kit from the source player
Using this callback will return the number of players online with the ambulance job
QBCore.Functions.CreateCallback('hospital:GetDoctors', function(source,cb)-- ExampleQBCore.Functions.TriggerCallback('hospital:GetDoctors', function(cb)print('The number of doctors online is '..cb)end)
Commands
/911e [message] - sends a message to EMS
Sends a message to EMS players with the job 'ambulance'.
Permission level: user
message - (required) The message to send
/status - check the status of the nearest player
This will find the closest player and check their health status
Permission level: user
/heal - heals the nearest player
This will find the nearest player and heal them
Permission level: user
/revivep - revives the nearest player
This will find the nearest player and revive them
Permission level: user
/revive - revive yourself
Revives yourself to full health
Permission level: admin
/setpain [opt: id] - sets the pain level to the player
Sets the pain level to the player with the given id or to yourself if no id is given.
Permission level: admin
/kill [opt: id] - kills the player
Kills the player with the given id or kills yourself if no id is given.
Permission level: admin
id - (optional) The player id
/aheal [opt: id] - heals a player
Heals a player with the given id or heals yourself if no id is given.