Generic Source Server Events

From AlliedModders Wiki
Revision as of 08:45, 1 August 2013 by Powerlord (talk | contribs) (Added some missing descriptions and fields)
Jump to: navigation, search
Refer back to Game Events (Source) for more events.

These should apply to all Source Engine Servers

server_spawn

Note: Send once a server starts (spawns)

Name: server_spawn
Structure:
string hostname public host name
string address hostame, IP or DNS name
string port server port
string game game dir
string mapname map name
long maxplayers max players
string os WIN32, LINUX
bool dedicated true if dedicated server
bool password true if password protected


server_shutdown

Note: Server shut down

Name: server_shutdown
Structure:
string reason reason why server was shut down


server_cvar

Note: A server console var has changed

Name: server_cvar
Structure:
string cvarname cvar name, eg "mp_roundtime"
string cvarvalue new cvar value


server_messsage

Note: A generic server message

Name: server_message
Structure:
string text the message text


server_addban

Note: When the server has a ban added

Name: server_addban
Structure:
string name player name
string userid user ID on server
string networkid player network (i.e steam) id
string ip IP address
string duration length of the ban
string by banned by...
bool kicked whether the player was also kicked


server_removeban

Note: When the server has a ban removed

Name: server_removeban
Structure:
string networkid player network (i.e steam) id
string ip IP address
stsring by removed by...


player_connect

Note: A new client connected

Name: player_connect
Structure:
string name player name
byte index player slot (entity index-1)
short userid user ID on server (unique on server)
string networkid player network (i.e steam) id
string address ip:port
short bot is a bot


player_info

Note: A player changed his name

Name: player_info
Structure:
string name player name
byte index player slot (entity index-1)
short userid user ID on server (unique on server)
string networkid player network (i.e steam) id
bool bot true if player is a AI bot


player_disconnect

Note: A client was disconnected

Name: player_disconnect
Structure:
short userid user ID on server
string reason "self", "kick", "ban", "cheat", "error"
string name player name
string networkid player network (i.e steam) id
short bot is a bot


player_activate

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

Name: player_activate
Structure:
short userid user ID on server


player_say

Note: When a client sends a message in chat

Name: player_say
Structure:
short userid user ID on server
string text the say text