26.08.2011, 17:06
Hello
Does anyone know how to change this into a time that u have to put in e.g "/restart [time]" please help
Does anyone know how to change this into a time that u have to put in e.g "/restart [time]" please help
Код:
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", 1000 * 60, false); } else return 0; } else return 0; // Let the server know that this was a valid command return 1; }