Hello Guys,
Today I've decided to add another hud message showing the next rank that the player will get, I've made so much tests and finally I got it right, but then the other message above it just disappeared and started to not show up.
This is the code:
PHP Code:
public Info()
{
for(new id = 1; id <= MaxPlayers; id++)
{
if(!is_user_bot(id) && is_user_connected(id))
{
if(get_pcvar_num(gHideRadar))
set_hudmessage(0, 255, 255, 0.01, 0.01, 0, 1.0, 1.0, _, _, -1);
else
set_hudmessage(0, 255, 255, 0.01, 0.19, 0, 1.0, 1.0, _, _, -1)
static buffer[384], len;
len = format(buffer, charsmax(buffer), "%L",LANG_PLAYER,"ZVANIE");
len += format(buffer[len], charsmax(buffer) - len, " [%L]",LANG_PLAYER,gRankNames[UserData[id][gLevel]]);
len = format(buffer, charsmax(buffer), "%L",LANG_PLAYER,"NEXT_RANK");
len += format(buffer[len], charsmax(buffer) - len, " [%L]",LANG_PLAYER,gRankNames[UserData[id][gLevel]+1]);
if(UserData[id][gLevel] <= 19)
{
len += format(buffer[len], charsmax(buffer) - len, "^n%L",LANG_PLAYER,"PL_XP",UserData[id][gExp],gLevels[UserData[id][gLevel]]);
} else {
len += format(buffer[len], charsmax(buffer) - len, "^n%L",LANG_PLAYER,"PL_MAX");
}
ShowSyncHudMsg(id, g_MsgHud, "%s", buffer);
}
}
return PLUGIN_CONTINUE
}