AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu, show amount error? (https://forums.alliedmods.net/showthread.php?t=129669)

kikifrh 06-15-2010 13:21

Menu, show amount error?
 
Hi guys, I have a plugin that sets Amount[id] to a certain value. But I want, to make in other menu, a menu showing this value.
Menu cmd: bla bla bla ("%s", Amount[id])
it isnt working, how I fix?
thx

drekes 06-15-2010 13:44

Re: Menu, show amount error?
 
new menu or old menu?

kikifrh 06-15-2010 15:23

Re: Menu, show amount error?
 
its a new menu I made.

t3hNox 06-15-2010 15:49

Re: Menu, show amount error?
 
I didn't clearly understand your problem but here might be the solution:
PHP Code:

public MenuThatIsCalled(id)
{
    new 
menuContent[40]
    
formatex(menuContent39"blabl Amount: %d"Amount[id])
    
    new 
menu menu_create(menuContent"menu_handler");

    
menu_additem(menu"One""1"0);
    
menu_additem(menu"Two""2"0);            

    
menu_setprop(menuMPROP_EXITMEXIT_ALL);

    
menu_display(idmenu0);


Note menuContent[40] and formatting.
I believe the same can be done if you want that Amount[id] in menu_additem.

drekes 06-15-2010 16:23

Re: Menu, show amount error?
 
format => formatex


All times are GMT -4. The time now is 14:42.

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