mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
+ [CHANGED] Can now fill empty fuel barrels on standard fuel tanks. + [CHANGED] Increased range of crafting from 2m to 3m + [FIXED] Removed repair action from tow truck with VIL_asistvan_DZE + [ADDED] Tow truck VIL_asistvan_DZE can tow vehicles that fit within the bounding box of the model. + [ADDED] Ability for fuel trucks to fill nearby vehicles 30m when engine is running. + [CHANGED] Reworked Epoch events scheduler and made it more accurate. + [REMOVED] Road debris no longer spawn loot, helps with performance and we have added extra loot positions in the world. + and more
83 lines
2.7 KiB
Plaintext
83 lines
2.7 KiB
Plaintext
private["_characterID","_minutes","_newObject","_playerID","_playerName","_infected","_victim","_victimName","_killer","_killerName","_weapon","_distance","_message","_loc_message","_key","_eh","_body","_method","_name"];
|
|
//[unit, weapon, muzzle, mode, ammo, magazine, projectile]
|
|
_characterID = _this select 0;
|
|
_minutes = _this select 1;
|
|
_newObject = _this select 2;
|
|
_playerID = _this select 3;
|
|
_playerName = _this select 4;
|
|
_infected = _this select 5;
|
|
|
|
_victim removeAllEventHandlers "MPHit";
|
|
|
|
_victim = _this select 2;
|
|
_victimName = _victim getVariable["bodyName", "nil"];
|
|
|
|
_killer = _victim getVariable["AttackedBy", "nil"];
|
|
_killerName = _victim getVariable["AttackedByName", "nil"];
|
|
|
|
// when a zombie kills a player _killer, _killerName and _weapon will be "nil"
|
|
// we can use this to determine a zombie kill and send a customized message for that. right now no killmsg means it was a zombie.
|
|
if (_killerName != "nil") then
|
|
{
|
|
_weapon = _victim getVariable["AttackedByWeapon", "nil"];
|
|
_distance = _victim getVariable["AttackedFromDistance", "nil"];
|
|
|
|
if (_victimName == _killerName) then
|
|
{
|
|
_message = format["%1 killed himself",_victimName];
|
|
_loc_message = format["PKILL: %1 killed himself", _victimName];
|
|
}
|
|
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];
|
|
};
|
|
|
|
#ifdef DZE_SERVER_DEBUG_PKILL
|
|
diag_log _loc_message;
|
|
#endif
|
|
|
|
if(DZE_DeathMsgGlobal) then {
|
|
[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
|
|
};
|
|
if(DZE_DeathMsgSide) then {
|
|
[nil, nil, rspawn, [_killer, _message], { (_this select 0) sideChat (_this select 1) }] call RE;
|
|
};
|
|
if(DZE_DeathMsgTitleText) then {
|
|
[nil,nil,"per",rTITLETEXT,_message,"PLAIN DOWN"] call RE;
|
|
};
|
|
|
|
// build array to store death messages to allow viewing at message board in trader citys.
|
|
PlayerDeaths set [count PlayerDeaths,_message];
|
|
|
|
// Cleanup
|
|
_victim setVariable["AttackedBy", "nil", true];
|
|
_victim setVariable["AttackedByName", "nil", true];
|
|
_victim setVariable["AttackedByWeapon", "nil", true];
|
|
_victim setVariable["AttackedFromDistance", "nil", true];
|
|
};
|
|
|
|
dayz_disco = dayz_disco - [_playerID];
|
|
_newObject setVariable["processedDeath",time];
|
|
|
|
if (typeName _minutes == "STRING") then
|
|
{
|
|
_minutes = parseNumber _minutes;
|
|
};
|
|
|
|
if (_characterID != "0") then
|
|
{
|
|
_key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected];
|
|
#ifdef DZE_SERVER_DEBUG_HIVE
|
|
diag_log ("HIVE: WRITE: "+ str(_key));
|
|
#endif
|
|
_key call server_hiveWrite;
|
|
}
|
|
else
|
|
{
|
|
deleteVehicle _newObject;
|
|
};
|
|
|
|
#ifdef DZE_SERVER_DEBUG_PKILL
|
|
diag_log ("PDEATH: Player Died " + _playerID);
|
|
#endif |