refactor: general improvement and cleanup

This commit is contained in:
Manason
2023-11-08 23:23:33 -08:00
committed by GitHub
parent 5173547b24
commit 5b5ba9e1af
3 changed files with 105 additions and 118 deletions
+5 -6
View File
@@ -1,11 +1,10 @@
exports.qbx_core:CreateUseableItem("diving_gear", function(source)
TriggerClientEvent("qb-diving:client:UseGear", source)
TriggerClientEvent('qbx_divegear:client:useGear', source)
end)
exports.qbx_core:CreateUseableItem("diving_fill", function(source)
TriggerClientEvent("qb-diving:client:setoxygenlevel", source)
end)
RegisterNetEvent('qb-diving:server:removeItemAfterFill', function()
exports.ox_inventory:RemoveItem(source, 'diving_fill', 1)
local success = lib.callback.await('qbx_divegear:client:fillTank', source)
if success then
exports.ox_inventory:RemoveItem(source, 'diving_fill', 1)
end
end)