Jump to content

Ped

Member
  • Posts

    83
  • Joined

  • Last visited

Posts posted by Ped

  1. 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.

  2. Where do i place the files? I'm confused because of the "missions pbo" I have never seen this file nor can I find it. This is the edit I made. As you can see the Dir, I am going to try placing the zups folder in the "Dayz_Epoch_11.blahblah" folder next to the custom one because that Is the only thing i can think to do atm. (I'm new to this :P)

     

    Your host compiles the mission.pbo on it's own whenever you start the server, so you don't have to worry about that. But basically, the mission.bpo is everything inside your MP directory path DayZ_Epoch_11.Chernarus.

     

    What you want to do is add a new directory inside DayZ_Epoch_11.Chernarus or maybe use the Custom directory where your compiles.sqf is (from your screenshot).

    Paste the zombie related files into this new directory. Then edit the related directory paths in your compiles.sqf.

     

    Easy peasy.

     

    .

  3. 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.

  4. Can anyone confirm this is no longer working?

     

    I've had this working on two different occasions previously but with a fresh install of 1.5.1 on Vert Hosting, I cannot get this to work.

    The path in init.sqf to compiles.sqf and the appropriate paths in compiles.sqf to the new zombie files and in the zombie files to the .fsm are correct.

     

    I'm getting no errors or any problems, zombies spawn fine but they run, they just do not want to walk for me.

     

    So, did something change in Epoch perhaps or am I a complete idiot???

  5. I use this:

    DELETE FROM `object_data` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') OR (`Inventory` = '[[[],[]],[[],[]],[[],[]]]') )
    

    It deletes practically anything which hasn't been touched for the specific interval and has no inventory. You can change the interval days as well as remove the empty inventory requirement if you wish.

  6. i have the same error...over and over again!!

    ive reinstalled arma2 arma2oa and the mods...nothing..i managed to play on a server last night and now again the same problem...

     

    help?

    You were able to play on a server...but have since lost the ability to play on that same server?

    Do you have additional launch parameters?

  7. Just to confirm, that it was that. gems are now nice and rare.

     

    Apologies for not spotting the other actions in selfactions that were calling the original remove file!  :unsure:

     

    Thanks for your time though, I learnt a lot and certainly will check for different calls in other files for overrides in the future...rather than just the one override potentially duplicated which is what I originally checked

     

     

    It didn't even occur to me to ask if you had other scripts calling another version of the file. Glad you spotted it and got things worked out.

  8. While I'm not opposed to a little thread necrophilia from time to time, I do have to point out the OPs issue was solved. It was clearly a server side issue. The Admins had done something to their traders because a rollback was required to resolve the problem.

     

    Could you answer some questions for your friend? Is he unable to use traders on any dayz epoch server? Or is it local to a particular server?

    Also, why did he reinstall windows and the game multiple times?

×
×
  • Create New...