Skip to main content

Supported Events

As we create a more user-friendly API for server creators - we don't currently support all events. Below is the list of events supported by the latest public version of ResourceMod. Documentation will be developed further over time.

onItemPickup

Triggers when a player or bot picks up an item (or buys it).

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. item_pickup
itemstringtrueItem name i.e. knife
playerPlayertrueThe class of the player who picked up the item
silentbooleantrue
defindexnumbertrue

onClientPutInServer

Triggers when the player has connected to the server and has been registered by the server.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. client_put_in_server
playerPlayertrueThe class of the player who connected

onClientDisconnected

Triggers when the player has been disconnected.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. client_disconnected
playerPlayertrueThe class of the player who disconnected

onClientConnect

Triggers when the player trying to connect. Doesn't work on bots. Can be canceled.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. client_connect
steamIdnumbertrueThe person steamId 32
steamId64stringtrueThe person steamId 64

onClientConnected

Triggers when the player trying to connect. Does work on bots. Can be canceled. Steam id is null if it's a bot.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. client_connected
isBotbooleantrue
steamIdnumber/nulltrueThe person steamId 32
steamId64string/nulltrueThe person steamId 64
ipstringtrueThe person ip address

onPlayerActivate

Triggers when the player finishes connecting.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. player_activate
playerPlayertrue

onPlayerSpawn

Triggers when the player spawned.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. player_spawn
playerPlayertrue

onPlayerChangeTeam

Triggers when the player changes team.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. player_team
playerPlayertrue
teamnumbertrue
oldTeamnumbertrue
becauseDisconnectedbooleantrue
silentbooleantrue

onPlayerHurt

Triggers when the player was hurt (take any damage).

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. player_hurt
playerPlayertrue
attackerPlayer/nulltrue
hpnumbertrueHow much left
armornumbertrueHow much left
weaponstringtrue
damageobject*true
hitGroupnumbertrue

*damage object:

nametyperead-onlydescription
hpnumbertrue
armornumbertrue

onMapShutdown

Triggers when the map ends.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. map_shutdown

onPlayerChat

Triggers when the player sent message in chat.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. player_chat
playerPlayertrue
messagestringtrue
teamOnlybooleantrueTeam only chat or global chat

onGameMessage (not tested)

Map events?

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. game_message
messagestringtrue
targetstringtrue

onMapLoaded

Triggers every time new map loaded.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. map_loaded
mapstringtrue
oldMapstringtrue

onRoundEnd

Triggers every time round ended.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. round_end
winnernumbertrue
reasonnumbertrue
messagestringtrue
legacynumbertrue
playerCountnumbertrue
noMusicnumbertrue

onRoundStart

Triggers every time round started.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. round_start
timeLimitnumbertrue
fragLimitnumbertrue
objectivestringtrue

onFreezeTimeEnded

Triggers every time mp_freezetime is over.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. round_freeze_end

onPlayerDeath

Triggers every time a player or a bot died.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. player_death
assistFlashbooleantrue
weaponstringtrue
weaponItemIdstringtrue
weaponFauxItemIdstringtrue
headshotbooleantrue
dominatednumbertrue
revengenumbertrue
wipenumbertrue
penetratednumbertrue
noReplaybooleantrue
noScopebooleantrue
throughSmokebooleantrue
attackerBlindbooleantrue
distancenumbertrue
playerPlayertrue
attackerPlayer/nulltrue
assisterPlayer/nulltrue

onPlayerFootstep

Triggers on every player footstep.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. player_footstep
playerPlayertrue

onPropBreak

Triggers when spawned entity breaks.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. break_prop
entityIdnumbertrue
playerPlayer/nulltruePlayer who broke an entity

onItemPurchase

Triggers when player purchase an item.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. item_purchase
teamnumbertrue
loadoutnumbertrue
weaponstringtrue
playerPlayertrue

onBombBeginPlant

Triggers on bomb begin plant.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. bomb_beginplant
sitenumbertrue
playerPlayertrue

onBombPlanted

Triggers once bomb planted.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. bomb_planted
sitenumbertrue
playerPlayertrue

onBombDefused

Triggers once bomb defused.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. bomb_defused
sitenumbertrue
playerPlayertrue

onBombExploded

Triggers once bomb exploded.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. bomb_exploded
sitenumbertrue
playerPlayertrue

onBombDropped

Triggers when player drops the bomb.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. bomb_dropped
entityIdnumbertrue
playerPlayertrue

onBombPickup

Triggers when player pickup the bomb.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. bomb_pickup
playerPlayertrue

onDefuserDropped

Triggers when player drop defuse kit.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. defuser_dropped
entityIdnumbertrue

onDefuserPickup

Triggers when player pickup defuse kit. Somehow it won't trigger on CT buys defuse kit.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. defuser_pickup
entityIdnumbertrue

onBeginDefuse

Triggers when player starts defuse the bomb.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. bomb_begindefuse
hasKitbooleantrue
playerPlayertrue

onAbortDefuse

Triggers when player stop defusing the bomb.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. bomb_abortdefuse
playerPlayertrue

onHostageBeginsFollowing

Triggers when hostage begins following player.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. hostage_follows
hostagenumbertrue
playerPlayertrue

onHostageHurt

Triggers on hostage was hurt.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. hostage_hurt
hostagenumbertrue
playerPlayertrue

onHostageRescued

Triggers on hostage has been rescued.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. hostage_rescued
hostagenumbertrue
sitenumbertrue
playerPlayertrue

onHostageStopsFollowing

Triggers on hostage stopped following player (player died for example).

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. hostage_stopsfollowing
hostagenumbertrue
playerPlayertrue

onWeaponFire

Triggers on weapon shoots.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. weapon_fire
weaponstringtrue
silencedbooleantrue
playerPlayertrue

onWeaponReload

Triggers on weapon reload.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. weapon_reload
playerPlayertrue

onWeaponZoom

Triggers on weapon zoom.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. weapon_zoom
playerPlayertrue

onPlayerBlind

Triggers when player got blinded.

Properties

nametyperead-onlydescription
namestringtrueEvent name i.e. player_blind
playerPlayertrue
attackerPlayer/nulltrue
entityIdnumbertrue
blindDurationnumbertrue