xJordannx 1 Posted January 7, 2013 Hey, I was wondering if anybody could make me a script where if you get near to a player, you'll get an option to "Handcuff" them which will make them switch to the animation: ActsPsitMstpSnonWunaDnon_sceneNikitinDisloyalty_Sykes And then an option to "Uncuff" which will uncuff them. Thanks. Share this post Link to post Share on other sites
Mattar_Tharkari 10 Posted January 7, 2013 You searched for it? - I found one when trying to answer your 'hands behind head' question the other day. It's here in this part of the forum somewhere. Share this post Link to post Share on other sites
xJordannx 1 Posted January 7, 2013 You searched for it? - I found one when trying to answer your 'hands behind head' question the other day. It's here in this part of the forum somewhere. I tried searching but all I can seem to find is player on AI not player on player. Share this post Link to post Share on other sites
hogmason 2 Posted January 8, 2013 (edited) Here you go............ in your init.sqf place if (local player) then //"now you need this in multiplayer to luanch on client side not server side" { if ((side player) == east) then {execVM "interigate.sqf"}; }; interigate.sqf = this adds the action to east players player setVehicleInit "this addAction ['Detain!', 'detain.sqf']"; processInitCommands; detain.sqf = this will let a west player detain the east player place them on grouns and cuff them then adds 2 new action for players to order the prisoner to follow them or uncuff him _suspect = _this select 0; _interigator = _this select 1; _interigate_action = _this select 2; _suspect removeAction _interigate_action; _suspect disableAI "MOVE"; _suspect setcaptive true; _interigator switchMove "AinvPknlMstpSnonWrflDnon_medic3"; _suspect switchMove "boundCaptive_loop"; sleep 5; _interigator switchMove ""; hint "Taliban Suspect Detained, and ready for transport to Command Center for Interigating."; // arrest him _suspect setVehicleInit "this addAction ['Order to follow!', 'follow.sqf'];"; processInitCommands; // let him go / uncuff him _suspect setVehicleInit "this addAction ['uncuff him!', 'uncuff.sqf'];"; processInitCommands; uncuff.sqf _prisoner = _this select 0; _guard = _this select 1; _act = _this select 2; _prisoner setskill 1; _prisoner EnableAI "MOVE"; _prisoner switchMove ""; hint "Suspect released."; follow.sqf = this commands the prisoner to follow the west player. also if the west player dies the prisoner will go back to being handcuffed on ground ready for another player to detain him. _prisoner = _this select 0; _guard = _this select 1; _act = _this select 2; _prisoner removeAction _act; [_prisoner] joinSilent _guard; _prisoner setskill 1; _prisoner EnableAI "MOVE"; _prisoner switchMove ""; while {true} do { if (!alive _guard) exitwith { _prisoner disableAI "MOVE"; _suspect setcaptive true; _suspect switchMove "boundCaptive_loop"; _prisoner setVehicleInit "this addAction ['Order to follow!', 'follow.sqf'];"; processInitCommands; [player,nil,rgroupChat,"Escorter Down!!! someone get the Prisoner"] call RE; }; sleep 3; }; diddnt have time to test it but should work :) Edited January 8, 2013 by hogmason Share this post Link to post Share on other sites
xJordannx 1 Posted January 8, 2013 (edited) Here you go............in your init.sqf place if (local player) then //"now you need this in multiplayer to luanch on client side not server side" { if ((side player) == east) then {execVM "interigate.sqf"}; }; interigate.sqf = this adds the action to east players player setVehicleInit "this addAction ['Detain!', 'detain.sqf']"; processInitCommands; detain.sqf = this will let a west player detain the east player place them on grouns and cuff them then adds 2 new action for players to order the prisoner to follow them or uncuff him _suspect = _this select 0; _interigator = _this select 1; _interigate_action = _this select 2; _suspect removeAction _interigate_action; _suspect disableAI "MOVE"; _suspect setcaptive true; _interigator switchMove "AinvPknlMstpSnonWrflDnon_medic3"; _suspect switchMove "boundCaptive_loop"; sleep 5; _interigator switchMove ""; hint "Taliban Suspect Detained, and ready for transport to Command Center for Interigating."; // arrest him _suspect setVehicleInit "this addAction ['Order to follow!', 'follow.sqf'];"; processInitCommands; // let him go / uncuff him _suspect setVehicleInit "this addAction ['uncuff him!', 'uncuff.sqf'];"; processInitCommands; uncuff.sqf _prisoner = _this select 0; _guard = _this select 1; _act = _this select 2; _prisoner setskill 1; _prisoner EnableAI "MOVE"; _prisoner switchMove ""; hint "Suspect released."; follow.sqf = this commands the prisoner to follow the west player. also if the west player dies the prisoner will go back to being handcuffed on ground ready for another player to detain him. _prisoner = _this select 0; _guard = _this select 1; _act = _this select 2; _prisoner removeAction _act; [_prisoner] joinSilent _guard; _prisoner setskill 1; _prisoner EnableAI "MOVE"; _prisoner switchMove ""; while {true} do { if (!alive _guard) exitwith { _prisoner disableAI "MOVE"; _suspect setcaptive true; _suspect switchMove "boundCaptive_loop"; _prisoner setVehicleInit "this addAction ['Order to follow!', 'follow.sqf'];"; processInitCommands; [player,nil,rgroupChat,"Escorter Down!!! someone get the Prisoner"] call RE; }; sleep 3; }; diddnt have time to test it but should work :) Hey, thanks for that, I haven't tried it yet because I thought of something else that I'd like added with that. Basically, I want the person that's cuffed to have an option to "Break out of cuffs", which would take 15 secs and they'd be able to break out, do you think you could do this? Thanks. EDIT: I have a script to make the player put his hands on his head when he presses the 1 key: case 2: { player switchMove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon"; }; Would you also be able to make it so you can only Handcuff a player that has their hands on their head? Thanks. Edited January 8, 2013 by xJordannx Share this post Link to post Share on other sites
hogmason 2 Posted January 8, 2013 yeah mate thats easy, i have to change a few things as well like only us players can see the addactions that cuff the east player then ill add an addaction to the east player that only east players see once detained to escape. Also thinking maybe you should have a array of random select from 1-4 that makes the east player try to escape but he fails so that all east players cant just escape everytime you cuff them. gives the mission a bit of randomality. ill add that as well if you dont like it just delete it out of the code. Any ways ill get on to it tonight. Share this post Link to post Share on other sites
xJordannx 1 Posted January 8, 2013 That sounds great, thanks very much. Share this post Link to post Share on other sites
Bosh 1 Posted February 3, 2017 Is there any way to make this arrest script work on AI? Particularly civilians spawned by the Alice module. Thanks! Share this post Link to post Share on other sites