ynpMOOSE

Getting weapon that killed a player

4 posts in this topic

Posted (edited)

We do some custom logging of kills, but I'm having trouble with explosive kills.  Currently, the weapon that killed is retrieved using this:

_weapon = currentWeapon _killer;
_weaponTxt = (gettext (configFile >> 'cfgWeapons' >> _weapon >> 'displayName'));
if (vehicle _killer != _killer) then 
	{
	_weaponTxt = (gettext (configFile >> 'cfgVehicles' >> (typeOf vehicle _killer) >> 'displayName'));
	};

If I place a mine and walk away, then you get killed by it 15 minutes later, then weapon is whatever I'm holding at that time, not the mine.

How can I get the "killing" weapon, or the weapon that caused damage last?

Edited by ynpMOOSE

Share this post


Link to post
Share on other sites

Posted (edited)

This is because the weapon you're having trouble tracking isn't a weapon.  It's a vehicle. 

I have a stats page I'm releasing soon and I had the same issue.  I decided to generalize the explosive used because of the same issue you're describing.  It's a pain to track.

http://www.choppra.net to see images of my stats site.

 

Edited by Choppra
2 people like this

Share this post


Link to post
Share on other sites
Advertisement

Will you be releasing it as a separate post on the forum or replying here? I'm interested in using it.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.