Half-Life 1 Engine Messages
//SVC_BAD 0 SVC_NOP 1 SVC_DISCONNECT 2 SVC_EVENT 3 SVC_VERSION 4 SVC_SETVIEW 5 SVC_SOUND 6 SVC_TIME 7 SVC_PRINT 8 SVC_STUFFTEXT 9 SVC_SETANGLE 10 SVC_SERVERINFO 11 SVC_LIGHTSTYLE 12 SVC_UPDATEUSERINFO 13 SVC_DELTADESCRIPTION 14 SVC_CLIENTDATA 15 SVC_STOPSOUND 16 SVC_PINGS 17 SVC_PARTICLE 18 SVC_DAMAGE 19 SVC_SPAWNSTATIC 20 SVC_EVENT_RELIABLE 21 SVC_SPAWNBASELINE 22 SVC_TEMPENTITY 23 SVC_SETPAUSE 24 SVC_SIGNONNUM 25 SVC_CENTERPRINT 26 SVC_KILLEDMONSTER 27 SVC_FOUNDSECRET 28 SVC_SPAWNSTATICSOUND 29 SVC_INTERMISSION 30 SVC_FINALE 31 SVC_CDTRACK 32 SVC_RESTORE 33 SVC_CUTSCENE 34 SVC_WEAPONANIM 35 SVC_DECALNAME 36 SVC_ROOMTYPE 37 SVC_ADDANGLE 38 SVC_NEWUSERMSG 39 SVC_PACKETENTITIES 40 SVC_DELTAPACKETENTITIES 41 SVC_CHOKE 42 SVC_RESOURCELIST 43 SVC_NEWMOVEVARS 44 SVC_RESOURCEREQUEST 45 SVC_CUSTOMIZATION 46 SVC_CROSSHAIRANGLE 47 SVC_SOUNDFADE 48 SVC_FILETXFERFAILED 49 SVC_HLTV 50 SVC_DIRECTOR 51 SVC_VOICEINIT 52 SVC_VOICEDATA 53 SVC_SENDEXTRAINFO 54 SVC_TIMESCALE 55 SVC_RESOURCELOCATION 56 SVC_SENDCVARVALUE 57 SVC_SENDCVARVALUE2 58
Contents
- 1 SVC_ADDANGLE
- 2 SVC_CDTRACK
- 3 SVC_CENTERPRINT
- 4 SVC_CHOKE
- 5 SVC_CROSSHAIRANGLE
- 6 SVC_CUTSCENE
- 7 SVC_DAMAGE
- 8 SVC_DECALNAME
- 9 SVC_DISCONNECT
- 10 SVC_FILETXFERFAILED
- 11 SVC_FINALE
- 12 SVC_FOUNDSECRET
- 13 SVC_HLTV
- 14 SVC_INTERMISSION
- 15 SVC_KILLEDMONSTER
- 16 SVC_LIGHTSTYLE
- 17 SVC_NEWMOVEVARS
- 18 SVC_PARTICLE
- 19 SVC_PINGS
- 20 SVC_PRINT
- 21 SVC_RESOURCELOCATION
- 22 SVC_ROOMTYPE
- 23 SVC_SETVIEW
- 24 SVC_STUFFTEXT
- 25 SVC_TIMESCALE
- 26 SVC_SENDEXTRAINFO
- 27 SVC_SETANGLE
- 28 SVC_SETPAUSE
- 29 SVC_SPAWNSTATICSOUND
- 30 SVC_STOPSOUND
- 31 SVC_SOUNDFADE
- 32 SVC_TEMPENTITY
- 33 SVC_UPDATEUSERINFO
- 34 SVC_VERSION
- 35 SVC_VOICEINIT
- 36 SVC_WEAPONANIM
SVC_ADDANGLE
Add an angle on the yaw axis of the current client's view angle.
Note: When pev->fixangle is set to 2, this message is called to add pev->avelocity[1] as value.
Note: The value needs to be scaled by ( 65536 / 360 ).
Name: | SVC_ADDANGLE | ||
Structure: |
|
SVC_CDTRACK
Plays an Half-Life music.
Note: Track goes from 1 to 30.
Note: The musics are located in valve/media/.
Note: The second param is unused and not optional.
Name: | SVC_CDTRACK | ||||
Structure: |
|
SVC_CENTERPRINT
Sends a centered message.
Note: Called from pfnClientPrintf with print_center as type.
Name: | SVC_CENTERPRINT | ||
Structure: |
|
SVC_CHOKE
Note: This message has no arguments.
Name: | SVC_CHOKE | |
Structure: |
|
SVC_CROSSHAIRANGLE
Adjusts the weapon's crosshair angle.
Basically, the weapon position on the player's view can have a different origin.
Note: Called by pfnCrosshairAngle. So, the same as EngFunc_CrosshairAngle.
Note: If you use the engine call, no need to scale by 5.
Note: Use 0 for both to get the default position.
Name: | SVC_CROSSHAIRANGLE | ||||
Structure: |
|
SVC_CUTSCENE
Shows the intermission camera view, and writes-out text passed in first parameter.
Note: Intermission mode 3.
Note: This text will keep showing on clients in future intermissions.
Name: | SVC_CUTSCENE | ||
Structure: |
|
SVC_DAMAGE
Note: Deprecated.
Name: | SVC_DAMAGE | |
Structure: |
|
SVC_DECALNAME
Allows to set, into the client's decals array and at specific position index (0->511), a decal name.
E.g: let's say you send a message to set a decal "{break" at index 200.
As result, when a message TE_ will be used to show a decal at index 200, we will see "{break".
Note: If there is already an existing decal at the provided index, it will be overwritten.
Note: It appears we can play only with decals from decals.wad.
Name: | SVC_DECALNAME | ||||
Structure: |
|
SVC_DISCONNECT
Disconnect player with given reason.
Name: | SVC_DISCONNECT | ||
Structure: |
|
SVC_FILETXFERFAILED
Sends a message to the client's console telling what file has failed to be transfered.
Note: The message type is : "Error: server failed to transmit file 'FileName'""
Name: | SVC_FILETXFERFAILED | ||
Structure: |
|
SVC_FINALE
Shows the intermission camera view, and writes-out text passed in first parameter.
Note: Intermission mode 2.
Note: This text will keep showing on clients in future intermissions.
Name: | SVC_FINALE | ||
Structure: |
|
SVC_FOUNDSECRET
Note: Deprecated.
Name: | SVC_FOUNDSECRET | |
Structure: |
|
SVC_HLTV
Tells client about current spectator mode.
As found in hltv.h: #define HLTV_ACTIVE 0 // tells client that he's an spectator and will get director commands #define HLTV_STATUS 1 // send status infos about proxy #define HLTV_LISTEN 2 // tell client to listen to a multicast stream
Name: | SVC_HLTV | ||
Structure: |
|
SVC_INTERMISSION
Shows the intermission camera view
Note: Intermission mode 1.
Note: This message has no arguments.
Name: | SVC_INTERMISSION | |
Structure: |
|
SVC_KILLEDMONSTER
Note: Deprecated.
Name: | SVC_KILLEDMONSTER | |
Structure: |
|
SVC_LIGHTSTYLE
Setup light animation tables. 'a' is total darkness, 'z' is maxbright.
Note: Server send 64 lightstyles to client during client connect. Most of them has empty light info. All of them could be found in world.cpp
// 0 normal LIGHT_STYLE(0, "m"); // 1 FLICKER (first variety) LIGHT_STYLE(1, "mmnmmommommnonmmonqnmmo"); // 2 SLOW STRONG PULSE LIGHT_STYLE(2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba"); // 3 CANDLE (first variety) LIGHT_STYLE(3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg"); // 4 FAST STROBE LIGHT_STYLE(4, "mamamamamama"); // 5 GENTLE PULSE 1 LIGHT_STYLE(5,"jklmnopqrstuvwxyzyxwvutsrqponmlkj"); // 6 FLICKER (second variety) LIGHT_STYLE(6, "nmonqnmomnmomomno"); // 7 CANDLE (second variety) LIGHT_STYLE(7, "mmmaaaabcdefgmmmmaaaammmaamm"); // 8 CANDLE (third variety) LIGHT_STYLE(8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa"); // 9 SLOW STROBE (fourth variety) LIGHT_STYLE(9, "aaaaaaaazzzzzzzz"); // 10 FLUORESCENT FLICKER LIGHT_STYLE(10, "mmamammmmammamamaaamammma"); // 11 SLOW PULSE NOT FADE TO BLACK LIGHT_STYLE(11, "abcdefghijklmnopqrrqponmlkjihgfedcba"); // 12 UNDERWATER LIGHT MUTATION // this light only distorts the lightmap - no contribution // is made to the brightness of affected surfaces LIGHT_STYLE(12, "mmnnmmnnnmmnn"); // styles 32-62 are assigned by the light program for switchable lights // 63 testing LIGHT_STYLE(63, "a");
Name: | SVC_LIGHTSTYLE | ||||
Structure: |
|
SVC_NEWMOVEVARS
Updates client's movevars.
Note: This message is sent on client's connect and when any change is detected between the current server movevars and server cvars values.
Note: If there is a change, the value of server cvars are copied into the server movevars, then the message is sent to all players using the server movevars.
Name: | SVC_NEWMOVEVARS | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Structure: |
|
SVC_PARTICLE
Shows a particle effect.
Note: Called from pfnParticleEffect. So, the same as EngFunc_ParticleEffect.
Note: The direction has to be a value between -128 to 127, after the scale operation.
Note: You don't need to scaled by 16 if you use the engine call.
Note: Color is an index from the palette attached at right.
Name: | SVC_PARTICLE | ||||||||||||||||
Structure: |
|
SVC_PINGS
Contains ping, loss for several players.
Note: Flag is 1 - rest data contains PlayerID, Ping and Loss at least for 1 player.
Note: Flag is 0 - end of the message, skip remaining bits.
Note: ... - Flag + PlayerID + Ping + Loss - N times.
Name: | SVC_PINGS | ||||||||||||||
Structure: |
|
SVC_PRINT
Sends a message to the client's console.
Note: Called from pfnClientPrintf with print_console or print_notify as type.
Name: | SVC_PRINT | ||
Structure: |
|
SVC_RESOURCELOCATION
This message sends sv_downloadurl to client.
Name: | SVC_RESOURCELOCATION | ||
Structure: |
|
SVC_ROOMTYPE
Sets client room_type cvar to provided value.
0 = Normal (off) 1 = Generic 2 = Metal Small 3 = Metal Medium 4 = Metal Large 5 = Tunnel Small 6 = Tunnel Medium 7 = Tunnel Large 8 = Chamber Small 9 = Chamber Medium 10 = Chamber Large 11 = Bright Small 12 = Bright Medium 13 = Bright Large 14 = Water 1 15 = Water 2 16 = Water 3 17 = Concrete Small 18 = Concrete Medium 19 = Concrete Large 20 = Big 1 21 = Big 2 22 = Big 3 23 = Cavern Small 24 = Cavern Medium 25 = Cavern Large 26 = Weirdo 1 27 = Weirdo 2 28 = Weirdo 3
Name: | SVC_ROOMTYPE | ||
Structure: |
|
SVC_SETVIEW
Attaches a player's view to an entity.
Note: Called from pfnSetView. The same as attach_view() native.
Name: | SVC_SETVIEW | ||
Structure: |
|
SVC_STUFFTEXT
Executes command on player.
Note: This message is sent by client_cmd(index,const command[],any:...)
Name: | SVC_STUFFTEXT | ||
Structure: |
|
SVC_TIMESCALE
Name: | SVC_TIMESCALE | ||
Structure: |
|
SVC_SENDEXTRAINFO
Sends some extra infos.
Note: This message is sent at player's connection as params "com_clientfallback" (global var) and sv_cheats value.
Note: The sv_cheats cvar will be set on the client with the value provided.
Note: It appears "com_clientfallback" is always null.
Note: This message seems to be unused.
Name: | SVC_SENDEXTRAINFO | ||||
Structure: |
|
SVC_SETANGLE
Update immediately the client's view angles.
Note: When pev->fixangle is set 1, this message is sent with the current player's pev->v_angle values.
Note: The provided angles need to be scaled by ( 65536 / 360 ).
Name: | SVC_SETANGLE | ||||||
Structure: |
|
SVC_SETPAUSE
Puts client to a pause.
Note: If server is not paused, commands and packets from client are still sent, that means that client still can shoot/buy/etc...
Note: IsPaused: 1 - for pause, 0 - for unpause.
Name: | SVC_SETPAUSE | ||
Structure: |
|
SVC_SPAWNSTATICSOUND
Start playback of a sound, loaded into the static portion of the channel array.
This should be used for looping ambient sounds, looping sounds that should not non-creature sentences, and one-shot ambient streaming sounds.
It can also play 'regular' sounds one-shot, in case designers want to trigger regular game sounds.
The sound can be spawned either from a fixed position or from an entity.
Note: To use it on a fixed position, provide a valid origin and set EntityIndex with 0.
Note: To use it from an entity, so position is updated, provide a valid EntityIndex and set Origin with a null vector.
Note: To stop a sound with SVC_STOPSOUND, a valid EntityIndex is needed.
Note: Volume has to be scaled by 255 and Attenuation by 64.
Note: Use SND_SENTENCE (1<<4) as flag for sentence sounds.
Note: It can be sent to one player.
Name: | SVC_SPAWNSTATICSOUND | ||||||||||||||||
Structure: |
|
SVC_STOPSOUND
Stops an ambient sound.
Name: | SVC_STOPSOUND | ||
Structure: |
|
SVC_SOUNDFADE
Updates client side sound fade.
It's used to modulate sound volume on the client.
Such functionality is part of a main function where the purpose would be to update sound subsystem and cd audio.
Name: | SVC_SOUNDFADE | ||||||||
Structure: |
|
SVC_TEMPENTITY
Creates a temp entity.
Name: | SVC_TEMPENTITY | ||||
Structure: |
|
SVC_UPDATEUSERINFO
Name: | SVC_UPDATEUSERINFO | ||||
Structure: |
|
SVC_VERSION
Disconnects the client and sends a message to the console if the number passed doesn't match the current server protocol version.
Note: Message type sent : "CL_Parse_Version: Server is protocol %i instead of %i\n".
Name: | SVC_VERSION | ||
Structure: |
|
SVC_VOICEINIT
Sends sv_voicecodec and sv_voicequality cvars to client.
Note: Codec name either voice_miles or voice_speex.
Note: Quality 1 to 5.
Name: | SVC_VOICEINIT | ||||
Structure: |
|
SVC_WEAPONANIM
Plays a weapon sequence.
Name: | SVC_WEAPONANIM | ||||
Structure: |
|