Help you
PHP Code:
#include <cstrike>
char g_sInfo[128];
public void OnPluginStart()
{
RegConsoleCmd("sm_rounds", RoundsCmd);
HookEvent("round_end", RoundEnd);
}
public Action RoundsCmd(int iClient, int iArgs)
{
if(iClient) PrintToChat(iClient, " » You're \x07%d \x01rounds in to the game!", CS_GetTeamScore(CS_TEAM_T) + CS_GetTeamScore(CS_TEAM_CT));
return Plugin_Handled;
}
public void RoundEnd(Event event, const char[] name, bool dbc)
{
switch(event.GetInt("winner"))
{
case CS_TEAM_T: FormatEx(g_sInfo, sizeof(g_sInfo), " » \x07Terrorists \x01has won the last round. %d - %d", CS_GetTeamScore(CS_TEAM_T), CS_GetTeamScore(CS_TEAM_CT));
case CS_TEAM_CT: FormatEx(g_sInfo, sizeof(g_sInfo), " » \x0BCounter-Terrorists \x01has won the last round. %d - %d.", CS_GetTeamScore(CS_TEAM_CT), CS_GetTeamScore(CS_TEAM_T));
}
CreateTimer(8.0, TimerWinner, _, TIMER_FLAG_NO_MAPCHANGE);
}
public Action TimerWinner(Handle hTimer)
{
PrintToChatAll(g_sInfo);
return Plugin_Stop;
}