ULX

Author Topic: My ULX command is appearing as uncategorized  (Read 1321 times)

0 Members and 1 Guest are viewing this topic.

Offline lRoberth

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
My ULX command is appearing as uncategorized
« on: July 12, 2018, 03:53:29 PM »
Steps to reproduce

    1.-Creating your own ULX CMD
    2.-Trying to use it using the GUI
    3.-Only appears as uncategorized

Expected behavior
Appear on the specified category.

Actual behavior
Doesn't appear, but the command does work.

Error(s) in server console, if any
None

Error(s) in player's console, if any
None

Version
ULib v2.63
ULX v3.73

My command code:
Code: [Select]
if SERVER then
local cmd = "!"..gAdmin.Functions.GetCMD() or "!apply"
local url_dir = gAdmin.Settings.CMD.URL or "http://google.com"
function ulx.gadmin_url(ply)
if !IsValid(ply) || !ply:IsPlayer() then print("This command can only be ran in-game!") return end
net.Start("gAdminURL")
net.WriteString(url_dir)
net.WriteEntity(ply)
net.Send(ply)
end
local gadmin_url = ulx.command("gAdmin", "ulx gadmin_url", ulx.gadmin_url, cmd)
gadmin_url:defaultAccess(ULib.ACCESS_ALL)
gadmin_url:help("Open the apply site using the Steam browser.")
end

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: My ULX command is appearing as uncategorized
« Reply #1 on: July 14, 2018, 03:20:19 PM »
Make sure to instantiate your command on both the server and the client so that XGUI can pick up on it as well.