DayZ 1.8.0.3 handcuff player help

I'm actually gonna start working on this again now that I have some free time from all my other little projects, so hopefully I'll be able to get some work done on it.

Thats good to hear, if you need help in any way let me know :)
 
Everything but the Escort portion seems to be functioning fine.
For Epoch I have it setup like this so far:

In fn_selfaction.sqf add:
Code:
_side = side _cursorTarget == west; //so only Players can be detained
    _string = "PartGeneric" in magazines player;
right below
Code:
_isVehicle = _cursorTarget isKindOf "AllVehicles";
then further down in fn_selfactions add this:
Code:
    //--------------------------------------ARREST----------------------------------------------------------------
    if (player getVariable "Detain" == 1) then {
    player removeAction s_player_arrest;
    };
        if(_isMan && !_isZombie && _canDo && _isAlive && !_isAnimal && _string && _side) then {
            if (s_player_arrest < 0) then {
                s_player_arrest = player addaction [("<t color=""#0074E8"">" + ("Detain") +"</t>"), "ATPExclusion\Detain.sqf","",100,false,true,"", ""];
                };
        } else {
            player removeAction s_player_arrest;
            s_player_arrest = -1;
            };
    if ((_cursorTarget getVariable "Detain" == 1) && cursorTarget distance player < 2 ) then
    {
        if(_isMan && !_isZombie && _canDo && _isAlive) then {
            if (s_player_escort < 0) then {
                s_player_escort = player addaction [("<t color=""#0074E8"">" + ("Escort") +"</t>"), "ATPExclusion\Escort.sqf",_cursorTarget, 1, true, true, "", ""];
                };
        } else {
            player removeAction s_player_escort;
            s_player_escort = -1;
            };
        if(_isMan && !_isZombie && _canDo && _isAlive) then {
            if (s_player_search < 0) then {
                s_player_search = player addaction [("<t color=""#0074E8"">" + ("Search") +"</t>"), "ATPExclusion\Search.sqf",_cursorTarget, 1, true, true, "", ""];
                };
        } else {
            player removeAction s_player_search;
            s_player_search = -1;
            };

        if(_isMan && !_isZombie && _canDo && _isAlive) then {
            if (s_player_release < 0) then {
                s_player_release = player addaction [("<t color=""#0074E8"">" + ("Release") +"</t>"), "ATPExclusion\release.sqf",_cursorTarget, 1, true, true, "", ""];
                };
        } else {
            player removeAction s_player_release;
            s_player_release = -1;
            };
    };
    //-------------------------------------------------------------------------------------------------------------
right above
Code:
if(DZE_AllowForceSave) then {
        //Allow player to force save
        if((_isVehicle or _isTent) and !_isMan) then {
            if (s_player_forceSave < 0) then {
                s_player_forceSave = player addAction [format[localize "str_actions_save",_text], "\z\addons\dayz_code\actions\forcesave.sqf",_cursorTarget, 1, true, true, "", ""];
            };
        } else {
            player removeAction s_player_forceSave;
            s_player_forceSave = -1;
        };
    };
Then near the very bottom of fn_selfaction.sqf add this:
Code:
//Arrest
    player removeAction s_player_arrest;
    s_player_arrest = -1;
    player removeAction s_player_release;
    s_player_release = -1;
    player removeAction s_player_escort;
    s_player_escort = -1;
    player removeAction s_player_search;
    s_player_search = -1;
right above the //other comment

In the main directory of your mission folder create a folder called ATPExclusion (if you do not have it).

add these files into it the ATPExclusion folder and pack up your mission pbo. https://www.dropbox.com/s/os02dh33mr1eqjc/ATPExclusion.rar <- Includes an fn_selfaction to look at but don't use.

SchwEde and I worked on this last night trying to improve the escort functionality but we ended up not getting anything to work. We did however get most of the bugs out of the other portions of the script such as being able to use a bandage to get out of being detained.
 
Last edited:
Nice but it looks like you have the escort covered? Did you mean imprison part?
I tried to make all the files look neater, and commented on pretty much everything but..
Detain - use required to place player under arrest, leaves them sitting with hands behind back
Escort - player attached to arrester; bugs include getting in vehicles while escorting players (causes them to tp to you when getting out), being able to let them go in buildings/cars if you're quick ect.
Stop Escort - Same thing as detain
Gear - You can check players gear while detained.
Release - 15 sec timer once medic animations starts then anything done to the player is removed.
 
Did you add the function to force player to drop primary and secondary weapons upon detention? If not they will be able to fire while detained?

Forcing the player to do the surrender emotion in game will have them drop weapons, but not many players know about this keybind
 
Did you add the function to force player to drop primary and secondary weapons upon detention? If not they will be able to fire while detained?

Forcing the player to do the surrender emotion in game will have them drop weapons, but not many players know about this keybind
I updated my post above cause I forgot one part in getting it to work, but the detention doesn't let players do anything. They can only look around and type. They cannot shoot, they cannot open their gear. They can logout i believe but that is about it.
 
Great ill try your script at next server restart, is there any way to add humanity requirements as well?
 
_humanity = player getVariable["humanity",0];
if ((_cursorTarget getVariable "Detain" == 1) && (cursorTarget distance player < 2 ) && (_humanity > 4000)) then {
....
};
maybe something like this?
 
Btw the string that's needed for detaining, is that actually in days epoch ? Thought that was a days vanilla item
 
Inkko took a Scrap Metal for it:
like you can see here:
Code:
_string = "PartGeneric" in magazines player;
 
Inkko took a Scrap Metal for it:
like you can see here:
Code:
_string = "PartGeneric" in magazines player;

found suspicious code:
Code:
_string = "PartGeneric" in magazines player;
Should be?:
Code:
_string = "PartGeneric" in _magazinesPlayer;
 
nope its:
_string = "PartGeneric" in magazines player;

have you tried it without the humanity check?
 
Never tried the humanity check, just used your code as Inko wrote it, check my pastebin a few posts up
 
oh see its this part ^^
Code:
/* /--------------------------------------ARREST----------------------------------------------------------------
    if ((player getVariable"humanity") >= 9000) then {
        if(_isMan && !_isZombie && _canDo && _isAlive) then {
            if (s_player_arrest < 0) then {
                s_player_arrest = player addaction ['<t color="#0074E8">' + "Investigation Menu" + '</t>', "Scripts\Investigation\investigation.sqf","",100,false,true,"", ""];
                };
        } else {
            player removeAction s_player_arrest;
            s_player_arrest = -1;
            };
    };
*/ /-------------------------------------------------------------------------------------------------------------

What about your Self-BB is working or not? Maybe your whole fn_selfaction is not working anymore
 
that is a commented out part of a working arrest script, all other scripts called in my fn_selfAction file is working but not yours :/
 
i can only see my client rpt not the server rpt sadly

this is my current fn_selfactions.sqf with all added scripts working, your arrest script is however commented out.

http://pastebin.com/tt20c73U


You could just update Graver's version with the code from what SchwEde and I came up with. I'll look through it all right now and update his really fast. SchwEde and I mainly just fixes the detain portion where players can access gear and get out of being detained that way.
 
Back
Top