Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- public OnGameModeInit()
- {
- SendRconCommand("password 0");
- SetTimer("OnRestart", 1000, 1);
- return 1;
- }
- public OnRestart();
- public OnRestart()
- {
- new time[3], string[32];
- gettime(time[0],time[1],time[2]);
- if(time[0] == 4 && time[1] == 29 && time[2] == 0) return SendClientMessageToAll(-1, "Restart the server happens after 1 minute.");
- if(time[0] == 4 && time[1] == 30 && time[2] == 0)
- {
- SendClientMessageToAll(-1, "Server is restarted...");
- for(new i = 0; i < MAX_PLAYERS; i++) SetTimerEx("sKick", 1000, false, "i", i);
- format(string, sizeof string, "password %s", random(9999)+time[2]);
- return SendRconCommand(string);
- }
- if(time[0] == 4 && time[1] == 31 && time[2] == 0) return SendRconCommand("gmx");
- return 1;
- }
- public sKick(playerid);
- public sKick(playerid) return Kick(playerid);
Advertisement
Add Comment
Please, Sign In to add comment