Jump to content

[Howto/Release] Tie PlayerUID To All Buildable Objects / Keep plot pole after death [No SQL Triggers] UPDATE 16/04/2014


Recommended Posts

Hi,
 
I have been going through the code as a tech exercise to try to get to grips with scripting.  I have very little experience with ARMA II but have over 20 years writing SQL, shell scripts and various over little bits and pieces.  Great job and interesting solution. 
 
Please note that none of the stuff below is intended as criticism in any way but collaboration.  I have learnt a great deal just looking at this post and subsequent directions it sent me investigating.
 
My understanding is that the problem currently existing is this;

  • The characterid is used for buildable objects and friend associations.
  • The characterid changes if a character dies.
  • The DB characterid field is numberic
  • The common id for a player is the playerUID which is a string and can contain alphanumberic characters (AX at the end denoting Arma X being the one currently seen by server operators).

The solution you have implemented is to have a check in every relevant sqf to see if the playerUID has "AX" in it and if so convert the "AX" part to 999 both on saves to the DB of new objects and any interactions with objects (destroy, modify etc).  This seems like a fairly decent solution to the current problems.
 
What I could see from the install instructions is that there is a lot of code duplication over multiple sqf files for checking if the PlayerUID needed converting and then converting it if so.  The code also uses calls to the Kron string functions that that also call other Kron string functions, both of which may affect server performance.  It got me wondering if there may be a more efficent way to do this but still based on your underlying logic of intercepting characterID calls and converting them to playerUIDs.
 
The "paper" solution that seems like it may work is below.  When I say "paper" I mean I am not near a Epoch erver so cannot test at this point.  The code syntax may be a little out so please sanity check and test before putting live.  Of course ARMA II may throw up some 'issue' doing it this way that you may have already discovered and you discarded this direction because of it :D .
 
Tested solution can be found here (to be updated after it is posted to this thread). 

 
RB

Link to comment
Share on other sites

Well this i like first draft and i didn't have had any time since to optimize it. you can optimize it and i might do it when 1.0.5 comes out, but i'm starting to move to ArmA 3 for most of our servers so i really don't spend that much time on ArmA 2 scripts any more.

 

And the first error you show seems like you have an extra closing bracket

Link to comment
Share on other sites

I added the mod perfect works great. The only thing I saw was if you have a door or garage in you inventory and add a lock to it and then place/build it. You are unable to unlock the door/garage. Anyway to fix this? Doesn't seem to have a object id or anything. Any help would be great.

Link to comment
Share on other sites

Well this i like first draft and i didn't have had any time since to optimize it. you can optimize it and i might do it when 1.0.5 comes out, but i'm starting to move to ArmA 3 for most of our servers so i really don't spend that much time on ArmA 2 scripts any more.

 

And the first error you show seems like you have an extra closing bracket

 

Sure. Again, this is not in any way meant to detract for the work you have done, just as an addition and collaborative exersize so it is also not only on your shoulders.

 

If you are happy to go the collabrative route then great.  If you would rather leave the release as is and just work on it by yourself then that is also fine and I will move this over to another thread to remove the clutter and possible confusion for others.

 

Anyway,

 

Yep I am hoping that there is a rouge } or something that has sneeked in and finding it will remove the other issues.  My last attempt last night resulted in my character falling over being overburdened and not getting up again whilst trying to move somewhere and place a plot pole.

 

I will now also turn on the -showscripterrors switch as well.... doh :D .  Just going through some scripting guides to improve understanding of this language.

 

RB

Link to comment
Share on other sites

Quick Questions:

 

1) Does this allow the player to remove anything he has placed? cause as it is now, "Admin can you come delete this?"

2) Will this prevent players from being able to remove Metal Walls, Wire Fencing, Tank Traps, and SandBags that dont belong to them?

     Cause as it is now (unless i fucked something up on day 1) is anyone can remove anyones Metal Walls, Wire Fencing, Tank Traps, and SandBags.  Which makes metal walls useless.

 

 

(im about to test on my server right now. ill post the answers)

Link to comment
Share on other sites

Quick Questions:

 

1) Does this allow the player to remove anything he has placed? cause as it is now, "Admin can you come delete this?"

2) Will this prevent players from being able to remove Metal Walls, Wire Fencing, Tank Traps, and SandBags that dont belong to them?

     Cause as it is now (unless i fucked something up on day 1) is anyone can remove anyones Metal Walls, Wire Fencing, Tank Traps, and SandBags.  Which makes metal walls useless.

 

 

(im about to test on my server right now. ill post the answers)

 

Whilst I cannot help specifically with the original code posted up in the first post in this thread, I may be able to give some pointers I have gleaned whilst trying to get my enhancement in post #128 working (still a WIP - do not use).

 

Any existing structures you own will not be yours after this is put in place.  This release changes the way new items are linked to players and how comparisons between the player trying to interact with the item and the items owner are done (ie. using the PlayerUID rather than the players characterID).  You can think of it as linking your game serial number to the buildable items rather than an identifier for your character which changes when you die.

 

To add a bit more complexity, the playerUID can be numbers of letters where as the characterID can only be numbers.  The solution this release uses is to change any "AX" characters on the playerUID to 999.  AX is used in the serial numbers of the Arma II Anniversary package. 

 

To get around this, you will need to update the historical linking in the characterID field of the Object_data table for all of your buildable items.

 

Danger: Use at your own risk.  Should work with vanilla Epoch and this release but other mods may be affected in unpredictable ways and nothing has been tested.  Please test before using on a prod server and this only needs to be done after you have applied this release and verified it is working.

 

What I would do is get a plot pole, place it somewhere and check the DB for the characterID in the object_data table.  It should match your playerUID with any instances of the letters "AX" changed 999.  Copy that new number to all your objects in the object_data table that you own.  You can find all the characterIDs that link to your playerUID in the character_data table.

 

Fristly I would confirm all the items that are linked to you in the game with

select * from object_data where characterID in [the characterIDs linked to your playerUID in the character_data table];

Make sure only buildable items are listed.  Owned cars have the key code in the characterID field in object_data, lockables (safes / combination doors etc) have the combination code stored so those should not be affected.  I am unaware of any other things though so it is worth looking just to be sure. 

 

For the relinking, Something like

update object_data
set characterID = [the new id for the pot pole you just placed]
where characterID in [X,X,X,X,X];

ie.

 

If you had a PlayerUID of 123456789 and you had characters with characterIDs of 1,2,3,4,5 then you would use.

update object_data
set characterID = 123456789
where characterID in [1,2,3,4,5];

or

 

If you had a PlayerUID of 1234567AX and you had characters with characterIDs of 1,2,3,4,5 then you would use.

update object_data
set characterID = 1234567999
where characterID in [1,2,3,4,5];

as the "AX" in your PlayerUID is converted to 999 by the release.

 

That should result in all your historical items linking back to you.

 

A server restart would be needed to load all the objects back in to the game after the change has been made.  Once you have seen what the release puts in the object_data characterID field for your own items you should also do it for everyone elses on the server.  New items will use the new system so it is a one time fix only after the release is implemented.

 

Once my update to this is up and working, I will put something up to help with the historical items.  Have a long weekend coming up so will have some time to work on it.

 

RB

Link to comment
Share on other sites

Well everything seems to be working fine except one big problem - non of the objects are saving in the database...

I can build anything but it will be gone after the next restart of the server :(

 

Do you have any other mods installed, especially ones that are for objects (building / snapping etc) ?.

 

The DB save happens in the player_build.sqf near the bottom.  Search for "PVDZE_obj_Publish ".  Check the entries in that file are all correct, check for any errors in your ARMA II client RPT log file (usually in c:\users\[your windows username]\appdata\local\Arma2OA directory <- from memory).  See if there are any errors reported in there.  Also check the servers hive.log as I got errors in there when items were not saving to the DB. 

 

RB

Link to comment
Share on other sites

Any existing structures you own will not be yours after this is put in place.  This release changes the way new items are linked to players and how comparisons between the player trying to interact with the item and the items owner are done (ie. using the PlayerUID rather than the players characterID).  You can think of it as linking your game serial number to the buildable items rather than an identifier for your character which changes when you die.

 

This is ok, there is nothing in my database, its a brand new server i got a couple days ago..  I just read what i qouted so far. reading the rest :)

Link to comment
Share on other sites

Well just tested it after following the steps in OP, and then double checking the steps to make sure it was all correct.  After placing a plot pole down, i use infistars "i" hotkey on target, and it reports back CharID: 11.

 

same thing for a metal wall, sandbag nest i placed..  showing CharID: as 11

Edited by seeker619
Link to comment
Share on other sites

Have a check for any errors in your ARMA II client RPT log file (usually in c:\users\[your windows username]\appdata\local\Arma2OA directory <- from memory). See if there are any errors reported in there. Also check the servers hive.log as I got red errors in there when items were not saving to the DB.

 

Turn on the -showscripterrors option in the command line for ARMA II OA (just add the -showscripterrors to the startup line on the client and server).

 

Is everything else working on your server ?.  Can you buy a car or bike and does it showup in the object_data table ?.

 

I have not used any antihack apart from the one supplied as part of Epoch so have no idea how any will work with / report on this release.  Best to confirm by looking at the DB tables themselves.

 

RB

Link to comment
Share on other sites

Ok i fixed it all, after going thru the instructions 3 times.. it was one file giving me a hard time.. I had otters snap building in.  but was only modifying the player_build.sqf that i extracted from dayz_code and was in the custom\ folder.  so what i did was, follow the instructions for player_build.sqf on the file in \custom\snap build\.  and have that copy in both locations.. custom\ and custom\snap build.

/*
	DayZ Base Building
	Made for DayZ Epoch please ask permission to use/edit/distrubute email [email protected].
*/
/*
Build Snapping - Extended v1.6

Idea and first code:
Maca

Reworked by: OtterNas3

01/11/2014
Last update 02/20/2014
*/

private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_objHupDiff","_needNear","_vehicle","_inVehicle","_requireplot","_objHDiff","_isLandFireDZ","_isTankTrap","_playerUID","_found"];

if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_40") , "PLAIN DOWN"]; };
DZE_ActionInProgress = true;

// disallow building if too many objects are found within 30m
if((count ((getPosATL player) nearObjects ["All",30])) >= DZE_BuildingLimit) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_41"), "PLAIN DOWN"];};

_onLadder =		(getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_isWater = 		dayz_isSwimming;
_cancel = false;
_reason = "";
_canBuildOnPlot = false;

_vehicle = vehicle player;
_inVehicle = (_vehicle != player);

DZE_Q = false;
DZE_Z = false;

DZE_Q_alt = false;
DZE_Z_alt = false;

DZE_Q_ctrl = false;
DZE_Z_ctrl = false;

DZE_5 = false;
DZE_4 = false;
DZE_6 = false;

DZE_cancelBuilding = false;

call gear_ui_init;
closeDialog 1;

if (_isWater) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
if (_inVehicle) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_42"), "PLAIN DOWN"];};
if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
if (player getVariable["combattimeout", 0] >= time) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_43"), "PLAIN DOWN"];};
_playerUID = getPlayerUID player;
_found=[_playerUID,"AX"] call KRON_StrInStr;
if (_found) then {
   _playerUID=[_playerUID] call KRON_convertPlayerUID;
};

_item =	_this;

// Need Near Requirements
_abort = false;
_distance = 3;
_reason = "";

_needNear = 	getArray (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "neednearby");

{
	switch(_x) do{
		case "fire":
		{
			_isNear = {inflamed _x} count (getPosATL player nearObjects _distance);
			if(_isNear == 0) then {  
				_abort = true;
				_reason = "fire";
			};
		};
		case "workshop":
		{
			_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]);
			if(_isNear == 0) then {  
				_abort = true;
				_reason = "workshop";
			};
		};
		case "fueltank":
		{
			_isNear = count (nearestObjects [player, dayz_fuelsources, _distance]);
			if(_isNear == 0) then {  
				_abort = true;
				_reason = "fuel tank";
				_distance = 30;
			};
		};
	};
} forEach _needNear;


if(_abort) exitWith {
	cutText [format[(localize "str_epoch_player_135"),_reason,_distance], "PLAIN DOWN"];
	DZE_ActionInProgress = false;
};

_classname = 	getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
_classnametmp = _classname;
_require =  getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
_text = 		getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
_ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");

_lockable = 0;
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "lockable")) then {
	_lockable = getNumber(configFile >> "CfgVehicles" >> _classname >> "lockable");
};

_requireplot = DZE_requireplot;
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
	_requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
};

_isAllowedUnderGround = 1;
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "nounderground")) then {
	_isAllowedUnderGround = getNumber(configFile >> "CfgVehicles" >> _classname >> "nounderground");
};

_offset = 	getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
if((count _offset) <= 0) then {
	_offset = [0,1.5,0];
};

_isPole = (_classname == "Plastic_Pole_EP1_DZ");
_isLandFireDZ = (_classname == "Land_Fire_DZ");

_distance = DZE_PlotPole select 0;
_needText = localize "str_epoch_player_246";

if(_isPole) then {
	_distance = DZE_PlotPole select 1;
};

// check for near plot
_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
_findNearestPole = [];

{
	if (alive _x) then {
		_findNearestPole set [(count _findNearestPole),_x];
	};
} foreach _findNearestPoles;

_IsNearPlot = count (_findNearestPole);

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

if(_IsNearPlot == 0) then {

	// Allow building of plot
	if(_requireplot == 0 or _isLandFireDZ) then {
		_canBuildOnPlot = true;
	};

} else {
	// Since there are plots nearby we check for ownership and then for friend status
	
	// check nearby plots ownership and then for friend status
	_nearestPole = _findNearestPole select 0;

	// Find owner 
	_ownerID = _nearestPole getVariable["CharacterID","0"];

	// diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];

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

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

// _message
if(!_canBuildOnPlot) exitWith {  DZE_ActionInProgress = false; cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"]; };

_missing = "";
_hasrequireditem = true;
{
	_hastoolweapon = _x in weapons player;
	if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); }
} forEach _require;

_hasbuilditem = _this in magazines player;
if (!_hasbuilditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; };

if (!_hasrequireditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_epoch_player_137"),_missing] , "PLAIN DOWN"]; };
if (_hasrequireditem) then {

	_location = [0,0,0];
	_isOk = true;

	// get inital players position
	_location1 = getPosATL player;
	_dir = getDir player;

	/* Commented out cause GHOST preview does not work with snapping!
	// if ghost preview available use that instead
	if (_ghost != "") then {
		_classname = _ghost;
	};
	*/

	_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
	_object setDir _dir;
	_object attachTo [player,_offset];
	
	_position = getPosATL _object;

	cutText [(localize "str_epoch_player_45"), "PLAIN DOWN"];


	player allowDamage false;
	SnappingOffset = _offset;
	SnappingDir = 0;
	SnappingSpotMarkers = [];
	SnappingEnabled = false;
	SnappedOffsetZ = 0;
	SnappingResetPos = false;

	if (isClass (missionConfigFile >> "SnapPoints" >> _classname)) then {
		s_building_snapping = player addAction ["<t color=""#0000ff"">Toggle Snapping</t>", "custom\snap_build\player_toggleSnapping.sqf",_classname, 3, true, false, "",""];
	};
	
	_snapper = [_object, _classname] spawn snap_object;
	_key_monitor = [] spawn player_buildControls ;

	while {_isOk} do {
		sleep 1;
		_location2 = getPosATL player;

		if(DZE_5) exitWith {
			_isOk = false;
			detach _object;
			_dir = getDir _object;
			_position = getPosATL _object;
		};

		if(_location1 distance _location2 > 5) exitWith {
			_isOk = false;
			_cancel = true;
			_reason = "You've moved to far away from where you started building (within 5 meters)"; 
			detach _object;
		};
		
		if(((SnappingOffset select 2) > 5) or ((SnappingOffset select 2) < -5)) exitWith {
			_isOk = false;
			_cancel = true;
			_reason = "Cannot move up or down more than 5 meters"; 
			detach _object;
		};

		if (player getVariable["combattimeout", 0] >= time) exitWith {
			_isOk = false;
			_cancel = true;
			_reason = (localize "str_epoch_player_43");
			detach _object;
		};

		if (DZE_cancelBuilding) exitWith {
			_isOk = false;
			_cancel = true;
			_reason = "Cancelled building.";
			detach _object;
		};
	};

	terminate _snapper;
	terminate _key_monitor;
	player removeAction s_building_snapping;
	player allowDamage true;
	
	//No building on roads unless toggled
	if (!DZE_BuildOnRoads) then {
		if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; };
	};
	// No building in trader zones
	if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };


	if(!_cancel) then {

		_classname = _classnametmp;

		_location = _position;

		if((_isAllowedUnderGround == 0) and ((_location select 2) < 0)) then {
			_location set [2,0];
		};
	
		_object setPosATL _location;
		cutText [format[(localize "str_epoch_player_138"),_text], "PLAIN DOWN"];
		
		_limit = 3;

		if (DZE_StaticConstructionCount > 0) then {
			_limit = DZE_StaticConstructionCount;
		}
		else {
			if (isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
				_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
			};
		};

		_isOk = true;
		_proceed = false;
		_counter = 0;
		
		while {_isOk} do {

			[10,10] call dayz_HungerThirst;
			player playActionNow "Medic";
			
			_dis=20;
			_sfx = "repair";
			[player,_sfx,0,false,_dis] call dayz_zombieSpeak;  
			[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
	
			r_interrupt = false;
			_animState = animationState player;
			r_doLoop = true;
			_started = false;
			_finished = false;
	
			while {r_doLoop} do {
				_animState = animationState player;
				_isMedic = ["medic",_animState] call fnc_inString;
				if (_isMedic) then {
					_started = true;
				};
				if (_started and !_isMedic) then {
					r_doLoop = false;
					_finished = true;
				};
				if (r_interrupt or (player getVariable["combattimeout", 0] >= time)) then {
					r_doLoop = false;
				};
				if (DZE_cancelBuilding) exitWith {
					r_doLoop = false;
				};
				sleep 0.1;
			};
			r_doLoop = false;


			if(!_finished) exitWith {
				_isOk = false;
				_proceed = false;
			};

			if(_finished) then {
				_counter = _counter + 1;
			};

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

			if(_counter == _limit) exitWith {
				_isOk = false;
				_proceed = true;
			};
	
		};

		if (_proceed) then {
	
			_num_removed = ([player,_item] call BIS_fnc_invRemove);
			if(_num_removed == 1) then {

				cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];

				if (_isPole) then {
					[] spawn player_plotPreview;
				};

				_object setVariable ["OEMPos",_location,true];

				if(_lockable > 1) then {
					
					_combinationDisplay = "";

					switch (_lockable) do {
						
						case 2: { // 2 lockbox
							_combination_1 = (floor(random 3)) + 100; // 100=red,101=green,102=blue
							_combination_2 = floor(random 10);
							_combination_3 = floor(random 10);
							_combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
							dayz_combination = _combination;
							if (_combination_1 == 100) then {
								_combination_1_Display = "Red";
							};
							if (_combination_1 == 101) then {
								_combination_1_Display = "Green";
							};
							if (_combination_1 == 102) then {
								_combination_1_Display = "Blue";
							};
							_combinationDisplay = format["%1%2%3",_combination_1_Display,_combination_2,_combination_3];
						};
						
						case 3: { // 3 combolock
							_combination_1 = floor(random 10);
							_combination_2 = floor(random 10);
							_combination_3 = floor(random 10);
							_combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
							dayz_combination = _combination;
							_combinationDisplay = _combination;
						};
						
						case 4: { // 4 safe
							_combination_1 = floor(random 10);
							_combination_2 = floor(random 10);
							_combination_3 = floor(random 10);
							_combination_4 = floor(random 10);
							_combination = format["%1%2%3%4",_combination_1,_combination_2,_combination_3,_combination_4];
							dayz_combination = _combination;
							_combinationDisplay = _combination;
						};
					};

					_object setVariable ["CharacterID",_combination,true];
					

					PVDZE_obj_Publish = [_combination,_object,[_dir,_location],_classname];
					publicVariableServer "PVDZE_obj_Publish";

					cutText [format[(localize "str_epoch_player_140"),_combinationDisplay,_text], "PLAIN DOWN", 5];
					

				} else {
					_object setVariable ["CharacterID",_playerUID,true];
					
					// fire?
					if(_object isKindOf "Land_Fire_DZ") then {
						_object spawn player_fireMonitor;
					} else {
						PVDZE_obj_Publish = [_playerUID,_object,[_dir,_location],_classname];
						publicVariableServer "PVDZE_obj_Publish";
					};
				};
			} else {
				deleteVehicle _object;
				cutText [(localize "str_epoch_player_46") , "PLAIN DOWN"];
			};

		} else {
			r_interrupt = false;
			if (vehicle player == player) then {
				[objNull, player, rSwitchMove,""] call RE;
				player playActionNow "stop";
			};

			deleteVehicle _object;

			cutText [(localize "str_epoch_player_46") , "PLAIN DOWN"];
		};

	} else {
		deleteVehicle _object;
		cutText [format[(localize "str_epoch_player_47"),_text,_reason], "PLAIN DOWN"];
	};
};

DZE_ActionInProgress = false;

Link to comment
Share on other sites

So this mod doesnt allow a player to remove ANY item he placed down??   I was hoping my players would be able to remove a wall, or stairs without having to ask me to delete it for them every time... im kinda bummed :/

Link to comment
Share on other sites

After i place plot pole, it has my UID, i can build within that area.. but if i try to upgrade anything, it says i cant cause a plot pole is nearby.

 

Had a player come in and test this.  Does this not prevent none friendly marked characters from removing tank traps, sandbags, etc?

Link to comment
Share on other sites

After i place plot pole, it has my UID, i can build within that area.. but if i try to upgrade anything, it says i cant cause a plot pole is nearby.

 

Had a player come in and test this.  Does this not prevent none friendly marked characters from removing tank traps, sandbags, etc?

 

My reading of the code (remove.sqf) is that anyone can remove but characters who are not owners or friendlies have twice as many stages to do the removal and have a 10% chance per removal stage of breaking their tools.  If there is no plot pole within 30 meters then anyone can remove if it is a buildable.

 

Generators that are turned on and locked doors cannot be removed.

 

if you placed the plot pole, built a wall and could not update the wall then I would check the player_upgrade.sqf file.

 

if you placed the plot pole, built a wall and somone marked as friendly could not upgrade it then there may be a bigger issue.  Probably worth checking the player_upgrade.sqf anyway.  The other persons name must show as green when you put your cursor on them to indicate they are friendly.

 

The other thread release does the same as this release but in a lightly different manner.

 

RB

Link to comment
Share on other sites

Do you have any other mods installed, especially ones that are for objects (building / snapping etc) ?.

 

The DB save happens in the player_build.sqf near the bottom.  Search for "PVDZE_obj_Publish ".  Check the entries in that file are all correct, check for any errors in your ARMA II client RPT log file (usually in c:\users\[your windows username]\appdata\local\Arma2OA directory <- from memory).  See if there are any errors reported in there.  Also check the servers hive.log as I got errors in there when items were not saving to the DB. 

 

RB

 

Yeah, big thx mate - seems that I forgot to change from _tmpbuilt to _object in one place, everything is saving now!

 

Edited:

 

One more problem, I cannot Tag the friendly players, there is simple no option buttons on right mouse wheel...

 

I`m 100 % sure that I added correct link in fn_damageActions.sqf file to player_tagFriendly.sqf and edited this custom file correcly and added privite arrays in the top!

 

Also not error log files!

 

Maybe something with InfiStar antihack? I think not...

Link to comment
Share on other sites

Ok, looks like my code is now working.  I will post it up after cleaning it up tomorrow ... well today as it is 2am where I am.

 

Found a couple of bugs in the snapto release as well that had me running around in circles for a while but have supplied potential fixes for those to the author as well.

 

Only caveat is that I do not have any PlayerUIDs with AX on the end (or any other characters).  would be good if someone can test after I post it up.

 

RB

Link to comment
Share on other sites

I'm running into an issue after installing this. I am missing a lot of the status icons and even if it is day and you are running on a road your sight and hearing never tell you how well you are seen and heard. Also when going into combat the combat icon does not blink. For example, I am in combat in this screenshot but it doesn't update. Same for the rest of the icons in the screenshot.

 

http://imgur.com/8EZI1C6

 

Never mind, I forgot to change _tmpbuilt to _object

Link to comment
Share on other sites

kicked with publicvariable #0

in RPT :

16:14:23 Error in expression <og = (format["your text here: %1 %2 %3",your,variables,here]);WG_admin_Log = [_l>
16:14:23   Error position: <your,variables,here]);WG_admin_Log = [_l>
16:14:23   Error Undefined variable in expression: your
16:14:23 File mpmissions\DayZ_Epoch_11.Chernarus\custom\publicEH.sqf, line 70
16:14:23 "Client To Server: ["your text here: any any any"]"
 
in publicvariable.log
10.05.2014 16:09:33: Psychosis (ip) GUID - #0 "WG_admin_Log" = ["your text here: any any any"]
10.05.2014 16:14:26: Psychosis (ip) GUID - #0 "WG_admin_Log" = ["your text here: any any any"]
 
 
where im wrong?
Link to comment
Share on other sites

Have put up a new updated release () based on the same solution concept but with a complete code rewrite (hence the new release).

 

I have also provided a solution for items already built before installing the release so players do not loose their ownership of their current bases.

 

Well deserved kudos to WGC GeekGarage given along with link backs to this thread.

 

RB

Link to comment
Share on other sites

Thx for the credits, but one thing that needs to be said is that it's again a solution where server admins need to be able to use functions or alike on their SQL server which i was trying to get away from as not all can do that :). But good release indeed :)

 

Credits were much deserved.  You did all the leg work on this.

 

On the DB requirements,

 

The DB side of things, there are two parts.  Neither of them are required for the release but are tools for people who want to use them ...

 

The first is a pre-check that can be used just to make sure the installer will not encounter a problem with varchar to int size conversion.

 

The second is a one time alignment for the already built items on the server.  It is not required where people do not need or want to realign historical buildables to the new system.

 

once done, there is no more MySQL server side to the release and the MySQL function can then be dropped if needed, although it may be handy for admins if an issue arises.

 

Whilst not required i felt both add value to those who wish to use them.

 

Just looking at the refuel truck and fuel pumps for the next mod  :) .

 

RB

Link to comment
Share on other sites

Well guys, I don`t think so that somebody have even run this script correcly, because Tag Friendly function simple does not work...

I even tried to remove all other scripts and tryed this on vanilla server and still - No Tag Friendly option...

Link to comment
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...