ItsMods

Full Version: Monitoring every key
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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!
Better use a switch(...)
Heart pussuh Wink
Nyan Cat Likes this.
Does f1, f2... work?
yes they do
Nice one pussuh
Yamato would say OMA tastic job
Wow, this is awesome.
Something I just found out, when you go into a gunship or use an RC-XD these keys get unbind.
Pages: 1 2