How to make an alias in GMod
Type alias buildmode "sbox_godmode 1; sbox_playershurtplayers 0" in the console, then buildmode runs both commands until the server restarts.
alias
Creates a shortcut name that runs one or more commands.
alias <name> "<commands>" Examples
alias buildmode "sbox_godmode 1; sbox_playershurtplayers 0" One word to switch to building mode.
Arguments
nameRequired- Name of the new shortcut.
commandsRequired- Commands to run, separated by semicolons.
What it does
Separate several commands with semicolons inside quotes. Aliases last until the server restarts unless defined in a config file.
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 garrysmod/cfg/server.cfg. New to this? Start a GMod server first.
Your own
GMod server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.