Examples
Job Script
RegisterNetEvent('miner:startMining', function()
local src = source
-- Require pickaxe
if not exports['skeexs-inventory']:HasItem(src, 'pickaxe', 1) then
TriggerClientEvent('QBCore:Notify', src, 'You need a pickaxe', 'error')
return
end
-- Check weight capacity
if not exports['skeexs-inventory']:CanCarryWeight(src, 1500) then
TriggerClientEvent('QBCore:Notify', src, 'Inventory full', 'error')
return
end
-- Start client animation
TriggerClientEvent('miner:client:animation', src)
Wait(5000)
-- Give ore
exports['skeexs-inventory']:AddItem(src, 'iron_ore', 3, {
quality = math.random(50, 100)
})
TriggerClientEvent('QBCore:Notify', src, 'You mined 3x Iron Ore', 'success')
end)Durability System
Crafting System
Police Evidence Locker
Weapon Ammo Check
Last updated