- 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:
1 parent
af0efacfe9
commit
d9fcb11930
17 files changed
+83
-58
No files matched your search
@@ -1,3 +1,22 @@
|
||||
local timeOutPlayers = {}
|
||||
|
||||
local function timeOutThread(src)
|
||||
CreateThread(function()
|
||||
timeOutPlayers[ps.getIdentifier(src)] = true
|
||||
Wait(3000)
|
||||
timeOutPlayers[ps.getIdentifier(src)] = nil
|
||||
end)
|
||||
end
|
||||
|
||||
function timeOut(src, event)
|
||||
if timeOutPlayers[ps.getIdentifier(src)] then
|
||||
ps.warn(ps.lang('Catches.onCooldownWarn', ps.getPlayerName(src), event))
|
||||
return true
|
||||
end
|
||||
timeOutThread(src)
|
||||
return false
|
||||
end
|
||||
|
||||
function verifyHas(source, items)
|
||||
local need = 0
|
||||
local have = 0
|
||||
|
||||
Reference in new issue
Block a user