Difference between revisions of "Zombie Panic! Source Events"

From AlliedModders Wiki
Jump to: navigation, search
(Removed events that are not called by the game.)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=== player_death ===
+
:''Refer back to [[Game Events (Source)]] for more events.''
{{qnotice|When a client dies}}<br>
+
=== player_feed ===
{{begin-hl2msg|player_death|string}}
+
{{qnotice|Whenever the player feed is updated. This is also called whenever someone becomes infected by a player}}<br>
{{hl2msg|short|userid}}
+
{{begin-hl2msg|player_feed|string}}
{{hl2msg|short|attacker}}
+
{{hl2msg|short|userid|player who died or got infected}}
{{hl2msg|string|weapon}}
+
{{hl2msg|short|attacker|player who killed or caused the infection}}
 +
{{hl2msg|short|assistant|player who assisted the attacker}}
 +
{{hl2msg|string|weapon|name of the weapon}}
 +
{{hl2msg|bool|headshot|true if player died from headshot}}
 +
{{hl2msg|bool|death|true if the player died}}
 +
{{hl2msg|short|dmgbits|damage type}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== zombie_death ===
+
=== player_spawn ===
{{qnotice|When a zombie dies}}<br>
+
{{qnotice|When a player spawns}}<br>
{{begin-hl2msg|zombie_death|string}}
+
{{begin-hl2msg|player_spawn|string}}
{{hl2msg|byte|count}}
+
{{hl2msg|short|entindex|Entity index of the player that spawned}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== ambient_play ===
+
=== player_exploded ===
{{qnotice|None}}<br>
+
{{qnotice|When a player explodes}}<br>
{{begin-hl2msg|ambient_play|string}}
+
{{begin-hl2msg|player_exploded|string}}
{{hl2msg|string|sound}}
+
{{hl2msg|float|x|X Position of the player}}
{{hl2msg|bool|fade}}
+
{{hl2msg|float|y|Y Position of the player}}
 +
{{hl2msg|float|z|Z Position of the player}}
 +
{{end-hl2msg}}
 +
 
 +
=== player_connected ===
 +
{{qnotice|When a player joins the server}}<br>
 +
{{begin-hl2msg|player_connected|string}}
 +
{{hl2msg|string|name|name of the player that connected}}
 +
{{end-hl2msg}}
 +
 
 +
=== player_disconnected ===
 +
{{qnotice|When a player leaves the server}}<br>
 +
{{begin-hl2msg|player_disconnected|string}}
 +
{{hl2msg|string|name|name of the player that left}}
 +
{{hl2msg|short|flag}}
 +
{{hl2msg|short|userid|player who left}}
 +
{{hl2msg|string|reason|reason why the player left}}
 +
{{end-hl2msg}}
 +
 
 +
=== map_change ===
 +
{{qnotice|Called when the map changes}}<br>
 +
{{begin-hl2msg|map_change|string}}
 +
{{hl2msg|string|map|name of the map that is being switched to}}
 +
{{end-hl2msg}}
 +
 
 +
=== clientsound ===
 +
{{qnotice|Called when a specific sound is played. Eg. Round Start, Round End, Survivor Escapes etc.}}<br>
 +
{{begin-hl2msg|clientsound|string}}
 +
{{hl2msg|string|sound|File path for the song, or the SoundScript}}
 +
{{hl2msg|short|teamid|(optional) If specified, it will only send to clients within a specific team}}
 +
{{end-hl2msg}}
 +
 
 +
=== clientsound_player ===
 +
{{qnotice|Called when a specific sound to a player is played. Eg. Using an Inoculator, Flashlight, Panic etc.}}<br>
 +
{{begin-hl2msg|clientsound_player|string}}
 +
{{hl2msg|short|entindex|Entity index concerned by this sound}}
 +
{{hl2msg|string|sound|File path for the song, or the SoundScript}}
 +
{{end-hl2msg}}
 +
 
 +
=== force_song ===
 +
{{qnotice|Called when the logic_music entity changes the song}}<br>
 +
{{begin-hl2msg|force_song|string}}
 +
{{hl2msg|string|song|File path for the song}}
 +
{{hl2msg|string|title|Custom song title}}
 +
{{end-hl2msg}}
 +
 
 +
=== armmodel_as ===
 +
{{qnotice|Called when a new arm model is set from AngelScript}}<br>
 +
{{begin-hl2msg|armmodel_as|string}}
 +
{{hl2msg|short|entindex|player who's arm model got changed}}
 +
{{hl2msg|string|model|arm model that should be used}}
 +
{{end-hl2msg}}
 +
 
 +
=== spawned_player ===
 +
{{qnotice|Called when player has spawned}}<br>
 +
{{begin-hl2msg|spawned_player|string}}
 +
{{hl2msg|string|name|name of the player that spawned}}
 +
{{end-hl2msg}}
 +
 
 +
=== reset_arms ===
 +
{{qnotice|Called when player has fully turned into a zombie}}<br>
 +
{{begin-hl2msg|reset_arms|string}}
 +
{{hl2msg|short|entindex|Entindex of the player}}
 +
{{hl2msg|bool|infected|Whether to use the infected model or not. Seems to be always true}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== game_round_restart ===
+
=== discord_callstatusupdate ===
{{qnotice|None}}<br>
+
{{qnotice|Send an Update to Discord RPC}}<br>
{{begin-hl2msg|game_round_restart|string}}
+
{{begin-hl2msg|discord_callstatusupdate|string}}
{{hl2msg|none|none}}
+
{{hl2msg|string|hostname|Server Hostname}}
 +
{{hl2msg|string|gamemode|Gamemode}}
 +
{{hl2msg|string|party_id|}}
 +
{{hl2msg|string|party_port|Server Port?}}
 +
{{hl2msg|string|party_size|Player count currently playing}}
 +
{{hl2msg|string|party_max|How many players can join}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== gravity_change ===
+
 
{{qnotice|When the gravity changes}}<br>
+
=== cleanupmap ===
{{begin-hl2msg|gravity_change|string}}
+
{{qnotice|when the server calls CleanUpMap(), it will tell the client todo the same for temp and client sided entities}}<br>
{{hl2msg|float|newgravity}}
+
{{begin-hl2msg|cleanupmap|string}}
 +
{{hl2msg|None|None|None}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
 +
  
 
=== achievement_earned ===
 
=== achievement_earned ===
 
{{qnotice|None}}<br>
 
{{qnotice|None}}<br>
 
{{begin-hl2msg|achievement_earned|string}}
 
{{begin-hl2msg|achievement_earned|string}}
{{hl2msg|byte|player}}
+
{{hl2msg|short|userid|player who earned the achievement}}
{{hl2msg|short|achievement}}
+
{{hl2msg|string|achid|achievement id}}
 +
{{hl2msg|string|achtitle|title of the achievement}}
 +
{{end-hl2msg}}
 +
 
 +
=== instructor_tutor ===
 +
{{qnotice|Called from the instructor tutorial}}<br>
 +
{{begin-hl2msg|instructor_tutor|string}}
 +
{{hl2msg|long|userid}}
 +
{{hl2msg|long|entindex}}
 +
{{hl2msg|string|strbind}}
 +
{{hl2msg|string|strmsg}}
 +
{{hl2msg|string|icon_onscreen}}
 +
{{hl2msg|string|icon_offscreen}}
 +
{{hl2msg|bool|nooffscreen}}
 +
{{hl2msg|int|posx}}
 +
{{hl2msg|int|posy}}
 +
{{end-hl2msg}}
 +
 
 +
=== instructor_server_hint_create ===
 +
{{qnotice|create a hint using data supplied entirely by the server/map. Intended for hints to smooth playtests before content is ready to make the hint unneccessary. NOT INTENDED AS A SHIPPABLE CRUTCH}}<br>
 +
{{begin-hl2msg|instructor_server_hint_create|string}}
 +
{{hl2msg|string|hint_name|what to name the hint. For referencing it again later (e.g. a kill command for the hint instead of a timeout)}}
 +
{{hl2msg|string|hint_replace_key|type name so that messages of the same type will replace each other}}
 +
{{hl2msg|long|hint_target|entity id that the hint should display at}}
 +
{{hl2msg|long|hint_instance|the hint instance}}
 +
{{hl2msg|short|hint_activator_userid|userid id of the activator}}
 +
{{hl2msg|short|hint_timeout|how long in seconds until the hint automatically times out, 0 means never}}
 +
{{hl2msg|string|hint_icon_onscreen|the hint icon to use when the hint is onscreen. e.g. "icon_alert_red"}}
 +
{{hl2msg|string|hint_icon_offscreen|the hint icon to use when the hint is offscreen. e.g. "icon_alert"}}
 +
{{hl2msg|string|hint_caption|the hint caption. e.g. "#ThisIsDangerous"}}
 +
{{hl2msg|string|hint_activator_caption|the hint caption that only the activator sees e.g. "#YouPushedItGood"}}
 +
{{hl2msg|string|hint_color|the hint color in "r,g,b" format where each component is 0-255}}
 +
{{hl2msg|float|hint_icon_offset|how far on the z axis to offset the hint from entity origin}}
 +
{{hl2msg|float|hint_range|range before the hint is culled}}
 +
{{hl2msg|long|hint_flags|hint flags}}
 +
{{hl2msg|string|hint_binding|bindings to use when use_binding is the onscreen icon}}
 +
{{hl2msg|bool|hint_allow_nodraw_target|if false, the hint will dissappear if the target entity is invisible}}
 +
{{hl2msg|bool|hint_nooffscreen|if true, the hint will not show when outside the player view}}
 +
{{hl2msg|bool|hint_forcecaption|if true, the hint caption will show even if the hint is occluded}}
 +
{{hl2msg|bool|hint_local_player_only|if true, only the local player will see the hint}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== spec_target_updated ===
+
=== instructor_server_hint_stop ===
 +
{{qnotice|destroys a server/map created hint}}<br>
 +
{{begin-hl2msg|instructor_server_hint_stop|string}}
 +
{{hl2msg|string|hint_name|The hint to stop. Will stop ALL hints with this name}}
 +
{{end-hl2msg}}
 +
 
 +
=== instructor_survivor_supply ===
 
{{qnotice|None}}<br>
 
{{qnotice|None}}<br>
{{begin-hl2msg|spec_target_updated|string}}
+
{{begin-hl2msg|instructor_survivor_supply|string}}
{{hl2msg|none|none}}
+
{{hl2msg|long|hint_player|entity id that the hint will display for}}
 +
{{hl2msg|long|hint_target|entity id that the hint should display at}}
 +
{{hl2msg|string|hint_caption|the hint caption. e.g. "#ThisIsDangerous"}}
 +
{{end-hl2msg}}
 +
 
 +
 
 +
=== endslate ===
 +
{{qnotice|Called when the round ends}}<br>
 +
{{begin-hl2msg|endslate|string}}
 +
{{hl2msg|string|win_text|Who won?}}
 +
{{hl2msg|string|timespent|Time spent on the round}}
 +
{{hl2msg|string|gamemode|Current Gamemode}}
 +
{{hl2msg|string|map|Current Map (If official, it shows the title of the map)}}
 +
{{end-hl2msg}}
 +
 
 +
=== vote_started ===
 +
{{qnotice|Called when a vote has started}}<br>
 +
{{begin-hl2msg|vote_started|string}}
 +
{{hl2msg|string|title|Title of the vote}}
 +
{{hl2msg|string|desc|Description of the vote}}
 +
{{hl2msg|string|arg|Argument(s) of the vote}}
 +
{{hl2msg|short|maxargs|Amount of arguments for the vote}}
 +
{{hl2msg|short|caller|player who started the vote}}
 +
{{hl2msg|float|time|Duration of the vote?}}
 +
{{hl2msg|float|time_real|Time when the vote started?}}
 +
{{end-hl2msg}}
 +
 
 +
=== vote_update ===
 +
{{qnotice|Called when a vote updates}}<br>
 +
{{begin-hl2msg|vote_update|string}}
 +
{{hl2msg|string|title|Title of the vote}}
 +
{{hl2msg|string|desc|Description of the vote}}
 +
{{hl2msg|string|arg|Argument(s) of the vote}}
 +
{{hl2msg|short|caller|player who started the vote}}
 +
{{hl2msg|byte|result|}}
 +
{{hl2msg|byte|maxargs|}}
 +
{{hl2msg|byte|option0|}}
 +
{{hl2msg|byte|option1|}}
 +
{{hl2msg|byte|option2|}}
 +
{{hl2msg|byte|option3|}}
 +
{{hl2msg|byte|option4|}}
 +
{{hl2msg|byte|option5|}}
 +
{{end-hl2msg}}
 +
 
 +
=== vote_ended ===
 +
{{qnotice|Called when a vote has ended}}<br>
 +
{{begin-hl2msg|vote_ended|string}}
 +
{{hl2msg|string|arg|Argument(s) of the vote}}
 +
{{hl2msg|string|endmsg|}}
 +
{{hl2msg|short|target|player who got targeted by the caller}}
 +
{{hl2msg|short|caller|player who started the vote}}
 +
{{hl2msg|short|state|}}
 +
{{hl2msg|short|result|}}
 +
{{end-hl2msg}}
 +
 
 +
 
 +
=== badge_reward_announce ===
 +
{{qnotice|Called when the player is notified about receiving a badge reward.}}<br>
 +
{{begin-hl2msg|badge_reward_announce|string}}
 +
{{hl2msg|long|entindex|player who got the badge reward}}
 +
{{hl2msg|string|name|Name of the badge reward}}
 +
{{hl2msg|string|desc|Description of the badge reward}}
 +
{{hl2msg|string|icon|Icon which is shown}}
 +
{{hl2msg|long|reward|}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}

Latest revision as of 13:13, 2 February 2022

Refer back to Game Events (Source) for more events.

player_feed

Note: Whenever the player feed is updated. This is also called whenever someone becomes infected by a player

Name: player_feed
Structure:
short userid player who died or got infected
short attacker player who killed or caused the infection
short assistant player who assisted the attacker
string weapon name of the weapon
bool headshot true if player died from headshot
bool death true if the player died
short dmgbits damage type


player_spawn

Note: When a player spawns

Name: player_spawn
Structure:
short entindex Entity index of the player that spawned


player_exploded

Note: When a player explodes

Name: player_exploded
Structure:
float x X Position of the player
float y Y Position of the player
float z Z Position of the player


player_connected

Note: When a player joins the server

Name: player_connected
Structure:
string name name of the player that connected


player_disconnected

Note: When a player leaves the server

Name: player_disconnected
Structure:
string name name of the player that left
short flag {{{3}}}
short userid player who left
string reason reason why the player left


map_change

Note: Called when the map changes

Name: map_change
Structure:
string map name of the map that is being switched to


clientsound

Note: Called when a specific sound is played. Eg. Round Start, Round End, Survivor Escapes etc.

Name: clientsound
Structure:
string sound File path for the song, or the SoundScript
short teamid (optional) If specified, it will only send to clients within a specific team


clientsound_player

Note: Called when a specific sound to a player is played. Eg. Using an Inoculator, Flashlight, Panic etc.

Name: clientsound_player
Structure:
short entindex Entity index concerned by this sound
string sound File path for the song, or the SoundScript


force_song

Note: Called when the logic_music entity changes the song

Name: force_song
Structure:
string song File path for the song
string title Custom song title


armmodel_as

Note: Called when a new arm model is set from AngelScript

Name: armmodel_as
Structure:
short entindex player who's arm model got changed
string model arm model that should be used


spawned_player

Note: Called when player has spawned

Name: spawned_player
Structure:
string name name of the player that spawned


reset_arms

Note: Called when player has fully turned into a zombie

Name: reset_arms
Structure:
short entindex Entindex of the player
bool infected Whether to use the infected model or not. Seems to be always true


discord_callstatusupdate

Note: Send an Update to Discord RPC

Name: discord_callstatusupdate
Structure:
string hostname Server Hostname
string gamemode Gamemode
string party_id
string party_port Server Port?
string party_size Player count currently playing
string party_max How many players can join



cleanupmap

Note: when the server calls CleanUpMap(), it will tell the client todo the same for temp and client sided entities

Name: cleanupmap
Structure:
None None None



achievement_earned

Note: None

Name: achievement_earned
Structure:
short userid player who earned the achievement
string achid achievement id
string achtitle title of the achievement


instructor_tutor

Note: Called from the instructor tutorial

Name: instructor_tutor
Structure:
long userid {{{3}}}
long entindex {{{3}}}
string strbind {{{3}}}
string strmsg {{{3}}}
string icon_onscreen {{{3}}}
string icon_offscreen {{{3}}}
bool nooffscreen {{{3}}}
int posx {{{3}}}
int posy {{{3}}}


instructor_server_hint_create

Note: create a hint using data supplied entirely by the server/map. Intended for hints to smooth playtests before content is ready to make the hint unneccessary. NOT INTENDED AS A SHIPPABLE CRUTCH

Name: instructor_server_hint_create
Structure:
string hint_name what to name the hint. For referencing it again later (e.g. a kill command for the hint instead of a timeout)
string hint_replace_key type name so that messages of the same type will replace each other
long hint_target entity id that the hint should display at
long hint_instance the hint instance
short hint_activator_userid userid id of the activator
short hint_timeout how long in seconds until the hint automatically times out, 0 means never
string hint_icon_onscreen the hint icon to use when the hint is onscreen. e.g. "icon_alert_red"
string hint_icon_offscreen the hint icon to use when the hint is offscreen. e.g. "icon_alert"
string hint_caption the hint caption. e.g. "#ThisIsDangerous"
string hint_activator_caption the hint caption that only the activator sees e.g. "#YouPushedItGood"
string hint_color the hint color in "r,g,b" format where each component is 0-255
float hint_icon_offset how far on the z axis to offset the hint from entity origin
float hint_range range before the hint is culled
long hint_flags hint flags
string hint_binding bindings to use when use_binding is the onscreen icon
bool hint_allow_nodraw_target if false, the hint will dissappear if the target entity is invisible
bool hint_nooffscreen if true, the hint will not show when outside the player view
bool hint_forcecaption if true, the hint caption will show even if the hint is occluded
bool hint_local_player_only if true, only the local player will see the hint


instructor_server_hint_stop

Note: destroys a server/map created hint

Name: instructor_server_hint_stop
Structure:
string hint_name The hint to stop. Will stop ALL hints with this name


instructor_survivor_supply

Note: None

Name: instructor_survivor_supply
Structure:
long hint_player entity id that the hint will display for
long hint_target entity id that the hint should display at
string hint_caption the hint caption. e.g. "#ThisIsDangerous"



endslate

Note: Called when the round ends

Name: endslate
Structure:
string win_text Who won?
string timespent Time spent on the round
string gamemode Current Gamemode
string map Current Map (If official, it shows the title of the map)


vote_started

Note: Called when a vote has started

Name: vote_started
Structure:
string title Title of the vote
string desc Description of the vote
string arg Argument(s) of the vote
short maxargs Amount of arguments for the vote
short caller player who started the vote
float time Duration of the vote?
float time_real Time when the vote started?


vote_update

Note: Called when a vote updates

Name: vote_update
Structure:
string title Title of the vote
string desc Description of the vote
string arg Argument(s) of the vote
short caller player who started the vote
byte result
byte maxargs
byte option0
byte option1
byte option2
byte option3
byte option4
byte option5


vote_ended

Note: Called when a vote has ended

Name: vote_ended
Structure:
string arg Argument(s) of the vote
string endmsg
short target player who got targeted by the caller
short caller player who started the vote
short state
short result



badge_reward_announce

Note: Called when the player is notified about receiving a badge reward.

Name: badge_reward_announce
Structure:
long entindex player who got the badge reward
string name Name of the badge reward
string desc Description of the badge reward
string icon Icon which is shown
long reward