Hey fellow Coders!

I am trying to code a new mod, which allows to switch to the next gun via key press.

This is the Code I am using.

I want to change the "self sprintButtonPressed() && self jumpButtonPressed()" to be just "self talk(?)ButtonPressed()". So when I press the Talk Button for Voice Chat, the gun changes itself.

Would appreciate any help since I am new to this kind of stuff.

Also: I took this off my MW2 Mod. I know it's not the same for coding but there are similarities.