Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
WriteEntity
From Quake Wiki
void WriteEntity(float type, entity e)
Usage[edit]
Writes the index for an entity to the current network message. This is used for server commands that expect entity 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 entity whose index should be used.
Example[edit]
// Change everyone's view point WriteByte(MSG_ALL, 5); WriteEntity(MSG_ALL, cameraEntity);