mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 10:56:29 +03:00
0.87
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.
This commit is contained in:
20
dayz_server/compile/fnc_plyrHit.sqf
Normal file
20
dayz_server/compile/fnc_plyrHit.sqf
Normal file
@@ -0,0 +1,20 @@
|
||||
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];
|
||||
Reference in New Issue
Block a user