Advertisement
Veticus

fn_restart.sqf - Setup

Mar 23rd, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. // Created by νєтι¢υѕ. This script is an open source to anyone.
  2. // Basically you don't want random people on your server to restart or have access to activating the restart script. So i created a custom array, with a addAction function in their to make sure certain people can access the button.
  3. //To start create a file called. "fn_actionarray.sqf" then paste this code in that file:
  4.  
  5. if ((getPlayerUID player) in ['1234567890']) then {
  6.  
  7. player addAction ["<t color='#FF0000'>Restart Server</t>", "restart\fn_restart.sqf", [], 0, false, true, ""];
  8. } else {
  9.  
  10. hintSilent parseText format ["You cannot restart the server!"];
  11. };
  12.  
  13. //As you can see you can add you player UID into part where it says "['1234567890']", after that you have to go access your "init.sqf" file and add this simple execute line into it:
  14.  
  15. execVM "fn_actionarray.sqf";
  16.  
  17. //After all that, it should be functioning properly. Any problems contact me on the following teamspeak : ts3.districtliferpg.co.uk
  18. //Hope you guys enjoy the script.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement