i still had a code from some time ago which does the same thing.
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Hud Alive Players"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
set_task(5.0, "ShowAlivePlayers")
}
public ShowAlivePlayers() {
new ctPlayers[32], ctNum
get_players(ctPlayers, ctNum, "ae", "CT")
set_hudmessage(0, 0, 255, 0.56, 0.15, 0, 6.0, 3.1, 0.0, 0.0, -1)
show_hudmessage(0, "[CT]: %i", ctNum)
new tPlayers[32], tNum
get_players(tPlayers, tNum, "ae", "TERRORIST")
set_hudmessage(255, 0, 0, 0.02, 0.15, 0, 6.0, 3.1, 0.0, 0.0, -1)
show_hudmessage(0, "[TS]: %i", tNum)
set_task(1.0, "ShowAlivePlayers")
}