PHP Code:
#pragma semicolon 1
#pragma newdecls required
//////here is list of L4D Teams///////////////////
#define SPECTEAM 1
#define SURVIVORTEAM 2
#define INFECTEDTEAM 3
///////////////////////////////////////////////
#include <sourcemod>
public void OnPluginStart()
{
HookEvent("round_end", Event_RoundEnd);
}
void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast)
{
int WinnerTeam = GetEventInt(event, "winner");
for(int i = 1; i <= MaxClients; ++i)
{
if (IsClientInGame(i))
{
if (IsPlayerAlive(i))
{
if (WinnerTeam == SURVIVORTEAM) //so if WinnerTeam which is GetEventInt the winner, and int on top at define are equal together means team winner
{
//do stuff here if survivor win
}else if (WinnerTeam == INFECTEDTEAM) //here also same but we change to infected team
{
//do stuff here if infected win
}
}
}
}
}
__________________