Setting allowed usergroups for console command?

This is such a noob question, but what do I need to throw in with my concommand.add that allows only certian usergroups to use it?

It sounds a little confusing, so lemme rephrase:

What do I need to do to set a console command to only allow certain usergroups access?

[lua]if not ply:IsAdmin() then return end
if not ply:IsUserGroup( “group” ) then return end[/lua]

If you’re using evolve it is
[lua] ply:EV_GetRank() == “yourrank” [/lua] instead of IsUserGro

Make sure that this usegroup detection is not being run clientside.

if ( SERVER ) then
local function ccTellAll(ply, cmd, args)
if not ply:IsUserGroup(“moderator+”, “moderator”, “trialmoderator+”, “trialmoderator”, “admin+”, “admin”, “doubleadmin”, “superadmin”) then return end

local msg = ""

for n = 1, #args do
	msg = msg .. args[n] .. " "



So now with that line of code, the if not, it doesn’t let anyone run the command.
Any reason why? No errors.

I’m pretty sure the IsUserGroup only takes one string argument.