26.08.2011, 17:34
Try this
Sory for my bad english!
Код:
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; }