-
Admins Commands (SourceMod) SyntaxSourceMod have 3 methods of using sourcemod commands
- /command - This method can be used only in chat but your command used will be hidden from the chat.
- !command - This method can be used only in chat and everyone can see this command executed by you.
- sm_command - This method works only in console. (In the next examples i'll use this method)
How to Target
General targets:-
Name
Exact name match, or partial name match. If target is ambitious a menu will open to select the target.
Example: sm_slay rush -
#userid
UserID are the digits in the table with # in front of them.
Example: sm_slay "#60" -
SteamID
SteamID it's string something like STEAM_X:X:XXXXXXXXX. (userid is easier)
Example: sm_slay "#STEAM_0:1:105131968" -
@ «argument»
- @all - All players
- @ct or @cts - All Counter-Terrorists
- @t or @ts - All Terrorists
- @spec - All Spectators
- @alive - All alive players
- @dead - All dead players
- @aim - Current player the admin is directly aiming at.
- @me - Target self.
- @!me - Target everyone but yourself.
Example: sm_slay @ct
Note that name matches occur last, "magic targets" (such as # and @) are processed first.
This means that "@all" will target @all players, even if there is a player named "@all". You should target "#@all" instead.
-
Status
Open the console and type 'status'.
This where you find usefull informations. You will have a something like that.
For STEAM_ID_PENDING you should use the #userid method.
Source and more infos : https://wiki.alliedmods.net/Admin_commands_(sourcemod)Admin Commands Basic Commands Usage Example & Descirptions Lead Server Admin Server Admin Trial Server Admin Donated Admin sm_mute sm_mute <"#userid"|name> [time] [reason] sm_mute inGame 60 spam
Restrict voice chat for inGame for 60 minutes with reason 'spam'sm_gag sm_gag <"#userid"|name> [time] [reason] sm_gag inGame 60 spam
Restrict inGame from chatting for 60 minutes with reason 'spam'sm_silence sm_silence <"#userid"|name> [time] [reason] sm_silence inGame 60 spam
Restrict all inGame's communications for 60 minutes with reason 'spam'sm_unmute sm_unmute <"#userid"|name> sm_unmute inGame
Remove inGame's restriction from voice chatsm_ungag sm_ungag <"#userid"|name> sm_ungag inGame
Remove inGame's restriction from chattingsm_unsilence sm_unsilence <"#userid"|name> sm_unsilence inGame
Remove all inGame's communications restrictionsm_beacon sm_beacon <"#userid"|name|@group> sm_beacon inGame
Create beacon on inGamesm_kick sm_kick <"#userid"|name|@group> [reason] sm_kick @spec Server full
Kick all spectators with reason "Server full"sm_slay sm_slay <"#userid"|name|@group> sm_slay @ct - Slay all CT team sm_vote sm_vote <#question> [Answer1] [Answer2] ... [Answer5] sm_vote "Do you love NiDE" "Yes" "Of course"
Create vote where question 'Do you love NiDE?' and answers: 'Yes' and 'Of course'sm_unban sm_unban <#steamid> sm_unban #STEAM_0:1:105131968
Unban #STEAM_0:1:105131968sm_ban sm_ban <"#userid"|name|@group> <#time> <#reason> sm_ban inGame 60 "Inflate"
Ban inGame for 60 minutes with reason "Inflate"sm_noclip sm_noclip <"#userid"|name|@group>
Run again the command to disablesm_noclip inGame
Put noclip on inGamesm_slap sm_slap <"#userid"|name|@group> sm_slap inGame - Slap inGame sm_freeze sm_freeze <"#userid"|name|@group> [time]
To cancel: sm_freeze <target>sm_freeze inGame 20
Freeze inGame for 20 seconds.sm_burn sm_burn <"#userid"|name|@group> [time] sm_burn inGame 10 - Burn inGame during 10s sm_blind sm_blind <"#userid"|name|@group> [amount]
To cancel: sm_blind <target>sm_blind inGame 100
Blind inGame to 100%.sm_map sm_map <#mapname> sm_map ze_30_Seconds__b21
Change current map to ze_30_Seconds__b21sm_cvar sm_cvar <#cvar> <value> sm_cvar mp_flashlight 0 - Disable flashlight
Change value of the cvar you triggeredsm_execcfg sm_execcfg <#cfgname | directory to .cfg> sm_execcfg <#cfgname | directory to .cfg>
Exec the configs selectedsm_rcon sm_rcon <#args> sm_rcon <#args>
Run the command as server
Extended Commands Usage Example & Descirptions Lead Server Admin Server Admin Trial Server Admin Donated Admin sm_forcespec sm_spec <"#userid"|name> sm_forcespec inGame
Switch inGame in Spectatorssm_extend sm_extend <#time> sm_extend 5
Create Extend map vote for 5 minutessm_extendmap sm_extendmap <#time> sm_extendmap 5
Force Extend map for 5 minutessm_gravityvote sm_gravityvote sm_gravityvote
Start a vote to <enable|disable> gravity modesm_hp sm_hp <"#userid"|name|@group> <value> sm_hp inGame 100
Set health value 100 for inGamesm_armor sm_armor <"#userid"|name|@group> <#value> sm_armor inGame 100
Set armor value 100 for inGamesm_weapon & sm_give sm_weapon <#userid|name|group> <#weapon> [clip] [ammo] sm_weapon inGame hegrenade
Give weapon to inGame weapon_hegrenadesm_strip sm_strip <#userid|name|@group> sm_strip inGame
Remove all weapons from inGamesm_nominate_addmap sm_nominate_addmap <map> sm_nominate_addmap de_dust
Insert de_dust in nomlist from admin nominationsm_nominate_removemap sm_nominate_removemap <map> sm_nominate_removemap mako
Remove mako from nomlistsm_radiomute sm_radiomute <"#userid"|name> sm_radiomute inGame
Restrict inGame to use Radio messagesm_radiounmute sm_radiounmute <"#userid"|name> sm_radiounmute inGame
Un-restrict on inGame to use Radio messagesm_setteamscore sm_setteamscore <@t | @ct> <value> sm_setteamscore @ct 3
Set the TeamScore to 3 for Humanssm_setscore sm_setscore <"#userid"|name> <value> sm_setscore inGame 10
Change the score of inGame to 10sm_setdeaths sm_setdeaths <"#userid"|name> <value> sm_setdeaths inGame 24
Change the number of deaths to 24 on inGamesm_forcertv sm_forcertv sm_forcertv
Force rockthevote commandsm_stage sm_stage <value | stage name>
sm_stagesm_stage 2 - Enable stage 2
If empty will print supported stagessm_querycvar sm_querycvar sm_querycvar inGame cl_lagcompensation
Check returned cvar value of cl_lagcompensation on inGamesm_rr | sm_restartround sm_rr | sm_restartround [time] sm_rr 5
Restart round in 5 secondssm_speed sm_speed <"#userid"|name|@group> <value> sm_speed inGame 2.5
Set speed at 2.5 on inGamesm_cash sm_cash <"#userid"|name|@group> <value> sm_cash @ct 16000
Set cash to 16000 on Counter-Terroristsm_iammo sm_iammo <"#userid"|name|@ct> <0|1> sm_iammo inGame 1
<Enable|Disable> unlimited ammo on inGame
Teleport Commands Usage Example & Descirptions Lead Server Admin Server Admin Trial Server Admin Donated Admin sm_bring sm_bring <"#userid"|name|@group> sm_bring inGame
Teleport inGame to your current positionsm_tpaim sm_tpaim <"#userid"|name|@group> sm_tpaim inGame
Teleport inGame to your aimsm_goto sm_goto <"#userid"|name> sm_goto inGame
Teleport You to inGame current positionsm_send sm_send <"#userid"|name|@group> <"#userid"|name> sm_send inGame FPT
Teleport inGame to FPT current position
Spray's Commands Usage Example & Descirptions Lead Server Admin Server Admin Trial Server Admin Donated Admin sm_spray sm_spray <"#userid"|name> sm_spray inGame
Spray inGame's spray on your aimsm_tracespray sm_tracespray Put your aim on spray and use this command to open punishment menu for this spray and his owner sm_banspray sm_banspray <"#userid"|name> sm_banspray inGame
Ban current inGame spraysm_send sm_send <"#userid"|name|@group> <"#userid"|name> sm_send inGame FPT
Teleport inGame to FPT current positionsm_sprayunban sm_sprayunban <"#userid"|name> sm_sprayunban inGame
Remove inGame restriction from using sprayssm_unbanspray sm_unbanspray <"#userid"|name> sm_unbanspray inGame
Unban current inGame spray
EntWatch Restriction Usage Example & Descirptions Lead Server Admin Server Admin Trial Server Admin Donated Admin sm_eban sm_eban <"#userid"|name|#steamid> [time] "<reason>" sm_eban inGame 60
Restrict inGame of using special items on maps for 60 minutessm_eoban sm_eoban sm_eoban
Eban a disconnect player from menusm_eunban sm_eunban <"#userid"|name> sm_eunban inGame
Remove inGame restriction from using special items on mapssm_ebanlist sm_ebanlist Watch list of restricted players sm_etransfer sm_etransfer <"#userid"|name> <"#userid"|name>
sm_etransfer <$item> <"#userid"|name>sm_etransfer inGame FPT
Transfer item from inGame to FPT
sm_etransfer $heal inGame
Transfer Heal Item to inGame
Zombie Commands Usage Example & Descirptions Lead Server Admin Server Admin Trial Server Admin Donated Admin zr_restrict zr_restrict <"weapons_name> zr_restrict scout
Restrict Scout until the end of mapzr_ztele_force zr_ztele_force <"#userid"|name> zr_ztele_force @aim
Force ztele on target aimzr_zspawn_force zr_zspawn_force <"#userid"|name|@group> ['0' = Spawn as human | '1' = Spawn as zombie] zr_zspawn_force @dead 1
Spawn all dead players as zombiezr_infect zr_infect <"#userid"|name> zr_infect inGame
Infect inGame if humanzr_human zr_human <"#userid"|name> zr_human inGame
Make inGame as human if infected