DayZ 1.8.0.3 handcuff player help

In Detain.sqf i have it linking to the wrong folder. You'd need to change the Stop Escorting action thats in detain.sqf and change the location to wherever you placed the file.
Ahhh should have guessed that was the issue. Thank you :D btw it's in escort.sqf
 
Awesome addon! Works perfectly so far.

I watched my players make a human centipede with it yesterday. If that isn't a sign of a good sandbox I don't know what is.

Only thing I miss is an option for loading detainees into vehicles. Is anyone any closer to getting this to work? Could one perhaps steal some code from the "load patient" script if it is not broken in vanilla DayZ (it is not working in Epoch atm).
 
Awesome addon! Works perfectly so far.

I watched my players make a human centipede with it yesterday. If that isn't a sign of a good sandbox I don't know what is.

Only thing I miss is an option for loading detainees into vehicles. Is anyone any closer to getting this to work? Could one perhaps steal some code from the "load patient" script if it is not broken in vanilla DayZ (it is not working in Epoch atm).
I tried using the load patient script from vanilla dayz and getting it to work with the arrest script and it seemed extremely broken. I got it semi working at one point then messed it all up and lost my progress. It was adding the option to load them in, but it was adding an infinite amount of options for some reason and there was no way to get the player back out.
 
Okay so this was working for the longest time, but when I updated my anti-hack it removed my flags. I re-added them all and this is the only script that I get kicked for Public Variable #0. I checked my publicvairable log and that flag is already in their that it is kicking me for. I also using novalines version from page 8. Thanks for the help in advance.
 
I'd love to get this working without selfactions and instead in my extra_rc.hpp, but I'm a bit of a scripting noob. Could someone please tell me if this syntax would work? I don't really care about the checks if the player has humanity or is a player zed, as EvMoney is only available to my admins.

class EvMoney {
class Use {
text = "Detain Player";
script = "execVM '"arrest\Detain.sqf",_cursorTarget,100,false,true,"", ""'";
};
};
 
In detain.sqf I just added a if statement for canbuild, so that way people couldn't get detained in safezones but they could still be escorted into one. it was something like this

Code:
if (canbuild) then {
cutText [format["Cannot detain in safezones!"], "PLAIN"];
} else { 
detain script portion
};
 
Does anyone have an idea how i'd be able to make it so my admins are able to self-release themselves, seeing as it completely disables the scrollwheel or the ability to TP etc its kind of bad when a player needs help, i did try this in a custom release script

Code:
_newCiv = player;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";

// Dont need alive check incase they're dead
if(_isMan && _dist < 10) then {
// Removing temp can just in case
    _objects = nearestObjects [player, ["Can_Small"], 50];
    _objects = _objects select 0;
    deleteVehicle _objects;
    detach _newCiv; // Just in case
    // animation reset
    [objNull, _newCiv, rswitchmove,""] call RE;

    player forceWalk False;
    // Public Var
    _newCiv setVariable ["Detain",0,true];
    PVDZ_ply_Arrst = _newCiv;
    publicVariable "PVDZ_ply_Arrst";
};

The only change i made is _newCiv = player rather than cursor target and i also added this to fn_selfActions under the main code block

Code:
//Admin Release
    if ((getPlayerUID player) in ["155812550","153301574","147902918"]) then {
        if (_isMan and _isAlive and !inSafeZone and !_isZombie and !_isAnimal) then {
            if (s_player_adinvest < 0) then {
                s_player_adinvest = player addAction [("<t color='#ffa500'>")+("Admin Release")+("</t>"), "custom\investigation\AdminRelease.sqf",cursorTarget, 5, false, true, "",""];
            };
        } else {
            player removeAction s_player_adinvest;
            s_player_adinvest = -1;
        };
    };

It works but of course the scroll wheel is unavailable during being detained i'm half way there :D thanks in advance
 
Does anyone have an idea how i'd be able to make it so my admins are able to self-release themselves, seeing as it completely disables the scrollwheel or the ability to TP etc its kind of bad when a player needs help, i did try this in a custom release script

Code:
_newCiv = player;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";

// Dont need alive check incase they're dead
if(_isMan && _dist < 10) then {
// Removing temp can just in case
    _objects = nearestObjects [player, ["Can_Small"], 50];
    _objects = _objects select 0;
    deleteVehicle _objects;
    detach _newCiv; // Just in case
    // animation reset
    [objNull, _newCiv, rswitchmove,""] call RE;

    player forceWalk False;
    // Public Var
    _newCiv setVariable ["Detain",0,true];
    PVDZ_ply_Arrst = _newCiv;
    publicVariable "PVDZ_ply_Arrst";
};

The only change i made is _newCiv = player rather than cursor target and i also added this to fn_selfActions under the main code block

Code:
//Admin Release
    if ((getPlayerUID player) in ["155812550","153301574","147902918"]) then {
        if (_isMan and _isAlive and !inSafeZone and !_isZombie and !_isAnimal) then {
            if (s_player_adinvest < 0) then {
                s_player_adinvest = player addAction [("<t color='#ffa500'>")+("Admin Release")+("</t>"), "custom\investigation\AdminRelease.sqf",cursorTarget, 5, false, true, "",""];
            };
        } else {
            player removeAction s_player_adinvest;
            s_player_adinvest = -1;
        };
    };

It works but of course the scroll wheel is unavailable during being detained i'm half way there :D thanks in advance
I guess it would depend on which version you are using. If you have the detaincheck.sqf then you'd need to modify that to make admins able to use scroll wheel options while detained.
 
I guess it would depend on which version you are using. If you have the detaincheck.sqf then you'd need to modify that to make admins able to use scroll wheel options while detained.

I'm using a modified version of i believe yours? I use the addAction method

fn_selfActions.sqf

Code:
//Player Detain, Search, Release
    if (_isMan and _isAlive and !inSafeZone and !_isZombie and !_isAnimal) then {
        if (s_player_investo < 0) then {
            s_player_investo = player addAction [("<t color='#ffa500'>")+("Detain")+("</t>"), "custom\investigation\Detain.sqf",cursorTarget, 5, false, true, "",""];
          };
        if (s_player_investoTwo < 0) then {
            s_player_investoTwo = player addAction [("<t color='#ffa500'>")+("Search")+("</t>"), "custom\investigation\Search.sqf",cursorTarget, 5, false, true, "",""];
        };
        if (s_player_investoThree < 0) then {
            s_player_investoThree = player addAction [("<t color='#ffa500'>")+("Escort")+("</t>"), "custom\investigation\Escort.sqf",cursorTarget, 5, false, true, "",""];
        };
        if (s_player_investoFour < 0) then {
            s_player_investoFour = player addAction [("<t color='#ffa500'>")+("Release")+("</t>"), "custom\investigation\Release.sqf",cursorTarget, 5, false, true, "",""];
        };
    } else {
        player removeAction s_player_investo;
        s_player_investo = -1;
        player removeAction s_player_investoTwo;
        s_player_investoTwo = -1;
        player removeAction s_player_investoThree;
        s_player_investoThree = -1;
        player removeAction s_player_investoFour;
        s_player_investoFour = -1;
    };
   
    /*
    //Admin Release
    if ((getPlayerUID player) in ["155812550","153301574","147902918"]) then {
        if (_isMan and _isAlive and !inSafeZone and !_isZombie and !_isAnimal) then {
            if (s_player_adinvest < 0) then {
                s_player_adinvest = player addAction [("<t color='#ffa500'>")+("Admin Release")+("</t>"), "custom\investigation\AdminRelease.sqf",cursorTarget, 5, false, true, "",""];
            };
        } else {
            player removeAction s_player_adinvest;
            s_player_adinvest = -1;
        };
    };
    */

Detain.sqf

Code:
_newCiv = cursorTarget;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";
_isAlive = alive _newCiv;
detach _newCiv;    // Just incase

/////////////////////////////////////////////////////////////////////////////////////
if(_dist < 10 && _isMan && _isAlive) then {
    // removing required...
    player removeMagazine"PartGeneric";

    sleep 1;

    player playActionNow "Medic";
    // Hint
    cutText [format["Your hostage is tied up for the next 10 minutes!"], "PLAIN"];
    systemChat ('Your hostage is tied up for the next 10 minutes!');

    // Public Var
    _newCiv setVariable ["Detain",1,true];
    PVDZ_ply_Arrst = _newCiv;
    publicVariable "PVDZ_ply_Arrst";

    // Creates temp can and attaches to player
    _dir = getdir vehicle player;
    _pos = getPos vehicle player;
    _pos = [(_pos select 0)+1.5*sin(_dir),(_pos select 1)+1.5*cos(_dir),0];
    _item = createVehicle ["Can_Small", _pos, [], 0.0, "CAN_COLLIDE"];
    _item setPosATL _pos;
    _item setDir _dir;
    _newCiv attachto [_item,[0, 0, 0]];

    //animation sitting arrested
    [objNull, _newCiv, rswitchmove ,"CivilSitting"] call RE;
    //---------Timer for Release----------------
if (_newCiv getVariable "Detain" == 1) then {
        sleep 600;
        detach _newCiv;
        _objects = nearestObjects [player, ["Can_Small"], 50];
        _objects = _objects select 0;
        deleteVehicle _objects;
        [objNull, _newCiv, rswitchmove,""] call RE;
        _newCiv setVariable ["Detain",0,true];
        PVDZ_ply_Arrst = _newCiv;
        publicVariable "PVDZ_ply_Arrst";
};
};
/////////////////////////////////////////////////////////////////////////////////////

Search.sqf

Code:
_newCiv = cursorTarget;
player action ["Gear", _newCiv];

Escort.sqf

Code:
_newCiv = cursorTarget;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";
detach _newCiv;    // Just incase

// set cursortarget to variable
_cursorTarget = cursorTarget;

_isMan = _cursorTarget isKindOf "Man";
_isAlive = alive _cursorTarget;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if(_isMan && _isAlive && _dist < 10) then {

[objNull, _newCiv, rSwitchMove,""] call RE; // Just incase
detach _newCiv; // Just incase

// Deleting temp can
_objects = nearestObjects [player, ["Can_Small"], 50];
_objects = _objects select 0;
deleteVehicle _objects;

[objNull, _newCiv, rswitchmove,"UUnaErc_UnaErcPoslechVelitele"] call RE;
player forceWalk True;
[objNull, _newCiv, rforceWalk,true] call RE;
_newCiv attachTo [player,[0,1,0]];
_newCiv setVariable ["Escort","1",true];
if (_newCiv getVariable "Escort" == 1) then {
sleep 600;
[objNull, _newCiv, rswitchmove,""] call RE;
detach _newCiv;

};
};

Release.sqf

Code:
_newCiv = cursorTarget;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";

// Dont need alive check incase they're dead
if(_isMan && _dist < 10) then {
// Removing temp can just in case
    _objects = nearestObjects [player, ["Can_Small"], 50];
    _objects = _objects select 0;
    deleteVehicle _objects;
    detach _newCiv; // Just in case
    // animation reset
    [objNull, _newCiv, rswitchmove,""] call RE;

    player forceWalk False;
    // Public Var
    _newCiv setVariable ["Detain",0,true];
    PVDZ_ply_Arrst = _newCiv;
    publicVariable "PVDZ_ply_Arrst";
};_newCiv = cursorTarget;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";

// Dont need alive check incase they're dead
if(_isMan && _dist < 10) then {
// Removing temp can just in case
    _objects = nearestObjects [player, ["Can_Small"], 50];
    _objects = _objects select 0;
    deleteVehicle _objects;
    detach _newCiv; // Just in case
    // animation reset
    [objNull, _newCiv, rswitchmove,""] call RE;

    player forceWalk False;
    // Public Var
    _newCiv setVariable ["Detain",0,true];
    PVDZ_ply_Arrst = _newCiv;
    publicVariable "PVDZ_ply_Arrst";
};

I'm not fussed about having to change the method i use in order to keep these features but i do definitely need a way for my admins to release themselves when necessary
 
I'm using a modified version of i believe yours? I use the addAction method

fn_selfActions.sqf

Code:
//Player Detain, Search, Release
    if (_isMan and _isAlive and !inSafeZone and !_isZombie and !_isAnimal) then {
        if (s_player_investo < 0) then {
            s_player_investo = player addAction [("<t color='#ffa500'>")+("Detain")+("</t>"), "custom\investigation\Detain.sqf",cursorTarget, 5, false, true, "",""];
          };
        if (s_player_investoTwo < 0) then {
            s_player_investoTwo = player addAction [("<t color='#ffa500'>")+("Search")+("</t>"), "custom\investigation\Search.sqf",cursorTarget, 5, false, true, "",""];
        };
        if (s_player_investoThree < 0) then {
            s_player_investoThree = player addAction [("<t color='#ffa500'>")+("Escort")+("</t>"), "custom\investigation\Escort.sqf",cursorTarget, 5, false, true, "",""];
        };
        if (s_player_investoFour < 0) then {
            s_player_investoFour = player addAction [("<t color='#ffa500'>")+("Release")+("</t>"), "custom\investigation\Release.sqf",cursorTarget, 5, false, true, "",""];
        };
    } else {
        player removeAction s_player_investo;
        s_player_investo = -1;
        player removeAction s_player_investoTwo;
        s_player_investoTwo = -1;
        player removeAction s_player_investoThree;
        s_player_investoThree = -1;
        player removeAction s_player_investoFour;
        s_player_investoFour = -1;
    };
  
    /*
    //Admin Release
    if ((getPlayerUID player) in ["155812550","153301574","147902918"]) then {
        if (_isMan and _isAlive and !inSafeZone and !_isZombie and !_isAnimal) then {
            if (s_player_adinvest < 0) then {
                s_player_adinvest = player addAction [("<t color='#ffa500'>")+("Admin Release")+("</t>"), "custom\investigation\AdminRelease.sqf",cursorTarget, 5, false, true, "",""];
            };
        } else {
            player removeAction s_player_adinvest;
            s_player_adinvest = -1;
        };
    };
    */

Detain.sqf

Code:
_newCiv = cursorTarget;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";
_isAlive = alive _newCiv;
detach _newCiv;    // Just incase

/////////////////////////////////////////////////////////////////////////////////////
if(_dist < 10 && _isMan && _isAlive) then {
    // removing required...
    player removeMagazine"PartGeneric";

    sleep 1;

    player playActionNow "Medic";
    // Hint
    cutText [format["Your hostage is tied up for the next 10 minutes!"], "PLAIN"];
    systemChat ('Your hostage is tied up for the next 10 minutes!');

    // Public Var
    _newCiv setVariable ["Detain",1,true];
    PVDZ_ply_Arrst = _newCiv;
    publicVariable "PVDZ_ply_Arrst";

    // Creates temp can and attaches to player
    _dir = getdir vehicle player;
    _pos = getPos vehicle player;
    _pos = [(_pos select 0)+1.5*sin(_dir),(_pos select 1)+1.5*cos(_dir),0];
    _item = createVehicle ["Can_Small", _pos, [], 0.0, "CAN_COLLIDE"];
    _item setPosATL _pos;
    _item setDir _dir;
    _newCiv attachto [_item,[0, 0, 0]];

    //animation sitting arrested
    [objNull, _newCiv, rswitchmove ,"CivilSitting"] call RE;
    //---------Timer for Release----------------
if (_newCiv getVariable "Detain" == 1) then {
        sleep 600;
        detach _newCiv;
        _objects = nearestObjects [player, ["Can_Small"], 50];
        _objects = _objects select 0;
        deleteVehicle _objects;
        [objNull, _newCiv, rswitchmove,""] call RE;
        _newCiv setVariable ["Detain",0,true];
        PVDZ_ply_Arrst = _newCiv;
        publicVariable "PVDZ_ply_Arrst";
};
};
/////////////////////////////////////////////////////////////////////////////////////

Search.sqf

Code:
_newCiv = cursorTarget;
player action ["Gear", _newCiv];

Escort.sqf

Code:
_newCiv = cursorTarget;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";
detach _newCiv;    // Just incase

// set cursortarget to variable
_cursorTarget = cursorTarget;

_isMan = _cursorTarget isKindOf "Man";
_isAlive = alive _cursorTarget;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

if(_isMan && _isAlive && _dist < 10) then {

[objNull, _newCiv, rSwitchMove,""] call RE; // Just incase
detach _newCiv; // Just incase

// Deleting temp can
_objects = nearestObjects [player, ["Can_Small"], 50];
_objects = _objects select 0;
deleteVehicle _objects;

[objNull, _newCiv, rswitchmove,"UUnaErc_UnaErcPoslechVelitele"] call RE;
player forceWalk True;
[objNull, _newCiv, rforceWalk,true] call RE;
_newCiv attachTo [player,[0,1,0]];
_newCiv setVariable ["Escort","1",true];
if (_newCiv getVariable "Escort" == 1) then {
sleep 600;
[objNull, _newCiv, rswitchmove,""] call RE;
detach _newCiv;

};
};

Release.sqf

Code:
_newCiv = cursorTarget;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";

// Dont need alive check incase they're dead
if(_isMan && _dist < 10) then {
// Removing temp can just in case
    _objects = nearestObjects [player, ["Can_Small"], 50];
    _objects = _objects select 0;
    deleteVehicle _objects;
    detach _newCiv; // Just in case
    // animation reset
    [objNull, _newCiv, rswitchmove,""] call RE;

    player forceWalk False;
    // Public Var
    _newCiv setVariable ["Detain",0,true];
    PVDZ_ply_Arrst = _newCiv;
    publicVariable "PVDZ_ply_Arrst";
};_newCiv = cursorTarget;
_dist = player distance _newCiv;
_isMan = _newCiv isKindOf "Man";

// Dont need alive check incase they're dead
if(_isMan && _dist < 10) then {
// Removing temp can just in case
    _objects = nearestObjects [player, ["Can_Small"], 50];
    _objects = _objects select 0;
    deleteVehicle _objects;
    detach _newCiv; // Just in case
    // animation reset
    [objNull, _newCiv, rswitchmove,""] call RE;

    player forceWalk False;
    // Public Var
    _newCiv setVariable ["Detain",0,true];
    PVDZ_ply_Arrst = _newCiv;
    publicVariable "PVDZ_ply_Arrst";
};

I'm not fussed about having to change the method i use in order to keep these features but i do definitely need a way for my admins to release themselves when necessary
I think you just need to add an if statement for the attach to cans to make admins not attached to cans.
 
Would that still allow admins to be detained, searched and escorted though?
They could still be detained, searched, and all that but they wouldn't be attached to a can to keep them in place and could use the bandage bug to get outta the detain. If you used infistar antihack then you could write a script to release oneself and if you wanted to could make it so you could release anyone with the tools. I think the being attached to cans is what makes scroll menus not work, but at the same time its what stops a couple bugs.
 
Back
Top