- 0
Problema restart server
-
Similar Content
-
boti pe server
By viji,
- 1 answer
- 162 views
-
- 2 answers
- 116 views
-
- 16 replies
- 146 views
-
De ce cand actualizez ceva la serverul meu de samp,pe sa-mp(server) nu se modifica sau rcon password ?
By leoo671,
- 1 answer
- 192 views
-
- 4 replies
- 527 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
Andrey003
Problemă întâlnită (descriere): Can dau /restart la server scrie restart in 2 minute ,iar dupa ce isi da restart incep niste textdraw sa dispara si sa apara cu o locatie "Blueberry ..."
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul:
[pawn]
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);
}
else
return 0;
}
else
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");
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++)
Kick(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
SendRconCommand("gmx");
return 1;
}
[/pawn]
Imagini / Video (optional):
http://imgur.com/Wx1JUHf,f2MsZJq,EG48X8Z#0 - cand dau restart
http://imgur.com/Wx1JUHf,f2MsZJq,EG48X8Z#2 -dupa ce dau restart acele texte de sus , jos ,si alea din dreapta tot dispar si apar
Aţi încercat să rezolvaţi singur?: nu stiu cum
Link to comment
Share on other sites
17 answers to this question
Recommended Posts