Raised This Month: $ Target: $400
 0% 

what's wrong ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
h3llzOr
Member
Join Date: Nov 2011
Old 02-17-2013 , 05:26   what's wrong ?
Reply With Quote #1

hi,
i try to do an an mode with classes, but the menu appear wrong...
picture : http://img841.**************/img841/6082/fysnow0005d.jpg

and code of menu :
PHP Code:
public change_classid )
{
    
    new 
szClassName[MAX_CLASSES+1][64], iposiKeys 0szMenu[512];
    new class[
MAX_CLASSES];

    for ( 
0MAX_CLASSES); i++ )
    {
        
lang_getclassname1idszClassName[i], 63 );
    }

    
pos += formatexszMenu[pos], 512-pos"%L"id"MENU_SELECT_CLASS" );
    
    new 
class_menu=menu_create(szMenu,"_menu_changeclass");

    
pos += formatexszMenu[pos], 512-pos"^n^n" );


    for ( 
0MAX_CLASSESi++ )
    {           
        if ( 
== p_data[id][P_CLASS] - )
        {
            
pos += formatexszMenu[pos], 512-pos"\d%d. %s^n"1szClassName[i] );

            
iKeys |= (1<<i);
        }

        else if ( 
== p_data[id][P_CHANGECLASS] - )
        {
            
pos += formatexszMenu[pos], 512-pos"\r%d. %s^n"1szClassName[i] );

            
iKeys |= (1<<i);
        }
        else
        {
            new 
bool:bAllowRace true;

            if ( 
bAllowRace )
            {
                
pos += formatexszMenu[pos], 512-pos"\w%d. %s^n"1szClassName[i] );

                
iKeys |= (1<<i);
            }
            else
            {
                
pos += formatexszMenu[pos], 512-pos"\d%d. %s^n"1szClassName[i]);
            }
        }
        
        
num_to_str(i, class, 7);
        
menu_additem(class_menu,szMenu,class);

    }

    
iKeys |= (1<<i);

    
menu_setprop(class_menuMPROP_PERPAGE7);
    
menu_setprop(class_menuMPROP_NEXTNAME"Next Page");
    
menu_setprop(class_menuMPROP_BACKNAME"Previous Page");
    
menu_setprop(class_menuMPROP_EXITMEXIT_ALL );

    
menu_display(id,class_menu);
    

    return;
}

public 
_menu_changeclassidmenuitem )
{
    if(
item==MENU_EXIT)
    {
        
menu_destroy(menu);
    }

    new 
iClass;

    if ( 
p_data[id][P_CLASS] != )
    {
        if ( 
iClass != p_data[id][P_CLASS] )
        {
             
client_printidprint_center"%L"id"CENTER_CHANGED_NEXT" );
        }

            
p_data[id][P_CHANGECLASS] = iClass;
        }
        else
        {
            
p_data[id][P_CHANGECLASS] = 0;
        }
    }
    else
    {
        
MW3_SetClassidiClass );
    }

    return 
PLUGIN_HANDLED;


Last edited by h3llzOr; 02-17-2013 at 05:26.
h3llzOr is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 03-06-2013 , 12:24   Re: what's wrong ?
Reply With Quote #2

not needed to use ^n
TheDS1337 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-07-2013 , 02:06   Re: what's wrong ?
Reply With Quote #3

You are trying to mix to different methods of creating menus. Use only one method. Look for the tutorial for "new menus" (which aren't actually "new").
__________________
fysiks is offline
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 21:36.


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