- added timeout function. any event you trigger puts a 3 second hold on the rest of the script for that player to ensure no injectors can endlessly spam and get things. if triggered while on cooldown a console print happens

This commit is contained in:
Mustache Dom committed 2025-08-16 23:43:20 -07:00
1 parent af0efacfe9
commit d9fcb11930
17 files changed
+83 -58

No files matched your search

+2
View File
@@ -28,6 +28,7 @@ local oxyLocs = {
ps.registerCallback('md-drugs:server:GetOxyLocs', function(source)
return oxyLocs
end)
ps.registerCallback('md-drugs:server:payfortruck', function(source)
local src = source
if ps.removeMoney(src, 'cash', prices.payfortruck) or ps.removeMoney(src, 'bank', prices.payfortruck) then
@@ -43,6 +44,7 @@ end)
RegisterServerEvent('md-drugs:server:giveoxybox', function()
local src = source
if timeOut(src, 'md-drugs:server:giveoxybox') then return end
if not onRoute[src] then
ps.notify(src, ps.lang('oxy.notOn'), "error")
return