Fix death messages

This commit is contained in:
icomrade
2014-06-09 13:01:56 -04:00
parent 92b942757d
commit b144c7dce6
4 changed files with 8 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ _minutes = _this select 1;
_newObject = _this select 2;
_playerID = _this select 3;
_infected = _this select 4;
_victimName = name _newObject;
_victimName = _this select 5;
_victim = _newObject;
_newObject setVariable ["bodyName", _victimName, true];
@@ -15,12 +15,12 @@ _killerName = _victim getVariable["AttackedByName", "nil"];
// when a zombie kills a player _killer, _killerName && _weapon will be "nil"
// we can use this to determine a zombie kill && send a customized message for that. right now no killmsg means it was a zombie.
if (_killerName != "nil") then
if ((typeName _killer) != "STRING") then
{
_weapon = _victim getVariable["AttackedByWeapon", "nil"];
_distance = _victim getVariable["AttackedFromDistance", "nil"];
if (_victimName == _killerName) then
if ((owner _victim) == (owner _killer)) then
{
_message = format["%1 killed himself",_victimName];
_loc_message = format["PKILL: %1 killed himself", _victimName];