Difference between revisions of "Game Events (Source)"

From AlliedModders Wiki
Jump to: navigation, search
(Game Events)
Line 9: Line 9:
 
* [[Perfect Dark: Source Events]]
 
* [[Perfect Dark: Source Events]]
 
* [[Iron Grip: Source  Events]]
 
* [[Iron Grip: Source  Events]]
 
= Generic Source Events =
 
 
=== team_info ===
 
{{qnotice|Info about team}}<br>
 
{{begin-hl2msg|team_info|string}}
 
{{hl2msg|byte|teamid}}
 
{{hl2msg|string|teamname}}
 
{{end-hl2msg}}
 
 
=== team_score ===
 
{{qnotice|Team score changed}}<br>
 
{{begin-hl2msg|team_info|string}}
 
{{hl2msg|byte|teamid}}
 
{{hl2msg|short|score}}
 
{{end-hl2msg}}
 
 
=== player_team ===
 
{{qnotice|Player change his team}}<br>
 
{{begin-hl2msg|player_team|string}}
 
{{hl2msg|short|userid}}
 
{{hl2msg|byte|team}}
 
{{hl2msg|byte|oldteam}}
 
{{hl2msg|bool|disconnect}}
 
{{end-hl2msg}}
 
 
=== player_class ===
 
{{qnotice|A player changed his class}}<br>
 
{{begin-hl2msg|player_class|string}}
 
{{hl2msg|short|userid}}
 
{{hl2msg|string|class}}
 
{{end-hl2msg}}
 
 
=== player_death ===
 
{{qnotice|A game event, name may be 32 charaters long}}<br>
 
{{begin-hl2msg|player_death|string}}
 
{{hl2msg|short|userid}}
 
{{hl2msg|short|attacker}}
 
{{end-hl2msg}}
 
 
=== player_hurt ===
 
{{qnotice|A player was hurt}}<br>
 
{{begin-hl2msg|player_hurt|string}}
 
{{hl2msg|short|userid}}
 
{{hl2msg|short|attacker}}
 
{{hl2msg|byte|health}}
 
{{end-hl2msg}}
 
 
=== player_chat ===
 
{{qnotice|A public player chat}}<br>
 
{{begin-hl2msg|player_chat|string}}
 
{{hl2msg|bool|teamonly}}
 
{{hl2msg|short|userid}}
 
{{hl2msg|string|text}}
 
{{end-hl2msg}}
 
 
=== player_score ===
 
{{qnotice|Players scores changed}}<br>
 
{{begin-hl2msg|player_score|string}}
 
{{hl2msg|short|userid}}
 
{{hl2msg|short|kills}}
 
{{hl2msg|short|deaths}}
 
{{hl2msg|short|score}}
 
{{end-hl2msg}}
 
 
=== player_spawn ===
 
{{qnotice|player spawned in game}}<br>
 
{{begin-hl2msg|player_spawn|string}}
 
{{hl2msg|short|userid}}
 
{{end-hl2msg}}
 
 
=== player_shoot ===
 
{{qnotice|Player shoot his weapon}}<br>
 
{{begin-hl2msg|player_shoot|string}}
 
{{hl2msg|short|userid}}
 
{{hl2msg|byte|weapon}}
 
{{hl2msg|byte|mode}}
 
{{end-hl2msg}}
 
 
=== player_use ===
 
{{qnotice|When a player uses an option}}<br>
 
{{begin-hl2msg|player_use|string}}
 
{{hl2msg|short|userid}}
 
{{hl2msg|short|entity}}
 
{{end-hl2msg}}
 
 
=== player_changename ===
 
{{qnotice|Player changed name}}<br>
 
{{begin-hl2msg|player_changename|string}}
 
{{hl2msg|string|userid}}
 
{{hl2msg|string|oldname}}
 
{{hl2msg|string|newname}}
 
{{end-hl2msg}}
 
 
=== game_newmap ===
 
{{qnotice|Send when new map is completely loaded}}<br>
 
{{begin-hl2msg|game_newmap|string}}
 
{{hl2msg|string|mapname}}
 
{{end-hl2msg}}
 
 
=== game_start ===
 
{{qnotice|A new game starts}}<br>
 
{{begin-hl2msg|game_start|string}}
 
{{hl2msg|long|roundslimit}}
 
{{hl2msg|long|timelimit}}
 
{{hl2msg|long|fraglimit}}
 
{{hl2msg|string|objective}}
 
{{end-hl2msg}}
 
 
=== game_end ===
 
{{qnotice|A game ended}}<br>
 
{{begin-hl2msg|game_end|string}}
 
{{hl2msg|byte|winner}}
 
{{end-hl2msg}}
 
 
=== round_start ===
 
{{qnotice|The round started}}<br>
 
{{begin-hl2msg|player_changename|string}}
 
{{hl2msg|long|timelimit}}
 
{{hl2msg|long|fraglimit}}
 
{{hl2msg|string|objective}}
 
{{end-hl2msg}}
 
 
=== round_end ===
 
{{qnotice|The round ended}}<br>
 
{{begin-hl2msg|round_end|string}}
 
{{hl2msg|byte|winner}}
 
{{hl2msg|byte|reason}}
 
{{hl2msg|string|message}}
 
{{end-hl2msg}}
 
 
=== game_message ===
 
{{qnotice|A game message}}<br>
 
{{begin-hl2msg|game_message|string}}
 
{{hl2msg|byte|target}}
 
{{hl2msg|string|text}}
 
{{end-hl2msg}}
 
 
=== break_breakable ===
 
{{qnotice|A breakable (func_break) is broken.}}<br>
 
{{begin-hl2msg|break_breakable|string}}
 
{{hl2msg|long|entindex}}
 
{{hl2msg|short|userid}}
 
{{hl2msg|byte|material}}
 
{{end-hl2msg}}
 
 
=== break_prop ===
 
{{qnotice|A breakable prop is broken.}}<br>
 
{{begin-hl2msg|break_prop|string}}
 
{{hl2msg|long|entindex}}
 
{{hl2msg|short|userid}}
 
{{end-hl2msg}}
 
  
 
= Generic Source Server Events =
 
= Generic Source Server Events =

Revision as of 17:12, 8 June 2007

Game Events

These are all the games that the Source engine covers.

Generic Source Server Events

server_spawn

Note: Send once a server starts

Name: server_start
Structure:
string hostname {{{3}}}
string address {{{3}}}
string port {{{3}}}
string game {{{3}}}
string mapname {{{3}}}
long maxplayers {{{3}}}
string os {{{3}}}
bool dedicated {{{3}}}
bool password {{{3}}}


server_shutdown

Note: Server shut down

Name: server_shutdown
Structure:
string reason {{{3}}}


server_cvar

Note: A server console var has changed

Name: server_cvar
Structure:
string cvarname {{{3}}}
string cvarvalue {{{3}}}


server_msg

Note: A generic server message

Name: server_message
Structure:
string text {{{3}}}


server_addban

Note: When the server has a ban added

Name: server_addban
Structure:
string name {{{3}}}
string userid {{{3}}}
string networkid {{{3}}}
string ip {{{3}}}
string duration {{{3}}}
string by {{{3}}}
bool kicked {{{3}}}


server_removeban

Note: When the server has a ban removed

Name: server_removeban
Structure:
string networkid {{{3}}}
string ip {{{3}}}
stsring by {{{3}}}


player_connect

Note: A new player connected

Name: player_connect
Structure:
string name {{{3}}}
byte index {{{3}}}
short userid {{{3}}}
string networkid {{{3}}}
string address {{{3}}}


player_info

Note: A player changed his name

Name: player_info
Structure:
string name {{{3}}}
byte index {{{3}}}
short userid {{{3}}}
string networkid {{{3}}}
bool bot {{{3}}}


player_disconnect

Note: A client was disconnected

Name: player_disconnect
Structure:
short userid {{{3}}}
string reason {{{3}}}
string name {{{3}}}
string networkid {{{3}}}


player_activate

Note: A client has entered the game (connected and loaded)

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


player_say

Note: When a client sends a message in chat

Name: player_say
Structure:
short userid {{{3}}}
string text {{{3}}}