Event Reference

The CS2 game events plugins use most, with their fields and types as the game defines them.

The fields below are taken from the event definitions CS2 ships in its VPKs — resource/core.gameevents (engine), resource/game.gameevents and resource/mod.gameevents (Counter-Strike). Where an event is defined in more than one file, the most specific definition is listed — mod over game over core. Names are case sensitive.

For hooking, reading and firing, see Game events.

Field types and getters

Type in the definitionRead with
player_controller_and_pawnGetPlayerController(key), GetPlayerPawn(key), GetPlayerSlot(key)
player_controllerGetPlayerController(key), GetPlayerSlot(key) — the pawn through the controller
player_pawnGetPlayerPawn(key)
boolGetBool(key)
byte, short, longGetInt(key)
floatGetFloat(key)
stringGetString(key)
uint64GetUint64(key)

Player getters return a CEntityInstance*; static_cast it to CCSPlayerController* / CCSPlayerPawn* and check for nullptr. In a script they return the typed handle; check it against NULL_ENTITY.

auto* pController = static_cast<CCSPlayerController*>(event->GetPlayerController("userid"));
CCSPlayerPawn* pPawn = pController ? pController->GetPlayerPawn() : nullptr;

Players

player_connect

A client connected (before it is in the game).

FieldType
namestringplayer name
useridplayer_controller
networkidstringnetwork (Steam) id
xuiduint64SteamID64
botbool

player_connect_full

The client finished the connection sequence — the usual "player joined" hook.

FieldType
useridplayer_controller

player_disconnect

FieldType
useridplayer_controller
reasonshortdisconnect reason (ENetworkDisconnectionReason value)
namestring
networkidstring
xuiduint64SteamID64
PlayerIDshort
ever_fully_connectedboolwhether the player ever reached player_connect_full

player_team

A player changed team.

FieldType
useridplayer_controller_and_pawn
teambytenew team (ETeam: 1 spectator, 2 T, 3 CT)
oldteambyteprevious team
disconnectboolthe change is because the player disconnected
silentbool
isbotbool

player_spawn

FieldType
useridplayer_controller_and_pawn

player_death

FieldType
useridplayer_controller_and_pawnvictim
attackerplayer_controller_and_pawnkiller
assisterplayer_controller_and_pawnassisting player
assistedflashboolthe assist was a flash
weaponstringweapon name the killer used
weapon_itemidstring
weapon_fauxitemidstring
weapon_originalowner_xuidstring
headshotbool
dominatedshort
revengeshort
wipeshortsquad wipe
penetratedshortobjects penetrated by the shot
noreplaybool
noscopebool
thrusmokeboolshot through smoke
attackerblindboolattacker was flashed
distancefloatdistance to the victim, in metres
dmg_healthshort
dmg_armorbyte
hitgroupbyteEHitGroup value
attackerinairbool

player_hurt

FieldType
useridplayer_controller_and_pawnvictim
attackerplayer_controller_and_pawn
healthbytehealth left
armorbytearmour left
weaponstring
dmg_healthshortdamage to health
dmg_armorbytedamage to armour
hitgroupbyteEHitGroup value

player_hurt reports damage that was dealt. To change or prevent damage, hook the damage function instead (see Hooking).

player_jump

FieldType
useridplayer_controller

player_blind

FieldType
useridplayer_controllerthe flashed player
attackerplayer_controllerwho threw the flash
entityidshortthe flashbang
blind_durationfloat

player_changename

FieldType
useridplayer_controller
oldnamestring
newnamestring

player_radio

FieldType
useridplayer_controller_and_pawn
slotshort

Rounds and match

round_prestart / round_poststart

No fields. Sent before and after all other round restart actions.

round_start

FieldType
timelimitlonground time limit, seconds
fraglimitlong
objectivestring

round_freeze_end

No fields. Freeze time is over, players can move.

round_end

FieldType
winnerbytewinning team (ETeam)
reasonbyteround end reason
messagestringend-of-round message
legacybyte
player_countshortplayers alive at the end of the round
nomusicbytedon't play round end music

round_mvp

FieldType
useridplayer_controller
reasonshort
valuelong
musickitmvpslong
nomusicbyte
musickitidlong

round_officially_ended, begin_new_match, round_announce_match_start, cs_win_panel_match, warmup_end, cs_pre_restart

No fields.

Bomb

EventFields
bomb_beginplantuserid (player_controller_and_pawn), site (short)
bomb_planteduserid (player_controller_and_pawn), site (short), c4 (short)
bomb_begindefuseuserid (player_controller_and_pawn), haskit (bool)
bomb_defuseduserid (player_controller_and_pawn), site (short), c4 (short)
bomb_explodeduserid (player_controller_and_pawn, the planter), site (short), c4 (short)
bomb_droppeduserid (player_controller_and_pawn), entindex (long)
bomb_pickupuserid (player_pawn)
player_given_c4userid (player_controller)

Weapons and items

EventFields
weapon_fireuserid (player_controller_and_pawn), weapon (string), silenced (bool)
weapon_reloaduserid (player_controller_and_pawn)
weapon_zoomuserid (player_controller_and_pawn)
bullet_impactuserid (player_controller_and_pawn), x, y, z (float)
item_purchaseuserid (player_controller), team (short), loadout (short), weapon (string)
item_pickupuserid (player_controller), item (string), silent (bool), defindex (long)
item_equipuserid (player_controller), item (string), defindex (long), canzoom, hassilencer, issilenced, hastracers (bool), weptype (short), ispainted (bool)

item_equip.weptype: -1 unknown, 0 knife, 1 pistol, 2 SMG, 3 rifle, 4 shotgun, 5 sniper rifle, 6 machine gun, 7 C4, 8 grenade.

Grenades

EventFields
grenade_thrownuserid (player_controller_and_pawn), weapon (string)
hegrenade_detonateuserid (player_controller_and_pawn), entityid (short), x, y, z (float)
flashbang_detonateuserid (player_controller_and_pawn), entityid (short), x, y, z (float)
smokegrenade_detonateuserid (player_controller_and_pawn), entityid (short), x, y, z (float)

Server

EventFields
game_newmapmapname (string) — sent when a new map has finished loading
server_cvarcvarname (string), cvarvalue (string)

Client-only helpers

Some events exist to drive the client UI and are useful with FireEventToClient:

EventFieldsUse
show_survival_respawn_statusloc_token (string), duration (long), userid (player_controller_and_pawn)HTML text in the centre of the screen — what CCSPlayerController::PrintToCenterHtml sends.

Finding other events

The full definitions are plain text inside the game's VPKs: game/csgo/pak01_dir.vpk → resource/game.gameevents and resource/mod.gameevents, game/core/pak01_dir.vpk → resource/core.gameevents. Any VPK tool can open them. To see what fires in practice, hook the candidates with a post hook that logs event->GetName().

On this page