Jump to content

[Release] 3.0 Door Management - No More Codes


Zupa

Recommended Posts

Need some help here :(

I am getting this message: ErrorMessage: File mpmissions\DayZ_Epoch_13.Tavi\Scripts\Defines\defines.hpp, line 45: .RscButton: Member already defined.

 

I Understand it means somewhere there is either another defines file loading the same button or a double entry in the file named above, However I have got to the point where I deleted all over define files in my server files and checked the file named above and I cant seem to spot a double entry.

 

I only deleted all my other define files to see if one was clashing but I only have this one defines file now and its still giving me issues... Could somebody please take a look in my defines and see if you could spot it.. I looked at line 45 and cant see any matches.

 

https://www.dropbox.com/s/ipuj9gixy0bpm8w/defines.hpp?dl=0

 

Any help would be great been trying to solve this for 5 hours.. but I did have 4 other defines files :S In the end I got mad and deleted them all but have back ups of them so its all good :S I think xD

Link to comment
Share on other sites

We have p4l, door management, coins, in a epoch overwatch origins server...the door scan works fine...the player list doesnt save after restart...i have also noticed that the origins houses work...but do not save after restart...anyone ever sort this out...thanks

Link to comment
Share on other sites

Could use some assistance here.

 

Every now and then my servers will not load up. They get stuck on waiting for authentication. So I searched through the database and found that between the last restart and the current one when it failed to start, a "CinderWallHalf_DZ" was placed and it's gear contained "[["xxxxxxxxxxxxxxxx","Smith"]]"

 

I deleted the cinderwalls gear and put it back to [] and started the server and it was fine.

 

Now where have I possibly gone wrong?

 

in my variables.sqf

 

DZE_DoorsLocked = ["Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallDoorLocked_DZ","CinderWallDoorSmallLocked_DZ"];

 

 

server_updateObject.sqf
 

 

_object_inventory = {

private["_inventory","_previous","_key"];
_isNormal = true;
if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
_isNormal = false;
_inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
}; 
if (typeOf (_object)in DZE_DoorsLocked) then{
_isNormal = false;
_inventory = _object getVariable ["doorfriends", []]; //We're replacing the inventory with UIDs for this item
};
 
if(_isNormal)then {
_inventory = [
getWeaponCargo _object,
getMagazineCargo _object,
getBackpackCargo _object
];
};
_previous = str(_object getVariable["lastInventory",[]]);
if (str(_inventory) != _previous) then {
_object setVariable["lastInventory",_inventory];
if (_objectID == "0") then {
_key = format["CHILD:309:%1:%2:",_uid,_inventory];
} else {
_key = format["CHILD:303:%1:%2:",_objectID,_inventory];
};
//diag_log ("HIVE: WRITE: "+ str(_key));
_key call server_hiveWrite;
};
};

 

 

Link to comment
Share on other sites

Try the following ( quiclky typed by head)  on line 7 in initDoorManagement.

if( !((typeOf( TheDoor ) in  DZE_DoorsLocked)) exitWith { cutText ["This is not a door.","PLAIN DOWN"]; };

 

Could use some assistance here.

 

Every now and then my servers will not load up. They get stuck on waiting for authentication. So I searched through the database and found that between the last restart and the current one when it failed to start, a "CinderWallHalf_DZ" was placed and it's gear contained "[["xxxxxxxxxxxxxxxx","Smith"]]"

 

I deleted the cinderwalls gear and put it back to [] and started the server and it was fine.

 

Now where have I possibly gone wrong?

 

in my variables.sqf

 

server_updateObject.sqf
 

 

 

Link to comment
Share on other sites

Hey, awesome script :)

 

but got still problems with it. Iam NOT using the plot4live script because after install that, a few of my other scripts doesnt work.

 

So i tried this without plot4live.

 

i followed the instructions and i can still open the doors with the manuel option (combination lock).

 

But when i use the Eye scanner i got: "Eye Scan FAILED."
And when i tried to manage i got: "You do not have the rights to manage."

 

any ideas?

Link to comment
Share on other sites

 

Try the following ( quiclky typed by head)  on line 7 in initDoorManagement.

if( !((typeOf( TheDoor ) in  DZE_DoorsLocked)) exitWith { cutText ["This is not a door.","PLAIN DOWN"]; };

 

Thanks Zupa. I have added this and now it is just a waiting game to see if for some reason players add there uid's to other building materials. 

Link to comment
Share on other sites

I have reports that this is kicking players to lobby even after I setup infistar properly this is the kick part i have in logs (attempting PV)


18:58:17 "infiSTAR.de PlayerDisconnected: _uid: 76561198081441723   _name: ConTag"
18:58:17 "infiSTAR.de Log: ConTag (76561198081441723) | CombatLog! Attacked @058066"
18:58:17 "nil player object attempting PV, :["76561198081441723","ConTag"]"
18:58:17 "get: STRING (), sent: STRING (76561198081441723)"

I was able to replicate kick on lan and live server happens when press eye scan I clicked 3x to get the kick with access to door and without it can also kick on 1st try. I have HarderPenalty = false; I sent infistar message about it too in case was that. Also have DZE_DoorsLocked set as posted on OP

Link to comment
Share on other sites

Hey, awesome script :)

 

but got still problems with it. Iam NOT using the plot4live script because after install that, a few of my other scripts doesnt work.

 

So i tried this without plot4live.

 

i followed the instructions and i can still open the doors with the manuel option (combination lock).

 

But when i use the Eye scanner i got: "Eye Scan FAILED."

And when i tried to manage i got: "You do not have the rights to manage."

 

any ideas?

I am having the exact same issue.  I tried removing the lock and putting the lock back on the door but still get the same message.  Anyone have a fix for this?

Link to comment
Share on other sites

I am having the exact same issue.  I tried removing the lock and putting the lock back on the door but still get the same message.  Anyone have a fix for this?

 

I was able to replicate this to fix it I would recheck you have custom Player_Upgrade.sqf setup right if non plot for life version you need add as below if have plot for life should be no need for it.

 

Locate this:

player reveal _object;

Paste the following code underneath:

_friendUID = getPlayerUID player;
_friendName = name  player;
_friends = [[_friendUID,_friendName]] ; 


_object setVariable ["doorfriends", _friends, true];
PVDZE_veh_Update = [_object,"gear"];
publicVariableServer "PVDZE_veh_Update";
PVDZE_veh_Update call server_updateObject;
Link to comment
Share on other sites

I already have that added in but it still gives me the message.  Here is my player_upgrade.sqf

/*
	DayZ Base Building Upgrades
	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","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_distance","_needText","_findNearestPoles","_findNearestPole","_IsNearPlot"];

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

player removeAction s_player_upgrade_build;
s_player_upgrade_build = 1;


_distance = 30;
_needText = localize "str_epoch_player_246";

// check for near plot
_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
_findNearestPole = [];

{
	if (alive _x) then {
		_findNearestPole set [(count _findNearestPole),_x];
	};
} count _findNearestPoles;

_IsNearPlot = count (_findNearestPole);

_canBuildOnPlot = false;

if(_IsNearPlot == 0) then {
	_canBuildOnPlot = true;
} else {
	
	// check nearby plots ownership && then for friend status
	_nearestPole = _findNearestPole select 0;

	// Find owner 
	_ownerID = _nearestPole getVariable["CharacterID","0"];

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

	// check if friendly to owner
	if(dayz_characterID == _ownerID) then {
		_canBuildOnPlot = true;		
	} else {
		_friendlies		= player getVariable ["friendlyTo",[]];
		// check if friendly to owner
		if(_ownerID in _friendlies) then {
			_canBuildOnPlot = true;
		};
	};
};

// exit if not allowed due to plot pole
if(!_canBuildOnPlot) exitWith {  DZE_ActionInProgress = false; cutText [format[(localize "str_epoch_player_157"),_needText,_distance] , "PLAIN DOWN"]; };

// 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_upgrade_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 upgrade
_upgrade = getArray (configFile >> "CfgVehicles" >> _classname >> "upgradeBuilding");

if ((count _upgrade) > 0) then {

	_newclassname = _upgrade select 0;

	_lockable = 0;
	if(isNumber (configFile >> "CfgVehicles" >> _newclassname >> "lockable")) then {
		_lockable = getNumber(configFile >> "CfgVehicles" >> _newclassname >> "lockable");
	};

	_requirements = _upgrade select 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 {
			
			// Get position
			_location	= _obj getVariable["OEMPos",(getposATL _obj)];

			// Get direction
			_dir = getDir _obj;

			// Current charID
			_objectCharacterID 	= _obj getVariable ["CharacterID","0"];

			_classname = _newclassname;
			
			// Create new object 
			_object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"];

			// Set direction
			_object setDir _dir;

			// Set location
			_object setPosATL _location;

			if (_lockable == 3) then {

				_combination_1 = floor(random 10);
				_combination_2 = floor(random 10);
				_combination_3 = floor(random 10);
				_combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
				
				_objectCharacterID = _combination;
				
				cutText [format[(localize "str_epoch_player_158"),_combination,_text], "PLAIN DOWN", 5];
			} else {	
				cutText [format[(localize "str_epoch_player_159"),_text], "PLAIN DOWN", 5];
			};

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

			player reveal _object;
            _friendUID = getPlayerUID player;
            _friendName = name  player;
            _friends = [[_friendUID,_friendName]] ; 


            _object setVariable ["doorfriends", _friends, true];
            PVDZE_veh_Update = [_object,"gear"];
            publicVariableServer "PVDZE_veh_Update";
            PVDZE_veh_Update call server_updateObject;			
			
		} 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"];
	};

} else {
	cutText [(localize "str_epoch_player_82"), "PLAIN DOWN"];
};

DZE_ActionInProgress = false;
s_player_upgrade_build = -1;
Link to comment
Share on other sites

 

I already have that added in but it still gives me the message.  Here is my player_upgrade.sqf

 

Strange looks ok it could be a conflict with snap_pro player_build.sqf but I don't how that would effect upgrade part

 

This is copy of my working player_upgrade.sqf  here if helps it looks same to me unless it's how it's spaced out I use Notepad++ to edit http://pastebin.com/bg3sUsec

Link to comment
Share on other sites

Yes, I use notepad++ also.  I tried your file and i still get the same problem.  It definitely has my mind blown.

 

you may have to go over install part again with fine tooth comb must be typo some place I still get lobby kicks at random to even after fresh install 2x zupa will get it fixed up I hope.

Last thing I can think of you might of missed isadding  s_player_manageDoor = -1; to custom variables.sqf

Link to comment
Share on other sites

you may have to go over install part again with fine tooth comb must be typo some place I still get lobby kicks at random to even after fresh install 2x zupa will get it fixed up I hope.

Last thing I can think of you might of missed isadding  s_player_manageDoor = -1; to custom variables.sqf

Went over everything and it is all good but still a no go to manage door or use the eyescann

Link to comment
Share on other sites

sometimes, when you have two doors very near to to each other, and you look from the first to the second... the "Manage Door" action wont refresh, so the second door will show the list of the first one.

 

here is a fix for that:

 

 

1. in "fn_selfActions.sqf", put:

        if (s_player_manageDoor >= 0 && door_management_last != _cursorTarget) then {
            player removeAction s_player_manageDoor;
            s_player_manageDoor = -1;
        };

AFTER

    if (_typeOfCursorTarget in DZE_DoorsLocked) then {

2. also in "fn_selfActions.sqf", put:

            door_management_last = _cursorTarget;

AFTER

        if (s_player_manageDoor < 0) then {

3. still in "fn_selfActions.sqf", put:

        door_management_last = objNull;

BETWEEN this:

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

so it will look like this:

    } else {
        door_management_last = objNull;
        player removeAction s_player_manageDoor;
        s_player_manageDoor = -1;
    };

4. and in "variabls.sqf" put:

    door_management_last = objNull;

AFTER

    s_player_manageDoor = -1;

this change will force the script to check if the current door youre looking at is still the same. if not: it refreshes the action with the new door as parameter.

Link to comment
Share on other sites

Thanks Zupa. I have added this and now it is just a waiting game to see if for some reason players add there uid's to other building materials. 

 

@zupa

 

I have just had it happen again. Not sure if this is happening if a player removes a combo lock and makes it a normal door.... or if it has anything to do with plot ownership....

 

Here is the Error I get for the specific object in database:

 

 

10:19:40 ""52156""

10:19:40 Error in expression < _countr)];
};
_countr = _countr + 1;
} count _objWpnTypes; 
 
 
_objWpnTypes = (_>
10:19:40   Error position: <count _objWpnTypes; 
 
 
_objWpnTypes = (_>
10:19:40   Error count: Type String, expected Array
10:19:40 File z\addons\dayz_server\system\server_monitor.sqf, line 236

 

'52156', '5492127672352242', '11', 'CinderWallDoorSmall_DZ', '2014-12-18 07:36:45', '2014-12-18 12:53:07', '29521', '[\"242\",\"[5492.125977,2767.162842,35.168682]\",\"xxxxxxxxx\"]', '[[\"xxxxxxxxx\",\"[GRAMPS]TripleB\"],[\"xxxxxxxxxx\",\"[GRAMPS]HomelessGunner\"]]', '[]', '1.00000', '0.00000'

 

 

 

In the mean time I have made a new set of variables:

 

 

DZE_BuildNoInventory = ["WoodSmallWall_DZ","WoodLargeWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorSmall_DZ","CinderWallDoor_DZ","Land_DZE_WoodDoor","WoodSmallWallDoor_DZ","Land_DZE_LargeWoodDoor","CinderWallSmallDoorway_DZ","Land_DZE_GarageWoodDoor","CinderWallDoorway_DZ"];

 

And I have changed server_monitor.sqf to this:

 

 

if ((count _inventory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ") && !(typeOf( _object) in  DZE_DoorsLocked) && !(typeOf( _object) in  DZE_BuildNoInventory)) then {

 

Which has now skipped checking for inventory in these items and at least server will load.

Link to comment
Share on other sites

sometimes, when you have two doors very near to to each other, and you look from the first to the second... the "Manage Door" action wont refresh, so the second door will show the list of the first one.

 

here is a fix for that:

 

 

1. in "fn_selfActions.sqf", put:

        if (s_player_manageDoor >= 0 && door_management_last != _cursorTarget) then {
            player removeAction s_player_manageDoor;
            s_player_manageDoor = -1;
        };

AFTER

    if (_typeOfCursorTarget in DZE_DoorsLocked) then {

2. also in "fn_selfActions.sqf", put:

            door_management_last = _cursorTarget;

AFTER

        if (s_player_manageDoor < 0) then {

3. still in "fn_selfActions.sqf", put:

        door_management_last = objNull;

BETWEEN this:

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

so it will look like this:

    } else {
        door_management_last = objNull;
        player removeAction s_player_manageDoor;
        s_player_manageDoor = -1;
    };

4. and in "variabls.sqf" put:

    door_management_last = objNull;

AFTER

    s_player_manageDoor = -1;

this change will force the script to check if the current door youre looking at is still the same. if not: it refreshes the action with the new door as parameter.

Thank you Bang for this but there is another problem.   This makes it to where i can manage doors and use the eyescan once i add myself to them but i am admin so i can do all doors.  Players that set their doors cant manage them and cant use the eyescan unless i add them to the door.

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