This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

New AMXX Menu System


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 12-06-2014 , 03:35   Re: New AMXX Menu System
Reply With Quote #1

There is any function for check "menu is created"? Before call menu_destroy that would not get error. My current check:
PHP Code:
if(g_voting_menu != 0)
    {
           
menu_destroy(g_voting_menu)
    } 
It's correct? I think better like:
PHP Code:
if(is_menu(g_voting_menu))
    {
           
menu_destroy(g_voting_menu)
    } 
But there is "is_menu"-like function?
Phant is offline
Send a message via ICQ to Phant
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 12-06-2014 , 04:39   Re: New AMXX Menu System
Reply With Quote #2

Such native doesn't exist, anyway it's ok to check if the g_voting_menu is not 0. You may try menu_items(g_voting_menu) and if it return 0, then this menu has no items and it may be destroyed, but you can't be 100% sure.
__________________
HamletEagle is online now
Old 07-19-2015, 07:19
Gh05t04
This message has been deleted by Gh05t04. Reason: No more need
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 07-14-2016 , 10:37   Re: New AMXX Menu System
Reply With Quote #4

PHP Code:
 public plugin_init()
{
    
register_plugin("New Name Menu"0.1"AUTHOR");
    
    
register_clcmd("namemenu""CmDCheckName");
}

public 
CmDCheckName(id)
{
    new 
szName[33]
    
get_user_name(idszNamecharsmax(szName))  
    if(!
equal(szName"Your Name"))
    {
        
client_printc(id"!g[AMXX] !nMenu !gYourName !nONLY !"); // ok
        
return PLUGIN_HANDLED;
    }

    
NewMenu(id);
    
    return 
PLUGIN_HANDLED;

Add a const of name
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |

Last edited by Dr Zayd; 07-14-2016 at 10:37.
Dr Zayd is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 09-23-2016 , 15:20   Re: New AMXX Menu System
Reply With Quote #5

menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
//Note - menu_setprop
//The first parameter is the menu to modify
//The second parameter is what to modify ( found in amxconst.inc )

Wrong, you found these in newmenus.inc i was searching 40 minutes inside of amxconst , fucking hell ))
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-24-2016 , 16:36   Re: New AMXX Menu System
Reply With Quote #6

"Find in files"
Great functions found in most editors. NP++, Sublime, et.c.
__________________
Black Rose is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 09-24-2016 , 20:37   Re: New AMXX Menu System
Reply With Quote #7

Quote:
Originally Posted by Black Rose View Post
"Find in files"
Great functions found in most editors. NP++, Sublime, et.c.
Sorry, i'm using just simple notepad, i realy hate IDE...
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
Old 09-24-2016, 21:00
addons_zz
This message has been deleted by addons_zz. Reason: off topic
Old 09-24-2016, 16:38
addons_zz
This message has been deleted by addons_zz. Reason: off topic
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 10-17-2016 , 09:51   Re: New AMXX Menu System
Reply With Quote #10

Did someone know if that is already implemented on last amxx dev build?

https://bugs.alliedmods.net/show_bug.cgi?id=6002

Thanks.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Reply



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 06:04.


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