LeventHAN

discord2

Sep 10th, 2018
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_restrainAction.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Restrains the target.
  8. */
  9. private ["_unit"];
  10. _unit = cursorObject;
  11. if (isNull _unit) exitWith {}; //Not valid
  12. if (player distance _unit > 3) exitWith {};
  13. if (_unit getVariable "restrained") exitWith {};
  14. if (side _unit isEqualTo west) exitWith {};
  15. if (player isEqualTo _unit) exitWith {};
  16. if (!isPlayer _unit) exitWith {};
  17. //Broadcast!
  18.  
  19. _unit setVariable ["playerSurrender",false,true];
  20. _unit setVariable ["restrained",true,true];
  21. [player] remoteExec ["life_fnc_restrain",_unit];
  22. [0,"STR_NOTF_Restrained",true,[_unit getVariable ["realname", name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",west];
Advertisement
Add Comment
Please, Sign In to add comment