-
Notifications
You must be signed in to change notification settings - Fork 309
Expand file tree
/
Copy pathfn_initCop.sqf
More file actions
33 lines (29 loc) · 1.01 KB
/
fn_initCop.sqf
File metadata and controls
33 lines (29 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "..\script_macros.hpp"
/*
File: fn_initCop.sqf
Author: Bryan "Tonic" Boardwine
Description:
Cop Initialization file.
*/
waitUntil {!(isNull (findDisplay 46))};
if (life_blacklisted) exitWith {
["Blacklisted",false,true] call BIS_fnc_endMission;
sleep 30;
};
if (!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then {
if ((FETCH_CONST(life_coplevel) isEqualTo 0) && (FETCH_CONST(life_adminlevel) isEqualTo 0)) then {
["NotWhitelisted",false,true] call BIS_fnc_endMission;
sleep 35;
};
};
private _rank = FETCH_CONST(life_coplevel);
private _paychecks = LIFE_SETTINGS(getArray,"paycheck_cop");
if (count _paychecks isEqualTo 1) then {
life_paycheck = _paychecks select 0;
} else {
life_paycheck = _paychecks select _rank;
};
player setVariable ["rank",_rank,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.