Author Topic: [Solved] Determining what weapon was used to kill a player  (Read 910 times)

How would I determine what weapon a player used, if any, to kill another player?
« Last Edit: January 28, 2016, 02:02:19 PM by Danny Boy »

Code: [Select]
function Armor::Damage(%data, %obj, %sourceObject, %position, %damage, %damageType)

$damageType_Array[%damageType]
« Last Edit: January 28, 2016, 12:32:26 PM by Dannu »

A more effective way that only happens when they die instead of being damaged....
Code: [Select]
package CheckDeathWeapon
{
function GameConnection::OnDeath(%this,%source,%killer,%type,%location)
{
                bottomPrint(%this,"Killed by a " @ %type @ ",4,true);        
    return Parent::OnDeath(%this,%source,%killer,%type,%location);
}
};  
activatePackage(CheckDeathWeapon);

$damageType_Array[%damageType]
I can work with this. Thanks.