-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRestrain.sqf
More file actions
29 lines (22 loc) · 1.42 KB
/
Restrain.sqf
File metadata and controls
29 lines (22 loc) · 1.42 KB
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
_civ = civmenuciv;
//=====================================UNRESTRAIN=========================================
if(animationstate _civ == "inbasemoves_handsbehindback1") exitwith {
_civ setvariable["fucked",false,true];
(format ["[%1, 0, 0] call setPitchBank;%1 switchmove ""%2""; ", _civ, "amovppnemstpsnonwnondnon"]) call broadcast;
player groupchat "You released the civilian!";
};
//==================================RESTRAIN=========================================
if(vehicle _civ != _civ)exitwith{player groupchat "The civ is in a vehicle!"};
if (!(_civ call ISSE_IsVictim)) exitwith {player groupchat localize "STRS_inventory_checknohands"};
call compile format['SFXPvEh_%1 = ["%2","restrainsfx"];',rolenumber,rolestring];
publicVariable format["SFXPvEh_%1", rolenumber];
vehicle player say ["restrainsfx",100];
_civ setvariable["fucked",true,true];
_civ setvariable["fuckedpos",getpos _civ,true];
(format ["%1 switchmove ""%2"";[%1, -82, 0] call setPitchBank;", _civ, "inbasemoves_handsbehindback1"]) call broadcast;
_wanted = call compile format ["%1_wanted", _civ];
if (_wanted == 1) then {
(format['server globalchat "%3 ~WANTED~ was restrained by %2";if (rolestring == "%1") then {execVM "Unrestrain.sqf";}', _civ, name player, name _civ]) call broadcast;
} else {
(format['server globalchat "%3 was restrained by %2";if (rolestring == "%1") then {execVM "Unrestrain.sqf";}', _civ, name player, name _civ]) call broadcast;
};