public Event_PlayerTeam(Handle:event, const String:name[], bool:dontBroadcast)
{
if (GetEventBool(event, "disconnect"))
{
return;
}
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (!IS_CLIENT(client) || !IsClientInGame(client) || IsFakeClient(client))
{
return;
}
g_didRecentlyChangeTeam[client] = true;
CreateTimer(RECENT_TEAM_CHANGE_TIME, Timer_ResetRecentTeamChange, client);
}
public Action:Timer_ResetRecentTeamChange(Handle:timer, any:client)
{
g_didRecentlyChangeTeam[client] = false;
return Plugin_Stop;
}
public Action:Hook_OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype, &weapon, Float:damageForce[3], Float:damagePosition[3])
{
// Prevent infected players from killing survivor bots by changing teams in trigger_hurt areas
if (IS_CLIENT(victim) && g_didRecentlyChangeTeam[victim])
return Plugin_Handled;
return Plugin_Continue;
}
ошибка в модуле античита smac_l4d2_fixes.smx, обусловленная работой фиксов.