Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Looks like i have another Problem. The Info Panels wont accept the right keys
Code is the unique id for the object. Based on how bliss is written, I dont see away around this other than modifying the dayz_objectuid2 = { }; function in your server_functions.sqf
Then you must do the same algorithm in player_build.sqf where it factors the _uid.
I didnt thoroughly overlook 1.7.6.1 server side code.
EDIT FIX FOR NOT WRITING TO DB:
For those running Reality Build for 1.7.6.1
There is a function in "dayz_server\init\server_functions.sqf" called:
Code:check_publishobject = { private["_allowed","_allowedObjects","_object"]; _object = _this select 0; _playername = _this select 1; _allowedObjects = ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Wire_cat1"]; _allowed = false; diag_log format ["DEBUG: Checking if Object: %1 is allowed published by %2", _object, _playername]; if ((typeOf _object) in _allowedObjects) then { diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername]; _allowed = true; }; _allowed };
It looks like he added that in so hackers cant write things to database that are not default dayz objects.
Dont just remove it unless you know what your doing.
If you want it to still authorize default DayZ objects and also authorize the buildables in Base Building 1.2 (or ones u add in manually) replace with this:
Code:check_publishobject = { private["_allowed","_allowedObjects","_object"]; _object = _this select 0; _playername = _this select 1; _allowedObjects = ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Wire_cat1"]; _allowed = false; diag_log format ["DEBUG: Checking if Object: %1 is allowed published by %2", _object, _playername]; if ((typeOf _object) in _allowedObjects || (typeOf _object) in allbuildables_class) then { diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername]; _allowed = true; }; _allowed };
Basically all were doing is changing this line:
Code:if ((typeOf _object) in _allowedObjects || (typeOf _object) in allbuildables_class) then {
So that it authorizes the custom buildables from the server side array.
Let me know if this solves the problem!
ALSO FOR REALITY BUILD 1.7.6.1 users, this may be very important. I noticed that Theyve made some minor changes with how deployables are publicly broadcasted to server.
In your player_build.sqf found in the "dayz_code\compile\" path
At the VERY BOTTOM Change this:
Code:dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname]; publicVariableServer "dayzPublishObj"; if (isServer) then { dayzPublishObj call server_publishObj; };
to this:
Code:dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname]; publicVariableServer "dayzPublishObj";
And please report back to me that this still allows object to write to database and save after restart.
Else you may be writing duplicate objects to your Database and this is a big NO NO.
Thanks!
#ifdef OBJECT_DEBUG
diag_log format ["DEBUG: Checking if Object: %1 is allowed published by %2", _object, _playername];
#endif
if ((typeOf _object) in _allowedObjects || (typeOf _object) in allbuildables_class) then {
#ifdef OBJECT_DEBUG
diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername];
#endif
_allowed = true;
};
_allowed
};
Sure, here there are. Hopefully they can help you
http://www.file-upload.net/download-7825157/DayZ_BB.rar.html
ayz_versionNo = getText(configFile >> "CfgMods" >> "DayZ" >> "version");
dayz_hiveVersionNo = getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
_script = getText(missionConfigFile >> "onPauseScript");
if ((count playableUnits == 0) and !isDedicated) then {
isSinglePlayer = true;
};
waitUntil{initialized}; //means all the functions are now defined
call build_baseBuilding_arrays;
diag_log "HIVE: Starting";
//Set the Time
//Send request
_key = "CHILD:307:";
_result = _key call server_hiveReadWrite;
_outcome = _result select 0;
if(_outcome == "PASS") then {
_date = _result select 1;
//date setup
_year = _date select 0;
_month = _date select 1;
_day = _date select 2;
_hour = _date select 3;
_minute = _date select 4;
//Force full moon nights
_date = [2012,6,6,_hour,_minute];
if(isDedicated) then {
//["dayzSetDate",_date] call broadcastRpcCallAll;
setDate _date;
dayzSetDate = _date;
publicVariable "dayzSetDate";
};
diag_log ("HIVE: Local Time set to " + str(_date));
};
//Send the key
_key = format["CHILD:999:select payload, loop_interval, start_delay from message where instance_id = ?:[%1]:", dayZ_instance];
_data = "HiveEXT" callExtension _key;
clearMagazineCargoGlobal _object;
if (_object isKindOf "TentStorage") then {
_pos set [2,0];
_object setpos _pos;
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
};
_object setdir _dir;
_object setDamage _damage;\
// ##### BASE BUILDING 1.2 Server Side ##### - START
// This sets objects to appear properly once server restarts
//_object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true]; // Optional (REMOVE // lines before _object) May fix DayZ.ST issues, or issues related to Panel codes not working thanks nullpo
if ((_object isKindOf "Static") && !(_object isKindOf "TentStorage")) then {
_object setpos [(getposATL _object select 0),(getposATL _object select 1), 0];
};
//Set Variable
if (_object isKindOf "Infostand_2_EP1" && !(_object isKindOf "Infostand_1_EP1")) then {
_object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true];
};
// Set whether or not buildable is destructable
if (typeOf(_object) in allbuildables_class) then {
diag_log ("SERVER: in allbuildables_class:" + typeOf(_object) + " !");
for "_i" from 0 to ((count allbuildables) - 1) do
{
_classname = (allbuildables select _i) select _i - _i + 1;
_result = [_classname,typeOf(_object)] call BIS_fnc_areEqual;
if (_result) then {
_requirements = (allbuildables select _i) select _i - _i + 2;
_isDestructable = _requirements select 13;
diag_log ("SERVER: " + typeOf(_object) + " _isDestructable = " + str(_isDestructable));
if (!_isDestructable) then {
diag_log("Spawned: " + typeOf(_object) + " Handle Damage False");
_object addEventHandler ["HandleDamage", {false}];
};
};
};
//gateKeypad = _object addaction ["Defuse", "\z\addons\dayz_server\compile\enterCode.sqf"];
};
// ##### BASE BUILDING 1.2 Server Side ##### - END
---- Keypads don't save their access codes after server restart ----
Does anyone have there keypad codes working after a server restart? also all players can remove the buildables after you build them. Looked through all 46 pages still have not found a solution. If anyone could or would be willing to help, all would be greatly appreciated, I would even post a fix on a posted thread for you. Good day and hope to get a reply soon.
Running base building on Tavi 2.0