Jump to content

[Release] 2.1 Plot Management - UPDATED Object Counter


Zupa

Recommended Posts

Should I also change in private also_intentory? (server_monitor.sqf)

private ["_nul","_result","_pos","_wsDone","_dir","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_totalvehicles","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_key","_vehLimit","_hiveResponse","_objectCount","_codeCount","_data","_status","_val","_traderid","_retrader","_traderData","_id","_lockable","_debugMarkerPosition","_vehicle_0","_bQty","_vQty","_BuildingQueue","_objectQueue","_superkey","_shutdown","_res","_hiveLoaded"];

 

Link to comment
Share on other sites

  On 11/21/2016 at 4:11 PM, GamerTV said:

Should I also change in private also_intentory? (server_monitor.sqf)

private ["_nul","_result","_pos","_wsDone","_dir","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_totalvehicles","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_key","_vehLimit","_hiveResponse","_objectCount","_codeCount","_data","_status","_val","_traderid","_retrader","_traderData","_id","_lockable","_debugMarkerPosition","_vehicle_0","_bQty","_vQty","_BuildingQueue","_objectQueue","_superkey","_shutdown","_res","_hiveLoaded"];

 

Expand  

into private and everywhere.  

just open your note++  choose  "Search------->Replace".

"Find What: _intentory" 

"Replace with: _inventory" 

thers almost 14 words to change

Link to comment
Share on other sites

  On 11/21/2016 at 4:20 PM, juandayz said:
  On 11/21/2016 at 4:11 PM, GamerTV said:

Should I also change in private also_intentory? (server_monitor.sqf)


private ["_nul","_result","_pos","_wsDone","_dir","_isOK","_countr","_objWpnTypes","_objWpnQty","_dam","_selection","_totalvehicles","_object","_idKey","_type","_ownerID","_worldspace","_intentory","_hitPoints","_fuel","_damage","_key","_vehLimit","_hiveResponse","_objectCount","_codeCount","_data","_status","_val","_traderid","_retrader","_traderData","_id","_lockable","_debugMarkerPosition","_vehicle_0","_bQty","_vQty","_BuildingQueue","_objectQueue","_superkey","_shutdown","_res","_hiveLoaded"];

 

Expand  

into private and everywhere.  

just open your note++  choose  "Search------->Replace".

"Find What: _intentory" 

"Replace with: _inventory" 

thers almost 14 words to change

Expand  

THX !!! you are the best

Link to comment
Share on other sites

Hey guys. I'm not very good at coding. Is there a way to automatically add the owner to the plot pole? To somehow have "call PlotAddFriend;" after placing the plot pole or something? I can't find where the code is that says "you have placed a 30m plot pole" but i figured i could copy that file to my mpmissioncache and add "add PlotAddFriend;" to it or something. Maybe this is a weird way to do it. Any suggestions to auto add the owner?

My other Idea was to use the PlayerBuild.sqf that is already in Snap_Pro folder and maybe do 

// check if friendly to owner
	if(dayz_characterID == _ownerID) then {  //Keep ownership
		// owner can build anything within his plot except other plots
		if(!_isPole) then {
			_canBuildOnPlot = true;
			call PlotAddFriend;
		};

Would that work maybe?

Link to comment
Share on other sites

  On 11/26/2016 at 3:27 PM, Brody said:

and 6 to

 

Expand  

step 6 do not need chhanges... for step 7 you need go back to step 5. see:

Zupa´s say : "Remember to change the paths to any files you've moved to your mission folder!"

thats means you need copy from  @Dayz_Epoch\addons\dayz_code\actions\ this files:

  Reveal hidden contents

onces you make this copy and paste into for example : MPMISSIONS\YOUR INSTANCE\plotManagement\

go to your Custom fn_selfActions.sqf and find :

 

  Reveal hidden contents

 


to change paths like  lines in blue:

  Reveal hidden contents

for player_build.sqf   if u have snap pro, you have this call in your CUSTOM compiles.sqf

player_build =              compile preprocessFileLineNumbers "custom\snap_pro\player_build.sqf";
 
 

***if u dont have snap pro, then copy and paste a player_build from  @Dayz_Epoch\addons\dayz_code\actions\ in "plotManagement" folder and into your custom compiles.sqf paste this lines in blue.

  Reveal hidden contents

now u can do it the step 7

  Reveal hidden contents

**for step 7: this chnges goes into the recent copied and pasted files. for this example the files are located into plotManagement folder-

Link to comment
Share on other sites

  On 11/26/2016 at 11:23 PM, juandayz said:

step 6 do not need chhanges... for step 7 you need go back to step 5. see:

Zupa´s say : "Remember to change the paths to any files you've moved to your mission folder!"

thats means you need copy from  @Dayz_Epoch\addons\dayz_code\actions\ this files:

  Reveal hidden contents

onces you make this copy and paste into for example : MPMISSIONS\YOUR INSTANCE\plotManagement\

go to your Custom fn_selfActions.sqf and find :

 

  Reveal hidden contents

 


to change paths like  lines in blue:

  Reveal hidden contents

for player_build.sqf   if u have snap pro, you have this call in your CUSTOM compiles.sqf

player_build =              compile preprocessFileLineNumbers "custom\snap_pro\player_build.sqf";
 
 

***if u dont have snap pro, then copy and paste a player_build from  @Dayz_Epoch\addons\dayz_code\actions\ in "plotManagement" folder and into your custom compiles.sqf paste this lines in blue.

  Reveal hidden contents

now u can do it the step 7

  Reveal hidden contents

**for step 7: this chnges goes into the recent copied and pasted files. for this example the files are located into plotManagement folder-

Expand  

thank you very much man 

Link to comment
Share on other sites

  On 11/27/2016 at 5:45 PM, Brody said:

i have done everything that i needed to do but i dont get the blue  "manage plot" option i dont know why 

 

 

Expand  

check step 8 in this guide. also take a look on steps 2,3 &4

  Reveal hidden contents

for blue sroll option you need a custom fn selfactions.sqf and this part allow the option:

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

 

Link to comment
Share on other sites

Hey, guys. I`ve install this mod, but have same problems... I can spawn, always kick to the lobby. RPT:
 

_dir = _worldspace select 0;
if (count (_worldspace select 1) == 3) then > 
5:46:18 Error position: <count (_worldspace select 1) == 3) then > 
5:46:18 Error count: Type String, expected Array,Config entry 
5:46:18 File z\addons\dayz_server\system\server_monitor.sqf, line 105 
5:46:30 "infiSTAR.de - Player-Log: DrTauren(76561198024876010) - 0h 00min | ******ADMIN******" 
5:46:49 "infiSTAR.de PlayerConnected: ["76561198024876010","DrTauren"]" 
5:46:49 "infiSTAR.de PlayerConnected: ["","__SERVER__"]" 
5:49:02 "infiSTAR.de PlayerDisconnected: _uid: 76561198024876010 _name: DrTauren" 
5:49:02 "get: STRING (76561198024876010), sent: STRING (76561198024876010)" 
5:49:02 "DISCONNECT: DrTauren (76561198024876010) Object: B 1-1-A:1 (DrTauren) REMOTE, _characterID: 0 at loc [-7244.94,19534.5,0]" 
5:49:02 "ERROR: Cannot Sync Character DrTauren as no characterID" 
5:49:02 Client: Remote object 2:9 not found 
5:49:02 Client: Remote object 2:10 not found 
5:49:02 Client: Remote object 2:11 not found 
5:49:02 Warning: Cleanup player - person 2:0 not found

Help me pls :dry:

Link to comment
Share on other sites

  On 11/28/2016 at 2:55 AM, DrTauren said:

Hey, guys. I`ve install this mod, but have same problems... I can spawn, always kick to the lobby. RPT:
 

_dir = _worldspace select 0;
if (count (_worldspace select 1) == 3) then > 
5:46:18 Error position: <count (_worldspace select 1) == 3) then > 
5:46:18 Error count: Type String, expected Array,Config entry 
5:46:18 File z\addons\dayz_server\system\server_monitor.sqf, line 105 
5:46:30 "infiSTAR.de - Player-Log: DrTauren(76561198024876010) - 0h 00min | ******ADMIN******" 
5:46:49 "infiSTAR.de PlayerConnected: ["76561198024876010","DrTauren"]" 
5:46:49 "infiSTAR.de PlayerConnected: ["","__SERVER__"]" 
5:49:02 "infiSTAR.de PlayerDisconnected: _uid: 76561198024876010 _name: DrTauren" 
5:49:02 "get: STRING (76561198024876010), sent: STRING (76561198024876010)" 
5:49:02 "DISCONNECT: DrTauren (76561198024876010) Object: B 1-1-A:1 (DrTauren) REMOTE, _characterID: 0 at loc [-7244.94,19534.5,0]" 
5:49:02 "ERROR: Cannot Sync Character DrTauren as no characterID" 
5:49:02 Client: Remote object 2:9 not found 
5:49:02 Client: Remote object 2:10 not found 
5:49:02 Client: Remote object 2:11 not found 
5:49:02 Warning: Cleanup player - person 2:0 not found

Help me pls :dry:

Expand  

you have something wrong in

5:46:18 File z\addons\dayz_server\system\server_monitor.sqf, line 105

 

maybe this line?

5:46:18 Error position: <count (_worldspace select 1) == 3) then > 
Link to comment
Share on other sites

  On 11/28/2016 at 2:25 PM, juandayz said:

you have something wrong in

5:46:18 File z\addons\dayz_server\system\server_monitor.sqf, line 105

 

maybe this line?

5:46:18 Error position: <count (_worldspace select 1) == 3) then > 
Expand  

 

  On 11/28/2016 at 2:25 PM, juandayz said:

you have something wrong in

5:46:18 File z\addons\dayz_server\system\server_monitor.sqf, line 105

 

maybe this line?

5:46:18 Error position: <count (_worldspace select 1) == 3) then > 
Expand  

Yeah, u right. But what wrong with this code? It`s clear EPOCH with Infi. When i setup Plot Management - this bug begins. I dont know what to do with it. Sry for my bad english

Link to comment
Share on other sites

  On 11/28/2016 at 7:39 PM, DrTauren said:

 

Yeah, u right. But what wrong with this code? It`s clear EPOCH with Infi. When i setup Plot Management - this bug begins. I dont know what to do with it. Sry for my bad english

Expand  

the only change in server_monitor used for plotmanagement is:

STEP 8 This one is in your dayz_server.pbo (Modifying server_monitor.sqf)
8 A
Find

_object setVariable ["ObjectID", _idKey, true];

After that, add

if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then {
_object setVariable ["plotfriends", _intentory, true];
};

8 B
Find

if (count _intentory > 0) then {

Replace that with

if ((count _intentory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ")) then {

 

 

check all of this.. and remember all _intentory variables must be _inventory

Link to comment
Share on other sites

  On 11/28/2016 at 7:45 PM, juandayz said:

the only change in server_monitor used for plotmanagement is:

STEP 8 This one is in your dayz_server.pbo (Modifying server_monitor.sqf)
8 A
Find

_object setVariable ["ObjectID", _idKey, true];

After that, add

if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then {
_object setVariable ["plotfriends", _intentory, true];
};

8 B
Find

if (count _intentory > 0) then {

Replace that with

if ((count _intentory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ")) then {

 

 

check all of this.. and remember all _intentory variables must be _inventory

Expand  

All codes like in guide, man. It`s all right. I dont understand what wrong with tgat

Link to comment
Share on other sites

@DrTauren replace your server_monitor.sqf with this and try:

  Reveal hidden contents

 

Link to comment
Share on other sites

  On 11/21/2016 at 8:28 PM, looter809 said:

Hey guys. I'm not very good at coding. Is there a way to automatically add the owner to the plot pole? To somehow have "call PlotAddFriend;" after placing the plot pole or something? I can't find where the code is that says "you have placed a 30m plot pole" but i figured i could copy that file to my mpmissioncache and add "add PlotAddFriend;" to it or something. Maybe this is a weird way to do it. Any suggestions to auto add the owner?

My other Idea was to use the PlayerBuild.sqf that is already in Snap_Pro folder and maybe do 

// check if friendly to owner
	if(dayz_characterID == _ownerID) then {  //Keep ownership
		// owner can build anything within his plot except other plots
		if(!_isPole) then {
			_canBuildOnPlot = true;
			call PlotAddFriend;
		};

Would that work maybe?

Expand  
 
 

I haven't tested this, just threw it together. Basically, just PlotAddFriend modified to add the builder to the plot.

 

Add this to the private array at the top of player_build.sqf (I used the default player_build.sqf from snap pro files)

,"_nearPlots", "_selectedPlot", "_onPlot", "_uidPlayer", "_playerName"

Then, find this line (the position of this may need to change - please test): 

cutText [format[(localize "str_epoch_player_139"),_text, _counter,_limit], "PLAIN DOWN"];

And add this under it:

if (_classname == "Plastic_Pole_EP1_DZ") then {
	_nearPlots = nearestObjects [player, ["Plastic_Pole_EP1_DZ"],15];
	_selectedPlot = _nearPlots select 0;
	_onPlot = _selectedPlot getVariable ["plotfriends",[]];
	_uidPlayer = getPlayerUID player;
	_playerName = name player;
	_onPlot = _onPlot  + [[_uidPlayer,_playerName]];
	_selectedPlot setVariable ["plotfriends", _onPlot, true];
	PVDZE_veh_Update = [_selectedPlot,"gear"];
	publicVariableServer "PVDZE_veh_Update";
	if (isServer) then {
		PVDZE_veh_Update call server_updateObject;
	};
};

Let me know if it works. Like I said though, I use plot 4 life so haven't tested this. If it does add you to the plot after you build it, restart and see if you stay on it. :)

Link to comment
Share on other sites

  On 11/30/2016 at 2:17 AM, looter809 said:

@BigEgg Hey, thanks for getting back to me and helping a brother out. Tested it. Was very excited to see it automatically put my name on the friends list, but as you suspected after a restart the name was no longer there.

Expand  

Okay - let me adjust the position of it. Will repost the new location shortly.

Link to comment
Share on other sites

  On 11/30/2016 at 2:19 AM, looter809 said:

Fastest response time ever! Alrighty, sounds good.

Expand  

Try finding this code (around line 667):

_tmpbuilt setVariable ["CharacterID",dayz_characterID,true];

// fire?
if(_tmpbuilt isKindOf "Land_Fire_DZ") then {
	_tmpbuilt spawn player_fireMonitor;
} else {
	PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_vector],_classname];
	publicVariableServer "PVDZE_obj_Publish";
};

and replace all of that with:

_tmpbuilt setVariable ["CharacterID",dayz_characterID,true];

					if (_tmpbuilt isKindof "Plastic_Pole_EP1_DZ") then {
						PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_vector],_classname];
						publicVariableServer "PVDZE_obj_Publish";
						_nearPlots = nearestObjects [player, ["Plastic_Pole_EP1_DZ"],15];
						_selectedPlot = _nearPlots select 0;
						_onPlot = _selectedPlot getVariable ["plotfriends",[]];
						_uidPlayer = getPlayerUID player;
						_playerName = name player;
						_onPlot = _onPlot  + [[_uidPlayer,_playerName]];
						_selectedPlot setVariable ["plotfriends", _onPlot, true];
						PVDZE_veh_Update = [_selectedPlot,"gear"];
						publicVariableServer "PVDZE_veh_Update";
						if (isServer) then {
							PVDZE_veh_Update call server_updateObject;
						};
					} else {
						if(_tmpbuilt isKindOf "Land_Fire_DZ") then {
							_tmpbuilt spawn player_fireMonitor;
						} else {
							PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_vector],_classname];
							publicVariableServer "PVDZE_obj_Publish";
						};
					};

 

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...