Steam Avatar
You aren't signed in

Server Command GUI

9 KB, 12 years ago, submitted by Nexus

From the instructions.txt inside:
Command To Server Gui
Version 4
By Nexus 4833

This mod allows you to bind custom commands to keys.
Each key can have two commands: one command when the key is pressed, another one for when it is released.
To give a key a command, open the servercommandgui and type the command into the large text box.
The gui is organized into panels: one for each keybind, and 2 columns per panel: for each command you can give a key.

When the "To Server" box is checked, the commands you type into the large text box will be treated the same way as typing / commands in the chat.
For example:
Instead of typing "/command argument anotherargument" into the chat,
you can type "command argument anotherargument" in the large text box, and bind that to a key to use it quickly at any time.
If you want to have an argument with multiple words, separate the words using an underscore _

When the "To Server" box is not checked, the commands will be treated as if you had typed them into the console
For example:
If you didn't have a mouse, and you needed to type "yaw(300);" into the console to move your character,
you can instead type "yaw(300);" into the large text box, and bind it to a key so you can turn whenever you want.

When the "Loops" box is checked, then the command in the large text box will repeat as long as the key is pressed/released depending on which column it is in.
The milliseconds between each loop is determined by the integer typed into the smaller text box under the larger one.
If a non-integer is typed into it, then it will become blank when you save.

To bind the command to a key:
Open up the main menu, and click options
click on the controls tab
scroll down until you find the Custom Commands section
click on the command and bind it to a key of your choice


tl;dr Example Setup:
Image

From here click save, and make sure you have custom command A binded to a key
When you press down on that key, you will say "i like turtles"
When you release the key, you will turn 300 degrees to the right every 500 milliseconds until you uncheck "Loops" or press the key again.

**SAVING PREFERENCES
To save the current setup of your GUI, check the "save pref" box at the top and click on the button next to it (1-5) that you want to save as.
You can load these preferences again by clicking on the number that the preferences were saved as while the "save prefs" box is unchecked,
then clicking the "Save" button at the bottom.

Congrats! You are now a master of keybinds!

Things to note:
checking/unchecking a box has an immediate effect, while a change in a text box will not take effect until you hit save.

The screenshot uploader was giving me grief, so here:
This is an old picture of the gui, but shows some of the types of commands you can do.
Image

INFINITE KEYBINDS!!
To add a new keybind, click the button at the bottom that says "New" to add a new panel.
A new keybind will have also appeared in your controls menu. You can bind that to a key for infinite fun!

Caution: The number of keybinds is saved to a variable that is saved to a notepad document inside your "config/client/servercommandgui" folder.
Deleting this file will cause the mod to not know how many keybinds you had.
If you bound a key to a command that did not get regenerated when the gui is reloaded,
that command will be rendered "unremappable" and can be fixed by adding enough commands to get to that command, or by resetting your keybinds to default.

Also, maximum arguments increased from 15 to OVER 9000!

***FUNCTION EDITOR
To open the function editor, click the ">>" button in the top right hand corner of the gui.
You can type in any code at all into the large box below, called the functionpad.
Give your code a name, and then click save.
To load a saved code, select it from the list and click load.

If your code has functions in it, you may want those functions to be available all the time.
In this case, check the "AutoExec" box and click save.

All that the "New" button does in the function editor is set the name, pad, and checkbox to be blank.

To use a custom function, first save it with a unique name, then go to the keybind list and type into one of the boxes "f:nameofcode"
your code will be executed when you activate the keybind.

Installation instruction for "Want You Gone"
Move "Want You Gone.cs" to "config/client/servercommandgui/functions"

Thanks to Uxie for being a good bug tester.

I did a quick edit to the file before it got approved, fixing an issue where keybinds could be generated out of order, and another issue where the keybind generator would be one off on its count.

Video Link: http://www.youtube.com/watch?v=0CYaTjqOiiY

Nexus
Yes, I know there is an open Eval again, but this is client sided. No one can inject code or do anything harmful to the client, and the client can already just open the console and screw himself over that way if he/she wanted to.
i understand.....

.....this
Nasoa
Yay!
Bad block
That would not be to use full
bran456man
nexus (if its the wwe one) SUCKS!
Nexus
@bran

I had this user name before Nexus in wwe existed.
Newt24
Can you specify which keys are used? If not, it doesn't seem like it would work well as A is used (by the majority of players) as left, so everytime they went left it would do the command, and B, well thats obvious...C is usually like Walk, D is taken as well, and E might be for some people.
Nexus
@Newt, I am sure you understand, and are just asking for the newbies that might take the names of the keybind literally.

To bind the command to a key:
Open up the main menu, and click options
click on the controls tab
scroll down until you find the Custom Commands section
click on the command and bind it to a key of your choice

Custom Keybind A does not need to be binded to key "a"
It can be bound to any key though the controls menu.
Negative
Very cool, when you can rapid fire light.
Cheese head
Looks high tech.............................................................................





AWESOME!!!
marble man
Umm,,, just as i DL this it got an update!?
Nexus
There is a known issue when updating this mod: If you bound a key to a command on the old gui, the key is now probably unremapable. This can be fixed by resetting the default keybinds in your command menu, or by recreating the keybind and manually unmapping it.
Bobby9macy
Hey, Nexus! I decided to download the add-on and give it a shot.
See ya around!
jojo127098
sooooo wait wait wait how the **** do you use this ****ing thing?
Nexus
@jojo

lol it is about to get even more advanced in the next update.
Command you want to execute in the large text box, then click save and bind it to a key.
Depending on what you want that command to do, you can then play around with some of the other settings.

Save a pref by checking "save pref" and then one of the numbers
load by clicking a number without checking "save pref"
jaybug111
Anyone notice the "slay rykuta"? xD
Nexus
If you think a video tutorial would help, I can make one. Leave comments saying what you think I should go into detail about.
Nexus
http://www.youtube.com/watch?v=0CYaTjqOiiY

Hope it helped
Sgt Dynamo Jet
@jaybug111
Fucking hell! I was literally about to say that exact sentence! ?!?!?!?!?!?!??!?!?!?
Nexus
Haha, Rykuta told me he would get this just so he could bind a key to ban me and say "haha Nexus" if I ever used that on him.
mariorules235270
Mining Powers GO!

Code:
mousefire(1);
schedule("25, 0, mousefire(1)");

I think.

Forget rapid fire - I'm getting t
Nexus
@mariorules
That is incorrect. The correct version is:

Code:
mousefire(1);schedule(25, 0, eval, "mousefire(0);");


AND IS IN THE VIDEO
Triumphancy
Someone deserves a cookie :cookie:
CameronOwnz
Dduuddeee, Thanks! :D
King of the Bill
FUNCTIONS?!??

OMFG COORDINATE MOD SHORTCUT!1!!!!
Shadow1426
Uxie was a bug tester? Ooooohhh he had the flashyyy lights at Sycrone's i think...
Pecon7
Underscores in the command seem to be converted into spaces. This causes issues for me.
Nexus
Yea, the underscore to space conversion was so you could have arguments with multiple words. I think that function names should be unaffected, but I can fix that if need be. There are also a couple of other lingering problems with other mods interfering with the keybind generation that I should account for.
bdtuco
Looks like GMod