Difference between revisions of "Zombie Panic! Source Events"

From AlliedModders Wiki
Jump to: navigation, search
(Added and Updated all events for ZPS 3.0)
m (Added discord_callstatusupdate and fixed angelscript_callevent params)
Line 70: Line 70:
 
{{end-hl2msg}}
 
{{end-hl2msg}}
  
=== angelscript_callevent ===
+
=== discord_callstatusupdate ===
{{qnotice|when AS calls the function CallEvent()}}<br>
+
{{qnotice|Send an Update to Discord RPC}}<br>
{{begin-hl2msg|angelscript_callevent|string}}
+
{{begin-hl2msg|discord_callstatusupdate|string}}
 
{{hl2msg|short|clientid}}
 
{{hl2msg|short|clientid}}
 
{{hl2msg|string|hostname}}
 
{{hl2msg|string|hostname}}
Line 79: Line 79:
 
{{hl2msg|string|model}}
 
{{hl2msg|string|model}}
 
{{end-hl2msg}}
 
{{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 ===
 
=== cleanupmap ===

Revision as of 09:44, 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 {{{3}}}
string serverip {{{3}}}
string serverport {{{3}}}
string model {{{3}}}



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