Raised This Month: $ Target: $400
 0% 

Weapon Menu Problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
FragOwn
Senior Member
Join Date: Jun 2010
Old 10-14-2010 , 02:08   Weapon Menu Problem
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>

#define PLUGIN    "Weapon Menu"
#define AUTHOR    "??"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /weapon","cmdWeaponMenu");
}
public 
cmdWeaponMenu(id)
{
    new 
menu menu_create("\rSelect your Weapon""menu_handler");
    
menu_additem(menu"Golden Ak47""\y1"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:  
        {  
                
client_cmd(id"say /buy_ak")
                
client_print(idprint_chat"You've just bought a Golden AK."
        }
    }
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

When I press 1, the say /buy_ak didn't showed up. What's the problem? :s
__________________
We can't aim, but we can kill.
FragOwn 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 10:21.


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