Following is a list of all commands that can be issued from the server console. Many of these also appear in the config files that initialize ClanMod. Players may also use these commands from the client if combined with rcon or an alias (see the cm_alias command below).
All files referenced in this section are in <mod_dir>/addons/clanmod.
If a command defines a text field element and a similar element has already been defined, then the new one won't be added. Use a unique name for each new entry.
cm_addcvar "<cvar name>" "<starting value>" <flags>
This command creates a new server cvar. If starting value is "", the starting value will default to "0". The following flags will affect the cvar:
- a cause cvar to be saved to vars.rc
- b the cvar's string cannot contain unprintable characters
- l if this is a Fcvar_SERVER, don't log changes to the log file/console
- n notify all players when cvar changes (shows in client console)
- p don't send actual value to clients. Instead, send 1 if it's not null/zero, 0 otherwise
- r cvar cannot be changed by clients connected to a multiplayer server
- u changes the client's info string
Examples of usage:
- cm_addcvar "cm_newvar" "my value"
cm_admin "<nick, ip or wonid>" "<password>" "<level and flags>"
This command creates a new admin account. All of your cm_admin commands should be in your cm_admins.cfg file. The command is described in great detail including examples in the section titled "Creating an admin account". Please see that section for details.
cm_alias "<name>" "<server command>" <level and flags>
Set an alias for a server command. Aliases can be run on the client without using rcon. Also, if the appropriate flag is set, aliases can be run through the say/say_team commands by the clients. These commands should be in your cm_aliases.cfg file. Admins must have one of the listed levels to use the alias. Available flags are:
- a available for all players
- c if flag "s" is present, then this alias must be called as one word
- d pass name of alias through engine
- l execute on player who calls this alias
- o execute not on server, but on all players
- s look for this in say and say_team commands
- t search for alias in words/commands
Examples of usage:
- Alias named "cl" for "changelevel" command. This allows all admins with "M" level to execute a changelevel command without the use of rcon or the menu system. If they type "cl <mapname>" into their client console, the map will change to <mapname>.
- cm_alias "cl" "changelevel" M
- Alias which will set the cvar sv_restartround to 1. Only admins with S level can use this command. To use this, type "rr" in client console.
- cm_alias "rr" "sv_restartround 1" S
- Play file with hello message to everyone if someone says a sentence with the word "hello" in it. This is available to all players.
- cm_alias "hello" "spk 'barney/heybuddy'" saotc
- Execute on client side and don't pass primary alias through say command
- cm_alias myid "say My name is &name&, wonid &wonid& and ip &ip&" sald
Note: Aliases that are executes using the say command (flag "s") can't have spaces in name. They also can't be called with arguments.cm_ban "<name, wonid, ip or id>"
Bans people from your server and writes it in banlist.txt
Examples of usage:cm_bury "<name, wonid, ip or id>"
- Bans player This|Clown from the server
- cm_ban This|Clown
It will bury a player in the ground.
Examples of usage:cm_unbury
- Will bury player This|Clown in the ground
- cm_bury This|Clown
Will cancel the effect of cm_bury
Examples of usage:cm_cancelvote
- Will ynbury player This|Clown in from the ground
- cm_unbury This|Clown
Cancels the current vote in progress.
cm_clexec "<name, wonid, ip or id>" "<command to execute>"
Causes a command to be executed on the identified client. cvar cm_clientcmd must be set to 1. As "name" you can also use "*" to execute the command on all clients. In Counter-Strike, use "t" or "ct" to execute on specified team. This command is aliased as "clexec" so clients can use it.
Examples of usage:
- Execute on anyone sound message "Hello!"
- cm_clexec * "spk 'vox/hello' "
cm_cmd "<description>" "<command>" <level and flags>
Adds a command to Custom Commands menu. Place these commands in your cm_menus.cfg file. The description is what appears in the menu. The command is what is executed. Admins must have one of the levels to use this command. The flags are as follows:
- a show in Custom Commands#1 menu
- b show in Custom Commands#2 menu
- c show in Custom Commands#3 menu
- d show in Custom Commands#4 menu
- e show in Custom Commands#5 menu
- E show in Client Commands menu
- l execute on client side
- m execute on admin side
- s execute on server side
- o execute on all clients
- h don't show command in menu
- n unhide next (in cycle) command with this flag, also hide yourself when used
Examples of usage:
- Command for Custom Commands#1 menu, useable only by admins with S level:
- cm_cmd "My command" "cm_say @@y Yes! It works!" Sa
- Switching between commands for Custom Commands#2 menu, useable only for admins with O level. First and last commands are hidden and used as separators. "n" flagged commands are alternated between.
- cm_cmd "<link1 - start>" " " Obh
- cm_cmd "Say hello!" "cm_say @ Hello everyone!" Obn
- cm_cmd "Say goodbye!" "cm_say @ Goodbye :(" Obnh
- cm_cmd "<link1 - end>" " " Obh
cm_command "<command name>" "<action>"
This command creates a new server command that performs <action>. This is useful as a shortcut to perform complex actions with shorter commands.
Examples of usage:
- When the admin types "saytime" into the console or via rcon, the server will announce the remaining time to the players.
- cm_command "saytime" "say There is &cm_timeleft& remaining"
Register a variable for the Settings menu. All of your cm_cvar commands should be in your cm_cvars.cfg file. The special flag "c" indicates that the cvar has a custom argument list (the second model above). There is a maximum of 10 custom arguments. Custom arguments must be enclosed in quotes.
Examples of usage:
- Standard cvar mp_timelimit, starts at 0 and increases by 10 to a maximum value of 40. All admins with "S" level will see this in their Settings menu:
- cm_cvar mp_timelimit 10 40 S
- Standard cvar mp_friendlyfire with the ability to toggle between 0 and 1 (on/off):
- cm_cvar mp_friendlyfire 1 1 S
- cvar sv_password with custom arguments, changeable only by admin with O level:
- cm_cvar sv_password "" "pass1" "anotherpass" "once again" Oc
Executes files in your current clanmod folder set by cm_configpath
- Example, instead of "exec addons/clanmod/cm_aliases.cfg" we use - cm_exec cm_aliases.cfg
Will prevent a player from using "say"
Examples of usage:cm_ungag
- This will gag This|Clown - cm_gag This|Clown
Will undo the effect of cm_gag
Examples of usage:cm_glow "<name, wonid, or id>" "<colour>"
- This will ungag This|Clown - cm_ungag This|Clown
Will make a player glow in a spesific colour, the valid colours are: red, green,blue, yellow, pink,white,turquoise
Examples of usage:cm_unglow "<name, wonid, or id>"
- This will This|Clown glow in red
- cm_glow This|Clown red
Examples of usage:cm_if <cvar> <operator> <value> then <cmd to execute> [else] [cmd to execute]
- This will This|Clown stopp glowing - cm_unglow This|Clown
This is a conditional expression allowing you to perform commands based on the current environment. Valid operators are "<", "=", "!=", and ">". <cmd to execute> will be executed if the condition is true. Otherwise, the optional else clause will be executed
Examples of usage:
- This will check if there is more than 10 players
- cm_if cm_playernum > 10 then cm_say @@y Hello everyone!
- This will check if current map has Bomb Scenario
- cm_if cm_currentmap > de_ then cm_say @@y Have a nice demolishing!
cm_kick <mask> ...
Kick player from game. Can't be used on admins with level O. Mask accepts wildcards.
cm_listadmin
Shows the list of admins previously defined using the cm_admin command. The list will appear in a graphic window if executed on the client, or in the server console if executed from the server console.
cm_listplayer [output file]
Shows the list of players currently connected to the server. The list will appear in a graphic window if executed on the client, or in the server console if executed from the server console.
cm_listtask
Shows the list of tasks previously defined using the cm_task command. The list will appear in a graphic window if executed on the client, or in the server console if executed from the server console.
cm_log "<text>"
Write an entry to the log current hlds file.
Examples of usage:cm_login <name, wonid, ip or id> <password>
- cm_log "This is Cruiser, I have found a cheater, his WONID is 25416"
Allows you to login on the server without the client saving you password, the client side command is login
Examples of usage:cm_makeadmin <name, wonid, ip or id> <level and flags>
- This will login This|Clown as a admin - cm_login "This|Clown" "upia"
Make specified player a temporary admin. Valid entries to identify the player include those described for the cm_admin command as well as the current player ID on the server. This function does not register any new accounts or make any permanent changes. The player must be currently connected to the server. The player will retain admin status only until the ClanMod configs are reloaded. You can manually exec the clanmod.cfg to remove the account or wait for it to occur automatically. See cm_loadconfig in the "cvars" section of the ClanMod Manual for details on when the configs will automatically be reloaded.
Examples of usage:
- Make the player named "This|Clown" and admin with access "VKCork"
- cm_makeadmin "This|Clown" "VKCork"
cm_map <map name> <level>
Add the map "map name" to the Map menu for voting and changelevel. The "level" allows you to restrict who has access to that map. Only admins who have one of the levels indicated will see the map in their menus. These commands should be placed in you cm_maps.cfg file.
Examples of usage:
- Map with normal status:
- cm_map de_dust M
- Map which only admin with level O can change or vote
- cm_map de_torn O
cm_motd "<text>" <RRRGGGBBB> <hold time>
Adds a message that will appear in bold at the centre of the screen for all clients. The colour of the message is defined by RRR (red), GGG (green) and BBB (blue), which can be values between 000 and 255. Place these commands in your clanmod.cfg file. To say "&" needs to be written as "\&" to be displayed without cvar parsing
Examples of usage:
- Info message which will appear yellow and will be displayed for 10 seconds:
- cm_motd "Welcome stranger on &hostname&" 255255000 10
cm_pause
Pause server even if cvar pausable is set to 0. This is aliased on the client as "pa".
cm_remove <object> <mask>
Removes items from the current live clanmod configuration. Valid objects are:
- admin
- alias
- cmd
- cvar
- map
- motd
- task
- whine
- word
- * (everything).
Examples for <mask>:
- "*Clan*": looks for elements which have word "Clan" in their first text argument.
- "?s": looks for elements with the "s" flag.
- "$S": looks for element which the "S" level.
Examples of usage:
- Removing admins with level M
- cm_remove admin $M
- Removing old tasks
- cm_remove task ?d
- Removing task by name - cm_remove task mytask
- Removing all Menu Custom Commands#3
- cm_remove cmd ?c
Note: This does not affect what is stored in the config files therefore this command will not have any permanent effects unless you use cm_save afterwards to save the changes.
cm_replace <object> <mask> with <parameters for new element in object>
Search for an element and replace with a new one. Valid objects are the same as for cm_remove.
Examples of usage:
- We will replace existing alias pw to setpw
- cm_replace alias pw with setpw sv_password S
cm_save <object> <output file>
Saves part or all of the current ClanMod configuration to a file. Valid objects are the same as for cm_remove above.
Examples of usage:
- Saving whole configuration:
- cm_save * addons/clanmod/savedcfg.cfg
- Save just the cvars:
- cm_save cvar addons/clanmod/cvarbkp.cfg
cm_say <parameter> <text>
This will write bold text on the screen with the desired colour and location. Location is controlled using @'s such that:
@ = Left side of screen @@ = Centre of screen @@@ = Bottom centre of screen
To colour the text, add one of the following letters after the "@":
- b = Blue
- g = Green
- j = Brown
- l = Green (light)
- n = Purple
- o = Orange
- p = Purple (light)
- r = Red
- s = Blue (light)
- y = Yellow
Finally, if you use @@@@, it will appear as regular chat text however, it will not indicate who said the message.
Examples of usage:
- Say "Hello everyone!" in green at the centre of the screen:
- cm_say @@g Hello everyone!
cm_sayadmin <text>
Send text to admins only
Examples of usage:
- cm_sayadmin Hello everyone!
cm_saycenter <text>
Send center screen message.
Examples of usage:
- cm_saycenter Hello everyone!
cm_string <string index> "<string>"
Sets strings used by ClanMod. These are stored in the titles.cfg file and allow you to alter the messages generated by ClanMod. See titles.cfg for many examples.
cm_task <MMDDhhmmss> "<command to execute>" <flags> "<task name>"
cm_task <hhmmss> "<command to execute>" <flags> "<task name>"
cm_task <MMDD> "<command to execute>" <flags> "<task name>"
cm_task <value> "<command to execute>" <flags> "<task name>"
Shedule a task to run on the server which will be executed on specified date and time. If a scheduled date/time is missed, the task will be run as soon as possible. Valid flags are:
- a execute the task after <value> days/hours/minutes/seconds
- b execute the task before <value> days/hours/minutes/seconds of end of map
- d set task as done
- f reset task to undone when new map starts
- h <value> is given in hours
- m <value> is given in minutes
- n normal task with specifed date or time
- o don't execute task if date has expired (mark it as done)
- p task will be executed continuously with given period
- r remove task when done
- s <value> is given in seconds
- t don't allow task to be added if another exists with the same time
- u don't allow task to be added if another exists with the same command to execute
- y <value> is given in days
Examples of usage:
- Task which will be executed on 10/29 at 12:00:00, server will say "Hello world!", then task will be automaticly removed from list
- cm_task 1029120000 "cm_say @ Hello world!" ntr "mytask"
- Task which will be executed in next 5 minutes after entering it.
- cm_task 5 "cm_say @ 5 minutes has passed" mnru "mytask2"
- Task which will be executed 10 seconds before the of end the map. When the new map starts, this task will be refreshed (marked as undone for next execution)
- cm_task 10 "cm_say @@y The nextmap will be &cm_nextmap&" bfut "mytask3"
cm_vote <text> [first option] [command] [second option] [command]
Start a custom vote. If you don't specify the first or second option, they will automatically become YES and NO. If the voting commmand is called from the player console, then you will have the option to abort or proceed after the results have been shown. If the command was called from server console then the winning option will be automatically executed.
Note: Voting sessions close automatically either within 15 seconds of the vote being initiated, when the last player gives his vote, or if the vote is cancelled.
Examples of usage:
- This vote will not do anything, but will display the results so that the admin may take further action. The title of the vote will be "What shall we do?" and the options will be "1. changelevel de_dust2" and "2. kick Tom":
- cm_vote "What shall we do?" "changelevel de_dust2" "kick Tom"
- This vote will be titled, "Do you like this game?" with the options "1. Yes, we love it" and "2. No".
- cm_vote "Do you like this game?" "Yes, we love it"
- This vote will be titles "Do you like AK47?" with the options "1. Yes" and "2. No"
- cm_vote "Do you like AK47?"
- If the <text> area contains a variable name, then the results will be stored in that variable. The following example will show a vote with the title "mp_timelimit" and the options "1. 20" and "2. 30". Depending on the results, the value of mp_timelimit will be updated to either 20 or 30:
- cm_vote "mp_timelimit" "20" "30"
cm_votekick <mask for nick, wonid, ip or id>
Start a vote to kick a player. The ratio of "Yes" votes must be greater than cm_kickvoteratio in order for the player to be kicked.
Examples of usage:
- The name of guy which we want to kick is Anderedande
- cm_votekick *ande
cm_votemap <map name> [map name] [map name] [map name]
Start voting for a map. You can give up to 4 maps in the list. In order for a changelevel to occur, the ratio of players that voted for the map must be greater than cm_mapvoteratio
Examples of usage:
- cm_votemap de_dust de_torn
cm_whine "<sentence>"
Add a sentence to the list of "whine" sentences. If cm_chatfilter is set to make use of whine, then whenever a player uses say or say_team to say a bad word, the entire sentence will be replaced with one of these sentences chosen at random. Place all of your cm_whine statements into your cm_badwords.cfg file. Look in the cm_badwords.cfg file for many examples.
cm_word "<word>"
Add a word to the list of unacceptable words. You should place all of your cm_word commands into your cm_badwords.cfg file. See the cm_chatfilter command for details on how ClanMod will use these words. See cm_badwords.cfg for many examples.