Hello, I can help you
I need fixed code
Error is this---ShowSyncHudMsg(id, g_HudSync_SpecInfo, "%L", id, "X_RANK_IS", t_sName, iRankPos, iRankMax)
L 05/17/2015 - 00:16:23: [AMXX] [0] Untitled.sma::eventShowRank (line 1734)
L 05/17/2015 - 00:16:24: HudSyncObject -1 is invalid
L 05/17/2015 - 00:16:24: [AMXX] Displaying debug trace (plugin "statsx.amxx")
L 05/17/2015 - 00:16:24: [AMXX] Run time error 10: native error (native "ShowSyncHudMsg")
Code:
public eventShowRank(id)
{
if (SpecRankInfo && g_izSpecMode[id])
{
new iPlayer = read_data(2)
if (is_user_connected(iPlayer))
{
new izStats[8], izBody[8]
new iRankPos, iRankMax
get_user_name(iPlayer, t_sName, MAX_NAME_LENGTH)
iRankPos = get_user_stats(iPlayer, izStats, izBody)
iRankMax = get_statsnum()
set_hudtype_specmode()
ShowSyncHudMsg(id, g_HudSync_SpecInfo, "%L", id, "X_RANK_IS", t_sName, iRankPos, iRankMax)
}
}
return PLUGIN_CONTINUE
}