Console commands
From SWAT 4 wiki
You can open the console simply by pressing a special key which is usually the key left to "1", like "^" or "~". All console commands are case-insensitive.
- abortgame - Ends the current round.
- flush - Flush all caches. Regenerates all lighting, 3D hardware textures, etc. Can be useful to clear texture corruption due to 3D hardware driver bugs.
- get <classname> <variable> - Gets the default value for a variable in a class. eg get swatgame.serversettings maxplayers
- kick <playername> - Kick a player.
- kickban <playername> - Kick a player and ban his/her IP. You'll need to edit your Swat4(X)(Dedicated).ini file to unban their IP.
- open <mapname> - Opens a local map. Can be useful to open custom maps in Single Player. eg open sp-u273
- reconnect - Reconnect to the current/previous server.
- sad <password> - Login as admin with specified password.
- say <message string> - Broadcast a message to other players in the game.
- set <class> <variable> <value> - Sets the specified property of the specified class with the specified value. eg set swatgame.serversettings maxplayers 5
- set input <key> <command> - Set up keybinds in-game. It automatically writes to the User.ini file. eg set input u say hello
- setres WxHxD - Set the resolution and color depth. eg setres 1024x768x32
- shot - Take a screenshot and save it in the System directory with a consecutive name like Shot0001.bmp.
- startgame - Makes all players ready.
- stat all - Shows all stats.
- stat fps - Shows frame time in milliseconds.
- stat game - Shows game stats.
- stat hardware - Shows interesting hardware stats.
- stat net - Shows network performance statistics including ping, packet loss, bytes/second.
- stat none - Turns off the display of any stats.
- teamsay <message string> - Broadcast a message to your teammates.
- quit/exit - Exit the game.
Single player dev tools (aka cheats)
These can be useful in map or mod testing. Don't try them in multiplayer - won't work. To enable the cheats, you need to edit one configuration file.
- In the regular SWAT 4, locate the SWAT4.ini in the SWAT 4\Content\System directory.
- In the TSS, locate the SWAT4X.ini in the SWAT 4\ContentExpansion\System directory.
- It is recommended to back up the file before editing.
- Open it using Notepad or similar text editor and search for the line [Engine.GameEngine]. Locate the first occurrence of EnableDevTools=False under this section. Change the False value to True and save the ini file.
Now you can enter these commands to the console as explained above.
- behindview <0 / 1> - Toggle 3rd person camera. 0 disables, 1 enables.
- god - Gain invulnerability for self.
- invisible <0 / 1> - Become invisible. 0 disables, 1 enables.
- fly - Set gravity to zero for self.
- ghost - Set gravity to zero for self and allow passing through normally blocking brushes.
- walk - Resets the ghost and fly modes to inactive.
