Raised This Month: $ Target: $400
 0% 

How Do I Make A TeamMenu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
zombieplague
Veteran Member
Join Date: Apr 2009
Old 03-06-2010 , 05:34   How Do I Make A TeamMenu
Reply With Quote #1

Like for an example amx_teammenu

I want like the menu show all players name just like the code below which make the menu something like this:

Team Menu:

1. John Terrorist <<< Currently they are in
2. Johnny Terrorist
3. Steven Terrorist
4. Mary Counter-Terrorist
5. Wesker Counter-Terrorist
6. Mag Counter-Terrorist
7. Mocho Terrorist
8. Ghost Terrorist

9. Next/Back
10. Which Team Should They Go ? Terrorist | Counter-Terrorist

PHP Code:
public Playerid )
{
    new 
menu menu_create"\Team Menu:""Player_Handler" )
    new 
players32 ], pnumtempid
    
new szName32 ], szTempid10 ]
    
get_playersplayerspnum 
    for( new 
ii<pnumi++ )
    {
        
tempid players]
        
get_user_nametempidszName31 )
        
num_to_strtempidszTempid)
        
menu_additemmenuszNameszTempid)
    }
    
menu_displayidmenu)
}
 
public 
Player_Handleridmenuitem )
{
    if ( 
item == MENU_EXIT )
    {
        
menu_destroymenu )
        return 
PLUGIN_HANDLED
    
}
    new 
data], iName64 ]
    new 
accesscallback
    menu_item_getinfo
menuitemaccessdata,5iName63callback )
    new 
tempid str_to_numdata )
    
cs_set_user_teamtempidCS_TEAM_T )
    
menu_destroymenu )
    return 
PLUGIN_HANDLED


Last edited by zombieplague; 03-07-2010 at 05:35.
zombieplague is offline
 



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 08:43.


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