forked from LexTheGreat/TLX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
copcams.sqf
53 lines (41 loc) · 1.49 KB
/
copcams.sqf
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
private ["_camera"];
private["_array", "_art", "_moneh"];
_array = _this select 3;
_art = _array select 0;
_moneh = [player, 'money'] call INV_GetItemAmount;
if (_art == "jailcam") then {
_camera = "camera" camCreate [(getPosATL prison_logic select 0)+40,(getPosATL prison_logic select 1),20];
if (!(createDialog "MainCamDialog")) exitWith {hint "Dialog Error!";};
[0,0,0,["camcontrol",_camera,[10,30]]] execVM "copcams.sqf";
_camera cameraEffect ["internal", "back"];
_camera camSetPos [(getPosATL prison_logic select 0)+40,(getPosATL prison_logic select 1),20];
_camera camSetTarget prison_logic;
_camera camSetFOV 0.700;
_camera camPreload 5;
_camera camCommit 0;
};
if (_art == "camcontrol") then {
_camera = _array select 1;
_zoom = _array select 2;
buttonSetAction [25, format["camUseNVG true;"] ];
buttonSetAction [26, format["camUseNVG false;"] ];
buttonSetAction [28, format["closeDialog 0;"] ];
sliderSetRange [10, (_zoom select 0), (_zoom select 1)];
sliderSetSpeed [10, 0.05, 0.25];
sliderSetRange [11, 0, 200];
sliderSetSpeed [11, 0.05, 20];
_slider1 = 0;
_slider2 = 0;
while {(ctrlVisible 1050)} do {
if ( (sliderPosition 10) != _slider1 ) then {
_slider1 = (round(sliderPosition 10));
};
if ( (sliderPosition 11) != _slider2 ) then {
_slider2 = (sliderPosition 11);if (_slider2 < 600) then {setAperture _slider2;}else{setAperture -1;};
};
sleep 0.1;
};
_camera cameraEffect ["terminate","back"];
titleCut [" ","Black in",1];
camDestroy _camera;
};