Try:
Code:
HookEvent("player_death", Event_PlayerDeath, EventHookMode_Post);
public Action:Event_PlayerDeath(Handle:hEvent, const String:Name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(hEvent, "userid"));
new SquadID = GetEntProp(client, Prop_Send, "m_nSurvivalTeam");
if(SquadID <= 0) // You must check if squad ID 0 is null, I recommend checking it in a casual / competitive game mode to make sure. It is possible that squad ID 0 is actually valid, but I guarantee that -1 will never be valid. Also, it's possible that death is too late to cache a player's squad ID, check it all yourself.
{
PrintToChat(client, "DEBUG: %i", SquadID);
return;
}
new bool:Wiped = true;
for(new i=1;i <= MaxClients;i++)
{
if(!IsClientInGame(i))
continue;
else if(!IsPlayerAlive(i))
continue;
if(GetEntProp(client, Prop_Send, "m_nSurvivalTeam") == SquadID)
{
Wiped = false;
break;
}
}
PrintToChat(client, "Wiped: %s", Wiped ? "Yes" : "No");
}
__________________
I am available to make plugins for pay.
Discord: Eyal282#1334