I use a custom revision of the WIP Pointshop revision 61. I am trying to do two things.
First I want only “owner” ranked person to be able to manipulate points. There are two owners, myself and another.
Secondly I want to make the premade admin only function (that makes some items in the shop admin only) to be admin AND vip only. I have 3 VIP ranks. VIP, VIP mod, and VIP admin.
Here is my code for setting points. it was set to ply:IsAdmin(), but i changed it to the following:
concommand.Add("ps_setpoints", function(ply, cmd, args)
-- Set Points
if not ply:GetUserGroup() == "owner" then return end
Heres the code for admin only items
if item.AdminOnly and not ply:IsAdmin() and not ply:GetUserGroup() == "vip" and not ply:GetUserGroup() == "vip admin" and not ply:GetUserGroup() == "vip mod" then
ply:PS_Notify('Only admins and VIPs can buy this item!')
return
end
I then tested this myself by going in game and switching my ranks around with rcon.
With all ranks, even “regulars” and user, I could buy the VIP/Admin only items, and could still set points as any rank
Anyone see the issue here? Thanks everyone!
(User was banned for this post ("Wrong section, still not learning" - Gran PC))