Jump to content

[Release] - A Plot for life v2.5. Keep your buildables on death. Take plot ownership


Recommended Posts

sorry but it is the way you have installed the script that is causing the issue.  

 

The script does not do anything with the players logins.

 

The problem is most likely related to the the amendments you have done to the files.  I would suggest Either installing this mod first and then installing your other mods or fixing the issues you already had before installing the script before installing.  One missed ";" or a bracket in the wrong place can cause issues for the whole script that will manifest in strange unconnected errors.

 

You could also try downloading the Dropbox rar files and comparing them with what you have using something like WinDiff which may show up issues with the inserted code.

 

I also do not see any info in the RPT file to confirm you are running an updated server_monitor.sqf .  This may cause a lot of problems if not linked in correctly.

 

As you have not listed the other mods and you are already getting errors before installing this mod, even if the server appears to work, it is not really working as it should.  This mod works fine on Vanilla Epoch and I cannot really support servers with other customisations as it is only developed on Vanilla Epoch.

Installed vanilla epoch, players can connect. Installed your script, players cannot connect. You need to update your first post with the fixes from other members here. I found several errors in your post that cause issues that were fixed by people in this thread.

Link to comment
Share on other sites

Found it.

In fn_damageActions.sqf

Find

 

_playerUID = 	getPlayerUID _player;
Replace with

 

_targetUID = 	getPlayerUID _unit;
Find

if ((isPlayer _unit) && !(_playerUID in _friendlies)) then {
Replace with

if ((isPlayer _unit) && !(_targetUID in _friendlies)) then {

 

Thanks,

 

Will amend and re-upload later today.

Link to comment
Share on other sites

Installed vanilla epoch, players can connect. Installed your script, players cannot connect. You need to update your first post with the fixes from other members here. I found several errors in your post that cause issues that were fixed by people in this thread.

 

The step by step instructions have not been put together by myself.  There is also a note of issues with them and a link highlighting the issues.

 

I have said I will not be providing install instructions as I am concentrating on getting the mode working so it can be turned on or off and included in to the Epoch core build, although I seem to get sidetracked helping people with install issues.

 

I have created a rar file with the correct amended files in it which can be downloaded and placed in the correct places and works fine.  These files do not cause player login issues and would be the quickest and easiest way to install the mod.  There are two small amendments that would be needed afterwards.  The one above for tag friendly and the one with the vault upgrade / downgrade ownership (highlighted in the version history).  The second is fixed in the files on Github and the first will also be fixed today.  None of these files cause player login issues.

 

As stiflersM0M is the only person who has so far been willing to write a step by step guide, it may be better to contact them and ask them if they will be updating their guide and making the corrections or writing a better one yourself which I will be happy to include.

Link to comment
Share on other sites

 

==================================Step by Step guide================================

I have alot of custom scripts and files in my server, so i decided to look into the custom scripts from RimBlock and search what he has changed so i can make a step by step guide for guys who have the same problem like me. But ok lets start now.

 

The tutorial Required that you allready have a custom compiles.sqf, if you dont have one just search in google how to made one its pretty simple.

 

At first here is a file list compare it with your custom folder if some files are missing get them from the DayZ_Code.pbo.

  1. compiles.sqf
  2. fn_damageActions.sqf
  3. fn_selfActions.sqf
  4. player_build.sqf (If you have any kind of snap building, just added the player_build.sqf in the snap building folder)
  5. player_buildingDowngrade.sqf
  6. player_lockvault.sqf (not needed, it was in the folder but RimBlock did no changes to the file, so its equal to the original one)
  7. player_packtent.sqf
  8. player_packvault.sqf
  9. player_tagfriendly.sqf
  10. player_unlockvault.sqf
  11. player_updategui.sqf
  12. player_upgrade.sqf
  13. remove.sqf
  14. server_monitor.sqf (Note dont take the file from the dayz_code.pbo go into your dayz_server.pbo and search for server_monitor.sqf and copy it out)
  15. tent_pitch.sqf
  16. vault_pitch.sqf
  17. Player_buildingmaint.sqf

If you checked theese list and maked sure that you have every file, you can start with the compiles.sqf

Remeber, i use my own file path´s, if you have another folder who is not named "Custom" you need to change the path´s to fit your folders.

I also call the custom compiles.sqf twice, so first the original one then the custom one, so my compiles.sqf looks like this:

if (!isDedicated) then {
fnc_usec_damageActions =        compile preprocessFileLineNumbers "Custom\fn_damageActions.sqf";
fnc_usec_selfActions =            compile preprocessFileLineNumbers "Custom\fn_selfActions.sqf";
player_packTent =            compile preprocessFileLineNumbers "Custom\player_packTent.sqf";
player_packVault =            compile preprocessFileLineNumbers "Custom\player_packVault.sqf";
player_unlockVault =            compile preprocessFileLineNumbers "Custom\player_unlockVault.sqf";
player_removeObject =            compile preprocessFileLineNumbers "Custom\remove.sqf";
player_lockVault =            compile preprocessFileLineNumbers "Custom\player_lockVault.sqf";
player_updateGui =            compile preprocessFileLineNumbers "Custom\player_updateGui.sqf";
player_tentPitch =            compile preprocessFileLineNumbers "Custom\tent_pitch.sqf";
player_vaultPitch =            compile preprocessFileLineNumbers "Custom\vault_pitch.sqf";
player_build =                compile preprocessFileLineNumbers "Custom\player_build.sqf";
};

So, now we came to the changes in every file:

  • fn_damageActions.sqf

Find at the private variables at the top:

"_charid"

and replace it with:

"_playerUID"

Find:

_charID =		_unit getVariable ["CharacterID", 0];

Replace with:

_playerUID = 	getPlayerUID player;

Find:

if ((isPlayer _unit) && !(_charID in _friendlies)) then {

Replace with:

if ((isPlayer _unit) && !(_playerUID in _friendlies)) then {

Find:

"\z\addons\dayz_code\actions\player_tagFriendly.sqf"

and replace it with your own path which point to your custom player_tagFriendly.sqf for me it looks like this:

"Custom\player_tagFriendly.sqf"

Done!

  •  Fn_sefactions.sqf

Find (again the private section at the top):

"_attached"

and add this behind it

,"_playerUID","_characterID"

Find:

_isMan = _cursorTarget isKindOf "Man";

and add directly above it:

_playerUID = getPlayerUID player;

Find:

_ownerID = _cursorTarget getVariable ["CharacterID","0"];

Replace with:

_ownerID = _cursorTarget getVariable ["ownerPUID","0"];

Directly under this add:

_characterID = _cursorTarget getVariable ["CharacterID","0"];

Find:

//Allow player to delete objects

and add above it:

diag_log format["fn_actons: [PlayerUID: %1] [_ownerID: %2] [_isModularDoor: %3] [typeOfCursorTarget: %4]",_playerUID, _ownerID, _isModularDoor, _typeOfCursorTarget];
diag_log format["[_isDestructable:%1 ] [_isWreck: %2 ] [_isRemovable: %3 ] [_isWreckBuilding: %4 ]",_isDestructable, _isWreck, _isRemovable, _isWreckBuilding];

Find 2 times:

(dayz_characterID == _ownerID))

and replace it with:

(_playerUID == _ownerID))

Find:

if(!_isMan && _ownerID != "0" && !(_cursorTarget isKindOf "Bicycle")) then {

and replace it with:

if(!_isMan && _characterID != "0" && !(_cursorTarget isKindOf "Bicycle")) then {

Find 2x times:

"\z\addons\dayz_code\actions\remove.sqf"

and replace it with your own path pointing to your custom remove.sqf for me it looks like this:

"Custom\remove.sqf"

Find:

_hasKey = _ownerID in _temp_keys;
_oldOwner = (_ownerID == dayz_playerUID);

Replace with:

 

_hasKey = _characterID in _temp_keys;
_oldOwner = (_characterID == dayz_playerUID);

Find:

_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (parseNumber _ownerID))], 2, true, true, "", ""];

Replace with:

_Unlock = player addAction [format[localize "STR_EPOCH_ACTIONS_UNLOCK",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",[_cursorTarget,(_temp_keys_names select (parseNumber _characterID))], 2, true, true, "", ""];

Find:

(_ownerID == dayz_characterID) then {

Replace with:

if (_ownerID == _playerUID) then {

Find:

if(_ownerID == dayz_combination || _ownerID == dayz_playerUID) then {

Replace with:

if(_characterID == dayz_combination || _ownerID == _playerUID) then {

Find:

if(_ownerID != dayz_combination && _ownerID != dayz_playerUID) then {

Replace with:

if(_characterID != dayz_combination && _ownerID != _playerUID) then {

Find:

if(_typeOfCursorTarget in DZE_UnLockedStorage && _ownerID != "0" &&

Replace with:

if(_typeOfCursorTarget in DZE_UnLockedStorage && _characterID != "0" &&

Find:

if(_ownerID == dayz_combination || _ownerID == dayz_playerUID) then {

Replace with:

 

if(_characterID == dayz_combination || _ownerID == dayz_playerUID) then {

Find:

if (s_player_packvault < 0 && (_ownerID == dayz_combination || _ownerID == dayz_playerUID))

Replace with:

if (s_player_packvault < 0 && (_characterID == dayz_combination || _ownerID == dayz_playerUID))

Find:

"\z\addons\dayz_code\actions\player_upgrade.sqf"

And replace it with your path pointing to player_upgrade:sqf for me it looks like this:

"Custom\player_upgrade.sqf"

Find:

} else {
		player removeAction s_player_upgrade_build;
		s_player_upgrade_build = -1;
	};

and add directly under this:

	diag_log text "============================================";
	
	diag_log format["fn_actons: [PlayerUID: %1] [_ownerID: %2] [DZE_Lock_Door: %3] [_characterID: %4] [typeOfCursorTarget: %5]",_playerUID, _ownerID, DZE_Lock_Door, _characterID, _typeOfCursorTarget];
	diag_log format["[s_player_downgrade_build:%1 ] [s_player_lastTarget: %2 ] [_isRemovable: %3 ] [_isWreckBuilding: %4 ]",s_player_downgrade_build, s_player_lastTarget, _isRemovable, _isWreckBuilding];
	

FInd:

&& (DZE_Lock_Door == _ownerID)) then {

Replace with:

&& (DZE_Lock_Door == _characterID)) then {

Find:

"\z\addons\dayz_code\actions\player_buildingDowngrade.sqf"

Replace it with your own path pointing to your custom player_buildingDowngrade.sqf for me it looks like this:

"Custom\player_buildingDowngrade.sqf"

Find:

if(_isTent && _ownerID == dayz_characterID) then {

Replace with:

if(_isTent && _ownerID == _playerUID) then {

Find:

if (_isDog && _isAlive && (_hasRawMeat) && _ownerID == "0" &&

Replace with:

if (_isDog && _isAlive && (_hasRawMeat) && _characterID == "0" &&

Find:

if (_isDog && _ownerID == dayz_characterID && _isAlive) then {

Replace with:

if (_isDog && _characterID == dayz_characterID && _isAlive) then {

Find:

_ownerID = "0";

Replace with:

_characterID = "0";

Find:

if (!isNull cursorTarget) then { _ownerID = cursorTarget getVariable ["CharacterID","0"]; }

Replace with:

if (!isNull cursorTarget) then { _characterID = cursorTarget getVariable ["CharacterID","0"]; };

Find:

if (_canDo && !_inVehicle && alive _dog && _ownerID != dayz_characterID) then {

Replace with:

if (_canDo && !_inVehicle && alive _dog && _characterID != dayz_characterID) then {

Wow we are done with the Fn_selfactions, this file alone take 1 hour for me :)

  •  player_packtent.sqf

Lets start with player_packTent.sqf

 

Add at the top the private variables:

"_playerUID"

Find:

_ownerID = _obj getVariable["CharacterID","0"];

Replace with:

_ownerID = _obj getVariable["ownerPUID","0"];

Find:

_objectUID	= _obj getVariable["ObjectUID","0"];

and add directly under it:

 

_playerUID = getPlayerUID player;

Find:

if(_ownerID != dayz_characterID)

Replace with:

if(_ownerID != _playerUID)

That was fast we are done with playerpacktent.

  • player_packVault.sqf

add to the private variables at the top:

,"_characterID"

Find:

_ownerID = _obj getVariable["CharacterID","0"];

replace with:

_characterID = _obj getVariable["CharacterID","0"];

Find:

_objectUID	= _obj getVariable["ObjectUID","0"];

add directly under this:

 

_ownerID =  _obj getVariable["ownerPUID", "0"];

Find:

if((_ownerID != dayz_combination) &&

replace with:

if((_characterID != dayz_combination) &&

Find:

_holder setVariable["CharacterID",_ownerID,true];

Replace with:

_holder setVariable["CharacterID",_characterID,true];

Find:

_holder setVariable ["OEMPos", _pos, true];

add directly under it:

_holder setVariable ["ownerPUID", _ownerID , true];

Done.

  • player_unlockVault.sqf

Add to the private variables at the top:

,"_characterID"

Find:

_ownerID = _obj getVariable["CharacterID","0"];

Replace with:

_characterID = _obj getVariable["CharacterID","0"];

and add directly under it:

_ownerID = _obj getVariable["ownerPUID","0"];;

Find:

if ((_ownerID == dayz_combination) || (_ownerID == dayz_playerUID)) then {

replace with:

if ((_characterID == dayz_combination) || (_ownerID == dayz_playerUID)) then {

Find:

 

_holder setVariable["CharacterID",_ownerID,true];

Replace with:

_holder setVariable["CharacterID",_characterID,true];

Find:

 

_holder setVariable ["OEMPos", _pos, true];

and add directly under it:

 

_holder setVariable ["ownerPUID", _ownerID , true];

Done.

  • remove.sqf

Add to the private variables at the top:

 

,"_playerUID"

Find:

_objOwnerID = _obj getVariable["CharacterID","0"];

replace with:

_objOwnerID = _obj getVariable["ownerPUID","0"];

and add directly above it:

 

_playerUID = getPlayerUID _activatingPlayer;

Find:

_isOwnerOfObj = (_objOwnerID == dayz_characterID);

Replace with:

_isOwnerOfObj = (_objOwnerID == _playerUID);

Find:

_ownerID = _nearestPole getVariable["CharacterID","0"];

Replace with:

_ownerID = _nearestPole getVariable["ownerPUID","0"];

Find:

if(dayz_characterID != _ownerID) then {

replace with:

if(_playerUID != _ownerID) then {

Done.

  • player_updateGui.sqf

Find:

"_charID","_rcharID"

Replace with:

"_playerUID","_rplayerUID"

Find:

_charID = player getVariable ["CharacterID", "0"];

replace with:

_playerUID = getPlayerUID player;

Find:

_rcharID = _humanityTarget getVariable ["CharacterID", "0"];

replace with:

_rplayerUID = getPlayerUID _humanityTarget;

Find:

if ((_rcharID in _friendlies) && (_charID in _rfriendlies)) then {

Replace with:

if ((_rplayerUID in _friendlies) && (_playerUID in _rfriendlies)) then {

Find:

if !(_charID in _rfriendlyTo) then {

replace with:

if !(_playerUID in _rfriendlyTo) then {

Find:

_rfriendlyTo set [count _rfriendlyTo, _charID];

replace with:

_rfriendlyTo set [count _rfriendlyTo, _playerUID];

Done.

  • tent_pitch.sqf

Add to the private variables at the top:

,"_playerUID"

Find:

_isOk = [(vehicle player),_building] call fnc_isInsideBuilding;

and add directly under it:

_playerUID = getPlayerUID player;

Find:

_object setVariable ["CharacterID",dayz_characterID,true];

and add directly under it:

_object setVariable ["ownerPUID",_playerUID,true];

FInd:

PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];

replace with:

PVDZE_obj_Publish = [dayz_characterID,_object,[_dir,_location, _playerUID],_classname];

Done.

  • vault_pitch.sqf

add at to the private variables at the top

,"_playerUID"

Find:

_location = player modeltoworld [_offset_x,_offset_y,_offset_z];

and add directly under it:

_playerUID = getPlayerUID player;

Find:

 

_tent setVariable ["CharacterID",_combination,true];

and add directly under it:

_object setVariable ["ownerPUID",_playerUID,true];

Find:

PVDZE_obj_Publish = [_combination,_tent,[_dir,_location],"VaultStorageLocked"];

replace with:

PVDZE_obj_Publish = [_combination,_tent,[_dir,_location, _playerUID],"VaultStorageLocked"];

Done.

  • player_build.sqf

add to the private variables at the top:

,"_ownerPUID", "_playerUID"

Find:

 

_inVehicle = (_vehicle != player);

and add under it:

_playerUID = getPlayerUID player;

Find:

_ownerID = _nearestPole getVariable ["CharacterID","0"];

replace with:

_ownerID = _nearestPole getVariable ["ownerPUID","0"];

Find:

// diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];

and replace it if you want to enable the debug,

diag_log format["Player_build start: [PlayerUID = %1]  [OwnerID = %2]", _playerUID, _ownerID];

Find:

if(dayz_characterID == _ownerID) then {  //Keep ownership

replace with:

 

if(_playerUID == _ownerID) then {  //Keep ownership

Find:

// owner can build anything within his plot except other plots

and if you want to enable the debug add directly under it:

diag_log text "Player is owner";

Find 2x:

 

_tmpbuilt setVariable ["CharacterID",_combination,true];

and add directly under it 2x:

 

_tmpbuilt setVariable ["ownerPUID",_playerUID,true];

Find:

 

PVDZE_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],_classname];

Replace with:

PVDZE_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname];

Find:

 

PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];

Replace with:

PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname];

Done.

 

  • Player_buildingmaint.sqf

add to the private variables at the top:

,"_playerUID"

Find:

 

_needText = localize "str_epoch_player_246";

and add directly under it:

_playerUID = getPlayerUID player;

Find:

 

_ownerID = _nearestPole getVariable["CharacterID","0"];

replace with:

_ownerID = _nearestPole getVariable["ownerPUID","0"];

Find:

 

if(dayz_characterID == _ownerID) then {

replace with:

 

if(_playerUID == _ownerID) then {

Find:

_objectCharacterID 	= _obj getVariable ["CharacterID","0"];

and add directly under it:

_ownerID = _obj getVariable["ownerPUID","0"];

Find:

// Set location
_object setPosATL _location;

And add under it:

		// Set Owner.
		_object setVariable ["ownerPUID",_ownerID,true];
		
		diag_log format["Player_buildingdowngrade: [newclassname: %1] [_ownerID: %2] [_objectCharacterID: %2]",_newclassname, _ownerID, _objectCharacterID];

Find:

PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,player];

replace with:

PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID],_classname,_obj,player];

Done.

  • player_tagfriendly.sqf

Find:

_callerID = _caller getVariable ["CharacterID", "0"];

replace with:

_callerID = getPlayerUID _caller;

Find:

_targetID = _target getVariable ["CharacterID", "0"];

Replace with:

_targetID = getPlayerUID _target;

add above this 2 entries:

diag_log format["[_target: $1] [_caller: %2]", _target,_caller];

add below this 2 entries:

diag_log format["[_targetID: $1] [_callerID: %2]", _targetID,_callerID];

Done.

  • player_upgrade.sqf

Find:

_ownerID = _nearestPole getVariable["CharacterID","0"]

Replace with:

_ownerID = _nearestPole getVariable["ownerPUID","0"];

add directly under it:

_playerUID = getPlayerUID player;

Find:

if(dayz_characterID == _ownerID) then {

replace with:

if(_playerUID == _ownerID) then {

Find:

_objectCharacterID 	= _obj getVariable ["CharacterID","0"];

add under it:

_ownerID = _obj getVariable["ownerPUID","0"];

Find:

			// Set location
			_object setPosATL _location;

Add under it:

			// Set Owner.
			_object setVariable ["ownerPUID",_ownerID,true];
			

Find:

PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,player];

Replace with:

PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location, _ownerID],_classname,_obj,player];

Done.

  • Server_monitor.sqf

open it and find:

		if (!_wsDone) then {
			if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
			_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
			if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
			diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
		};

directly under it add:

 

		// Realign characterID to OwnerPUID - need to force save though.
		
		if (count _worldspace < 3) then
		{
			_worldspace set [count _worldspace, "0"];
		};		

		_ownerPUID = _worldspace select 2;
		
		// diag_log format["Server_monitor: [ObjectID = %1]  [ClassID = %2] [_ownerPUID = %3]", _idKey, _type, _ownerPUID];
		

Find:

_object setVariable ["ObjectID", _idKey, true];

Directly under it add:

 

_object setVariable ["OwnerPUID", _ownerPUID, true];

Done.

 

Now go to your init.sqf

and find:

_serverMonitor = 	[] execVM "\z\addons\dayz_code\system\server_monitor.sqf";

and replace it with your custom path pointing to your custom folder in my case it looks like this:

 

_serverMonitor = 	[] execVM "custom\server_monitor.sqf";

For me everything is working, i dont test the script before, i doed exact the same like above and its working for me with vanilla epoch and with my normal MPmission where i have about 22 custom files from the dayz_code.pbo.

 

 

Nice tut. Evry thing is working server is live but a verry inportent issue 

  • Player_buildingmaint.sqf

Is not working also i can not fint the stuf what you are saying your tut. Is there enny one out there that has this working. Please help me out. Buildings starting to decay and some buildings are already gone. Because the can not building maint.

 

This is the origenal 

  • Player_buildingmaint.sqf
/*
	DayZ Base Building Maintenance
	Made for DayZ Epoch please ask permission to use/edit/distrubute email [email protected].
*/
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_requirements","_obj","_upgrade","_objectCharacterID"];

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

player removeAction s_player_maint_build;
s_player_maint_build = 1;

// get cursortarget from addaction
_obj = _this select 3;

// Find objectID
_objectID 	= _obj getVariable ["ObjectID","0"];

// Find objectUID
_objectUID	= _obj getVariable ["ObjectUID","0"];

if(_objectID == "0" && _objectUID == "0") exitWith {DZE_ActionInProgress = false; s_player_maint_build = -1; cutText [(localize "str_epoch_player_50"), "PLAIN DOWN"];};

// Get classname
_classname = typeOf _obj;

// Find display name
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");

// Find next maintain
_upgrade = getArray (configFile >> "CfgVehicles" >> _classname >> "maintainBuilding");

if ((count _upgrade) > 0) then {
	_requirements = _upgrade;
} else {
	_requirements = [["PartGeneric",1]];
};

_missingQty = 0;
_missing = "";

_proceed = true;
{
	_itemIn = _x select 0;
	_countIn = _x select 1;
	_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
	if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
} forEach _requirements;

if (_proceed) then {
	[1,1] call dayz_HungerThirst;
	player playActionNow "Medic";
	[player,20,true,(getPosATL player)] spawn player_alertZombies;

	_temp_removed_array = [];
	_removed_total = 0;
	_tobe_removed_total = 0;
	
	{
		_removed = 0;
		_itemIn = _x select 0;
		_countIn = _x select 1;
		// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
		_tobe_removed_total = _tobe_removed_total + _countIn;

		{					
			if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
				_num_removed = ([player,_x] call BIS_fnc_invRemove);
				_removed = _removed + _num_removed;
				_removed_total = _removed_total + _num_removed;
				if(_num_removed >= 1) then {
					_temp_removed_array set [count _temp_removed_array,_x];
				};
			};
	
		} forEach magazines player;

	} forEach _requirements;

	// all parts removed proceed
	if (_tobe_removed_total == _removed_total) then {

		cutText [format[(localize "STR_EPOCH_ACTIONS_4"), 1], "PLAIN DOWN", 5];
		PVDZE_maintainArea = [player,2,_obj];
		publicVariableServer "PVDZE_maintainArea";

	} else {
	
		{player addMagazine _x;} count _temp_removed_array;
		cutText [format[(localize "str_epoch_player_145"),_removed_total,_tobe_removed_total], "PLAIN DOWN"];
	
	};
} else {
	_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
	cutText [format[(localize "str_epoch_player_146"),_missingQty, _textMissing], "PLAIN DOWN"];
};


DZE_ActionInProgress = false;
s_player_maint_build = -1;

Greets Mike

Link to comment
Share on other sites

Hi Mike,

 

Use the original buildingmaint script.  This mod should not change that as there is nothing in that script that deals with or checks ownership.

 

Check the link at the top of the instructions of issues with the instructions and corrections.  

Link to comment
Share on other sites

Hi Rimblock, 

 

quick question, the script is working however I have lost the ability to access safes. If I revert the fn_selfactions file to the default values regarding unlocking the safe etc it works although when accessing other peoples safes I can't re-lock them again, enter combo--> UI --> enter code nothing happens. 

 

Any ideas what the issue could be? As far as I can tell I've not modified the safe code anywhere else. 

Link to comment
Share on other sites

hey got an error....

everything is working fine till you look to a wall or every modular item,

 

then this error happens:

Error in expression <rTarget];

if(_isModular && (_playerUID == _ownerID)) then {
if(_hasToolbox && ">
Error position: <== _ownerID)) then {
if(_hasToolbox && "
>
Error ==: Typ Array, expected number,string,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location
File mpmissions\__CUR_MP.Chernarus\Custom\fn_selfActions.sqf, line 236

 and you cant unlock anything anymore.

 

i use the original fn_selfaction which was provided.... anyone have a fix for me ?

Link to comment
Share on other sites

hey got an error....

everything is working fine till you look to a wall or every modular item,

 

then this error happens:

Error in expression <rTarget];

if(_isModular && (_playerUID == _ownerID)) then {

if(_hasToolbox && ">

Error position: <== _ownerID)) then {

if(_hasToolbox && ">

Error ==: Typ Array, expected number,string,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location

File mpmissions\__CUR_MP.Chernarus\Custom\fn_selfActions.sqf, line 236

 and you cant unlock anything anymore.

 

i use the original fn_selfaction which was provided.... anyone have a fix for me ?

Having the same problem as you ^^^^^^^

Link to comment
Share on other sites

What is ownerID set as higher up in the file ?.

 

It should be around line 166

_ownerID = _cursorTarget getVariable ["ownerPUID","0"];

On line 244 should be 

diag_log format["fn_actons: [PlayerUID: %1] [_ownerID: %2] [_isModularDoor: %3] [typeOfCursorTarget: %4]",_playerUID, _ownerID, _isModularDoor, _typeOfCursorTarget];

That will generate quite a lot of messages in the rpt file but it will tell you what is being passed in the _ownerID variable.

 

It may be that the server_monitor.sqf has an issue and is not populating the ownerPUID variable correctly.

 

Post up the result of that diag line and I may be able to point you to the issue.

 

RB

Link to comment
Share on other sites

Okay so I wanted to get A Plot for life + Snap Building Pro working together. I used PryMary's instructions and files from here:

 

I do everything as told, but as I get in game, the items don't snap. Everything else seems to work, I can rotate items 45 degrees, drop them down/pick up and so on, but the snapping does not work. Also the plot pole does not recognize the owner after the server has restarted.

 

In my init.sqf I have these lines to call the complies.sqf's:

call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
call compile preprocessFileLineNumbers "custom\compiles.sqf";

My custom\complies.sqf looks like this:

if (!isDedicated) then {
	//Snap builder pro:
	snap_build =				compile preprocessFileLineNumbers "custom\snap_pro\snap_build.sqf";
	dayz_spaceInterrupt =		compile preprocessFileLineNumbers "custom\snap_pro\dayz_spaceInterrupt.sqf";
	//Plot for life:
	fnc_usec_damageActions =	compile preprocessFileLineNumbers "custom\PlotForLifev2\fn_damageActions.sqf";
	fnc_usec_selfActions =		compile preprocessFileLineNumbers "custom\PlotForLifev2\fn_selfActions.sqf";
	player_packTent =			compile preprocessFileLineNumbers "custom\PlotForLifev2\player_packTent.sqf";
	player_packVault =			compile preprocessFileLineNumbers "custom\PlotForLifev2\player_packVault.sqf";
	player_unlockVault =		compile preprocessFileLineNumbers "custom\PlotForLifev2\player_unlockVault.sqf";
	player_removeObject =		compile preprocessFileLineNumbers "custom\PlotForLifev2\remove.sqf";
	player_lockVault =			compile preprocessFileLineNumbers "custom\PlotForLifev2\player_lockVault.sqf";
	player_updateGui =			compile preprocessFileLineNumbers "custom\PlotForLifev2\player_updateGui.sqf";
	player_tentPitch =			compile preprocessFileLineNumbers "custom\PlotForLifev2\tent_pitch.sqf";
	player_vaultPitch =			compile preprocessFileLineNumbers "custom\PlotForLifev2\vault_pitch.sqf";
	player_build =				compile preprocessFileLineNumbers "custom\snap_pro\player_build.sqf";
};

 

(As seen in the last line, I pointed towards the snap_pro's player_build.sqf instead of P4L's)

And the player_build.sqf I use is the one PryMary posted.

 

Also note that I used the easy installation method since I don't have a lot of mods. Atleast I'm pretty sure they aren't effected by P4L.

 

 

 

Also on another question, if I were to follow the step-by-step guide, I don't understand where exactly do you change the files? StiflersM0M listed a bunch of files at the beginning of his guide here: 

Are these the files that are like scattered around the folders that I have to search for and edit individually? So if I were to look up these files and change them individually, why is he making a separate compiles.sqf file where he includes all those files? The whole guide seems slightly too messy, or just maybe too advanced for someone average.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...