Raised This Month: $ Target: $400
 0% 

Solved Try to add text to menu.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 04-01-2017 , 02:16   Try to add text to menu.
Reply With Quote #1

i trying to add test like blank but It shows me this weird.
Code:
public OpenMainMenu(Index)
{
    new szKey[3], iMenu = menu_create(g_szMenuTitle, "menuHandler")

    for(new i = 0; i < sizeof(g_szMenuItems) - 1; i += 2)
    {
        formatex(szKey, charsmax(szKey), "%i", i)
        menu_additem(iMenu, g_szMenuItems[i], szKey, 0)
        menu_addtext(iMenu,"test: %d", g_frags[ i ]) // there
    }

    menu_display(Index, iMenu, 0)
    return PLUGIN_HANDLED
}


why 3 times test

Last edited by Fuck For Fun; 04-01-2017 at 07:00.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-01-2017 , 06:30   Re: Try to add text to menu.
Reply With Quote #2

Code:
new szKey[20], iMenu = menu_create(g_szMenuTitle, "menuHandler")

for(new i = 0; i < sizeof(g_szMenuItems); i += 2)
    {
        num_to_str(i, szKey, charsmax(szKey))
        menu_additem(iMenu, g_szMenuItems[i], szKey, 0)
        formatex(szKey, charsmax(szKey)), "test : %d", g_frags[i])
        menu_addtext(iMenu,szKey, 0) // there
    }
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-01-2017 at 06:38.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 04-01-2017 , 07:00   Re: Try to add text to menu.
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
Code:
new szKey[20], iMenu = menu_create(g_szMenuTitle, "menuHandler")

for(new i = 0; i < sizeof(g_szMenuItems); i += 2)
    {
        num_to_str(i, szKey, charsmax(szKey))
        menu_additem(iMenu, g_szMenuItems[i], szKey, 0)
        formatex(szKey, charsmax(szKey)), "test : %d", g_frags[i])
        menu_addtext(iMenu,szKey, 0) // there
    }
thanks anyways bro

alr fixed.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Reply


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 17:56.


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