How to make an alias in TF2
Type alias gg "say gg wp" in your game console, then typing gg runs the commands in quotes. Put aliases in autoexec.cfg to keep them.
alias
Creates a custom command name that runs one or more commands.
alias <name> <commands> Examples
alias +sniperzoom "+attack2; viewmodel_fov 0" Run commands on press.
alias gg "say gg wp" Make a short chat command.
Arguments
nameRequired- New command name.
commandsRequired- Commands to run, in quotes, separated by semicolons.
What it does
Aliases power most TF2 scripts: toggles, weapon-specific settings and +/- key scripts. An alias starting with + runs on key press and the matching - alias runs on release.
The game's own description: Alias a command.
Run it on your server
On a SLASHPLAY server, type it in the Console tab of the server page; the reply shows right under it. A value set there lasts until the server restarts. To keep it, add the line to tf/cfg/server.cfg. New to this? Start a TF2 server first.
Your own
TF2 server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.