black_hawk_mw2_87 74 Posted March 22, 2019 Hello, everyone. I have tried an option in a mission where the player can scroll down or up his middle mouse and choose an action to put his main weapon on back. I have found this script that can be placed inside a trigger and when the player is present. it will activate the action: player action ["SwitchWeapon", player, player, 100]; It works the same way in the mission, but how do I get this command/action when I scroll with the mouse? Thanks in advance! Cheers! Share this post Link to post Share on other sites
sarogahtyp 1104 Posted March 22, 2019 addAction adds an action menu Share this post Link to post Share on other sites
black_hawk_mw2_87 74 Posted March 25, 2019 On 3/22/2019 at 6:35 PM, sarogahtyp said: addAction adds an action menu What exactly should I add as an entire script? 1 Share this post Link to post Share on other sites
sarogahtyp 1104 Posted March 25, 2019 you asked a question and got an answer. whats wrong? Also nobody told u to write an "entire" script. I just gave you a link. You remember? EDIT: I think I was totally tired... Share this post Link to post Share on other sites
sarogahtyp 1104 Posted March 26, 2019 9 hours ago, black_hawk_mw2_87 said: What exactly should I add as an entire script? read the wiki, try to code yourself. If that is not working then show your script and possible .rpt errors then you ll get help for sure. Share this post Link to post Share on other sites
Crazy_Man 36 Posted March 26, 2019 Put in the init.sqf if (hasInterface) then { player addAction ["Weapon on back", { player action ["SWITCHWEAPON",player,player,-1]; }, nil, 0, false, true, "", "vehicle _originalTarget == _originalTarget"]; }; 2 Share this post Link to post Share on other sites
black_hawk_mw2_87 74 Posted March 28, 2019 On 3/27/2019 at 1:26 AM, Crazy_Man said: Put in the init.sqf if (hasInterface) then { player addAction ["Weapon on back", { player action ["SWITCHWEAPON",player,player,-1]; }, nil, 0, false, true, "", "vehicle _originalTarget == _originalTarget"]; }; Thank you very much! I will test this ASAP! 🙂 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted March 28, 2019 13 minutes ago, black_hawk_mw2_87 said: test Hello there black_hawk_mw2_87 ! You can check also here : 1 Share this post Link to post Share on other sites
black_hawk_mw2_87 74 Posted March 28, 2019 1 minute ago, GEORGE FLOROS GR said: Hello there black_hawk_mw2_87 ! You can check also here : Thank you for the response. The script above works the way I want! 🙂 1 Share this post Link to post Share on other sites