PHP Code:
#include <amxmodx>
#define MAX_PLAYERS 32
#define TASK_SHOWPOINTS 12345
new m_iPoints[MAX_PLAYERS + 1];
new g_iSyncHud;
public plugin_init()
{
g_iSyncHud = CreateHudSyncObj();
set_task(0.1, "Task_Display", TASK_SHOWPOINTS, .flags = "b");
}
public Task_Display() {
new Players[MAX_PLAYERS], iNum, id;
get_players(Players, iNum, "chi");
for(new i = 0; i < iNum; i++) {
id = Players[i];
switch(m_iPoints[id]) {
case 1: {
set_hudmessage(0, 204, 0, -1.0, 0.68, 0, 0.0, 0.1, 0.01, 0.0);
ShowSyncHudMsg(id, g_iSyncHud , "Points - (x) ()");
}
case 2: {
set_hudmessage(0, 204, 0, -1.0, 0.68, 0, 0.0, 0.1, 0.01, 0.0);
ShowSyncHudMsg(id, g_iSyncHud , "Points - (x) (x)");
}
default: {
set_hudmessage(0, 204, 0, -1.0, 0.68, 0, 0.0, 0.1, 0.01, 0.0);
ShowSyncHudMsg(id, g_iSyncHud , "Points - () ()");
}
}
}
}
Compiled. No errors. Untested.