SHARE
TWEET

gunMod

Pwner-Actual Mar 19th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // =======================================================================================
  2. // =======================================  SETUP  =======================================
  3. // =======================================================================================
  4. // INSTRUCTIONS
  5. // =======================================================================================
  6. /*
  7.     USAGE   :   Clients only.
  8.    
  9.     PURPOSE :   Perform animation if player modifies his primary weapon.
  10. */
  11. // =======================================================================================
  12. // CLIENTS ONLY
  13. // =======================================================================================
  14. if (!hasInterface) exitWith {};
  15. // =======================================================================================
  16. // ====================================  SCRIPT  =========================================
  17. // =======================================================================================
  18. _wpn = (player getVariable "mySetup") select 0;
  19. _acc = (player getVariable "mySetup") select 1;
  20.  
  21. if      (
  22.             (primaryWeapon player == _wpn)
  23.             &&
  24.             (alive player)
  25.             &&
  26.             (isNull objectParent player)
  27.             &&
  28.             !((player weaponAccessories primaryWeapon player) isEqualTo _acc)
  29.             &&
  30.             (isTouchingGround player)
  31.         )
  32. then    {
  33.         switch (stance player) do {
  34.             case "STAND":
  35.                 {
  36.                 playSound "UAF_mountAcc";
  37.                 [player,"AmovPercMstpSlowWrflDnon_AmovPknlMstpSlowWrflDnon"] remoteExec ["switchMove",[0,-2] select isDedicated];
  38.                 sleep 0.5;         
  39.                 [player,"DismountOptic"] remoteExec ["switchMove",[0,-2] select isDedicated];
  40.                 sleep 4.516;
  41.                 player action ["WeaponOnBack", player];
  42.                 };
  43.             case "PRONE":
  44.                 {              
  45.                 [player,"AmovPpneMstpSrasWrflDnon_AmovPknlMstpSrasWrflDnon"] remoteExec ["switchMove",[0,-2] select isDedicated];
  46.                 sleep 0.512;
  47.                 playSound "UAF_mountAcc";
  48.                 sleep 0.5;
  49.                 [player,"DismountOptic"] remoteExec ["switchMove",[0,-2] select isDedicated];
  50.                 sleep 4.516;
  51.                 player action ["WeaponOnBack", player];
  52.                 };
  53.             case "CROUCH":
  54.                 {      
  55.                 playSound "UAF_mountAcc";
  56.                 sleep 0.5;             
  57.                 [player,"DismountOptic"] remoteExec ["switchMove",[0,-2] select isDedicated];
  58.                 sleep 4.516;
  59.                 player action ["WeaponOnBack", player];
  60.                 };
  61.             };     
  62.         };
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