Jump to content
Sign in to follow this  
Squirtman

Locking attachments to weapons?

Recommended Posts

I'm working on a project and one of the things I want to implement is removing the ability to change the attachments that are on a weapon. For instance if you pick up an MX that has an ACO and a flashlight and then pickup an MX that has a suppressor I don't want players to be able to take the suppressor off the second one and transfer it to the first one. Does anyone know if this is possible and if it is could you provide an example of how it is done or at least point towards the information I need to make this work.

 

If this is not possible is there at least a way to limit what attachments can go on what weapons.

 

I realize this sounds like a step backwards and in all honesty it is but for what i have in mind certain weapon/attachment combinations would break the balance i am trying to achieve.

 

Thank you in advance for any assistance anyone is willing to provide.

Share this post


Link to post
Share on other sites

Here is a first approach, not working 100% . For example, if you double click on a suitable bipod in a crate, the whole thing begins to fail. No idea why.

But test that anyway. The solution is not too far. I'm confident in controls numbers.

 

0 = [] spawn {
  while {true} do {
   waituntil {!(isnull (finddisplay 602))};  
   {
     ctrlEnable [_x, false];
   } forEach [620,621,622,641];
   waituntil {(isnull (finddisplay 602))};
  };
}; 

 

Share this post


Link to post
Share on other sites

thanks i'll play with it and see what i can figure out

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
Sign in to follow this  

×