AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Player menu (https://forums.alliedmods.net/showthread.php?t=156945)

mati009988 05-14-2011 06:39

Player menu
 
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 158)
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?

SonicSonedit 05-14-2011 08:02

Re: Player menu
 
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.

mati009988 05-14-2011 08:44

Re: Player menu
 
how do I do this?
Names of the players with immunity must be plain text

SonicSonedit 05-14-2011 08:48

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

fysiks 05-14-2011 14:52

Re: Player menu
 
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

mati009988 05-15-2011 04:07

Re: Player menu
 
Quote:

Originally Posted by fysiks (Post 1469351)
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


All times are GMT -4. The time now is 04:25.

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