Just Another RE
RE -->
Code:
local_publishObj = {
//[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
_charID = _this select 0;
object = _this select 1;
_worldspace = _this select 2;
_className = _this select 3;
_id = 0;
_dir = _worldspace select 0;
_location = _worldspace select 1;
call compile ("object = create" + "Vehicle [_className, _location, [], 0, ""CAN_COLLIDE""];
object setdir _dir;
object setpos _location;
object setVariable [""OwnerID"", _charID, true];");
//add to database
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,object];
//get UID
_uid = object call dayzobjectUID;
object setVariable ["ObjectUID", _uid, true];
};
_codeRE = _this select 0;
while {(count (waypoints group player)) > 0} do
{
deleteWaypoint ((waypoints group player) select 0);
};
_wat = format [";local_publishObj = %2; if (isServer) then {
{ if (getPlayerUID _x == toString (%1)) then { remExField = _x; }; } foreach ([0,0,0] nearEntities 1000000000000000); };", (toArray (getPlayerUID player)), local_publishObj];
_codeRE2 = toArray (_wat + ";" + _codeRE + ";");
_superTemp = ("if (isServer) then { _list = [0,0,0] nearEntities 1000000000000000; (_list select 0) setVehicleInit (toString (" + str(_codeRE2) + ")); processInitCommands };");
_unit = (createGroup EAST) createUnit [typeof player, getMarkerPos "respawn_west", [], 0, "FORM"];
_wp = group _unit addWaypoint [getPos _unit, 1000000000000000];
_wp setWaypointStatements ["true", _superTemp];


