PLBJake 10 Posted September 7, 2011 Hey guys, i am wondering how to make it so i can restrain other players in PVP and they can do the same to me. I got it to work slightly but They somehow can restrain themselfs :confused: Is there any way i can avoid this? any help would be great :D Share this post Link to post Share on other sites
Guest Posted September 7, 2011 I got it to work slightly but They somehow can restrain themselfs :confused: Is there any way i can avoid this? If you want help post the script, or should people guess how you made your script and also guess what the error is which causes this behavior? Share this post Link to post Share on other sites
PLBJake 10 Posted September 7, 2011 Ah yes sorry. Here is whats in my SQF: private ["_target", "_id"];_target = _this select 0; _id = _this select 2; _target switchmove "CivilSitting02"; _target disableAI "ANIM"; _target removeAction _id; _target addAction ["Free,Restrain.sqf"] Share this post Link to post Share on other sites
demonized 20 Posted September 10, 2011 use conditions in the addaction: _action = _target addAction ["Restrain", "script.sqf", [], 1, false, true, "", [b]"_target != _this"[/b]]; the highlighted part means that the target of the action cannot be the user of the action. Share this post Link to post Share on other sites
PLBJake 10 Posted September 11, 2011 (edited) Ok Thank you. One more question. How can i add the action to units via scripts, instead of their init? Sorry for this question, i never made this kind of script before. Edited September 11, 2011 by PLBJake Share this post Link to post Share on other sites
Ranwer135 308 Posted January 31, 2014 Ok Thank you. One more question. How can i add the action to units via scripts, instead of their init? Sorry for this question, i never made this kind of script before. put this in your init.sqf so it activates the script you have wrote: [] execVM "myscript.sqf"; Share this post Link to post Share on other sites