Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ["_class","_uid","_charID","_object","_worldspace","_key"];
- //[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
- _charID = _this select 0;
- _object = _this select 1;
- _worldspace = _this select 2;
- _class = _this select 3;
- #include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
- _combination = 0;
- if (!(_object isKindOf "Building")) exitWith {
- deleteVehicle _object;
- };
- _allowed = [_object, "Server"] call check_publishobject;
- if (!_allowed) exitWith { };
- //diag_log ("PUBLISH: Attempt " + str(_object));
- //get UID
- _uid = _worldspace call dayz_objectUID2;
- //Send request
- if (_object isKindOf "TentStorage") then { _combination = 0;} else {_combination = floor(random 899) + 100;};
- _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid,_combination];
- //diag_log ("HIVE: WRITE: "+ str(_key));
- _key call server_hiveWrite;
- _object setVariable ["ObjectUID", _uid,true];
- if (_object isKindOf "TentStorage") then {
- _object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
- };
- dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
- #ifdef OBJECT_DEBUG
- diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid + " and a combination of " + str(_combination) );
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement