Raised This Month: $ Target: $400
 0% 

How come this menu won't pop up?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
iloverain
Junior Member
Join Date: Jun 2012
Old 06-25-2012 , 15:52   How come this menu won't pop up?
Reply With Quote #1

Well... I have a menu that will get the players alive, team, and skip bots. the team = terrorists. It will give health to terrorists to who ever you select.

Code:
public HMenu(id) {    
    new menu = menu_create ( "\rWee", "menu_handler_2" );

    new players[32], pnum, tempid;

    new szName[32], szTempid[10];

    get_players( players, pnum, "ceh", "TERRORIST" );

    for( new i; i<pnum; i++ )
    {
        tempid = players[i];
    
        get_user_name( tempid, szName, charsmax( szName ) );
        num_to_str( tempid, szTempid, charsmax( szTempid ) );

        menu_additem( menu, szName, szTempid, 0 );

    }

    menu_display( id, menu, 0 );
}
 
public menu_handler_2(id, menu, item) {
    if( item == MENU_EXIT )
    {
        menu_destroy( menu );
        return PLUGIN_HANDLED;
    }

    new data[6], szName[64];
    new access, callback;
    menu_item_getinfo( menu, item, access, data,charsmax( data ), szName,charsmax( szName ), callback );

    new tempid = str_to_num( data );
   
    if ( is_user_alive ( tempid ) ) {
    set_user_health( tempid, 1000 )
 } 

    menu_destroy( menu );
    return PLUGIN_HANDLED;
}
__________________
Just A n00b Learning. ^-^

Last edited by iloverain; 06-25-2012 at 15:54.
iloverain 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:10.


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