Hey for all
i have some problem in this code
i tried to put in my menu that it will show my my money
and its didn't show
code:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#define PLUGIN "Ammo"
#define VERSION "1.0"
#define AUTHOR "Asaf Mazon"
new g_AlreadyStealth[33];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /ammo", "ammo");
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}
public event_round_start( id )
{
g_AlreadyStealth[id] = 0;
}
public ammo(id)
{
new menu = menu_create("Stealth^n\wShot My Money: \r%d\y$", "ammo3", cs_get_user_money(id));
menu_additem(menu, "\wStealth", "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(g_AlreadyStealth[id] == 1)
{
ColorChat(id, NORMAL, "%s You already bought^x04 Stealth^x01 in this round.", TAG);
return PLUGIN_HANDLED;
}
g_AlreadyStealth[id] = 1;
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 7)
set_task(15.0, "REMOVE")
ColorChat(id, NORMAL, "%s You have bought^x04 Flashbang.", TAG);
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public REMOVE(id)
{
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 250)
}
if someone can tell me how to fix it and that will show my money
that it
Thank's