General > Developers Corner

Commands without category?

<< < (2/4) > >>

TheNoobKid:
Sure.


--- Quote ---function ulx.undercover( calling_ply )
 
   if calling_ply:IsUserGroup("owner") then
      calling_ply:SetUserGroup("undercover")
 
   elseif calling_ply:IsUserGroup("undercover") then
      calling_ply:SetUserGroup("owner")
   end
 
--ulx.fancyLogAdmin( calling_ply, true, "#A went undercover" )
end

local undercover = ulx.command( CATEGORY_NAME, "ulx owner", ulx.undercover, "!under1", true )
undercover:addParam{ type=ULib.cmds.PlayerArg }
undercover:defaultAccess( ULib.ACCESS_SUPERADMIN )
undercover:help( "UNDERCOVER BIIIIACH!!" )
--- End quote ---

If I remove CATEGORY_NAME or add nil there, I'm getting lua errors. I want to remove it completely from the category list in ULX.

Megiddo:
You want to remove it from ULX help and XGUI? Only those with permission to use it can see it. Sounds like you may just have it configured for open access right now. Default access is only a default, servers can override that.

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given

[0] Board index

Go to full version