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

@@ -22,7 +22,7 @@ _infected = 0;
if (r_player_infected && DZE_PlayerZed) then { if (r_player_infected && DZE_PlayerZed) then {
_infected = 1; _infected = 1;
}; };
PVDZE_plr_Died = [dayz_characterID,0,_body,_playerID,_infected]; PVDZE_plr_Died = [dayz_characterID,0,_body,_playerID,_infected, dayz_playerName];
publicVariableServer "PVDZE_plr_Died"; publicVariableServer "PVDZE_plr_Died";
_id = [player,20,true,getPosATL player] call player_alertZombies; _id = [player,20,true,getPosATL player] call player_alertZombies;

View File

@@ -671,7 +671,7 @@ if(!isDedicated) then {
dayz_guiHumanity = -90000; dayz_guiHumanity = -90000;
dayz_firstGroup = group player; dayz_firstGroup = group player;
dayz_originalPlayer = player; dayz_originalPlayer = player;
dayz_playerName = "Unknown"; dayz_playerName = name player;
dayz_sourceBleeding = objNull; dayz_sourceBleeding = objNull;
dayz_clientPreload = false; dayz_clientPreload = false;
dayz_authed = false; dayz_authed = false;

View File

@@ -4,7 +4,9 @@ _attacker = _this select 1;
_damage = _this select 2; _damage = _this select 2;
if (!isPlayer _victim || !isPlayer _attacker) exitWith {}; if (!isPlayer _victim || !isPlayer _attacker) exitWith {};
if ((owner _victim) == (owner _attacker)) exitWith {}; if ((owner _victim) == (owner _attacker)) exitWith {
_victim setVariable["AttackedBy", _victim, true];
};
_weapon = weaponState _attacker; _weapon = weaponState _attacker;
if (_weapon select 0 == "Throw") then if (_weapon select 0 == "Throw") then

View File

@@ -5,7 +5,7 @@ _minutes = _this select 1;
_newObject = _this select 2; _newObject = _this select 2;
_playerID = _this select 3; _playerID = _this select 3;
_infected = _this select 4; _infected = _this select 4;
_victimName = name _newObject; _victimName = _this select 5;
_victim = _newObject; _victim = _newObject;
_newObject setVariable ["bodyName", _victimName, true]; _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" // 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. // 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"]; _weapon = _victim getVariable["AttackedByWeapon", "nil"];
_distance = _victim getVariable["AttackedFromDistance", "nil"]; _distance = _victim getVariable["AttackedFromDistance", "nil"];
if (_victimName == _killerName) then if ((owner _victim) == (owner _killer)) then
{ {
_message = format["%1 killed himself",_victimName]; _message = format["%1 killed himself",_victimName];
_loc_message = format["PKILL: %1 killed himself", _victimName]; _loc_message = format["PKILL: %1 killed himself", _victimName];