Difference between revisions of "Admin Commands (SourceMod)"

From AlliedModders Wiki
Jump to: navigation, search
m
m (Format fixes)
Line 47: Line 47:
 
|- class="t2td"
 
|- class="t2td"
 
| sm_who
 
| sm_who
| [#userid|name]
+
| <nowiki>[#userid|name]</nowiki>
 
| admin
 
| admin
 
| Lists all users and their access rights, or a specific user's access rights.
 
| Lists all users and their access rights, or a specific user's access rights.
 
|- class="t2td"
 
|- class="t2td"
 
| sm_ban
 
| sm_ban
| <#userid|name> <minutes|0> [reason]
+
| <nowiki><#userid|name> <minutes|0> </nowiki>[reason]
 
| ban
 
| ban
 
| Bans a client.
 
| Bans a client.

Revision as of 09:00, 8 June 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.

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

  • name - The player will be targeted by a partial name match (multiple matches will report back an error).
  • #userid - If userid is numeric, the player will be targeted by their userid (found via the "users" command).
  • #name - If name is non-numeric, the player will be targeted by an exact name match.


Basic Commands

These commands are found in the "basecommands" plugin.

Command Format Access Description
sm_kick 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_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_who [#userid|name] admin Lists all users and their access rights, or a specific user's access rights.
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 rcon Adds an IP address to Source's ban list.