inventory ulx usergroup function [what is wrong?]

hey guys,

ive got a inventory system and with this command in the inventory.lua i can set how many guns you can pickup.

with this line


local maxguns = CreateConVar( "drp_maxguns", "4", { FCVAR_REPLICATED, FCVAR_ARCHIVE } )

now i tried to do a function in a .lua file in lua/autorun that members and admins can pickup more guns.
but it seems not to work. what i am doing wrong? sorry im not a professional coder…


local maxguns = CreateConVar( "drp_maxguns", "6", { FCVAR_REPLICATED, FCVAR_ARCHIVE } ), function(ply)
		if ply:IsAdmin() or ply:IsUserGroup("superadmin") or ply:IsUserGroup("admin") or ply:IsUserGroup("operator") or ply:IsUserGroup("member") then
	end
end