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)

Exolent[jNr] 04-25-2009 19:20

Re: New AMXX Menu System
 
If player didn't press an item on the menu, then do:
client_cmd(client, "slot1");

hnorgist 04-25-2009 20:15

Re: New AMXX Menu System
 
yes.. good idea =)

fysiks 04-26-2009 00:34

Re: New AMXX Menu System
 
Quote:

Originally Posted by chungkiman (Post 812779)
for example, if i want to adjust the volume of the mic
in the menu, there is a option like that

Volume of Mic 100\50\10\0

you can choose the volume by the way you want.

how to do it - -?

Change it in Options.

Quote:

Originally Posted by hnorgist (Post 814154)
Can't understand if it is possible to destroy menu hud by plugin. When vote stops by timer (some player didn't vote and still have menu on screen), killing the menu doesn't clean player's hud.. Is it really impossible to do?.. description says so:
Code:

/**
 * Destroys a menu.  Player menus will be cancelled (although may still linger on the HUD), and future attempts to access the menu resource will result in an error.
...
 */
native menu_destroy(menu);


I would use classic menus. (Oops, didn't see the next page when I posted)

LaineN 05-16-2009 16:36

Re: New AMXX Menu System
 
Is it possible to check like an if statement if the menu will be enabled (white) or disabled (grey)?

Like:
PHP Code:

menu_additem(menu"Alive""1"is_user_alive); 

That I want to do with that menu is that the menu will be enabled if player is alive and disable if dead. :D

Exolent[jNr] 05-16-2009 16:49

Re: New AMXX Menu System
 
Use a callback.

Code:
ShowMenu(client) {     new menu = menu_create("Alive Menu", "MenuHandle");         new callback = menu_makecallback("MenuCallback");         menu_additem(menu, "Item 1", "1", _, callback);         menu_display(client, menu); } public MenuCallback(client, menu, item) {     new _access, info[3], callback;     menu_item_getinfo(menu, item, _access, info, 2, _, _, callback);         if( str_to_num(info) == 1 )     {         // item 1         return is_user_alive(client) ? ITEM_ENABLED : ITEM_DISABLED;     }         return ITEM_ENABLED; } public MenuHandle(client, menu, item) {     if( item == MENU_EXIT )     {         menu_destroy(menu);         return;     }         new _access, info[3], callback;     menu_item_getinfo(menu, item, _access, info, 2, _, _, callback);     menu_destroy(menu);         if( str_to_num(info) == 1 )     {         // player is alive and chose item #1     } }

LaineN 05-17-2009 14:57

Re: New AMXX Menu System
 
Is it possible to check if a player has a specific menu open?

SnoW 05-17-2009 15:10

Re: New AMXX Menu System
 
Quote:

Originally Posted by LaineN (Post 829458)
Is it possible to check if a player has a specific menu open?

Yes it is, with native player_menu_info. If you want to know how to use it, you can do the search which you should have done before. :crab:

LaineN 05-21-2009 11:46

Re: New AMXX Menu System
 
Off-topic:
Exolent, how are you doing your code tags? :P

Emp` 05-21-2009 12:04

Re: New AMXX Menu System
 
[pawn]

Alka 05-22-2009 06:30

Re: New AMXX Menu System
 
Quote:

Originally Posted by Emp` (Post 831732)
[pawn] hacks



All times are GMT -4. The time now is 11:23.

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