refactor: general improvement and cleanup

This commit is contained in:
Manason authored and GitHub committed 2023-11-08 23:23:33 -08:00
1 parent 5173547b24
commit 5b5ba9e1af
3 files changed
+105 -118

No files matched your search

+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)