This plugin shows Team score in HUD in top and i want to include the Number of alive players in ct and t. Please someone modify it.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define VERSION "1.3"
new TerrScore, CTScore
new rounds_elapsed
public plugin_init()
{
register_plugin("TeamScore", "1.0", "XXX")
register_event("TeamScore", "terr_score", "a", "1=TERRORIST")
register_event("TeamScore", "ct_score", "a", "1=CT")
register_event("HLTV", "new_round", "a", "1=0", "2=0")
register_event("TextMsg", "restart_round", "a", "2=#Game_will_restart_in")
show_scores()
}
public new_round()
{
rounds_elapsed += 1
}
public restart_round()
{
rounds_elapsed = 0
}
public terr_score()
{
TerrScore = read_data(2)
}
public ct_score()
{
CTScore = read_data(2)
}
public show_scores()
{
set_hudmessage(255, 255, 255, -1.0, 0.0, _,_, 2.0,_,_, -1)
show_hudmessage(0, "Team Score^n(T-%i) [Round %d] (CT-%i)", TerrScore,rounds_elapsed,CTScore)
set_task(2.0, "show_scores")
}