Sp4rkY Posted October 6, 2014 Report Share Posted October 6, 2014 Hi Zupa, ive installed this nice script but i have a problem with it. Doesnt matter if i use a already placed door or i build a new one but if i click EyeScan, it sais "Eyescan failed" and if i click Manage Door, it sais "You dont have the rights to manage doors". I dont use P4L as im not using Plot Poles at my server. Can you gove me a hint to fixing this ? cheers Link to comment Share on other sites More sharing options...
Zupa Posted October 6, 2014 Author Report Share Posted October 6, 2014 To add the owner as default to the doors on placement, edit your Player_Upgrade.sqf 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 More sharing options...
Zupa Posted October 6, 2014 Author Report Share Posted October 6, 2014 If not using the P4L, old doors have to set by an admin or rebuild them. Link to comment Share on other sites More sharing options...
Zupa Posted October 6, 2014 Author Report Share Posted October 6, 2014 FYI if you are using a mysql script to set damage on building parts to say 0.2 for maintaining... you will need to adjust your script / add a new query to take into account the plot pole no longer has a null/[] value in the inventory field. Otherwise you will have plot poles that do get maintained (damage removed) but the created/lastupdated date won't be updated so they will be removed in X days (whatever you have yours set to). Good you mentioned, i def need to find something easy for this. Link to comment Share on other sites More sharing options...
IceBaer Posted October 6, 2014 Report Share Posted October 6, 2014 FYI if you are using a mysql script to set damage on building parts to say 0.2 for maintaining... you will need to adjust your script / add a new query to take into account the plot pole no longer has a null/[] value in the inventory field. Otherwise you will have plot poles that do get maintained (damage removed) but the created/lastupdated date won't be updated so they will be removed in X days (whatever you have yours set to). i have two standard SQL Events, i have not changed anything in there, here are the two Event´s: removeObjectOld DELETE FROM `Object_DATA` WHERE `LastUpdated` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 24 DAY) AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 42 DAY) and setDamageOnAge UPDATE `Object_DATA` SET `Damage`=0.1 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') ) and here are the code from the "maintain_area.sqf" private ["_maintainSand","_missing","_missingQty","_proceed","_itemIn","_countIn","_qty","_num_removed","_removed","_removed_total","_tobe_removed_total","_obj","_objectID","_objectUID","_classname","_location","_dir","_objectCharacterID","_object","_temp_removed_array","_textMissing","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_itemText","_option"]; if (DZE_ActionInProgress) exitWith { cutText ["Maintenance already in progress." , "PLAIN DOWN"]; }; DZE_ActionInProgress = true; player removeAction s_player_maintain_area; s_player_maintain_area = 1; player removeAction s_player_maintain_area_preview; s_player_maintain_area_preview = 1; _target = cursorTarget; // Plastic_Pole_EP1_DZ _maintainSand = ["ModularItems","DZE_Housebase","LightPole_DZ","Sandbag1_DZ","BagFenceRound_DZ","Fort_RazorWire","Hedgehog_DZ","SandNest_DZ","Plastic_Pole_EP1_DZ"]; //_objectClasses = ["ModularItems", "DZE_Housebase"] + DZE_ExtraMaintain; _objectClasses = _maintainSand; _range = 100; // set the max range for the maintain area _objects = nearestObjects [_target, _objectClasses, _range]; // TODO dynamic requirements based on used building parts? _count = count _objects; _requirements = []; switch true do { case (_count <= 20): {_requirements = [["ItemGoldBar10oz",0]]}; case (_count <= 50): {_requirements = [["ItemGoldBar10oz",0]]}; case (_count <= 100): {_requirements = [["ItemGoldBar10oz",0]]}; case (_count <= 200): {_requirements = [["ItemBriefcase100oz",0]]}; case (_count <= 300): {_requirements = [["ItemBriefcase100oz",0]]}; case (_count <= 400): {_requirements = [["ItemBriefcase100oz",0]]}; case (_count <= 500): {_requirements = [["ItemBriefcase100oz",0]]}; case (_count <= 600): {_requirements = [["ItemBriefcase100oz",0]]}; case (_count > 700): {_requirements = [["ItemBriefcase100oz",0]]}; }; _option = _this select 3; switch _option do { case "maintain": { _missing = ""; _missingQty = 0; _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 { player playActionNow "Medic"; [player,_range,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; _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 required items removed from player gear if (_tobe_removed_total == _removed_total) then { { _obj = _x; // Find objectID _objectID = _obj getVariable ["ObjectID","0"]; // Find objectUID _objectUID = _obj getVariable ["ObjectUID","0"]; if (_objectID == "0" && _objectUID == "0") exitWith { cutText ["At least one building part is not setup yet.", "PLAIN DOWN"];}; // Get classname _classname = typeOf _obj; // Get position _location = _obj getVariable["OEMPos",(getposATL _obj)]; // Get direction _dir = getDir _obj; // Find CharacterID _objectCharacterID = _obj getVariable ["CharacterID","0"]; // Create new object _object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"]; // Set direction _object setDir _dir; // Set location _object setPosATL _location; PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,player]; publicVariableServer "PVDZE_obj_Swap"; player reveal _object; } forEach _objects; cutText [format["You have maintained %1 building parts.", _count], "PLAIN DOWN", 5]; // uncomment the next 2 lines if you want logging of area maintenance to the server report file (Arma2OAserver.RPT) //maintainArea_log = [player, _target, _count]; //publicVariableServer "maintainArea_log"; } else { {player addMagazine _x;} forEach _temp_removed_array; cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; }; } else { _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); cutText [format["Missing %1 more of %2", _missingQty, _textMissing], "PLAIN DOWN"]; }; }; case "preview": { _cost = ""; { _itemIn = _x select 0; _countIn = _x select 1; _itemText = getText(configFile >> "CfgMagazines" >> _itemIn >> "displayName"); if (_cost != "") then { _cost = _cost + " and "; }; _cost = _cost + (str(_countIn) + " of " + _itemText); } forEach _requirements; cutText [format["%1 building parts in range, maintenance would cost %2.", _count, _cost], "PLAIN DOWN"]; }; }; DZE_ActionInProgress = false; s_player_maintain_area = -1; s_player_maintain_area_preview = -1; What do i have to change? Link to comment Share on other sites More sharing options...
Sp4rkY Posted October 6, 2014 Report Share Posted October 6, 2014 To add the owner as default to the doors on placement, edit your Player_Upgrade.sqf 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; That i have already done. I followed your tutorial exactly. How i have to understand "the doors have to be set by an admin". The errors comes up at new placed doors too. Link to comment Share on other sites More sharing options...
cen Posted October 6, 2014 Report Share Posted October 6, 2014 These are the two SQL queries I use now: /* Set Damage On Objects via Age */ UPDATE `Object_DATA` SET `Damage`= 0.2 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') ); /* Set Damage On Plot Poles via Age */ UPDATE `Object_DATA` SET `Damage`= 0.2 WHERE `Classname` = 'Plastic_Pole_EP1_DZ' AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY); Link to comment Share on other sites More sharing options...
Guest Posted October 6, 2014 Report Share Posted October 6, 2014 Anyone find the solution where regular players can see the Blue "Manage Door" when you scroll? No matter how far you are... its shows up and displays the last door you "managed" Nvmd, It goes away when you face another vehicle or door. Link to comment Share on other sites More sharing options...
poweredbypot Posted October 6, 2014 Report Share Posted October 6, 2014 Hey zupa, this is another client side RPT error I keep seeing and I'm not sure if it is my fault or not. I have double checked my installation already. Error in expression <; cutText ["Scanning", "PLAIN DOWN"]; sleep 2; cutText ["Eye Scan SUCCESS."> Error position: <sleep 2; cutText ["Eye Scan SUCCESS."> Error Generic error in expression File mpmissions\__CUR_MP.Napf\Custom\doorManagement\player_unlockDoor.sqf, line 35 Suspending not allowed in this context Link to comment Share on other sites More sharing options...
lordgeorge Posted October 8, 2014 Report Share Posted October 8, 2014 Im getting these errors in client rpt.. any ideas ? Error Undefined variable in expression: server_updateobject File mpmissions\__CUR_MP.chernarus\Mods\snap_build\player_upgrade.sqf, line 207 Error in expression <VDZE_veh_Update"; PVDZE_veh_Update call server_updateObject; } else { {player a> Error position: <server_updateObject; } else { {player a> Taa :) Link to comment Share on other sites More sharing options...
Zupa Posted October 8, 2014 Author Report Share Posted October 8, 2014 Im getting these errors in client rpt.. any ideas ? Error Undefined variable in expression: server_updateobject File mpmissions\__CUR_MP.chernarus\Mods\snap_build\player_upgrade.sqf, line 207 Error in expression <VDZE_veh_Update"; PVDZE_veh_Update call server_updateObject; } else { {player a> Error position: <server_updateObject; } else { {player a> Taa :) well, u dont have it defined in compiles ? or u miss files Link to comment Share on other sites More sharing options...
poweredbypot Posted October 8, 2014 Report Share Posted October 8, 2014 Hey zupa, this is another client side RPT error I keep seeing and I'm not sure if it is my fault or not. I have double checked my installation already. Error in expression <; cutText ["Scanning", "PLAIN DOWN"]; sleep 2; cutText ["Eye Scan SUCCESS."> Error position: <sleep 2; cutText ["Eye Scan SUCCESS."> Error Generic error in expression File mpmissions\__CUR_MP.Napf\Custom\doorManagement\player_unlockDoor.sqf, line 35 Suspending not allowed in this context Any advice for this Zupa? Link to comment Share on other sites More sharing options...
Mikeeeyy Posted October 8, 2014 Report Share Posted October 8, 2014 Hey zupa, this is another client side RPT error I keep seeing and I'm not sure if it is my fault or not. I have double checked my installation already. Error in expression <; cutText ["Scanning", "PLAIN DOWN"]; sleep 2; cutText ["Eye Scan SUCCESS."> Error position: <sleep 2; cutText ["Eye Scan SUCCESS."> Error Generic error in expression File mpmissions\__CUR_MP.Napf\Custom\doorManagement\player_unlockDoor.sqf, line 35 Suspending not allowed in this context He needs to change this: class ZupaButton_1 : RscShortcutButton { idc = -1; text = "Eye Scan"; x = 0.40 * safezoneW + safezoneX; y = 0.40 * safezoneH + safezoneY; style = 2; w = 0.20; onButtonClick = "call player_unlockDoor"; }; to: class ZupaButton_1 : RscShortcutButton { idc = -1; text = "Eye Scan"; x = 0.40 * safezoneW + safezoneX; y = 0.40 * safezoneH + safezoneY; style = 2; w = 0.20; onButtonClick = "[] spawn player_unlockDoor"; }; poweredbypot 1 Link to comment Share on other sites More sharing options...
CMDR. Taco Posted October 10, 2014 Report Share Posted October 10, 2014 About half the time the owner and anyone who has been added to the access list will get knocked out for about 30 seconds when using the eye scanner. Link to comment Share on other sites More sharing options...
JayOnSpeed Posted October 10, 2014 Report Share Posted October 10, 2014 Would be nice if the vault combos could also be changed using this. I'm using ComboKey Changer and it works as intended but this one seems much nicer. Great work Zupa. Link to comment Share on other sites More sharing options...
skunk Posted October 10, 2014 Report Share Posted October 10, 2014 First of all, great work! I love the idea and has great potential for additions. Unfortunately, I have yet to get this working correctly. Here's what's going on: Here, I cant even install a lock (obviously I have a pole down) But I can still build other stuff, just no locks. I remove the plotpole and now I'm able to install the lock (obviously not suppose to happen like this) I dont "have permission" with OR without a plotpole. I am using Plotpole4life This is a fresh server/install..... any ideas? are the files on the first page (the ones I'm using) of this thread up to date with all the editing that has been done throughout the thread? Running Overpoch, coins, infistar (tried it with and without infistar installed, same results) on Cherno. Thank you for your time, and keep up the good work! Link to comment Share on other sites More sharing options...
Proximus Posted October 12, 2014 Report Share Posted October 12, 2014 I installed this script on my relative fresh server. Everything worked as it should (non p4l version) Then i installed Build Vectors + SnapBuild and now i'm getting this error: Error in expression <false]; }; } else { player removeAction s_player_manageDoor; s_player_manageDoor> Error position: <s_player_manageDoor; s_player_manageDoor> Error Undefined variable in expression: s_player_managedoor File mpmissions\__CUR_MP.Tavi\fixes\fn_selfActions.sqf, line 531 I only get this error when i try to rotate an object through the scroll menu (1, 5, 45 or 90 degrees) So i'm not even trying to manage a door. Any ideas? :) Link to comment Share on other sites More sharing options...
Zupa Posted October 13, 2014 Author Report Share Posted October 13, 2014 First of all, great work! I love the idea and has great potential for additions. Unfortunately, I have yet to get this working correctly. Here's what's going on: Here, I cant even install a lock (obviously I have a pole down) But I can still build other stuff, just no locks. I remove the plotpole and now I'm able to install the lock (obviously not suppose to happen like this) I dont "have permission" with OR without a plotpole. I am using Plotpole4life This is a fresh server/install..... any ideas? are the files on the first page (the ones I'm using) of this thread up to date with all the editing that has been done throughout the thread? Running Overpoch, coins, infistar (tried it with and without infistar installed, same results) on Cherno. Thank you for your time, and keep up the good work! From what you are telling i assume u edited the files wrongly or edited the wrong files ? Also a small issue can be the the variable check the following in initDoorMangement.sqf ( and maybe others) getVariable ["ownerPUID","-2"] and u should maybe have getVariable ["OwnerPUID","-2"] difference is Capital Owner I recommend rechecking your files you have edited with p4l, and plotmangement It really shouldnt be that hard when u put plotmangament in that version Link to comment Share on other sites More sharing options...
Zupa Posted October 13, 2014 Author Report Share Posted October 13, 2014 I installed this script on my relative fresh server. Everything worked as it should (non p4l version) Then i installed Build Vectors + SnapBuild and now i'm getting this error: Error in expression <false]; }; } else { player removeAction s_player_manageDoor; s_player_manageDoor> Error position: <s_player_manageDoor; s_player_manageDoor> Error Undefined variable in expression: s_player_managedoor File mpmissions\__CUR_MP.Tavi\fixes\fn_selfActions.sqf, line 531 I only get this error when i try to rotate an object through the scroll menu (1, 5, 45 or 90 degrees) So i'm not even trying to manage a door. Any ideas? :) Like the errors says, the variable is callde before it ever got declared. Put the variable in the bottom lines of the selfactions ( where it resets all actions) AND put it in the variables reset list Link to comment Share on other sites More sharing options...
Proximus Posted October 13, 2014 Report Share Posted October 13, 2014 Thanks Zupa! Link to comment Share on other sites More sharing options...
Achmed Posted October 16, 2014 Report Share Posted October 16, 2014 I have had a lot of reports saying that this is not working for other players on my server, the script it self works but it only shows the 1 person on the list and nobody else. I have been on at the time and when i check mine i see other players in the list leading me to think it could be a infistar problem? any clues? Link to comment Share on other sites More sharing options...
DemonsGo Posted October 17, 2014 Report Share Posted October 17, 2014 Have the magic problem : Error1:17:17 Error Undefined variable in expression: _inventory 1:17:17 File z\addons\dayz_server\compile\server_updateObject.sqf, line 84 1:17:17 Error in expression if (str(_inventory) != _previous) then { _object> 1:17:17 Error position: <_inventory) != _previous) then { _object> 1:17:17 Error Undefined variable in expression: _inventory 1:17:17 File z\addons\dayz_server\compile\server_updateObject.sqf, line 84 1:17:17 Error in expression if (str(_inventory) != _previous) then { _object> 1:17:17 Error position: <_inventory) != _previous) then { _object> 1:17:17 Error Undefined variable in expression: _inventory 1:17:17 File z\addons\dayz_server\compile\server_updateObject.sqf, line 84 1:17:17 Error in expression if (str(_inventory) != _previous) then { _object> 1:17:17 Error position: <_inventory) != _previous) then { _object> 1:17:17 Error Undefined variable in expression: _inventory 1:17:17 File z\addons\dayz_server\compile\server_updateObject.sqf, line 84 1:17:17 Error in expression if (str(_inventory) != _previous) then { _object> With that settings and WORKING Managment! settings_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; }; }; and Haven`t EROR (Mangment Work incorrect) with that settings _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 More sharing options...
Tricks Posted October 18, 2014 Report Share Posted October 18, 2014 I am running P4L, and Plot Management. Followed the steps exactly and am getting this error now. ErrorMessage: File mpmissions\dayz_epoch_11.Chernarus\Scripts\plotManagement\plotManagement.hpp, line 5: /PlotManagement/Controls.RscText_7000: Undefined base class 'RscTextT' Thank you Link to comment Share on other sites More sharing options...
monkeybrain Posted October 18, 2014 Report Share Posted October 18, 2014 After I use your door managment defines #include "zupa\doorManagement\defines.hpp" I get zupa\skins\SkinGuui.hpp, line 7:MensClothing/Controls.RscText_9000: Undefined base class 'RscTextT' Link to comment Share on other sites More sharing options...
Zupa Posted October 18, 2014 Author Report Share Posted October 18, 2014 If u have PlotMangement installed, keep using the plotManagement defines.hppORI did a visual update of the script.Download all HPP files again and overwrite them. This will fix your problems and makes all the buttons blue buttons Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now