Difference between revisions of "Zombie Panic! Source Events"

From AlliedModders Wiki
Jump to: navigation, search
m (discord_callstatusupdate)
(Updated event information for 3.1)
Line 1: Line 1:
 
:''Refer back to [[Game Events (Source)]] for more events.''
 
:''Refer back to [[Game Events (Source)]] for more events.''
=== player_death ===
+
=== player_feed ===
{{qnotice|When a player dies}}<br>
+
{{qnotice|Whenever the player feed is updated. This is also called whenever someone becomes infected by a player}}<br>
{{begin-hl2msg|player_death|string}}
+
{{begin-hl2msg|player_feed|string}}
{{hl2msg|short|userid|player who died}}
+
{{hl2msg|short|userid|player who died or got infected}}
{{hl2msg|short|attacker|player who killed}}
+
{{hl2msg|short|attacker|player who killed or caused the infection}}
 
{{hl2msg|short|assistant|player who assisted the attacker}}
 
{{hl2msg|short|assistant|player who assisted the attacker}}
 
{{hl2msg|string|weapon|name of the weapon}}
 
{{hl2msg|string|weapon|name of the weapon}}
 
{{hl2msg|bool|headshot|true if player died from headshot}}
 
{{hl2msg|bool|headshot|true if player died from headshot}}
 +
{{hl2msg|bool|death|true if the player died}}
 
{{hl2msg|short|dmgbits|damage type}}
 
{{hl2msg|short|dmgbits|damage type}}
 +
{{end-hl2msg}}
 +
 +
=== player_spawn ===
 +
{{qnotice|When a player spawns}}<br>
 +
{{begin-hl2msg|player_spawn|string}}
 +
{{hl2msg|short|entindex|Entity index of the player that spawned}}
 +
{{end-hl2msg}}
 +
 +
=== player_exploded ===
 +
{{qnotice|When a player explodes}}<br>
 +
{{begin-hl2msg|player_exploded|string}}
 +
{{hl2msg|float|x|X Position of the player}}
 +
{{hl2msg|float|y|Y Position of the player}}
 +
{{hl2msg|float|z|Z Position of the player}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
Line 22: Line 37:
 
{{hl2msg|string|name|name of the player that left}}
 
{{hl2msg|string|name|name of the player that left}}
 
{{hl2msg|short|flag}}
 
{{hl2msg|short|flag}}
 +
{{hl2msg|short|userid|player who left}}
 
{{hl2msg|string|reason|reason why the player left}}
 
{{hl2msg|string|reason|reason why the player left}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
Line 31: Line 47:
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== zombie_lives ===
+
=== clientsound ===
{{qnotice|Called when the zombie lives changes}}<br>
+
{{qnotice|Called when a specific sound is played. Eg. Round Start, Round End, Survivor Escapes etc.}}<br>
{{begin-hl2msg|zombie_lives|string}}
+
{{begin-hl2msg|clientsound|string}}
{{hl2msg|byte|count|amount of zombie lives left}}
+
{{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}}
 
{{end-hl2msg}}
  
=== ambient_play ===
+
=== clientsound_player ===
{{qnotice|Called when a sound plays}}<br>
+
{{qnotice|Called when a specific sound to a player is played. Eg. Using an Inoculator, Flashlight, Panic etc.}}<br>
{{begin-hl2msg|ambient_play|string}}
+
{{begin-hl2msg|clientsound_player|string}}
{{hl2msg|string|sound|sound file which played}}
+
{{hl2msg|short|entindex|Entity index concerned by this sound}}
{{hl2msg|short|entity|entity which the sound plays from}}
+
{{hl2msg|string|sound|File path for the song, or the SoundScript}}
{{hl2msg|bool|fade|should the sound fade}}
 
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
 
=== force_song ===
 
=== force_song ===
 
{{qnotice|Called when the logic_music entity changes the song}}<br>
 
{{qnotice|Called when the logic_music entity changes the song}}<br>
{{begin-hl2msg|force_song_play|string}}
+
{{begin-hl2msg|force_song|string}}
{{hl2msg|string|song|file path for the song}}
+
{{hl2msg|string|song|File path for the song}}
{{hl2msg|string|title|custom song title}}
+
{{hl2msg|string|title|Custom song title}}
{{end-hl2msg}}
 
 
 
=== ambient_as ===
 
{{qnotice|Called when a sound is played from AngelScript}}<br>
 
{{begin-hl2msg|ambient_as|string}}
 
{{hl2msg|string|sound|sound being played}}
 
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
Line 61: Line 71:
 
{{qnotice|Called when a new arm model is set from AngelScript}}<br>
 
{{qnotice|Called when a new arm model is set from AngelScript}}<br>
 
{{begin-hl2msg|armmodel_as|string}}
 
{{begin-hl2msg|armmodel_as|string}}
 +
{{hl2msg|short|entindex|player who's arm model got changed}}
 
{{hl2msg|string|model|arm model that should be used}}
 
{{hl2msg|string|model|arm model that should be used}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
Line 68: Line 79:
 
{{begin-hl2msg|spawned_player|string}}
 
{{begin-hl2msg|spawned_player|string}}
 
{{hl2msg|string|name|name of the player that spawned}}
 
{{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}}
  
Line 73: Line 91:
 
{{qnotice|Send an Update to Discord RPC}}<br>
 
{{qnotice|Send an Update to Discord RPC}}<br>
 
{{begin-hl2msg|discord_callstatusupdate|string}}
 
{{begin-hl2msg|discord_callstatusupdate|string}}
{{hl2msg|short|clientid}}
 
 
{{hl2msg|string|hostname|Server Hostname}}
 
{{hl2msg|string|hostname|Server Hostname}}
{{hl2msg|string|serverip|Server IP}}
+
{{hl2msg|string|gamemode|Gamemode}}
{{hl2msg|string|serverport|Server Port}}
+
{{hl2msg|string|party_id|}}
{{hl2msg|string|model|Current Model of the client}}
+
{{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}}
  
Line 95: Line 114:
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== round_begins===
 
{{qnotice|When the round begins}}<br>
 
{{begin-hl2msg|round_begins|string}}
 
{{hl2msg|None|None|None}}
 
{{end-hl2msg}}
 
 
=== round_win===
 
{{qnotice|When the round ends}}<br>
 
{{begin-hl2msg|round_win|string}}
 
{{hl2msg|string|mapname|name of the current map}}
 
{{hl2msg|bool|humanwin|true if survivors won}}
 
{{end-hl2msg}}
 
 
=== game_round_restart ===
 
{{qnotice|When one team won the round and players can select their team again}}<br>
 
{{begin-hl2msg|game_round_restart|string}}
 
{{hl2msg|none|none}}
 
{{end-hl2msg}}
 
  
 
=== gravity_change ===
 
=== gravity_change ===
Line 118: Line 119:
 
{{begin-hl2msg|gravity_change|string}}
 
{{begin-hl2msg|gravity_change|string}}
 
{{hl2msg|float|newgravity|New value after the change}}
 
{{hl2msg|float|newgravity|New value after the change}}
{{end-hl2msg}}
 
 
=== achievement_earned ===
 
{{qnotice|None}}<br>
 
{{begin-hl2msg|achievement_earned|string}}
 
{{hl2msg|short|userid|player who earned the achievement}}
 
{{hl2msg|string|achid|achievement id}}
 
{{hl2msg|string|achtitle|title of the achievement}}
 
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
Line 134: Line 127:
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== zp_washuman ===
 
{{qnotice|The player was a human player before we turned into zombie team (Only applies if there is no zombie lives left, or if the zombies won)}}<br>
 
{{begin-hl2msg|zp_washuman|string}}
 
{{hl2msg|short|userid|player that turned into a zombie}}
 
{{end-hl2msg}}
 
  
 
+
=== achievement_earned ===
=== zp_infected ===
+
{{qnotice|None}}<br>
{{qnotice|Calls whenever someone got infected}}<br>
+
{{begin-hl2msg|achievement_earned|string}}
{{begin-hl2msg|zp_infected|string}}
+
{{hl2msg|short|userid|player who earned the achievement}}
{{hl2msg|short|userid|player that got infected}}
+
{{hl2msg|string|achid|achievement id}}
{{end-hl2msg}}
+
{{hl2msg|string|achtitle|title of the achievement}}
 
 
=== zp_entitypickedup ===
 
{{qnotice|Calls whenever a button is pressed, or if an item is picked up}}<br>
 
{{begin-hl2msg|zp_entitypickedup|string}}
 
{{hl2msg|string|entkey|name of the button that is pressed or entity that is picked up}}
 
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
Line 243: Line 226:
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== logicrounds_start ===
+
 
{{qnotice|Called when the round has started (from logic_rounds)}}<br>
+
=== endslate ===
{{begin-hl2msg|logicrounds_start|string}}
+
{{qnotice|Called when the round ends}}<br>
{{hl2msg|None|None|None}}
+
{{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}}
 
{{end-hl2msg}}
  
=== logicrounds_end ===
+
=== vote_started ===
{{qnotice|Called when the round ends (from logic_rounds)}}<br>
+
{{qnotice|Called when a vote has started}}<br>
{{begin-hl2msg|logicrounds_end|string}}
+
{{begin-hl2msg|vote_started|string}}
{{hl2msg|None|None|None}}
+
{{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}}
 
{{end-hl2msg}}
  
=== set_text ===
+
=== vote_update ===
{{qnotice|Called when AS sets the win text}}<br>
+
{{qnotice|Called when a vote updates}}<br>
{{begin-hl2msg|set_text|string}}
+
{{begin-hl2msg|vote_update|string}}
{{hl2msg|string|txt}}
+
{{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}}
 
{{end-hl2msg}}
  
Line 264: Line 268:
 
{{qnotice|Called when a vote has ended}}<br>
 
{{qnotice|Called when a vote has ended}}<br>
 
{{begin-hl2msg|vote_ended|string}}
 
{{begin-hl2msg|vote_ended|string}}
{{hl2msg|None|None|None}}
+
{{hl2msg|string|arg|Argument(s) of the vote}}
{{end-hl2msg}}
+
{{hl2msg|string|endmsg|}}
 
+
{{hl2msg|short|target|player who got targeted by the caller}}
=== vote_generic_created ===
+
{{hl2msg|short|caller|player who started the vote}}
{{qnotice|Called when a generic vote has been created}}<br>
+
{{hl2msg|short|state|}}
{{begin-hl2msg|vote_generic_created|string}}
+
{{hl2msg|short|result|}}
{{hl2msg|None|None|None}}
 
{{end-hl2msg}}
 
 
 
=== vote_generic_clr ===
 
{{qnotice|None}}<br>
 
{{begin-hl2msg|vote_generic_clr|string}}
 
{{hl2msg|string|option}}
 
{{hl2msg|long|red}}
 
{{hl2msg|long|green}}
 
{{hl2msg|long|blue}}
 
{{end-hl2msg}}
 
 
 
=== vote_started ===
 
{{qnotice|Called when a vote started}}<br>
 
{{begin-hl2msg|vote_started|string}}
 
{{hl2msg|string|issue}}
 
{{hl2msg|string|param1}}
 
{{hl2msg|byte|team}}
 
{{hl2msg|long|initiator|entity id of the player who initiated the vote}}
 
{{end-hl2msg}}
 
 
 
=== vote_changed ===
 
{{qnotice|Called when a vote changed}}<br>
 
{{begin-hl2msg|vote_changed|string}}
 
{{hl2msg|byte|vote_option1}}
 
{{hl2msg|byte|vote_option2}}
 
{{hl2msg|byte|vote_option3}}
 
{{hl2msg|byte|vote_option4}}
 
{{hl2msg|byte|vote_option5}}
 
{{hl2msg|byte|yesVotes}}
 
{{hl2msg|byte|noVotes}}
 
{{hl2msg|byte|potentialVotes}}
 
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== vote_passed ===
 
{{qnotice|Called when a vote passed}}<br>
 
{{begin-hl2msg|vote_passed|string}}
 
{{hl2msg|string|details}}
 
{{hl2msg|string|param1}}
 
{{hl2msg|byte|team}}
 
{{end-hl2msg}}
 
  
=== vote_failed ===
+
=== badge_reward_announce ===
{{qnotice|Called when a vote failed}}<br>
+
{{qnotice|Called when the player is notified about receiving a badge reward.}}<br>
{{begin-hl2msg|vote_passed|string}}
+
{{begin-hl2msg|badge_reward_announce|string}}
{{hl2msg|byte|team}}
+
{{hl2msg|long|entindex|player who got the badge reward}}
{{end-hl2msg}}
+
{{hl2msg|string|name|Name of the badge reward}}
 
+
{{hl2msg|string|desc|Description of the badge reward}}
 
+
{{hl2msg|string|icon|Icon which is shown}}
=== vote_cast ===
+
{{hl2msg|long|state|}}
{{qnotice|None}}<br>
 
{{begin-hl2msg|vote_cast|string}}
 
{{hl2msg|byte|vote|yes/no vote}}
 
{{hl2msg|byte|team}}
 
{{hl2msg|long|entityid|entity id of the voter}}
 
 
{{end-hl2msg}}
 
{{end-hl2msg}}

Revision as of 11:29, 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


angelscript_callevent

Note: When the AS calls the function CallEvent()

Name: angelscript_callevent
Structure:
short clientid {{{3}}}
short typeid {{{3}}}
string msg {{{3}}}



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



gravity_change

Note: When the gravity changes

Name: gravity_change
Structure:
float newgravity New value after the change


spec_target_updated

Note: None

Name: spec_target_updated
Structure:
none none {{{3}}}



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


general_hint

Note: None

Name: general_hint
Structure:
short userid the player who activated it


movement_hint

Note: None

Name: movement_hint
Structure:
short userid the player who needs the hint


movement_hint_success

Note: None

Name: movement_hint_success
Structure:
short userid the player succeeded



gameinstructor_draw

Note: None

Name: gameinstructor_draw
Structure:
None None None


gameinstructor_nodraw

Note: None

Name: gameinstructor_nodraw
Structure:
None None None


set_instructor_group_enabled

Note: None

Name: set_instructor_group_enabled
Structure:
string group {{{3}}}
short enabled {{{3}}}


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 state