Difference between revisions of "Zombie Panic! Source Events"

From AlliedModders Wiki
Jump to: navigation, search
m (discord_callstatusupdate)
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
:''Refer back to [[Game Events (Source)]] for more events.''
 
=== player_death ===
 
=== player_death ===
{{qnotice|When a client dies}}<br>
+
{{qnotice|When a player dies}}<br>
 
{{begin-hl2msg|player_death|string}}
 
{{begin-hl2msg|player_death|string}}
{{hl2msg|short|userid}}
+
{{hl2msg|short|userid|player who died}}
{{hl2msg|short|attacker}}
+
{{hl2msg|short|attacker|player who killed}}
{{hl2msg|string|weapon}}
+
{{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|short|dmgbits|damage type}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== zombie_death ===
+
=== player_connected ===
{{qnotice|When a zombie dies}}<br>
+
{{qnotice|When a player joins the server}}<br>
{{begin-hl2msg|zombie_death|string}}
+
{{begin-hl2msg|player_connected|string}}
{{hl2msg|byte|count}}
+
{{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|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}}
 +
 
 +
=== zombie_lives ===
 +
{{qnotice|Called when the zombie lives changes}}<br>
 +
{{begin-hl2msg|zombie_lives|string}}
 +
{{hl2msg|byte|count|amount of zombie lives left}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
 
=== ambient_play ===
 
=== ambient_play ===
{{qnotice|None}}<br>
+
{{qnotice|Called when a sound plays}}<br>
 
{{begin-hl2msg|ambient_play|string}}
 
{{begin-hl2msg|ambient_play|string}}
{{hl2msg|string|sound}}
+
{{hl2msg|string|sound|sound file which played}}
{{hl2msg|bool|fade}}
+
{{hl2msg|short|entity|entity which the sound plays from}}
 +
{{hl2msg|bool|fade|should the sound fade}}
 +
{{end-hl2msg}}
 +
 
 +
=== force_song ===
 +
{{qnotice|Called when the logic_music entity changes the song}}<br>
 +
{{begin-hl2msg|force_song_play|string}}
 +
{{hl2msg|string|song|file path for the song}}
 +
{{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}}
 +
 
 +
=== armmodel_as ===
 +
{{qnotice|Called when a new arm model is set from AngelScript}}<br>
 +
{{begin-hl2msg|armmodel_as|string}}
 +
{{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}}
 +
 
 +
=== discord_callstatusupdate ===
 +
{{qnotice|Send an Update to Discord RPC}}<br>
 +
{{begin-hl2msg|discord_callstatusupdate|string}}
 +
{{hl2msg|short|clientid}}
 +
{{hl2msg|string|hostname|Server Hostname}}
 +
{{hl2msg|string|serverip|Server IP}}
 +
{{hl2msg|string|serverport|Server Port}}
 +
{{hl2msg|string|model|Current Model of the client}}
 +
{{end-hl2msg}}
 +
 
 +
=== angelscript_callevent===
 +
{{qnotice|When the AS calls the function CallEvent()}}<br>
 +
{{begin-hl2msg|angelscript_callevent|string}}
 +
{{hl2msg|short|clientid}}
 +
{{hl2msg|short|typeid}}
 +
{{hl2msg|string|msg}}
 +
{{end-hl2msg}}
 +
 
 +
 
 +
=== cleanupmap ===
 +
{{qnotice|when the server calls CleanUpMap(), it will tell the client todo the same for temp and client sided entities}}<br>
 +
{{begin-hl2msg|cleanupmap|string}}
 +
{{hl2msg|None|None|None}}
 +
{{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}}
 
{{end-hl2msg}}
  
 
=== game_round_restart ===
 
=== game_round_restart ===
{{qnotice|None}}<br>
+
{{qnotice|When one team won the round and players can select their team again}}<br>
 
{{begin-hl2msg|game_round_restart|string}}
 
{{begin-hl2msg|game_round_restart|string}}
 
{{hl2msg|none|none}}
 
{{hl2msg|none|none}}
Line 29: Line 117:
 
{{qnotice|When the gravity changes}}<br>
 
{{qnotice|When the gravity changes}}<br>
 
{{begin-hl2msg|gravity_change|string}}
 
{{begin-hl2msg|gravity_change|string}}
{{hl2msg|float|newgravity}}
+
{{hl2msg|float|newgravity|New value after the change}}
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
Line 35: Line 123:
 
{{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}}
 
{{end-hl2msg}}
  
Line 43: Line 132:
 
{{begin-hl2msg|spec_target_updated|string}}
 
{{begin-hl2msg|spec_target_updated|string}}
 
{{hl2msg|none|none}}
 
{{hl2msg|none|none}}
 +
{{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}}
 +
 +
 +
=== zp_infected ===
 +
{{qnotice|Calls whenever someone got infected}}<br>
 +
{{begin-hl2msg|zp_infected|string}}
 +
{{hl2msg|short|userid|player that got infected}}
 +
{{end-hl2msg}}
 +
 +
=== 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}}
 +
 +
=== general_hint ===
 +
{{qnotice|None}}<br>
 +
{{begin-hl2msg|general_hint|string}}
 +
{{hl2msg|short|userid|the player who activated it}}
 +
{{end-hl2msg}}
 +
 +
=== movement_hint ===
 +
{{qnotice|None}}<br>
 +
{{begin-hl2msg|movement_hint|string}}
 +
{{hl2msg|short|userid|the player who needs the hint}}
 +
{{end-hl2msg}}
 +
 +
=== movement_hint_success ===
 +
{{qnotice|None}}<br>
 +
{{begin-hl2msg|movement_hint_success|string}}
 +
{{hl2msg|short|userid|the player succeeded}}
 +
{{end-hl2msg}}
 +
 +
 +
=== gameinstructor_draw ===
 +
{{qnotice|None}}<br>
 +
{{begin-hl2msg|gameinstructor_draw|string}}
 +
{{hl2msg|None|None|None}}
 +
{{end-hl2msg}}
 +
 +
=== gameinstructor_nodraw ===
 +
{{qnotice|None}}<br>
 +
{{begin-hl2msg|gameinstructor_nodraw|string}}
 +
{{hl2msg|None|None|None}}
 +
{{end-hl2msg}}
 +
 +
=== set_instructor_group_enabled ===
 +
{{qnotice|None}}<br>
 +
{{begin-hl2msg|set_instructor_group_enabled|string}}
 +
{{hl2msg|string|group}}
 +
{{hl2msg|short|enabled}}
 +
{{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}}
 +
 +
=== 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>
 +
{{begin-hl2msg|instructor_survivor_supply|string}}
 +
{{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}}
 +
 +
=== logicrounds_start ===
 +
{{qnotice|Called when the round has started (from logic_rounds)}}<br>
 +
{{begin-hl2msg|logicrounds_start|string}}
 +
{{hl2msg|None|None|None}}
 +
{{end-hl2msg}}
 +
 +
=== logicrounds_end ===
 +
{{qnotice|Called when the round ends (from logic_rounds)}}<br>
 +
{{begin-hl2msg|logicrounds_end|string}}
 +
{{hl2msg|None|None|None}}
 +
{{end-hl2msg}}
 +
 +
=== set_text ===
 +
{{qnotice|Called when AS sets the win text}}<br>
 +
{{begin-hl2msg|set_text|string}}
 +
{{hl2msg|string|txt}}
 +
{{end-hl2msg}}
 +
 +
=== vote_ended ===
 +
{{qnotice|Called when a vote has ended}}<br>
 +
{{begin-hl2msg|vote_ended|string}}
 +
{{hl2msg|None|None|None}}
 +
{{end-hl2msg}}
 +
 +
=== vote_generic_created ===
 +
{{qnotice|Called when a generic vote has been created}}<br>
 +
{{begin-hl2msg|vote_generic_created|string}}
 +
{{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}}
 +
 +
=== 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 ===
 +
{{qnotice|Called when a vote failed}}<br>
 +
{{begin-hl2msg|vote_passed|string}}
 +
{{hl2msg|byte|team}}
 +
{{end-hl2msg}}
 +
 +
 +
=== vote_cast ===
 +
{{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 10:46, 14 May 2018

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

player_death

Note: When a player dies

Name: player_death
Structure:
short userid player who died
short attacker player who killed
short assistant player who assisted the attacker
string weapon name of the weapon
bool headshot true if player died from headshot
short dmgbits damage type


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}}}
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


zombie_lives

Note: Called when the zombie lives changes

Name: zombie_lives
Structure:
byte count amount of zombie lives left


ambient_play

Note: Called when a sound plays

Name: ambient_play
Structure:
string sound sound file which played
short entity entity which the sound plays from
bool fade should the sound fade


force_song

Note: Called when the logic_music entity changes the song

Name: force_song_play
Structure:
string song file path for the song
string title custom song title


ambient_as

Note: Called when a sound is played from AngelScript

Name: ambient_as
Structure:
string sound sound being played


armmodel_as

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

Name: armmodel_as
Structure:
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


discord_callstatusupdate

Note: Send an Update to Discord RPC

Name: discord_callstatusupdate
Structure:
short clientid {{{3}}}
string hostname Server Hostname
string serverip Server IP
string serverport Server Port
string model Current Model of the client


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


round_begins

Note: When the round begins

Name: round_begins
Structure:
None None None


round_win

Note: When the round ends

Name: round_win
Structure:
string mapname name of the current map
bool humanwin true if survivors won


game_round_restart

Note: When one team won the round and players can select their team again

Name: game_round_restart
Structure:
none none {{{3}}}


gravity_change

Note: When the gravity changes

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


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


spec_target_updated

Note: None

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


zp_washuman

Note: 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)

Name: zp_washuman
Structure:
short userid player that turned into a zombie



zp_infected

Note: Calls whenever someone got infected

Name: zp_infected
Structure:
short userid player that got infected


zp_entitypickedup

Note: Calls whenever a button is pressed, or if an item is picked up

Name: zp_entitypickedup
Structure:
string entkey name of the button that is pressed or entity that is picked up


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"


logicrounds_start

Note: Called when the round has started (from logic_rounds)

Name: logicrounds_start
Structure:
None None None


logicrounds_end

Note: Called when the round ends (from logic_rounds)

Name: logicrounds_end
Structure:
None None None


set_text

Note: Called when AS sets the win text

Name: set_text
Structure:
string txt {{{3}}}


vote_ended

Note: Called when a vote has ended

Name: vote_ended
Structure:
None None None


vote_generic_created

Note: Called when a generic vote has been created

Name: vote_generic_created
Structure:
None None None


vote_generic_clr

Note: None

Name: vote_generic_clr
Structure:
string option {{{3}}}
long red {{{3}}}
long green {{{3}}}
long blue {{{3}}}


vote_started

Note: Called when a vote started

Name: vote_started
Structure:
string issue {{{3}}}
string param1 {{{3}}}
byte team {{{3}}}
long initiator entity id of the player who initiated the vote


vote_changed

Note: Called when a vote changed

Name: vote_changed
Structure:
byte vote_option1 {{{3}}}
byte vote_option2 {{{3}}}
byte vote_option3 {{{3}}}
byte vote_option4 {{{3}}}
byte vote_option5 {{{3}}}
byte yesVotes {{{3}}}
byte noVotes {{{3}}}
byte potentialVotes {{{3}}}


vote_passed

Note: Called when a vote passed

Name: vote_passed
Structure:
string details {{{3}}}
string param1 {{{3}}}
byte team {{{3}}}


vote_failed

Note: Called when a vote failed

Name: vote_passed
Structure:
byte team {{{3}}}



vote_cast

Note: None

Name: vote_cast
Structure:
byte vote yes/no vote
byte team {{{3}}}
long entityid entity id of the voter