Thread: Team Score HUD
View Single Post
Author Message
joblessuser
Member
Join Date: May 2013
Old 09-24-2013 , 09:17   Team Score HUD
Reply With Quote #1

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 TerrScoreCTScore
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(255255255, -1.00.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")

joblessuser is offline