You are viewing a potentially older version of this package. View all versions.
S2Mods-ClientKillCallback-1.0.0 icon

ClientKillCallback

Used as a dependency for other mods, resource for modders.

By S2Mods
Date uploaded 2 years ago
Version 1.0.0
Download link S2Mods-ClientKillCallback-1.0.0.zip
Downloads 9270
Dependency string S2Mods-ClientKillCallback-1.0.0

README

KillCallback

Adds a client sided callback triggered each player kill in the match.


Note:

Thanks to Fifty#8113 and Spoon#1812 as they did most of the work on this, I just put it together and made it into a mod.


For end users:

This alone does nothing but is required for other mods to function.

If another mod listed this one as its dependency, download it!


For modders:

AddCallback_OnPlayerKilled( void functionref( entity victim, entity attacker, int damageSourceId ) callback )

Note: this is triggered each time a player gets killed in a match, not just by the client player. If you only care about client player's kills, simply check if attacker == GetLocalClientPlayer()

Any mods using this should have their priority higher than 1.