This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.
Bz getPlayerCallsign: Difference between revisions
Jump to navigation
Jump to search
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
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;