Raised This Month: $ Target: $400
 0% 

Add name into Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DataCore
Junior Member
Join Date: Jun 2014
Old 11-22-2014 , 12:06   Add name into Menu
Reply With Quote #1

Hey all!

I have this code:
PHP Code:
new maxplayers

public plugin_init()

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_clcmd"say /menu","Menu"
    
register_clcmd"say_team /menu","Menu")
    
maxplayers get_maxplayers()

public 
Menu(id

    for(new 
<= maxplayers i++)
{    
    new 
menu menu_create("Menu""Menu_Handler")
    new 
name[32]
    
get_user_nameiname63 )
    
menu_additem(menu"Your name is: %s",name0)

    
menu_setprop(menuMPROP_EXIT0)
    
menu_display(idmenu0)
}  

What is wrong? Name wont appear.
DataCore is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-22-2014 , 12:16   Re: Add name into Menu
Reply With Quote #2

menu_additem does not format strings. You need to use format(ex)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
DataCore
Junior Member
Join Date: Jun 2014
Old 11-22-2014 , 13:19   Re: Add name into Menu
Reply With Quote #3

Can u help me out?
DataCore is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-22-2014 , 13:21   Re: Add name into Menu
Reply With Quote #4

This thread has examples of how to do it
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
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:38.


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