PC Admin Commands (Server)

Battlefield Bad Company 2 BFBC2: PC Admin Commands (Server)
Thanks to nfoservers.com


help : Shows a basic command listing.

admin.runScript <filename> : Executes a file in the “AdminScript” directory of the server, such as “Startup.txt” or a file that you have custom-defined.

punkBuster.pb_sv_command <command> : Executes a raw punkbuster command on the server. You can use this to set up timed messages, etc.

admin.yell <message> <duration in ms> <players> : Displays a message on players’ screens for the amount of time indicated. The duration is measured in milliseconds and must be >0 and <60000 — for instance, 10000 means 10 seconds. The message must be less than 100 characters long. “players” can be “all”, “team <team number>”, “squad <squad number>” or “player <playername>”.

admin.runNextLevel : Switches to the next level in the map cycle.

admin.restartMap : Ends the current round and restarts with the same map.

admin.listPlayers <players> : Lists all players in the server (<players> is in the same format as it is for admin.yell). For each player, it prints lines for the clantag, player name, squad number, and team number.

admin.kickPlayer <player name> : Kicks a specified player. You can find the exact player name from admin.listPlayers.

admin.banPlayer <player name> <timeout> : Ban a player for the specified amount of time. Timeout can be “perm” for permanent, “round” for until the end of the round, or “seconds <seconds>” for some number of seconds.

admin.banIP <ip address> <timeout> : Like admin.banPlayer, but for an IP address. There is currently no way to find a player’s IP address through the game.

admin.unbanPlayer <player name> : Unbans a player. Currently this is broken.

admin.unbanIP <ip address> : Unban an IP.

admin.clearPlayerBanList : Clear the entire ban list at once.

admin.clearIPBanList : Clear the entire IP ban list at once.

admin.listPlayerBans : See all players that are banned. The format is very ugly.

admin.listIPBans : See all IPs that are banned. The format is very ugly.

reservedSlots.load : Re-load the reservedslotslist.txt file that is loaded by the game when it starts. You can change the contents of this file through the “Easy setup” page in your control panel.

reservedSlots.save : Re-save the reservedslotslist.txt file.

reservedSlots.addPlayer <player name> : Grant a player a reserved slot by adding him to the list.

reservedSlots.removePlayer <player name> : Remove a player’s reserved slot.

reservedSlots.clear : Clear all reserved slots at once.

reservedSlots.list : List the current reserved slots.

mapList.load, mapList.save, mapList.list, malList.clear, mapList.remove : These behave just as the reservedSlots functions do. Some are broken, currently.

mapList.append <map name> : Adds a map to the end of the current map list. Currently broken.

vars.gamePassword, vars.punkBuster, vars.hardCore, vars.ranked, vars.rankLimit, vars.teamBalance, vars.friendlyFire, vars.playerLimit, vars.bannerUrl, vars.serverDescription, vars.killCam, vars.miniMap, vars.crossHair, vars.3dSpotting, vars.miniMapSpotting, vars.thirdPersonVehicleCameras : These do as you might expect, and “true” or “false” is used for most of them. You should set them through your “Easy setup” page instead, so that they are saved across server restarts.

About the Author