Код
#include <sourcemod>
new Handle:hTimer = INVALID_HANDLE;
public OnMapTimeLeftChanged()
{
OnMapStart();
}
public OnMapStart()
{
if (hTimer != INVALID_HANDLE)
{
KillTimer(hTimer);
}
decl time;
GetMapTimeLimit(time);
hTimer = CreateTimer(float(time), CT_Timer);
}
public Action:CT_Timer(Handle:timer)
{
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && IsPlayerAlive(i))
{
FakeClientCommand(i, "kill");
}
}
hTimer = INVALID_HANDLE;
}