Raised This Month: $ Target: $400
 0% 

Weapon menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
STr!ker
Senior Member
Join Date: Jun 2009
Location: Germany
Old 04-09-2011 , 11:24   Weapon menu
Reply With Quote #1

Hey world.

I have maked for me a weaponmenu only for the ctīs.

I have the problem, that when they close their menu, they canīt reopen it. It would be great, if someone can make a check, if they have already a weapon from the weapon menu or not. If yes, the canīt reopen the menu. If not, they can reopen the menu.

Another nice idea is, that the weapon menu overwrite all other menus

Here my weapon menu:

PHP Code:
 #include <amxmodx>
 #include <cstrike>
 #include <fun>
 
 #define PLUGINNAME    "WeaponsforCT"
#define VERSION        "0.1b"
#define AUTHOR        "STrike"

 
public plugin_init()
 {
    
register_plugin(PLUGINNAMEVERSIONAUTHOR)
    
register_event"ResetHUD""Event_ResetHUD""be" );
    
register_clcmd"AntiFurien WaffenMenu","WeaponMenuforCt");
 }
public 
Event_ResetHUD(id)
{
    if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
    {
        
WeaponMenuforCt(id)
    }
}
 public 
WeaponMenuforCt(id)
 {
    new 
menu menu_create("\rAntiFurien WaffenMenu:""menu_handler");
   
    
menu_additem(menu"\wak47 + Deagle""1"0);
    
menu_additem(menu"\wM4A1 + Deagle""2"0);
    
menu_additem(menu"\wMP5 Navy + Deagle""3"0);
    
menu_additem(menu"\wXM1014  + Deagle""4"0); 
    
menu_additem(menu"\wM3  + Deagle""5"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:
        {
    
give_item(id"weapon_ak47")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_AK47,90)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
        }
        case 
2:
        {
    
give_item(id"weapon_m4a1")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_M4A1,90)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
        }
        case 
3
        {
    
give_item(id"weapon_mp5navy")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_MP5NAVY,120)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
       }
case 
4
        {
    
give_item(id"weapon_xm1014")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_XM1014,32)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
        }
case 
5
        {
    
give_item(id"weapon_m3")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_M3,32)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
        }
    }

    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
 } 
STr!ker 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 19:58.


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