Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

WriteLong

From Quake Wiki

void WriteLong(float type, float arg)

Usage[edit]

Writes a long to the current network message. This is used for server commands that expect long 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 argument to write to the network message. Can be [-2,147,483,648, 2,147,483,647] as whole numbers only.

Example[edit]

// Update everyone's total secrets stats manually
// (normally this is only done at the start of the map)
WriteByte(MSG_ALL, 3);
WriteByte(MSG_ALL, 11);
WriteLong(MSG_ALL, ++total_secrets);