Advertisement
Guest User

Untitled

a guest
Mar 17th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "..\..\script_macros.hpp"
  2. /*
  3.  File: fn_arrestAction.sqf
  4.  Author:
  5.  Description:
  6.  Arrests the targeted person.
  7. */
  8. private["_unit","_id","_time"]; // Hier ist ,"_time" hinzugekommen
  9. _unit = param [0,objNull,[objNull]];
  10. _time = param [1,30]; //das ist auch neu!
  11. if (isNull _unit) exitWith {}; //Not valid
  12. if (isNil "_unit") exitWith {}; //Not Valid
  13. if (!(_unit isKindOf "Man")) 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,east])) exitWith {}; // Hier habe ich die Fraktion East hinzugefügt, dies ist nur für mein Projekt wichtig
  17. if (isNull _unit) exitWith {}; //Not valid
  18. if (life_HC_isActive) then {
  19.  if(_time < 1) exitwith {}; //diese Abfrage wurde hinzugefügt.
  20.  [getPlayerUID _unit,_unit,player,false] remoteExecCall ["HC_fnc_wantedBounty",HC_Life];
  21. } else {
  22.  if(_time < 1) exitwith {}; //so wie diese Abfrage.
  23.  [getPlayerUID _unit,_unit,player,false] remoteExecCall ["life_fnc_wantedBounty",RSERV];
  24. };
  25. if (isNull _unit) exitWith {}; //Not valid
  26. detach _unit;
  27. /*
  28. [_unit,false] remoteExecCall ["life_fnc_jail",_unit];
  29. [0,"STR_NOTF_Arrested_1",true, [_unit getVariable ["realname",name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
  30. */
  31. //Das obere hab ich ausgeklammert. Wollte es nicht löschen.
  32. [_unit,false,_time] remoteExecCall ["life_fnc_jail",_unit]; //Dafür kam dies hinzu
  33. [0,"STR_NOTF_Arrested_1",true, [_unit getVariable ["realname",name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",RCLIENT]; // Das ist zwar das gleiche wie oben das auskommentierte. Wieso Warum es hier ist kA. :D
  34. if (LIFE_SETTINGS(getNumber,"player_advancedLog") isEqualTo 1) then {
  35.  if (LIFE_SETTINGS(getNumber,"battlEye_friendlyLogging") isEqualTo 1) then {
  36.  advanced_log = format [localize "STR_DL_AL_Arrested_BEF",_unit getVariable ["realname",name _unit]];
  37.  } else {
  38.  advanced_log = format [localize "STR_DL_AL_Arrested",profileName,(getPlayerUID player),_unit getVariable ["realname",name _unit]];
  39.  };
  40.  publicVariableServer "advanced_log";
  41. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement