All pastes #421317 Raw Edit

Kick scriptz0r

public text v1 · immutable
·published 2007-04-02 19:37 UTC
rendered paste body
Global variablez0r: new time[MAX_PLAYERS];

In OnGameModeInit: SetTimer("z0mgtimer", 1000, 1); // z0mg it's a timer

In OnPlayerConnect: time[playerid] = -1; // So the timer can ignore the player if he just joined

In OnPlayerSpawn: time[playerid] = 60; // He has 60 seconds now :o:o:o

public z0mgtimer()
{
	for (new i = 0; i < MAX_PLAYERS; i++)
	{
		if (time[i] > 0) time[i] --; // If there's more than 0 seconds left, substract a second
		else if (time[i] == 0) // If there's no more time left
		{
			Kick(i); // Time's up, kick :D
			time[i] = -1; // Now the timer won't touch this player anymore
		}
	}
}

In your login command: time[i] = -1;