-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy paths_genThreadChecker.sqf
47 lines (46 loc) · 1.98 KB
/
s_genThreadChecker.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
/*──────────────────────────────────────────────────────┐
│ Author: Connor │
│ Steam: https://steamcommunity.com/id/_connor │
│ Github: https://github.com/ConnorAU │
│ │
│ Please do not modify or remove this comment block │
└──────────────────────────────────────────────────────*/
private _genThreadChecker = {
params ['_threadType','_reasonVar','_objID','_threadVar','_hijackVar','_hijackValueMax'];
("
if (!isNil "+str _threadVar+" && {"+_threadVar+" isEqualType scriptNull}) then {
if (isNull "+_threadVar+") then {
_"+_reasonVar+" = ['tc01','"+_threadType+"'];
} else {
if !(['Unsuspicious Thread Name',str "+_threadVar+"] call BIS_fnc_inString) then {
(getplayeruid player) call {"+_clientDataDump+"};
_"+_reasonVar+" = ['tc04',['"+_threadType+"',"+_threadVar+"]];
};
};
} else {
private _o = objectFromNetId "+str _objID+";
private _s = _o getVariable ["+str _threadVar+",scriptNull];
if (isNull _s) then {
_"+_reasonVar+" = ['tc01','"+_threadType+"'];
} else {
"+_threadVar+" = _s;
if !(['Unsuspicious Thread Name',str "+_threadVar+"] call BIS_fnc_inString) then {
(getplayeruid player) call {"+_clientDataDump+"};
_"+_reasonVar+" = ['tc04',['"+_threadType+"',"+_threadVar+"]];
};
};
};
call _"+_checkFlaggedStatusVar+";
" + (if (count _hijackVar == 0) then {""} else {"
if (isNil "+(str _hijackVar)+") then {
_"+_reasonVar+" = ['tc02','"+_threadType+"'];
"+_hijackVar+" = 1;
} else {
if ("+_hijackVar+" >= "+(str _hijackValueMax)+") then {
_"+_reasonVar+" = ['tc03',['"+_threadType+"',"+_hijackVar+",round diag_fps,getpos player]];
};
"+_hijackVar+" = "+_hijackVar+" + 1;
};
call _"+_checkFlaggedStatusVar+";
"}));
};