dobrograd-13-06-2022/garrysmod/addons/_config/lua/config/octolib-backup/hooks.lua

13 lines
256 B
Lua
Raw Normal View History

2023-11-16 15:01:19 +05:00
hook.Add('dbg-char.spawn', 'octolib.backup', function(ply)
if ply.restoringBackup then return end
ply.restoringBackup = true
timer.Simple(4, function()
if IsValid(ply) then
octolib.restoreBackup(ply)
ply.restoringBackup = nil
end
end)
end)