aeroson

for OConnor weapon holster by key

Oct 1st, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. /*_______________________________________
  2. based on: http://www.armaholic.com/page.php?id=30571
  3. paste into init.sqf:
  4. [] execVM "PW_holsterAction.sqf";
  5. __________________________________________*/
  6.  
  7.  
  8. waitUntil {!isNull (findDisplay 46)};
  9.  
  10. (findDisplay 46) displayAddEventHandler ["KeyDown", {
  11. private ["_return"];
  12. _return = false;
  13. if ((_this select 1) in (actionKeys "User16")) then {
  14. if(alive player) then {
  15. if(currentWeapon player != "") then { // we have some weapon drawn
  16. player action ["SWITCHWEAPON", player, player, -1]; // holster the weapon
  17. } else {
  18. player action ["SWITCHWEAPON", player, player, 0]; // switch to primary
  19. };
  20. _return = true;
  21. };
  22. };
  23. _return;
  24. }];
Advertisement
Add Comment
Please, Sign In to add comment