mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-19 10:02:02 +03:00
added cancel to repair and salvage menus, added message to salvage when player does not, fixed bulk crates selling of weapons and backpacks, Can no longer place vaults on roads or within 50m of trader citys, Added now entering/leaving messages to trader citys, Added kill messages from f0rt and stapo.
20 lines
641 B
Plaintext
20 lines
641 B
Plaintext
private ["_victim", "_attacker","_weapon","_distance"];
|
|
_victim = _this select 0;
|
|
_attacker = _this select 1;
|
|
|
|
if (!isPlayer _victim || !isPlayer _attacker) exitWith {};
|
|
if ((name _victim) == (name _attacker)) exitWith {};
|
|
|
|
_weapon = weaponState _attacker;
|
|
if (_weapon select 0 == "Throw") then {
|
|
_weapon = _weapon select 3;
|
|
} else {
|
|
_weapon = _weapon select 0;
|
|
};
|
|
|
|
_distance = _victim distance _attacker;
|
|
|
|
_victim setVariable["AttackedBy", _attacker, true];
|
|
_victim setVariable["AttackedByName", (name _attacker), true];
|
|
_victim setVariable["AttackedByWeapon", _weapon, true];
|
|
_victim setVariable["AttackedFromDistance", _distance, true]; |