Raised This Month: $ Target: $400
 0% 

render and old menu questions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 01-29-2010 , 18:33   Re: render and old menu questions
Reply With Quote #3

ty. and how can i add an item in menu ?

i tried with :

Code:
public player_menu(id)
{
    
    new menu = menu_create("\yChoose the Free-Player", "free_choosed")
    new players[32], pnum
    new szName[32], szTempid[10]
    get_players(players, pnum)
    menu_additem(menu,"\wFreeday for all", "1", 0);
    for( new i; i<pnum;i++ )
    {
        
        tempid = players[i];
        if(get_user_team(tempid) == 1 && is_user_alive(tempid))
        {
            get_user_name(tempid, szName, 31)
            num_to_str(tempid, szTempid, 9)
            menu_additem(menu, szName, szTempid, 0)
        }
    }
    menu_display(id, menu, 0)
}
but idk how to case this in menu function?

Code:
public free_choosed(id,menu,item)
{
    if( item == MENU_EXIT )
    {
        menu_destroy(menu)
        return PLUGIN_HANDLED
    }
    new data[6], iName[64]
    new access, callback
    menu_item_getinfo(menu, item, access, data,5, iName, 63, callback)
    
    tempid = str_to_num(data)
    
    switch(tempid)
    {
        case 1:
        {
            client_print(0,print_chat,"Debug")
        }
        /// what now ? 
        case :
        {
            if( is_user_alive(tempid))
            {
               set_task(0.5,"player_is_free",TASK_PLAYERFREE+tempid,"",0,"b")
                player_menu(id)
            }
        }
    }
    menu_destroy(menu);
    return PLUGIN_HANDLED;
}
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 



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 07:23.


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