Getting cvar's num
Hello, guys!
So I have a menu and some cvars. I was wondering how can the text in the menus get_pcvar_num(mycvar). Here is what I want: menu_additem(menu, "\wMoney Cost - %s$", "1", 0); I tried with menu_additem(menu, "\wMoney Cost - %s$", "1", 0, get_pcvar_num(mycvar)); but it didnt compile. Help please! |
Re: Getting cvar's num
new temp[65]
formatex(temp, 64, "\wMoney Cost - %s$", get_pcvar_num(mycvar)) menu_additem(menu, temp, "1", 0) |
Re: Getting cvar's num
Thanks man!
|
Re: Getting cvar's num
Use %d for numbers ! %s is for strings, %f for float, and search for the rest if you're curious.
Also, if you want to know if a function accepts format parameters, search it on funcwiki and see it's accepted arguments, usually indicated by "..." like here: http://www.amxmodx.org/funcwiki.php?go=func&id=22 |
Re: Getting cvar's num
I like to search for "printf" @ cplusplus.com for a general reference. I do the same for fopen too.
|
| All times are GMT -4. The time now is 09:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.