Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Menu
#11
I have changed the code now.
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
init()
{      
        game[ "tax" ] = "tutorial_example_menu";
        precacheMenu( game[ "taxtax" ] );
      
        level thread onPlayerConnect();
}

onPlayerConnect()
{
        while( true )
        {
                level waittill( "connected", player );
                player thread onPlayerSpawned();
        }
}

onPlayerSpawned()
{
        self endon( "disconnect" );
      
        while( true )
        {
                self waittill( "spawned_player" );
                self openMenu( game["tutorial_example_menu"] );
                self thread button1();
                self thread onMenuResponse();
        }
}

button1()
{
self endon("death");
self endon("disconnect");
for(;;)
{
if(self UseButtonPressed() )
{
self iprintln("Menu->Opens");
self openmenu("tutorial_example_menu");
}

wait .2;
}

}

onMenuResponse()
{
        self endon( "death" );
        self endon( "disconnect" );
      
        while( true )
        {
                self waittill( "menuresponse", menu, response );
            
                    if( response == "give_l96a1_mod" )
        {
            self giveWeapon( "l96a1_mp" );
            self switchToWeapon( "l96a1_mp" );
            }
        }
}
SailorMoon can you please explain better how to change the buttons. Im a bit noobie on modding
I have uploaded a screnshot from ingame http://imgur.com/lvTemKj look in left lower corner it says Menu->Opens but the menu dosent open.
Reply

#12
Look at what Pozzuh said + look at this line: self openMenu( game["tutorial_example_menu"] );
Reply

#13
+rep SailorMoon
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  menu problem with making Startune 1 2,439 08-01-2016, 23:22
Last Post: Scuba Steve
  someone know the code for pressing buttom 4 opening menu hajhaka 4 2,779 04-23-2014, 01:33
Last Post: Casper
  Some Menu Problems hajhaka 1 1,962 04-19-2014, 16:49
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

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