Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
WriteString
From Quake Wiki
void WriteString(float type, string arg)
Usage[edit]
Writes a string to the current network message. This is used for server commands that expect string arguments.
Parameters[edit]
- type
- The type of network message to write to. Can be one of the following:
MSG_BROADCAST
- Send a message to every client, not caring if they receive it. This is best used for things that have no affect on the gameplay state e.g. temp entities.
MSG_ONE
- Send a message to a single client. The client it's sent to is stored in the msg_entity global. Guarantees the client receives it.
MSG_ALL
- Similar to
MSG_BROADCAST
but it guarantees every client receives it.
- arg
- The string to write to the network message.
Example[edit]
// Print a message to a specific player msg_entity = player; WriteByte(MSG_ONE, 8); WriteString(MSG_ONE, "Hello there!");