Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Axt und Pickaxe
- if (!melee_swing
- && {_code isEqualTo 0}
- && {_weapon in ["ASN_Melee_Pickaxe", "ASN_Melee_Axe"]}) exitWith {
- melee_swing = true;
- private _obj = cursorObject;
- player playAction "ASN_Swing_Pickaxe";
- if (!isnull _obj
- && {typeOf _obj in ["uLife_Rocks_4","uLife_Rocks_7","uLife_Rocks_5","uLife_Rocks_3","uLife_Rocks","uLife_Rocks_9","a3mt_wood"]}
- && {(getposatl player) distance (getposatl _obj) < 3}
- ) then {
- [_obj] spawn life_fnc_gathermelee;
- } else {
- private _obj = objNull;
- private _objects = (player nearEntities ["man",20]) select {!(_x isEqualTo player) && {isPlayer _x} && {!isObjectHidden _x} && {!(lineIntersects [eyePos player, aimPos _x, player, _x])} && {(player getRelDir _x) <= 15 || {(player getRelDir _x >= 355)}}};
- if !(_objects isEqualTo []) then {
- _obj = _objects # 0;
- };
- if (!dialog
- && {!isNull _obj}
- && {alive _obj}
- && {!life_knockout}
- && {!life_istazed}
- && {!life_isknocked}
- && {player distance _obj < 3}
- && {speed _obj < 1}
- && {!((animationState _obj) isEqualTo "Incapacitated")}
- ) then {
- life_knockout = true;
- [_obj] remoteExec ["life_fnc_knockedOut",_obj];
- [] spawn {
- uisleep 3;
- life_knockout = false;
- melee_swing = false;
- };
- } else {
- [] spawn {
- uisleep 1;
- melee_swing = false;
- };
- };
- };
- false
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement