Advertisement
infiSTAR23

VMexecuter #2 (extra check if admin)

May 2nd, 2014
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.20 KB | None | 0 0
  1. fnc_adminVMexecuter =
  2. {
  3.     if !((getPlayerUID player) in (PV_LowLevel_List+PV_NormalLevel_List+PV_SuperLevel_List)) exitWith {};   // only admins - variables defined by the infiSTAR.de AntiHack tool.
  4.     infiSTAR_ExecVM =
  5.     [
  6.         ['',true],
  7.         ['infiSTAR.de SQF Loader', [-1], '', -5, [['expression', '']], '1', '0'],
  8.         ['File 1', [2], '', -5, [['expression', '[] execVM ''File1.sqf'';']], '1', '1'],
  9.         ['File 2', [3], '', -5, [['expression', '[] execVM ''File2.sqf'';']], '1', '1'],
  10.         ['File 3', [4], '', -5, [['expression', '[] execVM ''File3.sqf'';']], '1', '1'],
  11.         ['File 4', [5], '', -5, [['expression', '[] execVM ''File4.sqf'';']], '1', '1'],
  12.         ['File 5', [6], '', -5, [['expression', '[] execVM ''File5.sqf'';']], '1', '1'],
  13.         ['File 6', [7], '', -5, [['expression', '[] execVM ''File6.sqf'';']], '1', '1']
  14.     ];
  15.     showCommandingMenu '#USER:infiSTAR_ExecVM';
  16. };
  17. fnc_adminStartKeybinds =
  18. {
  19.     _keyDown = _this select 1;
  20.     if (_keyDown == 61) then
  21.     {
  22.         [] spawn fnc_adminVMexecuter;
  23.     };
  24. };
  25. if (!isNil 'adminStartKeybinds') then {(findDisplay 46) displayRemoveEventHandler ['KeyDown', adminStartKeybinds];};
  26. adminStartKeybinds = (findDisplay 46) displayAddEventHandler ['KeyDown','_this call fnc_adminStartKeybinds'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement