Raised This Month: $51 Target: $400
 12% 

Team Score in Team Fortress Classic


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
12Toastie
Junior Member
Join Date: Nov 2014
Old 10-12-2020 , 17:29   Team Score in Team Fortress Classic
Reply With Quote #1

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?
12Toastie is offline
12Toastie
Junior Member
Join Date: Nov 2014
Old 10-12-2020 , 19:43   Re: Team Score in Team Fortress Classic
Reply With Quote #2

figured it out.. its "Blue" lol..
12Toastie is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode