Raised This Month: $ Target: $400
 0% 

Weapon Menu Problem


Post New Thread Reply   
 
Thread Tools Display Modes
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
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-14-2010 , 03:28   Re: Weapon Menu Problem
Reply With Quote #2

PHP Code:
    menu_additem(menu"Golden Ak47""\y1"0); 
That won't change the menu color for the numbers, and it is what is causing your problem.
Remove the color from that and it will work.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 10:21.


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