Raised This Month: $ Target: $400
 0% 

Weapon Menu


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

First of all, I don't know how to explain. So I'll try.

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

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


public 
cmdWeaponMenuid ) { 
        return; 
     
    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_print(idprint_chat"You've just bought a Golden AK."
            } 
        case 
2:  
        { 

                
client_print(idprint_chat"You've just bought a Golden DE.")  
            }
        }  
     
    
menu_destroy(menu)  
    return 
PLUGIN_HANDLED  

So, when a player click "1" he will bought the Golden AK. So as the "2" which is for Golden DE. The buy command for golden ak is /goldenak and for golden de is /goldende. So I don't know what's the code for it. So I hope you could help me. There is a blank line on case 1 and case 2.

So, please help :')
__________________
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:23.


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