SHARE
TWEET

sasas

a guest Aug 14th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Axt und Pickaxe
  2. if (!melee_swing
  3.     && {_code isEqualTo 0}
  4.     && {_weapon in ["ASN_Melee_Pickaxe", "ASN_Melee_Axe"]}) exitWith {
  5.  
  6.     melee_swing = true;
  7.     private _obj = cursorObject;
  8.  
  9.     player playAction "ASN_Swing_Pickaxe";
  10.  
  11.     if (!isnull _obj
  12.         && {typeOf _obj in ["uLife_Rocks_4","uLife_Rocks_7","uLife_Rocks_5","uLife_Rocks_3","uLife_Rocks","uLife_Rocks_9","a3mt_wood"]}
  13.         && {(getposatl player) distance (getposatl _obj) < 3}
  14.     ) then {
  15.         [_obj] spawn life_fnc_gathermelee;
  16.     } else {
  17.         private _obj = objNull;
  18.         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)}}};
  19.         if !(_objects isEqualTo []) then {
  20.             _obj = _objects # 0;
  21.         };
  22.  
  23.         if (!dialog
  24.             && {!isNull _obj}
  25.             && {alive _obj}
  26.             && {!life_knockout}
  27.             && {!life_istazed}
  28.             && {!life_isknocked}
  29.             && {player distance _obj < 3}
  30.             && {speed _obj < 1}
  31.             && {!((animationState _obj) isEqualTo "Incapacitated")}
  32.         ) then {
  33.             life_knockout = true;
  34.             [_obj] remoteExec ["life_fnc_knockedOut",_obj];
  35.  
  36.             [] spawn {
  37.                 uisleep 3;
  38.                 life_knockout = false;
  39.                 melee_swing = false;
  40.             };
  41.         } else {
  42.             [] spawn {
  43.                 uisleep 1;
  44.                 melee_swing = false;
  45.             };
  46.         };
  47.     };
  48.  
  49.     false
  50. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top