Installation
Import armour_data.sql into your database
CREATE TABLE player_armour (
identifier VARCHAR(255) NOT NULL PRIMARY KEY,
amount INT NOT NULL
);Put this code into ox_inventory\modules\items\client.lua under Item('bandage') ... end)
Item('armour_vest', function(data, slot)
if GetPedArmour(cache.ped) == 0 then
ox_inventory:useItem(data, function(data2)
if data2 then
TriggerServerEvent("dp_armour:saveData",data2.metadata.durability)
lib.notify({
title = 'Armour',
description = 'Armour has been applied',
type = 'success'
})
end
end)
else
lib.notify({
title = 'Armour',
description = 'You are already wearing armour',
type = 'error'
})
end
end)Put this code into ox_inventory\data\items.lua
Put this code into ox_inventory\data\crafting.lua
Last updated