Ok so I asked for help restricting an addon [PAC] in facepunch, and the author gave me this script to place in PAC's lua/autorun folder, and it works great.
hook.Add("PrePACConfigApply", "pac_regulars_only", function(ply, config)
if not (ply:IsUserGroup("local") or ply:IsUserGroup("thief") or ply:IsAdmin() or ply:IsSuperAdmin()) then
return false, "Only regulars and up can use pac!"
end
end)
Now I would like to take this idea and apply it to other addons, like Ragmorph.
Can someone please explain what exactly is going on here?
Is "PrePACConfigApply" something that PAC already has or is that something that is being created with this script here?
Can I just change that string(?) to PreRagmorphConfigApply, and drop it is ragmorph's autorun folder expecting it to work?
Thank you