Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.98 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((__GETC__(life_coplevel) == 0) && (__GETC__(life_adminlevel) == 0)) then {
  20. ["NotWhitelisted",false,true] call BIS_fnc_endMission;
  21. sleep 35;
  22. };
  23.  
  24. switch (__GETC__(life_coplevel)) do
  25. {
  26. case 1: {life_paycheck = life_paycheck + 1000;};
  27. case 2: {life_paycheck = life_paycheck + 2000;};
  28. case 3: {life_paycheck = life_paycheck + 3000;};
  29. case 4: {life_paycheck = life_paycheck + 4000;};
  30. case 5: {life_paycheck = life_paycheck + 5000;};
  31. case 6: {life_paycheck = life_paycheck + 6000;};
  32. case 7: {life_paycheck = life_paycheck + 7000;};
  33. };
  34.  
  35. [] spawn
  36. {
  37. private["_texture"];
  38. while {true} do
  39. {
  40. waitUntil{uniform player == "U_B_CombatUniform_mcam_worn"};
  41. _texture =
  42. switch (__GETC__(life_coplevel)) do
  43. {
  44. case 0: {"textures\police.jpg"};
  45. case 1: {"textures\police.jpg"};
  46. case 2: {"textures\police.jpg"};
  47. case 3: {"textures\police.jpg"};
  48. case 4: {"textures\police.jpg"};
  49. case 5: {"textures\police.jpg"};
  50. case 6: {"textures\police.jpg"};
  51. case 7: {"textures\police.jpg"};
  52. };
  53.  
  54. player setObjectTextureGlobal [0,_texture];
  55. waitUntil{uniform player != "U_Rangemaster"};
  56. };
  57. };
  58.  
  59. [] spawn
  60. {
  61. private["_texture"];
  62. while {true} do
  63. {
  64. waitUntil{uniform player == "U_B_CombatUniform_mcam_worn"};
  65. _texture =
  66. switch (__GETC__(life_coplevel)) do
  67. {
  68. case 3: {"textures\police3.jpg"};
  69. case 4: {"textures\police3.jpg"};
  70. case 5: {"textures\police3.jpg"};
  71. case 6: {"textures\police3.jpg"};
  72. case 7: {"textures\police3.jpg"};
  73. };
  74.  
  75. player setObjectTextureGlobal [0,_texture];
  76. waitUntil{uniform player != "U_B_CombatUniform_mcam_worn"};
  77. };
  78. };
  79.  
  80. [] spawn
  81. {
  82. private["_texture"];
  83. while {true} do
  84. {
  85. waitUntil{uniform player == "U_B_CombatUniform_mcam_vest"};
  86. _texture =
  87. switch (__GETC__(life_coplevel)) do
  88. {
  89. case 4: {"textures\police4.jpg"};
  90. case 5: {"textures\police4.jpg"};
  91. case 6: {"textures\police4.jpg"};
  92. case 7: {"textures\police4.jpg"};
  93. };
  94.  
  95. player setObjectTextureGlobal [0,_texture];
  96. waitUntil{uniform player != "U_B_CombatUniform_mcam_vest"};
  97. };
  98. };
  99.  
  100. player setVariable["coplevel", __GETC__(life_coplevel), true];
  101. private["_getRank"];
  102. _getRank = switch (__GETC__(life_coplevel)) do {case 1: {1}; case 2: {2}; case 3: {3}; case 4: {4}; case 5: {5}; case 6: {6}; default {0};};
  103. player setVariable["rank",(__GETC__(life_coplevel)),true];
  104. [] call life_fnc_spawnMenu;
  105. waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
  106. waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement