Advertisement
Guest User

Untitled

a guest
Jun 8th, 2021
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. #include "..\script_macros.hpp"
  2. /*
  3. File: fn_initCop.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Cop Initialization file.
  8. */
  9. waitUntil {!(isNull (findDisplay 46))};
  10.  
  11. //Check if they are trying to join a nato slot
  12. if (str(player) in ["cop_20","cop_21","cop_22","cop_23","cop_24"]) then {
  13. //This assumes that an admin can join a nato slot even if they aren't whitelisted for nato
  14. if ((FETCH_CONST(life_nato) < 1) && (FETCH_CONST(life_adminlevel) == 0)) then {
  15. ["NotWhitelisted",false,true] call BIS_fnc_endMission;
  16. sleep 35;
  17. };
  18. } else {
  19. //They aren't in a nato slot so check if they are whitelisted as a regular cop
  20. //This assumes that an admin can join a cop slot even if they aren't whitelisted for cop
  21. if ((FETCH_CONST(life_coplevel) < 1) && (FETCH_CONST(life_adminlevel) == 0)) then {
  22. ["NotWhitelisted",false,true] call BIS_fnc_endMission;
  23. sleep 35;
  24. };
  25. };
  26.  
  27. //This doesn't really make sense but oh well.
  28. player setVariable ["rank",(FETCH_CONST(life_coplevel)),true];
  29. player setVariable ["rank",(FETCH_CONST(life_nato)),true];
  30.  
  31. [] call life_fnc_spawnMenu;
  32. waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
  33. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
  34.  
  35. [] call life_fnc_initPayChecks;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement