Raised This Month: $ Target: $400
 0% 

Formatex


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 04-26-2012 , 17:14   Re: Formatex
Reply With Quote #5

like this?

PHP Code:
#include <amxmodx>

#define PLUGIN    "Test"
#define AUTHOR    "Epic"
#define VERSION    "1.0"

new onoff 0

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /menu""Menu")
}

public 
Menu(id)
{
    new 
menu menu_create("Choose an Option:""Menu_Handler")
    if(!
onoff)
    {
        
menu_additem(menu"Godmode \d[ON/\wOFF]""1"0);
    }
    else if(
onoff)
    {
        
menu_additem(menu"Godmode [ON\d/OFF]""1"0);
    }
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}

public 
Menu_Handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
key str_to_num(data);
    
    switch(
key)
    {
        case 
1
        {
            if(!
onoff)
            {
                
onoff 1
            
}
            else if(
onoff)
            {
                
onoff 0
            
}
        }
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;


Last edited by EpicMonkey; 04-26-2012 at 17:15.
EpicMonkey 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 07:52.


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