mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-18 01:30:26 +03:00
Update new death messages
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
private ["_pos","_display","_body","_playerID","_array","_source","_method","_isBandit","_punishment","_humanityHit","_myKills","_humanity","_kills","_killsV","_myGroup","_model"];
|
||||
private ["_pos","_display","_body","_playerID","_array","_source","_method","_isBandit","_punishment","_humanityHit","_myKills","_humanity","_kills","_killsV","_myGroup","_model","_infected","_distance","_sourceVehicle","_sourceWeapon","_sourceName"];
|
||||
disableSerialization;
|
||||
if (deathHandled) exitWith {};
|
||||
deathHandled = true;
|
||||
@@ -28,29 +28,28 @@ if (dayz_onBack != "") then {
|
||||
*/
|
||||
};
|
||||
_infected = if (r_player_infected && DZE_PlayerZed) then {1} else {0};
|
||||
_killerMethod = "unknown";
|
||||
_killerName = "unknown";
|
||||
_killerWeapon = "unknown weapon";
|
||||
_killerDist = 0;
|
||||
_method = "unknown";
|
||||
_sourceName = "unknown";
|
||||
_sourceWeapon = "";
|
||||
_distance = 0;
|
||||
if (count _this > 0) then {
|
||||
_killerObj = _this select 0;
|
||||
_killerMethod = _this select 1;
|
||||
if (typeName _killerMethod == "OBJECT") exitWith {_killerMethod = "Respawned"};
|
||||
_source = _this select 0;
|
||||
_method = _this select 1;
|
||||
|
||||
if (!isNull _killerObj) then {
|
||||
if (!isNull _body) then {_killerDist = _body distance _killerObj;};
|
||||
_killerVehicle = vehicle _killerObj;
|
||||
_killerWeapon = if (_killerVehicle != _killerObj) then {typeOf _killerVehicle} else {currentWeapon _killerObj};
|
||||
if (alive _killerObj) then {
|
||||
_killerName = if (isPlayer _killerObj) then {name _killerObj} else {localize "STR_EPOCH_AI"};
|
||||
if (!isNull _source) then {
|
||||
if (!isNull _body) then {_distance = round (_body distance _source);};
|
||||
_sourceVehicle = vehicle _source;
|
||||
_sourceWeapon = if (_sourceVehicle != _source) then {typeOf _sourceVehicle} else {currentWeapon _source};
|
||||
if (_sourceWeapon == "Throw") then {_sourceWeapon = (weaponState _source) select 3;};
|
||||
if (alive _source) then {
|
||||
_sourceName = if (isPlayer _source) then {name _source} else {localize "STR_EPOCH_AI"};
|
||||
};
|
||||
};
|
||||
if (count _this > 2) then {_killerMethod = "zombie";};
|
||||
};
|
||||
|
||||
//Send Death Notice
|
||||
diag_log format["Debug death message vars: CharacterID:%1 BodyObject:%3 UID:%4 PlayerName:%5 Infected:%6 KillerName:%7 KillerWeapon:%8 KillerDistance:%9 KillerMethod:%10",dayz_characterID,0,_body,_playerID,_bodyName,_infected,_killerName,_killerWeapon,_killerDist,_killerMethod];
|
||||
PVDZ_plr_Death = [dayz_characterID,0,_body,_playerID,toArray _bodyName,_infected,toArray _killerName,toArray _killerWeapon,_killerDist,toArray _killerMethod]; //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,_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
|
||||
publicVariableServer "PVDZ_plr_Death";
|
||||
|
||||
_id = [player,20,true,getPosATL player] call player_alertZombies;
|
||||
|
||||
@@ -577,6 +577,42 @@ if (!isDedicated) then {
|
||||
_message call _displayText;
|
||||
};
|
||||
|
||||
dayz_killFeed = {
|
||||
private ["_distance","_icon","_message","_playerName","_sourceName"];
|
||||
_playerName = _this select 1;
|
||||
_sourceName = _this select 2;
|
||||
_distance = _this select 4;
|
||||
_icon = _this select 5;
|
||||
if (_icon == "") exitWith {};
|
||||
|
||||
if (diag_ticktime - death_1_time < 10) then {
|
||||
if (time - death_2_time < 10) then {
|
||||
if (time - death_3_time < 10) then {
|
||||
death_4 = death_3;
|
||||
death_4_time = death_3_time;
|
||||
} else {
|
||||
death_4 = "";
|
||||
};
|
||||
death_3 = death_2;
|
||||
death_3_time = death_2_time;
|
||||
} else {
|
||||
death_3 = "";
|
||||
death_4 = "";
|
||||
};
|
||||
death_2 = death_1;
|
||||
death_2_time = death_1_time;
|
||||
} else {
|
||||
death_2 = "";
|
||||
death_3 = "";
|
||||
death_4 = "";
|
||||
};
|
||||
|
||||
death_1 = format["<t size='0.5'>%1</t><img image='%2'/><t size='0.5'> %3 (%4m)</t>",_sourceName,_icon,_playerName,_distance];;
|
||||
death_1_time = diag_ticktime;
|
||||
_message = format ["%1<br />%2<br />%3<br />%4",death_1,death_2,death_3,death_4];
|
||||
[_message,safeZoneX,safeZoneY,10,0,0,8000] call BIS_fnc_dynamicText;
|
||||
};
|
||||
|
||||
dayz_originalPlayer = player;
|
||||
|
||||
// database trader menu
|
||||
|
||||
@@ -324,16 +324,35 @@ if (!isDedicated) then {
|
||||
|
||||
// EPOCH ADDITION
|
||||
"PVDZE_deathMessage" addPublicVariableEventHandler {
|
||||
// do not allow PVDZE_deathMessage in publicvariable.txt, it is only sent from the server machine
|
||||
private "_weapon";
|
||||
_message = _this select 1;
|
||||
_message = switch (_message select 0) do {
|
||||
case "died": {format [localize "str_player_death_died",_message select 1,localize format["str_death_%1",_message select 2]]};
|
||||
case "killed": {
|
||||
_weapon = _message select 3;
|
||||
switch true do {
|
||||
case (isClass (configFile >> "CfgWeapons" >> _weapon)): {
|
||||
_message set [3, getText (configFile >> "CfgWeapons" >> _weapon >> "displayName")];
|
||||
_message set [5, getText (configFile >> "CfgWeapons" >> _weapon >> "picture")];
|
||||
};
|
||||
case (isClass (configFile >> "CfgVehicles" >> _weapon)): {
|
||||
_message set [3, getText (configFile >> "CfgVehicles" >> _weapon >> "displayName")];
|
||||
_message set [5, getText (configFile >> "CfgVehicles" >> _weapon >> "picture")];
|
||||
};
|
||||
default {_message set [5,""]};
|
||||
};
|
||||
if (DZE_DeathMsgDynamicText) then {_message call dayz_killFeed};
|
||||
format [localize "str_player_death_killed",_message select 1,_message select 2,_message select 3,_message select 4]
|
||||
};
|
||||
case "suicide": {format [localize "str_player_death_suicide",_message select 1]};
|
||||
};
|
||||
switch (toLower DZE_DeathMsgChat) do {
|
||||
// Use FunctionsManager logic unit (BIS_functions_mainscope) to send chat messages so no side or quotation marks are shown
|
||||
case "global": {BIS_functions_mainscope globalChat _message;};
|
||||
case "side": {BIS_functions_mainscope sideChat _message;};
|
||||
case "global": {objNull globalChat _message;};
|
||||
case "side": {objNull sideChat _message;};
|
||||
case "system": {systemChat _message;};
|
||||
};
|
||||
if (DZE_DeathMsgCutText) then {_message call dayz_rollingMessages;};
|
||||
if (DZE_DeathMsgDynamicText) then {/* add later */};
|
||||
diag_log format["DeathMessage: %1",_message];
|
||||
};
|
||||
|
||||
// flies and swarm sound sync
|
||||
|
||||
@@ -22,6 +22,15 @@ Message_3 = "";
|
||||
Message_1_time = 0;
|
||||
Message_2_time = 0;
|
||||
Message_3_time = 0;
|
||||
//Kill Feed
|
||||
death_1 = "";
|
||||
death_2 = "";
|
||||
death_3 = "";
|
||||
death_4 = "";
|
||||
death_1_time = 0;
|
||||
death_2_time = 0;
|
||||
death_3_time = 0;
|
||||
death_4_time = 0;
|
||||
|
||||
//OpenTarget timer
|
||||
OpenTarget_Time = 0;
|
||||
|
||||
@@ -13800,48 +13800,26 @@
|
||||
<English>radiation</English>
|
||||
<German>Strahlung</German>
|
||||
<Russian>излучение</Russian>
|
||||
<Spanish>radiación</Spanish>
|
||||
<Czech>záření</Czech>
|
||||
</Key>
|
||||
<Key ID="str_death_crushed">
|
||||
<English>being crushed</English>
|
||||
<German>zerquetscht</German>
|
||||
<Russian>раздавлен</Russian>
|
||||
<Spanish>ser aplastado</Spanish>
|
||||
<French>être écrasé</French>
|
||||
<Czech>rozdrcení</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_death_zombie">
|
||||
<English>%1 was killed by a zombie</English>
|
||||
<German>%1 wurde von einem Zombie getötet.</German>
|
||||
<Russian>%1 был убит зомби</Russian>
|
||||
<Spanish>%1 murió a manos de un zombi</Spanish>
|
||||
<French>%1 a été tué par un zombie</French>
|
||||
<Czech>%1 byl zabit zombie</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_death_suicide">
|
||||
<English>%1 committed suicide</English>
|
||||
<German>%1 Selbstmord</German>
|
||||
<Russian>%1 покончил с собой</Russian>
|
||||
<Spanish>%1 se suicidó</Spanish>
|
||||
<French>%1 suicidé</French>
|
||||
<Czech>%1 spáchal sebevraždu</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_death_message">
|
||||
<Key ID="str_player_death_died">
|
||||
<English>%1 died from %2</English>
|
||||
<German>%1 starb durch %2</German>
|
||||
<Russian>%1 умер от %2</Russian>
|
||||
<Spanish>%1 murió de %2</Spanish>
|
||||
<French>%1 %2 de mort</French>
|
||||
<Czech>%1 zemřelo %2</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_death_killed">
|
||||
<English>%1 was killed by %2 with a %3 from %4m</English>
|
||||
<German>%1 wurde von %2 mit einer %3 von %4m getötet</German>
|
||||
<Russian>%1 был убит игроком %2 с %3 с расстояния %4м</Russian>
|
||||
<Spanish>%1 murió a manos de %2 con un %3 de %4m</Spanish>
|
||||
<French>%1 a été tué par %2 avec un %3 de %4m</French>
|
||||
<Czech>%1 byl zabit %2 na %3 z %4m</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_PITCH_DESERT_TENT">
|
||||
<English>Pitch Desert Dome Tent</English>
|
||||
|
||||
Reference in New Issue
Block a user