Jump to content

[Release] - A Plot for life v2.5. Keep your buildables on death. Take plot ownership


Recommended Posts

I've got 2.5 version working with Snapping/Precise Build/Vector Build/Door Management but I have to add myself to the plot pole first to build, even if I place it.

 

Is there a way we can have it "automatically" add the person who places the plot pole so they can build right away?

Link to comment
Share on other sites

something like this:

(not tested!)

if (_tmpbuilt isKindOf "Plastic_Pole_EP1_DZ") then {
	_tmpbuilt setVariable ["plotfriends", [player], true];
	PVDZE_veh_Update = [_tmpbuilt,"gear"];
	publicVariableServer "PVDZE_veh_Update";
	if (isServer) then {
				PVDZE_veh_Update call server_updateObject;
	};
};

must be placed after (the part without setting a code)

publicVariableServer "PVDZE_obj_Publish";
Link to comment
Share on other sites

im starting to merge all that too cen

 

when it came to plot management and editing player_build, player_upgrade, player_downgrad

 

ive only edit fn_check_owner to this

// Check Ownership by RimBlock (http://epochmod.com/forum/index.php?/user/12612-rimblock/)
 
private ["_player","_object","_playerUID","_ObjectOwner","_owner","_friendlies","_friendly","_return"];
 
_player = _this select 0;
_Object = _this select 1;
_Owner = false;
_friendly = false;
 
_playerUID = [_player] call FNC_GetPlayerUID;
_ObjectOwner = _object getVariable ["ownerPUID","0"];
_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;
};
 
//_friendlies = _player getVariable ["friendlyTo",[]];
 
if (_playerUID == _ObjectOwner) then {
_owner = true;
};
 
/*if (_ObjectOwner in _friendlies) then {
_friendly = true;
};*/
 
_return = [_owner, _friendly];
_return

 

i kept this and owner does not need to be in friends list of plot management

if (_playerUID == _ObjectOwner) then {
_owner = true;
};

im still testing thou....

Link to comment
Share on other sites

 

Error in expression <;

} else {


if ((isPlayer _unit) && !(_targetUID in _friendlies)) then {
r_act>
  Error position: <_targetUID in _friendlies)) then {
r_act>
  Error Undefined variable in expression: _targetuid
File mpmissions\__CUR_MP.chernarus\Custom\A_Plot_for_Life\Compile\fn_damageActions.sqf, line 185
Error in expression <nit getVariable ["CharacterID", 0];
if (DZE_APlotforLife) then {
_targetUID = [_>
  Error position: <DZE_APlotforLife) then {
_targetUID = [_>
  Error Undefined variable in expression: dze_aplotforlife
File mpmissions\__CUR_MP.chernarus\Custom\A_Plot_for_Life\Compile\fn_damageActions.sqf, line 91
Error in expression <uild = true;
};
};



if(_isModular && (_playerUID == _ownerID)) then {
if(_hasT>
  Error position: <_playerUID == _ownerID)) then {
if(_hasT>
  Error Undefined variable in expression: _playeruid
File mpmissions\__CUR_MP.chernarus\Custom\actions\fn_selfActions.sqf, line 265
Error in expression < = 	"ItemToolbox" in _itemsPlayer;

if (DZE_APlotforLife) then {
_playerUID = [p>
  Error position: <DZE_APlotforLife) then {
_playerUID = [p>
  Error Undefined variable in expression: dze_aplotforlife
File mpmissions\__CUR_MP.chernarus\Custom\actions\fn_selfActions.sqf, line 163

Error in expression <;

} else {


if ((isPlayer _unit) && !(_targetUID in _friendlies)) then {
r_act>
  Error position: <_targetUID in _friendlies)) then {
r_act>
  Error Undefined variable in expression: _targetuid
File mpmissions\__CUR_MP.chernarus\Custom\A_Plot_for_Life\Compile\fn_damageActions.sqf, line 185
Error in expression <nit getVariable ["CharacterID", 0];
if (DZE_APlotforLife) then {
_targetUID = [_>
  Error position: <DZE_APlotforLife) then {
_targetUID = [_>
  Error Undefined variable in expression: dze_aplotforlife
File mpmissions\__CUR_MP.chernarus\Custom\A_Plot_for_Life\Compile\fn_damageActions.sqf, line 91
Error in expression <uild = true;
};
};


[SPOILER
if(_isModular && (_playerUID == _ownerID)) then {
if(_hasT>
  Error position: <_playerUID == _ownerID)) then {
if(_hasT>
  Error Undefined variable in expression: _playeruid
File mpmissions\__CUR_MP.chernarus\Custom\actions\fn_selfActions.sqf, line 265
Error in expression < = 	"ItemToolbox" in _itemsPlayer;

if (DZE_APlotforLife) then {
_playerUID = [p>
  Error position: <DZE_APlotforLife) then {
_playerUID = [p>
  Error Undefined variable in expression: dze_aplotforlife
File mpmissions\__CUR_MP.chernarus\Custom\actions\fn_selfActions.sqf, line 163
[/SPOILER]

Well, Myself and the staff have been fighting with this for a while now,

We have merged the files and continue to get an error (Spoiler) the Client RPT goes full retard.

Problem(s) as follow

   No Upgrading - "Plot pole with in 30m" Pole must be removed and replaced

   Unlock Safe (No Option)

 

We have installed :

   P4L

   Precision Build

   Vector

   ZSC

 

Everything Else Is just gravy and has no issues. This is Seriously impeding our progress

Any Complete Answers are very welcome.

 

If you are willing to get hands on in EU TZ, Private Message me for contact information.

        Contact methods available - Skype / TeamSpeak 3 / Mumble

        For Compensation with services rendered you need to have an Active PayPal account.

Link to comment
Share on other sites

Would agree.

 

The key error seems to be 

Error Undefined variable in expression: dze_aplotforlife

To be fair, whilst the install instructions do say

*** Turn on options ***


Turn on A plot for Life (check ownership against SteamID).
DZE_APlotforLife = true;

They do not say where.

 

Put the options lines in the init.sqf file in the mpmissions\[mapname]\ folder or add them to the variables.sqf file.

 

I will amend the instructions when I get a chance this week,

Link to comment
Share on other sites

They Say if you place enough apes with typewriters in a room, they will eventually type the constitution.

The same can now be said for a Dayz Overpoch Server.

 

I will flog the staff until moral improves (and not the happy flogging kind either)

 

Problem Solved, Thanks Gents o/

Link to comment
Share on other sites

ya rimblock i ran into the same issue when installing, at first i didnt care to put the variable on init.sqf because i figured it was in variables.sqf, then i came up with the same errors took a second look at variables.sqf and noticed these variables were not in `variables.sqf`

DZE_APlotForLife = true;
DZE_modularBuild = true;

didnt know if you meant it to leave like that

 

Edit:

also could you explain what exactly helperDetach does ? if its not a bother, i took a look at the code but couldnt figure it out. it helps with manual selection when above water ?

Link to comment
Share on other sites

  • 2 weeks later...

server owners that have several scripts already implemented, should know how to do this already ...

I would really like to be born with your knowledge.  People have to start somewhere.  Even if i had your brain maybe id be a bit smarter, but then again my EGO would blow up.

 

Only if everyone was smart like you...

Link to comment
Share on other sites

I would really like to be born with your knowledge.  People have to start somewhere.  Even if i had your brain maybe id be a bit smarter, but then again my EGO would blow up.

 

Only if everyone was smart like you...

 

 

too bad you arent even smart enough to realize this is a 2 months old post ... lol

Link to comment
Share on other sites

question....redid one of my servers...database wipe - NO other mods,,,plot4life works til server restart - then the plot needs to be uprooted and placed again - cycle starts over...no rpt errors

once laid down player can die 10 times and plot4life works....server restarts then have to start over ? any ideas .... never had this issue in the past  THANKS

 

 

 

sry posted this on plot management...

Link to comment
Share on other sites

  • 2 weeks later...

I have this error: Error in expression <then

{
_dir = _worldspace select 0;
if (count (_worldspace select 1) == 3) then >
 2:33:36   Error position: <count (_worldspace select 1) == 3) then >
 2:33:36   Error count: Type String, expected Array,Config entry
 2:33:36 File custom\system\server_monitor.sqf, line 105
 
This is a test server so I am not adding anything new. If I wipe the object_data table the server will restart fine, but as soon as I build anything and restart the server I get the above error.  I am not importing anything from an old server, just simply building something new.  
 
My installed scripts are A Plot for Life 2.5 which includes Precise Base Building and Snap-Pro.  I also have Vectors installed.   
This is an example of what an object in world space looks like:
["355.169647","10999.567383,17277.123047,1.0469246]","76561197960443125",[[-0.084,0.996,0],[0,0,1]]]
 
I really need help with this as I have been digging for an answer and can't find one.
Link to comment
Share on other sites

In an effort to insure there could be no conflicts with my above problem. I stripped my server down to no mods except for the ones listed above, and after the redo I get the same error and problem!  The server runs fine with just A Plot for Life, but breaks after I add Vectors and build something then restart the server.  The only things in the object_data table are the items I build for testing.  I am sure I am not the only person that has run into this problem!

Link to comment
Share on other sites

In an effort to insure there could be no conflicts with my above problem. I stripped my server down to no mods except for the ones listed above, and after the redo I get the same error and problem! The server runs fine with just A Plot for Life, but breaks after I add Vectors and build something then restart the server. The only things in the object_data table are the items I build for testing. I am sure I am not the only person that has run into this problem!

There are some posts from the author about the version of p4l you can use with vector. Have you checked that? You can only go up to 2.35 I think from memory.

Also, I use precise with vector and installed that at the same time. So, my advice is if you are on the correct version of p4l, try adding precise and see if that fixes it.

Good luck man.

Link to comment
Share on other sites

I finally figured it out and will write it here so others like me might avoid long hours of pulling hair.  The problem was in the server_monitor.sqf.  When installing vectors after installing A Plot for Life 2.5 the directions in vectors states:

"Start by opening your **server_monitor.sqf**(Remove anything done from P4L installation) which is located in the system folder and find the following code block"

 

The problem with this statement is there is code that was put in by A Plot for Life that is needed: 


 

if ((typeName (_worldspace select 0)) == "STRING") then {

    _worldspace set [0, call compile (_worldspace select 0)];
    _worldspace set [1, call compile (_worldspace select 1)];};
 
It should look like this: 
_pos = [0,0,0];
_wsDone = false;
if (count _worldspace >= 2) then
{
     if ((typeName (_worldspace select 0)) == "STRING") then {
         _worldspace set [0, call compile (_worldspace select 0)];
         _worldspace set [1, call compile (_worldspace select 1)];
     };
     _dir = _worldspace select 0;
     if (count (_worldspace select 1) == 3) then {
          _pos = _worldspace select 1;
          _wsDone = true;
     }
};
So it should not be said to disregard everything done by A Plot for Life, because if you do that part of the code will be left out and you will get the error I described above.  If you use the server_monitor.sqf file provided by A Plot for Life then be careful when you see the instructions: 
 
Once that is complete, find this next line:
```
_object setVariable ["ObjectID", _idKey, true];
```
And place the following after it:
```
_object setVariable ["ownerPUID", _ownerPUID, true];
```
 
That line is already in the script so if you are not paying attention you will apply the same line twice.

Link to comment
Share on other sites

How come nobody gets the option to unlock their safes? Nobody can get access to their safes unless I open them with admin powers.

if it's working correctly they don't need to enter codes anymore as the safe code is saved to their character ID. If they don't get the option to just open it then I guess you have something messed up.
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
×
×
  • Create New...