Author Topic: Custom command, to open webpage  (Read 1844 times)

0 Members and 1 Guest are viewing this topic.

Offline XeanWolf20

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Custom command, to open webpage
« on: September 14, 2016, 11:53:31 AM »
When I'm in game and I look at the commands I have access to it doesn't how my commands, but when I manage perms for the groups it show it but under "_Uncategorized Cmds" bur as the code shows i want it in "Admin Commands". I don't get lua errors or anything in the client console or server, so I don't know can you help me please.

ULib v2.61
ULX v3.71

Gamemode: Darkrp

Code: [Select]
local CATEGORY_NAME = "Admin Commands"

function ulx.guidelines(ply)
ply:SendLua([[gui.OpenURL("http://puu.sh/rb8gu/12bac88ba6.png")]])
end

local guidelines = ulx.command( CATEGORY_NAME, "ulx guidelines", ulx.guidelines, "!guidelines")
guidelines:defaultAccess( ULib.ACCESS_SUPERADMIN )
guidelines:help( "Open the guidelines for Staff - use !guidelines or ulx guidelines ")
« Last Edit: September 14, 2016, 12:29:36 PM by XeanWolf20 »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Custom command, to open webpage
« Reply #1 on: September 14, 2016, 03:28:22 PM »
It works fine for me using the code you posted. Try removing ulx/data/misc_registereted.txt and changing maps.
Experiencing God's grace one day at a time.