Skip to content
/SLASHPLAY

GMod console commands

All 1483 settings and 461 commands from the game's own list, with defaults and examples to copy.

1944 commands

  1. sbox_maxprops

    Sets the maximum number of props each player can have spawned at once on a Sandbox server.

    Default 200

    Sandbox limits

  2. sbox_noclip

    Toggles whether players may use noclip to fly through walls on a Sandbox server.

    Default 1 (On)

    Sandbox limits

  3. sbox_godmode

    Toggles god mode for every player on a Sandbox server, so nobody can take damage.

    Default 0 (Off)

    Sandbox limits

  4. sv_cheats

    Toggles cheats on the server, unlocking commands like god, buddha, give and host_timescale.

    Default 0 (Off)

    Cheats and toys

  5. sbox_playershurtplayers

    Toggles whether players can damage each other on a Sandbox server.

    Default 1 (On)

    Sandbox limits

  6. gamemode

    Sets which gamemode the server runs, using the gamemode's folder name such as sandbox or terrortown.

    Default sandbox

    Gamemodes and maps

  7. sv_allowcslua

    Toggles whether players may run their own clientside Lua on the server.

    Default 0 (Off)

    Lua

  8. sv_loadingurl

    Sets a web page shown to players as a custom loading screen while they join the server.

    Default (empty)

    Server and access

  9. sbox_maxnpcs

    Sets the maximum number of NPCs each player can have spawned at once on a Sandbox server.

    Default 10

    Sandbox limits

  10. phys_timescale

    Scales the speed of the physics simulation, so 0.5 runs physics in slow motion and 1 is normal.

    Default 1

    Physics

  11. sv_gravity

    Sets world gravity for players and physics objects, in units per second squared; lower means floatier jumps.

    Default 600

    Players and movement

  12. sbox_maxvehicles

    Sets the maximum number of vehicles each player can have spawned at once on a Sandbox server.

    Default 4

    Sandbox limits

  13. sbox_bonemanip_npc

    Toggles whether players can manipulate the bones of NPCs in Sandbox.

    Default 1 (On)

    Sandbox limits

  14. sbox_bonemanip_player

    Toggles whether players can manipulate the bones of players in Sandbox.

    Default 0 (Off)

    Sandbox limits

  15. sbox_maxballoons

    Sets the maximum number of balloons each player can have spawned at once on a Sandbox server.

    Default 100

    Sandbox limits

  16. sbox_maxbuttons

    Sets the maximum number of buttons each player can have spawned at once on a Sandbox server.

    Default 50

    Sandbox limits

  17. sbox_maxcameras

    Sets the maximum number of cameras each player can have spawned at once on a Sandbox server.

    Default 10

    Sandbox limits

  18. sbox_maxconstraints

    Sets the maximum number of constraints each player can have spawned at once on a Sandbox server.

    Default 2000

    Sandbox limits

  19. sbox_maxdynamite

    Sets the maximum number of dynamite each player can have spawned at once on a Sandbox server.

    Default 10

    Sandbox limits

  20. sbox_maxeffects

    Sets the maximum number of effect props each player can have spawned at once on a Sandbox server.

    Default 200

    Sandbox limits

  21. sbox_maxemitters

    Sets the maximum number of emitters each player can have spawned at once on a Sandbox server.

    Default 20

    Sandbox limits

  22. sbox_maxhoverballs

    Sets the maximum number of hoverballs each player can have spawned at once on a Sandbox server.

    Default 50

    Sandbox limits

  23. sbox_maxlamps

    Sets the maximum number of lamps each player can have spawned at once on a Sandbox server.

    Default 3

    Sandbox limits

  24. sbox_maxlights

    Sets the maximum number of lights each player can have spawned at once on a Sandbox server.

    Default 5

    Sandbox limits

  25. sbox_maxragdolls

    Sets the maximum number of ragdolls each player can have spawned at once on a Sandbox server.

    Default 10

    Sandbox limits

  26. sbox_maxropeconstraints

    Sets the maximum number of rope constraints each player can have spawned at once on a Sandbox server.

    Default 1000

    Sandbox limits

  27. sbox_maxsents

    Sets the maximum number of scripted entities each player can have spawned at once on a Sandbox server.

    Default 100

    Sandbox limits

  28. sbox_maxthrusters

    Sets the maximum number of thrusters each player can have spawned at once on a Sandbox server.

    Default 50

    Sandbox limits

  29. sbox_maxwheels

    Sets the maximum number of wheels each player can have spawned at once on a Sandbox server.

    Default 50

    Sandbox limits

  30. sbox_persist

    Enables the Make Persistent option for props and names the save slot used to keep them across map loads.

    Default (empty)

    Sandbox limits

  31. sbox_weapons

    Toggles whether players spawn with the default Half-Life 2 weapons on a Sandbox server.

    Default 1 (On)

    Sandbox limits

  32. toolmode_allow_duplicator

    Toggles whether players can use the Duplicator tool from the tool gun.

    Default 1 (On)

    Sandbox limits

  33. toolmode_allow_dynamite

    Toggles whether players can use the Dynamite tool from the tool gun.

    Default 1 (On)

    Sandbox limits

  34. toolmode_allow_remover

    Toggles whether players can use the Remover tool from the tool gun.

    Default 1 (On)

    Sandbox limits

  35. changelevel

    Changes the server to another map while keeping connected players on the server.

    Command

    Gamemodes and maps

  36. map

    Loads a map and starts a fresh server session on it, reloading the gamemode from scratch.

    Command

    Gamemodes and maps

  37. mapcyclefile

    Sets the text file that lists the maps the server rotates through.

    Default mapcycle.txt

    Gamemodes and maps

  38. maps

    Lists the maps installed on the server, optionally filtered by part of the name.

    Command

    Gamemodes and maps

  39. skill

    Sets the Half-Life 2 difficulty, which changes NPC damage and health: 1 easy, 2 normal, 3 hard.

    Default 2 (Normal)

    Gamemodes and maps

  40. sv_gamename_override

    Overrides the gamemode name your server shows in the server browser.

    Default (empty)

    Gamemodes and maps

  41. ttt_credits_starting

    Sets how many equipment credits traitors start each TTT round with.

    Default 2

    Gamemodes and maps

  42. ttt_detective_min_players

    Sets how many players must be online before TTT assigns any detectives.

    Default 8

    Gamemodes and maps

  43. ttt_detective_pct

    Sets the share of players who become detectives each TTT round, as a fraction.

    Default 0.13

    Gamemodes and maps

  44. ttt_haste

    Toggles TTT haste mode, where rounds start short and every death adds time.

    Default 1 (On)

    Gamemodes and maps

  45. ttt_karma

    Toggles the TTT karma system, which lowers the damage of players who hurt teammates.

    Default 1 (On)

    Gamemodes and maps

  46. ttt_preptime_seconds

    Sets how long the preparation phase lasts before each TTT round starts, in seconds.

    Default 30

    Gamemodes and maps

  47. ttt_round_limit

    Sets how many TTT rounds are played on a map before the server changes map.

    Default 6

    Gamemodes and maps

  48. ttt_roundtime_minutes

    Sets the maximum length of a Trouble in Terrorist Town round in minutes.

    Default 10

    Gamemodes and maps

  49. ttt_time_limit_minutes

    Sets the total time in minutes a map is played in TTT before it changes.

    Default 75

    Gamemodes and maps

  50. ttt_traitor_pct

    Sets the share of players who become traitors each TTT round, as a fraction such as 0.25.

    Default 0.25

    Gamemodes and maps

  51. gmod_physiterations

    Sets how many extra physics solver passes run each tick, making large constraint contraptions more stable.

    Default 4

    Physics

  52. phys_pushscale

    Scales how much force bullets and explosions apply to physics objects and ragdolls.

    Default 1

    Physics

  53. phys_spinspeed

    Sets how fast objects rotate when you turn them with the Physics Gun and the movement keys.

    Default 200

    Physics

  54. physcannon_maxmass

    Sets the heaviest object, in kilograms, that the Gravity Gun can pick up.

    Default 250

    Physics

  55. physcannon_mega_enabled

    Toggles the supercharged Gravity Gun from the end of Half-Life 2, which can grab NPCs and heavy objects.

    Default 0 (Off)

    Physics

  56. physcannon_tracelength

    Sets how far away, in units, the Gravity Gun can grab objects.

    Default 250

    Physics

  57. physgun_limited

    Toggles a restriction that stops the Physics Gun from picking up certain map entities.

    Default 0 (Off)

    Physics

  58. physgun_maxrange

    Sets how far away, in units, the Physics Gun can grab objects.

    Default 4096

    Physics

  59. physgun_maxSpeed

    Sets the top speed at which the Physics Gun can move a held object.

    Default 5000

    Physics

  60. sv_crazyphysics_defuse

    Toggles resetting the physics of entities that start behaving wildly, before they cause lag or crashes.

    Default 1 (On)

    Physics

  61. sv_crazyphysics_remove

    Toggles automatic removal of entities whose physics go out of control.

    Default 1 (On)

    Physics

  62. sv_maxvelocity

    Sets the fastest speed any moving object can reach on each axis, in units per second.

    Default 3500

    Physics

  63. sv_turbophysics

    Toggles a cheaper way of handling players pushing physics props, which lowers server CPU use.

    Default 0 (Off)

    Physics

  64. act

    Plays a taunt animation on your player model, such as dance, wave or laugh.

    Command

    Players and movement

  65. gmod_maxammo

    Sets the maximum ammo a player can carry for every ammo type; 0 uses each type's own limit.

    Default 9999

    Players and movement

  66. gmod_suit

    Toggles Half-Life 2 suit power, so sprinting, the flashlight and underwater breathing drain an aux bar.

    Default 0 (Off)

    Players and movement

  67. kill

    Respawns you by killing your own player instantly, the usual fix when stuck.

    Command

    Players and movement

  68. mp_falldamage

    Toggles realistic fall damage that scales with fall speed instead of a flat 10 damage.

    Default 0 (Flat damage)

    Players and movement

  69. mp_flashlight

    Toggles whether players are allowed to use their flashlight.

    Default 1 (On)

    Players and movement

  70. sv_accelerate

    Sets how quickly players speed up when walking or running on the ground.

    Default 10

    Players and movement

  71. sv_airaccelerate

    Sets how much control players have over their movement while in the air.

    Default 10

    Players and movement

  72. sv_friction

    Sets ground friction for players, controlling how quickly they slow down when they stop moving.

    Default 8

    Players and movement

  73. sv_noclipspeed

    Sets how fast players fly while in noclip mode.

    Default 5

    Players and movement

  74. sv_playerpickupallowed

    Toggles whether players can pick up and carry objects with the use key.

    Default 1 (On)

    Players and movement

  75. exec

    Runs every command in a config file from the cfg folder.

    Command

    Server and access

  76. hide_server

    Toggles hiding the server from the public server browser while still allowing direct connections.

    Default 0 (Off)

    Server and access

  77. hostname

    Sets the server name shown in the Garry's Mod server browser and scoreboard.

    Default (empty)

    Server and access

  78. log

    Turns server logging to files on or off.

    Command

    Server and access

  79. maxplayers

    Sets the number of player slots on the server; on a dedicated server set it at launch with +maxplayers.

    Command

    Server and access

  80. quit

    Exits the server process immediately, disconnecting all players.

    Command

    Server and access

  81. rcon_password

    Sets the password for remote console (RCON) access to the server.

    Default (empty)

    Server and access

  82. sv_hibernate_think

    Toggles whether the server keeps running Lua hooks and timers while empty and hibernating.

    Default (empty)

    Server and access

  83. sv_lan

    Toggles LAN-only mode, where the server skips Steam authentication and accepts only local network players.

    Default 0 (Off)

    Server and access

  84. sv_location

    Sets the country flag shown next to the server in the Garry's Mod server browser.

    Default (empty)

    Server and access

  85. sv_password

    Sets a password players must enter to join the server; leave empty for a public server.

    Default (empty)

    Server and access

  86. sv_region

    Sets which world region the server is listed under in the server browser.

    Default (empty)

    Server and access

  87. sv_setsteamaccount

    Logs the server in with a Steam game server login token so it keeps a persistent identity.

    Command

    Server and access

  88. sv_shutdown

    Schedules the server to shut down as soon as it is empty.

    Command

    Server and access

  89. sv_visiblemaxplayers

    Overrides the max player count shown in the server browser; -1 shows the real slot count.

    Default -1

    Server and access

  90. version

    Prints the server's game version, build and protocol information.

    Command

    Server and access

  91. sv_maxcmdrate

    Sets the most input packets per second the server accepts from each client.

    Default 66

    Network and rates

  92. sv_maxrate

    Sets the highest bandwidth rate, in bytes per second, a client may use; 0 means unlimited.

    Default 0

    Network and rates

  93. sv_maxunlag

    Sets the maximum lag compensation the server applies for a player's ping, in seconds.

    Default 1

    Network and rates

  94. sv_maxupdaterate

    Sets the most world updates per second the server sends each client.

    Default 66

    Network and rates

  95. sv_mincmdrate

    Sets the fewest input packets per second the server accepts from each client.

    Default 10

    Network and rates

  96. sv_minrate

    Sets the lowest bandwidth rate, in bytes per second, the server lets a client use.

    Default 3500

    Network and rates

  97. sv_minupdaterate

    Sets the fewest world updates per second the server sends each client.

    Default 10

    Network and rates

  98. sv_timeout

    Sets how many seconds the server waits for a silent client before dropping it.

    Default 180

    Network and rates

  99. host_workshop_autoupdate

    Toggles automatic updating of Workshop addons from the collection when the server starts.

    Default 1 (On)

    Workshop and downloads

  100. host_workshop_collection

    Sets the Steam Workshop collection ID whose addons the dedicated server downloads and mounts on startup.

    Default (empty)

    Workshop and downloads

  101. net_maxfilesize

    Sets the largest file, in megabytes, that can be transferred to or from the server.

    Default 16

    Workshop and downloads

  102. sv_allowdownload

    Toggles whether players can download missing files directly from the game server.

    Default 1 (On)

    Workshop and downloads

  103. sv_allowupload

    Toggles whether players can upload custom files such as sprays to the server.

    Default 1 (On)

    Workshop and downloads

  104. sv_downloadurl

    Sets a FastDL web address players download missing custom files from, instead of the slow in-game transfer.

    Default (empty)

    Workshop and downloads

  105. gmod_mcore_test

    Toggles experimental multicore rendering on the player's own game; it does nothing for a dedicated server.

    Default 0 (Off)

    Lua

  106. lua_dumptimers_sv

    Lists every Lua timer currently running on the server.

    Command

    Lua

  107. lua_find

    Searches the server's Lua environment for variables whose names match the given text.

    Command

    Lua

  108. lua_findhooks

    Lists server-side Lua hooks by event name and hook identifier.

    Command

    Lua

  109. lua_openscript

    Runs a server-side Lua file from the lua folder.

    Command

    Lua

  110. lua_refresh_file

    Reloads a server-side Lua file, as if it had been edited and auto-refreshed.

    Command

    Lua

  111. lua_reloadents

    Reloads all scripted entities from their Lua files.

    Command

    Lua

  112. lua_run

    Runs a line of Lua code on the server, from the server console or RCON.

    Command

    Lua

  113. sv_kickerrornum

    Kicks players after they hit this many clientside Lua errors; 0 never kicks.

    Default 0

    Lua

  114. sv_log_client_errors

    Controls whether clientside Lua errors from players are logged to clientside_errors.txt or the console.

    Default 1

    Lua

  115. mp_show_voice_icons

    Toggles the voice icon shown over players' heads while they talk.

    Default 1 (On)

    Chat and voice

  116. say

    Sends a chat message to everyone; typed in the server console it appears as Console.

    Command

    Chat and voice

  117. say_team

    Sends a chat message only to players on your team.

    Command

    Chat and voice

  118. sv_alltalk

    Toggles whether players can hear all other players' voice chat regardless of team.

    Default 0 (Off)

    Chat and voice

  119. sv_voiceenable

    Toggles voice chat on the server.

    Default 1 (On)

    Chat and voice

  120. banid

    Bans a player by user ID or SteamID for a number of minutes; 0 bans permanently.

    Command

    Admin and bans

  121. banip

    Bans an IP address for a number of minutes; 0 bans permanently.

    Command

    Admin and bans

  122. gmod_admin_cleanup

    Removes everything every player has spawned in Sandbox, or only one type such as props; admin only.

    Command

    Admin and bans

  123. kick

    Removes a player from the server by name; they can rejoin right away.

    Command

    Admin and bans

  124. kickall

    Kicks every connected player, with an optional message.

    Command

    Admin and bans

  125. kickid

    Kicks a player by user ID or SteamID, with an optional reason shown to them.

    Command

    Admin and bans

  126. listid

    Lists the SteamIDs currently on the ban list.

    Command

    Admin and bans

  127. removeid

    Removes a SteamID from the ban list.

    Command

    Admin and bans

  128. removeip

    Removes an IP address from the ban list.

    Command

    Admin and bans

  129. status

    Lists connected players with their user IDs, SteamIDs, ping and IP addresses, plus the current map.

    Command

    Admin and bans

  130. sv_rcon_banpenalty

    Sets how many minutes an address is banned after failing RCON authentication; 0 is permanent.

    Default 0

    Admin and bans

  131. sv_rcon_maxfailures

    Sets how many wrong RCON password attempts an address may make before it is banned.

    Default 10

    Admin and bans

  132. sv_rcon_whitelist_address

    Sets one IP address that is never banned for failed RCON logins, such as your own or your panel's.

    Default (empty)

    Admin and bans

  133. writeid

    Saves permanent SteamID bans to banned_user.cfg so they survive a restart.

    Command

    Admin and bans

  134. writeip

    Saves permanent IP bans to banned_ip.cfg so they survive a restart.

    Command

    Admin and bans

  135. ai_disabled

    Toggles all NPC AI off, so NPCs stand still in idle animations without thinking or attacking.

    Default 0 (Off)

    NPCs and AI

  136. ai_ignoreplayers

    Toggles whether NPCs ignore players, so hostile NPCs stop attacking people.

    Default 0 (Off)

    NPCs and AI

  137. ai_serverragdolls

    Toggles server-side ragdolls for dead NPCs, so corpses stay solid and can be moved instead of fading.

    Default 0 (Off)

    NPCs and AI

  138. gmod_sneak_attack

    Toggles the Half-Life 2 sneak attack, where headshotting an NPC that has not seen you kills it instantly.

    Default 1 (On)

    NPCs and AI

  139. gmod_spawnnpc

    Spawns an NPC where you are looking, the same way the Sandbox spawn menu does, with an optional weapon.

    Command

    NPCs and AI

  140. npc_create

    Creates an NPC of the given class where you are looking; needs sv_cheats 1.

    Command

    NPCs and AI

  141. npc_freeze

    Freezes or unfreezes the selected NPCs, or the one you are looking at; needs sv_cheats 1.

    Command

    NPCs and AI

  142. npc_kill

    Kills the NPCs you name, or the NPC you are looking at if no name is given; needs sv_cheats 1.

    Command

    NPCs and AI

  143. buddha

    Toggles buddha mode, where you take damage but cannot die; needs sv_cheats 1.

    Command

    Cheats and toys

  144. ch_createjeep

    Spawns the Half-Life 2 jeep in front of you; needs sv_cheats 1.

    Command

    Cheats and toys

  145. ent_create

    Creates any entity by class name where you are looking; needs sv_cheats 1.

    Command

    Cheats and toys

  146. ent_fire

    Sends an input to entities by name or class, such as opening doors or killing an entity; needs sv_cheats 1.

    Command

    Cheats and toys

  147. ent_remove

    Removes the entity you are looking at, or the named entities; needs sv_cheats 1.

    Command

    Cheats and toys

  148. give

    Hands you a weapon, item or entity by class name; needs sv_cheats 1.

    Command

    Cheats and toys

  149. gm_giveswep

    Gives you a weapon by class name, the same as picking it from the Weapons tab of the spawn menu.

    Command

    Cheats and toys

  150. gm_spawn

    Spawns a prop or ragdoll from a model path, the way the Sandbox spawn menu does.

    Command

    Cheats and toys

  151. gmod_cleanup

    Removes everything you have spawned in Sandbox, or only one type such as props.

    Command

    Cheats and toys

  152. gmod_tool

    Switches your tool gun to the named tool.

    Command

    Cheats and toys

  153. gmod_undo

    Undoes the last thing you spawned or built in Sandbox.

    Command

    Cheats and toys

  154. god

    Toggles god mode for yourself so you take no damage; needs sv_cheats 1.

    Command

    Cheats and toys

  155. host_timescale

    Speeds up or slows down the whole game, players and physics included; needs sv_cheats 1.

    Default 1

    Cheats and toys

  156. hurtme

    Deals the given amount of damage to yourself; needs sv_cheats 1.

    Command

    Cheats and toys

  157. notarget

    Toggles notarget, making NPCs ignore you; needs sv_cheats 1.

    Command

    Cheats and toys

  158. setpos

    Teleports you to exact map coordinates; needs sv_cheats 1.

    Command

    Cheats and toys

  159. alias

    Creates a shortcut name that runs one or more commands.

    Command

    Debug and developer

  160. cvarlist

    Lists every console setting and command with its value and flags, optionally filtered by prefix.

    Command

    Debug and developer

  161. developer

    Sets the developer message level, printing extra debug output to the console; 0 is off.

    Default 0 (Off)

    Debug and developer

  162. find

    Searches all commands and settings for text in their name or help.

    Command

    Debug and developer

  163. help

    Shows the help text, value and flags of one command or setting.

    Command

    Debug and developer

  164. net_fakelag

    Adds artificial delay to all incoming network data to test how things feel with lag; needs sv_cheats 1.

    Default 0

    Debug and developer

  165. report_entities

    Lists all entity classes on the map with how many of each exist.

    Command

    Debug and developer

  166. stats

    Prints server performance figures such as CPU use, network traffic, uptime, player count and FPS.

    Command

    Debug and developer

  167. sv_showimpacts

    Shows where bullets hit on the client (red) and the server (blue) to debug hit registration.

    Default 0 (Off)

    Debug and developer

  168. think_limit

    Prints a warning when an entity's think takes longer than this many milliseconds; 0 is off.

    Default 0

    Debug and developer

Questions

How do I run GMod commands on my 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.

How do I keep a setting after a restart?

Settings typed in the console last until the server restarts. Put them in garrysmod/cfg/server.cfg, one per line, and they apply every time the server starts.

Where does this list come from?

It is the game's own list: cvarlist on a SLASHPLAY Garry's Mod server. The descriptions and examples on the written pages are by SLASHPLAY.

Try them on
your own server.

From $0.03 an hour, only while it runs. New accounts get 6 free tokens.