Jump to content
  • 0

[Issue] Cant remove modulars - Plot Management


Green_Thumb

Question

Hi guys,

 

since ivé installed plot management by zupa i dont get an option to remove a cinder wall or other modular base building items.

Plot management is working fine. but i think there is some mistake in step 5c in https://github.com/DevZupa/PlotManagement/blob/master/Modded_Epoch.md

 

When i use this code

 

//Allow owners to delete modulars
    if(_isModular && (dayz_characterID == _ownerID)) then {
            if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
                    _player_deleteBuild = true;
            };
    };
//Allow owners to delete modular doors without locks
    if(_isModularDoor && (dayz_characterID == _ownerID)) then {
            if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
                    _player_deleteBuild = true;
            };      
    };  

instead of this

 

///Allow owners to delete modulars
if(_isModular) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
            _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 {         
            _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;
                };
            };                              
        };      
};

its working fine. i can remove all buildings i build.

 

 

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

//Allow owners to delete modulars

if(_isModular) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
            _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 ["CharacterID","010"];
                _friends = _thePlot getVariable ["plotfriends", []];
                {
                  _friendUID = _x select 0;
                  _fuid  =  _fuid  + [_friendUID];
                } forEach _friends;
                _allowed = [_owner];    
                _allowed = [_owner] +  _fuid;   
                if ( dayz_characterID 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 == dayz_characterID)then{
                    _player_deleteBuild = true;
                };
            };                                        
        };
};
//Allow owners to delete modular doors without locks
if(_isModularDoor) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {         
            _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 ["CharacterID","010"];
                _friends = _thePlot getVariable ["plotfriends", []];
                {
                  _friendUID = _x select 0;
                  _fuid  =  _fuid  + [_friendUID];
                } forEach _friends;
                _allowed = [_owner];    
                _allowed = [_owner] +  _fuid;   
                if ( dayz_characterID 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 == dayz_characterID)then{
                    _player_deleteBuild = true;
                };
            };                              
        };      

    }; 

 

 

That's What I changed and it seemed to be Functioning for me now

Link to comment
Share on other sites

  • 0

//Allow owners to delete modulars

if(_isModular) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
            _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 ["CharacterID","010"];
                _friends = _thePlot getVariable ["plotfriends", []];
                {
                  _friendUID = _x select 0;
                  _fuid  =  _fuid  + [_friendUID];
                } forEach _friends;
                _allowed = [_owner];    
                _allowed = [_owner] +  _fuid;   
                if ( dayz_characterID 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 == dayz_characterID)then{
                    _player_deleteBuild = true;
                };
            };                                        
        };
};
//Allow owners to delete modular doors without locks
if(_isModularDoor) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {         
            _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 ["CharacterID","010"];
                _friends = _thePlot getVariable ["plotfriends", []];
                {
                  _friendUID = _x select 0;
                  _fuid  =  _fuid  + [_friendUID];
                } forEach _friends;
                _allowed = [_owner];    
                _allowed = [_owner] +  _fuid;   
                if ( dayz_characterID 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 == dayz_characterID)then{
                    _player_deleteBuild = true;
                };
            };                              
        };      

    }; 

 

 

That's What I changed and it seemed to be Functioning for me now

Dont work for me. Cant remove anything. no fresh placed walls and stuff

Link to comment
Share on other sites

  • 0
///Allow owners to delete modulars
if(_isModular) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
            _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 ["CharacterID","010"];
                _friends = _thePlot getVariable ["plotfriends", []];
                {
                  _friendUID = _x select 0;
                  _fuid  =  _fuid  + [_friendUID];
                } forEach _friends;
                _allowed = [_owner];    
                _allowed = [_owner] +  _fuid;   
                if (_owner == dayz_characterID || (getPlayerUID player) in _allowed) then {  // // If u want that the object also belongs to someone on the plotpole.
                    _player_deleteBuild = true;
                };                  
            }else{
                if(_owner == dayz_characterID)then{
                    _player_deleteBuild = true;
                };
            };                                        
        };
};
//Allow owners to delete modular doors without locks
if(_isModularDoor) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {         
            _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 ["CharacterID","010"];
                _friends = _thePlot getVariable ["plotfriends", []];
                {
                  _friendUID = _x select 0;
                  _fuid  =  _fuid  + [_friendUID];
                } forEach _friends;
                _allowed = [_owner];    
                _allowed = [_owner] +  _fuid;   
                if (_owner == dayz_characterID || (getPlayerUID player) in _allowed) then { //  // If u want that the object also belongs to someone on the plotpole.
                    _player_deleteBuild = true;
                };                  
            }else{
                if(_owner == dayz_characterID)then{
                    _player_deleteBuild = true;
                };
            };                              
        };      
};
Link to comment
Share on other sites

  • 0
///Allow owners to delete modulars
if(_isModular) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
            _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 ["CharacterID","010"];
                _friends = _thePlot getVariable ["plotfriends", []];
                {
                  _friendUID = _x select 0;
                  _fuid  =  _fuid  + [_friendUID];
                } forEach _friends;
                _allowed = [_owner];    
                _allowed = [_owner] +  _fuid;   
                if (_owner == dayz_characterID || (getPlayerUID player) in _allowed) then {  // // If u want that the object also belongs to someone on the plotpole.
                    _player_deleteBuild = true;
                };                  
            }else{
                if(_owner == dayz_characterID)then{
                    _player_deleteBuild = true;
                };
            };                                        
        };
};
//Allow owners to delete modular doors without locks
if(_isModularDoor) then {
        if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {         
            _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 ["CharacterID","010"];
                _friends = _thePlot getVariable ["plotfriends", []];
                {
                  _friendUID = _x select 0;
                  _fuid  =  _fuid  + [_friendUID];
                } forEach _friends;
                _allowed = [_owner];    
                _allowed = [_owner] +  _fuid;   
                if (_owner == dayz_characterID || (getPlayerUID player) in _allowed) then { //  // If u want that the object also belongs to someone on the plotpole.
                    _player_deleteBuild = true;
                };                  
            }else{
                if(_owner == dayz_characterID)then{
                    _player_deleteBuild = true;
                };
            };                              
        };      
};

THANK YOU SO MUCH!!!!! WORKS!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...