hey to all
someone ca fix this plugin pls?
PHP Code:
#include <amxmodx>
#include <cstrike>
#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("Awp", "ammo2");
menu_additem(menu, "\wAwp 1 Bullet", "1", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
return PLUGIN_HANDLED;
}
public ammo2(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);
new awp = cs_get_user_bpammo(id, CSW_AWP)
switch(key)
{
case 1:
{
cs_set_user_bpammo(id, awp + 1)
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
i want if now i have awp its will add me 1 bullet and if i press again its
add me more 1 bullet and if i press it again its will add me more 1 bullet.
Thanks's