MrTesla 33 Report post Posted October 3, 2013 This will disable the functions of the R3F Artillery & Logistics addon (tow, lift, load in, and move) for vehicles that are locked. Requirements: -Something to unpack pbo files, such as PBO Manager. -Text editor (Notepad++ recommended) 1. Unpack these files: -dayz_code.pbo from your @DayZ_Epoch folder in your Arma 2 OA directory -mission pbo -server pbo (dayz_server.pbo) 2. Copy the "local_lockunlock.sqf" from "dayz_code\compile\" folder and the "compiles.sqf" from the "dayz_code\init\" folder and place them into your mission file. For this tutorial, they'll be placed in a folder call "Custom". NOTE: If you already have a custom "compiles.sqf" in your mission file (such as for self BB and other addons) you don't need to copy it over. Just use the one you already have and skip step 5. 3. In the "local_lockunlock.sqf", change this section (and only this section): if (local _vehicle) then { if(_status) then { _vehicle setVehicleLock "LOCKED"; } else { _vehicle setVehicleLock "UNLOCKED"; }; }; to this: if (local _vehicle) then { if(_status) then { _vehicle setVehicleLock "LOCKED"; _vehicle setVariable ["R3F_LOG_disabled",true,true]; } else { _vehicle setVehicleLock "UNLOCKED"; _vehicle setVariable ["R3F_LOG_disabled",false,true]; }; }; 4. In "compiles.sqf", change the file path in this line to point to your edited "local_lockunlock.sqf": local_lockUnlock = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lockUnlock.sqf"; //When vehicle is local to unit perform locking vehicle So for this tutorial, it would be changed to this: local_lockUnlock = compile preprocessFileLineNumbers "Custom\local_lockUnlock.sqf"; //When vehicle is local to unit perform locking vehicle 5. In your mission file's "init.sqf", change the file path in this line to point to your edited "compiles.sqf": call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions For this tutorial, it would be changed to this: call compile preprocessFileLineNumbers "Custom\compiles.sqf"; //Compile regular functions 6. Repack the mission file and upload it to your server. 7. Open "server_publishVehicle2.sqf" in the "dayz_server\compile\" folder and "server_monitor.sqf" in the "dayz_server\system\" folder. 8. In "server_publishVehicle2.sqf", after the 3rd line (_object setvehiclelock "locked";): if(!_donotusekey) then { // Lock vehicle _object setvehiclelock "locked"; }; add this line: _object setVariable ["R3F_LOG_disabled",true,true]; 9. Do the same thing in the "server_monitor.sqf" in this section: if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then { _object setvehiclelock "locked"; }; so it should look like this: if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then { _object setvehiclelock "locked"; _object setVariable ["R3F_LOG_disabled",true,true]; }; 10. Repack the server pbo and upload it to the server. 18 ebay, Ghostrider-GRG, Resshock and 15 others reacted to this Quote Share this post Link to post Share on other sites
Armifer 48 Report post Posted October 3, 2013 Genius, thank you for this! Quote Share this post Link to post Share on other sites
neiljb 22 Report post Posted October 3, 2013 Very nice, thanks for sharing. :) Quote Share this post Link to post Share on other sites
babylonstew 2 Report post Posted October 3, 2013 Works like a charm, you just made our bases far more secure by not allowing anyone to lift our vehicles out and away :) Quote Share this post Link to post Share on other sites
Remix 19 Report post Posted October 3, 2013 awesome thanks dude :D Quote Share this post Link to post Share on other sites
Bungle 207 Report post Posted October 4, 2013 Very nice change/addition to R3F. Well Done Mr Tesla! Quote Share this post Link to post Share on other sites
Armifer 48 Report post Posted October 5, 2013 Works like a charm, you just made our bases far more secure by not allowing anyone to lift our vehicles out and away :) This is exactly why I added this, as people were able to airlift vehicles through roofs and tow through walls, which was very silly and defeated the purpose of base building in the first place. 1 babylonstew reacted to this Quote Share this post Link to post Share on other sites
Asian Kid 85 Report post Posted October 7, 2013 I can't this to work, I install it and then I cant unlock vehicles. Any Idea where I messed up at? Quote Share this post Link to post Share on other sites
Bags2247 25 Report post Posted October 7, 2013 Frigging Genius Mate, Awesome work there Quote Share this post Link to post Share on other sites
MrTesla 33 Report post Posted October 7, 2013 I can't this to work, I install it and then I cant unlock vehicles. Any Idea where I messed up at? Make sure you didn't overwrite the "setVehicleLock" lines. Also make sure you didn't forget any semicolons, commas, etc.. Quote Share this post Link to post Share on other sites
Corex 0 Report post Posted October 8, 2013 This is very much appriciated, thanks. Quote Share this post Link to post Share on other sites
Pustekuchen 0 Report post Posted October 8, 2013 hello, i can only tow and lift (open) purchased vehicles. randowm spwant have no tow or lift option -_- has anyone a idea? Quote Share this post Link to post Share on other sites
MatthewK 109 Report post Posted October 9, 2013 9. Do the same thing in the "server_monitor.sqf" in this section: if(_ownerID != "0") then { _object setvehiclelock "locked"; }; 10. Repack the server pbo and upload it to the server. For that last step , do I put "_object setVariable ["R3F_LOG_disabled",true,true];" before or after the }; ? I only ask because up until that point all your steps involved replacing the entire block, or putting the new code at the very end of the block. Thought this may also clear it up for anyone having issues with the code not working.. So to recap, is it: if(_ownerID != "0") then { _object setvehiclelock "locked"; _object setVariable ["R3F_LOG_disabled",true,true]; }; Or is it: if(_ownerID != "0") then { _object setvehiclelock "locked"; }; _object setVariable ["R3F_LOG_disabled",true,true]; Thanks :) Quote Share this post Link to post Share on other sites
Cryten 16 Report post Posted October 9, 2013 if(_ownerID != "0") then { _object setvehiclelock "locked"; _object setVariable ["R3F_LOG_disabled",true,true]; }; you should already deal with a bit of C++ before trying to it :P Quote Share this post Link to post Share on other sites
MatthewK 109 Report post Posted October 9, 2013 if(_ownerID != "0") then { _object setvehiclelock "locked"; _object setVariable ["R3F_LOG_disabled",true,true]; }; you should already deal with a bit of C++ before trying to it :P I'm a php developer, so I understand enough to make this work. I was just clarifying for others on here who have posted with issues. I've just finished getting AI missions working with the Epoch Event system, not bad for a arma coding noob :p Quote Share this post Link to post Share on other sites
theballin7 3 Report post Posted October 9, 2013 anyone else having the problem with when you just buy a vehicle and unlock it too heli left or tow you need to relog to the server for it too work? 1 Monster reacted to this Quote Share this post Link to post Share on other sites
KnT LoOPinG 1 Report post Posted October 10, 2013 I install it but when i want unlock a car i press on UNLOCK but nothing happen i just can press UNLOCK all times! i do Copy/Paste for not make fault but.... maybe the Copy/paste is my fault?! i have check the lines of command but i don't know or see the "ERROR"! Can you help me! (Sorry for the grammar fault i am french and i no speak english all times) Quote Share this post Link to post Share on other sites
Fishie798 0 Report post Posted October 13, 2013 I have done everything as instructed but when I load the server it just loads into a bunch of hills with invisible people, seems to do this any time I edit dayz_server.pbo (HFBServers) could it be some thing to do with my host or am I doing some thing wrong? server_monitor.sqf (dayz_server.pbo) if(_ownerID != "0") then { _object setvehiclelock "locked"; _object setVariable ["R3F_LOG_disabled",true,true]; }; server_publishvehicle2.sqf // Lock vehicle _object setvehiclelock "locked"; _object setVariable ["R3F_LOG_disabled",true,true]; clearWeaponCargoGlobal _object; clearMagazineCargoGlobal _object; init.sqf //Load in compiled functions call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; progressLoadingScreen 0.1; call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; progressLoadingScreen 0.2; call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; progressLoadingScreen 0.4; call compile preprocessFileLineNumbers "Custom\compiles.sqf"; progressLoadingScreen 0.5; call compile preprocessFileLineNumbers "server_traders.sqf"; progressLoadingScreen 1.0; local_lockunlock.sqf private ["_vehicle","_status"]; _vehicle = _this select 0; _status = _this select 1; if (local _vehicle) then { if(_status) then { _vehicle setVehicleLock "LOCKED"; _vehicle setVariable ["R3F_LOG_disabled",true,true]; } else { _vehicle setVehicleLock "UNLOCKED"; _vehicle setVariable ["R3F_LOG_disabled",false,true]; }; }; compiles.sqf local_lockUnlock = compile preprocessFileLineNumbers "Custom\local_lockUnlock.sqf"; Anything look wrong there? Quote Share this post Link to post Share on other sites
MrTesla 33 Report post Posted October 13, 2013 Did you put the compiles.sqf and locallockunlock.sqf in a folder called "Custom"? Other than that nothing seems to be wrong. Quote Share this post Link to post Share on other sites
Fishie798 0 Report post Posted October 13, 2013 Did you put the compiles.sqf and locallockunlock.sqf in a folder called "Custom"? Other than that nothing seems to be wrong. Yeah there in the Custom folder but still doesn't work, starting to think its HFB, even editting the server_code.pbo the smallest bit it loads up with invisible characters. Quote Share this post Link to post Share on other sites
somma 1 Report post Posted October 13, 2013 same for me Fishie798 :( Did you solve the problem? edit: because i didn't test the r3f log addon, I just set the code back to original and got the same "error". deinstalling the r3flog addon from the root solved it. So it seems to be the r3f addon causing the trouble. Quote Share this post Link to post Share on other sites
Mr.Pig 3 Report post Posted October 15, 2013 same for me Fishie798 :( Did you solve the problem? edit: because i didn't test the r3f log addon, I just set the code back to original and got the same "error". deinstalling the r3flog addon from the root solved it. So it seems to be the r3f addon causing the trouble. Hey I had the same issue. For me it was how i extracted and repacked the dayz_server.pbo, specifically the server_monitor.sqf. If you are using PBO Manager 1.4 Beta, try going to your server_monitor.sqf file and right click it in PBO Manager and cut it, paste it to desktop then edit it Notepad ++ and save it then cut it from the desk top and paste it back in the same location in the PBO Manager. ( dayz_server.pbo/system/server_monitor.sqf) Close PBO Manager and upload the dayz_server.pbo back to the server. Quote Share this post Link to post Share on other sites
ruubje11 26 Report post Posted November 1, 2013 I install it but when i want unlock a car i press on UNLOCK but nothing happen i just can press UNLOCK all times! i do Copy/Paste for not make fault but.... maybe the Copy/paste is my fault?! i have check the lines of command but i don't know or see the "ERROR"! Can you help me! (Sorry for the grammar fault i am french and i no speak english all times) I must say I have the same problem, haven't found a fix yet / J' ai aussi cet probleme, si j'ai trouvé une solution je vais vous dire EDIT: In case someone experiences the same problem: I overwrote the whole local_lockUnlock file with the new code and that way I deleted: private ["_vehicle","_status"]; _vehicle = _this select 0; _status = _this select 1; Which made it so that I could not unlock cars anymore. :) So make sure you didn't delete that Quote Share this post Link to post Share on other sites
monkeebhoy 10 Report post Posted November 8, 2013 Is anyone else having problems getting this to work on a Vilayer server? I followed the instructions to the letter. Even got someone else to check it to make sure i done it correctly. The lift and tow works perfectly as well as the ability to un/lock vehicles. However i can still lift/tow locked vehicles. Quote Share this post Link to post Share on other sites
captgentry 0 Report post Posted November 13, 2013 I have a DayZ.ST server and I'm not sure I can access the dayz_code folder. Is there a way to get the folder I don't know about or is there another way to add this mod to the towing script? Quote Share this post Link to post Share on other sites