params [
["_unit",objNull,[objNull]],
["_part","",[""]],
["_damage",0,[0]],
["_source",objNull,[objNull]],
["_projectile","",[""]],
["_index",0,[0]]
];
if (!isNull _source && {_source != _unit}) then {
if (side _source isEqualTo west) then {
//晕枪判断
if (currentWeapon _source in ["hgun_P07_snds_F","arifle_SDAR_F","srifle_EBR_F"] && _projectile in ["B_9x21_Ball","B_556x45_dual","20Rnd_762x51_Mag"]) then {
if (alive _unit) then {
if (playerSide isEqualTo civilian && {!life_istazed}) then {
private _distance = 35;
if (_projectile isEqualTo "B_556x45_dual"||_projectile isEqualTo "20Rnd_762x51_Mag") then {_distance = 100};
if (_unit distance _source < _distance) then {
if !(isNull objectParent _unit) then {
if (typeOf (vehicle _unit) isEqualTo "B_Quadbike_01_F") then {
_unit action ["Eject",vehicle _unit];
[_unit,_source] spawn life_fnc_tazed;
};
} else {
[_unit,_source] spawn life_fnc_tazed;
};
};
};
_damage = if (_part isEqualTo "") then {
damage _unit;
} else {
_unit getHit _part;
};
};
};
};
};
[] spawn life_fnc_hudUpdate;
_damage;