make user_noaccess not allowed to use their mic either

This commit is contained in:
edshot99 2024-11-24 16:12:54 -06:00
parent 5816b27f0c
commit 0216688b4c

View File

@ -1,21 +1,14 @@
hook.Add("PlayerInitialSpawn", "edshot_pac3_auto_ban_connect", function(player, transition)
hook.Add("PlayerInitialSpawn", "edshot_restrict_noaccess_connect", function(player, transition)
local userGroup = player:GetUserGroup()
if (userGroup == "user_noaccess") then
RunConsoleCommand("pac_ban", player:SteamID())
RunConsoleCommand("ulx", "gag", player:Nick())
end
end)
hook.Add("PlayerDisconnected", "edshot_pac3_auto_ban_disconnect", function(player)
local userGroup = player:GetUserGroup()
if (userGroup == "user_noaccess") then
RunConsoleCommand("pac_unban", player:SteamID())
end
end)
hook.Add("ULibUserGroupChange", "edshot_pac3_auto_ban_groupchange", function(id, allows, denies, new_group, old_group)
hook.Add("ULibUserGroupChange", "edshot_restrict_noaccess_groupchange", function(id, allows, denies, new_group, old_group)
if (new_group == "user_noaccess") then
RunConsoleCommand("pac_ban", id)
end