Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\script_macros.hpp"
- /*
- File: fn_initCop.sqf
- Author: Bryan "Tonic" Boardwine
- Description:
- Cop Initialization file.
- */
- waitUntil {!(isNull (findDisplay 46))};
- //Check if they are trying to join a nato slot
- if (str(player) in ["cop_20","cop_21","cop_22","cop_23","cop_24"]) then {
- //This assumes that an admin can join a nato slot even if they aren't whitelisted for nato
- if ((FETCH_CONST(life_nato) < 1) && (FETCH_CONST(life_adminlevel) == 0)) then {
- ["NotWhitelisted",false,true] call BIS_fnc_endMission;
- sleep 35;
- };
- } else {
- //They aren't in a nato slot so check if they are whitelisted as a regular cop
- //This assumes that an admin can join a cop slot even if they aren't whitelisted for cop
- if ((FETCH_CONST(life_coplevel) < 1) && (FETCH_CONST(life_adminlevel) == 0)) then {
- ["NotWhitelisted",false,true] call BIS_fnc_endMission;
- sleep 35;
- };
- };
- //This doesn't really make sense but oh well.
- player setVariable ["rank",(FETCH_CONST(life_coplevel)),true];
- player setVariable ["rank",(FETCH_CONST(life_nato)),true];
- [] call life_fnc_spawnMenu;
- waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
- waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
- [] call life_fnc_initPayChecks;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement