Skip to content

CS:GO Game Events

Reference of CS:GO engine and gameplay events listened to by the cheat and delivered via client.add_callback("game_events").


client.add_callback("game_events", function(event)
local event_name = event:get_name()
if event_name == "player_death" then
local victim_userid = event:get_int("userid") -- or event.userid
local attacker_userid = event:get_int("attacker") -- or event.attacker
local weapon_name = event:get_string("weapon") -- or event.weapon
local is_headshot = event:get_bool("headshot") -- or event.headshot
local victim = entity.get(victim_userid, true)
local attacker = entity.get(attacker_userid, true)
if victim and attacker then
print(string.format("%s killed %s with %s%s",
attacker:get_name(),
victim:get_name(),
weapon_name,
is_headshot and " (Headshot)" or ""
))
end
elseif event_name == "player_say" then
local sender = entity.get(event:get_int("userid"), true)
local message = event:get_string("text")
if sender then
print(string.format("[Chat] %s: %s", sender:get_name(), message))
end
elseif event_name == "round_start" then
print("New round started!")
end
end)

Description: When a client dies

Property Type Description
userid short user ID who died
attacker short user ID who killed
assister short user ID who assisted in the kill
assistedflash bool assister helped with a flash
weapon string weapon name killer used
weapon_itemid string inventory item id of weapon killer used
weapon_fauxitemid string faux item id of weapon killer used
weapon_originalowner_xuid string -
headshot bool signals a headshot
dominated short did killer dominate victim with this kill
revenge short did killer get revenge on victim with this kill
wipe short To do: check if indicates on a squad wipeout in Danger Zone
penetrated short number of objects shot penetrated before killing target
noreplay bool if replay data is unavailable, this will be present and set to false
noscope bool kill happened without a scope, used for death notice icon
thrusmoke bool hitscan weapon went through smoke grenade
attackerblind bool attacker was blind from flashbang
distance float distance to victim in meters

Description: As far as I know only used for chicken deaths at the moment

Property Type Description
otherid short -
othertype string -
attacker short user ID who attacked
weapon string weapon name attacker used, if not the world
weapon_itemid string inventory item id of weapon killer used
weapon_fauxitemid string faux item id of weapon killer used
weapon_originalowner_xuid string -
headshot bool signals a headshot
penetrated short number of objects shot penetrated before killing target
noscope bool kill happened without a scope, used for death notice icon
thrusmoke bool hitscan weapon went through smoke grenade
attackerblind bool attacker was blind from flashbang
Property Type Description
userid short user ID of who was hurt
attacker short user ID of who attacked
health byte remaining health points
armor byte remaining armor points
weapon string weapon name attacker used, if not the world
dmg_health short damage done to health
dmg_armor byte damage done to armor
hitgroup byte hitgroup that was damaged
Property Type Description
userid short -
team short -
loadout short -
weapon string -

Description: When the bomb is starting to get planted

Property Type Description
userid short player who is planting the bomb
site short bombsite index

Description: When the bomb planter stops planting the bomb

Property Type Description
userid short player who is planting the bomb
site short bombsite index

Description: When the bomb has been planted

Property Type Description
userid short player who planted the bomb
site short bombsite index

Description: When the bomb has been defused

Property Type Description
userid short player who defused the bomb
site short bombsite index

Description: When the bomb explodes

Property Type Description
userid short player who planted the bomb
site short bombsite index

Description: When the bomb is dropped by a client

Property Type Description
userid short player who dropped the bomb
entindex long -

Description: When the bomb is picked up by a client

Property Type Description
userid short player who picked up the bomb

Description: When the defuser is dropped by a client

Property Type Description
entityid long defuser’s entity ID

Description: When the defuser is picked up by a client

Property Type Description
entityid long defuser’s entity ID
userid short player who picked up the defuser

This event has no additional payload properties.

This event has no additional payload properties.

Description: When the bomb is started to be defused

Property Type Description
userid short player who is defusing
haskit bool -

Description: When the bomb defusal is stopped

Property Type Description
userid short player who was defusing

Description: When the hostage begins following a client

Property Type Description
userid short player who touched the hostage
hostage short hostage entity index

Description: When a hostage is damaged

Property Type Description
userid short player who hurt the hostage
hostage short hostage entity index

Description: When a hostage is killed

Property Type Description
userid short player who killed the hostage
hostage short hostage entity index

Description: When a hostage is rescued

Property Type Description
userid short player who rescued the hostage
hostage short hostage entity index
site short rescue site index

Description: When a hostage stops following a client

Property Type Description
userid short player who rescued the hostage
hostage short hostage entity index

Description: When all the hostages are rescued

This event has no additional payload properties.

Description: When the hostage calls for help

Property Type Description
hostage short hostage entity index

Description: When the VIP escapes

Property Type Description
userid short player who was the VIP

Description: When the VIP is killed

Property Type Description
userid short player who was the VIP
attacker short user ID who killed the VIP

Description: When the player uses radio commands

Property Type Description
userid short -
slot short -

Description: Triggered whenever a player sends a text chat message

Property Type Description
userid short User ID of the player who sent the chat message
text string The text content of the chat message

Description: Every time the bomb beep sound happens

Property Type Description
entindex long c4 entity

Description: Every time a client fires their weapon

Property Type Description
userid short -
weapon string weapon name used
silenced bool is weapon silenced

Description: Every time a client fires their weapon and it’s empty

Property Type Description
userid short -
weapon string weapon name used

Description: Every time a client throws their grenade

Property Type Description
userid short -
weapon string weapon name used
Property Type Description
userid short -

Description: Every time a client reloads their weapon

Property Type Description
userid short -

Description: Every time a client zooms a scoped weapon

Property Type Description
userid short -
Property Type Description
userid short -
Property Type Description
userid short -

Description: exists for the game instructor to let it know when the player zoomed in with a regular rifle. Different from the above weapon_zoom because we don’t use this event to notify bots

Property Type Description
userid short -
Property Type Description
userid short -
inrestart bool true if restart is pending

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

Property Type Description
userid short -
item string either a weapon such as ‘tmp’ or ‘hegrenade’, or an item such as ‘nvgs’
silent bool -
defindex long -
Property Type Description
userid short -
index short -
behavior short -
Property Type Description
userid short -
item string -
reason short -
limit short -
Property Type Description
userid short -
item string either a weapon such as ‘tmp’ or ‘hegrenade’, or an item such as ‘nvgs’
defindex long -
Property Type Description
userid short -
item string either a weapon such as ‘tmp’ or ‘hegrenade’, or an item such as ‘nvgs’
index long the weapon entindex
Property Type Description
userid short -
item string either a weapon such as ‘tmp’ or ‘hegrenade’, or an item such as ‘nvgs’
defindex long -
canzoom bool -
hassilencer bool -
issilenced bool -
hastracers bool -
weptype short see below
`` `` WEAPONTYPE_UNKNOWN = -1
`` `` WEAPONTYPE_KNIFE = 0
`` `` WEAPONTYPE_PISTOL = 1
`` `` WEAPONTYPE_SUBMACHINEGUN = 2
`` `` WEAPONTYPE_RIFLE = 3
`` `` WEAPONTYPE_SHOTGUN = 4
`` `` WEAPONTYPE_SNIPER_RIFLE = 5
`` `` WEAPONTYPE_MACHINEGUN = 6
`` `` WEAPONTYPE_C4 = 7
`` `` WEAPONTYPE_TASER = 8
`` `` WEAPONTYPE_GRENADE = 9
`` `` WEAPONTYPE_HEALTHSHOT = 11
ispainted bool -
Property Type Description
userid short -
canbuy bool -
Property Type Description
userid short -
canbuy bool -

This event has no additional payload properties.

Property Type Description
userid short -
hasbomb bool -
isplanted bool -
Property Type Description
userid short -
hasbomb bool -
isplanted bool -
Property Type Description
userid short -
Property Type Description
userid short -
Property Type Description
userid short -
Property Type Description
userid short -
Property Type Description
userid short -
Property Type Description
userid short -

Description: sent before all other round restart actions

This event has no additional payload properties.

Description: sent after all other round restart actions

This event has no additional payload properties.

Property Type Description
timelimit long round time limit in seconds
fraglimit long frag limit in seconds
objective string round objective
Property Type Description
winner byte winner team/user id
reason byte reason why team won
message string end round message
legacy byte server-generated legacy value
player_count short total number of players alive at the end of round, used for statistics gathering, computed on the server in the event client is in replay when receiving this message
nomusic byte if set, don’t play round end music, because action is still on-going

Description: Every time a grenade bounces

Property Type Description
userid short -

Description: Every time a hegrenade explodes

Property Type Description
userid short -
entityid short -
x float -
y float -
z float -

Description: Every time a flashbang detonates

Property Type Description
userid short -
entityid short -
x float -
y float -
z float -

Description: Every time a smokegrenade detonates

Property Type Description
userid short -
entityid short -
x float -
y float -
z float -
Property Type Description
userid short -
entityid short -
x float -
y float -
z float -
Property Type Description
userid short -
x float -
y float -
z float -
Property Type Description
userid short -
entityid short -
x float -
y float -
z float -
Property Type Description
userid short -
entityid short -
x float -
y float -
z float -

Description: Every time a tagrenade explodes

Property Type Description
userid short -
entityid short -
x float -
y float -
z float -
Property Type Description
entityid short -
x float -
y float -
z float -
Property Type Description
entityid short -
x float -
y float -
z float -
Property Type Description
entityid short -
x float -
y float -
z float -
Property Type Description
userid short -
entityid short -
x float -
y float -
z float -

Description: Every time a bullet hits something

Property Type Description
userid short -
x float -
y float -
z float -

Description: Every time a player takes a step

Property Type Description
userid short -

Description: Every time a player jumps

Property Type Description
userid short -

Description: Every time a player is blinded by a flashbang

Property Type Description
userid short -
attacker short user ID who threw the flash
entityid short the flashbang going off
blind_duration float -

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

Property Type Description
userid short -
damage float -

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

Property Type Description
entindex long -
userid short -

Description: When the round’s mp_freezetime is up

This event has no additional payload properties.

This event has no additional payload properties.

This event has no additional payload properties.

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

Property Type Description
area long -
blocked bool -

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

This event has no additional payload properties.

Description: Guess: Called when the player stats (achievments) are sent to valve

Property Type Description
forceupload bool -

This event has no additional payload properties.

Property Type Description
userid byte entindex of the player
Property Type Description
userid byte entindex of the player
Property Type Description
oldmode long -
newmode long -
obs_target long -

This event has no additional payload properties.

Property Type Description
show_timer_defend bool -
show_timer_attack bool -
timer_time short -
final_event byte defined in cs_gamerules.h
funfact_token string -
funfact_player short -
funfact_data1 long -
funfact_data2 long -
funfact_data3 long -

This event has no additional payload properties.

This event has no additional payload properties.

This event has no additional payload properties.

Property Type Description
victim short endindex of the one who was killed
killer short entindex of the killer entity
hits_taken short -
damage_taken short -
hits_given short -
damage_given short -

This event has no additional payload properties.

This event has no additional payload properties.

Property Type Description
avenger_id short -
avenged_player_id short -
Property Type Description
player byte entindex of the player
achievement short achievement ID
Property Type Description
achievement short achievement ID
splitscreenplayer short splitscreen ID
Property Type Description
player byte entindex of the player
quality byte quality of the item
method byte method by which we acquired the item
itemdef long the item definition index
itemid long the item id in the players inventory
Property Type Description
player byte entindex of the player who sent the gift
itemdef long the item definition index of the gift that was opened
numgifts byte how many recipients got the gifts in this gift batch
giftidx byte index of recipient in this gift batch (0 for the first recipient, 1 for second, and so on…)
accountid long gift recipient’s account ID
Property Type Description
splitscreenplayer short splitscreen ID
Property Type Description
frags long -
max_rounds long -
win_rounds long -
time long -
Property Type Description
userid short -
reason short -
value long -
musickitmvps long -
nomusic byte -
Property Type Description
userid short -
Property Type Description
full_reset bool is this a full reset of the map
Property Type Description
loc_token string -
duration long -
userid short -

This event has no additional payload properties.

Property Type Description
userid short player who leveled up
weaponrank short -
weaponname string name of weapon being awarded
Property Type Description
userid short player who leveled up
weaponrank short -
weaponname string name of weapon being awarded
Property Type Description
target short player killed
killer short killing player (with the quest)
Property Type Description
userid short player who leveled up
weaponrank short -
weaponname string name of weapon being awarded
Property Type Description
victimid short user ID who died
attackerid short user ID who killed
dominated short did killer dominate victim with this kill
revenge short did killer get revenge on victim with this kill
bonus bool did killer kill with a bonus weapon?
Property Type Description
playerid short user ID who achieved the final gun game weapon
Property Type Description
userid short user ID who achieved the bonus grenade
Property Type Description
numPlayers short number of active players on both T and CT
numSpectators short number of spectators
avg_rank short average rank of human players
numTSlotsFree short -
numCTSlotsFree short -
Property Type Description
playerid short user ID that is currently in the lead
Property Type Description
playerid short user ID that is currently in the lead
Property Type Description
userid short player who will be leveling up

This event has no additional payload properties.

Description: fired when a player runs out of time in trial mode

Property Type Description
slot short player whose time has expired

This event has no additional payload properties.

Property Type Description
userid short -
vote short -
Property Type Description
enable bool -
Property Type Description
action string -
data string -
slot byte -
Property Type Description
userid short user ID on server
type byte -
vote_parameter short -
Property Type Description
userid short user ID who received the c4
Property Type Description
userid short user ID who became a ghost
Property Type Description
userid short user ID who should have round start sounds reset
Property Type Description
userid short user ID of the player banged
Property Type Description
complete short -
Property Type Description
time long -

This event has no additional payload properties.

Property Type Description
userid short -
botid short -
index short -
Property Type Description
userid short user ID of the player
Property Type Description
userid short user ID of the player

Description: used for demos

This event has no additional payload properties.

Property Type Description
userid short -
reason byte 0: team_full
Property Type Description
userid short -
toteam byte -

This event has no additional payload properties.

Property Type Description
next bool -
Property Type Description
local 1 -
eventtype string -
eventdata wstring -

Description: a game event, name may be 32 characters long

Property Type Description
nextlevel string -
mapgroup string -
skirmishmode string -
Property Type Description
player short entindex of the player
category short -
rank short -
Property Type Description
defindex long -
totalrewards long -
accountid long -

This event has no additional payload properties.

Property Type Description
userid short -
success bool -
Property Type Description
userid short -
Property Type Description
userid short -
Property Type Description
userid short -
Property Type Description
userid short -
priority short -
Property Type Description
userid short player entindex
subject short crate entindex
type string type of crate (metal, wood, or paradrop)
Property Type Description
userid short player entindex
type string type of crate (metal, wood, or paradrop)
Property Type Description
userid short player entindex
subject short crate entindex
type string type of crate (metal, wood, or paradrop)
Property Type Description
userid short -
paradrop short -
Property Type Description
entityid short -
Property Type Description
entityid short -
Property Type Description
userid short -
cargo short -
delivered bool -
Property Type Description
userid short -
cargo short -
Property Type Description
global bool -
Property Type Description
global bool -
Property Type Description
userid short player entindex
subject short crate entindex
type string type of crate (metal, wood, or paradrop)
Property Type Description
userid short player userid
Property Type Description
userid short -
Property Type Description
userid short -
Property Type Description
userid short -
Property Type Description
userid short -
entityid short -
x float -
y float -
z float -
urgent bool -
Property Type Description
entityid short -

This event has no additional payload properties.