ItsMods
[Tutorial] Monitoring every key - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: [Tutorial] Monitoring every key (/Thread-Tutorial-Monitoring-every-key.html)

Pages: 1 2


Monitoring every key - Pozzuh - 08-07-2011

1. Make a new .gsc file and put this in it. Make sure to thread it and put it in your mod.csv!
Code:
#include maps\mp\_utility; init() { level thread onPlayerConnect(); } onPlayerConnect() { for(;;) { level waittill("connecting", player); player thread onMenuResponse(); } } onMenuResponse() { self endon("disconnect"); for(;;) { self waittill("menuresponse", menu, response); if(response=="button_b") { //add what the button should do here continue; } if(response=="button_p") { //add what the button should do here continue; } //add more buttons in the same way } }
2.Include the following file in your mod: ui_mp/scriptmenus/team_marinesopfor.menu
3.Open the file and search for "onopen" (without the "s).
4.above the line "if(IsInGame())" in the onOpen brackets add:
Code:
execNow "bind2 b openscriptmenu z button_b; bind2 p openscriptmenu z button_p;"; //add more buttons in the same way

Make sure to include everything in your mod.csv and compile your mod.

If you used this give me, Pozzuh, credits.

Good luck!


RE: Monitoring every key - SuperNovaAO - 08-07-2011

Better use a switch(...)


Monitoring every key - Lemon - 08-07-2011

Heart pussuh Wink


RE: Monitoring every key - Yamato - 08-07-2011

Nyan Cat Likes this.


RE: Monitoring every key - Lemon - 08-07-2011

Does f1, f2... work?


RE: Monitoring every key - Pozzuh - 08-07-2011

yes they do


RE: Monitoring every key - AZUMIKKEL - 08-07-2011

Nice one pussuh


RE: Monitoring every key - OrangePL - 08-07-2011

Yamato would say OMA tastic job


RE: Monitoring every key - Lost4468 - 08-08-2011

Wow, this is awesome.


RE: Monitoring every key - Cyborgking - 07-07-2012

Something I just found out, when you go into a gunship or use an RC-XD these keys get unbind.