Всем привет.
Есть код:
Код
...
public PlayerBlind(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new client_team = GetClientTeam(client);
new count_flash;
if (client_team == CS_TEAM_CT)
{
if (!IsFakeClient(client))
{
SetEntPropFloat(client, Prop_Send, "m_flFlashMaxAlpha", 0.0);
SetEntPropFloat(client, Prop_Send, "m_flFlashDuration", 0.0);
}
}
else if (client_team == CS_TEAM_T)
{
SetEntityRenderMode(client, RENDER_TRANSCOLOR);
SetEntityRenderColor(client, 0, 120, _, _);
SetEntityMoveType(client, MOVETYPE_NONE);
count_flash++;
timer_freeze = CreateTimer(10.0, UnFrouzen_Function, client, TIMER_FLAG_NO_MAPCHANGE);
if (count_flash == 1)
{
Freeze_Function(client);
}
}
}
Freeze_Function(client)
{
for (new i_client = 1;i_client <= MaxClients; i_client++)
{
if (!IsClientInGame(i_client) || IsFakeClient(i_client))
{
continue;
}
else
{
EmitSoundToClient(i_client, "physics/glass/glass_impact_bullet4.wav", client);
}
}
}
public Action:UnFrouzen_Function(Handle:timer, any:client)
{
static unfrouzen_count;
if (GetEntityMoveType(client) == MOVETYPE_NONE)
{
SetEntityRenderMode(client, RENDER_NORMAL);
SetEntityRenderColor(client, 255, 255, _, _);
if (unfrouzen_count++ == 1)
{
Freeze_Function(client)
}
}
timer_freeze = INVALID_HANDLE;
}
Не могу сам себя понять нужно ли делать в Call'Back таймере CloseHandle(timer_freeze) ?