Ulysses

General => Developers Corner => Topic started by: Bite That Apple on April 22, 2013, 07:07:19 PM

Title: Ulx New Commands
Post by: Bite That Apple on April 22, 2013, 07:07:19 PM
Is it possible to add like a text when creating a custom ulx plugin?

An example is like this:

local setmodel = ulx.command( CATEGORY_NAME, "ulx setmodel", ulx.setmodel, "!setmodel" )
setmodel:addParam{ type=ULib.cmds.PlayerArg }
setmodel:addParam{ type=ULib.cmds.StringArg, hint="models/headcrabblack.mdl" }
setmodel:addParam{ type=ULib.cmds.NumArg, min=0, max=255, default=255, hint="Red", ULib.cmds.round, ULib.cmds.optional }
setmodel:addParam{ type=ULib.cmds.NumArg, min=0, max=255, default=255, hint="Green", ULib.cmds.round, ULib.cmds.optional }
setmodel:addParam{ type=ULib.cmds.NumArg, min=0, max=255, default=255, hint="Blue", ULib.cmds.round, ULib.cmds.optional }
setmodel:defaultAccess( ULib.ACCESS_ADMIN )
setmodel:help( "Set any model to a player - !setmodel" )


So would there be a way to add text saying like w/e, instead of using "Help"
Title: Re: Ulx New Commands
Post by: JamminR on April 22, 2013, 07:30:56 PM
You lost me.
Please define/explain 'add text' in another way.
Where are you wanting this text to appear?
What context?
Title: Re: Ulx New Commands
Post by: Megiddo on April 23, 2013, 11:57:25 AM
I am also confused.
Title: Re: Ulx New Commands
Post by: nathan736 on April 24, 2013, 08:27:59 AM
what he PROBABLY means is he wants to use a non-standard text when ulx prints something in the chat?
OR
he .. idk. his copy paste confuzles me
Title: Re: Ulx New Commands
Post by: Bite That Apple on May 13, 2013, 08:38:08 AM
Well seeing as how I said it the first time I "might of" confused some people so let explain it like this. Well you know when you type just "!hp" and it will show you an example of its use :help('EXAMPLE HERE'). Now here is my problem, in xgui you will also see the example for whatever command you are using. What I want is to have like just text that will only show for that command in xgui. Like a text saying what I want it to say only showing in xgui and not in the Helpt text.
Title: Re: Ulx New Commands
Post by: JamminR on May 13, 2013, 07:24:46 PM
Not as separate as you want, no.
The 'Hint' parts of each parameter will show even if you don't use the :help parameter, but, that's not exactly what you're wanting.
Why are you not wanting commands in help but in XGUI?
Title: Re: Ulx New Commands
Post by: Bite That Apple on May 14, 2013, 07:04:12 PM
Not as separate as you want, no.
The 'Hint' parts of each parameter will show even if you don't use the :help parameter, but, that's not exactly what you're wanting.
Why are you not wanting commands in help but in XGUI?

I want it because I'm going to make it so the Version number of some of the tools sooner or later.