PHP Code:
public Action Timer_Checker(Handle timer)
{
if(!cv_enable.BoolValue)
return;
int size = GetArraySize(array_players_time);
if (size == 0)
return;
if (L4D_IsMissionFinalMap() == true)
return;
char steamid[64], sName[128];
int i ;
while (i < size)
{
if(GetTime() > GetArrayCell(array_players_time, i)+cv_time.IntValue)
{
GetArrayString(array_players_ids, i, steamid, sizeof(steamid));
GetArrayString(array_players_name, i, sName, sizeof(sName));
CPrintToChatAll("%t", "leave_match", sName);
LogToFile(path, "%s (%s) abandoned the match", sName, steamid);
RemoveFromArray(array_players_time, i);
RemoveFromArray(array_players_ids, i);
RemoveFromArray(array_players_name, i);
size--;
}else
i++;
}
}