PHP Code:
L 06/07/2020 - 11:39:36: [SM] Exception reported: Client index 0 is invalid
L 06/07/2020 - 11:39:36: [SM] Blaming: test.smx
L 06/07/2020 - 11:39:36: [SM] Call stack trace:
L 06/07/2020 - 11:39:36: [SM] [0] GetClientTeam
L 06/07/2020 - 11:39:36: [SM] [1] Line 1386, test.sp::Hook_OnTakeDamage
function:
PHP Code:
if(test)
{
if(GetClientTeam(client) == 2)
{
if(GetClientTeam(attacker) == GetClientTeam(client) && IsFreezed[client] && !IsFreezed[attacker])
{
SetEntityMoveType(client, MOVETYPE_WALK);
SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.0);
SetEntityRenderColor(client, 255, 255, 255, 255);
IsFreezed[client] = false;
--FreezeCount;
}
else if(GetClientTeam(attacker) != GetClientTeam(client) && !IsFreezed[client])
{
SetEntityMoveType(client, MOVETYPE_NONE);
SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 0.0);
SetEntityRenderColor(client, 0, 0, 255, 255);
IsFreezed[client] = true;
++FreezeCount;
}
}
}
what is problem with this?