Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Monitoring every key
#1
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!
[Image: MaEIQ.png]
Reply

#2
Better use a switch(...)
Reply

#3
Heart pussuh Wink
Reply

#4
Nyan Cat Likes this.
Reply

#5
Does f1, f2... work?
Reply

#6
yes they do
[Image: MaEIQ.png]
Reply

#7
Nice one pussuh
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply

#8
Yamato would say OMA tastic job
[Image: lQDUjba.jpg]
Reply

#9
Wow, this is awesome.
Reply

#10
Something I just found out, when you go into a gunship or use an RC-XD these keys get unbind.
Would like to make a donation? Click here
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.