Skip to Content

bz_sendTextMessagef()

Available since 2.4.0

Send a formatted message to a player or team.

Notes

  • For the from parameter, it is recommended to use the BZ_SERVER const; it is discouraged to send messages on behalf of players.
  • You may also use the same receiving player ID as the sending player ID for it to appear as the player is messaging themselves.

Usage

bool bz_sendTextMessagef(int from, int to, const char* fmt, ...)
Parameters
int from

From who the message will be

int to

The player ID that will be receiving the message. To send messages to all players, use the BZ_ALLUSERS constant.

const char* fmt

The message to send

bool bz_sendTextMessagef(int from, bz_eTeamType to, const char* fmt, ...)
Parameters
int from

From who the message will be

bz_eTeamType to

The team to send the message to

const char* fmt

The message to send

Returns

bool - Returns false if the message failed to send

Other Chat Messages Functions

Back to bzfs API Functions

This content is maintained on GitHub. We welcome any feedback and improvements!

Give us Feedback Edit this Page