/* Nomore Grenade  version 0.1.0        Date:05/30/2003  
* 
* 
* (c) Copyright 2003, Coolzsb@21cn.com 
* 
*/ 

#include <amxmod> 


new he[33] 
new flashg[33]
new smoke[33] 

public reset_hud(id) { 
    he[id] = 0
    flashg[id] = 0
    smoke[id] = 0 
    return PLUGIN_CONTINUE
} 

public hebuy(id){ 
    if (he[id]){
        engclient_cmd(id,"menuselect","10") 
        client_print(id,print_center,"You're only allowed to buy an HE") 
    }
    he[id]++
    return PLUGIN_CONTINUE
} 

public flashbuy(id){
    if (flashg[id]>1){
        engclient_cmd(id,"menuselect","10") 
        client_print(id,print_center,"You're only allowed to buy Two flashs") 
    }

    flashg[id]++

    return PLUGIN_CONTINUE
} 

public smokebuy(id){ 
    if (smoke[id]){
        engclient_cmd(id,"menuselect","10") 
        client_print(id,print_center,"You're only allowed to buy a smoke") 
    }
    smoke[id]++
    return PLUGIN_CONTINUE
} 


public plugin_init(){ 
    register_plugin("Nomore Grenade","0.1.0","Coolzsb") 
    register_menucmd(register_menuid("BuyItem"),1<<3,"hebuy") 
    register_menucmd(register_menuid("BuyItem"),1<<2,"flashbuy") 
    register_menucmd(register_menuid("BuyItem"),1<<4,"smokebuy")     
    register_event("ResetHUD", "reset_hud", "b");  
    return PLUGIN_CONTINUE
}
