This wiki is archived and useful information is being migrated to the main bzflag.org website
Difference between revisions of "Bz getPlayerCallsign"
From BZFlagWiki
(New page: {{BZFS_API_Doc}}{{BZFS_API_Funcs}} ==Prototype== BZF_API const char* bz_getPlayerCallsign( int playerID ); ==Parameters== ; int playerID : The player ID to lookup ==Return Value== A poi...) |
(Removed old format and replaced with consistent template, included example.) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{apicall |
− | == | + | | name = bz_getPlayerCallsign |
− | + | | returns = A string containing the callsign of the requested player. | |
− | + | | returntype = const char* | |
− | + | | description = Retrieves the callsign of a player. | |
− | = | + | | param1 = playerID |
− | + | | param1type = int | |
− | + | | param1desc = The ID of the player to get the callsign for. | |
− | == | + | }} |
− | + | ===Example=== | |
− | + | Display the player's name upon joining. | |
− | == | + | case bz_ePlayerJoinEvent: { |
− | + | bz_sendTextMessagef(BZ_SERVER,((bz_PlayerJoinPartEventData_V1*)eventData)->playerID, | |
− | + | "Hello %s, thanks for joining this server." | |
− | + | ,bz_getPlayerCallsign(((bz_PlayerJoinPartEventData_V1*)eventData)->playerID)); | |
− | + | }break; |
Latest revision as of 06:13, 19 October 2011
const char* bz_getPlayerCallsign (int playerID)
Retrieves the callsign of a player.
Parameters:
playerID - The ID of the player to get the callsign for.
Returns:
A string containing the callsign of the requested player.
Example[edit]
Display the player's name upon joining.
case bz_ePlayerJoinEvent: { bz_sendTextMessagef(BZ_SERVER,((bz_PlayerJoinPartEventData_V1*)eventData)->playerID, "Hello %s, thanks for joining this server." ,bz_getPlayerCallsign(((bz_PlayerJoinPartEventData_V1*)eventData)->playerID)); }break;