I did that but every time i change weapon it looks like clearsync doesnt work and hud is overlapping . It's green and if i switch the weapons fast then hud message starts to become white and ugly.
It looks like previous message didn't dissapear and new one is overlaping it.
tried fadeout 0.0 - no result. It's not logic, i don't understand how the hell such thing can happen.
PHP Code:
#define HUD_TIME 6.0
public plugin_init()
{
set_task(HUD_TIME, "HudDisplay", .flags= "b")
}
public OnItemDeployPost(ent)
{
new id = get_pdata_cbase(ent, 41, 4)
ClearSyncHud(id,g_NewSyncObj)
g_curKills[id] = get_weapon_kills(id);
set_hudmessage(34, 139, 34, 0.02, 0.89, 0, .holdtime = HUD_TIME);
ShowSyncHudMsg(id, g_NewSyncObj, "Current Kills: %d", g_curKills[id]);
}
public HudDisplay()
{
new iPlayers[32]
new iNum, id;
get_players(iPlayers, iNum, "a")
for (new i; i < iNum; i++)
{
id = iPlayers[i];
ClearSyncHud(id,g_NewSyncObj)
set_hudmessage(34, 139, 34, 0.02, 0.89, 0, 0.0, .holdtime = HUD_TIME);
ShowSyncHudMsg(id, g_NewSyncObj, "Current Kills: %d", g_curKills[id]);
}
}