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

bz_getPlayerCallsign

From BZFlagWiki
Jump to: navigation, search

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;