bug fixes

labkit/presses now are tabled in server side and has checks to see if you have an active table before proceeding/ gives back item if headpop or crash
This commit is contained in:
Mustache Dom committed 2024-11-22 12:26:27 -08:00
1 parent c2fddd6144
commit cdd26ab465
10 files changed
+149 -64

No files matched your search

+5 -3
View File
@@ -71,15 +71,17 @@ RegisterNetEvent("md-drugs:client:buyheroinlabkit", function()
TriggerServerEvent("md-drugs:server:getheroinlabkit")
end)
RegisterNetEvent("md-drugs:client:setheroinlabkit", function()
lib.callback.register("md-drugs:client:setheroinlabkit", function()
if herointable then
Notify(Lang.Heroin.tableout, 'error')
return false
else
herointable = true
local location, head = StartRay()
if not location then herointable = false TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then TriggerServerEvent('md-drugs:server:getheroinlabkitback') return end
if not location then herointable = false return end
if not progressbar(Lang.Heroin.table, 4000, 'uncuff') then return end
createLabKit(location, head)
return true, location
end
end)