Jump to content

Recommended Posts

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

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
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

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"];

};

 

  • Like 2

Share this post


Link to post
Share on other sites
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
13 minutes ago, black_hawk_mw2_87 said:

test

 

Hello there black_hawk_mw2_87 !

 

You can check also here :

 

  • Like 1

Share this post


Link to post
Share on other sites
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! 🙂

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×