So far this is what im trying..
Code:
#include <amxmodx>
#pragma semicolon 1
#pragma ctrlchar '\'
new SCORE_BLUE;
new g_TeamScore[2];
new currentScore = 0;
public show_timer()
{
new nextmap[32];
//register_logevent("capcounter", 3, "1=triggered", "2&dropoff");
get_cvar_string("amx_nextmap", nextmap, 31);
new timeleft = get_timeleft();
new prevScore = 0;
set_hudmessage(255, 255, 255, 0.00, 0.00, 0, 1.00, 1000.00, 0.10, 0.20, 13);
show_hudmessage(0, "WELCOME TO THE OUTHOUSE\nTimeleft: %d:%02d\nCurrent Score: %d\nPrevious Score: %d", timeleft / 60, timeleft, currentScore, prevScore);
return 0;
}
/*public capcounter()
{
currentScore = currentScore + 10;
client_print(0, print_chat, "capped!");
return PLUGIN_CONTINUE;
}*/
public get_teamscore()
{
new team[32];
read_data(1,team,31);
if(!strcmp(team,"BLUE"))
currentScore = read_data(2);
return PLUGIN_CONTINUE;
}
public plugin_init()
{
register_event("TeamScore","get_teamscore","a");
//register_logevent("capcounter", 3, "1=triggered", "2&dropoff");
register_plugin("TimeProjector", "0.1", "ST4life");
set_task(1.00, "show_timer", 0, "", 0, "b", 0);
return 0;
}
all i wanna do is get the score for BLUE in TFC and display it in the HUD.. any help?