This explains the small installation steps which are necessary for persistent death/armor across server restarts. You can remove esx_ambulancejob. ONLY SUPPORTS OX INVENTORY.
ONE SYNC (WITH INFINITY) IS REQUIRED.
REMOVE BANDAGE FROM OX INVENTORY.
-- REMOVE THIS FROM ox_inventory/modules/items/client.lua
Item('bandage', function(data, slot)
local maxHealth = GetEntityMaxHealth(cache.ped)
local health = GetEntityHealth(cache.ped)
ox_inventory:useItem(data, function(data)
if data then
SetEntityHealth(cache.ped, math.min(maxHealth, math.floor(health + maxHealth / 16)))
lib.notify({ description = 'You feel better already' })
end
end)
end)
-- EDIT the BANDAGE item from ox_inventory/data/items.lua (if it exists) so it looks like this
['bandage'] = {
label = 'Bandage',
weight = 115,
consume = 0,
server = {
export = 'randol_medical.bandage',
},
},
-- Add these items below if you wish to use them.
["firstaid"] = {
label = "First Aid",
weight = 2000,
stack = true,
close = true,
description = "",
consume = 0,
client = { image = "firstaid.png", },
server = {
export = 'randol_medical.firstaid',
},
},
["medicalbag"] = {
label = "Medical Bag",
weight = 500,
stack = true,
close = true,
consume = 0,
description = "A medical bag.",
client = { image = "medicalbag.png", },
server = { export = 'randol_medical.medicalbag', },
},
Adding new heal items
If adding a new heal item to Server.HealItems table, you must follow the format below where the item name is also the export name when adding it to ox inventory items.lua.