Raised This Month: $ Target: $400
 0% 

problem with get_pcvar_num in menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mati009988
Member
Join Date: Jul 2009
Old 07-22-2010 , 07:16   problem with get_pcvar_num in menu
Reply With Quote #1

Hi.
I have a problem with get_pcvar_num() in menu.

PHP Code:
public Sklep(id){
    if(!
is_user_alive(id) && get_pcvar_num(alive_only) == 1){
        
ColorChat(idRED"%L"LANG_PLAYER"NO_ALIVE_MENU_MSG"tag
            return 
PLUGIN_HANDLED 
    
}
    if(
get_pcvar_num(shop_on) != 1){     
            
ColorChat(idRED"%L"LANG_PLAYER"SHOP_OFF_MSG"tag
            return 
PLUGIN_HANDLED 
    
}
    new 
szText555 char ];
    
formatexszTextcharsmaxszText ), "%L"LANG_PLAYER"SHOP_NAME_MSG"id );
    new 
menu menu_createszText"sklep_h" );
    
formatexszTextcharsmaxszText ), "%L"LANG_PLAYER"ITEM1_MSG"idget_pcvar_numhpa_koszt ) );
    
menu_additemmenuszText"1");
    
formatexszTextcharsmaxszText ), "%L"LANG_PLAYER"ITEM2_MSG"idget_pcvar_numhpb_koszt ) );
    
menu_additemmenuszText"2");
    
formatexszTextcharsmaxszText ), "%L"LANG_PLAYER"ITEM3_MSG"idget_pcvar_numxpa_koszt ) );
    
menu_additemmenuszText"3");
    
formatexszTextcharsmaxszText ), "%L"LANG_PLAYER"ITEM4_MSG"idget_pcvar_numxpb_koszt ) );
    
menu_additemmenuszText"4");    
    
menu_setpropmenuMPROP_EXITMEXIT_ALL );
    
menu_displayidmenu);
    return 
PLUGIN_CONTINUE;

Code:
ITEM1_MSG = \w50 hp \r[\yCost \r%d\y$\r]
ITEM2_MSG = \w100 hp \r[\yCost \r%d\y$\r]
ITEM3_MSG = \w50 xp \r[\yCost \r%d\y$\r]
ITEM4_MSG = \w100 xp \r[\yCost \r %d\y$\r]
Always a price displayed 1
What I`m doing wrong?
mati009988 is offline
 


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 00:06.


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