-
Автор темы
- #1
Код:
local client = {}
client.data_call = {}
client.call_delay = function(time, fn)
table.insert(client.data_call, {
fn = fn,
time = time,
realtime = GlobalVars.realtime
})
Cheat.RegisterCallback("draw", function()
for i, data in ipairs(client.data_call) do
if data.realtime + data.time < GlobalVars.realtime then
data.fn()
data.realtime = GlobalVars.realtime
end
end
end)
end
-- @note: example
client.call_delay(3, function()
print("test delay 3")
end)