Jump to content

[Release] 2.1 Plot Management - UPDATED Object Counter


Zupa

Recommended Posts

On 3/10/2016 at 10:08 AM, WagnerMello said:

hello friends I'm trying to deploy this mod however the option to manage plot appears not am I putting wrong?

my fnselfaction


// ---------------------------------------Maintain Area Start------------------------------------
    if (_canDo && (speed player <= 1) && (cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {
    if (s_player_plotManagement < 0) then {
    _adminList = ["0152"]; // Add admins here if you admins to able to manage all plotpoles
    _owner = _cursorTarget getVariable ["CharacterID","0"];
    _friends = _cursorTarget getVariable ["plotfriends", []];
    _fuid = [];
    {
    _friendUID = _x select 0;
    _fuid = _fuid + [_friendUID];
    } forEach _friends;
    _allowed = [_owner];    
    _allowed = [_owner] + _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];
    };
};
	if (s_player_maintain_area < 0) then {
    	s_player_maintain_area = player addAction ["<t color=""#ffffff"">Maintain Area</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
    	s_player_maintain_area_preview = player addAction ["<t color=""#ccffffff"">Maintain Area Preview</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
    };
    } else {
    player removeAction s_player_plotManagement;
    s_player_plotManagement = -1;
    player removeAction s_player_maintain_area;
    s_player_maintain_area = -1;
    player removeAction s_player_maintain_area_preview;
    s_player_maintain_area_preview = -1;
};
// ---------------------------------------Maintain Area End------------------------------------

http://ap.imagensbrasil.org/image/p4dO5v

try it:

Spoiler

 if (_canDo && (speed player <= 1) && (cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {
    if (s_player_plotManagement < 0) then {
    _adminList = ["0152"]; // Add admins here if you admins to able to manage all plotpoles
    _owner = _cursorTarget getVariable ["CharacterID","0"];
    _friends = _cursorTarget getVariable ["plotfriends", []];
    _fuid = [];
    {
    _friendUID = _x select 0;
    _fuid = _fuid + [_friendUID];
    } forEach _friends;
    _allowed = [_owner];    
    _allowed = [_owner] + _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;   
};

Now near of the end. (check if u have this lines in blue)  i put the others  for reference

Spoiler

} else {
//Engineering


    player removeAction s_player_plotManagement;
    s_player_plotManagement = -1;


    
    {dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
    s_player_repair_crtl = -1;
    {player removeAction _x} count s_player_combi;s_player_combi = [];
    dayz_myCursorTarget = objNull;
    s_player_lastTarget = [objNull,objNull,objNull,objNull,objNull];
    {player removeAction _x} count s_player_parts;s_player_parts = [];
    s_player_parts_crtl = -1;
    {player removeAction _x} count s_player_lockunlock;s_player_lockunlock = [];
    s_player_lockUnlock_crtl = -1;
    player removeAction s_player_checkGear;
    s_player_checkGear = -1;
    player removeAction s_player_SurrenderedGear;
    s_player_SurrenderedGear = -1;
    player removeAction s_player_forceSave;
    s_player_forceSave = -1;

 

Link to comment
Share on other sites

I added this line yes
follows her down

else {
	//Engineering
	player removeAction s_player_plotManagement;
	s_player_plotManagement = -1;
	{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
	s_player_repair_crtl = -1;

	{player removeAction _x} forEach s_player_combi;s_player_combi = [];
		
	dayz_myCursorTarget = objNull;
	s_player_lastTarget = [objNull,objNull,objNull,objNull,objNull];

	{player removeAction _x} forEach s_player_parts;s_player_parts = [];
	s_player_parts_crtl = -1;

	{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
	s_player_lockUnlock_crtl = -1;

	player removeAction s_player_checkGear;
	s_player_checkGear = -1;

	player removeAction s_player_SurrenderedGear;
	s_player_SurrenderedGear = -1;

	//Others
	player removeAction s_player_forceSave;
	s_player_forceSave = -1;
	player removeAction s_player_flipveh;
	s_player_flipveh = -1;
	player removeAction s_player_sleep;
	s_player_sleep = -1;
	player removeAction s_player_deleteBuild;
	s_player_deleteBuild = -1;
	player removeAction s_player_butcher;
	s_player_butcher = -1;
	player removeAction s_player_cook;
	s_player_cook = -1;
	player removeAction s_player_boil;
	s_player_boil = -1;
	player removeAction s_player_fireout;
	s_player_fireout = -1;
	player removeAction s_player_packtent;
	s_player_packtent = -1;
	player removeAction s_player_fillfuel;
	s_player_fillfuel = -1;
	// Take Clothes by Zabn @ Balota Buddies
    player removeAction s_player_clothes;
    s_player_clothes = -1;
	player removeAction s_player_studybody;
	s_player_studybody = -1;
	//Dog
	player removeAction s_player_tamedog;
	s_player_tamedog = -1;
	player removeAction s_player_feeddog;
	s_player_feeddog = -1;
	player removeAction s_player_waterdog;
	s_player_waterdog = -1;
	player removeAction s_player_staydog;
	s_player_staydog = -1;
	player removeAction s_player_trackdog;
	s_player_trackdog = -1;
	player removeAction s_player_barkdog;
	s_player_barkdog = -1;
	player removeAction s_player_warndog;
	s_player_warndog = -1;
	player removeAction s_player_followdog;
	s_player_followdog = -1;
    
    // vault
	player removeAction s_player_unlockvault;
	s_player_unlockvault = -1;
	player removeAction s_player_packvault;
	s_player_packvault = -1;
	player removeAction s_player_lockvault;
	s_player_lockvault = -1;

	player removeAction s_player_information;
	s_player_information = -1;
	player removeAction s_player_fillgen;
	s_player_fillgen = -1;
	player removeAction s_player_upgrade_build;
	s_player_upgrade_build = -1;
	player removeAction s_player_maint_build;
	s_player_maint_build = -1;
	player removeAction s_player_downgrade_build;
	s_player_downgrade_build = -1;
	player removeAction s_player_towing;
	s_player_towing = -1;
	player removeAction s_player_fuelauto;
	s_player_fuelauto = -1;
	player removeAction s_player_fuelauto2;
	s_player_fuelauto2 = -1;
	
	// Zupa - SC - reset.
	player removeAction s_givemoney_dialog;
	s_givemoney_dialog = -1;
	player removeAction s_bank_dialog;
	s_bank_dialog = -1;
	player removeAction s_bank_dialog2;
	s_bank_dialog2 = -1;
	player removeAction s_player_packOBJ;
	s_player_packOBJ = -1;
};

 

Link to comment
Share on other sites

16 minutes ago, WagnerMello said:

not appear
only appears
Maintain Area Preview
maintain Area

well if maintain area is showed then you are making the changes in a wrong fnn_selfactions.sqf cuz in the last change i did.. i remove maintain area option see:

Spoiler

 if (_canDo && (speed player <= 1) && (cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {
    if (s_player_plotManagement < 0) then {
    _adminList = ["0152"]; // Add admins here if you admins to able to manage all plotpoles
    _owner = _cursorTarget getVariable ["CharacterID","0"];
    _friends = _cursorTarget getVariable ["plotfriends", []];
    _fuid = [];
    {
    _friendUID = _x select 0;
    _fuid = _fuid + [_friendUID];
    } forEach _friends;
    _allowed = [_owner];    
    _allowed = [_owner] + _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;   
};

how many calls for selfactions.sqf in your custom compiles do you have?

also check if ure calling selfactiont through init.sqf  for example.. i use selfactions through init.sqf and not in compiles.

Link to comment
Share on other sites

Juan I believe it is an error in the check plot manage it changed this part by placing it along with maintain area and appeared to otion the problem that it does not check if the plot is mine or not

 

if (s_player_maintain_area < 0) then {
		s_player_plotManagement = player addAction ["<t color='#0059FF'>Manage Plot</t>", "plotManagement\initPlotManagement.sqf", [], 5, false];
    	s_player_maintain_area = player addAction ["<t color=""#ffffff"">Maintain Area</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
    	s_player_maintain_area_preview = player addAction ["<t color=""#ccffffff"">Maintain Area Preview</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
    };

 

Link to comment
Share on other sites

5 minutes ago, WagnerMello said:

Juan I believe it is an error in the check plot manage it changed this part by placing it along with maintain area and appeared to otion the problem that it does not check if the plot is mine or not

 


if (s_player_maintain_area < 0) then {
		s_player_plotManagement = player addAction ["<t color='#0059FF'>Manage Plot</t>", "plotManagement\initPlotManagement.sqf", [], 5, false];
    	s_player_maintain_area = player addAction ["<t color=""#ffffff"">Maintain Area</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
    	s_player_maintain_area_preview = player addAction ["<t color=""#ccffffff"">Maintain Area Preview</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
    };

 

so you had the plot management scroll menu option?

Link to comment
Share on other sites

45 minutes ago, WagnerMello said:

removed the area and maintain the maintain area preview and left so the plot manage then he disappeared have no option

 

you dont have the option when u remove maintain option cuz your calling plotmanage only if is maintain_are see:

if (s_player_maintain_area < 0) then {
        s_player_plotManagement = player addAction ["<t color='#0059FF'>Manage Plot</t>", "plotManagement\initPlotManagement.sqf", [], 5, false];
        s_player_maintain_area = player addAction ["<t color=""#ffffff"">Maintain Area</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
        s_player_maintain_area_preview = player addAction ["<t color=""#ccffffff"">Maintain Area Preview</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
    };
   

this is bad...must be (if u speed is less or equal to 1 and your cursor is on the plot pole then allow plotmanagement option and maintnanin area)

Spoiler

if (_canDo && (speed player <= 1) && (cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {
    if (s_player_plotManagement < 0) then {
    _adminList = ["0152"]; // Add admins here if you admins to able to manage all plotpoles
    _owner = _cursorTarget getVariable ["CharacterID","0"];
    _friends = _cursorTarget getVariable ["plotfriends", []];
    _fuid = [];
    {
    _friendUID = _x select 0;
    _fuid = _fuid + [_friendUID];
    } forEach _friends;
    _allowed = [_owner];    
    _allowed = [_owner] + _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];
    };
};
    if (s_player_maintain_area < 0) then {
        s_player_maintain_area = player addAction ["<t color=""#ffffff"">Maintain Area</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
        s_player_maintain_area_preview = player addAction ["<t color=""#ccffffff"">Maintain Area Preview</t>", "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
    };
   

 

Link to comment
Share on other sites

anyway i think i confuse you more than help you :D

listen:

your fn_selfaction.sqf must be;

if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {
	
	
	
	if (s_player_plotManagement < 0) then {
    _adminList = ["0152"]; // Add admins here if you admins to able to manage all plotpoles
    _owner = _cursorTarget getVariable ["CharacterID","0"];
    _friends = _cursorTarget getVariable ["plotfriends", []];
    _fuid = [];
    {
    _friendUID = _x select 0;
    _fuid = _fuid + [_friendUID];
    } forEach _friends;
    _allowed = [_owner];    
    _allowed = [_owner] + _adminList + _fuid;
    if(_owner == dayz_characterID || (getPlayerUID player) in _allowed)then{            
    s_player_plotManagement = player addAction ["<t color='#0059FF'>PLOT-MANAGE</t>", "plotManagement\initPlotManagement.sqf", [], 5, false];
    };
};

		 
	} else {
	

    player removeAction s_player_plotManagement;
    s_player_plotManagement = -1;

};

and Find

} else {
    //Engineering

After that, add

player removeAction s_player_plotManagement;
s_player_plotManagement = -1;

 

thers others two steps to do it in selfactions.sqf  but with this two your be allowed to see plot management scroll menu option..

if u still have this issue check this guide:

Spoiler

 

 

Link to comment
Share on other sites

For the others guys:

The problem for @WagnerMello was he put the plot management code before define _cursorTarget variable in fn_selfaction.

so when he say:

if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then {

fn_selfaction do not recongnize _cursorTarget and dont read the plotmanagement code bellow.

Onces he put it after _cursorTarget = cursorTarget;

plot management start to work.

Link to comment
Share on other sites

Hello friends,

Recently I installed this script, and my stop server to synchronize with the database problems were

general vehicles stopped where save the players left always returning to home after restart

items stored in lockbox safes and tents were not saving more items after the restart ie they disappeared.

I wonder if I did something wrong and how to solve this problem

thank you

Link to comment
Share on other sites

  • 5 weeks later...

Hey :)

I have A Plot for Life v2.5 with snap build pro and in my compiles i use modularbuild.sqf not player build.sqf 

And in modularbuild.sqf i cant find the section i need to replace :( 

So do i leave that out or do i revert back to using old playerbuild.sqf and do changes ? 

After searching through those files i dont have that part to replace at all... 

After looking and trying everything it seems it is pretty much impossible to get this working with plot for life 2.5 cause all the contents of  modular_build.sqf, player_upgrade.sqf, and player_buildingDowngrade.sqf do not have the part to replace. And when i revert back to using the old .sqf files so i can replace what i need it breaks everything :( 

This part :( 

_friendlies     = player getVariable ["friendlyTo",[]];
// check if friendly to owner
if(_ownerID in _friendlies) then {
    _canBuildOnPlot = true;
};
Link to comment
Share on other sites

1 hour ago, EagerBeaver said:

Hey :)

I have A Plot for Life v2.5 with snap build pro and in my compiles i use modularbuild.sqf not player build.sqf 

And in modularbuild.sqf i cant find the section i need to replace :( 

So do i leave that out or do i revert back to using old playerbuild.sqf and do changes ? 

After searching through those files i dont have that part to replace at all... 

This part :( 


_friendlies     = player getVariable ["friendlyTo",[]];
// check if friendly to owner
if(_ownerID in _friendlies) then {
    _canBuildOnPlot = true;
};

Modular build is actually same old player_build, except it was split into 10 separate files due to its huge size and too many people modifying it... hence modular
The files you want all start with player_build_*.sqf

The file you are most likely after is called player_build_plotCheck.sqf

Link to comment
Share on other sites

1 hour ago, EagerBeaver said:

Hey :)

I have A Plot for Life v2.5 with snap build pro and in my compiles i use modularbuild.sqf not player build.sqf 

And in modularbuild.sqf i cant find the section i need to replace :( 

So do i leave that out or do i revert back to using old playerbuild.sqf and do changes ? 

After searching through those files i dont have that part to replace at all... 

After looking and trying everything it seems it is pretty much impossible to get this working with plot for life 2.5 cause all the contents of  modular_build.sqf, player_upgrade.sqf, and player_buildingDowngrade.sqf do not have the part to replace. And when i revert back to using the old .sqf files so i can replace what i need it breaks everything :( 

This part :( 


_friendlies     = player getVariable ["friendlyTo",[]];
// check if friendly to owner
if(_ownerID in _friendlies) then {
    _canBuildOnPlot = true;
};

i found it in my old server files ..as raymix says  its in player build plot check ( around line 30)

} else {
    // Since there are plot poles nearby we need to check ownership && friend status

    _buildcheck = [player, _nearestPole] call FNC_check_owner;
    _isowner = _buildcheck select 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;
    };
};

hers my whole player build plot check.sqf

Spoiler

if(!DZE_ActionInProgress) exitWith {};
//Check if nearby plotpoles exists
private ["_passArray","_isPole","_needText","_distance","_findNearestPoles","_findNearestPole","_IsNearPlot","_requireplot","_isLandFireDZ","_canBuildOnPlot","_nearestPole","_ownerID","_friendlies", "_playerUID","_plotcheck"];

//defines
_isPole = _this select 0;
_requireplot = _this select 1;
_isLandFireDZ = _this select 2;

_needText = localize "str_epoch_player_246"; //text for when requirements not met
_canBuildOnPlot = false;
_nearestPole = objNull;
_ownerID = 0;
_friendlies = [];

_plotcheck = [player, _isPole] call FNC_find_plots;
_distance = _plotcheck select 0;
_IsNearPlot = _plotcheck select 1;
_nearestPole = _plotcheck select 2;

// If item is plot pole && another one exists within 45m
if(_isPole && _IsNearPlot > 0) exitWith {  DZE_ActionInProgress = false; cutText [(format [localize "str_epoch_player_44", DZE_PlotPole select 1]) , "PLAIN DOWN"]; };

if(_IsNearPlot == 0) then {

    // Allow building of plotpole or items not requiring a plot pole
    if(!(_requireplot) || _isLandFireDZ) then {
        _canBuildOnPlot = true;
    };

} else {
    // Since there are plot poles nearby we need to check ownership && friend status

    _buildcheck = [player, _nearestPole] call FNC_check_owner;
    _isowner = _buildcheck select 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;
    };
};


_passArray = [_IsNearPlot,_nearestPole,_ownerID,_friendlies,_distance]; //create new array and pass it to caller

// End script if item is plot pole and another one exists within defined radius
if(_isPole && _IsNearPlot > 0) exitWith {
    DZE_ActionInProgress = false;
    cutText [(format [localize "str_epoch_player_44", DZE_PlotPole select 1]) , "PLAIN DOWN"];
    _passArray
};

if(!_canBuildOnPlot) exitWith { //end script if requirements were not met
    DZE_ActionInProgress = false;
    cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"];
    _passArray
};
_passArray //[int,Obj,int,array]

 

Link to comment
Share on other sites

2 minutes ago, juandayz said:

i found it in my old server files ..as raymix says  its in player build plot check ( around line 30)


} else {
    // Since there are plot poles nearby we need to check ownership && friend status

    _buildcheck = [player, _nearestPole] call FNC_check_owner;
    _isowner = _buildcheck select 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;
    };
};

 

Awesome that pretty much shows me exactly what and where i need to make the change in the 3 files  :) 

Thanx for your help guys :D 

 

 

Link to comment
Share on other sites

Quote

Awesome that pretty much shows me exactly what and where i need to make the change in the 3 files  :) 

Thanx for your help guys :D 

no problem.. and do not use my folder to overwrite yours.. contain very olds files.. and cant remember what kind of change i did inside.. just use tos get a reference :)

Link to comment
Share on other sites

  • 2 weeks later...

So i think i have a problem that i only just noticed :\ 

Ummm When my server restarts my name is not getting saved to my plot pole..

So when you log back in you have to add your self to the plot friends list again :\ 

Did i mess up the installation somewhere or is that the way its supposed to be ?

 Nevermind all fixed :D  I think lol 

Link to comment
Share on other sites

J become this Erro: 

16:00:51 Error in expression <tVariable["lastInventory",[]]);
if (str(_intentory) != _previous) then {
_object>
16:00:51   Error position: <_intentory) != _previous) then {
_object>
16:00:51   Error Nicht definierte Variable in Ausdruck: _intentory
16:00:51 File z\addons\dayz_server\compile\server_updateObject.sqf, line 66
16:00:51 Error in expression <tVariable["lastInventory",[]]);
if (str(_intentory) != _previous) then {
_object>
16:00:51   Error position: <_intentory) != _previous) then {
_object>
16:00:51   Error Nicht definierte Variable in Ausdruck: _intentory
16:00:51 File z\addons\dayz_server\compile\server_updateObject.sqf, line 66

After a restart, I can not add any more

Link to comment
Share on other sites

50 minutes ago, GamerTV said:

J become this Erro: 


16:00:51 Error in expression <tVariable["lastInventory",[]]);
if (str(_intentory) != _previous) then {
_object>
16:00:51   Error position: <_intentory) != _previous) then {
_object>
16:00:51   Error Nicht definierte Variable in Ausdruck: _intentory
16:00:51 File z\addons\dayz_server\compile\server_updateObject.sqf, line 66
16:00:51 Error in expression <tVariable["lastInventory",[]]);
if (str(_intentory) != _previous) then {
_object>
16:00:51   Error position: <_intentory) != _previous) then {
_object>
16:00:51   Error Nicht definierte Variable in Ausdruck: _intentory
16:00:51 File z\addons\dayz_server\compile\server_updateObject.sqf, line 66

After a restart, I can not add any more

ópen your server_monitor.sqf and start changing all "intentory" words by "inventory". also check the same into server_updateobjet.sqf

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...