Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Start AutoRun
- if (vehicle player == player) then {
- if (_dikCode == 0x0B) then {
- if (isNil "AR_active") then {AR_active = false;};
- if (AR_active) exitWith {AR_active = false; _handled = true;};
- If (surfaceiswater (getpos player)) exitWith {AR_active = false; _handled = true;};
- AR_active = true;
- AR_weapon = currentWeapon player;
- AR_animation = switch (true) do {
- case (AR_weapon isEqualTo ""): {"AmovPercMevaSnonWnonDf"};
- case (AR_weapon isEqualTo (primaryWeapon player)): {"AmovPercMevaSlowWrflDf"};
- case (AR_weapon isEqualTo (secondaryWeapon player)): {"AmovPercMevaSlowWrflDf"};
- case (AR_weapon isEqualTo (handgunWeapon player)): {"AmovPercMevaSlowWpstDf"};
- };
- player playMoveNow AR_animation;
- player addEventHandler ["AnimChanged", {
- if((!AR_active) || {!((currentWeapon player) isEqualTo AR_activeWep)})exitWith {
- player removeEventHandler ["AnimChanged", _thisEventHandler];
- AR_weapon = currentWeapon player;
- AR_animation = switch (true) do {
- case (AR_weapon isEqualTo ""): {"AmovPercMstpSnonWnonDnon"};
- case (AR_weapon isEqualTo (primaryWeapon player)): {"AmovPercMstpSlowWrflDnon"};
- case (AR_weapon isEqualTo (secondaryWeapon player)): {"AmovPercMevaSlowWlnrDf"};
- case (AR_weapon isEqualTo (handgunWeapon player)): {"AmovPercMstpSlowWpstDnon"};
- };
- player playMoveNow AR_animation;
- AR_active = false;
- AR_weapon = nil;
- AR_animation = nil;
- };
- player playMove AR_animation;
- }];
- };
- };
- // END Autorun
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement