Raised This Month: $ Target: $400
 0% 

Call a function in a function ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
iloverain
Junior Member
Join Date: Jun 2012
Old 06-23-2012 , 20:36   Re: Call a function in a function ?
Reply With Quote #3

Code:
public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    register_clcmd ( "say /simon", "SetSimon" )
    register_clcmd ( "say_team /simon", "SetSimon" )
    register_logevent( "Round_End", 2, "1=Round_End" )
    register_clcmd ( "jmod_menu", "EMenu" )
}
Code:
public SetSimon(id) {
    if ( cs_get_user_team( id ) == CS_TEAM_CT ) {
    
    new name[32];
    get_user_name( id, name, charsmax( name ) )
    
    if ( isSimon == true ) {
        client_print( id, print_chat, "Someone is already Simon!" )
    } else {
        client_print( 0, print_chat, "%s is now Simon!", name )
        isSimon = true
        SimonPerson = name
        EMenu( id )   // <------------------------------ no work D:
        }
    } else {
        client_print( id, print_chat, "You are not a CT!" )
    }
}
and my menu which is
Code:
public EMenu(id) {
    new menu = menu_create ( "\rJailBreak Day Menu [iloverain]", "menu_handler" )
    
    menu_additem ( menu, "\wCage Day", "1", 0 )
    menu_additem ( menu, "\wFree Day", "2", 0 )
    menu_additem ( menu, "\wNightCrawler Day [CT]", "3", 0 )
    menu_additem ( menu, "\wNightCrawler Day [T]", "4", 0 )
    menu_additem ( menu, "\wRiot Day", "5", 0 )
    menu_additem ( menu, "\wZombie Day [CT]", "6", 0 )
    menu_additem ( menu, "\wZombie Day [T]", "7", 0 )
    
    menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL )
    
    menu_display ( id, menu, 0 )
    
}
__________________
Just A n00b Learning. ^-^

Last edited by iloverain; 06-23-2012 at 20:39.
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:09.


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