Jump to content

[Release] ComboKeyChanger_cKc [Updated 1.2]


Recommended Posts

Gonna add this to my server later on thanks Barra81. People that are losing gear from there safes what version of epoch are you using? because this mite be due to the 1.0.5.1 update. There are reports of it all over the place

 

A few of my players have seen this glitch.

I am running overpoch, (1.0.4.2 epoch) 

 

Could it be the arma version I'm using perhaps? 112555 beta.

 

I've just been using hiveext log, finding the safe id and adding the contents back into the database. 

painful process, but less painful for me than it would be for those guys losing lots of briefcases and such. 

 

I'm just going to remove the ability to change safe codes for now, and only allow this for doors. 

Safer that way. 

Link to comment
Share on other sites

  • 2 weeks later...

Derp! Any fix for the wiping of safes??

 

 

There are reports that safe contents get wiped after a server restart.

 

I have updated the first post and files, the bug is gone now ;)

 

 

 

Found a bug with the doors, if you try to set the code twice it will try and set the code for the old _object thus returning <null> code..

 

Add this to the end of your ckc_upddoor.sqf

dayz_selectedDoor = _newobject;

Otherwise nice job, saved me alot of work trying to do this myself :)

Thx, i have included it into the new update.

Link to comment
Share on other sites

deleted this part and moved new version to new location above //Allow owner to pack vault

replace files in ckc folder

 no scroll option to unlock safe ever

s_player_downgrade_build = -1;
};
//Allow owner to change Door code


if((_isDestructable || _cursorTarget isKindOf "Land_DZE_WoodDoorLocked_Base" || _cursorTarget isKindOf "CinderWallDoorLocked_DZ_Base") && (DZE_Lock_Door == _ownerID)) then {
if ((s_player_lastTarget select 1) != _cursorTarget) then {
if (s_player_ckc > 0) then { 
player removeAction s_player_ckc;
s_player_ckc = -1;
};
};


if (s_player_ckc < 0) then {
s_player_lastTarget set [1,_cursorTarget]; 
       s_player_ckc = player addaction["Set new Code", "ckc\ckc_startUI.sqf","",0,false,true,"", ""];
};
} else {
player removeAction s_player_ckc;
s_player_ckc = -1;
};






//Allow owner to change vault code
if(_typeOfCursorTarget in DZE_UnLockedStorage && _ownerID != "0" && (player distance _cursorTarget < 3)) then {
     
if (s_player_Safe_ckc < 0 && (_ownerID == dayz_combination || _ownerID == dayz_playerUID)) then {


s_player_Safe_ckc = player addaction["Set new Code", "ckc\ckc_startSafeUI.sqf","",0,false,true,"", ""];
};
} else {
player removeAction s_player_Safe_ckc;
s_player_Safe_ckc = -1;


};


// inplace maintenance tool
Link to comment
Share on other sites

you have deleted too much ;)

 

 

pls place 

s_player_downgrade_build = -1;
};

back to its place.

 

the complete part of the downgrade build shoul look like

	// downgrade system
	if((_isDestructable || _cursorTarget isKindOf "Land_DZE_WoodDoorLocked_Base" || _cursorTarget isKindOf "CinderWallDoorLocked_DZ_Base") && (DZE_Lock_Door == _ownerID)) then {
		if ((s_player_lastTarget select 1) != _cursorTarget) then {
			if (s_player_downgrade_build > 0) then {	
				player removeAction s_player_downgrade_build;
				s_player_downgrade_build = -1;
			};
		};

		if (s_player_downgrade_build < 0) then {
			s_player_lastTarget set [1,_cursorTarget];
			s_player_downgrade_build = player addAction [format[localize "STR_EPOCH_ACTIONS_REMLOCK",_text], "\z\addons\dayz_code\actions\player_buildingDowngrade.sqf",_cursorTarget, -2, false, true, "",""];
		};
	} else {
		player removeAction s_player_downgrade_build;
		s_player_downgrade_build = -1;
	};
Link to comment
Share on other sites

yah I didn't delete the top or bottom part I just showed that to show position

 

I didnt delete 

s_player_downgrade_build = -1;
};

 

my downgrade looks the same as yours

 

here is my http://pastebin.com/X3Z2JiUh

 

any help would be GREATLY appreciated 

 

yah I deleted something somewhere with near the onld edits... old  and I dont have a backup 

I just removed all and safes still dont get open option

Link to comment
Share on other sites

i ve tested it to, with the same result, even if i remove the whole ckc parts in your fn_selfactions.sqf the safe dont get the srollwheel options, the rpt log also shown no related erros. :(

 

If you dont have a backup of your fn_selfactions.sqf i would recommend you ask a buddy of yours, to get you the missionfile.pbo out of the appdata folder.

Link to comment
Share on other sites

ok I went back to old version and safes unlock. I deleted old lines and added new lines in the new location and  now cannot unlock safe

 

I deleted this.........  see anything wrong ???????

and added the new lines in  the NEW LOCATION  

was above 

// inplace maintenance tool

now above 

//Allow owner to pack vault

 

//Allow owner to change Door code  REPLACED


if((_isDestructable || _cursorTarget isKindOf "Land_DZE_WoodDoorLocked_Base" || _cursorTarget isKindOf "CinderWallDoorLocked_DZ_Base") && (DZE_Lock_Door == _ownerID)) then {
if ((s_player_lastTarget select 1) != _cursorTarget) then {
if (s_player_ckc > 0) then { 
player removeAction s_player_ckc;
s_player_ckc = -1;
};
};


if (s_player_ckc < 0) then {
s_player_lastTarget set [1,_cursorTarget]; 
       s_player_ckc = player addaction["Set new Code", "ckc\ckc_startUI.sqf","",0,false,true,"", ""];
};
} else {
player removeAction s_player_ckc;
s_player_ckc = -1;
};






//Allow owner to change vault code   REPLACED
if(_typeOfCursorTarget in DZE_UnLockedStorage && _ownerID != "0" && (player distance _cursorTarget < 3)) then {
     
if (s_player_Safe_ckc < 0 && (_ownerID == dayz_combination || _ownerID == dayz_playerUID)) then {


s_player_Safe_ckc = player addaction["Set new Code", "ckc\ckc_startSafeUI.sqf","",0,false,true,"", ""];
};
} else {
player removeAction s_player_Safe_ckc;
s_player_Safe_ckc = -1;


};

added this......

 

 

/Allow owner to change Door code   ADDED


if((_isDestructable || _cursorTarget isKindOf "Land_DZE_WoodDoorLocked_Base" || _cursorTarget isKindOf "CinderWallDoorLocked_DZ_Base") && (DZE_Lock_Door == _ownerID)) then {
if ((s_player_lastTarget select 1) != _cursorTarget) then {
if (s_player_ckc > 0) then { 
player removeAction s_player_ckc;
s_player_ckc = -1;
};
};


if (s_player_ckc < 0) then {
s_player_lastTarget set [1,_cursorTarget]; 
       s_player_ckc = player addaction["Set new Code", "ckc\ckc_startUI.sqf","",0,false,true,"", ""];
};
} else {
player removeAction s_player_ckc;
s_player_ckc = -1;
};






//Allow owner to change vault code   ADDED


_unlockedVault = ["VaultStorage"];


if(typeOf(cursortarget) in _unlockedVault && _ownerID != "0" && (player distance _cursorTarget < 2)) then {


if (s_player_Safe_ckc < 0) then {
if ((typeOf(cursortarget) == "VaultStorage") &&(_ownerID == dayz_combination || _ownerID == dayz_playerUID)  ) then {
     


s_player_Safe_ckc = player addaction["Set new Code", "ckc\ckc_startSafeUI.sqf","",1,false,true,"", ""];
};
};
} else {
player removeAction s_player_Safe_ckc;
s_player_Safe_ckc = -1;


};
Link to comment
Share on other sites

The location doesnt really matters as long it is within the:

if (!isNull cursorTarget && !_inVehicle && !_isPZombie && (player distance cursorTarget < _allowedDistance) && _canDo) then {

The location was just changed for easier understandeability in the HowTo. ;)

 

So im glad you got it working, mate ;)

Link to comment
Share on other sites

  • 3 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...