Raised This Month: $ Target: $400
 0% 

Menu Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 12-16-2011 , 17:34   Menu Help
Reply With Quote #1

PHP Code:
public Menu(Client)
{
    new 
Title[32]
    
formatex(Title,charsmax(Title),"%L",LANG_SERVER,"MENU TITTLE")
    new 
Users menu_create(Title,"UsersHandler")
    
    new 
Name[32],Tempid[10]
    
    new 
iPlayers[32],iNum
    get_players
(iPlayers,iNum,"ch")
    
    for(new 
iiNumi++)
    {
        if(
iPlayers[i] == Client || is_user_admin(iPlayers[i])) continue 
        
        
get_user_name(iPlayers[i],Name,charsmax(Name))
        
num_to_str(iPlayers[i],Tempid,charsmax(Tempid))
        
        
menu_additem(Users,Name,Tempid,0)
        
menu_setprop(UsersMPROP_BACKNAME"Voltar")
        
menu_setprop(UsersMPROP_NEXTNAME"Proximo")
        
menu_setprop(UsersMPROP_EXITNAME"Sair")  
    }
    
menu_display(Client,Users,0)
    return 
PLUGIN_HANDLED

I need the menu to show only players on the same team.
__________________

Last edited by kramesa; 12-16-2011 at 17:34.
kramesa is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-16-2011 , 18:06   Re: Menu Help
Reply With Quote #2

PHP Code:
public Menu(Client)
{
    new 
Title[32]
    
formatex(Titlecharsmax(Title), "%L"LANG_SERVER"MENU TITTLE")
    new 
pPlayerMenu menu_create(Title"pPlayerMenuHandler")

    new 
Name[32], Tempid[10]

    new 
iPlayers[32], iNumiPlayer
    get_players
(iPlayersiNum"ch")

    for(new 
iiNumi++)
    {
        
iPlayer iPlayers[i]
        if(
iPlayer == Client || is_user_admin(iPlayer) || get_user_team(Client) != get_user_team(iPlayer))
            continue

        
get_user_name(iPlayerNamecharsmax(Name))
        
num_to_str(iPlayerTempidcharsmax(Tempid))

        
menu_additem(pPlayerMenuNameTempid0)
    }

    
menu_setprop(pPlayerMenuMPROP_BACKNAME"Voltar")
    
menu_setprop(pPlayerMenuMPROP_NEXTNAME"Proximo")
    
menu_setprop(pPlayerMenuMPROP_EXITNAME"Sair")

    
menu_display(ClientpPlayerMenu0)
    return 
PLUGIN_HANDLED

I'm guessing your lang key won't work.
__________________

Last edited by fysiks; 12-16-2011 at 18:06.
fysiks is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-16-2011 , 18:18   Re: Menu Help
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
I'm guessing your lang key won't work.
This is just an additional comment. Something that I'm not able to change without seeing the lang file.
__________________

Last edited by fysiks; 12-16-2011 at 18:18.
fysiks is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 12-16-2011 , 18:11   Re: Menu Help
Reply With Quote #4

Ok, but this code show only team of the player started menu, correct?
__________________
kramesa is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 12-16-2011 , 18:49   Re: Menu Help
Reply With Quote #5

Dont works. Dont showing the menu
__________________

Last edited by kramesa; 12-16-2011 at 18:51.
kramesa is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-16-2011 , 18:52   Re: Menu Help
Reply With Quote #6

Quote:
Originally Posted by kramesa View Post
Dont works. Dont showing the menu
Did it work before? What errors did you get? You need to learn to look for this type of information! You are just making it harder for everybody.
__________________
fysiks is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 12-16-2011 , 19:08   Re: Menu Help
Reply With Quote #7

Example: The player 'lol' is on Terrorist. The player 'lol' say: .menu and show menu with only players of your team. You understand?
__________________
kramesa is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-16-2011 , 19:34   Re: Menu Help
Reply With Quote #8

Quote:
Originally Posted by kramesa View Post
Example: The player 'lol' is on Terrorist. The player 'lol' say: .menu and show menu with only players of your team. You understand?
Do you think I'm dumb? That's the third time you've said the same thing. Answer my questions.
__________________

Last edited by fysiks; 12-16-2011 at 19:34.
fysiks is offline
Reply



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 20:49.


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