constructor __construct [line 80]
BC2Conn __construct(
String
$serverIP, Integer
$serverRconQueryPort, [String
$debug = null])
|
|
Parameters:
destructor __destruct [line 88]
method adminBanAddPlayerGUID [line 1472]
String adminBanAddPlayerGUID(
String
$playerName, [String
$timerange = "perm"])
|
|
bans a specified player by given playerguid
range of time can be: perm = permanent, round = current round
if no range is given, the ip will be banned permanently
TODO: ban for xx seconds TODO: banreason
Parameters:
method adminBanAddPlayerIP [line 1455]
String adminBanAddPlayerIP(
String
$playerIP, [String
$timerange = "perm"])
|
|
bans a specified player by given playerip
range of time can be: perm = permanent, round = current round
if no range is given, the ip will be banned permanently
TODO: ban for xx seconds TODO: banreason
Parameters:
method adminBanAddPlayername [line 1438]
String adminBanAddPlayername(
String
$playerName, [String
$timerange = "perm"])
|
|
bans a specified player by playername for a given range of time.
range of time can be: perm = permanent, round = current round
if no range is given, the player will be banned permanently
TODO: ban for xx seconds TODO: banreason
Parameters:
method adminBanlistClear [line 1526]
String adminBanlistClear(
)
|
|
clears all bans from playername banlist
method adminBanlistList [line 1535]
array adminBanlistList(
)
|
|
lists all bans from banlist
method adminBanlistLoad [line 1495]
String adminBanlistLoad(
)
|
|
loads the banlist from banlist file
method adminBanlistSave [line 1486]
String adminBanlistSave(
)
|
|
saves the current banlist to banlist file
method adminBanRemovePlayerIP [line 1517]
String adminBanRemovePlayerIP(
String
$playerIP)
|
|
unbans a player by playerip
Parameters:
method adminBanRemovePlayername [line 1506]
String adminBanRemovePlayername(
String
$playerName)
|
|
unbans a player by playername
Parameters:
method adminEndRound [line 1681]
String adminEndRound(
$teamId
$teamId)
|
|
ends the current round, declaring the given teamId as winner
Parameters:
method adminEventsEnabledStatusGet [line 1000]
array adminEventsEnabledStatusGet(
)
|
|
returns true/false, if server events are enabled in this connection or not
method adminGamePasswordGet [line 949]
String adminGamePasswordGet(
)
|
|
returns the gamepassword as a string
method adminGamePasswordSet [line 1696]
String adminGamePasswordSet(
String
$serverPassword)
|
|
sets a new password on the gameserver.
password MUST NOT contain whitespaces!!
to clear the password, use adminGamePasswordSet("")
Parameters:
method adminGetAllCommands [line 990]
array adminGetAllCommands(
)
|
|
returns all commands available on the server - requires login
method adminGetPlayerdata [line 975]
array adminGetPlayerdata(
[String
$playerName = ''])
|
|
gets the gamedata of a given playername on the gameserver
TODO: check for playerNotFound
Parameters:
method adminGetPlayerGUID [line 1605]
String adminGetPlayerGUID(
String
$playerName)
|
|
returns the GUID of a given playername
Parameters:
method adminGetPlayerlist [line 958]
array adminGetPlayerlist(
)
|
|
gets the full gamedata of all players on the gameserver
method adminGetPlaylist [line 1291]
String adminGetPlaylist(
)
|
|
returns current playmode on server
Tags:
method adminGetPlaylists [line 1280]
array adminGetPlaylists(
)
|
|
returns all available playmodes on server
method adminGetSupportedMaps [line 1398]
array adminGetSupportedMaps(
String
$playmode)
|
|
gets list of maps supported by given playmode
Parameters:
method adminKickPlayer [line 1409]
String adminKickPlayer(
String
$playerName)
|
|
kicks a specified player by playername
Parameters:
method adminKickPlayerWithReason [line 1421]
String adminKickPlayerWithReason(
String
$playerName, [String
$reason = "Kicked by administrator"])
|
|
kicks a specified player by playername with a given kickreason
Parameters:
method adminKillPlayer [line 1621]
String adminKillPlayer(
$playerName
$playerName)
|
|
kills the given player without counting this death on the playerstats
Parameters:
method adminMaplistAppend [line 1354]
String adminMaplistAppend(
String
$mapURI)
|
|
appends a given map to the end of the maplist file
Parameters:
method adminMaplistClear [line 1331]
String adminMaplistClear(
)
|
|
clears the maplist file
method adminMaplistGetNextMapIndex [line 1363]
Integer adminMaplistGetNextMapIndex(
)
|
|
gets index of next map to be run
method adminMaplistInsertMapInIndex [line 1387]
String adminMaplistInsertMapInIndex(
Integer
$index, String
$mapURI)
|
|
adds map with name at the specified index to the maplist
Parameters:
method adminMaplistList [line 1320]
array adminMaplistList(
)
|
|
returns the maplist from map file
method adminMaplistLoad [line 1302]
array adminMaplistLoad(
)
|
|
loads the maplist
Tags:
method adminMaplistRemove [line 1343]
String adminMaplistRemove(
Integer
$rowID)
|
|
removes a given map from maplist
[ index = Integer! ]
Parameters:
method adminMaplistSave [line 1311]
String adminMaplistSave(
)
|
|
saves the current maplist to file
method adminMaplistSetNextMapIndex [line 1375]
String adminMaplistSetNextMapIndex(
Integer
$index)
|
|
sets index of next map to be run
[ index = Integer! ]
Parameters:
method adminMovePlayerSwitchSquad [line 1663]
String adminMovePlayerSwitchSquad(
$playerName
$playerName, $newSquadID
$newSquadID, [$forceKill
$forceKill = false], [$newTeamID
$newTeamID = null])
|
|
moves the given player to another specific squad
if $forceKill is true, the player will be killed
[ Works only if the player is dead! Otherwise $forceKill has to be true! ]
Parameters:
method adminMovePlayerSwitchTeam [line 1636]
String adminMovePlayerSwitchTeam(
$playerName
$playerName, [$forceKill
$forceKill = false])
|
|
moves the given player to the opponent team
if $forceKill is true, the player will be killed
[ Works only if the player is dead! Otherwise $forceKill has to be true! ]
Parameters:
method adminReservedSlotsAddPlayer [line 1565]
String adminReservedSlotsAddPlayer(
String
$playerName)
|
|
adds a player by given playername to reserved slots file
Parameters:
method adminReservedSlotsClear [line 1585]
String adminReservedSlotsClear(
)
|
|
clears the file containing all reserved slots
method adminReservedSlotsList [line 1594]
array adminReservedSlotsList(
)
|
|
lists all playernames in reserved slots file
method adminReservedSlotsLoad [line 1545]
String adminReservedSlotsLoad(
)
|
|
loads the file containing all reserved slots
[ I don't know if this function is useful.. ]
method adminReservedSlotsRemovePlayer [line 1576]
String adminReservedSlotsRemovePlayer(
String
$playerName)
|
|
removes a player by given playername from reserved slots file
Parameters:
method adminReservedSlotsSave [line 1554]
String adminReservedSlotsSave(
)
|
|
saves made changes to reserved slots file
method adminRestartMap [line 1259]
String adminRestartMap(
)
|
|
restarts the current level
method adminRunNextLevel [line 1237]
String adminRunNextLevel(
)
|
|
runs the next level on maplist
method adminSayMessageToAll [line 1228]
String adminSayMessageToAll(
String
$text)
|
|
sends a chat mesage to all. the message must be less than 100 characters long.
Parameters:
method adminSayMessageToPlayer [line 1205]
String adminSayMessageToPlayer(
String
$playerName, String
$text)
|
|
sends a chat message to a player. the message must be less than 100 characters long.
Parameters:
method adminSayMessageToTeam [line 1217]
String adminSayMessageToTeam(
String
$teamID, Integer
$text)
|
|
sends a chat mesage to a team. the message must be less than 100 characters long.
Parameters:
method adminSetPlaylist [line 1271]
String adminSetPlaylist(
String
$playmodeURI)
|
|
sets a new playlist
example: adminSetPlaylist("SQDM") - for setting playmode to 'Squad Deathmatch'
Parameters:
method adminVarGet3dSpotting [line 1973]
boolean adminVarGet3dSpotting(
)
|
|
gets true/false, if 3d spotting is enabled or not
method adminVarGet3rdPersonVehiCam [line 2019]
boolean adminVarGet3rdPersonVehiCam(
)
|
|
gets true/false, if 3rd person vehicle cam is enabled or not
method adminVarGetAdminPassword [line 1739]
String adminVarGetAdminPassword(
)
|
|
gets the admin (rcon) password
[ I only get the result: PasswordRetrievalNotAllowed ]
method adminVarGetBannerURL [line 1866]
String adminVarGetBannerURL(
)
|
|
gets the banner url
method adminVarGetCrosshair [line 1952]
boolean adminVarGetCrosshair(
)
|
|
gets true/false, if crosshair is enabled or not
method adminVarGetFriendlyFire [line 1844]
boolean adminVarGetFriendlyFire(
)
|
|
gets true/false, if friendly fire is enabled or not
method adminVarGetHardcore [line 1760]
boolean adminVarGetHardcore(
)
|
|
gets true/false, if hardcore mode is enabled or not
method adminVarGetIdleTimeout [line 2132]
Integer adminVarGetIdleTimeout(
)
|
|
gets the current idle time allowed
method adminVarGetKillCam [line 1910]
boolean adminVarGetKillCam(
)
|
|
gets true/false, if killcam is enabled or not
method adminVarGetMiniMap [line 1931]
boolean adminVarGetMiniMap(
)
|
|
gets true/false, if minimap is enabled or not
method adminVarGetMiniMapSpotting [line 1994]
boolean adminVarGetMiniMapSpotting(
)
|
|
gets true/false, if minimap spotting is enabled or not
method adminVarGetProfanityFilter [line 2152]
boolean adminVarGetProfanityFilter(
)
|
|
gets the current value for the profanity filter
method adminVarGetPunkbuster [line 1717]
boolean adminVarGetPunkbuster(
)
|
|
gets true/false, if punkbuster is enabled or not
method adminVarGetRanked [line 1781]
boolean adminVarGetRanked(
)
|
|
gets true/false if ranked server settings are enabled or not
method adminVarGetRankLimit [line 1802]
String adminVarGetRankLimit(
)
|
|
gets rank limit set on server
method adminVarGetServerDescription [line 1889]
String adminVarGetServerDescription(
)
|
|
gets the server description
method adminVarGetTeambalance [line 1823]
boolean adminVarGetTeambalance(
)
|
|
gets true/false, if teambalance is enabled or not
method adminVarGetTeamKillCountForKick [line 2051]
Integer adminVarGetTeamKillCountForKick(
)
|
|
gets the number of teamkills allowed during one round
method adminVarGetTeamKillValueDecreasePerSecond [line 2112]
Integer adminVarGetTeamKillValueDecreasePerSecond(
)
|
|
gets the decrease value
method adminVarGetTeamKillValueForKick [line 2072]
Integer adminVarGetTeamKillValueForKick(
)
|
|
gets the highest kill-value allowed before a player is kicked for teamkilling
method adminVarGetTeamKillValueIncrease [line 2092]
Integer adminVarGetTeamKillValueIncrease(
)
|
|
gets the value of a teamkill
method adminVarSet3dSpotting [line 1963]
String adminVarSet3dSpotting(
boolean
$boolean)
|
|
sets 3d spotting on maps on/off
Parameters:
method adminVarSet3rdPersonVehiCam [line 2009]
String adminVarSet3rdPersonVehiCam(
boolean
$boolean)
|
|
sets the 3rd person vehicle cam on/off
##QA: Works but is bugged. If you change the setting and someone is in a vehicle in 3rd person view when at end of round, that player will be stuck in 3rd person view even though the setting should only allow 1st person view.
Parameters:
method adminVarSetAdminPassword [line 1729]
String adminVarSetAdminPassword(
String
$string)
|
|
sets the admin (rcon) password
[ I haven't tested this ]
Parameters:
method adminVarSetBannerURL [line 1857]
String adminVarSetBannerURL(
String
$string)
|
|
sets the banner url to given address [ The banner url needs to be less than 64 characters long.
The banner needs to be a 512x64 picture and smaller than 127kbytes. ]
Parameters:
method adminVarSetCrosshair [line 1942]
String adminVarSetCrosshair(
boolean
$boolean)
|
|
sets crosshair on/off
Parameters:
method adminVarSetFriendlyFire [line 1834]
String adminVarSetFriendlyFire(
boolean
$boolean)
|
|
sets friendly fire on/off
Parameters:
method adminVarSetHardcore [line 1750]
String adminVarSetHardcore(
boolean
$boolean)
|
|
sets hardcore mode on/off
Parameters:
method adminVarSetIdleTimeout [line 2123]
String adminVarSetIdleTimeout(
$timeInSeconds
$timeInSeconds)
|
|
sets how many seconds a player can be idle before he/she is kicked from the server
Parameters:
method adminVarSetKillCam [line 1900]
String adminVarSetKillCam(
boolean
$boolean)
|
|
sets killcam on/off
Parameters:
method adminVarSetMiniMap [line 1921]
String adminVarSetMiniMap(
boolean
$boolean)
|
|
sets minimap on/off
Parameters:
method adminVarSetMiniMapSpotting [line 1984]
String adminVarSetMiniMapSpotting(
boolean
$boolean)
|
|
sets minimap spotting on/off
Parameters:
method adminVarSetProfanityFilter [line 2143]
String adminVarSetProfanityFilter(
$boolean
$boolean)
|
|
enabled/disables the profanity filter
Parameters:
method adminVarSetPunkbuster [line 1707]
String adminVarSetPunkbuster(
boolean
$boolean)
|
|
sets punkbuster on/off
Parameters:
method adminVarSetRanked [line 1771]
String adminVarSetRanked(
boolean
$boolean)
|
|
sets ranked server on/off
Parameters:
method adminVarSetRankLimit [line 1793]
String adminVarSetRankLimit(
Integer
$integer)
|
|
sets the max rank limit players are allowed to join
##QA: Says 'OK' but still allow higher ranked players to join.
Parameters:
method adminVarSetServerDescription [line 1880]
String adminVarSetServerDescription(
String
$string)
|
|
sets the server description to given text
[ Character '|' doesn't work for now as a 'newline'. ]
##Request from RSPs: In addition being able to enter a new line would be
great, BF2142 used the "|" character as newline.
Parameters:
method adminVarSetServername [line 2030]
String adminVarSetServername(
$serverName
$serverName)
|
|
sets a new servername
Parameters:
method adminVarSetTeambalance [line 1813]
String adminVarSetTeambalance(
boolean
$boolean)
|
|
sets teambalance on/off
Parameters:
method adminVarSetTeamKillCountForKick [line 2042]
String adminVarSetTeamKillCountForKick(
$integer
$integer)
|
|
sets the number of teamkills allowed during one round, before the game kicks the player in question
Parameters:
method adminVarSetTeamKillValueDecreasePerSecond [line 2103]
String adminVarSetTeamKillValueDecreasePerSecond(
$integer
$integer)
|
|
sets how much every player's kill-value should decrease per second
Parameters:
method adminVarSetTeamKillValueForKick [line 2063]
String adminVarSetTeamKillValueForKick(
$integer
$integer)
|
|
sets the highest kill-value allowed before a player is kicked for teamkilling
set to 0 to disable kill value mechanism
Parameters:
method adminVarSetTeamKillValueIncrease [line 2083]
String adminVarSetTeamKillValueIncrease(
$integer
$integer)
|
|
sets the value of a teamkill (adds to the player's current kill-value)
Parameters:
method adminYellMessage [line 1162]
String adminYellMessage(
String
$text, [String
$playerName = "{%all%}"], [Integer
$durationInMS = 15000])
|
|
sends an admin-yell message to a specified player (or all)
example: adminYellMessage("Storm the front!", "JLNNN") - send the message to player "JLNNN"
TODO: Need fix for sending messages to squads TODO: Cut strings with length more than 100 chars
Parameters:
method adminYellMessageToTeam [line 1188]
String adminYellMessageToTeam(
String
$text, Integer
$teamID, [Integer
$durationInMS = 15000])
|
|
sends an admin-yell message to a specified team
example: adminYellMessageToTeam("Storm the front!", 1) - send the message to teamID 1
TODO: Cut strings with length more than 100 chars
Parameters:
method getCurrentGameRound [line 847]
Integer getCurrentGameRound(
)
|
|
returns the current round of the game
method getCurrentMap [line 798]
returns the current map as a string
method getCurrentMapName [line 809]
String getCurrentMapName(
)
|
|
returns the current map (human readable) as a string
method getCurrentPlayers [line 754]
Integer getCurrentPlayers(
)
|
|
returns the current players on server as an integer
method getCurrentPlaymode [line 776]
String getCurrentPlaymode(
)
|
|
returns the current playmode as a string
method getCurrentPlaymodeName [line 787]
String getCurrentPlaymodeName(
)
|
|
returns the current playmode (human readable) as a string
method getGameMaxRounds [line 856]
Integer getGameMaxRounds(
)
|
|
returns the max amount of rounds of the current game
method getGameType [line 838]
returns the game type currently running
method getMapName [line 612]
String getMapName(
String
$mapURI)
|
|
returns the name of the given map
example: getMapName("Levels/MP_002")
Tags:
Parameters:
method getMaxPlayers [line 765]
returns the max amount of players allowed on server as an integer
method getOnlineState [line 874]
returns the current online state of the gameserver
method getPlayerClantag [line 1024]
String getPlayerClantag(
String
$playerName)
|
|
returns the clantag of a given playername
Parameters:
method getPlayerdata [line 921]
array getPlayerdata(
[String
$playerName = ''])
|
|
TODO: check for caching if playername = all
returns gamedata of given playername with zeroed out GUID
Parameters:
method getPlayerDeaths [line 1104]
Integer getPlayerDeaths(
String
$playerName)
|
|
returns the current deaths of a given playername
Parameters:
method getPlayerKills [line 1088]
Integer getPlayerKills(
String
$playerName)
|
|
returns the current kills of a given playername
Parameters:
method getPlayerlist [line 883]
returns list of all players on the server, but with zeroed out GUIDs
method getPlayerlistNames [line 896]
array getPlayerlistNames(
)
|
|
returns list of all playernames on server (useful for other functions)
method getPlayername [line 1040]
String getPlayername(
String
$playerName)
|
|
returns the playername of a given playername
Parameters:
method getPlayerPing [line 1136]
Integer getPlayerPing(
String
$playerName)
|
|
returns the ping of a given playername
Parameters:
method getPlayerScore [line 1120]
Integer getPlayerScore(
String
$playerName)
|
|
returns the score of a given playername
Parameters:
method getPlayerSquadID [line 1072]
Integer getPlayerSquadID(
String
$playerName)
|
|
returns the squadid of a given playername
Parameters:
method getPlayerTeamID [line 1056]
Integer getPlayerTeamID(
String
$playerName)
|
|
returns the teamid of a given playername
Parameters:
method getPlaymodeName [line 633]
String getPlaymodeName(
String
$playmodeURI)
|
|
returns the name of the given playmode
example: getPlaymodeName("RUSH")
Tags:
Parameters:
method getServerInfo [line 730]
returns the server information as an array
method getServerIP [line 721]
returns the server ip as a string
method getServerName [line 743]
returns the server name as a string
method getSquadName [line 654]
String getSquadName(
Integer
$squadID)
|
|
returns the name of the given squad
example: getSquadName(1) - will return "Bravo Squad"
Parameters:
method getTeamName [line 677]
String getTeamName(
String
$mapURI, String
$playmodeURI, Integer
$teamID, [Integer
$squadID = null])
|
|
gets the teamname of a given map, playmode and teamid (DIFFERENT IN SQDM!)
Parameters:
method getTeamScores [line 865]
returns the current teamscores
method getVersion [line 820]
returns the server version as an array
method getVersionID [line 829]
returns the build-id of the game
method isConnected [line 534]
returns true if connected to a gameserver, otherwise false
Tags:
method isLoggedIn [line 598]
if logged in with rcon && successful, return true, otherwise false
Tags:
method isServerOnline [line 938]
boolean isServerOnline(
)
|
|
returns true if server is available, otherwise false
Tags:
method loginInsecure [line 548]
String loginInsecure(
String
$rconPassword)
|
|
plain text login to gameserver
[ RCON password MUST NOT contain whitespaces!! ]
Parameters:
method loginSecure [line 567]
String loginSecure(
String
$rconPassword)
|
|
salted hash login to gameserver
[ RCON password MUST NOT contain whitespaces!! ]
Parameters:
method logout [line 588]