Slanderman19 Posted April 18, 2017 Report Share Posted April 18, 2017 Link to comment Share on other sites More sharing options...
Anhor Posted May 9, 2017 Report Share Posted May 9, 2017 I have a anoying issue ........ some things are saved in the database, others not. But they should. Eaxample: This one is safed in database ["ItemToolbox",[0,5,2],7,0.5,false,true,false,true,true,false,false,["Land_Ind_TankSmall2"],[],["equip_metal_sheet","equip_metal_sheet","equip_metal_sheet","equip_metal_sheet","ItemTankTrap","ItemTankTrap"],"true"], The next one NOT ["ItemToolbox",[0,2,1],5,0.5,false,true,false,true,true,true,false,["SearchLight_CDF"],[],["equip_metal_sheet","equip_1inch_metal_pipe","equip_1inch_metal_pipe","ItemLightBulb"],"true"], Both are deployable ............. where is the error? BTW ..... would this work too? ["ItemToolbox",[0,5,2],7,0.5,false,true,false,true,true,false,false,["Land_Ind_TankSmall2"],[],["equip_metal_sheet",4,"ItemTankTrap",2],"true"], Link to comment Share on other sites More sharing options...
theduke Posted May 24, 2017 Report Share Posted May 24, 2017 On 2017-05-09 at 3:53 AM, Anhor said: I have a anoying issue ........ some things are saved in the database, others not. But they should. Eaxample: This one is safed in database ["ItemToolbox",[0,5,2],7,0.5,false,true,false,true,true,false,false,["Land_Ind_TankSmall2"],[],["equip_metal_sheet","equip_metal_sheet","equip_metal_sheet","equip_metal_sheet","ItemTankTrap","ItemTankTrap"],"true"], The next one NOT ["ItemToolbox",[0,2,1],5,0.5,false,true,false,true,true,true,false,["SearchLight_CDF"],[],["equip_metal_sheet","equip_1inch_metal_pipe","equip_1inch_metal_pipe","ItemLightBulb"],"true"], Both are deployable ............. where is the error? BTW ..... would this work too? ["ItemToolbox",[0,5,2],7,0.5,false,true,false,true,true,false,false,["Land_Ind_TankSmall2"],[],["equip_metal_sheet",4,"ItemTankTrap",2],"true"], your searchlight is treated as a vehicle. And if you have cleanup scripts for vehicles. It will clean them. For example. I run a script that untouched vehicles within 21 days get delete (bought vehicles). This deletes my m2s that i can craft with the gem crafting. You'll need to add a exception in the sql event. This might not be your problem, but its a possibility Anhor 1 Link to comment Share on other sites More sharing options...
Anhor Posted May 24, 2017 Report Share Posted May 24, 2017 4 hours ago, theduke said: your searchlight is treated as a vehicle. And if you have cleanup scripts for vehicles. It will clean them. For example. I run a script that untouched vehicles within 21 days get delete (bought vehicles). This deletes my m2s that i can craft with the gem crafting. You'll need to add a exception in the sql event. This might not be your problem, but its a possibility Thx for reply @theduke but I run no custom clean up script. This is what makes me confused. Link to comment Share on other sites More sharing options...
theduke Posted May 24, 2017 Report Share Posted May 24, 2017 im not talking about a custom cleanup script. the default epoch events for the database cleans up vevhicles. If you use them, which most of the community does. this is the event CREATE FUNCTION `DeleteNonKeyVehicles`() RETURNS int(11) BEGIN DELETE FROM `Object_DATA` WHERE `Object_DATA`.`CharacterID` <> 0 AND `Object_DATA`.`CharacterID` <= 12500 AND `Object_DATA`.`Classname` NOT LIKE 'Tent%' AND `Object_DATA`.`Classname` NOT LIKE '%Locked' AND `Object_DATA`.`Classname` NOT LIKE 'Land\_%' -- added escape character so LandRover vehicles are not ignored AND `Object_DATA`.`Classname` NOT LIKE 'Cinder%' AND `Object_DATA`.`Classname` NOT LIKE 'Wood%' AND `Object_DATA`.`Classname` NOT LIKE 'Metal%' AND `Object_DATA`.`Classname` NOT LIKE '%Storage%' AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'DesertLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ', 'BagFenceRound_DZ') AND FindVehicleKeysCount(Object_DATA.CharacterID) = 0; RETURN ROW_COUNT(); END ;; DELIMITER ; Anhor 1 Link to comment Share on other sites More sharing options...
ViktorReznov Posted June 2, 2017 Report Share Posted June 2, 2017 I need a little help here, i attempted to setup the ItemRadio with an rc_action using the method detailed on github and had no success. I was attempting to use you script to do the WAI radios but failed miserably. I have other defined items with scripted rc_actions working just fine, just not that gorram radio. Asside from accuracy, i suppose I could live without it, its just not my style tho. Any help would be much appreciated ["ItemRadio","Switch On\Off","execVM 'scripts\remote\switch_on_and_off.sqf';","true"] Link to comment Share on other sites More sharing options...
JakeQue Posted June 24, 2017 Report Share Posted June 24, 2017 On 5/24/2017 at 11:30 AM, theduke said: im not talking about a custom cleanup script. the default epoch events for the database cleans up vevhicles. If you use them, which most of the community does. this is the event CREATE FUNCTION `DeleteNonKeyVehicles`() RETURNS int(11) BEGIN DELETE FROM `Object_DATA` WHERE `Object_DATA`.`CharacterID` <> 0 AND `Object_DATA`.`CharacterID` <= 12500 AND `Object_DATA`.`Classname` NOT LIKE 'Tent%' AND `Object_DATA`.`Classname` NOT LIKE '%Locked' AND `Object_DATA`.`Classname` NOT LIKE 'Land\_%' -- added escape character so LandRover vehicles are not ignored AND `Object_DATA`.`Classname` NOT LIKE 'Cinder%' AND `Object_DATA`.`Classname` NOT LIKE 'Wood%' AND `Object_DATA`.`Classname` NOT LIKE 'Metal%' AND `Object_DATA`.`Classname` NOT LIKE '%Storage%' AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'DesertLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ', 'BagFenceRound_DZ') AND FindVehicleKeysCount(Object_DATA.CharacterID) = 0; RETURN ROW_COUNT(); END ;; DELIMITER ; @theduke I tried this and got the following error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 16 Link to comment Share on other sites More sharing options...
theduke Posted June 24, 2017 Report Share Posted June 24, 2017 1 minute ago, JakeQue said: @theduke I tried this and got the following error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 16 I would just grab them from the epoch server files. I copied and pasted this from that, so i might of grabbed something that didnt belong. If you rn the file called recommended sql events, it will add this and the rest of the default epoch cleanup events JakeQue 1 Link to comment Share on other sites More sharing options...
JakeQue Posted June 24, 2017 Report Share Posted June 24, 2017 Thanks mate, found it and resolved it. I have it setup for blast proof bunkers, and 2 different heli pads also. For anyone who wants it... DROP FUNCTION IF EXISTS `DeleteNonKeyVehicles`; DELIMITER ;; CREATE FUNCTION `DeleteNonKeyVehicles`() RETURNS int(11) BEGIN DELETE FROM `Object_DATA` WHERE `Object_DATA`.`CharacterID` <> 0 AND `Object_DATA`.`CharacterID` <= 12500 AND `Object_DATA`.`Classname` NOT LIKE 'Tent%' AND `Object_DATA`.`Classname` NOT LIKE '%Locked' AND `Object_DATA`.`Classname` NOT LIKE 'Land\_%' -- added escape character so LandRover vehicles are not ignored AND `Object_DATA`.`Classname` NOT LIKE 'Cinder%' AND `Object_DATA`.`Classname` NOT LIKE 'Wood%' AND `Object_DATA`.`Classname` NOT LIKE 'Metal%' AND `Object_DATA`.`Classname` NOT LIKE '%Storage%' AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'DesertLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ', 'BagFenceRound_DZ', 'Land_MBG_HeavyShelter', 'HeliH', 'HeliHCivil') AND FindVehicleKeysCount(Object_DATA.CharacterID) = 0; RETURN ROW_COUNT(); END ;; DELIMITER ; Anhor and theduke 2 Link to comment Share on other sites More sharing options...
Anhor Posted June 25, 2017 Report Share Posted June 25, 2017 Sry, nope. Unfortunatlly this will not fix my problem. Everytime we deploy a searvhlight, we see the server message "This vehicle is persistant and will be ...." But there is NOTHING in the database. I copied just the code from deploy a mozzie and change the classname of object and the parts needed ............ Mozzie is still persistent and shown up in database ........ but not the searchlight Link to comment Share on other sites More sharing options...
JakeQue Posted June 25, 2017 Report Share Posted June 25, 2017 @Anhor did you see my above post? That worked for me as well as the true variable on the deploy bike config. When adding that function into the database, on line 16 make sure you add the deployables that you want to stay. AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ' ) Add your item classes into that. This is all I changed I didn't edit any files around... Link to comment Share on other sites More sharing options...
Anhor Posted June 25, 2017 Report Share Posted June 25, 2017 I swear, I did. But the problem is there is no entry in Database. No Database entry, no persistence trough restart. Link to comment Share on other sites More sharing options...
juandayz Posted June 25, 2017 Report Share Posted June 25, 2017 Just now, Anhor said: Sry, nope. Unfortunatlly this will not fix my problem. Everytime we deploy a searvhlight, we see the server message "This vehicle is persistant and will be ...." But there is NOTHING in the database. I copied just the code from deploy a mozzie and change the classname of object and the parts needed ............ Mozzie is still persistent and shown up in database ........ but not the searchlight try make it to the old way. you create in deployanything all about rightclick. Open your server_monitor.sqf and find: _isPlot = _type == "Plastic_Pole_EP1_DZ"; below paste: _isSlight = _type == "SearchLIGHT ID HERE"; find: if( (count _inventory > 0) && !_isPlot && !_doorLocked) then { change by: if( (count _inventory > 0) && !_isPlot && !_doorLocked && !_isSLight) then { Anhor 1 Link to comment Share on other sites More sharing options...
juandayz Posted June 25, 2017 Report Share Posted June 25, 2017 @Anhor if that way dsnt works.. then lets do everything in the old way. 1-create searchlight.sqf Spoiler // If an array was passed redirect to vanilla player_build (Epoch items pass a string) private ["_playerPos","_nearRestr","_hastool","_hasitem","_removed","_abort","_reason","_distance","_isNear","_lockable","_isAllowedUnderGround","_offset","_classname","_zheightdirection","_zheightchanged","_rotate","_objectHelperPos","_objectHelperDir","_objHDiff","_position","_isOk","_dir","_vector","_cancel","_location2","_buildOffset","_location","_limit","_started","_finished","_animState","_isMedic","_proceed","_counter","_dis","_sfx","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_combination_4","_num_removed","_tmpbuilt","_vUp","_classnametmp","_text","_ghost","_objectHelper","_location1","_object","_helperColor","_canDo","_pos","_onLadder","_vehicle","_inVehicle","_needNear","_canBuild"]; //Check if building already in progress, exit if so. if (dayz_actionInProgress) exitWith {localize "str_epoch_player_40" call dayz_rollingMessages;}; dayz_actionInProgress = true; _pos = [player] call FNC_GetPos; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _vehicle = vehicle player; _inVehicle = (_vehicle != player); _hasitem = [["ItemPole",4], "ItemLightBulb","ItemGenerator","PartGlass"] call player_checkItems; _nearRestr = count nearestObjects [_pos, ["Plastic_Pole_EP1_DZ"], 27] > 0; if !(_nearRestr) exitWith { dayz_actionInProgress = false; cutText [format["Needs be in plot pole area"], "PLAIN DOWN"]; }; if (!_hasitem) exitWith {cutText [format["Needs 4x ItemPole + x1ItemLightBulb +1xGenerator +1xPartGlass"], "PLAIN DOWN"]; dayz_actionInProgress = false; }; 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_F = false; DZE_cancelBuilding = false; DZE_updateVec = false; DZE_memDir = 0; DZE_memForBack = 0; DZE_memLeftRight = 0; call gear_ui_init; closeDialog 1; if (dayz_isSwimming) exitWith {dayz_actionInProgress = false; localize "str_player_26" call dayz_rollingMessages;}; if (_inVehicle) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;}; if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;}; _classname = "SearchLight_RUS"; _classnametmp = _classname; _text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); _ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview"); _lockable = 0; //default define if lockable not found in config file below if(isNumber (configFile >> "CfgVehicles" >> _classname >> "lockable")) then { //find out if item is lockable object _lockable = getNumber(configFile >> "CfgVehicles" >> _classname >> "lockable"); // 2=lockbox, 3=combolock, 4=safe }; _isAllowedUnderGround = 1; //check if allowed to build under terrain 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,3,0]; }; _objectHelper = objNull; _isOk = true; _location1 = [player] call FNC_GetPos; // get inital players position _dir = getDir player; //required to pass direction when building // if ghost preview available use that instead if (_ghost != "") then { _classname = _ghost; }; _object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"]; //object preview, not an actual object that will be built _objectHelper = "Sign_sphere10cm_EP1" createVehicle [0,0,0]; _helperColor = "#(argb,8,8,3)color(0,0,0,0,ca)"; _objectHelper setobjecttexture [0,_helperColor]; _objectHelper attachTo [player,_offset]; _object attachTo [_objectHelper,[0,0,0]]; if (isClass (configFile >> "SnapBuilding" >> _classname)) then { ["","","",["Init",_object,_classname,_objectHelper]] spawn snap_build; }; ["","","",["Init","Init",0]] spawn build_vectors; _objHDiff = 0; _cancel = false; _reason = ""; helperDetach = false; _canDo = (!r_drag_sqf and !r_player_unconscious); _position = [_objectHelper] call FNC_GetPos; while {_isOk} do { _zheightchanged = false; _zheightdirection = ""; _rotate = false; if (DZE_Q) then { DZE_Q = false; _zheightdirection = "up"; _zheightchanged = true; }; if (DZE_Z) then { DZE_Z = false; _zheightdirection = "down"; _zheightchanged = true; }; if (DZE_Q_alt) then { DZE_Q_alt = false; _zheightdirection = "up_alt"; _zheightchanged = true; }; if (DZE_Z_alt) then { DZE_Z_alt = false; _zheightdirection = "down_alt"; _zheightchanged = true; }; if (DZE_Q_ctrl) then { DZE_Q_ctrl = false; _zheightdirection = "up_ctrl"; _zheightchanged = true; }; if (DZE_Z_ctrl) then { DZE_Z_ctrl = false; _zheightdirection = "down_ctrl"; _zheightchanged = true; }; if (DZE_4) then { _rotate = true; DZE_4 = false; if(DZE_dirWithDegrees) then{ DZE_memDir = DZE_memDir - DZE_curDegree; }else{ DZE_memDir = DZE_memDir - 45; }; }; if (DZE_6) then { _rotate = true; DZE_6 = false; if(DZE_dirWithDegrees) then{ DZE_memDir = DZE_memDir + DZE_curDegree; }else{ DZE_memDir = DZE_memDir + 45; }; }; if(DZE_updateVec) then{ [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; DZE_updateVec = false; }; if (DZE_F and _canDo) then { if (helperDetach) then { _objectHelper attachTo [player]; DZE_memDir = DZE_memDir-(getDir player); helperDetach = false; [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; } else { _objectHelperPos = getPosATL _objectHelper; detach _objectHelper; DZE_memDir = getDir _objectHelper; [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; _objectHelper setPosATL _objectHelperPos; _objectHelper setVelocity [0,0,0]; //fix sliding glitch helperDetach = true; }; DZE_F = false; }; if(_rotate) then { [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; }; if(_zheightchanged) then { if (!helperDetach) then { detach _objectHelper; _objectHelperDir = getDir _objectHelper; }; _position = [_objectHelper] call FNC_GetPos; if(_zheightdirection == "up") then { _position set [2,((_position select 2)+0.1)]; _objHDiff = _objHDiff + 0.1; }; if(_zheightdirection == "down") then { _position set [2,((_position select 2)-0.1)]; _objHDiff = _objHDiff - 0.1; }; if(_zheightdirection == "up_alt") then { _position set [2,((_position select 2)+1)]; _objHDiff = _objHDiff + 1; }; if(_zheightdirection == "down_alt") then { _position set [2,((_position select 2)-1)]; _objHDiff = _objHDiff - 1; }; if(_zheightdirection == "up_ctrl") then { _position set [2,((_position select 2)+0.01)]; _objHDiff = _objHDiff + 0.01; }; if(_zheightdirection == "down_ctrl") then { _position set [2,((_position select 2)-0.01)]; _objHDiff = _objHDiff - 0.01; }; if((_isAllowedUnderGround == 0) && ((_position select 2) < 0)) then { _position set [2,0]; }; if (surfaceIsWater _position) then { _objectHelper setPosASL _position; } else { _objectHelper setPosATL _position; }; if (!helperDetach) then { _objectHelper attachTo [player]; }; [_objectHelper,[DZE_memForBack,DZE_memLeftRight,DZE_memDir]] call fnc_SetPitchBankYaw; }; uiSleep 0.5; _location2 = [player] call FNC_GetPos; _objectHelperPos = [_objectHelper] call FNC_GetPos; if(DZE_5) exitWith { _isOk = false; _position = [_object] call FNC_GetPos; detach _object; _dir = getDir _object; _vector = [(vectorDir _object),(vectorUp _object)]; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(_location1 distance _location2 > DZE_buildMaxMoveDistance) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_MOVED",DZE_buildMaxMoveDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(_location1 distance _objectHelperPos > DZE_buildMaxMoveDistance) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_TOO_FAR",DZE_buildMaxMoveDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(abs(_objHDiff) > DZE_buildMaxHeightDistance) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_HEIGHT",DZE_buildMaxHeightDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith { _isOk = false; _cancel = true; _reason = localize "str_epoch_player_43"; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if (DZE_cancelBuilding) exitWith { _isOk = false; _cancel = true; _reason = localize "STR_EPOCH_PLAYER_46"; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; }; _isOk = true; _proceed = false; _counter = 0; _location = [0,0,0]; //No building on roads unless toggled if (!DZE_BuildOnRoads) then { if (isOnRoad _position) then { _cancel = true; _reason = localize "STR_EPOCH_BUILD_FAIL_ROAD"; }; }; // No building in trader zones if(!canbuild) then { _cancel = true; _reason = format[localize "STR_EPOCH_PLAYER_136",localize "STR_EPOCH_TRADER"]; }; _playerPos = getPosATL player; _nearRestr = count nearestObjects [_playerPos, ["Plastic_Pole_EP1_DZ"], 27] > 0; if(_nearRestr && !_cancel) then { _classname = _classnametmp; // Start Build _tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; //create actual object that will be published to database _tmpbuilt setdir _dir; //set direction inherited from passed args from control _tmpbuilt setVariable["memDir",_dir,true]; // Get position based on object _location = _position; if((_isAllowedUnderGround == 0) && ((_location select 2) < 0)) then { //check Z axis if not allowed to build underground _location set [2,0]; //reset Z axis to zero (above terrain) }; _tmpbuilt setVectorDirAndUp _vector; _buildOffset = [0,0,0]; _vUp = _vector select 1; switch (_classname) do { case "MetalFloor_DZ": { _buildOffset = [(_vUp select 0) * .148, (_vUp select 1) * .148,0]; }; }; _location = [ (_location select 0) - (_buildOffset select 0), (_location select 1) - (_buildOffset select 1), (_location select 2) - (_buildOffset select 2) ]; if (surfaceIsWater _location) then { _tmpbuilt setPosASL _location; _location = ASLtoATL _location; //Database uses ATL } else { _tmpbuilt setPosATL _location; }; format[localize "str_epoch_player_138",_text] call dayz_rollingMessages; //////////////////////////////////////////////////##########START TO BUILD AND REMOVE OBJETS player playActionNow "Medic"; [player,"repair",0,false,10] call dayz_zombieSpeak; [player,10,true,(getPosATL player)] spawn player_alertZombies; sleep 1; _removed = [["ItemPole",4], "ItemLightBulb","ItemGenerator","PartGlass"] call player_removeItems; cutText [format[localize "str_build_01",_text], "PLAIN DOWN"]; _limit = 3; //times it takes to build by default if (DZE_StaticConstructionCount > 0) then { //if count is manually overridden inside init.sqf, use that instead, else use limits configured in config files _limit = DZE_StaticConstructionCount; } else { if (isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then { _limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount"); }; }; _tmpbuilt setVariable ["OEMPos",_location,true]; //store original location as a variable //if not lockable item _tmpbuilt setVariable ["CharacterID",dayz_characterID,true]; if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true]; _friendsArr = [[dayz_playerUID,toArray (name player)]]; _tmpbuilt setVariable ["plotfriends", _friendsArr, true]; PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID,_vector],_friendsArr]; publicVariableServer "PVDZ_obj_Publish"; cutText [format["Lights on!"], "PLAIN DOWN",3]; }; } else { //if magazine was not removed, cancel publish deleteVehicle _tmpbuilt; localize "str_epoch_player_46" call dayz_rollingMessages; }; dayz_actionInProgress = false; *NOTE: edit items required from the file of above in this lines: Spoiler _hasitem = [["ItemPole",4], "ItemLightBulb","ItemGenerator","PartGlass"] call player_checkItems; //bunch of code _removed = [["ItemPole",4], "ItemLightBulb","ItemGenerator","PartGlass"] call player_removeItems; 2-open your custom variables.sqf Spoiler find this line: DZE_safeVehicle = ["ParachuteWest","ParachuteC"]; change by: MY_VEH = ["SearchLight_RUS"]; DZE_safeVehicle = MY_VEH +["ParachuteWest","ParachuteC"]; 3-server_monitor.sqf Spoiler _isPlot = _type == "Plastic_Pole_EP1_DZ"; below paste: _isSlight = _type in MY_VEH; find: if( (count _inventory > 0) && !_isPlot && !_doorLocked) then { change by: if( (count _inventory > 0) && !_isPlot && !_doorLocked && !_isSLight) then { 4-at least call searchlight.sqf with deployanything ["ItemToolbox","DeployLights","execVM 'scripts\searchlight.sqf';","true"], Link to comment Share on other sites More sharing options...
Anhor Posted June 26, 2017 Report Share Posted June 26, 2017 I found the "error" by myself. Let´s see. I had this in config.sqf from deploy anything: Spoiler ["ItemCrowbar",[0,2,0],5,1,false,true,true,true,true,false,false,["SearchLight_CDF"],[],["equip_metal_sheet","equip_1inch_metal_pipe","equip_1inch_metal_pipe","ItemLightBulb"],"true"], After I changed it to this, it works perfect: Spoiler ["ItemCrowbar",[0,2,0],5,1,false,true,false,true,true,false,false,["SearchLight_CDF"],[],["equip_metal_sheet","equip_1inch_metal_pipe","equip_1inch_metal_pipe","ItemLightBulb"],"true"], Dont ask me why, this is the point where you decide if vehicle ammo is cleared on restart, but now it works juandayz and JakeQue 2 Link to comment Share on other sites More sharing options...
jjsnacks77 Posted July 8, 2017 Report Share Posted July 8, 2017 Hey guys, I had a search through this forum but couldn't find what I was looking for. When a player starts constructing a bike or a pook, player goes through an animation. Now say if someone came along, got inside that vehicle then the person stop constructing. The player that got in was teleported to the ocean. Is there anyway to make the vehicle unenterable while in construction. I want to make it instant crafting but I know that isn't an option with this script. Another thing I have to ask. Is there a way to edit the config so when I right click on something in my gear, it does the action and closes the gear? I have implemented right click rules on my server but the rules I am using pops up in the middle of the screen in front of the gear and is unreadable. If you press ESC it closes both pages. Thanks. Link to comment Share on other sites More sharing options...
salival Posted July 8, 2017 Report Share Posted July 8, 2017 10 minutes ago, jjsnacks77 said: Hey guys, I had a search through this forum but couldn't find what I was looking for. When a player starts constructing a bike or a pook, player goes through an animation. Now say if someone came along, got inside that vehicle then the person stop constructing. The player that got in was teleported to the ocean. Is there anyway to make the vehicle unenterable while in construction. I want to make it instant crafting but I know that isn't an option with this script. Another thing I have to ask. Is there a way to edit the config so when I right click on something in my gear, it does the action and closes the gear? I have implemented right click rules on my server but the rules I am using pops up in the middle of the screen in front of the gear and is unreadable. If you press ESC it closes both pages. Thanks. Check out my fork of this mod, I have made changes to lock the vehicle while you are deploying it so people cant get on (THEY STILL DONT LEARN!!!) and it stops the vehicle being moved when packing: https://github.com/oiad/DayZEpochDeployableBike There's lots of other changes in there as well to make this version better, diffmerge it against your own. In your rules script, you need to have this line of code to close the gear menu: closeDialog 0; Link to comment Share on other sites More sharing options...
jjsnacks77 Posted July 8, 2017 Report Share Posted July 8, 2017 7 minutes ago, salival said: (THEY STILL DONT LEARN!!!) Tell me about it. :P I can merge all but the configs yes? Or do my configs need to be replaced with yours? - EDIT Link to comment Share on other sites More sharing options...
salival Posted July 8, 2017 Report Share Posted July 8, 2017 2 minutes ago, jjsnacks77 said: Tell me about it. :P I can merge all but the configs yes? Or do my configs need to be replaced with yours? - EDIT Your config should be okay, I made a lot of back end changes to make things work correctly, Only thing I know is broken is saving to the database with simulation enabled (it's using the wrong syntax for saving) Link to comment Share on other sites More sharing options...
jjsnacks77 Posted July 8, 2017 Report Share Posted July 8, 2017 Just now, salival said: Your config should be okay, I made a lot of back end changes to make things work correctly, Only thing I know is broken is saving to the database with simulation enabled (it's using the wrong syntax for saving) Ahh okay. Thanks for the help. Link to comment Share on other sites More sharing options...
azzdayz Posted July 13, 2017 Report Share Posted July 13, 2017 On 3/15/2017 at 3:40 PM, CappyZA said: Having the same issue here @jimmy565, did you ever get this sorted? Please share @juandayz, please explain what you mean by use publicVariableServer "PVDZ_obj_Publish";.......... Where do I set it to use this I am not sure how to tag everyone that was asking about this, but I was having this same issue and to fix it all I did is changed the true/ false statements to match what I had for deploying the helipad. This is what i have and both save to the database and there are no errors anymore when deploying. ["ItemRuby",[0,8,0],5,-1,true,true,false,true,true,false,true,["Land_MBG_Garage_Single_A"],[],["ItemRuby"],"true"], ["ItemToolbox",[0,9,2],5,0.9,true,true,false,true,true,false,true,["HeliHCivil"],[],["ItemToolbox"],"true"] Link to comment Share on other sites More sharing options...
salival Posted July 13, 2017 Report Share Posted July 13, 2017 From what I saw the other day when doing my virtual garage update the line in deploy anything for storing to database with simulation enabled is broken and needs updating Link to comment Share on other sites More sharing options...
NateDayZ Posted August 12, 2017 Report Share Posted August 12, 2017 Hey, I have set this up ["full_cinder_wall_kit",[0,2,0],5,1,false,true,false,true,true,false,true,["Land_A_Castle_Wall1_20"],[],["full_cinder_wall_kit","full_cinder_wall_kit","full_cinder_wall_kit","full_cinder_wall_kit"],"true"], but when a player dies after server restart they can no longer pack the object. Have I done something wrong here? I want the castle wall to repack-able only by the player who placed it even after restart/deaths Link to comment Share on other sites More sharing options...
NightRain Posted August 19, 2017 Report Share Posted August 19, 2017 I've ran into a issue with this script. It is relating to saving things into database. I've been playing with this script for few days and I do like it. In my server I run a hefty mix of buildable structures and static weapons, however I ran into a issue with static weapons saving to the database After following instructions from CappyZA I commented couple of lines from player_Deploy.sqf Quote if (_index call getPermanent) then { _tmpbuilt call fnc_set_temp_deployable_id; if(_index call getDeployableSimulation) then { // PVDZE_veh_Publish2 = [_tmpbuilt,[_dir,_position],(_index call getDeployableClass),true,call fnc_perm_deployable_id]; // // publicVariableServer "PVDZE_veh_Publish2"; // } else { PVDZ_obj_Publish = [call fnc_perm_deployable_id,_tmpbuilt,[_dir,_position],(_index call getDeployableClass)]; publicVariableServer "PVDZ_obj_Publish"; }; } else { _tmpbuilt call fnc_set_temp_deployable_id; }; This section, the one commented out. This fixed the static weapon saving to the Database. They recieve their own unique IDs and are saved to the database. HOWEVER, now the buildings will not be saved to the database. However if those lines are NOT commented the buildings will be saved to the database. It is kinda funny in a sense that you choose either that or that but I'd want to know how to build both so that they both remain in database and gets saved there. How could one do so? I can't figure that section out. Link to comment Share on other sites More sharing options...
salival Posted August 19, 2017 Report Share Posted August 19, 2017 Hi, The repo version of Deploy Anything is broken and needs updating regarding saving items to the database, the syntax for PVDZE_veh_Publish2 is definitely wrong. Link to comment Share on other sites More sharing options...
Recommended Posts