Useful Commands

List of useful commands that might be helpful in map testing, debugging or taking a screenshots. Access the console with "~" key.
In addition of those commands:

sv_cheats 0/1/2/3 -> Disable/Enable cheats. 2- enable for admin only, 3- enable for owner only. Some commands won't work
unless sv_cheats is enabled. Default 0.

myinfo -> Show very detailed statistics about you as a player.

mapinfo -> Show number of entites, models and sprites with their respective limits.

cl_showstats 0/1/2-> Disable/Enable client and server info on screen. Set to 2 to also show audio, particles and position info.

developer 0/1/2-> Disable/Enable developer logs. 1- standard logs. 2- more detailed logs. Default 0. Logs might report issues with current map making it great debug command.

impulse 50 -> Toggle HUD. It also toggles player's item_suit- switching weapons or pickups won't be possible.

impulse 101 -> Give player all items/weapons.

impulse 102 -> Spawn gibs at current position.

impulse 103 -> Show info about monster the player is looking at. Developer mode must be more than 0.

impulse 106 -> Show info about model or sprite the player is looking at.

impulse 107 -> Show name of texture from the surface the player is looking at. Developer mode must be more than 0.

impulse 202 -> Spawn blood at surface the player is looking at. Player must be close to this surface.

impulse 203 -> Remove entity the player is looking at.

give %classname -> Give specified item, weapon or ammo. E.g. give ammo_crossbow. Check names for items, weapons, ammos.

giveall -> Give all weapons.

givepoints X -> Give player specified amount of points.

godmode 0/1 -> Immunity to hazard and monster damage. Player still can be killed by script or kill command.

cl_noclip 0/1 -> Toggle player noclip (flying + no collision).

cl_nonsolid 0/1 -> Disable player collision with entities.

cl_notarget 0/1 -> Enemy stops trying to kill you. They cans till hear you and you can still rev

ghost 0/1 -> Spectate mode- flying, enemy can't see you.

cl_invisible 0/1 -> Invisibility, other players and monsters can't see you.

my_gravity % -> Change player gravity. Only affects player that used this command.

healme -> Restore health to maximum.

chargeme -> Restore armor to maximum.

reviveme -> Revive when being death (before the respawn).

gibme -> Instant death with gibbing.

kill -> Instant death.

restart -> Restart the current map.

teleport X Y Z -> Teleport player to specified map coordinates.

r_drawviewmodel 0/1 -> Hide/Show weapon view model. Default 1.

crosshair 0/-> Hide/Show weapon crosshair. Default 1.

net_graph 0/1/2/3 -> Show advanced info about fps, performance loss, rendered polygons e.t.c.

r_speed 0/1 -> Show current number of polygons and entity polygins.

gl_wireframe 0/1/2 -> Toggle wireframe rendering mode. Useful for seeing what engine renders at the moment.

cl_precachecount -> Show number of currently precached models, and limits to it.

create %classname %ally %scale -> Create an entity with classname %classname. Optional %ally parameter controls if entity is player ally. Use 0 to keep default setting (e.g. by default headcrab is an enemy, barney by default is an ally) or 1 to reverse setting
(e.g. headcrab becomes ally, barney becomes enemy). 
%scale optional parameter controls scale of entity.
Example:
create monster_headcrab 1 2.3 - create headcrab with reserved ally setting (make him a players friend) and set his scale
to 2.3x of normal scale. Trying to spawn entities with not precached models will result in map crash. E.g. if your map have no headcrabs and you attemt to spawn one, the map will crash. Models can be precached by mapper using custom_precache.

remove %targetname -> Remove all entities with specified targetname.

ent_name_ahead -> Shows targetname of entity the player is looking at.

thatinfo -> Show info about enetity the player is looking at.

ent_trigger_ahead -> Trigger entity the player is looking at.

trigger %targetname on/off/toggle/kill/set %setvalue -> Trigger entity with specified targetname. Optional second parameter
controls what kind of input should be send. E.g. for func_door 
on opens, and off closes them. Kill can remove entity from the map. Toggle will work like a light switch- send on when entity "is off" and vice versa. To see how entities react to different inputs see I/O Reaction Reference - Sven Manor (google.com)%setvalue is value to send when set trigger state is used.
Example: 
trigger blast_door_1 toggle - send "toggle" signal to entity named blast_door_1. This entity is func_door so it will open when it's currently closed and it will close if it's currently open.

Comments