Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <macro.h>
- /*
- File: fn_initCop.sqf
- Author: Bryan "Tonic" Boardwine
- Description:
- Cop Initialization file.
- */
- private["_end"];
- player addRating 9999999;
- waitUntil {!(isNull (findDisplay 46))};
- _end = false;
- if(life_blacklisted) exitWith
- {
- ["Blacklisted",false,true] call BIS_fnc_endMission;
- sleep 30;
- };
- if((__GETC__(life_coplevel) == 0) && (__GETC__(life_adminlevel) == 0)) then {
- ["NotWhitelisted",false,true] call BIS_fnc_endMission;
- sleep 35;
- };
- switch (__GETC__(life_coplevel)) do
- {
- case 1: {life_paycheck = life_paycheck + 1000;};
- case 2: {life_paycheck = life_paycheck + 2000;};
- case 3: {life_paycheck = life_paycheck + 3000;};
- case 4: {life_paycheck = life_paycheck + 4000;};
- case 5: {life_paycheck = life_paycheck + 5000;};
- case 6: {life_paycheck = life_paycheck + 6000;};
- case 7: {life_paycheck = life_paycheck + 7000;};
- };
- [] spawn
- {
- private["_texture"];
- while {true} do
- {
- waitUntil{uniform player == "U_B_CombatUniform_mcam_worn"};
- _texture =
- switch (__GETC__(life_coplevel)) do
- {
- case 0: {"textures\police.jpg"};
- case 1: {"textures\police.jpg"};
- case 2: {"textures\police.jpg"};
- case 3: {"textures\police.jpg"};
- case 4: {"textures\police.jpg"};
- case 5: {"textures\police.jpg"};
- case 6: {"textures\police.jpg"};
- case 7: {"textures\police.jpg"};
- };
- player setObjectTextureGlobal [0,_texture];
- waitUntil{uniform player != "U_Rangemaster"};
- };
- };
- [] spawn
- {
- private["_texture"];
- while {true} do
- {
- waitUntil{uniform player == "U_B_CombatUniform_mcam_worn"};
- _texture =
- switch (__GETC__(life_coplevel)) do
- {
- case 3: {"textures\police3.jpg"};
- case 4: {"textures\police3.jpg"};
- case 5: {"textures\police3.jpg"};
- case 6: {"textures\police3.jpg"};
- case 7: {"textures\police3.jpg"};
- };
- player setObjectTextureGlobal [0,_texture];
- waitUntil{uniform player != "U_B_CombatUniform_mcam_worn"};
- };
- };
- [] spawn
- {
- private["_texture"];
- while {true} do
- {
- waitUntil{uniform player == "U_B_CombatUniform_mcam_vest"};
- _texture =
- switch (__GETC__(life_coplevel)) do
- {
- case 4: {"textures\police4.jpg"};
- case 5: {"textures\police4.jpg"};
- case 6: {"textures\police4.jpg"};
- case 7: {"textures\police4.jpg"};
- };
- player setObjectTextureGlobal [0,_texture];
- waitUntil{uniform player != "U_B_CombatUniform_mcam_vest"};
- };
- };
- player setVariable["coplevel", __GETC__(life_coplevel), true];
- private["_getRank"];
- _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};};
- player setVariable["rank",(__GETC__(life_coplevel)),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.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement