AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   New AMXX Menu System (https://forums.alliedmods.net/showthread.php?t=46364)

Neeeeeeeeeel.- 11-18-2012 18:55

Re: New AMXX Menu System
 
Quote:

Originally Posted by YamiKaitou (Post 1840231)
I wouldn't suggest looking at the ZP code for anybody, it is a nightmare to figure out.

http://www.gamervip.cl/foro/public/s...fault/okay.jpg

:3

fysiks 11-19-2012 20:08

Re: New AMXX Menu System
 
Quote:

Originally Posted by Neeeeeeeeeel.- (Post 1840223)
Join Date: Feb 2009

Join date means nothing. It's just a number.

hornet 04-16-2013 00:01

Re: New AMXX Menu System
 
Emp, if I may make a suggestion, I think it would be a good idea to explain the true purpose of the 3rd parameter in menu_additem(), and then in turn the purpose of menu_item_getinfo(). There's been many posts recently concerning menus where the user has sent the 3rd parameter with just an integer ( in string format ), and seemingly using it as though it's going to be the option number displayed. They then create some arrays and use menu_item_getinfo() in order to retrieve what they don't realise to be, a useless integer, and then start their button check at 1 when it could be started at 0.

ConnorMcLeod 04-16-2013 00:38

Re: New AMXX Menu System
 
It's just a little problem but yes, should be done.
Problem is that many plugins / menus tuts are based on this tutorial, so even if it is changed there, yo gonna keep seeing that usage during a long time.

Emp` 04-16-2013 02:31

Re: New AMXX Menu System
 
Old Quote from 05-22-09


Yes I have known about it for a while (see quote from almost 4 years ago haha). I will change the snippets around a bit when I have some time. I have been meaning to add in some more complex examples that use the data field besides the MultiHandler example.

Also, the Player examples need to be changed to use userid's instead of just the client index.

Another thing I should note (which I see a lot in the Scripting Help section) is that MEXIT_ALL is the default behavior for MPROP_EXIT and is unneeded most of the time.

Lastly, what ConnorMcLeod pointed out, the Callback example should return ITEM_IGNORE because ITEM_ENABLED will override the admin flag in menu_additem.

Does anyone else have any other changes or comments they would like to see?

ConnorMcLeod 04-17-2013 02:20

Re: New AMXX Menu System
 
About key as string info, it is a good point for menu edition, but i don't think it's a big deal to change cases in switch statement, only problem is when you forgot to change it :P

Have made changes to player menu if it can saves you some time, and also have a little more complete player menu snippet.

added flag "a" to get_players and renamed access variable into _access since access in now a amxmisc stock.
Spoiler


Spoiler

hornet 04-18-2013 16:56

Re: New AMXX Menu System
 
Nice work guys, good idea stickying the thread too. However IMO Emp I think the first example ( Basic Menu ) could still do without menu_item_getinfo().

Quote:

for(--iNum; iNum>=0; iNum--)
Connor I think your preferred reverse cycle loop would have confused the average user had it been used in the first post ;)

Emp` 04-18-2013 23:59

Re: New AMXX Menu System
 
Thanks for pointing that out hornet. I revised the examples that don't need menu_item_getinfo.

ConnorMcLeod 04-19-2013 01:34

Re: New AMXX Menu System
 
May be you could put a second exemple with the same basic menu in a static version where you don't have to destroy the menu.

Mrki_Drakula 07-01-2013 17:51

Re: New AMXX Menu System
 
Your Advanced Vote Menu never gives ends and never gives a player 255 health. I can't find the error. Could somebody look for it?


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

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