Advertisement
Veticus

Arma 3* Restrain Script {Public}

May 27th, 2014
577
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. // Created by νєтι¢υѕ. This is a public source to anyone who wishes to have it
  2. // This script allows you to restrain and unrestrain a target. Good for military hostage situations and a lot more that anyone could think of.
  3. //------------------------------------------------------------------------------------------------------------------------------
  4. // First create a .sqf file called "restrain.sqf". And place the script below into it.
  5. //------------------------------------------------------------------------------------------------------------------------------
  6. private ["_Suspect"];
  7. _Suspect = cursorTarget;
  8. if (alive _Suspect) then {
  9. if (!(_Suspect in playableUnits)) exitWith {};
  10. if (_Suspect distance player > 3 || (!(_Suspect isKindOf "Man"))) exitWith {};
  11. _Suspect attachTo [player,[0.6,0.3,0]];
  12. player groupChat "Detained Target";
  13. };
  14. //------------------------------------------------------------------------------------------------------------------------------
  15. // then create another .sqf file called "unrestrain.sqf". And place the script below into it.
  16. //------------------------------------------------------------------------------------------------------------------------------
  17. private ["_Suspect"];
  18. _Suspect = cursorTarget;
  19. if (alive _Suspect) then {
  20. if (!(_Suspect in playableUnits)) exitWith {};
  21. if (_Suspect distance player > 3 || (!(_Suspect isKindOf "Man"))) exitWith {};
  22. detach _Suspect;
  23. player groupChat "Undetained Target";
  24. };
  25. //------------------------------------------------------------------------------------------------------------------------------
  26. // This is what you add to you "init.sqf" or whatever addAction array to execute the script(s) above.
  27. //------------------------------------------------------------------------------------------------------------------------------
  28. player addAction ["<t size='1'>[Restrain]</t>", "restrain.sqf", [], 1, false, true, 'true'];
  29. player addAction ["<t size='1'>[Unrestrain]</t>", "unrestrain.sqf", [], 1, false, true, 'true'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement