DayZ 1.8.0.3 handcuff player help

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
I just noticed this
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;
};
};
*/ /-------------------------------------------------------------------------------------------------------------
you comment it out but then you have this uncommented which might be interfering with it.
Code:
/-------------------------------------------------------------------------------------------------------------
 
I just noticed this
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;
};
};
*/ /-------------------------------------------------------------------------------------------------------------
you comment it out but then you have this uncommented which might be interfering with it.
Code:
/-------------------------------------------------------------------------------------------------------------
I was actually a bit worried about that myself, I'll try move the commenting to separate lines before start and after ending
 
I was actually a bit worried about that myself, I'll try move the commenting to separate lines before start and after ending
I'm saying that the ending portion of the comment you made to take out Graver's version left a random chunk of code in that was not commented out that could have effected SchwEde and mines version.
 
Also mine looks like this

//--------------------------------------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"">" + ("Handcuff ") +"</t>"), "Scripts\Investigation\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>"), "Scripts\Investigation\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>"), "Scripts\Investigation\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>"), "Scripts\Investigation\release.sqf",_cursorTarget, 1, true, true, "", ""];
};
} else {
player removeAction s_player_release;
s_player_release = -1;
};
};
//-------------------------------------------------------------------------------------------------------------
 
Although I see no specific write up for installing or setting this up.

Anyone confirm working as intended and 100%

If so maybe do a write up to clarify how. Might save the confusion.
 
Last edited:
I'm saying that the ending portion of the comment you made to take out Graver's version left a random chunk of code in that was not commented out that could have effected SchwEde and mines version.
yes i know what you mean and i agree, it may have effect, Renegade2k6 by removing the * from */ would render the block comment invalid, the //is for single row commenting. any code between */ and /* is commented out :)

Also the script is a WIP by inkko and schwede and not 100%, but a few pages back inkko actually explain how to set it up :)
 
Everything is working fine, except for the escort part. This is a bit more tricky, I will try to work on this the next days. Also it's not easy for Ikkno and me to meet each other because of the Timezones But I already have some Ideas how to get rid of some Bugs and Tell you guys later. For now you can use all except for the escorting without any problems \(^o^)/
 
Looking at Gravers, no idea what the imprison.sqf is but this fixes the detain for it and here is a my changes to Gravers that updates what we've done to the scripts. Hopefully I got it all correct.

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"equip_cable_tie";

    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 300;
        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";
};
};
/////////////////////////////////////////////////////////////////////////////////////




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";
};
 
ill try that in a few hours when im awake :) pulled an allnighter doing absolutely nothing of importance! thanks again mate :)
 
works like a charm Inkko, however if the person being detained has his gear window opened before being detained, he can use bandage to get "free" of the animation of sitting cuffed but not move or do anything, escorting a detained player has no stop escort option, you need to re detain the escorted player to stop escorting. Also getting into the drivers seat while escorting a detained player will let you drive away leaving the detained player behind, when you get out the detained player will TP to you and the escort will continue. Is there a way to add the escorted player to the backseat of the vehicle instead of leaving them behind?
 
SchwEde and I were trying to get it to put the player in the car but couldn't seem to get it to work. As for the stopping detaining, in our script its the same thing as detaining, it just skips over the medic animation.

I have it setup so that if someone does somehow manage to get "free" of being detained they are actually still stuck in that spot for 10min until re-detained.
 
I see, wouldnt it be easier to add a toggle to the escort instead? first press on escort attaches detained player to detainee, pressing escort again releases the detained player putting him back into sitting detained animation/state?
 
I see, wouldnt it be easier to add a toggle to the escort instead? first press on escort attaches detained player to detainee, pressing escort again releases the detained player putting him back into sitting detained animation/state?
In SchwEdes version there is a stop escort where it quickly puts the person back into the sitting position instead of having to do the medic action again.
 
Oh I might be able to just add that sqf and call it from gravers menu?

Added stop_escort this way:
Code:
_pathtoscrts = "Scripts\investigation\";
_EXECscrt = 'player execVM "'+_pathtoscrts+'%1"';
Investigation =
[
        ["",true],
        ["Investigation:", [-1], "", -5, [["expression", ""]], "1", "0"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
        ["Detain", [2],  "", -5, [["expression", format[_EXECscrt,"Detain.sqf"]]], "1", "1"],
        ["Search", [3],  "", -5, [["expression", format[_EXECscrt,"Search.sqf"]]], "1", "1"],
        ["Escort", [4],  "", -5, [["expression", format[_EXECscrt,"Escort.sqf"]]], "1", "1"],
        ["Stop Escort", [5],  "", -5, [["expression", format[_EXECscrt,"stop_escort.sqf"]]], "1", "1"],
        ["Release", [6],  "", -5, [["expression", format[_EXECscrt,"Release.sqf"]]], "1", "1"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
        ["Exit", [-1], "", -3, [["expression", ""]], "1", "1"]
];
showCommandingMenu "#USER:Investigation";
 
Last edited:
Working yet??
Try it on epoch?
I have SchwEdes and mines script we worked on together working on epoch 1.0.4.2 and 1.8.0.3. Gravers command menu seems to be working aswell. The escort portion is still a work in progress, but it all works well enough for use.

I'll update my first post with Gravers and then mine and SchwEdes install tomorrow sometime.

Also your picture makes me image chang saying whatever you posts lol...
 
Hahaha love that comment Inkko I picture him saying it as well and I've cAught myself saying his favorite phrase "you moder fakers" (intentionally typo to try to match his pronouncement lol)

Anyways yes it's working on epoch :)
 
Back
Top