This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Bz getPlayerBySlotOrCallsign"

From BZFlagWiki
Jump to: navigation, search
(Create page)
 
m (Grammatical errors)
 
Line 7: Line 7:
 
| param1        = name
 
| param1        = name
 
| param1type    = const char*
 
| param1type    = const char*
| param1desc    = The callsign of a player of the slot number (e.g. #2) of the player '''with''' the pound sign (#)
+
| param1desc    = The callsign of a player or the slot number (e.g. #2) of the player '''with''' the pound sign (#)
 
| returntype    = bz_BasePlayerRecord*
 
| returntype    = bz_BasePlayerRecord*
| returns      = an instance of [[bz_BasePlayerRecord]] that contains the player in question's information
+
| returns      = an instance of [[bz_BasePlayerRecord]] for the target player
 
}}
 
}}

Latest revision as of 04:19, 30 June 2015

bz_BasePlayerRecord* bz_getPlayerBySlotOrCallsign (const char* name)


Minimum API Version: 2.4.3
Gets the information for the player with the specified slot index or callsign. The returned player info won't update as the game progresses. If you need new updates on the player's info, you can call bz_updatePlayerData.

After you're done with the player info returned from this method, you must release it by calling bz_freePlayerRecord.

Parameters:
name  -  The callsign of a player or the slot number (e.g. #2) of the player with the pound sign (#)
Returns:
an instance of bz_BasePlayerRecord for the target player