Difference between revisions of "Counter-Strike: Source Events"

From AlliedModders Wiki
Jump to: navigation, search
Line 16: Line 16:
 
{{qnotice|When a client is damaged}}
 
{{qnotice|When a client is damaged}}
 
{{begin-hl2msg|player_hurt|string}}
 
{{begin-hl2msg|player_hurt|string}}
{{hl2msg|short|userid|player index who was hurt}}
+
{{hl2msg|short|userid|user ID who was hurt}}
{{hl2msg|short|attacker|player index who attacked}}
+
{{hl2msg|short|attacker|user ID who attacked}}
 
{{hl2msg|byte|health|remaining health points}}
 
{{hl2msg|byte|health|remaining health points}}
 
{{hl2msg|byte|armor|remaining armor points}}
 
{{hl2msg|byte|armor|remaining armor points}}

Revision as of 15:07, 16 September 2010

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

All cstrike mod events can be found in cstrike\resource\modevents.res


player_death

Note: When a client dies

Name: player_death
Structure:
short userid user ID who died
short attacker user ID who killed
string weapon weapon name killer used
bool headshot singals a headshot


player_hurt

Note: When a client is damaged

Name: player_hurt
Structure:
short userid user ID who was hurt
short attacker user ID who attacked
byte health remaining health points
byte armor remaining armor points
string weapon weapon name attacker used, if not the world
byte dmg_health damage done to health
byte dmg_armor damage done to armor
byte hitgroup hitgroup that was damaged


bomb_beginplant

Note: When the bomb is starting to get planted

Name: bomb_beginplant
Structure:
short userid {{{3}}}
short site {{{3}}}


bomb_abortplant

Note: When the bomb planter stops planting the bomb

Name: bomb_abortplant
Structure:
short userid {{{3}}}
short site {{{3}}}


bomb_planted

Note: When the bomb has been planted

Name: bomb_planted
Structure:
short userid {{{3}}}
short site {{{3}}}
short posx {{{3}}}
short posy {{{3}}}


bomb_defused

Note: When the bomb has been defused

Name: bomb_defused
Structure:
short userid {{{3}}}
short site {{{3}}}


bomb_exploded

Note: When the bomb explodes

Name: bomb_exploded
Structure:
short userid {{{3}}}
short site {{{3}}}


bomb_dropped

Note: When the bomb is dropped by a client

Name: bomb_dropped
Structure:
short userid {{{3}}}


bomb_pickup

Note: When the bomb is picked up by a client

Name: bomb_pickup
Structure:
short userid {{{3}}}


bomb_begindefuse

Note: When the bomb is started to be defused

Name: bomb_begindefuse
Structure:
short userid {{{3}}}
bool haskit {{{3}}}


bomb_abortdefuse

Note: When the bomb defusal is stopped

Name: bomb_abortdefuse
Structure:
short userid {{{3}}}


hostage_follows

Note: When the hostage begins following a client

Name: hostage_follows
Structure:
short userid {{{3}}}
short hostage {{{3}}}


hostage_hurt

Note: When a hostage is damaged

Name: hostage_hurt
Structure:
short userid {{{3}}}
short hostage {{{3}}}


hostage_killed

Note: When a hostage is killed

Name: hostage_killed
Structure:
short userid {{{3}}}
short hostage {{{3}}}


hostage_rescued

Note: When a hostage is rescued

Name: hostage_rescued
Structure:
short userid {{{3}}}
short hostage {{{3}}}
short site {{{3}}}


hostage_stops_following

Note: When a hostage stops following a client

Name: hostage_stops_following
Structure:
short userid {{{3}}}
short hostage {{{3}}}


hostage_rescued_all

Note: When all the hostages are rescued

Name: hostage_rescued_all
Structure:
none none {{{3}}}


hostage_call_for_help

Note: When the hostage calls for help

Name: hostage_call_for_help
Structure:
short hostage {{{3}}}


vip_escaped

Note: When the VIP escapes

Name: vip_escaped
Structure:
short userid {{{3}}}


vip_killed

Note: When the VIP is killed

Name: vip_killed
Structure:
short userid {{{3}}}
short attacker {{{3}}}


player_radio

Note: When the player uses radio commands

Name: player_radio
Structure:
short userid {{{3}}}
short slot {{{3}}}


bomb_beep

Note: Every time the bomb beep sound happens

Name: bomb_beep
Structure:
long entindex c4 entity


weapon_fire

Note: Every time a client fires their weapon

Name: weapon_fire
Structure:
short userid {{{3}}}
string weapon weapon name used


weapon_fire_on_empty

Note: Every time a client fires their weapon and it's empty

Name: weapon_fire_on_empty
Structure:
short userid {{{3}}}
string weapon weapon name used


weapon_reload

Note: Every time a client reloads their weapon

Name: weapon_reload
Structure:
short userid {{{3}}}


weapon_zoom

Note: Every time a client zooms a scoped weapon

Name: weapon_zoom
Structure:
short userid {{{3}}}


item_pickup

Note: Every time an item is picked up (generally weapons)

Name: item_pickup
Structure:
short userid {{{3}}}
string item either a weapon such as 'tmp' or 'hegrenade', or an item such as 'nvgs'


grenade_bounce

Note: Every time a grenade bounces

Name: grenade_bounce
Structure:
short userid {{{3}}}


hegrenade_detonate

Note: Every time a hegrenade explodes

Name: hegrenade_detonate
Structure:
short userid {{{3}}}
float x {{{3}}}
float y {{{3}}}
float z {{{3}}}


flashbang_detonate

Note: Every time a flashbang detonates

Name: flashbang_detonate
Structure:
short userid {{{3}}}
float x {{{3}}}
float y {{{3}}}
float z {{{3}}}


smokegrenade_detonate

Note: Every time a smokegrenade detonates

Name: smokegrenade_detonate
Structure:
short userid {{{3}}}
float x {{{3}}}
float y {{{3}}}
float z {{{3}}}


bullet_impact

Note: Every time a bullet hits something

Name: bullet_impact
Structure:
short userid {{{3}}}
float x {{{3}}}
float y {{{3}}}
float z {{{3}}}


player_footstep

Note: Every time a player takes a step

Name: player_footstep
Structure:
short userid {{{3}}}


player_jump

Note: Every time a player jumps

Name: player_jump
Structure:
short userid {{{3}}}


player_blind

Note: Every time a player is blinded by a flashbang

Name: player_blind
Structure:
short userid {{{3}}}


player_falldamage

Note: Every time a player takes damage due to a fall

Name: player_falldamage
Structure:
short userid {{{3}}}
float damage {{{3}}}


door_moving

Note: Every time a door is put in motion (opened)

Name: door_moving
Structure:
long entindex {{{3}}}
short userid {{{3}}}


round_freeze_end

Note: When the round's mp_freezetime is up

Name: round_freeze_end
Structure:
none none {{{3}}}


nav_blocked

Note: Guess: Called when an area is blocked by the nav of a map

Name: nav_blocked
Structure:
long area {{{3}}}
bool blocked {{{3}}}


nav_generate

Note: Called when a nav file does not exist for a map and bots are added

Name: nav_generate
Structure:
none none {{{3}}}