Возвращаемся в прошлую тему с перебаном
Нашел проблему что бан не работает через консоль и вот вопрос
Как добавить проверку на консоль?
-- Анти перебан
hook.Add(ULib.HOOK_COMMAND_CALLED, "banid_filter", function(pl, cmd, args)
if not ULib.ucl.query(pl, cmd) or cmd ~= "ulx banid" then return end
if not pl:IsSuperAdmin() and ULib.bans[ args[1] ] then
pl:ChatPrint("Вы не можете перебанить игрока, который уже в бане")
return false
end
end)
hook.Add(ULib.HOOK_COMMAND_CALLED, "banid_filter", function(pl, cmd, args)
if pl ~= nil and not ULib.ucl.query(pl, cmd) or cmd ~= "ulx banid" then return end
if pl ~= nil and not pl:IsSuperAdmin() and ULib.bans[ args[1] ] then
pl:ChatPrint("Вы не можете перебанить игрока, который уже в бане")
return false
end
end)