friquentin

Untitled

Sep 1st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 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 (side _unit isEqualTo west) exitWith {};
  14. if (player isEqualTo _unit) exitWith {};
  15. if (!isPlayer _unit) exitWith {};
  16. //Broadcast!
  17.  
  18. _unit setVariable ["playerSurrender",false,true];
  19. _unit setVariable ["restrained",true,true];
  20. [player] remoteExec ["max_restrain_fnc_restrain",_unit];
  21. [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