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

New AMXX Menu System


Post New Thread Reply   
 
Thread Tools Display Modes
abbod zakout
New Member
Join Date: Sep 2013
Old 10-16-2013 , 06:55   Re: New AMXX Menu System
Reply With Quote #431

thx , but where to put all these things should we make a file or type it somewhere plz reply
abbod zakout is offline
Old 10-16-2013, 06:56
abbod zakout
This message has been deleted by ConnorMcLeod. Reason: dp
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-16-2013 , 14:09   Re: New AMXX Menu System
Reply With Quote #432

Quote:
Originally Posted by abbod zakout View Post
thx but can u tell me where to put these things or should i type it some where?
Who are you talking to and/or what are you talking about?
__________________

Last edited by fysiks; 10-16-2013 at 14:09.
fysiks is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-17-2013 , 00:32   Re: New AMXX Menu System
Reply With Quote #433

Quote:
Originally Posted by abbod zakout View Post
thx , but where to put all these things should we make a file or type it somewhere plz reply
This section is not about scripting/help.
Also, you seems to have no idea about how to make a simple plugin.
This tutorial is for people who already knows how to create a basic plugin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
glhf3000
Member
Join Date: Aug 2010
Location: middle-universe
Old 12-19-2013 , 07:00   Re: New AMXX Menu System
Reply With Quote #434

When i create 2 menus, one after one, first menu handler returns -3 as "item" (normally 0|1)
Code:
public voteMenuHandler( id, iMenu, item )
{

    if ( g_voting == 0 )
    {

        return PLUGIN_HANDLED;
    
    }
    
    server_print( "voteban: %i", item );
    
    g_votes[ item ]++;
    g_voted++;
Menus are in 2 different plugins which have almost the same code.

-3 means that 1st menu is invalid, but i did not destroyed it yet(will be destroyed at voteend).
What can i do with all this? Just stop 1st vote and destroy 1st menu and let second end?

Last edited by glhf3000; 12-19-2013 at 07:01.
glhf3000 is online now
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-19-2013 , 08:28   Re: New AMXX Menu System
Reply With Quote #435

-3 is MENU_EXIT, it is sent because the previous menu was shown and existing, and because you show another menu. So your plugin knows that previous menu should be destroyed (unless your menu is static).
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-19-2013 at 08:28.
ConnorMcLeod is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 12-06-2014 , 03:35   Re: New AMXX Menu System
Reply With Quote #436

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 #437

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 offline
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 #438

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 #439

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 #440

"Find in files"
Great functions found in most editors. NP++, Sublime, et.c.
__________________
Black Rose is offline
Old 09-24-2016, 16:38
addons_zz
This message has been deleted by addons_zz. Reason: off topic
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 13:47.


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