Caveman1 Posted March 25, 2015 Report Share Posted March 25, 2015 as i (and others) mentioned before both you and caveman1 need to add a line to reconize playeruid ... if you are too lazy to read what has been said before it will obviusly not work. Not lazyness on my part at least. I read through this forum a few times.Just couldn't get my brain around the deviations fom the instructios.But thanks for the tip. I'll go back and try again. Link to comment Share on other sites More sharing options...
freeman12 Posted March 26, 2015 Report Share Posted March 26, 2015 I installed maintain version and seemed everything was working fine, until i went to build anything or place plot pole, it just says building already in progress..??? any one else get this problem? Link to comment Share on other sites More sharing options...
hamthejam Posted March 26, 2015 Report Share Posted March 26, 2015 You can edit those files, but you need to pull them out of the dayz code and put them on your server or mission and then change where they are called from. The reason why you dont leave them in the dayz code and edit them there is because The reason why you merge files is so your mods don't conflict with eachother. So then why in the install process Zupa doesn't mention what you say? Link to comment Share on other sites More sharing options...
DangerRuss Posted March 26, 2015 Report Share Posted March 26, 2015 So then why in the install process Zupa doesn't mention what you say? Probably because Zupa already assumes you know this, since it's a really basic step. He is telling you to modify your compiles.sqf to redirect certain files to the plotmanagement folder in your mission pbo. Which means he's either A. assuming you know these basic steps before you start modding your server B. simplifying the install instructions as much as possible for new admins or C. Both of those. Like I said this is very basic stuff so perhaps you should spend some time googling around or maybe even go back over to good ole opendayz.net and read up on some of the resources provided. Link to comment Share on other sites More sharing options...
hamthejam Posted March 26, 2015 Report Share Posted March 26, 2015 Probably because Zupa already assumes you know this, since it's a really basic step. He is telling you to modify your compiles.sqf to redirect certain files to the plotmanagement folder in your mission pbo. Which means he's either A. assuming you know these basic steps before you start modding your server B. simplifying the install instructions as much as possible for new admins or C. Both of those. Like I said this is very basic stuff so perhaps you should spend some time googling around or maybe even go back over to good ole opendayz.net and read up on some of the resources provided. FIXED. For those like me who had the same "upgrade" problem DangerRuss was right (thanks for your help). Those files needed to be moved and called from the custom fn_selfactions in your mission folder. Info found here DangerRuss 1 Link to comment Share on other sites More sharing options...
Nozza Posted March 26, 2015 Report Share Posted March 26, 2015 Totally off topic, but where can i get my mits on that debug monitor you have showing in the first post? Link to comment Share on other sites More sharing options...
ElDubya Posted March 26, 2015 Report Share Posted March 26, 2015 Totally off topic, but where can i get my mits on that debug monitor you have showing in the first post? If you mean this one : You can get it here : http://board.infistar.de/ ;) DangerRuss 1 Link to comment Share on other sites More sharing options...
DangerRuss Posted March 26, 2015 Report Share Posted March 26, 2015 Totally off topic, but where can i get my mits on that debug monitor you have showing in the first post? yea thats the debug monitor infiSTAR uses as part of his antihack/admin tools. Link to comment Share on other sites More sharing options...
larsvu Posted March 27, 2015 Report Share Posted March 27, 2015 Hey i have got an error. Any idea how to fix it? ErrorMessage: File mpmissions\DayZ_Epoch_11.Chernarus\plotManagement\defines.hpp, line 57: .RscFrame: Member already defined. I'm using the Maintained version of the Defines.hpp Link to comment Share on other sites More sharing options...
DangerRuss Posted March 27, 2015 Report Share Posted March 27, 2015 you have that RscFrame defined twice inf you defines.hpp Link to comment Share on other sites More sharing options...
larsvu Posted March 27, 2015 Report Share Posted March 27, 2015 Any idea how i can fix it? can you run 2 at all or do i have to delete one? Link to comment Share on other sites More sharing options...
DangerRuss Posted March 27, 2015 Report Share Posted March 27, 2015 do you have 2 separate defines.hpp or only one? If only remove any duplicates.... if you have 2 merge them Link to comment Share on other sites More sharing options...
larsvu Posted March 27, 2015 Report Share Posted March 27, 2015 I have 2 seperent but how do i merge them? Link to comment Share on other sites More sharing options...
DangerRuss Posted March 27, 2015 Report Share Posted March 27, 2015 I have 2 seperent but how do i merge them? use notepad ++ and run a comparison. then add all of the stuff thats different from 1 file into the other. Then go to where you call the defines.hpp and make sure only the one you've merged everything into is being called. They should be almost exactly the same with the only differences being whatever was added to them for the mods. Link to comment Share on other sites More sharing options...
larsvu Posted March 27, 2015 Report Share Posted March 27, 2015 (edited) I think i combined them correctly but i cannot build at all. Is it possible that the script does this or did i do something wrong combining? Can it be anything with snap build pro? Fixed it! Edited March 27, 2015 by larsvu ElDubya 1 Link to comment Share on other sites More sharing options...
larsvu Posted March 28, 2015 Report Share Posted March 28, 2015 Now i have the next problem it look's like it doesn't work at all. There is no manage plot option when i scroll over my plot pole. Does someone have any idea? Link to comment Share on other sites More sharing options...
DangerRuss Posted March 28, 2015 Report Share Posted March 28, 2015 Now i have the next problem it look's like it doesn't work at all. There is no manage plot option when i scroll over my plot pole. Does someone have any idea? Yes, you're messing up the install badly lol.. wipe it and try again! Link to comment Share on other sites More sharing options...
larsvu Posted March 28, 2015 Report Share Posted March 28, 2015 (edited) What did i do wrong? Did it over a couple times now Is it just the Fn_SelfActions or what? Edited March 28, 2015 by larsvu Link to comment Share on other sites More sharing options...
DangerRuss Posted March 28, 2015 Report Share Posted March 28, 2015 What did i do wrong? Did it over a couple times now Is it just the Fn_SelfActions or what? it's really hard to help you with this because we can't see what you're doing wrong...and the only information we're getting from you is it's not working. :-\ Link to comment Share on other sites More sharing options...
larsvu Posted March 28, 2015 Report Share Posted March 28, 2015 (edited) What do you wan't to know? I wan't to have it fixed Yeah it's working for half now, but now i can't see players in my Human Nearby Section and i think the dome isn't working asswel Any idea? Edited March 28, 2015 by larsvu Link to comment Share on other sites More sharing options...
Caveman1 Posted March 28, 2015 Report Share Posted March 28, 2015 ok I've read through this entire thread for the 6th time and still am having the remove problem. I'm not using plot for life. All other functions... building and upgrading work fine even after death. Just can't remove anything even after just building it. Any hints or pointers would be greatly appreciated. no errors in server or client also. Fn_selfActions.sqf // logic vars _player_flipveh = false; _player_deleteBuild = false; _player_lockUnlock_crtl = false; if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then { diag_log format["[PlotManagement]: player plotmanagement check"]; if (s_player_plotManagement < 0) then { _adminList = [""]; // Add admins here if you admins to able to manage all plotpoles diag_log format["[PlotManagement]: player is admin"]; _owner = _cursorTarget getVariable ["CharacterID","0"]; _friends = _cursorTarget getVariable ["plotfriends", []]; _fuid = []; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friends; _allowed = [_owner]; _allowed = _allowed + _adminList + _fuid; if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then{ s_player_plotManagement = player addAction ["<t color='#0059FF'>Manage Plot</t>", "plotManagement\initPlotManagement.sqf", [], 5, false]; }; }; } else { player removeAction s_player_plotManagement; s_player_plotManagement = -1; }; // CURSOR TARGET ALIVE if(_isAlive) then { //Allow player to delete objects if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _player_deleteBuild = true; }; }; ///Allow owners to delete modulars if(_isModular) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _playerUID = getPlayerUID player; _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0]; _IsNearPlot = count (_findNearestPoles); _fuid = []; _allowed = []; if(_IsNearPlot > 0)then{ _thePlot = _findNearestPoles select 0; _owner = _thePlot getVariable ["ownerPUID","010"]; _friends = _thePlot getVariable ["plotfriends", []]; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friends; _allowed = [_owner]; _allowed = [_owner] + _fuid; if ( _playerUID in _allowed && _ownerID in _allowed ) then { // // If u want that the object also belongs to someone on the plotpole. _player_deleteBuild = true; }; }else{ if(_ownerID == _playerUID)then{ _player_deleteBuild = true; }; }; }; }; //Allow owners to delete modular doors without locks if(_isModularDoor) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _playerUID = getPlayerUID player; _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0]; _IsNearPlot = count (_findNearestPoles); _fuid = []; _allowed = []; if(_IsNearPlot > 0)then{ _thePlot = _findNearestPoles select 0; _owner = _thePlot getVariable ["ownerPUID","010"]; _friends = _thePlot getVariable ["plotfriends", []]; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friends; _allowed = [_owner]; _allowed = [_owner] + _fuid; if ( _playerUID in _allowed && _ownerID in _allowed) then { // // If u want that the object also belongs to someone on the plotpole. _player_deleteBuild = true; }; }else{ if(_ownerID == _playerUID)then{ _player_deleteBuild = true; }; }; }; }; // CURSOR TARGET VEHICLE if(_isVehicle) then { //flip vehicle small vehicles by your self && all other vehicles with help nearby if (!(canmove _cursorTarget) && (player distance _cursorTarget >= 2) && (count (crew _cursorTarget))== 0 && ((vectorUp _cursorTarget) select 2) < 0.5) then { _playersNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]); if(_isVehicletype || (_playersNear >= 2)) then { _player_flipveh = true; }; }; if(!_isMan && _ownerID != "0" && !(_cursorTarget isKindOf "Bicycle")) then { _player_lockUnlock_crtl = true; }; }; }; if(_player_deleteBuild) then { if (s_player_deleteBuild < 0) then { s_player_deleteBuild = player addAction [format[localize "str_actions_delete",_text], "plotManagement\remove.sqf",_cursorTarget, 1, true, true, "", ""]; }; } else { player removeAction s_player_deleteBuild; s_player_deleteBuild = -1; }; remove.sqf /* delete object from db with extra waiting by [VB]AWOL parameters: _obj */ private ["_activatingPlayer","_builder","_fuid","_friendUID","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"]; if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_88") , "PLAIN DOWN"]; }; DZE_ActionInProgress = true; player removeAction s_player_deleteBuild; s_player_deleteBuild = 1; _obj = _this select 3; _activatingPlayer = player; _objOwnerID = _obj getVariable["CharacterID","0"]; _isOwnerOfObj = (_objOwnerID == dayz_characterID); if (_obj in DZE_DoorsLocked) exitWith { DZE_ActionInProgress = false; cutText [(localize "STR_EPOCH_ACTIONS_20"), "PLAIN DOWN"];}; if(_obj getVariable ["GeneratorRunning", false]) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_89"), "PLAIN DOWN"];}; _objectID = _obj getVariable ["ObjectID","0"]; _objectUID = _obj getVariable ["ObjectUID","0"]; _isOk = true; _proceed = false; _objType = typeOf _obj; // Chance to break tools _isDestructable = _obj isKindOf "BuiltItems"; _isWreck = _objType in DZE_isWreck; _isRemovable = _objType in DZE_isRemovable; _isWreckBuilding = _objType in DZE_isWreckBuilding; _isMine = _objType in ["Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck"]; _isModular = _obj isKindOf "ModularItems"; _limit = 3; if (DZE_StaticConstructionCount > 0) then { _limit = DZE_StaticConstructionCount; } else { if (isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then { _limit = getNumber(configFile >> "CfgVehicles" >> _objType >> "constructioncount"); }; }; _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], 30]; _findNearestPole = []; {if (alive _x) then {_findNearestPole set [(count _findNearestPole),_x];};} count _findNearestPoles; _IsNearPlot = count (_findNearestPole); if(_IsNearPlot >= 1) then { _nearestPole = _findNearestPole select 0; // Find owner _ownerID = _nearestPole getVariable["CharacterID","0"]; // check if friendly to owner if(dayz_characterID != _ownerID) then { _friendlies = _nearestPole getVariable ["plotfriends",[]]; _fuid = []; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friendlies; _builder = getPlayerUID player; // check if friendly to owner if(_builder in _fuid) then { _canBuildOnPlot = true; }; }; }; _nameVehicle = getText(configFile >> "CfgVehicles" >> _objType >> "displayName"); cutText [format[(localize "str_epoch_player_162"),_nameVehicle], "PLAIN DOWN"]; if (_isModular) then { //allow previous cutText to show, then show this if modular. cutText [(localize "STR_EPOCH_ACTIONS_21"), "PLAIN DOWN"]; }; // Alert zombies once. [player,50,true,(getPosATL player)] spawn player_alertZombies; _brokenTool = false; // Start de-construction loop _counter = 0; while {_isOk} do { // if object no longer exits this should return true. if(isNull(_obj)) exitWith { _isOk = false; _proceed = false; }; [1,1] call dayz_HungerThirst; player playActionNow "Medic"; _dis=20; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; r_interrupt = false; _animState = animationState player; r_doLoop = true; _started = false; _finished = false; while {r_doLoop} do { _animState = animationState player; _isMedic = ["medic",_animState] call fnc_inString; if (_isMedic) then { _started = true; }; if (_started && !_isMedic) then { r_doLoop = false; _finished = true; _sfx = "repair"; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; }; if (r_interrupt) then { r_doLoop = false; }; sleep 0.1; }; if(!_finished) exitWith { _isOk = false; _proceed = false; }; if(_finished) then { _counter = _counter + 1; // 10% chance to break a required tool each pass if((_isDestructable || _isRemovable) && !_isOwnerOfObj) then { if((random 10) <= 1) then { _brokenTool = true; }; }; }; if(_brokenTool) exitWith { _isOk = false; _proceed = false; }; cutText [format[(localize "str_epoch_player_163"), _nameVehicle, _counter,_limit], "PLAIN DOWN"]; if(_counter == _limit) exitWith { _isOk = false; _proceed = true; }; }; if(_brokenTool) then { if(_isWreck) then { _removeTool = "ItemToolbox"; } else { _removeTool = ["ItemCrowbar","ItemToolbox"] call BIS_fnc_selectRandom; }; if(([player,_removeTool,1] call BIS_fnc_invRemove) > 0) then { cutText [format[(localize "str_epoch_player_164"),getText(configFile >> "CfgWeapons" >> _removeTool >> "displayName"),_nameVehicle], "PLAIN DOWN"]; }; }; // Remove only if player waited if (_proceed) then { // Double check that object is not null if(!isNull(_obj)) then { _ipos = getPosATL _obj; deleteVehicle _obj; if(!_isWreck) then { PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer]; publicVariableServer "PVDZE_obj_Delete"; }; cutText [format[(localize "str_epoch_player_165"),_nameVehicle], "PLAIN DOWN"]; _preventRefund = false; _selectedRemoveOutput = []; if(_isWreck) then { // Find one random part to give back _refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom; _selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]]; } else { if(_isWreckBuilding) then { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); } else { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); _preventRefund = (_objectID == "0" && _objectUID == "0"); }; }; if((count _selectedRemoveOutput) <= 0) then { cutText [(localize "str_epoch_player_90"), "PLAIN DOWN"]; }; if (_ipos select 2 < 0) then { _ipos set [2,0]; }; _radius = 1; if (_isMine) then { if((random 10) <= 4) then { _gems = ["ItemTopaz","ItemObsidian","ItemSapphire","ItemAmethyst","ItemEmerald","ItemCitrine","ItemRuby"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; }; // give refund items if((count _selectedRemoveOutput) > 0 && !_preventRefund) then { _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; { _itemOut = _x select 0; _countOut = _x select 1; if (typeName _countOut == "ARRAY") then { _countOut = round((random (_countOut select 1)) + (_countOut select 0)); }; _item addMagazineCargoGlobal [_itemOut,_countOut]; } count _selectedRemoveOutput; _item setposATL _iPos; player reveal _item; player action ["Gear", _item]; }; } else { cutText [(localize "str_epoch_player_91"), "PLAIN DOWN"]; }; } else { r_interrupt = false; if (vehicle player == player) then { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; }; }; DZE_ActionInProgress = false; s_player_deleteBuild = -1; Link to comment Share on other sites More sharing options...
Halvhjearne Posted March 29, 2015 Report Share Posted March 29, 2015 ok I've read through this entire thread for the 6th time and still am having the remove problem. I'm not using plot for life. All other functions... building and upgrading work fine even after death. Just can't remove anything even after just building it. Any hints or pointers would be greatly appreciated. no errors in server or client also. Fn_selfActions.sqf // logic vars _player_flipveh = false; _player_deleteBuild = false; _player_lockUnlock_crtl = false; if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then { diag_log format["[PlotManagement]: player plotmanagement check"]; if (s_player_plotManagement < 0) then { _adminList = [""]; // Add admins here if you admins to able to manage all plotpoles diag_log format["[PlotManagement]: player is admin"]; _owner = _cursorTarget getVariable ["CharacterID","0"]; _friends = _cursorTarget getVariable ["plotfriends", []]; _fuid = []; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friends; _allowed = [_owner]; _allowed = _allowed + _adminList + _fuid; if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then{ s_player_plotManagement = player addAction ["<t color='#0059FF'>Manage Plot</t>", "plotManagement\initPlotManagement.sqf", [], 5, false]; }; }; } else { player removeAction s_player_plotManagement; s_player_plotManagement = -1; }; // CURSOR TARGET ALIVE if(_isAlive) then { //Allow player to delete objects if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _player_deleteBuild = true; }; }; ///Allow owners to delete modulars if(_isModular) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _playerUID = getPlayerUID player; _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0]; _IsNearPlot = count (_findNearestPoles); _fuid = []; _allowed = []; if(_IsNearPlot > 0)then{ _thePlot = _findNearestPoles select 0; _owner = _thePlot getVariable ["ownerPUID","010"]; _friends = _thePlot getVariable ["plotfriends", []]; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friends; _allowed = [_owner]; _allowed = [_owner] + _fuid; if ( _playerUID in _allowed && _ownerID in _allowed ) then { // // If u want that the object also belongs to someone on the plotpole. _player_deleteBuild = true; }; }else{ if(_ownerID == _playerUID)then{ _player_deleteBuild = true; }; }; }; }; //Allow owners to delete modular doors without locks if(_isModularDoor) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _playerUID = getPlayerUID player; _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0]; _IsNearPlot = count (_findNearestPoles); _fuid = []; _allowed = []; if(_IsNearPlot > 0)then{ _thePlot = _findNearestPoles select 0; _owner = _thePlot getVariable ["ownerPUID","010"]; _friends = _thePlot getVariable ["plotfriends", []]; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friends; _allowed = [_owner]; _allowed = [_owner] + _fuid; if ( _playerUID in _allowed && _ownerID in _allowed) then { // // If u want that the object also belongs to someone on the plotpole. _player_deleteBuild = true; }; }else{ if(_ownerID == _playerUID)then{ _player_deleteBuild = true; }; }; }; }; // CURSOR TARGET VEHICLE if(_isVehicle) then { //flip vehicle small vehicles by your self && all other vehicles with help nearby if (!(canmove _cursorTarget) && (player distance _cursorTarget >= 2) && (count (crew _cursorTarget))== 0 && ((vectorUp _cursorTarget) select 2) < 0.5) then { _playersNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]); if(_isVehicletype || (_playersNear >= 2)) then { _player_flipveh = true; }; }; if(!_isMan && _ownerID != "0" && !(_cursorTarget isKindOf "Bicycle")) then { _player_lockUnlock_crtl = true; }; }; }; if(_player_deleteBuild) then { if (s_player_deleteBuild < 0) then { s_player_deleteBuild = player addAction [format[localize "str_actions_delete",_text], "plotManagement\remove.sqf",_cursorTarget, 1, true, true, "", ""]; }; } else { player removeAction s_player_deleteBuild; s_player_deleteBuild = -1; }; remove.sqf /* delete object from db with extra waiting by [VB]AWOL parameters: _obj */ private ["_activatingPlayer","_builder","_fuid","_friendUID","_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund","_ipos","_item","_radius","_isWreckBuilding","_nameVehicle","_isModular"]; if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_88") , "PLAIN DOWN"]; }; DZE_ActionInProgress = true; player removeAction s_player_deleteBuild; s_player_deleteBuild = 1; _obj = _this select 3; _activatingPlayer = player; _objOwnerID = _obj getVariable["CharacterID","0"]; _isOwnerOfObj = (_objOwnerID == dayz_characterID); if (_obj in DZE_DoorsLocked) exitWith { DZE_ActionInProgress = false; cutText [(localize "STR_EPOCH_ACTIONS_20"), "PLAIN DOWN"];}; if(_obj getVariable ["GeneratorRunning", false]) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_89"), "PLAIN DOWN"];}; _objectID = _obj getVariable ["ObjectID","0"]; _objectUID = _obj getVariable ["ObjectUID","0"]; _isOk = true; _proceed = false; _objType = typeOf _obj; // Chance to break tools _isDestructable = _obj isKindOf "BuiltItems"; _isWreck = _objType in DZE_isWreck; _isRemovable = _objType in DZE_isRemovable; _isWreckBuilding = _objType in DZE_isWreckBuilding; _isMine = _objType in ["Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck"]; _isModular = _obj isKindOf "ModularItems"; _limit = 3; if (DZE_StaticConstructionCount > 0) then { _limit = DZE_StaticConstructionCount; } else { if (isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then { _limit = getNumber(configFile >> "CfgVehicles" >> _objType >> "constructioncount"); }; }; _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], 30]; _findNearestPole = []; {if (alive _x) then {_findNearestPole set [(count _findNearestPole),_x];};} count _findNearestPoles; _IsNearPlot = count (_findNearestPole); if(_IsNearPlot >= 1) then { _nearestPole = _findNearestPole select 0; // Find owner _ownerID = _nearestPole getVariable["CharacterID","0"]; // check if friendly to owner if(dayz_characterID != _ownerID) then { _friendlies = _nearestPole getVariable ["plotfriends",[]]; _fuid = []; { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } forEach _friendlies; _builder = getPlayerUID player; // check if friendly to owner if(_builder in _fuid) then { _canBuildOnPlot = true; }; }; }; _nameVehicle = getText(configFile >> "CfgVehicles" >> _objType >> "displayName"); cutText [format[(localize "str_epoch_player_162"),_nameVehicle], "PLAIN DOWN"]; if (_isModular) then { //allow previous cutText to show, then show this if modular. cutText [(localize "STR_EPOCH_ACTIONS_21"), "PLAIN DOWN"]; }; // Alert zombies once. [player,50,true,(getPosATL player)] spawn player_alertZombies; _brokenTool = false; // Start de-construction loop _counter = 0; while {_isOk} do { // if object no longer exits this should return true. if(isNull(_obj)) exitWith { _isOk = false; _proceed = false; }; [1,1] call dayz_HungerThirst; player playActionNow "Medic"; _dis=20; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; r_interrupt = false; _animState = animationState player; r_doLoop = true; _started = false; _finished = false; while {r_doLoop} do { _animState = animationState player; _isMedic = ["medic",_animState] call fnc_inString; if (_isMedic) then { _started = true; }; if (_started && !_isMedic) then { r_doLoop = false; _finished = true; _sfx = "repair"; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; }; if (r_interrupt) then { r_doLoop = false; }; sleep 0.1; }; if(!_finished) exitWith { _isOk = false; _proceed = false; }; if(_finished) then { _counter = _counter + 1; // 10% chance to break a required tool each pass if((_isDestructable || _isRemovable) && !_isOwnerOfObj) then { if((random 10) <= 1) then { _brokenTool = true; }; }; }; if(_brokenTool) exitWith { _isOk = false; _proceed = false; }; cutText [format[(localize "str_epoch_player_163"), _nameVehicle, _counter,_limit], "PLAIN DOWN"]; if(_counter == _limit) exitWith { _isOk = false; _proceed = true; }; }; if(_brokenTool) then { if(_isWreck) then { _removeTool = "ItemToolbox"; } else { _removeTool = ["ItemCrowbar","ItemToolbox"] call BIS_fnc_selectRandom; }; if(([player,_removeTool,1] call BIS_fnc_invRemove) > 0) then { cutText [format[(localize "str_epoch_player_164"),getText(configFile >> "CfgWeapons" >> _removeTool >> "displayName"),_nameVehicle], "PLAIN DOWN"]; }; }; // Remove only if player waited if (_proceed) then { // Double check that object is not null if(!isNull(_obj)) then { _ipos = getPosATL _obj; deleteVehicle _obj; if(!_isWreck) then { PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer]; publicVariableServer "PVDZE_obj_Delete"; }; cutText [format[(localize "str_epoch_player_165"),_nameVehicle], "PLAIN DOWN"]; _preventRefund = false; _selectedRemoveOutput = []; if(_isWreck) then { // Find one random part to give back _refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom; _selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]]; } else { if(_isWreckBuilding) then { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); } else { _selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput"); _preventRefund = (_objectID == "0" && _objectUID == "0"); }; }; if((count _selectedRemoveOutput) <= 0) then { cutText [(localize "str_epoch_player_90"), "PLAIN DOWN"]; }; if (_ipos select 2 < 0) then { _ipos set [2,0]; }; _radius = 1; if (_isMine) then { if((random 10) <= 4) then { _gems = ["ItemTopaz","ItemObsidian","ItemSapphire","ItemAmethyst","ItemEmerald","ItemCitrine","ItemRuby"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; }; // give refund items if((count _selectedRemoveOutput) > 0 && !_preventRefund) then { _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; { _itemOut = _x select 0; _countOut = _x select 1; if (typeName _countOut == "ARRAY") then { _countOut = round((random (_countOut select 1)) + (_countOut select 0)); }; _item addMagazineCargoGlobal [_itemOut,_countOut]; } count _selectedRemoveOutput; _item setposATL _iPos; player reveal _item; player action ["Gear", _item]; }; } else { cutText [(localize "str_epoch_player_91"), "PLAIN DOWN"]; }; } else { r_interrupt = false; if (vehicle player == player) then { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; }; }; DZE_ActionInProgress = false; s_player_deleteBuild = -1; actually my players also started complaining about not being able to remove stuff also, so i went through the code in fn_selfactions and edited a bit for non-plot for life users. this requires my previous fix for removing owners from the plot to work proper. after adding the other fix replace the code for removal in fn_selfactions with this: ///Allow owners to delete modulars if(_isModular || _isModularDoor || _typeOfCursorTarget in dayz_allowedObjects) then { if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then { _friendsallowedremove = false; // allow friendlies added to the pole to remove _adminList = ["0123456789","0123456789"]; // Add admins here _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 1]; _IsNearPlot = count (_findNearestPoles); _fuid = []; _allowed = []; if(_IsNearPlot > 0)then{ _thePlot = _findNearestPoles select 0; _friends = _thePlot getVariable ["plotfriends", []]; if(_friendsallowedremove)then{ { _friendUID = _x select 0; _fuid = _fuid + [_friendUID]; } count _friends; }else{ _fuid = [(_friends select 0)select 0]; }; if(dayz_characterID == _ownerID || (getPlayerUID player) in (_adminList + _fuid))then{ // // If u want that the object also belongs to someone on the plotpole. _player_deleteBuild = true; }; }else{ if(dayz_characterID == _ownerID || (getPlayerUID player) in _adminList)then{ _player_deleteBuild = true; }; }; }; }; i added so players can remove anything from dayz_allowedObjects, if you have something in there thats not a building you might want to change that. edit: it is advised to increase plot pole area size so other players can not move in on other players base and remove it, i also added my plotpole as indestructable object to make sure other players cant just destroy that and place their own next restart. rss_adm 1 Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2015 Report Share Posted March 30, 2015 Can't you let the server owner decide, which Objects will be counted in count Objects? For me (more the guy i work for and he's awesome) i prefer, that the Object Counter only get's Modular Items, like so: _count = count ((getPosATL player) nearObjects ["ModularItems",_range]); While others want to limit the Player Base sizes in cities etc, they want all Objects: _count = count ((getPosATL player) nearObjects ["All",_range]); Which includes object's like the Grascutter, which is pretty much invisible.. Setting up an array _ObjectsToCount = ["ModularItems","BuiltItems"]; //ModularItems and BuildItems because they do not include gras cutters or signs. Would be much more user friendly, as it gives you the option to set up your own counter (kind of). If the houses in cities should be counted to that would be DZE_Housebase (not sure). Since something like this wouldn't work: _count = count ((getPosATL player) nearObjects ["ModularItems","BuildItems",_range]); a work around for that would be to count the array size and count the objects inside foreach. (i guess? I'm not a pro, just trying to explain what i thought about) // Maybe give the user an Option to Upgrade his Plot to "pro".. In that case only modularItems would be counted, so the player has more "space" (?) to build. Link to comment Share on other sites More sharing options...
Halvhjearne Posted March 30, 2015 Report Share Posted March 30, 2015 _count = count ((getPosATL player) nearObjects ["ModularItems","BuildItems",_range]); this will always return 0, you cant use an array with nearObjects. Link to comment Share on other sites More sharing options...
dzrealkiller Posted March 31, 2015 Report Share Posted March 31, 2015 Just added plot management 2.1 maintain version with the dome NON plot4life version and I am getting errors, Could I please get some help with this? Below Is what's happening after installing this. Dome does not work and neither does Maintain :S Running Overpoch / Origins Taviana 20:02:11 Warning Message: No entry 'bin\config.bin/CfgWeapons.'. 20:02:11 Warning Message: No entry '.scope'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: Error: creating weapon with scope=private 20:02:11 Warning Message: No entry '.displayName'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.nameSound'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.type'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.picture'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.Library'. 20:02:11 Warning Message: No entry '.libTextDesc'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.model'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.simulation'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.fireLightDuration'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.fireLightIntensity'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.weaponLockDelay'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.weaponLockSystem'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.cmImmunity'. 20:02:11 Warning Message: '/' is not a value 20:02:11 Warning Message: No entry '.lockingTargetSound'. 20:02:11 Warning Message: Size: '/' not an array 20:02:11 Warning Message: No entry '.lockedTargetSound'. 20:02:11 Warning Message: Size: '/' not an array 20:02:11 Warning Message: No entry '.muzzles'. 20:02:11 Warning Message: Size: '/' not an array 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