Advertisement
Guest User

Untitled

a guest
Jun 20th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. // Start AutoRun
  2.  
  3. if (vehicle player == player) then {
  4.  
  5. if (_dikCode == 0x0B) then {
  6.  
  7. if (isNil "AR_active") then {AR_active = false;};
  8. if (AR_active) exitWith {AR_active = false; _handled = true;};
  9. If (surfaceiswater (getpos player)) exitWith {AR_active = false; _handled = true;};
  10.  
  11. AR_active = true;
  12. AR_weapon = currentWeapon player;
  13. AR_animation = switch (true) do {
  14. case (AR_weapon isEqualTo ""): {"AmovPercMevaSnonWnonDf"};
  15. case (AR_weapon isEqualTo (primaryWeapon player)): {"AmovPercMevaSlowWrflDf"};
  16. case (AR_weapon isEqualTo (secondaryWeapon player)): {"AmovPercMevaSlowWrflDf"};
  17. case (AR_weapon isEqualTo (handgunWeapon player)): {"AmovPercMevaSlowWpstDf"};
  18. };
  19.  
  20. player playMoveNow AR_animation;
  21.  
  22. player addEventHandler ["AnimChanged", {
  23. if((!AR_active) || {!((currentWeapon player) isEqualTo AR_activeWep)})exitWith {
  24. player removeEventHandler ["AnimChanged", _thisEventHandler];
  25.  
  26. AR_weapon = currentWeapon player;
  27. AR_animation = switch (true) do {
  28. case (AR_weapon isEqualTo ""): {"AmovPercMstpSnonWnonDnon"};
  29. case (AR_weapon isEqualTo (primaryWeapon player)): {"AmovPercMstpSlowWrflDnon"};
  30. case (AR_weapon isEqualTo (secondaryWeapon player)): {"AmovPercMevaSlowWlnrDf"};
  31. case (AR_weapon isEqualTo (handgunWeapon player)): {"AmovPercMstpSlowWpstDnon"};
  32. };
  33.  
  34. player playMoveNow AR_animation;
  35.  
  36. AR_active = false;
  37. AR_weapon = nil;
  38. AR_animation = nil;
  39. };
  40.  
  41. player playMove AR_animation;
  42. }];
  43. };
  44. };
  45.  
  46. // END Autorun
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement