Raised This Month: $ Target: $400
 0% 

Menu Players HELP


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 07-05-2013 , 06:15   Menu Players HELP
Reply With Quote #1

Hello. So far i got this :
PHP Code:
stock menu_players(idCsTeams:teamskipalivecallback[], title[], any:...)
{
    static 
iname[32], num[5], menumenuname[32]
    
vformat(menunamecharsmax(menuname), title7)
    
menu menu_create(menunamecallback)
    for(
1<= g_MaxClientsi++)
    {
        if(!
is_user_connected(i) || (alive && !is_user_alive(i)) || (skip == i))
            continue

         if(!(
team == CS_TEAM_T || team == CS_TEAM_CT) || ((team == CS_TEAM_T || team == CS_TEAM_CT) && (cs_get_user_team(i) == team)))
        {
            
get_user_name(inamecharsmax(name))
            
num_to_str(inumcharsmax(num))
            
menu_additem(menunamenum0)
        }
    }
    
menu_display(idmenu)

I want to make a parameter on 8th Option. When you choose it, you change the parameter number and different command will be executed on player. Like this :
Code:
new g_Value = 1 // We add to menu on number 8 with its value menu_additem(menu, "Choose Value", 8) // In handler when we press 8 and if g_Value == 1, we change it to 2. public handled(id, menu, item) { // switch between cases case 7: /*8 PRESSED*/ { switch(g_Value): { case 1: g_Value = 2 case 2: g_Value = 3 case 3: g_Value = 1 } }
And so respectively we will do checks later in handler and do execute different cmds on clients :
Code:
public handler(id, menu, item) { // Get info blah blah blah switch(g_Value):{ case 1: // do cmd 1 case 2: // do cmd 2 case 3: // do cmd 3 }
Please help me to do that with my players menu. Please
Podarok 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 06:30.


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