Advertisement
Guest User

Untitled

a guest
Jul 15th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 3.55 KB | None | 0 0
  1. if (isServer) then {
  2. reservedSlotsCiv = [civ_1,civ_2];
  3. reservedSlotsNotarzt = [Notarzt_1,Notarzt_2];
  4. reservedSlotsArzt = [Arzt_1,medic_2];
  5. reservedSlotsPolizei = [cop_1,cop_2];
  6. reservedSlotsTrooper = [trooper_1,trooper_2];
  7. reservedSlotsDEA = [dea_1,dea_2];
  8. reservedSlotsFBI = [fbi_1,fbi_2];
  9. reservedSlotsMS = [marshal_1,marshal_2];
  10.  
  11. ["reserved", "onPlayerConnected", {
  12.     private ["_uid","_player","_UIDList"];
  13.     _UIDListCiv = call compile preProcessFile "scripts/whitelistCiv.txt";
  14.     _UIDListNotarzt = call compile preProcessFile "scripts/whitelistNotarzt.txt";
  15.     _UIDListArzt = call compile preProcessFile "scripts/whitelistArzt.txt";
  16.     _UIDListPolizei = call compile preProcessFile "scripts/whitelistPolizei.txt";
  17.     _UIDListTrooper = call compile preProcessFile "scripts/whitelistTrooper.txt";
  18.     _UIDListDEA = call compile preProcessFile "scripts/whitelistDEA.txt";
  19.     _UIDListFBI = call compile preProcessFile "scripts/whitelistFBI.txt";
  20.     _UIDListMS = call compile preProcessFile "scripts/whitelistMS.txt";
  21.     if (_uid < 1) exitWith {};
  22.  
  23.     _player = objNull;
  24.     while {isNull _player} do {
  25.         sleep 1;
  26.         {
  27.             if (_uid == getPlayerUID _x) then {
  28.                 _player = _x;
  29.             };
  30.         } forEach playableUnits;
  31.     };
  32.  
  33.     if (_player in reservedSlots) then {
  34.         if (! _uid in _UIDListCiv ) then {
  35.             [["Du bist nicht gelistet für diesen Server"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
  36.             sleep 1;
  37.             [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
  38.         };
  39.     };
  40.    
  41.     if (_player in reservedSlots) then {
  42.         if (! _uid in _UIDListNotarzt ) then {
  43.             [["Du bist nicht als Notarzt gelistet für diesen Server"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
  44.             sleep 1;
  45.             [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
  46.         };
  47.     };
  48.    
  49.     if (_player in reservedSlots) then {
  50.         if (! _uid in _UIDListArzt ) then {
  51.             [["Du bist nicht als Arzt gelistet für diesen Server"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
  52.             sleep 1;
  53.             [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
  54.         };
  55.     };
  56.    
  57.     if (_player in reservedSlots) then {
  58.         if (! _uid in _UIDListPolizei ) then {
  59.             [["Du bist nicht als Polizist gelistet für diesen Server"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
  60.             sleep 1;
  61.             [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
  62.         };
  63.     };
  64.    
  65.     if (_player in reservedSlots) then {
  66.         if (! _uid in _UIDListTrooper ) then {
  67.             [["Du bist nicht als State Trooper gelistet für diesen Server"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
  68.             sleep 1;
  69.             [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
  70.         };
  71.     };
  72.    
  73.     if (_player in reservedSlots) then {
  74.         if (! _uid in _UIDListDEA ) then {
  75.             [["Du bist nicht als DEA gelistet für diesen Server"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
  76.             sleep 1;
  77.             [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
  78.         };
  79.     };
  80.    
  81.     if (_player in reservedSlots) then {
  82.         if (! _uid in _UIDListFBI ) then {
  83.             [["Du bist nicht als FBI gelistet für diesen Server"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
  84.             sleep 1;
  85.             [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
  86.         };
  87.     };
  88.    
  89.     if (_player in reservedSlots) then {
  90.         if (! _uid in _UIDListMS ) then {
  91.             [["Du bist nicht als US Marshal gelistet für diesen Server"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
  92.             sleep 1;
  93.             [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
  94.         };
  95.     };
  96. }] call BIS_fnc_addStackedEventHandler;
  97. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement