Raised This Month: $ Target: $400
 0% 

Weapon Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Vechta
Veteran Member
Join Date: Jun 2010
Old 10-13-2010 , 03:54   Re: Weapon Menu
Reply With Quote #2

PHP Code:
#include <amxmodx>  

public plugin_init() 
{  
    
register_plugin("Weapon Menu""1.0""? ?")  
    
    
register_clcmd("say /weapon","cmdWeaponMenu") , 
    
register_clcmd("say_team /weapon","cmdWeaponMenu")  
     


public 
cmdWeaponMenuid 

    new 
menu menu_create("\rSelect Weapon:""menu_handler");
    
    
menu_additem(menu"Golden AK""1"0)  
    
menu_additem(menu"Golden DE""2"0)  
    
    
menu_display(idmenu0)  
}  

public 
handleWeaponMenu(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 /goldenak")
            
client_print(idprint_chat"You've just bought a Golden AK."
        } 
        case 
2:  
        { 
            
client_cmd(id"say /goldende")
            
client_print(idprint_chat"You've just bought a Golden DE.")  
        }
    }  
    
menu_destroy(menu)  
    return 
PLUGIN_HANDLED  

?
Vechta 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:23.


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