Brave Sir Robin
Valued Member!
Hi guys. I have a duping script that works ok. Cudos to whoever wrote it I have no idea.
The problem i am having is that it uses the cursertarget as a reference so if a player tries to dupe and looks at the staorage box its fine, if they look away from it though it doesn't work.
I am sure you can change it to use nearEntities. This is the original:
And this is what I think:
This uses the DZE_LockableStorage and DZE_isNewStorage global variables to pick out the epoch storage.
The problem i am having is that it uses the cursertarget as a reference so if a player tries to dupe and looks at the staorage box its fine, if they look away from it though it doesn't work.
I am sure you can change it to use nearEntities. This is the original:
Code:
private ["_escMenu","_typf","_mxBckpcks"];
disableSerialization;
waitUntil {!isNull findDisplay 49};
_escMenu = findDisplay 49;
{
_typf = typeOf cursortarget;
_mxBckpcks = getNumber (configFile >> "CfgVehicles" >> _typf >> "transportmaxbackpacks");
if (!(isNull _x) && (canbuild) && !(_x == player || typeOf _x in ["WeaponHolder","DebugBoxPlayer_DZ"]) && (_mxBckpcks > 0)) exitWith
{
titleText ["<Anti-Dupe>: You cannot log out near a storage unit!", "PLAIN DOWN", 3];
systemchat "<Anti-Dupe>: You cannot log out near a storage unit!";
_escMenu closedisplay 0;
};
} foreach (nearestObjects [player, ["All"], 7.5]);
Code:
private ["_escMenu","_typf","_mxBckpcks"];
disableSerialization;
waitUntil {!isNull findDisplay 49};
_escMenu = findDisplay 49;
{
_typf = typeOf cursortarget;
_mxBckpcks = getNumber (configFile >> "CfgVehicles" >> _typf >> "transportmaxbackpacks");
if (!(isNull _x) && (canbuild) && !(_x == player || typeOf _x in ["WeaponHolder","DebugBoxPlayer_DZ"]) && (_mxBckpcks > 0)&& nearEntities [["DZE_LockableStorage","DZE_isNewStorage"],5]) exitWith
{
titleText ["<Anti-Dupe>: You cannot log out near a storage unit!", "PLAIN DOWN", 3];
systemchat "<Anti-Dupe>: You cannot log out near a storage unit!";
_escMenu closedisplay 0;
};
} foreach (nearestObjects [player, ["All"], 7.5]);