|
1 | | -#include "..\..\script_macros.hpp" |
2 | | -/* |
3 | | - File: fn_arrestAction.sqf |
4 | | - Author: |
5 | | -
|
6 | | - Description: |
7 | | - Arrests the targeted person. |
8 | | -*/ |
9 | | -private ["_unit","_id"]; |
10 | | -_unit = param [0,objNull,[objNull]]; |
11 | | -if (isNull _unit) exitWith {}; //Not valid |
12 | | -if (isNil "_unit") exitWith {}; //Not Valid |
13 | | -if (!(_unit isKindOf "CAManBase")) exitWith {}; //Not a unit |
14 | | -if (!isPlayer _unit) exitWith {}; //Not a human |
15 | | -if (!(_unit getVariable "restrained")) exitWith {}; //He's not restrained. |
16 | | -if (!((side _unit) in [civilian,independent])) exitWith {}; //Not a civ |
17 | | - |
18 | | -if (life_HC_isActive) then { |
19 | | - [getPlayerUID _unit,_unit,player,false] remoteExecCall ["HC_fnc_wantedBounty",HC_Life]; |
20 | | -} else { |
21 | | - [getPlayerUID _unit,_unit,player,false] remoteExecCall ["life_fnc_wantedBounty",RSERV]; |
22 | | -}; |
23 | | - |
24 | | -if (isNull _unit) exitWith {}; //Not valid |
25 | | -detach _unit; |
26 | | -[_unit,false] remoteExecCall ["life_fnc_jail",_unit]; |
27 | | -[0,"STR_NOTF_Arrested_1",true, [_unit getVariable ["realname",name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; |
28 | | - |
29 | | -if (LIFE_SETTINGS(getNumber,"player_advancedLog") isEqualTo 1) then { |
30 | | - if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then { |
31 | | - advanced_log = format [localize "STR_DL_AL_Arrested_BEF",_unit getVariable ["realname",name _unit]]; |
32 | | - } else { |
33 | | - advanced_log = format [localize "STR_DL_AL_Arrested",profileName,(getPlayerUID player),_unit getVariable ["realname",name _unit]]; |
34 | | - }; |
35 | | - publicVariableServer "advanced_log"; |
36 | | -}; |
| 1 | +#include "..\..\script_macros.hpp" |
| 2 | +/* |
| 3 | + File: fn_arrestAction.sqf |
| 4 | + Author: |
| 5 | +
|
| 6 | + Description: |
| 7 | + Arrests the targeted person. |
| 8 | +*/ |
| 9 | +params [ |
| 10 | + ["_unit", objNull, [objNull]] |
| 11 | +]; |
| 12 | + |
| 13 | +if (isNull _unit || {!isPlayer _unit}) exitWith {}; //Not valid |
| 14 | +if !(_unit getVariable "restrained") exitWith {}; //He's not restrained. |
| 15 | +if !((side _unit) in [civilian,independent]) exitWith {}; //Not a civ |
| 16 | + |
| 17 | +if (life_HC_isActive) then { |
| 18 | + [getPlayerUID _unit,_unit,player,false] remoteExecCall ["HC_fnc_wantedBounty",HC_Life]; |
| 19 | +} else { |
| 20 | + [getPlayerUID _unit,_unit,player,false] remoteExecCall ["life_fnc_wantedBounty",RSERV]; |
| 21 | +}; |
| 22 | + |
| 23 | +detach _unit; |
| 24 | +[_unit,false] remoteExecCall ["life_fnc_jail",_unit]; |
| 25 | +[0,"STR_NOTF_Arrested_1",true, [_unit getVariable ["realname",name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; |
| 26 | + |
| 27 | +if (LIFE_SETTINGS(getNumber,"player_advancedLog") isEqualTo 1) then { |
| 28 | + if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then { |
| 29 | + advanced_log = format [localize "STR_DL_AL_Arrested_BEF",_unit getVariable ["realname",name _unit]]; |
| 30 | + } else { |
| 31 | + advanced_log = format [localize "STR_DL_AL_Arrested",profileName,(getPlayerUID player),_unit getVariable ["realname",name _unit]]; |
| 32 | + }; |
| 33 | + publicVariableServer "advanced_log"; |
| 34 | +}; |
0 commit comments