local function isAdmin(ply)
return ply:IsAdmin()
end
local function isAllowed(ply)
return ply:Team() == TEAM_PERSONAL -- Здесь команда работы
end
hook.Add("PlayerNoClip", "RestrictAdminNoclip", function(ply, state)
if isAdmin(ply) then
return isAllowed(ply)
end
end)
hook.Add("PlayerSpawn", "RestrictAdminGodMode", function(ply)
if isAdmin(ply) and not isAllowed(ply) then
ply:GodDisable()
return
end
ply:GodEnable()
end)
hook.Add("PlayerSwitchWeapon", "AutoUncloak", function(ply, oldwep, newwep)
if ply:GetNWBool("BAdmin_cloak") and isAdmin(ply) and not isAllowed(ply) then
ply:SetNWBool("BAdmin_cloak", false)
ply:SetMaterial(ply.BAC_prevMat or "")
end
end)