SHOW:
|
|
- or go back to the newest paste.
1 | if(DZE_AllowForceSave) then { | |
2 | //--------------------------------------ARREST---------------------------------------------------------------- | |
3 | _side = side _cursorTarget == west; //so only Players can be detained | |
4 | _arrestreq = "PartGeneric" in magazines player; // CHANGE THIS TO THE ITEM YOU WANT PLAYERS TO NEED TO BE ABLE TO ARREST | |
5 | if (player getVariable "Detain" == 1) then { | |
6 | player removeAction s_player_arrest; | |
7 | }; | |
8 | if(_isMan && !_isZombie && _canDo && _isAlive && !_isAnimal && _arrestreq && _side) then { | |
9 | if (_cursorTarget getVariable "Detain" == 1) exitWith {}; | |
10 | if (s_player_arrest < 0) then { | |
11 | s_player_arrest = player addaction [("<t color=""#0074E8"">" + ("Detain") +"</t>"), "arrest\Detain.sqf",_cursorTarget,100,false,true,"", ""]; | |
12 | }; | |
13 | } else { | |
14 | player removeAction s_player_arrest; | |
15 | s_player_arrest = -1; | |
16 | }; | |
17 | if ((_cursorTarget getVariable "Detain" == 1) && cursorTarget distance player < 2 ) then | |
18 | { | |
19 | if(_isMan && !_isZombie && _canDo && _isAlive) then { | |
20 | if (s_player_escort < 0) then { | |
21 | s_player_escort = player addaction [("<t color=""#0074E8"">" + ("Escort") +"</t>"), "arrest\Escort.sqf",_cursorTarget, 1, true, true, "", ""]; | |
22 | }; | |
23 | } else { | |
24 | player removeAction s_player_escort; | |
25 | s_player_escort = -1; | |
26 | }; | |
27 | if(_isMan && !_isZombie && _canDo && _isAlive) then { | |
28 | if (s_player_search < 0) then { | |
29 | s_player_search = player addaction [("<t color=""#0074E8"">" + ("Search") +"</t>"), "arrest\Search.sqf",_cursorTarget, 1, true, true, "", ""]; | |
30 | }; | |
31 | } else { | |
32 | player removeAction s_player_search; | |
33 | s_player_search = -1; | |
34 | }; | |
35 | ||
36 | if(_isMan && !_isZombie && _canDo && _isAlive) then { | |
37 | if (s_player_release < 0) then { | |
38 | s_player_release = player addaction [("<t color=""#0074E8"">" + ("Release") +"</t>"), "arrest\release.sqf",_cursorTarget, 1, true, true, "", ""]; | |
39 | }; | |
40 | } else { | |
41 | player removeAction s_player_release; | |
42 | s_player_release = -1; | |
43 | }; | |
44 | }; | |
45 | //------------------------------------------------------------------------------------------------------------- | |
46 | //Allow player to force save | |
47 | - | if((_isVehicle or _isTent) and !_isMan) then { |
47 | + | if((_isVehicle or _isTent) and !_isMan) then { |
48 | ||
49 | ||
50 | ||
51 | ||
52 | Down Below I have added the below | |
53 | ||
54 | player removeAction s_player_SurrenderedGear; | |
55 | s_player_SurrenderedGear = -1; | |
56 | ||
57 | //Arrest | |
58 | player removeAction s_player_arrest; | |
59 | s_player_arrest = -1; | |
60 | player removeAction s_player_release; | |
61 | s_player_release = -1; | |
62 | player removeAction s_player_escort; | |
63 | s_player_escort = -1; | |
64 | player removeAction s_player_search; | |
65 | s_player_search = -1; | |
66 | ||
67 | //Others | |
68 | player removeAction s_player_forceSave; | |
69 | s_player_forceSave = -1; |