char sNameDP[32];
int iMaxDP = 0;
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
if (g_iKills[i] > g_iKills[iMaxDP]) iMaxDP = i;
else if ((g_iDamage[i] > g_iDamage[iMaxDP]) && (g_iKills[i] == g_iKills[iMaxDP])) iMaxDP = i;
}
if (!IsValidClient(i)) continue;
if (!IsPlayerAlive(i)) continue;
GetClientName(iMaxDP, sNameDP, sizeof(sNameDP));
if (IsClientInGame(i) && !IsFakeClient(i))
{
int iTeam2 = GetClientTeam(iMaxDP);
if (iWinner == 2)
{
if (g_C4[1] > 0) CPrintToChatAll("%t %t", "Prefix", "MVP_Bomb_Planted", g_Name_Bomb_Planted);
else if (iTeam2 == 2) CPrintToChatAll("%t %t", "Prefix", "MVP_Top_Killer", sNameDP);
else if (iTeam2 == 3)CPrintToChatAll("%t %t", "Prefix_CT", "MVP_Top_Killer_CT", sNameDP);
}
if (iWinner == 3)
{
if (g_C4[2] > 0) CPrintToChatAll("%t %t", "Prefix_CT", "MVP_Bomb_Defused", g_Name_Defused);
else if (iTeam2 == 3) CPrintToChatAll("%t %t", "Prefix_CT", "MVP_Top_Killer_CT", sNameDP);
else if (iTeam2 == 2) CPrintToChatAll("%t %t", "Prefix", "MVP_Top_Killer", sNameDP);
}
}
}