General > Developers Corner

Custom command, to open webpage

(1/1)

XeanWolf20:
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: ---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 ")

--- End code ---

Megiddo:
It works fine for me using the code you posted. Try removing ulx/data/misc_registereted.txt and changing maps.

Navigation

[0] Message Index

Go to full version