Raised This Month: $12 Target: $400
 3% 

New AMXX Menu System


Post New Thread Reply   
 
Thread Tools Display Modes
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 12-28-2007 , 17:57   Re: New AMXX Menu System
Reply With Quote #41

You don't need to make button 8 for that option anyway, make it on button 7 or whatever...Buttons "Next / Back" and "Exit" are maded automaticly.
__________________
Still...lovin' . Connor noob! Hello

Last edited by Alka; 12-28-2007 at 18:55.
Alka is offline
Gizmo
Senior Member
Join Date: May 2006
Location: Sweden
Old 12-28-2007 , 19:13   Re: New AMXX Menu System
Reply With Quote #42

What i want is a switch ban times button in a playermenu (all the players on the server in the menu) so each time i press that button it cycle throu the ban times
and when i want to ban a player and press that players name he shall get banned with the bantime value visible in the menu right then, i hope i make sence here :S
__________________
Gizmo is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 12-29-2007 , 06:07   Re: New AMXX Menu System
Reply With Quote #43

Yeah, but with new amxx menu system is a bit hard...because you can't make a button that stays permanently on bottom of page...like in old style menu, but you already have this on "amxmodmenu" ...default by amxmodx.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Gizmo
Senior Member
Join Date: May 2006
Location: Sweden
Old 12-29-2007 , 09:00   Re: New AMXX Menu System
Reply With Quote #44

I have been helping Lantz on amxbans alot and i was thinking of trying to use the new menus in amxbans.
I know a way to do it.
Playermenu where you select a player and when you press the player a ban time menu appears and when you select a bantime a reson menu appears but i dont like that way to do it
__________________
Gizmo is offline
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 01-02-2008 , 12:29   Re: New AMXX Menu System
Reply With Quote #45

I believe it would be possible to store the ban time in a global variable. When you press the menu button it should cycle through the ban time once and reshow the menu again. If you understand what I mean?
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
JFeldon
Member
Join Date: Feb 2007
Location: United Kingdom
Old 01-04-2008 , 18:34   Re: New AMXX Menu System
Reply With Quote #46

Nice tutorial, helped me. I find this menu system a lot easier, and since I don't often use dynamic menus it's great for me. +Karma ;D
JFeldon is offline
Send a message via MSN to JFeldon
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 01-09-2008 , 08:03   Re: New AMXX Menu System
Reply With Quote #47

Is there any chance of someone explaining / tutorialising the callback stuff?

IIRC you do something fancy with making a callback handle with a function name, and then passing that in, but the bit I don't really get is how to, say, remove options for a player.

If I took the time and trouble I'm sure I could learn this jazz, but I'm fairly sure someone already has, and isn't that the point of Snippets/Tutorials?

Generally I create / destroy a menu every time it is used, but at times it is useful to adjust a menu on the fly.
purple_pixie is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-09-2008 , 09:22   Re: New AMXX Menu System
Reply With Quote #48

Hmm, lemme give you an eg:

Code:
 new Menu = menu_create("\ySome Menu", "MenuHandler");
 new CallBack = menu_makecallback("MenuCallBack"); //Here is the trick.
 
 new Players[32], Num, Name[32];
 get_players(Players, Num, "ch");
 
 for(new i = 0 ; i < Num ; i++)
 {
  get_user_name(Players[i], Name, sizeof Name - 1);
  
  menu_additem(Menu, Name, "", 0, CallBack);
 }
 
 menu_display(id, Menu, 0);
This just make the menu and showit to players with callback option.

Code:
 new iAccess, Name[32], iCallback;
 menu_item_getinfo(menu, item, iAccess, "", 0, Name, sizeof Name - 1, iCallback);
 
 new Target = get_user_index(Name); //Get the menu item name, in ower case is a player name.
 
 return is_user_admin(Target) ? ITEM_ENABLED : ITEM_DISABLED; //Now, if the Target player is an admin, then he will have the item enabled, else disabled.
This is the "MenuCallBack" public. Here we can disable, enable and skip a menu item. ;)
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 01-09-2008 , 10:13   Re: New AMXX Menu System
Reply With Quote #49

And I would use menu_item_setname to screw with their text before showing onscreen?

Funky.

And thankyou.
purple_pixie is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 01-09-2008 , 11:28   Re: New AMXX Menu System
Reply With Quote #50

Quote:
Originally Posted by purple_pixie View Post
And I would use menu_item_setname to screw with their text before showing onscreen?

Funky.

And thankyou.
Yeah, you can do that...oh, and np
__________________
Still...lovin' . Connor noob! Hello
Alka 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 04:31.


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