Jump to content

Toggles, Aliases and Binds


TangoDown

Recommended Posts

Here I will cover some not so Known features and or Tips & Tricks I've Picked Playing Gmod/Half Life games (of course these all work in Gmod)

 

------ Console Command Basics ------

First thing you should know about console commands any Space you put in console counts as a new String. A command has a set number of strings it expects so if you for example use a ULX command (as far as I know the server doesn't use ULX so it is a example)

ULX Kick Your Mom Is Gay

Here Ulx is expecting 2 Strings. Ulx being the command and Kick being the action (string) and the last one being the name (string).  In order not to confuse. In this example ULX would kick any one with the name "Your". In order get the command to work properly you simply use quotation marks "Your Mom Is Gay" in the case of a command like this it would kick anyone matching the criteria. I.E. if you simply typed "Your Mom" and 3 players had "Your Mom" in there name regardless of the position it will kick those players.

------ Alias ------

Alias is a command that allows you to combined several commands into one. Keep in mind this will not bypass chat filters so You can't use it spam several lines of text. Alias is a pretty simple process simply type in console

alias +td "Your Commands Here"

alias being the command the second string is the name of the alias i.e. +TD and the third witch you see in quotations is your list of commands

 

In order to make full use of alias to have multiple commands you will want to use a semicolon witch is this Magical Creature below

;

So if you wanted to do 2 operations at the same time you could do something like

alias +td "say This is the End!;kill"

this would Say in chat This is the end and kill your self (assuming kill is enabled on the server)

 

------ Toggle Commands ------

Putting it all together with one more special trick (I don't know how to do this on a Mac so if your a mac user you'll have to search the interwebz)

 

The next trick you will learn is alt codes. Alt codes is a windows feature to allow you to put special char in text that are not on your keyboard such as wingdings witch is a type of font with in the windows system. a example of this is ¢ the cent sign. You simply hold alt on your keyboard and type on your Number Pad (numpad) 0162. one thing to keep in mind not all programs understand all alt codes so many alt codes will not work in Garry's Mod.

 

The Alt code we will be using is 0160 (and Yes you need to enter the 0) this looks like a space but is its own special char and windows simply shows it as a space. The reason for the alt code is that even though you are adding a key toggled command into the alias once you release the key it still sends the stop command when you release the key. the alt code after the first semicolon Stops that from happening.

 

Putting it all together.

For this example I will show you how to bind a key to toggle duck. For the perpous of showing you where the alt code is I will use the © symbol

-td : -duck;bind ctrl +td 

+td : +duck;©;bind ctrl -td 

bind ctrl +td

You don't have to use + or - for the alias name I just find it makes it easier to know whats going on if your looking at the alias

+ and - is how the game separates commands from commands that are Key presses such as using W to +forward. When you press W its sends +forward and when you release it sends -forward

 

with that I leave you with one last alias that will be useful to all you afk Miners

alias +aat "+attack;©;bind kp_minus -att"
alias -aat "-attack;©;bind kp_minus +att"
bind kp_minus +aat

Edit: Forgot to add. You need to enter the following command below to write your alias to your files else when you quit Gmod those aliases will disapper but the key binds will remain

 

host_writeconfi

 

Feel free to hit me up with any questions. Good luck.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...