15.04.2014, 03:00
here's the usual order of the function calls
OnPlayerWeaponShot
OnPlayerGiveDamage
OnPlayerTakeDamage
although sometimes weaponshot and givedamage can get mixed up, onplayertake damage will be called last
if you have code in givedamage, that is before take damage is called then the player getting shot has not yet been shot
so killing the player in onplayergivedamage will be purely because of the script, do what kar suggested with the tracking of the person that last shot them which could be in onplayerweaponshot and then under onplayerdeath if its an unknown killerid then set it to the last person that shot them
this is not a bug
OnPlayerWeaponShot
OnPlayerGiveDamage
OnPlayerTakeDamage
although sometimes weaponshot and givedamage can get mixed up, onplayertake damage will be called last
if you have code in givedamage, that is before take damage is called then the player getting shot has not yet been shot
so killing the player in onplayergivedamage will be purely because of the script, do what kar suggested with the tracking of the person that last shot them which could be in onplayerweaponshot and then under onplayerdeath if its an unknown killerid then set it to the last person that shot them
this is not a bug