Ulysses Stuff > General Chat & Help and Support

ULX Group help

(1/1)

Shotz:
So, me and my friend have a store for our GMOD server. We want to make PAC3 buyable but to do that we need to make a group. The issue is, if someone buys a package that doesn't have PAC3 included they will be removed from that group and no longer have PAC3. What can I do? Is there anyway to make them have permanent features after buying?

iViscosity:
What do you mean you need to make a group for them to use PAC? If you're using something like Pointshop, you shouldn't need to make a new group iirc. If you're using your own custom shop, just use something like CheckGroup or IsUserGroup

Shotz:
This is the code I need to use to restrict pac3 to certain groups:

--- Code: ----- add/change rank names here in the same format
local ranks = {
["pac3"] = true,
["owner"] = true,
["admins"] = true,
["superadmin"] = true,
}
    CustomCheckFailMsg = "Donators only",
hook.Add("PrePACEditorOpen", "PACRankRestrict", function(ply)
if not ranks[ply:GetUserGroup()] then
              return false,"Insufficient rank to use PAC."
        end
end)

--- End code ---

I want to make it so if they buy PAC3 Package they have it permanently so when they buy another package it doesn't get removed.

Navigation

[0] Message Index

Go to full version