mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 09:10:27 +03:00
Updated Death system
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
private ["_characterID","_minutes","_newObject","_playerID","_infected","_victim","_victimName","_killer","_killerName","_weapon","_distance","_message","_loc_message","_key","_death_record"];
|
||||
private ["_characterID","_minutes","_newObject","_playerID","_victim","_victimName","_killer","_killerName","_weapon","_distance","_message","_loc_message","_key","_death_record"];
|
||||
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
|
||||
_characterID = _this select 0;
|
||||
_minutes = _this select 1;
|
||||
_newObject = _this select 2;
|
||||
_playerID = _this select 3;
|
||||
_infected = _this select 4;
|
||||
_victimName = name _newObject;
|
||||
|
||||
_victim = _newObject;
|
||||
@@ -20,23 +19,23 @@ if (_killerName != "nil") then
|
||||
_weapon = _victim getVariable["AttackedByWeapon", "nil"];
|
||||
_distance = _victim getVariable["AttackedFromDistance", "nil"];
|
||||
|
||||
if (_victimName == _killerName) then
|
||||
if (_victimName == _killerName) then
|
||||
{
|
||||
_message = format["%1 killed himself",_victimName];
|
||||
_loc_message = format["PKILL: %1 killed himself", _victimName];
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
_message = format["%1 was killed by %2 with weapon %3 from %4m",_victimName, _killerName, _weapon, _distance];
|
||||
_loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
|
||||
};
|
||||
|
||||
diag_log _loc_message;
|
||||
|
||||
|
||||
if(DZE_DeathMsgGlobal) then {
|
||||
[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
|
||||
};
|
||||
/* needs customRemoteMessage
|
||||
/* needs customRemoteMessage
|
||||
if(DZE_DeathMsgGlobal) then {
|
||||
customRemoteMessage = ['globalChat', _message, _killer];
|
||||
publicVariable "customRemoteMessage";
|
||||
@@ -76,22 +75,22 @@ if (isnil "dayz_disco") then {
|
||||
// dayz_disco = dayz_disco - [_playerID];
|
||||
_newObject setVariable["processedDeath",diag_tickTime];
|
||||
|
||||
if (typeName _minutes == "STRING") then
|
||||
if (typeName _minutes == "STRING") then
|
||||
{
|
||||
_minutes = parseNumber _minutes;
|
||||
};
|
||||
|
||||
diag_log ("PDEATH: Player Died " + _playerID);
|
||||
|
||||
if (_characterID != "0") then
|
||||
if (_characterID != "0") then
|
||||
{
|
||||
_key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected];
|
||||
_key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,0];
|
||||
#ifdef DZE_SERVER_DEBUG_HIVE
|
||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
#endif
|
||||
_key call server_hiveWrite;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
deleteVehicle _newObject;
|
||||
};
|
||||
Reference in New Issue
Block a user