Server Restart
#2

Try this
Код:
COMMAND:restart(playerid, params[])
{
	// Send the command to all admins so they can see it
	SendAdminText(playerid, "/restart", params);

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
		// Check if the player's admin-level is at least 5
		if (APlayerData[playerid][PlayerLevel] >= 5)
		{
			// Let everyone know that the server will be restarted in 2 minutes
			GameTextForAll("Server restart in 2 minutes!", 5000, 3);
			SendClientMessageToAll(0xA0A0A0, "Server restart in 2 minutes!");
			// Start the next timer which warns the players again that server will be restarted in 1 minute
			SetTimer("Timer_Restart_WarnPlayers", 15000 * 60, false);//server will restart at 15 seconds if need more seconds use  20000 and more
		}
		else
		    return 0;
	}
	else
	    return 0;

	// Let the server know that this was a valid command
	return 1;
}
Sory for my bad english!
Reply


Messages In This Thread
Server Restart - by Trucker[UK] - 26.08.2011, 17:06
Re: Server Restart - by HotPlayer - 26.08.2011, 17:34
Re: Server Restart - by Gagi_Corleone - 26.08.2011, 17:34
Re: Server Restart - by Wyu - 26.08.2011, 17:37
Re: Server Restart - by Kaperstone - 26.08.2011, 17:43
Re: Server Restart - by Trucker[UK] - 26.08.2011, 17:47
Re: Server Restart - by MP2 - 26.08.2011, 17:51

Forum Jump:


Users browsing this thread: 1 Guest(s)