Advertisement
Snakebyte1337

fn_initCop

May 26th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.65 KB | None | 0 0
  1. #include <macro.h>
  2. /*
  3. File: fn_initCop.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Cop Initialization file.
  8. */
  9. private["_end"];
  10. player addRating 9999999;
  11. waitUntil {!(isNull (findDisplay 46))};
  12. _end = false;
  13. if(life_blacklisted) exitWith
  14. {
  15. ["Blacklisted",false,true] call BIS_fnc_endMission;
  16. sleep 30;
  17. };
  18.  
  19. if((FETCH_CONST(life_coplevel) == 0) && (FETCH_CONST(life_adminlevel) == 0)) then {
  20. ["NotWhitelisted",false,true] call BIS_fnc_endMission;
  21. sleep 35;
  22. };
  23.  
  24.  
  25. player setVariable["rank",(FETCH_CONST(life_coplevel)),true];
  26. [] call life_fnc_spawnMenu;
  27. waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
  28. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done
  29.  
  30. [] spawn {
  31. while {true} do {
  32. switch (true) do {
  33. case (__GETC__(life_coplevel) == 1) : {
  34. waitUntil {uniform player == "U_Rangemaster"};
  35. player setObjectTextureGlobal [0,"textures\cop\rekrut.jpg"];
  36. waitUntil {uniform player != "U_Rangemaster"}; };
  37. };
  38. case (__GETC__(life_coplevel) == 2) : {
  39. waitUntil {uniform player == "U_B_CombatUniform_mcam"};
  40. player setObjectTextureGlobal [0,"textures\cop\cop_sergeant.jpg"];
  41. waitUntil {uniform player != "U_B_CombatUniform_mcam"}; };
  42. };
  43. case (__GETC__(life_coplevel) == 3) : {
  44. waitUntil {uniform player == "U_B_CombatUniform_mcam"};
  45. player setObjectTextureGlobal [0,"textures\cop\Polizei_2.paa"];
  46. waitUntil {uniform player != "U_B_CombatUniform_mcam"}; };
  47. };
  48. case (__GETC__(life_coplevel) == 4) : {
  49. waitUntil {uniform player == "U_B_CombatUniform_mcam"};
  50. player setObjectTextureGlobal [0,"textures\cop\Polizei_1.jpg"];
  51. waitUntil {uniform player != "U_B_CombatUniform_mcam"}; };
  52. };
  53. case (__GETC__(life_coplevel) == 5) : {
  54. waitUntil {uniform player == "U_B_CombatUniform_mcam_vest"};
  55. player setObjectTextureGlobal [0,"textures\cop\cop_officer.paa"];
  56. waitUntil {uniform player != "U_B_CombatUniform_mcam_vest"}; };
  57. };
  58. case (__GETC__(life_coplevel) == 6) : {
  59. waitUntil {uniform player == "U_B_CombatUniform_mcam"};
  60. player setObjectTextureGlobal [0,"textures\cop\sek.jpg"];
  61. waitUntil {uniform player != "U_B_CombatUniform_mcam"}; };
  62. };
  63. case (__GETC__(life_coplevel) == 7) : {
  64. waitUntil {uniform player == "U_B_CombatUniform_mcam_worn"};
  65. player setObjectTextureGlobal [0,"textures\cop\gsg9.paa"];
  66. waitUntil {uniform player != "U_B_CombatUniform_mcam_worn"}; };
  67. };
  68. case (__GETC__(life_coplevel) == 8) : {
  69. waitUntil {uniform player == "U_B_CombatUniform_mcam"};
  70. player setObjectTextureGlobal [0,"textures\cop\cop_captain.jpg"];
  71. waitUntil {uniform player != "U_B_CombatUniform_mcam"}; };
  72. };
  73. case (__GETC__(life_coplevel) == 9) : {
  74. waitUntil {uniform player == "U_B_CombatUniform_mcam"};
  75. player setObjectTextureGlobal [0,"textures\cop\cop_captain.jpg"];
  76. waitUntil {uniform player != "U_B_CombatUniform_mcam"}; };
  77. };
  78. case (__GETC__(life_coplevel) == 10) : {
  79. waitUntil {uniform player == "U_B_CombatUniform_mcam"};
  80. player setObjectTextureGlobal [0,"textures\cop\cop_captain.jpg"];
  81. waitUntil {uniform player != "U_B_CombatUniform_mcam"}; };
  82. };
  83. case (__GETC__(life_coplevel) == 11) : {
  84. waitUntil {uniform player == "U_B_CombatUniform_mcam"};
  85. player setObjectTextureGlobal [0,"textures\cop\cop_captain.jpg"];
  86. waitUntil {uniform player != "U_B_CombatUniform_mcam"}; };
  87. };
  88. default {};
  89. };
  90. };
  91. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement