Raised This Month: $ Target: $400
 0% 

Problem with %d


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 12-30-2014 , 11:57   Re: Problem with %d
Reply With Quote #1

Quote:
Originally Posted by zmd94 View Post
This is an example and also what you should you do with other menu, if you want to show the cost:
Code:
 menu_additem(menu, "Invisible (30sec) (Counter Terrorist) (%d$)", "3", 0, g_invi30);
-->If you still cannot understand, just see below example:
PHP Code:
public iMenu(id
{
    new 
szTemp[101]
    
    new 
menu menu_create("Item Menu \rv4.0""menu_Handler")
    
    
formatex(szTempcharsmax(szTemp), "Health Regeneration -- \y%d"g_CCost_Regenerate)
    
menu_additem(menuszTemp"1")
    
    
formatex(szTempcharsmax(szTemp), "Invisible -- \y%d"g_CCost_Invi)
    
menu_additem(menuszTemp"2")
    
    
formatex(szTempcharsmax(szTemp), "Health -- \y%d"g_CCost_HP)
    
menu_additem(menuszTemp"3")
    
    
formatex(szTempcharsmax(szTemp), "Armor -- \y%d"g_CCost_Armor)
    
menu_additem(menuszTemp"4")
    
    
// Other codes. ;)
    
    
menu_display(idmenu)
}

public 
menu_Handler(idmenuitem
{    
    if(
item == MENU_EXIT
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    switch(
item
    {
        case 
0:
        {
            
// Other codes. ;)
        
}
    }
    
    return 
PLUGIN_HANDLED

i do like u said and now i see like that:
Invisible (30sec) (Counter Terrorist) (145348672$)
GodMode (30sec) (Terrorist) (145348864$)
etc...
ooo and how can i fix this part:
Quote:
new health = get_user_health(id)
new menu = menu_create("(Health And Armor (Health)(Your Hp: %d)) HideNSeek Shop byConstentine ", "shopHnsHealth", health);

Last edited by Eviatar Mor; 12-30-2014 at 11:57.
Eviatar Mor 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 15:29.


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