Raised This Month: $32 Target: $400
 8% 

Menu command dosen't work..why ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
At3u
Member
Join Date: Feb 2013
Location: On the Moon
Old 05-29-2013 , 17:59   Menu command dosen't work..why ?
Reply With Quote #1

i quit this plugin

Last edited by At3u; 06-07-2013 at 03:36.
At3u is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-29-2013 , 18:02   Re: Menu command dosen't work..why ?
Reply With Quote #2

why don't you use the new menu system? (click my sig for tool)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-29-2013 , 18:10   Re: Menu command dosen't work..why ?
Reply With Quote #3

because in old menu style key 0 is option 9, key 1 option 1, key 2 option 2 etc...
.Dare Devil. is offline
At3u
Member
Join Date: Feb 2013
Location: On the Moon
Old 05-29-2013 , 18:59   Re: Menu command dosen't work..why ?
Reply With Quote #4

Quote:
Originally Posted by v3x View Post
why don't you use the new menu system? (click my sig for tool)
So how i add my above options here :

Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
register_plugin("My Menu", "1.0", "Me");
register_clcmd("", "ShowMenu", _, "");
}

public ShowMenu(id)
{
new menu = menu_create("GiftsMenu", "Winner Team");


menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER);

menu_display(id, menu, 0);

return PLUGIN_HANDLED;
}

public Winner Team(id, menu, item)
{
new command[6], name[64], access, callback;

menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

switch(item)
{
}

menu_destroy(menu);

return PLUGIN_HANDLED;
}
Please make an example its my first time making menus.

Last edited by YamiKaitou; 06-03-2013 at 19:42.
At3u is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-29-2013 , 19:37   Re: Menu command dosen't work..why ?
Reply With Quote #5

https://forums.alliedmods.net/showthread.php?t=46364
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-29-2013 , 21:55   Re: Menu command dosen't work..why ?
Reply With Quote #6

I updated my menu generator if you'd like to give it another shot. it's probably the easiest route for you to take.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-30-2013 , 00:46   Re: Menu command dosen't work..why ?
Reply With Quote #7

Old menu is perfectly fine.

Make sure :

- you use MENU_KEY_3 to register keys
- you use register_menucmd + register_menuid (or amxmisc stock register_menu() ).

Also, better to use a switch statement.

Code :
Spoiler



If you prefer to use new menu system, use a static menu, since your menu is not dynamic, so you only build it once and you are done, so in fine it is pretty similar in that case to old menu system.

Code :
Spoiler
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 05-30-2013 , 20:05   Re: Menu command dosen't work..why ?
Reply With Quote #8

use v3k's programme it's easy for use and usefull )
TheDS1337 is offline
At3u
Member
Join Date: Feb 2013
Location: On the Moon
Old 06-03-2013 , 08:55   Re: Menu command dosen't work..why ?
Reply With Quote #9

i quit this plugin

Last edited by At3u; 06-07-2013 at 03:36.
At3u is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-03-2013 , 13:03   Re: Menu command dosen't work..why ?
Reply With Quote #10

Menu strings should be different, or you need to check teams in handlers, else, only 1 handler gonna be effective.

If you change strings a bit, don't forget to update string in register_menucmd.

Also, twin and ctwin pass no index, id gonna always be 0.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-03-2013 at 13:04.
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode