Raised This Month: $ Target: $400
 0% 

Menu / 0 (exit doesn't dwork)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mifuntm
Senior Member
Join Date: Feb 2008
Location: in space...
Old 06-02-2010 , 13:21   Re: Menu / 0 (exit doesn't dwork)
Reply With Quote #5

PHP Code:
#include <amxmodx>
#define TASK 2376

public plugin_init() {
    
register_plugin("Join menu","0.1","unknown")
}
public 
showmenu(id)
{
    new 
menu=menu_create("Welcome to server","menu_funkcja")
    
menu_additem(menu,"Rules")
    
menu_additem(menu,"Admins")
    
menu_additem(menu,"Commands")
    
menu_additem(menu,"Slot Reservation")
    
menu_setprop(menu,MPROP_EXITNAME,"Exit")
    
menu_display(id,menu)
    return 
PLUGIN_CONTINUE
}
public 
menu_funkcja(id,menu,item)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    

    switch(
item)
    {
        case 
0:show_motd(id,"join_menu/rules.txt","Rules.")
        case 
1:show_motd(id,"join_menu/admins.txt","Admins.")
        case 
2:show_motd(id,"join_menu/commands.txt","Commands.")
        case 
3:show_motd(id,"join_menu/slot.txt","Slot Reservation.")
    }
    if((
item==-3)&&(task_exists(TASK+id)))
    {
        
remove_task(TASK+id)
        
menu_destroy(menu)
    }
    else
        
showmenu(id)
        
    return 
PLUGIN_CONTINUE


With that menu doesn't show up at all!
__________________
Only God can judge me...
Mifuntm 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 05:21.


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