Raised This Month: $ Target: $400
 0% 

Help with menu .


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 12-21-2011 , 17:57   Re: Help with menu .
Reply With Quote #1

PHP Code:
if( get_user_flags index ) & ADMIN_KICK ) {
        new 
menu menu_create"Player Menu""warn_handler" )
        
        new 
pnumkey10 ], players32 ]
        
get_playersplayerspnum )
        
        for( new 
ipnumi++ ) {
            new 
tempid players]
            
            
get_user_name tempidszNamecharsmax szName ) )
            
num_to_str tempidkeycharsmax key ) )
            
            
menu_additemmenuszNamekey)
        }
        
menu_displayindexmenu )
        } else {
        
ColorChatindexGREEN"%s^x01 You have to be an admin to do this!"szPrefix )
    } 
This should work
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Splot
Junior Member
Join Date: Nov 2011
Old 12-25-2011 , 10:21   Re: Help with menu .
Reply With Quote #2

Quote:
Originally Posted by Backstabnoob View Post
Code:
menu_display( id, menu, 0 );


=>

Code:
new players[ 32 ], i get_players( players, i ) for( new x = 0; x < i; x ++ ) menu_display( players[ i ], menu, 0 )
its crash my server.

Quote:
Originally Posted by Napoleon_be View Post
PHP Code:
if( get_user_flags index ) & ADMIN_KICK ) {
        new 
menu menu_create"Player Menu""warn_handler" )
        
        new 
pnumkey10 ], players32 ]
        
get_playersplayerspnum )
        
        for( new 
ipnumi++ ) {
            new 
tempid players]
            
            
get_user_name tempidszNamecharsmax szName ) )
            
num_to_str tempidkeycharsmax key ) )
            
            
menu_additemmenuszNamekey)
        }
        
menu_displayindexmenu )
        } else {
        
ColorChatindexGREEN"%s^x01 You have to be an admin to do this!"szPrefix )
    } 
This should work
That's not what I meant.
Splot 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 12:11.


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