-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgangflags.sqf
58 lines (40 loc) · 1.33 KB
/
gangflags.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
liafu = true;
if(pickingup)exitwith{};
pickingup=true;
_this = _this select 3;
_gangarea = _this select 0;
_type = _this select 1;
if(!debug) then {
player playmove "AinvPknlMstpSlayWrflDnon_medic";
sleep 5;
waituntil {animationstate player != "AinvPknlMstpSlayWrflDnon_medic"};
};
if(_type == "neutralise")then {
private["_new_pos"];
[_gangarea] call flag_gang_setup;
_new_pos = [_gangarea, [0,0,0.5*-1]] call flag_gang_set_offset;
if((_new_pos select 2) <= -7)then {
_mygang = call INV_MyGang;
_control = _gangarea getvariable "control";
if(_mygang != "" and !isnil "_control")then {
_gangarea setvariable["control", nil, true];
format["hint ""%1 has been neutralised by %2!"";", _gangarea, _mygang] call broadcast;
};
};
};
if(_type == "capture")then {
private["_new_pos"];
[_gangarea] call flag_gang_setup;
_new_pos = [_gangarea, [0,0,2]] call flag_gang_set_offset;
//player groupchat format["_new_pos = %1", _new_pos];
if((_new_pos select 2) >= 0)then {
//[_gangarea, [0,0,0]] call flag_gang_reset_offset;
_mygang = call INV_MyGang;
_control = _gangarea getVariable "control";
if(_mygang != "" and isNil "_control")then {
_gangarea setVariable["control", _mygang, true];
format["hint ""%1 has been captured by %2!"";", _gangarea, _mygang] call broadcast;
};
};
};
pickingup=false;