Author Topic: Ulx New Commands  (Read 5390 times)

0 Members and 3 Guests are viewing this topic.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Ulx New Commands
« 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"
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Ulx New Commands
« Reply #1 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?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Ulx New Commands
« Reply #2 on: April 23, 2013, 11:57:25 AM »
I am also confused.
Experiencing God's grace one day at a time.

Offline nathan736

  • Full Member
  • ***
  • Posts: 143
  • Karma: 4
Re: Ulx New Commands
« Reply #3 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
« Last Edit: April 24, 2013, 08:37:55 AM by nathan736 »
a person asked me how to code lua and i said this " its like building a rocket up side down then  realizing you did it all wrong."

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Ulx New Commands
« Reply #4 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.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Ulx New Commands
« Reply #5 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?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Ulx New Commands
« Reply #6 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.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.