Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Menu
#1
I have fixed the problem so i dont need any more answers.
Thanks SailorMoon















Im trying to mod a quickmenu i have followed this tutorial: http://www.itsmods.com/forum/Thread-Tuto...-Menu.html
But when i have followed the tutorial the menu dosent show up.
Here is the codes
mod_menu.menu: http://pastebin.com/154gErur
mod_menu.gsc: http://pastebin.com/8sbJCDBj
_load.gsc: http://pastebin.com/LnT0f1Gh. Look at row 94.
If you answer please answer clear.
Im a bit noobie.
Reply

#2
Nice one Sokso hope some help Big Grin
Reply

#3
_load is gone and it's for(;Wink not while.
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#4
what do you mean by that can i add you on steam or something Im a bit noobie is the _load.gsc gone?
what do you Mean Big Grin.

Dude but _load is not our problem our problem is where to put self self openMenu( game["SCRIPT NAME HERE"] );
Reply

#5
(04-18-2014, 08:58)hajhaka Wrote: what do you mean by that can i add you on steam or something Im a bit noobie is the _load.gsc gone?
what do you Mean Big Grin.

Dude but _load is not our problem our problem is where to put self self openMenu( game["SCRIPT NAME HERE"] );

game["menuname"] is a custom stuff. ( Look into the _menus.gsc, you will see something like 'game["menu_team"] = "menuname";' )

Firstly, precache the menu by using PrecacheMenu("menu name");
Then, for example, this code will open your menu on F (Activate) key press: -
put 'self thread button1();' to 'OnPlayerSpawned' after 'self waittill("spawned_player");'
Code:
button1()
{
self endon("death");
self endon("disconnect");
for(;;)
{
if(self UseButtonPressed() )
{
self iprintln("menu opened");
self openmenu("menu name");
}

wait .2;
}

}
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#6
+rep SailorMoon
Reply

#7
The code its working but its standing in menu opend in chat and the menu isnt showing up and we want it to be opend on 4 not F.
Here is the updated code
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 opened");
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" );
            }
        }
Reply

#8
You can make custom key handling. ( F1, h, j, v... every character/number ).
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#9
but SailorMoon That one problem but when he get in game we click f but the menu dosent show up it just says menu opened Plz help
Reply

#10
I'm not sure what you're saying but
Code:
game[ "tax" ] = "tutorial_example_menu";
        precacheMenu( game[ "taxtax" ] );

you precache game["taxtax"] when your menu is called game["tax"].
[Image: MaEIQ.png]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  menu problem with making Startune 1 2,438 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,961 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.