Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isServer) then {
- reservedSlots = [fbiunit,deaunit,msunit,sheriffunit,policeunit,notarztunit,arztunit];
- ["reserved", "onPlayerConnected", {
- private ["_uid","_player","_UIDList"];
- _UIDList1 = call compile preProcessFile "scripts/whitelistciv.txt";
- _UIDList2 = call compile preProcessFile "scripts/whitelistnotarzt.txt";
- _UIDList3 = call compile preProcessFile "scripts/whitelistarzt.txt";
- if (_uid < 1) exitWith {};
- _player = objNull;
- while {isNull _player} do {
- sleep 1;
- {
- if (_uid == getPlayerUID _x) then {
- _player = _x;
- };
- } forEach playableUnits;
- };
- if (_player in reservedSlots) then {
- if (! _uid in _UIDList1 ) then {
- [["You are not entitled to use this slot!"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
- sleep 1;
- [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
- };
- };
- if (_player in reservedSlots) then {
- if (! _uid in _UIDList2 ) then {
- [["You are not entitled to use this slot!"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
- sleep 1;
- [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
- };
- };
- if (_player in reservedSlots) then {
- if (! _uid in _UIDList3 ) then {
- [["You are not entitled to use this slot!"], "BIS_fnc_infoText", _player, false] call BIS_fnc_MP;
- sleep 1;
- [["end1",false], "BIS_fnc_endMission", _player, false] call BIS_fnc_MP;
- };
- };
- }] call BIS_fnc_addStackedEventHandler;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement