UrbanSkaters
Valued Member!
Introduction: This script prevents another player from accessing your backpack. I've set it up below for Epoch Trader Zones, but you can easily set it to ALWAYS ON which will work with most other DayZ mods too. This script will let you remove or access backpacks from dead players and will also let you pick up backpacks that aren't attached to another "live" player.
Installation Instructions:
1. I'm assuming you're going to put this script in a folder called Custom.
2. Create a new text file and call it anti_theft.sqf
3. Cut and Paste the following code into the anti_theft.sqf file and save it.
4. Edit your init.sqf and right at the bottom add: execVM "custom\anti_theft.sqf";
7. Now choose which version you want:
7a. Replace { !canbuild } with { alive player } if you want it on ALL the time, not just in the trader zones.
8. Repackage your mission file, upload and everything should work.
Just to clarify: The script below is currently set up for Epoch trading zones. But if you want to have the script run all the time on Epoch or any other DayZ mod then replace { !canbuild } with { alive player }
Installation Instructions:
1. I'm assuming you're going to put this script in a folder called Custom.
2. Create a new text file and call it anti_theft.sqf
3. Cut and Paste the following code into the anti_theft.sqf file and save it.
4. Edit your init.sqf and right at the bottom add: execVM "custom\anti_theft.sqf";
7. Now choose which version you want:
7a. Replace { !canbuild } with { alive player } if you want it on ALL the time, not just in the trader zones.
8. Repackage your mission file, upload and everything should work.
Just to clarify: The script below is currently set up for Epoch trading zones. But if you want to have the script run all the time on Epoch or any other DayZ mod then replace { !canbuild } with { alive player }
Code:
// Thanks to SilverShot for starting this script.
// Anti-Theft (Backpack) by Hayward
_fix = false;
while { !canbuild } do
{
sleep 0.2;
// Check if target is player and alive
if (alive cursorTarget && (cursorTarget isKindOf "Man")) then {
if( !isNull (FindDisplay 106) ) then
{
if( !_fix ) then
{
player action ["GEAR", ""];
titleText["\n\nCan only access your own gear.", "PLAIN DOWN",0];
_fix = true;
};
} else {
if( _fix ) then
{
_fix = false;
};
};
// If target is not a player then do nothing
} else {
};
};