Battlefield 2 Console Commands

Discussion in 'BF2 Server Administration' started by MrNiceGuy, Feb 23, 2006.

  1. MrNiceGuy

    MrNiceGuy Founder Staff Member

    Battlefield 2 Console Commands

    To open the BF2 in-game console, press the '~' key (or the key above TAB) to open/close the console. To see the list of command categories, press the TAB key twice. To see particular sub-types, enter the start of the command press TAB twice. E.g. enter renderer, then press TAB twice to see the renderer sub-class of commands.

    General renderer.drawHud [0,1] Turns the Heads Up Display (HUD) on or off. renderer.drawConsole [0,1] Turns off access to the in-game console if set to 0. renderer.drawFps [0,1] Displays the current and average frames per second (FPS) in the top left corner. game.lockFps [number] Caps the game's maximum framerate to specified number. game.allowToggleFullscreen [0,1] If set to 1 allows toggling of fullscreen/windowed mode. game.toggleFullscreen Toggles between fullscreen and windowed mode. globalSettings.setDefaultUser [number] Sets the profile to use, the first one being 0001, then 0002 etc. gameLogic.togglePause Toggles pausing the game. mapList.list Lists map ID numbers, map name, game mode and the number of players if specified. mapList.configFile [path to new config file] Used to specify the location of the _mapList.con file. Default is My DocumentsBattlefield 2 DemoServerConfigs mapList.load Makes the server reload _mapList.con. mapList.save Saves the current map list on the server to the file _mapList.con. mapList.mapCount Shows the total number of maps in the current map list. mapList.currentMap Shows the map list ID number of the current map being played. mapList.clear Clears the current map list. mapList.remove [map ID] Removes the specified map from the map list. mapList.append [map name] [game mode] [number of players] Add a new map to the end of the map list. You must specify the map name and game mode. mapList.insert [map ID] [map name] [game mode] [num. of players] Same as mapList.append command, but with this command you can specify at what map ID number to insert the new map into the list.
    Admin admin.listPlayers Lists the players connected to the server, showing their name, ID number and IP number. admin.runNextLevel Forces the server to end the round and start the next map in the map list. admin.currentLevel Shows the map list ID number for the current map being played. admin.nextLevel Shows the map list ID number for the next map to be played. admin.restartMap Restarts the current map. admin.banPlayer [player ID] [timeout] Enter the player ID number you want to ban. Bans the player from the server by using their IP address. The timeout value controls the length of the ban e.g. perm for permanent ban, round to ban them for the rest of the round, and 180 is 180 seconds (3 minutes). admin.banPlayerKey [player ID] [timeout] Enter the player ID you want to ban. Bans the player from the server by using their CD key hash. admin.addAddressToBanList [IP address] [timeout] Enter the IP number you want to ban. admin.addKeyToBanList Enter the CD key hash you want to ban. admin.removeAddressFromBanList [IP address] Enter the IP address to remove from the ban list. admin.removeKeyFromBanList [CD key hash] Enter the CD key hash you want to remove from the ban list. admin.clearBanList Clears all ban lists. admin.listBannedAddresses Displays a list of the currently banned IP addresses. admin.listBannedKeys Displays a list of the currently banned CD keys. admin.kickPlayer [player ID] Enter the ID number of the player you want to kick.
    Rcon rcon login [YourPassword] Use this command to login to the server. rcon users This command lists all the users connected to the server. Very similar to admin.listPlayers. rcon exec [command name] Replace with a console command you would like to execute on the server. For example: rcon exec admin.kickPlayer 3
    Server These commands are used to adjust server settings, particularly in the Serversettings.con file under your \Documents and Settings\[username]\My Documents\Battlefield 2 Demo\Profiles\[profile]\ directory. sv.allowNATNegotiation [0,1] If your server is behind a firewall that is doing Network Address Translation you might want to enable this. sv.interface If your server has more than one network card you can associate one with bf2. sv.timeBeforeRestarting [0,1]
    sv.autoBalanceTeam [0,1]
    sv.teamRatioPercent [0,1]
    sv.autoRecord [0,1]
    sv.demoIndexURL ... sv.useGlobalUnlocks [0,1]
     
  2. Twisted

    Twisted New Member

    sv.radioBlockedDurationTime 1 :D
     
  3. [ICTU]NightHawk

    [ICTU]NightHawk New Member

    Help please. I am the admin for my server and cannot use any admin commands except for the listplayers command. Is there something I must do on my server itself for it to recognize that I am the one giving the commands. I am quite new at ths sort of thing and not the greatest computer genious of all times. any help would be appreciated. Thanks ICTU]NightHawk
     
  4. MrNiceGuy

    MrNiceGuy Founder Staff Member

    you have to login to rcon... something like "rcon login password" where password, is the one set in the server.
     
  5. heavenm

    heavenm New Member

Share This Page