Raised This Month: $ Target: $400
 0% 

[REQ] Already 2 Flashbang


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Splot
Junior Member
Join Date: Nov 2011
Old 12-24-2011 , 21:27   Re: [REQ] Already 2 Flashbang
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <colorchat>
#include <fun>
 
new const TAG[] = "[YourTag]"

public plugin_init() {    
    
register_plugin("ammo""1.0""Asaf Mazon")    
 
    
register_clcmd("say /ammo""ammo"); 
}  
  
public 
ammo(id) {
    new 
menu menu_create("Flashbang""ammo3");
    
menu_additem(menu"\wFlashbang""1"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
    return 
PLUGIN_HANDLED;
}    

public 
ammo3(idmenuitem
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
 
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5szName,63callback);
 
    new 
key str_to_num(data);
 
    switch(
key)
    {
        case 
1:
        {
            if( 
cs_get_user_bpammo(idCSW_FLASHBANG) == 2) {
                
ColorChat(idNORMAL"%s You need to drop your^x04 1^x01 of your^x04 Flashbang's^x01 first."TAG);
                return 
PLUGIN_HANDLED;
            }
            else {
                
give_itemid"weapon_flashbang" );
                
ColorChat(idNORMAL"%s You have bought^x04 Flashbang."TAG);
            }
        }
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;


Last edited by Splot; 12-24-2011 at 21:37.
Splot 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 11:57.


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