Jump to content
  • 0

Losing connection dupe bug - Please help to fix it!


Fansky

Question

Hey guys, iam there to find a possibility that this duping glitch will do not work any more!

I think most of you know that bug, if you do not know, its better for you to do not know it ;)

 

Isn't there a solution, where every player who is losing connection ( or not connected to the server at this moment ) will get a stucked or freezed screen ?

 

Maybe with this fine commands client-side:

if not connected to server:
disableuserinput true; // player cant do anything (duper cant put his backpack down or into a car/shed/whatever)

and if connected again:

disableuserinput false; // could do everything again.

 

or another solution, where the player is unable to abort while losing connection - or got into combat while losing connection

 

or kicking every player, who aborded to lobby ( bad solution but better then let the whole world dupe - in general this dupe wont work with alt+F4/Shift+P etc couz you got disconnected )

 

or making players unable to abort near everything with a storage OR near a backpack lying on the ground (I think MGT got a nice fix like this but you could also dupe with lying backpack to the ground - maybe share your fix with us)

 

By MGT:

Added: Anti-Dupe. If you try and log out or disconnect near a storage item (safe/lockbox/vehicle/shed etc) with an identical backpack in, it will give an alarm and ask you to move away to disconnect. This is not for server restarts, this is only for clients who disconnect, abort, right shift and P or lose connection near storage.

 

The Problem making this dupe to work is, that the player will only abort to lobby and did not disconnect from server!

 

 

 

Please everyone who realy know wich duping method i mean, try to help and find a solution making this nice game better :=)

Please everyone who do not know iam talking about, please do not start to find a fix for your problems in this thread.

 

Much thanks to everyone who could help ;)

Link to comment
Share on other sites

Recommended Posts

  • 0

I have no idea how to figure out what the dialog number of the chain icons (red, yellow) are.

But these could be detected like killzone kid does it in his blog post for speech icon and channel name here:

http://killzonekid.com/arma-scripting-tutorials-whos-talking/

 

If the icon is detected the player is not allowed anymore to do this or that. But how to figure out the icon/dialog number?

Link to comment
Share on other sites

  • 0

server_functions.sqf :

cad_pvar_shared_var = 0; cad_pvar_server_answer = 1;
"cad_pvar_shared_var" addPublicVariableEventHandler {
	owner (_this select 1) publicVariableClient "cad_pvar_server_answer";
};

script called via Onpause in description.ext:

private ["_time_count"];
cad_pvar_shared_var = player; cad_pvar_server_answer = 0; _time_count = diag_tickTime;
publicVariableServer "cad_pvar_shared_var";
while {diag_tickTime - _time_count < 8 && cad_pvar_server_answer == 0 } do {sleep 0.05;};
if (cad_pvar_server_answer == 0) exitWith {
	(findDisplay 49) closedisplay 0;
};

I dont know from which person it was, only thing i know was that it was in the anti dupe thread which looks like it got deleted for whatever reason,

 

Its simple but efficient, its send a variable to the event handler which got added in the server_functions, if the eventhandler answers it sends the "cad_pvar_server_answer" variable with a value of 1 back, if not the variable stay on default (0) and the person is not able to disconnect via escape. (closes instantly the escape menu)

Link to comment
Share on other sites

  • 0

sorry, maybe a bit noob question, but how do you install this?

just adding the following lines to the files? should that do it?

Yes,

In your server pbo. Add to the bottom of server_functions.sqf

cad_pvar_shared_var = 0; cad_pvar_server_answer = 1;
"cad_pvar_shared_var" addPublicVariableEventHandler {
	owner (_this select 1) publicVariableClient "cad_pvar_server_answer";
};

It will look something like this

server_logUnlockLockEvent = {
	private["_player", "_obj", "_objectID", "_objectUID", "_statusText", "_status"];
	_player = _this select 0;
	_obj = _this select 1;
	_status = _this select 2;
	if (!isNull(_obj)) then {
		_objectID = _obj getVariable["ObjectID", "0"];
		_objectUID = _obj getVariable["ObjectUID", "0"];
		_statusText = "UNLOCKED";
		if (_status) then {
			[_obj, "gear"] call server_updateObject;
			_statusText = "LOCKED";
		};
		diag_log format["SAFE %5: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (getPlayerUID _player), _statusText];
	};
};
cad_pvar_shared_var = 0; cad_pvar_server_answer = 1;
"cad_pvar_shared_var" addPublicVariableEventHandler {
	owner (_this select 1) publicVariableClient "cad_pvar_server_answer";
};
execVM "\z\addons\dayz_server\init\broadcaster.sqf";

Now in your mission pbo

Make a folder called Fixes. Then make a sqf file called DupingFix.sqf and place it inside the Fixes folder.

Place this code inside DupingFix.sqf

private ["_time_count"];
cad_pvar_shared_var = player; cad_pvar_server_answer = 0; _time_count = diag_tickTime;
publicVariableServer "cad_pvar_shared_var";
while {diag_tickTime - _time_count < 8 && cad_pvar_server_answer == 0 } do {sleep 0.05;};
if (cad_pvar_server_answer == 0) exitWith {
	(findDisplay 49) closedisplay 0;
};

Open description.ext and find

onPauseScript = "";

Change to

onPauseScript = "Fixes\DupingFix.sqf";

In your publicvariable.txt add this to the end of line 2

!="cad_pvar_shared_var" 

All done.

Now when ever a player pull's there internet cord and hits ESC and try's to log out to the lobby, this script runs and if it detects connection lost it will close the ESC menu at 2 secs left and not let them log out to do the dupe. They will have two choices. 1) plug back in cord and continue playing. 2) alt F4 and re-connect. NO matter what choice they pick the dupe will not happen because it requires them to go to lobby then back in-game. The items they try to dupe will be on there character still or inside the storage container, never both.

Link to comment
Share on other sites

  • 0

Another duplication issue involved Safes. I believe the fix was as follows:

 

Unpack your dayz_code.pbo, copy the vault_lock.sqf out of /actions. Sticking to the instructions posted thus far, paste vault_lock.sqf into the Fixes directory (or whatever directory of your choosing).

 

The default vault_lock should be:

private ["_obj"];
_obj = _this select 3;
_obj spawn player_lockVault;

You want to replace with:

private ["_obj"];
 
disableuserinput true;disableuserinput true;disableuserinput true;
systemchat "You may not move while locking this.";
sleep 0.1;
_obj = _this select 3;
_obj spawn player_lockVault;

sleep 6.5;
disableuserinput false;disableuserinput false;disableuserinput false;
systemchat "You may now move!";

Then you need to edit the directory path inside fn_selfActions.sqf:

	//Allow owner to pack vault
	if(_typeOfCursorTarget in DZE_UnLockedStorage && _ownerID != "0" && (player distance _cursorTarget < 3)) then {

		if (s_player_lockvault < 0) then {
			if(_ownerID == dayz_combination || _ownerID == dayz_playerUID) then {
				s_player_lockvault = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "Fixes\vault_lock.sqf",_cursorTarget, 0, false, true, "",""];
			};
		};

I'm fairly sure this is correct, if I missed something someone will surely let us know.

Link to comment
Share on other sites

  • 0

Another duplication issue involved Safes. I believe the fix was as follows:

 

Unpack your dayz_code.pbo, copy the vault_lock.sqf out of /actions. Sticking to the instructions posted thus far, paste vault_lock.sqf into the Fixes directory (or whatever directory of your choosing).

 

The default vault_lock should be:

private ["_obj"];
_obj = _this select 3;
_obj spawn player_lockVault;

You want to replace with:

private ["_obj"];
 
disableuserinput true;disableuserinput true;disableuserinput true;
systemchat "You may not move while locking this.";
sleep 0.1;
_obj = _this select 3;
_obj spawn player_lockVault;

sleep 6.5;
disableuserinput false;disableuserinput false;disableuserinput false;
systemchat "You may now move!";

Then you need to edit the directory path inside fn_selfActions.sqf:

	//Allow owner to pack vault
	if(_typeOfCursorTarget in DZE_UnLockedStorage && _ownerID != "0" && (player distance _cursorTarget < 3)) then {

		if (s_player_lockvault < 0) then {
			if(_ownerID == dayz_combination || _ownerID == dayz_playerUID) then {
				s_player_lockvault = player addAction [format[localize "STR_EPOCH_ACTIONS_LOCK",_text], "Fixes\vault_lock.sqf",_cursorTarget, 0, false, true, "",""];
			};
		};

I'm fairly sure this is correct, if I missed something someone will surely let us know.

Link to comment
Share on other sites

  • 0

I've solved it like this as disableUserInput does not allow the user to look around anymore. I hope that this solves it ,))

 

/*
    DayZ Lock Safe
    Usage: [_obj] spawn player_unlockVault;
    Made for DayZ Epoch please ask permission to use/edit/distrubute email [email protected].
*/
private ["_gearkey","_gearkeylist","_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_alreadyPacking","_lockedClass","_text","_playerNear"];

if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_10") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;

//_gearkeylist = actionKeysNamesArray ["Gear", 1];
//##_gearkeylist = actionKeys "Gear";
//##_gearkey = _gearkeylist select 0;
//##systemChat(format ["Gear Key: %1", _gearkey]);
//noGkey = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) == (parseNumber _gearkey)) then { true }"];

noGkey = (findDisplay 46) displayAddEventHandler ["KeyDown", "true"];
noGothers = (findDisplay  46) displayAddEventHandler ["test", "closeDisplay 1; waitUntil { isNull (FindDisplay 106) };"];

player removeAction s_player_lockvault;
s_player_lockvault = 1;

_obj = _this;
_objType = typeOf _obj;

_lockedClass = getText (configFile >> "CfgVehicles" >> _objType >> "lockedClass");
_text =         getText (configFile >> "CfgVehicles" >> _objType >> "displayName");

// Silently exit if object no longer exists
if(isNull _obj) exitWith { DZE_ActionInProgress = false; };
[1,1] call dayz_HungerThirst;
player playActionNow "Medic";
sleep 1;
[player,"tentpack",0,false] call dayz_zombieSpeak;
sleep 5;
                        
_playerNear = _obj call dze_isnearest_player;
if(_playerNear) exitWith
    {
    DZE_ActionInProgress = false;
    cutText [(localize "str_epoch_player_11") , "PLAIN DOWN"];
    (findDisplay 46) displayRemoveEventHandler ["KeyDown", noGkey];
    (findDisplay 46) displayRemoveEventHandler ["test", noGothers];
    };

_ownerID = _obj getVariable["CharacterID","0"];
_objectID     = _obj getVariable["ObjectID","0"];
_objectUID    = _obj getVariable["ObjectUID","0"];

if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith {DZE_ActionInProgress = false; s_player_lockvault = -1; cutText [format[(localize "str_epoch_player_115"),_text], "PLAIN DOWN"]; };

_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {DZE_ActionInProgress = false; s_player_lockvault = -1; cutText [format[(localize "str_epoch_player_116"),_text], "PLAIN DOWN"]};
_obj setVariable["packing",1];

_dir = direction _obj;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];

if(!isNull _obj) then {

    //force vault save just before locking
    PVDZE_veh_Update = [_obj,"gear"];
    publicVariableServer "PVDZE_veh_Update";

    //place vault
    _holder = createVehicle [_lockedClass,_pos,[], 0, "CAN_COLLIDE"];
    _holder setdir _dir;
    _holder setPosATL _pos;
    player reveal _holder;
    
    _holder setVariable["CharacterID",_ownerID,true];
    _holder setVariable["ObjectID",_objectID,true];
    _holder setVariable["ObjectUID",_objectUID,true];
    _holder setVariable ["OEMPos", _pos, true];

    PVDZE_obj_setlocalVars = [_obj,_holder,player];
    publicVariableServer "PVDZE_obj_setlocalVars";

(findDisplay 46) displayRemoveEventHandler ["KeyDown", noGkey];
(findDisplay 106) displayRemoveEventHandler ["test", noGothers];

    cutText [format[(localize "str_epoch_player_117"),_text], "PLAIN DOWN"];
};
s_player_lockvault = -1;
DZE_ActionInProgress = false;

//disableUserInput true;
//disableUserInput false;

 

Maybe someone can test it again to let me know (I am not sure if I did understand the dupe correctly) ;)

Maybe both approaches should be combined...but I thought this issue had been fixed with the newest epoch?

Link to comment
Share on other sites

  • 0

server_functions.sqf :

cad_pvar_shared_var = 0; cad_pvar_server_answer = 1;
"cad_pvar_shared_var" addPublicVariableEventHandler {
	owner (_this select 1) publicVariableClient "cad_pvar_server_answer";
};

script called via Onpause in description.ext:

private ["_time_count"];
cad_pvar_shared_var = player; cad_pvar_server_answer = 0; _time_count = diag_tickTime;
publicVariableServer "cad_pvar_shared_var";
while {diag_tickTime - _time_count < 8 && cad_pvar_server_answer == 0 } do {sleep 0.05;};
if (cad_pvar_server_answer == 0) exitWith {
	(findDisplay 49) closedisplay 0;
};

I dont know from which person it was, only thing i know was that it was in the anti dupe thread which looks like it got deleted for whatever reason,

 

Its simple but efficient, its send a variable to the event handler which got added in the server_functions, if the eventhandler answers it sends the "cad_pvar_server_answer" variable with a value of 1 back, if not the variable stay on default (0) and the person is not able to disconnect via escape. (closes instantly the escape menu)

 

Thanks to StiflersM0M, jahangir13 and syco for your help! That solved my problem and it seems to work fine ;)

Link to comment
Share on other sites

  • 0

server_functions.sqf :

cad_pvar_shared_var = 0; cad_pvar_server_answer = 1;
"cad_pvar_shared_var" addPublicVariableEventHandler {
	owner (_this select 1) publicVariableClient "cad_pvar_server_answer";
};

script called via Onpause in description.ext:

private ["_time_count"];
cad_pvar_shared_var = player; cad_pvar_server_answer = 0; _time_count = diag_tickTime;
publicVariableServer "cad_pvar_shared_var";
while {diag_tickTime - _time_count < 8 && cad_pvar_server_answer == 0 } do {sleep 0.05;};
if (cad_pvar_server_answer == 0) exitWith {
	(findDisplay 49) closedisplay 0;
};

I dont know from which person it was, only thing i know was that it was in the anti dupe thread which looks like it got deleted for whatever reason,

 

Its simple but efficient, its send a variable to the event handler which got added in the server_functions, if the eventhandler answers it sends the "cad_pvar_server_answer" variable with a value of 1 back, if not the variable stay on default (0) and the person is not able to disconnect via escape. (closes instantly the escape menu)

This doesn't work because they dont dupe by hitting escape, they dupe by pulling out their ethernet cord or disconnecting their internet briefly.  I dont see their being an easy fix that will make everyone happy. The fix will either be really strict and you'll have a lot of complaints by players, or won't really work and you'll still have duping.

Link to comment
Share on other sites

  • 0

This doesn't work because they dont dupe by hitting escape, they dupe by pulling out their ethernet cord or disconnecting their internet briefly.  I dont see their being an easy fix that will make everyone happy. The fix will either be really strict and you'll have a lot of complaints by players, or won't really work and you'll still have duping.

To finish the dupe you need to quickly go back to the lobby which you cant can. 

 

But even if you want that the player have to crash the client, just disable his userinput instead of close the escape menu.

 

Just replace 

(findDisplay 49) closedisplay 0;

with 

disableUserInput true;disableUserInput true;disableUserInput true;
Link to comment
Share on other sites

  • 0

I am just working on a solution,

 

i am thought about replace the abort button function, new function would kick you directly in the main menu instead of the lobby, but i cant add the function because the player_onpuase script replace the function everytime.

 

So i am thought about add a key eventhandler which close the current dialog if you press Escape and create a new main menu, that is actually working but i need to know the function that opens the options menu.

 

//edit ok i found the dialog name its "RscDisplayOptions" however, i cant find the code where it adds the functions to the menu.... maybe someone else can help me with it ? i do not like displays and dialogs....

Link to comment
Share on other sites

  • 0

I am just working on a solution,

 

i am thought about replace the abort button function, new function would kick you directly in the main menu instead of the lobby, but i cant add the function because the player_onpuase script replace the function everytime.

 

So i am thought about add a key eventhandler which close the current dialog if you press Escape and create a new main menu, that is actually working but i need to know the function that opens the options menu.

 

//edit ok i found the dialog name its "RscDisplayOptions" however, i cant find the code where it adds the functions to the menu.... maybe someone else can help me with it ? i do not like displays and dialogs....

I think you're old way IS working I was just being stupid. Do you not like your old way?

Link to comment
Share on other sites

  • 0

Yes,

In your server pbo. Add to the bottom of server_functions.sqf

cad_pvar_shared_var = 0; cad_pvar_server_answer = 1;
"cad_pvar_shared_var" addPublicVariableEventHandler {
	owner (_this select 1) publicVariableClient "cad_pvar_server_answer";
};

It will look something like this

server_logUnlockLockEvent = {
	private["_player", "_obj", "_objectID", "_objectUID", "_statusText", "_status"];
	_player = _this select 0;
	_obj = _this select 1;
	_status = _this select 2;
	if (!isNull(_obj)) then {
		_objectID = _obj getVariable["ObjectID", "0"];
		_objectUID = _obj getVariable["ObjectUID", "0"];
		_statusText = "UNLOCKED";
		if (_status) then {
			[_obj, "gear"] call server_updateObject;
			_statusText = "LOCKED";
		};
		diag_log format["SAFE %5: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (getPlayerUID _player), _statusText];
	};
};
cad_pvar_shared_var = 0; cad_pvar_server_answer = 1;
"cad_pvar_shared_var" addPublicVariableEventHandler {
	owner (_this select 1) publicVariableClient "cad_pvar_server_answer";
};
execVM "\z\addons\dayz_server\init\broadcaster.sqf";

Now in your mission pbo

Make a folder called Fixes. Then make a sqf file called DupingFix.sqf and place it inside the Fixes folder.

Place this code inside DupingFix.sqf

private ["_time_count"];
cad_pvar_shared_var = player; cad_pvar_server_answer = 0; _time_count = diag_tickTime;
publicVariableServer "cad_pvar_shared_var";
while {diag_tickTime - _time_count < 8 && cad_pvar_server_answer == 0 } do {sleep 0.05;};
if (cad_pvar_server_answer == 0) exitWith {
	(findDisplay 49) closedisplay 0;
};

Open description.ext and find

onPauseScript = "";

Change to

onPauseScript = "Fixes\DupingFix.sqf";

All done.

Now when ever a player pull's there internet cord and hits ESC and try's to log out to the lobby, when the timer hits 2 secs left this script runs and if it detects connection lost it will close the ESC menu and not let them log out to do the dupe. They will have two choices. 1) plug back in cord and continue playing. 2) alt F4 and re-connect. NO matter what choice they pick the dupe will not happen because it requires them to go to lobby then back in-game. The items they try to dupe will be on there character still or inside the storage container, never both.

 

If I am not mistaken, the above fix can generate a slight level of server lag. The original fix included a non-lag inducing script for the DupingFix.sqf as follows:

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 ["You cannot log out near a storage unit!", "PLAIN DOWN", 3];
      systemchat "You cannot log out near a storage unit!";
      _escMenu closedisplay 0;
   };
} foreach (nearestObjects [player, ["All"], 7.5]);

This is a very simplified fix in that it prevents people from logging out near any container, be it a tent, safe, vehicle, crate or whatever. It doesn't cause any lag.

 

The link you provided is for a completely different duplication issue involving safes. The one I posted is still a problem but fixable as per the instructions.

Link to comment
Share on other sites

  • 0

If I am not mistaken, the above fix can generate a slight level of server lag. The original fix included a non-lag inducing script for the DupingFix.sqf as follows:

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 ["You cannot log out near a storage unit!", "PLAIN DOWN", 3];
      systemchat "You cannot log out near a storage unit!";
      _escMenu closedisplay 0;
   };
} foreach (nearestObjects [player, ["All"], 7.5]);

This is a very simplified fix in that it prevents people from logging out near any container, be it a tent, safe, vehicle, crate or whatever. It doesn't cause any lag.

 

The link you provided is for a completely different duplication issue involving safes. The one I posted is still a problem but fixable as per the instructions.

Can you elaborate on this?

Link to comment
Share on other sites

  • 0

If I am not mistaken, the above fix can generate a slight level of server lag. The original fix included a non-lag inducing script for the DupingFix.sqf as follows:

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 ["You cannot log out near a storage unit!", "PLAIN DOWN", 3];
      systemchat "You cannot log out near a storage unit!";
      _escMenu closedisplay 0;
   };
} foreach (nearestObjects [player, ["All"], 7.5]);

This is a very simplified fix in that it prevents people from logging out near any container, be it a tent, safe, vehicle, crate or whatever. It doesn't cause any lag.

 

The link you provided is for a completely different duplication issue involving safes. The one I posted is still a problem but fixable as per the instructions.

I used to use this fix by buddyrole i think was his name. You can get around it very easy. All it takes is the person looking away from the storage container or move a little bit away before hitting esc or even look down or up. It only check if cursortarget is looking at a storage container that a backpack can be placed in. Also you can just use a storage container that don't hold backpacks and this will not stop them at all.

 

Only works if the player is facing any kind of storage container that a backpack can be placed in and closes the ESC menu instantly.

Link to comment
Share on other sites

  • 0

I think you're old way IS working I was just being stupid. Do you not like your old way?

I thought about a new methode cause you said it did not working :P

 

 

If I am not mistaken, the above fix can generate a slight level of server lag. The original fix included a non-lag inducing script for the DupingFix.sqf as follows:

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 ["You cannot log out near a storage unit!", "PLAIN DOWN", 3];
      systemchat "You cannot log out near a storage unit!";
      _escMenu closedisplay 0;
   };
} foreach (nearestObjects [player, ["All"], 7.5]);

This is a very simplified fix in that it prevents people from logging out near any container, be it a tent, safe, vehicle, crate or whatever. It doesn't cause any lag.

 

The link you provided is for a completely different duplication issue involving safes. The one I posted is still a problem but fixable as per the instructions.

 

I think you're old way IS working I was just being stupid. Do you not like your old way?

 

You said it wont work ^^ so i thought about another way :P

If I am not mistaken, the above fix can generate a slight level of server lag. The original fix included a non-lag inducing script for the DupingFix.sqf as follows:

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 ["You cannot log out near a storage unit!", "PLAIN DOWN", 3];
      systemchat "You cannot log out near a storage unit!";
      _escMenu closedisplay 0;
   };
} foreach (nearestObjects [player, ["All"], 7.5]);

This is a very simplified fix in that it prevents people from logging out near any container, be it a tent, safe, vehicle, crate or whatever. It doesn't cause any lag.

 

The link you provided is for a completely different duplication issue involving safes. The one I posted is still a problem but fixable as per the instructions.

 

Thats sucks a bit, most ppl log out in their base and the most of them got a storage unit nearby them while they want to log out.

 

I just write a new methode, which sets a variable with the current server time on your player, and if the player press esacpe it compare each other and checks if 90 seconds are gone since the last gear interaction, its works actually pretty well now  i try to find out the idd of the red chain icon..... which could be really hard.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...