Get player name before death

Vanilla commit:

3e8c9410c5
This commit is contained in:
ebaydayz
2016-10-13 16:01:55 -04:00
parent 0b9c4a7ade
commit 7044b0095d
3 changed files with 4 additions and 3 deletions

View File

@@ -2,7 +2,6 @@ private ["_pos","_display","_body","_playerID","_array","_source","_method","_is
disableSerialization;
if (deathHandled) exitWith {};
deathHandled = true;
_bodyName = if (alive player) then {name player} else {"unknown"};
//Prevent client freezes
_display = findDisplay 49;
@@ -50,8 +49,8 @@ if (count _this > 0) then {
};
//Send Death Notice
diag_log format["Player_Death: Body:%1 BodyName:%2 Infected:%3 SourceName:%4 SourceWeapon:%5 Distance:%6 Method:%7",_body,_bodyName,_infected,_sourceName,_sourceWeapon,_distance,_method];
PVDZ_plr_Death = [dayz_characterID,0,_body,_playerID,toArray _bodyName,_infected,toArray _sourceName,toArray _sourceWeapon,_distance,toArray _method]; //Send name as array to avoid publicVariable value restrictions
diag_log format["Player_Death: Body:%1 BodyName:%2 Infected:%3 SourceName:%4 SourceWeapon:%5 Distance:%6 Method:%7",_body,dayz_playerName,_infected,_sourceName,_sourceWeapon,_distance,_method];
PVDZ_plr_Death = [dayz_characterID,0,_body,_playerID,toArray dayz_playerName,_infected,toArray _sourceName,toArray _sourceWeapon,_distance,toArray _method]; //Send name as array to avoid publicVariable value restrictions
publicVariableServer "PVDZ_plr_Death";
_id = [player,20,true,getPosATL player] call player_alertZombies;