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

Player menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mati009988
Member
Join Date: Jul 2009
Old 05-14-2011 , 06:39   Player menu
Reply With Quote #1

Hi!
I try to do nonclickable item in menu.
When i add menu addtext replaced error:

Quote:
L 05/14/2011 - 19:25:12: Blanks can only be added after items.
L 05/14/2011 - 19:25:12: [AMXX] Displaying debug trace (plugin "atest5.amxx")
L 05/14/2011 - 19:25:12: [AMXX] Run time error 10: native error (native "menu_addtext")
L 05/14/2011 - 19:25:12: [AMXX] [0] atest5.sma::AwesomeMenu (line 15
PHP Code:
    for( new ii<pnumi++ )
    {
        
tempid players[i];
        
get_user_name(tempidszNamecharsmax(szName));
        
num_to_str(tempidszTempidcharsmax(szTempid));
        if(!(
get_user_flags(tempid) & ADMIN_IMMUNITY)){
            
menu_additem(menuszNameszTempid0);
        } else {
            new 
wyjscie[51]
            
formatex(wyjsciecharsmax(wyjscie), "\d%s \r*"szName
            
menu_addtext(menuwyjscie0)
        }
        
    } 
How to fix it?
mati009988 is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-14-2011 , 08:02   Re: Player menu
Reply With Quote #2

Quote:
L 05/14/2011 - 19:25:12: Blanks can only be added after items.
Quote:
Blanks can only be added after items.
Text=Blanks.
__________________

SonicSonedit is offline
mati009988
Member
Join Date: Jul 2009
Old 05-14-2011 , 08:44   Re: Player menu
Reply With Quote #3

how do I do this?
Names of the players with immunity must be plain text
mati009988 is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-14-2011 , 08:48   Re: Player menu
Reply With Quote #4

mati009988
You have to add something as 1st item, then.
I believe you can use old menu system for this.
__________________

SonicSonedit is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-14-2011 , 14:52   Re: Player menu
Reply With Quote #5

Use callbacks to disable the menu option. Exolent has an excelent post inthe "New AMXX Menu System" tutorial thread about callbacks.

EDIT: http://forums.alliedmods.net/showpos...0&postcount=95
__________________

Last edited by fysiks; 05-14-2011 at 14:57. Reason: Added link.
fysiks is offline
mati009988
Member
Join Date: Jul 2009
Old 05-15-2011 , 04:07   Re: Player menu
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
Use callbacks to disable the menu option. Exolent has an excelent post inthe "New AMXX Menu System" tutorial thread about callbacks.

EDIT: http://forums.alliedmods.net/showpos...0&postcount=95
Thank you. Works
mati009988 is offline
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 10:52.


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