Jump to content
Zupa

[Release] 2.1 Plot Management - UPDATED Object Counter

Recommended Posts

Hey All,

So I have kind of a weird issue that I can not figure out. I have P4L installed and that is working correctly. I can put down a plot pole and add friends to it and they can build however any time the server restarts it deletes the plot pole. 

I have removed the files and reinstalled this a few times now and am still not having any luck with getting it to work properly. 

Any help would be appreciated. 
 

Here are some of the RPT file errors I am seeing. 

_object setdir _dir;
_object setposATL _pos;
_object se>
20:44:29   Error position: <_dir;
_object setposATL _pos;
_object se>
20:44:29   Error Undefined variable in expression: _dir
20:44:29 File z\addons\dayz_server\system\server_monitor.sqf, line 178
20:44:29 "MOVED OBJ: "510" of class CinderWallDoorway_DZ to pos: [4371.19,11963.4,0]"
20:44:29 Error in expression <eCargoGlobal  _object;

 

20:50:41 Server: Object 3:31 not found (message 70)
20:50:41 Server: Object 3:30 not found (message 70)
20:50:41 Server: Object 3:40 not found (message 94)
20:50:41 Server: Object 3:39 not found (message 70)

22:50:25 Error in expression <["OBJ","519","Plastic_Pole_EP1_DZ","6",[any,any,"76561198017374692"],[],[],0.0,0>
22:50:25   Error position: <any,any,"76561198017374692"],[],[],0.0,0>

My Mission Files: https://www.dropbox.com/s/lgvq13j63ymx9kb/missions.zip?dl=0

Any help would be so greatly appreciated!

Share this post


Link to post
Share on other sites

Can someone help me with a RPT error?

 

 9:22:52 Error in expression <object)) then {
if (_objectID == "0" && _uid == "0") then
{
_object_position = g>
 9:22:52   Error position: <_uid == "0") then
{
_object_position = g>
 9:22:52   Error Undefined variable in expression: _uid
 9:22:52 File z\addons\dayz_server\compile\server_updateObject.sqf, line 29
 9:22:52 Error in expression <ntory;
};
case "damage": {
if ( (time - _lastUpdate) > 5) then {
call _object_da>
 9:22:52   Error position: <_lastUpdate) > 5) then {
call _object_da>
 9:22:52   Error Undefined variable in expression: _lastupdate
 9:22:52 File z\addons\dayz_server\compile\server_updateObject.sqf, line 185
 9:22:52 Error in expression <ame _objectID != "string") || (typeName _uid != "string")) then
{ 
diag_log(form>
 9:22:52   Error position: <_uid != "string")) then
{ 
diag_log(form>
 9:22:52   Error Undefined variable in expression: _uid
 9:22:52 File z\addons\dayz_server\compile\server_updateObject.sqf, line 21

The server_updateObject.sqf looks like this:

	_key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
		//diag_log ("HIVE: WRITE: "+ str(_key));
		_key call server_hiveWrite;
};

_object_inventory = {
    private["_inventory","_previous","_key"];
if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
    _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
} else {
    _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];
			};

Around the area where we have to replace this:

_inventory = [
getWeaponCargo _object,
getMagazineCargo _object,
getBackpackCargo _object
];

with this:

if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
    _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
} else {
    _inventory = [
    getWeaponCargo _object,
    getMagazineCargo _object,
    getBackpackCargo _object
    ];
};

cheers

Edited by Brainzaw

Share this post


Link to post
Share on other sites

Hi, got a weird error.

 

I can remove the Plot, remove the Firebarell, but i CANT remove the Cinderwalls. i can downgrade a cinderdoor, but not remove a wall. why? Oo

Scripts:

plotmanagement with snapbuild pro and vector <- works all fine, but remove dont work

any one a idea? i got this errors @ client side

 

Error in expression <
_allowed = [_owner] +  _fuid;   
if ( _playerUID in _allowed && _ownerID in _a>
  Error position: <_playerUID in _allowed && _ownerID in _a>
  Error Undefined variable in expression: _playeruid
File mpmissions\__CUR_MP.Chernarus\custom\fn_selfActions.sqf, line 290

Line 263 to 299

	// 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 {
            _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;
                };
            };                                        
        };
};

 

Edited by flashback

Share this post


Link to post
Share on other sites

Yeah I did try it last night and your right about it not letting you remove after death, I'm not to sure what to do though

Is there a fix for letting people remove their objects after death?

Share this post


Link to post
Share on other sites

Is there a fix for letting people remove their objects after death?

I have put together some code that fixes this.

How it works is if you are added to the plot pole with Manage plot you can remove any object at any time. Anybody added to the plot can remove anything even after death or server restart.

In your fn_selfActions.sqf.

Find these two blocks of code.

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;
                };
            };                                        
        };
};

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;
                };
            };                              
        };      
};

 

Replace both of those blocks of code with this

        if(_isModular || _isModularDoor) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
                _findNearestPoles = nearestObjects[player, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0];
                _fuid  = [];
                _allowed = [];				
				_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(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then {
			        _player_deleteBuild = true;
			    };
			};
        };

That's it, problem solved.

 

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

NOT PART OF THE FIX FOR REMOVING OBJECTS

I have also set it up so if you are not the owner of/added to the plot pole with manage plot you can't remove the plot pole. I know not all servers want this but base take overs was out of control on my servers. This was the easy fix as i did not have to make a rule of no base take overs. Its just not possible.

To do this open your fn_selfActions.sqf.

Find this block of code

		if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				_player_deleteBuild = true;
			};
		};

Change it to

		if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") then {
                _owner = _cursorTarget getVariable ["CharacterID","0"];
                _friends = _cursorTarget getVariable ["plotfriends", []];
                _fuid = [];
				_allowed = [];
               {
                _friendUID = _x select 0;
                _fuid = _fuid + [_friendUID];
               } forEach _friends;
                _allowed = [_owner];
				_allowed = [_owner] + _fuid;				
				if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then [{_player_deleteBuild = true},{_player_deleteBuild = false}]
				}else{_player_deleteBuild = true};
			};
		};

 

Hope this helps some people. Cheers...

Edited by syco

Share this post


Link to post
Share on other sites

Hi, got a weird error.

 

I can remove the Plot, remove the Firebarell, but i CANT remove the Cinderwalls. i can downgrade a cinderdoor, but not remove a wall. why? Oo

Scripts:

plotmanagement with snapbuild pro and vector <- works all fine, but remove dont work

any one a idea? i got this errors @ client side

 

Error in expression <
_allowed = [_owner] +  _fuid;   
if ( _playerUID in _allowed && _ownerID in _a>
  Error position: <_playerUID in _allowed && _ownerID in _a>
  Error Undefined variable in expression: _playeruid
File mpmissions\__CUR_MP.Chernarus\custom\fn_selfActions.sqf, line 290

Line 263 to 299

 
// 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 { _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; }; }; }; };

 

To fix that error

Add

"_playerUID"

To the private block of code at the top of your fn_selfActions.sqf. Make it look something like this.

private ["_isWreckBuilding","_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors","_player_deleteBuild","_player_flipveh","_player_lockUnlock_crtl","_player_butcher","_player_studybody","_player_cook","_player_boil","_hasFuelBarrelE","_hasHotwireKit","_player_SurrenderedGear","_isSurrendered","_isModular","_isModularDoor","_ownerKeyName","_temp_keys_names","_hasAttached","_allowTow","_liftHeli","_found","_posL","_posC","_height","_liftHelis","_attached","_playerUID"];

 

 

Next find

_hasToolbox = "ItemToolbox" in _itemsPlayer;

Under it add

_playerUID = getPlayerUID player;

 

For players to remove objects from there base at anytime follow my post above this one.

Edited by syco

Share this post


Link to post
Share on other sites

I have put together some code that fixes this.

How it works is if you are added to the plot pole with Manage plot you can remove any object at any time. Anybody added to the plot can remove anything even after death or server restart.

In your fn_selfActions.sqf.

Hidden Content

 

I have also set it up so if you are not the owner of/added to the plot pole with manage plot you can't remove the plot pole. I know not all servers want this but base take overs was out of control on my servers. This was the easy fix as i did not have to make a rule of no base take overs. Its just not possible.

To do this open your fn_selfActions.sqf.

Hidden Content

Hope this helps some people. Cheers...

To fix that error

Add

"_playerUID"

To the private block of code at the top of your fn_selfActions.sqf. Make it look something like this.

Hidden Content

 

Next find

_hasToolbox = "ItemToolbox" in _itemsPlayer;

Under it add

_playerUID = getPlayerUID player;

 

For players to remove objects from there base at anytime follow my post above this one.

I have just applied both of these fixes to my server and all works great ! I would say can we get these linked in the first page of the thread so people can find the fixes easy.

I also want to know using your method for removing objects at anytime is there a way to actually refund items when removing them as I think this would be great if you place a wall or floor wrong but don't have lots of in game cash to get another floor :) cheers !

Share this post


Link to post
Share on other sites

I have put together some code that fixes this.

How it works is if you are added to the plot pole with Manage plot you can remove any object at any time. Anybody added to the plot can remove anything even after death or server restart.

In your fn_selfActions.sqf.

Hidden Content

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

NOT PART OF THE FIX FOR REMOVING OBJECTS

I have also set it up so if you are not the owner of/added to the plot pole with manage plot you can't remove the plot pole. I know not all servers want this but base take overs was out of control on my servers. This was the easy fix as i did not have to make a rule of no base take overs. Its just not possible.

To do this open your fn_selfActions.sqf.

Hidden Content

Hope this helps some people. Cheers...

Ive been using the same method and works fine but a little tip , if you want to use the ammoboxes (random crates with vehicle ammo) you might want to make a new line on your fn_selfactions for _isWreckBuilding .

Otherwise your players wont be able to open them with a crowbar .

Change your code to this

if(_isDestructable || _isWreck || _isRemovable) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") then {
                _owner = _cursorTarget getVariable ["CharacterID","0"];
                _friends = _cursorTarget getVariable ["plotfriends", []];
                _fuid = [];
				_allowed = [];
               {
                _friendUID = _x select 0;
                _fuid = _fuid + [_friendUID];
               } forEach _friends;
                _allowed = [_owner];
				_allowed = [_owner] + _fuid;				
				if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then [{_player_deleteBuild = true},{_player_deleteBuild = false}]
				}else{_player_deleteBuild = true};
			};
		};

 

And underneith add this

 

if(_isWreckBuilding) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				_player_deleteBuild = true;
			};
		};	

 

Also keep in mind that code for plotmanagement with p4l is different like this

 

//Allow player to delete objects
		if(_isDestructable || _isWreck || _isRemovable) 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 {  
						_player_deleteBuild = true;
					};					
				}else{
					if(_ownerID == _playerUID)then{
						_player_deleteBuild = true;
					};
				};						                  
            };

 

 

Share this post


Link to post
Share on other sites

The fix works but noe people can't remove their own plot poles. Any tips?

Read my post man. You put in the code for removing plot poles also when it is not needed to allow players to remove all objects in there base.

You don't need the code for

if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then {

You only need code for this block.

if(_isModular || _isModularDoor) then {

To allow players to remove objects within there plot pole.

 

Change this

		if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") then {
                _owner = _cursorTarget getVariable ["CharacterID","0"];
                _friends = _cursorTarget getVariable ["plotfriends", []];
                _fuid = [];
				_allowed = [];
               {
                _friendUID = _x select 0;
                _fuid = _fuid + [_friendUID];
               } forEach _friends;
                _allowed = [_owner];
				_allowed = [_owner] + _fuid;				
				if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then [{_player_deleteBuild = true},{_player_deleteBuild = false}]
				}else{_player_deleteBuild = true};
			};
		};

Back to

		if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				_player_deleteBuild = true;
			};
		};

That will allow anyone to remove plot poles.

Edited by syco

Share this post


Link to post
Share on other sites

Ive been using the same method and works fine but a little tip , if you want to use the ammoboxes (random crates with vehicle ammo) you might want to make a new line on your fn_selfactions for _isWreckBuilding .

Otherwise your players wont be able to open them with a crowbar .

Change your code to this

if(_isDestructable || _isWreck || _isRemovable) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") then {
                _owner = _cursorTarget getVariable ["CharacterID","0"];
                _friends = _cursorTarget getVariable ["plotfriends", []];
                _fuid = [];
				_allowed = [];
               {
                _friendUID = _x select 0;
                _fuid = _fuid + [_friendUID];
               } forEach _friends;
                _allowed = [_owner];
				_allowed = [_owner] + _fuid;				
				if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then [{_player_deleteBuild = true},{_player_deleteBuild = false}]
				}else{_player_deleteBuild = true};
			};
		};

 

And underneith add this

 

if(_isWreckBuilding) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				_player_deleteBuild = true;
			};
		};

On my server players can remove these ammo box's no problem with my code. No need to make a new block for _isWreckBuilding  from what i see.

 

		if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") then {
                _owner = _cursorTarget getVariable ["CharacterID","0"];
                _friends = _cursorTarget getVariable ["plotfriends", []];
                _fuid = [];
				_allowed = [];
               {
                _friendUID = _x select 0;
                _fuid = _fuid + [_friendUID];
               } forEach _friends;
                _allowed = [_owner];
				_allowed = [_owner] + _fuid;	
				if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then [{_player_deleteBuild = true},{_player_deleteBuild = false}]
				}else{_player_deleteBuild = true};
			};
		};

KEEP IN MIND THIS CODE IS NOT NEEDED FOR REMOVING OBJECTS WITHIN THE PLOT POLE. I DID THIS TO STOP BASE RAIDS. PEOPLE KEEP PUTTING THIS IN THINKING IT IS PART OF THE FIX FOR REMOVING OBJECTS. IT IS NOT PART OF IT.

Edited by syco

Share this post


Link to post
Share on other sites

On my server players can remove these ammo box's no problem with my code. No need to make a new block for _isWreckBuilding  from what i see.

 

		if(_isDestructable || _isWreck || _isRemovable || _isWreckBuilding) then {
			if(_hasToolbox && "ItemCrowbar" in _itemsPlayer) then {
				if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") then {
                _owner = _cursorTarget getVariable ["CharacterID","0"];
                _friends = _cursorTarget getVariable ["plotfriends", []];
                _fuid = [];
				_allowed = [];
               {
                _friendUID = _x select 0;
                _fuid = _fuid + [_friendUID];
               } forEach _friends;
                _allowed = [_owner];
				_allowed = [_owner] + _fuid;	
				if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then [{_player_deleteBuild = true},{_player_deleteBuild = false}]
				}else{_player_deleteBuild = true};
			};
		};

KEEP IN MIND THIS CODE IS NOT NEEDED FOR REMOVING OBJECTS WITHIN THE PLOT POLE. I DID THIS TO STOP BASE RAIDS. PEOPLE KEEP PUTTING THIS IN THINKING IT IS PART OF THE FIX FOR REMOVING OBJECTS. IT IS NOT PART OF IT.

The code i provided is so only plotpole owners and people added on the plotpoles can remove the plotpole since a plotpole is in variables array in _isRemovable .

other thent that i dont use wrecks on my server so could have deleted that the _isRemovable  also has some more items in it that i use on the server , so from the moment my code is used they are only removable by owners and friends .

That's why i moved the _isWreckBuilding because that contains the ammo crates in  the array in variables .

But your fix for plotpoles removable by owner works fine but so does mine i just seperated them to make more items removable by owners and friends only .

Share this post


Link to post
Share on other sites

The code i provided is so only plotpole owners and people added on the plotpoles can remove the plotpole since a plotpole is in variables array in _isRemovable .

other thent that i dont use wrecks on my server so could have deleted that the _isRemovable  also has some more items in it that i use on the server , so from the moment my code is used they are only removable by owners and friends .

That's why i moved the _isWreckBuilding because that contains the ammo crates in  the array in variables .

But your fix for plotpoles removable by owner works fine but so does mine i just seperated them to make more items removable by owners and friends only .

Have you even try'ed my code out? I think not. The code i provide you DON'T have to remove the  _isWreckBuilding  from it to remove anything in the array of  DZE_isWreckBuilding. Try it out.

Both of ours works for only owners/anyone added to the plot pole with manage plot can remove the plot pole. No one else can.

All you did is copy/paste from the default install for _isModular and _isModularDoor and put it inside this block of code. That is why you need to remove _isWreckBuilding from it to allow players to remove ammo crates.

I copied/pasted some code from the  if (s_player_plotManagement < 0) then  block above and then wrote some of my own code so this does not need to be done.

My code is setup for plot poles only  (if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") then)  while not effecting anything else  ([{_player_deleteBuild = true},{_player_deleteBuild = false}]  }else{_player_deleteBuild = true};)

If it is not a plot pole and has required tools it will let you remove it. Works for anything in the array for DZE_isWreck, DZE_isRemovable (Minus "Plastic_Pole_EP1_DZ") and DZE_isWreckBuilding inside variables.sqf.

I understand you did yours this way for a good reason (make more items removable by owners and friends only because you added that stuff to the array's in variables.sqf) but our code is a lot different and is used for two similar but completely different reasons.

If someone wants plot poles to be only removable by the owner/anyone added to the plot pole, both of our code works fine. However with mine they don't need to remove/make a new block of code for any of the _isDestructable || _isWreck || _isRemovable || _isWreckBuilding to allow players to remove stuff put inside those arrays in variables.sqf.

Share this post


Link to post
Share on other sites

Have you even try'ed my code out? I think not. The code i provide you DON'T have to remove the  _isWreckBuilding  from it to remove anything in the array of  DZE_isWreckBuilding. Try it out.

Both of ours works for only owners/anyone added to the plot pole with manage plot can remove the plot pole. No one else can.

All you did is copy/paste from the default install for _isModular and _isModularDoor and put it inside this block of code. That is why you need to remove _isWreckBuilding from it to allow players to remove ammo crates.

I copied/pasted some code from the  if (s_player_plotManagement < 0) then  block above and then wrote some of my own code so this does not need to be done.

My code is setup for plot poles only  (if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ") then)  while not effecting anything else  ([{_player_deleteBuild = true},{_player_deleteBuild = false}]  }else{_player_deleteBuild = true};)

If it is not a plot pole and has required tools it will let you remove it. Works for anything in the array for DZE_isWreck, DZE_isRemovable (Minus "Plastic_Pole_EP1_DZ") and DZE_isWreckBuilding inside variables.sqf.

I understand you did yours this way for a good reason (make more items removable by owners and friends only because you added that stuff to the array's in variables.sqf) but our code is a lot different and is used for two similar but completely different reasons.

If someone wants plot poles to be only removable by the owner/anyone added to the plot pole, both of our code works fine. However with mine they don't need to remove/make a new block of code for any of the _isDestructable || _isWreck || _isRemovable || _isWreckBuilding to allow players to remove stuff put inside those arrays in variables.sqf.

Dude you are seriously reading over wat i am saying and i do not want to spend my time here to argue with you yes you have minus plastic pole , but i have more i want to be removed by owner or friend only in that array hence i seperated them .

If i use your code i would have to do this if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ || StorageShed_DZ || GunRack_DZ || and so on so on ") then {

because i want more stuff to removed by owner and friends only catch my drift now ?

 

Share this post


Link to post
Share on other sites

Dude you are seriously reading over wat i am saying and i do not want to spend my time here to argue with you yes you have minus plastic pole , but i have more i want to be removed by owner or friend only in that array hence i seperated them .

If i use your code i would have to do this if (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ || StorageShed_DZ || GunRack_DZ || and so on so on ") then {

because i want more stuff to removed by owner and friends only catch my drift now ?

I understand.

I am just posting off of your first post where you said i would have to remove _isWreckBuilding so people could open ammo boxes.

Ive been using the same method and works fine but a little tip , if you want to use the ammoboxes (random crates with vehicle ammo) you might want to make a new line on your fn_selfactions for _isWreckBuilding .

Otherwise your players wont be able to open them with a crowbar .

Just making my point, I do NOT have to remove _isWreckBuilding so my players can open ammo boxes with my method. That's all. Not trying to argue with you. You said i would and you was wrong.

Share this post


Link to post
Share on other sites

I have put together some code that fixes this.

How it works is if you are added to the plot pole with Manage plot you can remove any object at any time. Anybody added to the plot can remove anything even after death or server restart.

In your fn_selfActions.sqf.

Hidden Content

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

NOT PART OF THE FIX FOR REMOVING OBJECTS

I have also set it up so if you are not the owner of/added to the plot pole with manage plot you can't remove the plot pole. I know not all servers want this but base take overs was out of control on my servers. This was the easy fix as i did not have to make a rule of no base take overs. Its just not possible.

To do this open your fn_selfActions.sqf.

Hidden Content

Hope this helps some people. Cheers...

Added the fix to remove items and it does seem to work :D

Regards

Jonas

Edited by JonasF
Ok I tested some more and it worked again....

Share this post


Link to post
Share on other sites

Hi - just wondering if anyone can help?

I've looked through this thread many times but haven't found the answer just yet. After installing the script, it works except that the plot was able to be removed by anyone, friends on the plot or not.

What I want is for the owner of the plot to be able to remove plot only.

I did find this method below - however, there are 2 x "if(_isModular then {" references in my fn_selfactions so i added the code first to one, and then to both, but I still don't get the option to remove plot by the owner.. or anyone.

Also I am now unable to remove any walls/doors etc??

Any help is appreciated to get this awesome script working for me.

Many thanks!

 

---------------------------------------------------------------------------------------------------------------------------------------------------

 Crack open your custom Variables.sqf and find DZE_isRemovable array and remove plot pole from there.

 

That will not allow anyone to remove the plot, not even owner.

 

 

However if you want owner to be able to remove it create new array in your Variables.sqf

 

removable_plot = ["Plastic_Pole_EP1_DZ"];

 

Then open up your custom fn_selfActions.sqf and find

 

if(_isModular) then {

 

Replace this line with this

 

if(_isModular || _typeOfCursorTarget in removable_plot) then {

 

By doing so it will allow ONLY the owner and people added to the plot pole (if using plot management) to remove it.

 

 

Share this post


Link to post
Share on other sites

Hey everyone i've installed this along with Door management, and group maangement. i get the plot to show Manage Plot and can add players to the friendlies list and everything, yet it still gives them the error message that they need a plot within 30m to build. I am using plot 4 life. if anyone could please help i'd appreciate it.

Share this post


Link to post
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

  • Similar Content

    • By McLovin
      NOTICE: Duplicate of another question posted in the wrong section.
       
      So I've been playing this server that has a number of mods installed. I've been playing it for quite a while with the only errors I've been getting are regarding a 45 round RPK mag being missing, but other than that I've had no errors or any issues loading. Upon trying to place a plot pole, nothing happens; absolutely nothing, like no preview shows up, no prompt saying "starting construction" or anything like that, just blankness. When I try to do it again it says "building already in progress" and I can't do anything, not even lock my vehicle. Is there anything that can be done, or that can explain this phenomenon? To further the understanding of how this came to be, I bought a plot pole from the trader in Trader City Stary and tried placing it near Stary, but not too near it (near a thicket of bushes in the distance). Upon right clicking and hitting the build option, that's when I face my issue.
    • By Joseph Thompson
      Hello all,
      My name is Joseph. I am looking for active members on Arma 2-Overpoch to join a Team. You must have some knowledge in playing the game and  you must have a working mic (No Echo).
      We will be playing on a server that has recently started up but has big hopes for its self. The staff/Admins are really helpful and have helped to create other servers in the past.
      We will be working together as a team to attend and capture missions also Helping with base building ECT. How you play is entirely up to you if you (this meaning if you want to be a bandit or a hero)
      You must be over the ages of 16 and have a strong sense of humor.
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Please ensure you have one of the following programs:
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Team-speak
      Skype
      Discord
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Please fill in this form if you are interested in joining us.
      ------------------------------------------------------------------------------------------------------------------------------------------------
      Age-
      Name
      SteamName-
      SkypeName-
      DiscordName-
      Playtime-
      And last one: Are you from the UK?-
      ------------------------------------------------------------------------------------------------------------------------------------------------
      If you would like to contact me
      Discord: Joseph_Richards#3973
       
       
    • By Mattiman338
      Hi all, doing up a server for myself and a few friends but am having one issue which I am clueless as to why it is happening. It doesn't really affect game play but does make it difficult navigating through certain tasks.
      The issue arises with ZSC and Virtual Garage dialogs only as far as I have tested. Certain buttons within dialogs do not show, such as the deposit and withdraw buttons for the bankers and the store vehicle button in the Virtual Garage dialog.
      I am running InfiSTAR admin tools and antihack and as far as I know, that could be the culprit with these problems but I have checked the servers .RPT and checked for errors with ZSC and the Virtual Garage with nothing coming up.
      There are InfiSTAR logs showing though and one refers to a dialog. 
       
      In-game screens
      And my .RPT from the last restart to when I tested the dialogs to gather screenshots
       
       
      All help is appreciated as I can't find anything to do with infiSTAR in the script installs.
      Thanks all!
    • By Forrest
      I am looking for a friend or group that can be on from 7-10 am GMT. I want to build a base. My email is [email protected], Skype is Forrest Perkins, steam is forrestmikeperkinskirk. I may be on from 10- 16 am GMT on the 18th of July, 2017 but I'm always looking for friends I can trust.
  • Advertisement
  • Advertisement
  • Supporters
  • Advertisement
  • Discord

×