rcon/server only command?

Hey, I’m looking for a way to make a command only available for the server/rcon I’ve looked everywhere but I didn’t found anything about that.

[lua]
if ( ply:IsSuperAdmin() or !ply:IsValid() )
[/lua]
That should work.

Nope thats what I tried…
attempt to call method ‘IsSuperAdmin’ (a nil value)

[lua]
concommand.Add(“randomcommand”,function(ply,_,args)
if ply == NULL then
//Only available through rcon
end
end
[/lua]

Just figured out, I kinda did the same thing as you ollie,



function Command(ply)
    if !ply:IsPlayer() then

    end
end
concommand.Add( "mycommand", Command )