Raised This Month: $51 Target: $400
 12% 

Menu doesn't works


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 07-25-2013 , 10:35   Menu doesn't works
Reply With Quote #1

Hi all, I'm trying to make something, but the menu doesn't work, can some one fix it ?
ZP Addons: Achievements
TheDS1337 is offline
iBrazilian
Senior Member
Join Date: May 2011
Old 07-25-2013 , 11:02   Re: Menu doesn't works
Reply With Quote #2

Be specific or detailed to what isn't working..
__________________
Pokemod Season 5 [ |||||||||| Complete]
iBrazilian is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 07-25-2013 , 11:10   Re: Menu doesn't works
Reply With Quote #3

Quote:
Originally Posted by iBrazilian View Post
Be specific or detailed to what isn't working..
menu_Register and menu_Achievements doesn't work
TheDS1337 is offline
iBrazilian
Senior Member
Join Date: May 2011
Old 07-25-2013 , 12:30   Re: Menu doesn't works
Reply With Quote #4

Quote:
Originally Posted by DeagLe.Studio View Post
menu_Register and menu_Achievements doesn't work
Either I'm slow from not sleeping tonight, or menu_Register and menu_Achievements aren't defined in the file.

---------------------------------------------------------------------

EDIT: It's menuRegister and menuAchievements. No underscore on them.

---------------------------------------------------------------------

EDIT 2: let us know if it works.

Code:
public menuRegister(id)
{
    new menu = menu_create("Register Menu", "menuHandleRegister");
    menu_additem(menu, "Login");
    menu_additem(menu, "Register");
    menu_display(id, menu);
    
    menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
    menu_display( id, menu, 0 );
}

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

    switch(item) 
    {
        case 0:
        {
            if (!g_registered[id]) {
                zp_colored_print(id, "%s %L", PLUGIN_PREFIX, id, "NOT_REGISTERED");
                return PLUGIN_CONTINUE;
            }
            client_cmd(id, "messagemode _get_achievement_password");
        }
        case 1:
        {
            if (g_registered[id]) {
                zp_colored_print(id, "%s %L", PLUGIN_PREFIX, id, "ALREADY_REGISTERED");
                return PLUGIN_CONTINUE;
            }
            client_cmd(id, "messagemode _set_achievement_password");
        }
    }
    menu_destroy( menu );
    return PLUGIN_HANDLED;
}

public menuAchievements(id)
{
    new menu = menu_create("Achievements Menu", "menuHandleAchievements");
    menu_additem(menu, "Buy SAPs by APs");
    menu_additem(menu, "Buy APs by SAPs");
    
    menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
    menu_display( id, menu, 0 );
}

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

    new subMenu, i;
    switch (item)
    {
        case 0:
        {
            subMenu = menu_create("Buy SAPs", "menuHandleBuySAPs");
            for (i = 0; i < sizeof g_menuSAPs; i++) menu_additem(subMenu, g_menuSAPs[i][name]);
            menu_display(id, subMenu);
        }
        case 1:
        {
            subMenu = menu_create("Buy APs", "menuHandleBuyAPs");
            for (i = 0; i < sizeof g_menuAPs; i++) menu_additem(subMenu, g_menuAPs[i][name]);
            menu_display(id, subMenu);
        }
    }
    menu_destroy( menu );
    return PLUGIN_HANDLED;
}
__________________
Pokemod Season 5 [ |||||||||| Complete]

Last edited by iBrazilian; 07-25-2013 at 12:39.
iBrazilian is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-25-2013 , 23:13   Re: Menu doesn't works
Reply With Quote #5

Post plugins as attachments. It's really not that hard.
__________________
fysiks is offline
TheDS1337
Veteran Member
Join Date: Jun 2012
Old 07-26-2013 , 06:56   Re: Menu doesn't works
Reply With Quote #6

Quote:
Originally Posted by fysiks View Post
Post plugins as attachments. It's really not that hard.
Sorry, I forget to attach the header file, here what you need:
Attached Files
File Type: inc zombieplague.inc (18.1 KB, 84 views)
File Type: sma Get Plugin or Get Source (zp_addon_achievements.sma - 351 views - 23.2 KB)
TheDS1337 is offline
almat123
Junior Member
Join Date: Oct 2012
Location: Zombie Is My House :)
Old 03-02-2014 , 16:47   Re: Menu doesn't works
Reply With Quote #7

Hmmm Not Hard i can help you with this plaguin. send me massage.
almat123 is offline
Send a message via Skype™ to almat123
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-02-2014 , 17:43   Re: Menu doesn't works
Reply With Quote #8

Quote:
Originally Posted by almat123 View Post
Hmmm Not Hard i can help you with this plaguin. send me massage.
This thread is 7 months old. Also, This forum is for helping people so you can just post what your suggestion or "help" is.
__________________
fysiks 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:41.


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