General > Developers Corner
Gather a command's Arguments
[TNet] Chadness Everdeen:
Hello,
I am very new to this stuff and im creating a command panel for a scoreboard and obviously bans require a reason and a length whereas something like a kick just needs a target.
Is there an easy way to determine the arguments needed?
Thanks,
Chad Masters
iViscosity:
"ulx help" will give you a list of commands and their parameters on your server that you can use.
[TNet] Chadness Everdeen:
Hey,
thank you for a reply but i meant a table. Because ill be putting it into a list so that the user can pick the command they want and execute it with ease. But to do that i will need to check whether it needs a target, reason, number value etc...
I've got each command into the list but i want to be able to determine what input options to show, e.g a text input box or a slider.
iViscosity:
Hm... I guess I'm still a bit confused. What "table" do you want to get them in?
[TNet] Chadness Everdeen:
Im probably not explaining it enough.
I have a list that i have put all the commands that the player has access to.
So the next step is for me to overlay a button over each command which is easy.
We shall use the ban command for an instance. We know that the ban command needs a target, a reason and a number value for how long they are banned for.
But we dont specifically know this with every command, especially ulx commands from other addons so i need to make sure i get them all automatically.
Is that a little bit clearer?
thanks
Navigation
[0] Message Index
[#] Next page
Go to full version