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

Difference between revisions of "Bz sendTextMessage"

From BZFlagWiki
Jump to: navigation, search
(New page: {{BZFS_API_Doc}} {{BZFS_API_Funcs}} ==Prototype== BZF_API bool bz_sendTextMessage (int from, int to, const char* message); BZF_API bool bz_sendTextMessage (int from, bz_eTeamType to, const...)
 
(wikify with definition lists, See Also section)
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
{{BZFS_API_Funcs}}
 
{{BZFS_API_Funcs}}
 
==Prototype==
 
==Prototype==
BZF_API bool bz_sendTextMessage (int from, int to, const char* message);
+
* BZF_API bool bz_sendTextMessage (int from, int to, const char* message);
BZF_API bool bz_sendTextMessage (int from, bz_eTeamType to, const char* message);
+
* BZF_API bool bz_sendTextMessage (int from, [[bz_eTeamType]] to, const char* message);
  
 
==Parameters==
 
==Parameters==
* int from: From which player do we need to pretend this message is coming from?
+
; int from: The player ID that the message will appear to be from. This must be a valid player ID, or BZ_SERVER if the message is to be a system message.
* int to: To which player or team are we sending this message?
+
; int to: The target player ID to send the message to. This must be a valid player ID or BZ_ALLUSERS if the message is to be broadcast to all connected users.
* const char* message: The message to be sent
+
; [[bz_eTeamType]] to: The target team to send the message to. This must be a valid team enumeration from [[bz_eTeamType]].
 +
; const char* message: The text of the message to be sent.
  
 
==Description==
 
==Description==
This API function will cause the server to send a message to a player or team
+
This API function will cause the server to send a text message to a single player, all players, or team. The text message can be made to appear from any user or the server itself.
  
==Usage==
+
==See Also==
If you want to send a message, use this function. This can be used for private messages based on previous input.
+
[[Bz_sendTextMessagef]]
 
+
==Notes==
+
none.
+

Latest revision as of 04:57, 27 May 2008

BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.
BZFS API Function. This page documents a BZFS_API Function, that is provided by the BZFS game server for plug-ins to call.

Prototype[edit]

  • BZF_API bool bz_sendTextMessage (int from, int to, const char* message);
  • BZF_API bool bz_sendTextMessage (int from, bz_eTeamType to, const char* message);

Parameters[edit]

int from
The player ID that the message will appear to be from. This must be a valid player ID, or BZ_SERVER if the message is to be a system message.
int to
The target player ID to send the message to. This must be a valid player ID or BZ_ALLUSERS if the message is to be broadcast to all connected users.
bz_eTeamType to
The target team to send the message to. This must be a valid team enumeration from bz_eTeamType.
const char* message
The text of the message to be sent.

Description[edit]

This API function will cause the server to send a text message to a single player, all players, or team. The text message can be made to appear from any user or the server itself.

See Also[edit]

Bz_sendTextMessagef