Difference between revisions of "Admin Commands (SourceMod)"

From AlliedModders Wiki
Jump to: navigation, search
m
m
Line 20: Line 20:
  
 
=Basic Commands=
 
=Basic Commands=
These commands are found in the "basecommands" plugin, except for <tt>sm_admin</tt>, which is from the "adminmenu" plugin.
+
These commands are found in the "basecommands," "adminhelp," and "adminmenu" plugins.
  
 
:{|
 
:{|
Line 33: Line 33:
 
| admin
 
| admin
 
| Displays the [[Admin Menu (SourceMod)|admin menu]].
 
| Displays the [[Admin Menu (SourceMod)|admin menu]].
 +
|- class="t2td"
 +
| sm_cancelvote
 +
|
 +
| vote
 +
| Cancels any vote in progress.
 +
|- class="t2td"
 +
| sm_cvar
 +
| <cvar> [value]
 +
| cvar
 +
| Retrieves or changes a cvar value.  Protected cvars can only be accessed with rcon access, and sv_cheats can only be accessed with cheat access.
 +
|- class="t2td"
 +
| sm_execcfg
 +
| <filename>
 +
| config
 +
| Executes a config file (path not needed, but extension is).
 +
|- class="t2td"
 +
| sm_help
 +
| [page|search]
 +
| admin
 +
| Lists all admin commands.  Output is paginated and a page number can be specified.  Alternately, a search term can be specified to search for a specific command.
 
|- class="t2td"
 
|- class="t2td"
 
| sm_kick
 
| sm_kick
Line 48: Line 68:
 
| rcon
 
| rcon
 
| Executes the argument string via rcon.
 
| Executes the argument string via rcon.
|- class="t2td"
 
| sm_cvar
 
| <cvar> [value]
 
| cvar
 
| Retrieves or changes a cvar value.  Protected cvars can only be accessed with rcon access, and sv_cheats can only be accessed with cheat access.
 
|- class="t2td"
 
| sm_execcfg
 
| <filename>
 
| config
 
| Executes a config file (path not needed, but extension is).
 
 
|- class="t2td"
 
|- class="t2td"
 
| sm_reloadadmins
 
| sm_reloadadmins

Revision as of 23:30, 21 October 2007

This page lists all of the major admin commands in SourceMod.

Chat Triggers: Remember that commands do not have to be entered through the console; they can be entered via chat triggers. For example, saying "!ban bail" in chat will execute the same command as "sm_ban" and forward the output to chat. You can also use "/" instead of "!" to suppress your command from being shown to users.

How to Target

Targetting Players: There are a number of ways to target players:

  • name - Exact name match, or partial name match (if the partial string is unique).
  • #userid - If userid is numeric, the player will be targeted by their userid (found via the "users" command).
  • @all - All players (available on most commands).
  • @bots - All bots (available on most commands).
  • @alive - All alive players (available on most commands that accept alive players).
  • @dead - All dead players (available on most commands that accept dead players).
  • @humans - All non-bot players (available on most commands).
  • @aim - Current player the admin is directly aiming at.


Basic Commands

These commands are found in the "basecommands," "adminhelp," and "adminmenu" plugins.

Command Format Access Description
sm_admin admin Displays the admin menu.
sm_cancelvote vote Cancels any vote in progress.
sm_cvar <cvar> [value] cvar Retrieves or changes a cvar value. Protected cvars can only be accessed with rcon access, and sv_cheats can only be accessed with cheat access.
sm_execcfg <filename> config Executes a config file (path not needed, but extension is).
sm_help search] admin Lists all admin commands. Output is paginated and a page number can be specified. Alternately, a search term can be specified to search for a specific command.
sm_kick <#userid|name> [reason] kick Kicks a player.
sm_map <map> map Changes the current map.
sm_rcon <argstring> rcon Executes the argument string via rcon.
sm_reloadadmins config Refreshes the Admin cache from admin.cfg (Unknown if admin_simple.ini is refreshed, anyone confirm?)
sm_who [#userid|name] admin Lists all users and their access rights, or a specific user's access rights.


Ban/Unban Commands

These commands are found in the "basebans" plugin.

Command Format Access Description
sm_ban <#userid|name> <minutes|0> [reason] ban Bans a client.
sm_unban <steamid> unban Unbans a Steam ID.
sm_addban rcon Adds a Steam ID to Source's ban list.
sm_banip #userid|name> [reason] rcon for ip, ban for player Adds an IP address to Source's ban list.