Jump to content
  • 0

Problema restart



Problemă întâlnită (descriere): Cand dau /restart spune "server restart in 2 minute" si dupa doua minute se inchide sv si consola nu se restarteaza ... cum pot rezolva
Ero(area / rile) / warning-(ul / urile): - 
Liniile de cod / sursa / script-ul:


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 7
if (APlayerData[playerid][PlayerLevel] >= 7)
// Let everyone know that the server will be restarted in 2 minutes
GameTextForAll("Restart server in 2 minute!", 5000, 3);
SendClientMessageToAll(0xA0A0A0, "Restart server in 2-a minute!");
// Start the next timer which warns the players again that server will be restarted in 1 minute
SetTimer("Timer_Restart_WarnPlayers", 1000 * 60, false);
   return 0;
   return 0;
// Let the server know that this was a valid command
return 1;
forward Timer_Restart_WarnPlayers();
public Timer_Restart_WarnPlayers()
// Let everyone know that the server will be restarted in 1 minutes
GameTextForAll("Restart server intr-un minut!", 5000, 3);
SendClientMessageToAll(0xA0A0A0, "Restart server intr-un minut!");
// Start the next timer
SetTimer("Timer_Restart_Kick", 1000 * 60, false);
// Change the hostname of the server and it's password
SendRconCommand("hostname Pending Restart");
SendRconCommand("password 123");
return 1;
forward Timer_Restart_Kick();
public Timer_Restart_Kick()
// Let everyone know that the server is kicking all players before restarting
GameTextForAll("Server restarting:Reconect!", 5000, 3);
// Kick all players
for(new i; i < MAX_PLAYERS; i++)
// Start the next timer that will restart the server
SetTimer("Timer_Restart_Reboot", 1000 * 5, false);
return 1;
forward Timer_Restart_Reboot();
public Timer_Restart_Reboot()
// Restart the server
return 1;


Imagini / Video (optional):-
Aţi încercat să rezolvaţi singur?: nu stiu cum

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

This topic is now closed to further replies.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.