-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHack-in 3rd-Person Scraps.sqf
68 lines (56 loc) · 1.61 KB
/
Hack-in 3rd-Person Scraps.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
hack3rd_script =
{
while {player getVariable ["hack3rd_active", false ]} do
{
vehicle player switchCamera "External";
};
};
_hack3rd_handle = player getVariable ["hack3rd_handle", objNull ];
if (!isNull _hack3rd_handle) then { terminate _hack3rd_handle; };
_hack3rd_handle = [] spawn hack3rd_script;
player setVariable ["hack3rd_handle", _hack3rd_handle, true ];
(findDisplay 46) displayAddEventHandler ["KeyDown",
{
_key = _this select 1;
if (_key == 25) then // HEX: 0x19 DEC: 25 KEY: P
{
_hack3rd_active = player getVariable ["hack3rd_active", false ];
if (_hack3rd_active) then
{
player setVariable ["hack3rd_active", false, true ];
}
else
{
player setVariable ["hack3rd_active", true, true ];
};
};
}];
/*
if (_button == 156) then // HEX: 0x9C DEC: 156 KEY: Numpad Enter
{
_hack3rd_active = player getVariable ["hack3rd_active", false ];
if (_hack3rd_active) then
{
player setVariable ["hack3rd_active", false, true ];
}
else
{
player setVariable ["hack3rd_active", true, true ];
};
};
*/
(findDisplay 46) displayAddEventHandler ["KeyDown",
{
params ["_displayorcontrol", "_key", "_shift", "_ctrl", "_alt"];
hint str _key;
}];
(findDisplay 46) displayAddEventHandler ["MouseButtonDown",
{
params ["_displayorcontrol", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"];
hint str _button;
}];
//inputAction personView;
//inputAction optics;
// if (inputAction "optics" > 0) then
// (findDisplay 46) displayRemoveAllEventHandlers "KeyDown";
// (findDisplay 46) displayRemoveAllEventHandlers "MouseButtonDown";