Raised This Month: $ Target: $400
 0% 

Admin Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
suundz
Junior Member
Join Date: Oct 2012
Location: Sweden, Bollnäs
Old 12-21-2014 , 23:59   Admin Menu
Reply With Quote #1

So I'm trying to make an admin menu and I want to start of with the once I think is hard, slay/slap and mute/gag, when they are done I can do the switching on transfer and such myself

Mute = Voice_chat
Gag = Text_Chat

If you dont understand tell me to explain better and I'll do my very best, thanks in advance!

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "AdminMenu"
#define VERSION "1.0"
#define AUTHOR "CAKE"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("/ftam""ShowMenu"ADMIN_BAN"Admin menu");
}

public 
ShowMenu(idlvlcid)
{
    if(!
cmd_access(idlvlcid0))
        return 
PLUGIN_HANDLED;

    new 
menu menu_create(`"\r[FT] \wAdmin-Menu^n\yMain Menu", "MainMenu_Handler");

    menu_additem(menu, "\wSlay\y/\wSlap", "", 0);
    menu_additem(menu, "\wKick", "", 0);
    menu_additem(menu, "\wTransfer", "", 0);
    menu_additem(menu, "\wMute\y/\wGag", "", 0);

    menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
    menu_display(id, menu, 0);
    return PLUGIN_HANDLED;
}

public MainMenu_Handler(id, menu, item)
{
    if(item == MENU_EXIT)
    {
        menu_cancel(id);
        return PLUGIN_HANDLED;
    }
    
    new command[6], name[64], access, callback;
    menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);

    switch(item)
    {
        case 0:
        {
                        // Should lead to another menu
            // Number one menuitem should be able to switch between slay and slap
                        // Number 2, 3, 4 etc should be players including yourself
        }
        case 1:
        {
            
        }
        case 2:
        {
            client_print(id, print_chat, "You have selected Transfer");
        }
        case 3:
        {
            // Should lead to another menu
                        // Number one menuitem should be able to switch between mute and gag
                        // Number 2, 3, 4 etc should be players

        }
    }

    menu_destroy(menu);
    return PLUGIN_HANDLED;

suundz is offline
Send a message via Skype™ to suundz
 



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 15:31.


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