Quote:
Originally Posted by LithuanianJack
Can you edit this plugin, i need advertising only for each player seperately?
Now, when player connects to server this message printing for all players
|
This should only show the teamscore to each player separately instead of every player in server everytime someone spawns. plus resets the scores to 0 when new game starts.
PHP Code:
#include <amxmodx>
#include <hamsandwich>
new CTScore = 0;
new TScore = 0;
public plugin_init( )
{
register_event( "TextMsg", "GameWillRestart", "a", "2=#Game_will_restart_in" );
register_event( "SendAudio", "Hook_Terr_Win", "a", "2&%!MRAD_terwin" );
register_event( "SendAudio", "Hook_CT_Win", "a", "2&%!MRAD_ctwin" );
RegisterHam(Ham_Spawn, "player", "teamScore")
}
public GameWillRestart( )
{
TScore = 0;
CTSore = 0;
}
public Hook_CT_Win( ) CTScore++;
public Hook_Terr_Win( ) TScore++;
public teamScore( id ) client_print( id, print_chat, "[SERVER] Teams Scoreboard: Terrorists: %d | Counter-Terrorists: %d", TScore, CTScore );