Hello
I have a litle problem that i can't solve...
Here is a code
PHP Code:
public PreThink(id)
{
new clip, ammo
new userweapon = get_user_weapon(id, clip, ammo)
if(userweapon == CSW_HEGRENADE && g_Weapon[id])
{
if(!(pev(id,pev_button) & FL_ONGROUND))
{
message_begin(MSG_ONE,iconstatus,{0,0,0},id);
write_byte(1);
write_string("item_healthkit");
write_byte(255);
write_byte(0);
write_byte(0);
message_end();
}
}
}
The problem is that when i change to he grenade the icon show, but after i change to he grenade when i change to other weapon, the icon stil show. I want the icon to show only when user current wepon is he grenade. How can i fixit?