Ahhh should have guessed that was the issue. Thank youIn 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.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Ahhh should have guessed that was the issue. Thank youIn 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.
My bad was running on no sleep xDAhhh should have guessed that was the issue. Thank youbtw it's in escort.sqf
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.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).
Try taking a look at my video.Sorry but 17 pages is a bit too much to wade through. Anyone got this working on 1.7.7.x code? I'm running namalsk and would love to add this. Maybe I placed it wrong though, not sure..
If somebody could take a look? http://pastebin.com/GKjzKMV7
if (canbuild) then {
cutText [format["Cannot detain in safezones!"], "PLAIN"];
} else {
detain script portion
};
I think thats it, just couldn't remember off the top of my head.if (!canbuild) then {
cutText [format["Cannot detain in safezones!"], "PLAIN"];
} else {
detain script portion
};
thx
_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";
};
//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;
};
};
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.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 therethanks 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.
//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;
};
};
*/
_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";
};
};
/////////////////////////////////////////////////////////////////////////////////////
_newCiv = cursorTarget;
player action ["Gear", _newCiv];
_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;
};
};
_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 think you just need to add an if statement for the attach to cans to make admins not attached to cans.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
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.Would that still allow admins to be detained, searched and escorted though?