hey for all,
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#define PLUGIN "Ammo"
#define VERSION "1.0"
#define AUTHOR "Asaf Mazon"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /ammo", "ammo");
}
public ammo(id)
{
new menu = menu_create("Flashbang", "ammo3");
menu_additem(menu, "\wFlashbang", "1", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
return PLUGIN_HANDLED;
}
public ammo3(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, szName,63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
if(user_has_weapon(id, CSW_FLASHBANG, 2))
{
ColorChat(id, NORMAL, "%s You need to drop your^x04 1^x01 of your^x04 Flashbang's^x01 first.", TAG);
return PLUGIN_HANDLED;
}
give_item(id, "weapon_flashbang")
ColorChat(id, NORMAL, "%s You have bought^x04 Flashbang.", TAG);
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
hey someone can to fix me that's ?
i want if i have 2 flashbang its write [need drop 1] and if i'll drop 1 and
press on flashbang its will add me 1.
Thank's.