Beware: when generating messages, you had better respect the format of the existing messages. Otherwise the game clients might not be able to interpret them (and will likely crash).
The functions below all write to clients (players connected via the network, or the local player).
entity msg_entity;If you want to send a message to just one entity e, then set msg_entity= e and send the message with flag MSG_ONE, instead of MSG_ALL.
void WriteByte(float to, float value) to = see messages
void WriteChar(float to, float value) to = see messages
void WriteShort(float to, float value) to = see messages
void WriteLong(float to, float value) to = see messages
void WriteCoord(float to, float value) to = see messages
void WriteAngle(float to, float value) to = see messagesThis function writes a single byte, that represents 256*(angle/380).
void WriteString(float to, string value) to = see messagesThis function writes a string, terminated by \0 (the null character in C).
void WriteEntity(float to, entity value) to = see messagesThis function writes an entity reference, taking two bytes.