Raised This Month: $ Target: $400
 0% 

Menu Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dejan
Senior Member
Join Date: Mar 2009
Location: Sweden
Old 09-28-2010 , 08:35   Menu Help
Reply With Quote #1

could anyone help me to fix when some one connects and joined a team then a menu shows up. this wont work.

PHP Code:
public client_putinserver(id)
{
    
ScreenFadeIn(id)
    
mmenu(id)
}

public 
mmenu(id)
{
    new 
Temp[101]
    
formatex(Temp,100"\d%s\y: Main Menu^n\wVisit\r %s"Website)
    new 
menu menu_create(Temp"smenu")
    
menu_additem(menu"\gAgree""1"0);
    
menu_additem(menu"\rDisagree""2"0);
    
menu_additem(menu"\wShow The Rules""3"0);
        
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
    
    if(
menu_destroy(id))
    {
        
ScreenFadeOut(id)
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED

__________________

Last edited by dejan; 09-28-2010 at 09:47.
dejan is offline
Send a message via Skype™ to dejan
Mati_
Member
Join Date: Sep 2010
Old 09-28-2010 , 09:51   Re: Menu Help
Reply With Quote #2

You destroy the menu right after you create it. I think you rather want to destroy it when the user selected "Exit" - so check if "item" equals MENU_EXIT in the menu handling function, and screenfade/destroy the menu there then.

Edit: Actually you are calling menu_destroy with a player ID, which makes no sense.

Last edited by Mati_; 09-28-2010 at 09:55.
Mati_ is offline
Reply



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 08:03.


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