public on_ShowStatus(id)
{
// If miscstats PlayerName option is on do not show this info
new statsHudMessage = get_xvar_num(gPlayerName);
new pid = read_data(2);
new pidrank = g_PlayerRank[pid];
new flags = flags_check();
new name[32];
new color1 = 0, color2 = 0;
new Float:height;
get_user_name(pid, name, 31);
if ( get_user_team(pid) == 1 )
color1 = 255;
else
color2 = 255;
if (flags & ABOVEHEAD)
height=0.35;
else
height=0.60;
if ( g_friend[id] == 1 ) // friend
{
if ( flags && !statsHudMessage )
{
new wpnid = get_user_weapon(pid);
new wpnname[32];
if ( wpnid )
xmod_get_wpnname(wpnid, wpnname, 31);
set_hudmessage(color1, 50, color2, -1.0, height, 1, 0.01, 3.0, 0.01, 0.01);
new hp[2], ap[2];
formatex(hp, charsmax(hp), "%L", id, "TARGET_INFO_HP");
formatex(ap, charsmax(ap), "%L", id, "TARGET_INFO_AP");
if (flags & TEAMRANK)
{
new grankname_pidrank_1[128], grankname_pidrank_2[128];
formatex(grankname_pidrank_2, charsmax(grankname_pidrank_2), "%L", id, gRankName[pidrank]);
formatex(grankname_pidrank_1, charsmax(grankname_pidrank_1), "%L", id, gRankName[pidrank]);
if (flags & STATS)
ShowSyncHudMsg(id, gHudSyncAimInfo, "%s : %s^n%d %s / %d %s / %s", name, grankname_pidrank_1, get_user_health(pid), hp, get_user_armor(pid), ap, wpnname);
else
ShowSyncHudMsg(id, gHudSyncAimInfo, "%s : %s", name, grankname_pidrank_2);
}
else
{
if (flags & STATS)
ShowSyncHudMsg(id, gHudSyncAimInfo, "%s^n%d %s / %d %s / %s", name, get_user_health(pid), hp, get_user_armor(pid), ap, wpnname);
else
ShowSyncHudMsg(id, gHudSyncAimInfo, "%s", name);
}
}
new time = floatround(get_pcvar_float(gPcvarIconTime)*10);
if ( time > 0 )
Create_TE_PLAYERATTACHMENT(id, pid, 55, gSprite[pidrank], time);
}
else if ( flags && !statsHudMessage )
{
if (!((flags & HIDEINVIS) && (g_invis[pid])))
{
set_hudmessage(color1, 50, color2, -1.0, height, 1, 0.01, 3.0, 0.01, 0.01);
new grankname_pidrank_3[128];
formatex(grankname_pidrank_3, charsmax(grankname_pidrank_3), "%L", id, gRankName[pidrank]);
if (flags & ENEMYRANK)
ShowSyncHudMsg(id, gHudSyncAimInfo, "%s : %s", name, grankname_pidrank_3);
else
ShowSyncHudMsg(id, gHudSyncAimInfo, "%s", name);
}
}
}