• (Help) Restricting PAC3 to ULX Rank
    4 replies, posted
I'm trying to restrict PAC3 to staff ranks as with donator ranks, however, its not working. I used this as a guide: [url]https://github.com/CapsAdmin/pac3/wiki/PAC-in-gamemodes[/url] This is what I have: [url]http://pastebin.com/AZXJkFsT[/url] The only thing is, its restricting it from all ranks, including "superadmin". How would I go about doing this? I have the lua file in "garrymod/lua/autorun/server/".
[code] local allowedgroups = { "donator", "donator+", "elite", "moderator", "admin", "superadmin" } hook.Add("PrePACConfigApply", "DonatorRestrict", function(ply, outfit_data) if (!table.HasValue(allowedgroups, ply:GetUserGroup())) then return false, "PAC3 is restricted." end end) [/code] Put whatever groups you want into the allowed groups table.
[QUOTE=Lolcats;45277543][code] local allowedgroups = { "donator", "donator+", "elite", "moderator", "admin", "superadmin" } hook.Add("PrePACConfigApply", "DonatorRestrict", function(ply, outfit_data) if (!table.HasValue(allowedgroups, ply:GetUserGroup())) then return false, "PAC3 is restricted." end end) [/code] Put whatever groups you want into the allowed groups table.[/QUOTE] Thanks! I'll try that.
Hey! I'm working on the same thing. I was wondering about the file. Do you make a new file or do you add that code to an existing file?
@thomaspigmen make a new thread on the subject, don't bump old threads like this.
Sorry, you need to Log In to post a reply to this thread.