Skip to content

S2ymi/R2NS-ClientKillCallback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

R2NS-ClientKillCallback

AddClientCallback_OnPlayerKilled ( void functionref ( ObituaryCallbackParams {entity victim, entity attacker, int damageSourceId, int scriptDamageType} ) customCallback)

With the new update made by Uniboi, the arguments of current callbacks need to be replaced with an ObituaryCallbackParams struct.
The struct currently contains:

  • entity attacker
  • entity victim
  • int damageSourceId
  • int scriptDamageType
  • bool victimIsOwnedTitan

Example:

void function afterClientInit(){
    AddCallback_OnPlayerKilled ( myCallbackFunction )
}

void function myCallbackFunction ( ObituaryCallbackParams inputParams ) {
    if(inputParams.attacker == GetLocalClientPlayer() && DamageSourceIDToString(inputParams.damageSourceId) == "mp_weapon_sniper")
        thread myOnKillFunction()
}

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 inputParams.attacker == GetLocalClientPlayer()

About

Dependency for other mods on the Northstar Launcher

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •