Advertisement
Veticus

fn_restart.sqf - Arma Script *Updated

Mar 23rd, 2014
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. // Created by νєтι¢υѕ. This script is an open source to anyone.
  2. //This is a restart timer. It announces that the server is restarting in 10 minutes. And then at the last 60 seconds, it warns the players again that they will be kicked to lobby. When the 60 seconds are up, All players are kicked to lobby (then you queue the server restart).
  3.  
  4. //To properly get work you gonna have to use "addAction". You can create your own or use mine. Put this script into your init.sqf (Or whatever array you may have) "Restart_Action = player addAction ["Restart Server", "fn_restart.sqf", [], 0, false, true, "", "true"];"
  5. //ADDED: I have added it so people who have a certain UID don't have to be kicked from the server. Also check out this page to see how to set this up one way. - http://pastebin.com/hPkstiUH
  6.  
  7. _vetrestart = 600;
  8. //bigger or equal to
  9. while {_vetrestart >= 0} do {
  10.  
  11. hintSilent parseText format ["<t color='#FF0000' size='1.8' underline='false'>District Life RPG</t><br/><t color='#FF0000' size='1.5'>---------------------------------<br/><t color='#FFFFFF' size='1.3'>The server is restarting make sure that all your data has been saved. You have 10 minutes to disconnect, before you get kicked!<br/><t color='#FF0000' size='1.5'>---------------------------------<br/><t color='#FF0000' size='1.5'>------ %1 ------</t>", _vetrestart];
  12. _vetrestart = _vetrestart - 1;
  13. sleep 1;
  14. };
  15. if (_vetrestart <= 0) then {
  16.  
  17. if ((getPlayerUID player) in ['76561198054134232']) then {
  18.  
  19. hintSilent parseText format ["<t color='#FF0000' size='1.4' underline='false'>Admin you don't get kicked because your special ;P</t>", "PLAIN"];
  20. } else {
  21.  
  22. hintSilent parseText format["<t color='#FF0000' size='1.8' underline='true'>District Life RPG</t><br/><br/><t color='#FFFFFF' size='1.3'>Server is now restarting. You will be kicked back to the lobby 60 seconds. Please disconnect and wait for the server to go back up!</t>", "PLAIN"];
  23. sleep 60;
  24. failMission "END!";
  25. };
  26. };
  27.  
  28. //See what it looks like in-game: https://i.imgur.com/FqCj2jN.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement