Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: Olimium on September 27, 2014, 12:58:38 PM
-
Hello.
I was wondering if i can put Commands for the "Custom" tab to say "Fun" tab or maybe just a whole new Tab. Please help if you know how, or if there is an addon somewhere.
-
Changing which category a command is in is easy
Here's a small respawn command, for example
function ulx.respawn( calling_ply, target_ply )
target_ply:Kill()
target_ply:Spawn()
ulx.fancyLogAdmin( calling_ply, true, "#A respawned #T", target_ply )
end
local respawn = ulx.command( CATEGORY_NAME, "ulx respawn", ulx.respawn, "!respawn", true )
respawn:addParam{ type=ULib.cmds.PlayerArg }
respawn:defaultAccess( ULib.ACCESS_ADMIN )
respawn:help( "Respawns a player" )
-------------------------------------------
Look at the part that I bolded
That's what sets the category
The default files that create the commands (every file that by default is in addons\ulx\lua\ulx\modules\sh) will have CATEGORY_NAME there
At the top of that file, there will usually be something like "local CATEGORY_NAME = "Utility" or whatever the name of the category will be for that file
If you want to change that, just change the CATEGORY_NAME that is in the line that says "local blahblahblah = ulx.command" to "Fun" (fun in your case) -- remember the quotes
If you want to change everything in the file to a new category, just change the word in quotes on the top of the file
(Where it says: local CATEGORY_NAME = "NameOfCategoryHere")
le PS: I might have phrased all of that badly
Let me know if you need me to reiterate that (or someone else can idk)
-
Thank you so much!!! oh BTW great vids :) keep up the wonderful work
-
Thanks, Olimium
Glad you like 'em c: