ONE SYNC (WITH INFINITY) IS REQUIRED.
Add these entries for metadata in qbx_core/server/player.lua if you do NOT have them already.
Copy playerData.metadata.bleeding = playerData.metadata.bleeding or 0
REMOVE BANDAGE FROM OX INVENTORY.
Copy -- 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' , },
},
If adding a new heal item to the Server.HealItems table, you can simply add them to ox inventory items.lua like the following example:
Copy [ "exampleitem" ] = {
label = "Example Item" ,
weight = 500 ,
stack = true ,
close = true ,
consume = 0 ,
description = "A heal item." ,
client = { image = "exampleitem.png" , },
server = { export = 'randol_medical.exampleitem' , },
},