Jump to content

[Tutorial] Disabling R3F Tow/Lift for Locked Vehicles


MrTesla

Recommended Posts

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?

The folder/file is on your machine, in the epoch installation! :D

It is also on the server, but you don't need access to that because you should have the same on your PC, try here if you use steam: "C:\Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\@DayZ_Epoch\addons\dayz_code.pbo" (need to be extracted first, search the forums or the internet on how to)

 

Btw: why are always DayZ.st customers asking those kind of questions, I am just curious lol

Link to comment
Share on other sites

I have a question : is the variable "disable" specific to the R3F loading script or is it an arma specific command i could use with my loading script too as i am not using R3F. thanks in adavnce ;)

The variable is called R3F_LOG_disabled" and NOT "disable" where do you see that? so yeah it is specific and has to be handled in the R3F logistics code of course.. :)

Link to comment
Share on other sites

BTK Cargo Drop uses the "R3F_LOG_disabled" variable so R3F's functions don't interfere with its own. So, for example, no one can tow a vehicle that's already loaded into your vehicle via BTK.

 

The "R3F_LOG_disabled" variable, not a command. It's "made up" by the scripts, and used to check whether R3F's functions should be performed. Certain actions will set the variable to true, while others will set it back to false. If you look in the scripts like heliporter.sqf, it looks something like this:

		if !(_objet getVariable "R3F_LOG_disabled") then {
			if (isNull (_objet getVariable "R3F_LOG_est_transporte_par")) then {
				if (count crew _objet == 0) then {
					if (isNull (_objet getVariable "R3F_LOG_est_deplace_par") || (!alive (_objet getVariable "R3F_LOG_est_deplace_par"))) then {
						private ["_ne_remorque_pas", "_remorque"];

						_ne_remorque_pas = true;
						_remorque = _objet getVariable "R3F_LOG_remorque";

						if !(isNil "_remorque") then {
							if !(isNull _remorque) then {
								_ne_remorque_pas = false;
							};
						};
					
						if (_ne_remorque_pas) then {
							_heliporteur setVariable ["R3F_LOG_heliporte", _objet, true];
							_objet setVariable ["R3F_LOG_est_transporte_par", _heliporteur, true];
						
							_objet attachTo [_heliporteur, [
								0,
								0,
								(boundingBox _heliporteur select 0 select 2) - (boundingBox _objet select 0 select 2) - (getPos _heliporteur select 2) + 0.5
							]];
						
							player globalChat format [STR_R3F_LOG_action_heliporter_fait, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")];
						} else {player globalChat format [STR_R3F_LOG_action_heliporter_objet_remorque, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")]};
					} else {player globalChat format [STR_R3F_LOG_action_heliporter_deplace_par_joueur, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")]};
				} else {player globalChat format [STR_R3F_LOG_action_heliporter_joueur_dans_objet, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")]};
			} else {player globalChat format [STR_R3F_LOG_action_heliporter_deja_transporte, getText (configFile >> "CfgVehicles" >> (typeOf _objet) >> "displayName")]};
		};

The line "if !(_objet getVariable "R3F_LOG_disabled") then {" means the code between the "{" and the "};" all the way at the end will only be performed if the "R3F_LOG_disabled" variable is not set to true. So when a script sets the variable to true, it's essentially disabling this function.

Link to comment
Share on other sites

In step 9, where you say edit this section in "server_monitor.sqf":

if(_ownerID != "0") then {
    _object setvehiclelock "locked";
};
 
That doesn't exist in Epoch 1.0.2.5. Instead, it's:
 
if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
_object setvehiclelock "locked";
};
 
Should I change THAT section?
 
if(_ownerID != "0" and !(_object isKindOf "Bicycle")) then {
_object setvehiclelock "locked";
_object setVariable ["R3F_LOG_disabled",true,true];
};
Link to comment
Share on other sites

Yes you have to change that like the last section, it was changed with the last epoch patch since you can't lock bicycles anymore..  :D

 

You can't just go around and do a search & replace because the code of epoch always changes with the updates, so learn the basics of programming/scriping, that would make this much easier and you learn something useful with it (maybe?)

Link to comment
Share on other sites

So do you see any possibibility of allowing me to the same thing on the BTK script? Or should is use R3F instead?... have to say i always had a bit of trouble when it comes to that one....(and i have a lot of scripts running correctly...) Thx for your answers lads! this community is awesome :D

Link to comment
Share on other sites

Actually i do speak french :p besides a couple of other languages .. Well if you would be willing to share your modified version with me if you got the locked lifting working for you thatwould be awesome !!! Actually i understand the code when i see it and i can modify stuff myself but when it comes to writing something myself i don't have the knowledge.. Well thx for the help it is much appreciated :D

Link to comment
Share on other sites

  • 3 weeks later...

 In the dayz_code folder, copy the "local_lockunlock.sqf" from the "compile" folder i dont have that in the folder to begin with :( 

 

Found it lol My bad but i tested the lift tow before adding this and it worked came up on the scroll menu but after adding this it doesn't come up at all on any vehicle :(

 

 

Sorry long night has taken it's toll forgot to select the files for the server lol but after just me testing it atm the locked cars can still be towed is it because i bought the cars that im trying to tow? even tho i put the key in a different vehicle.  Thanks 

Edited by Dridge118
Link to comment
Share on other sites

Hi,

 

I have a problem that i don't get tow/or lift option for bought and not locked vehicles, when i use this Tutorial.

Normaly this should only be for locked vehicles... but when i unlock my cars i still get no tow/lift option :(

 

I've explained my problem more detailed in this thread:

http://dayzepoch.com/forum/index.php?/topic/4767-r3f-towlift-epoch-103-dont-get-towlift-option-on-bought-vehicles/?p=29707

 

Maybe anyone could help me?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...