|
Author
|
Message
|
|
Senior Member
Join Date: Jun 2014
Location: israel
|

12-30-2014
, 11:57
Re: Problem with %d
|
#1
|
Quote:
Originally Posted by zmd94
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(szTemp, charsmax(szTemp), "Health Regeneration -- \y%d", g_CCost_Regenerate) menu_additem(menu, szTemp, "1") formatex(szTemp, charsmax(szTemp), "Invisible -- \y%d", g_CCost_Invi) menu_additem(menu, szTemp, "2") formatex(szTemp, charsmax(szTemp), "Health -- \y%d", g_CCost_HP) menu_additem(menu, szTemp, "3") formatex(szTemp, charsmax(szTemp), "Armor -- \y%d", g_CCost_Armor) menu_additem(menu, szTemp, "4") // Other codes. ;) menu_display(id, menu) }
public menu_Handler(id, menu, item) { 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.
|
|
|
|