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_getPlayerFlag
Jump to navigation
Jump to search
const char* bz_getPlayerFlag (int playerID)
Gets the flag ID of the flag that the specified player is currently holding.
Parameters:
playerID - The id of the player to check
Returns:
The two-character flag ID of the flag that the player specified is holding, or NULL if the player does not exist or is not currently holding a flag.
Example
When a player grabs a flag, display to the player what the flag symbol of the flag they grabbed is.
case bz_eFlagGrabbedEvent: {
bz_sendTextMessagef(BZ_SERVER,((bz_FlagGrabbedEventData_V1*)eventData)->playerID,
"You grabbed the %s Flag."
,bz_getPlayerFlag(((bz_FlagGrabbedEventData_V1*)eventData)->playerID));
}break;