Jump to content
F507DMT

[Release] Anti-Theft from locked vehicles by F507DMT [Working]

Recommended Posts

Anti-Theft from locked vehicles by F507DMT

 

 

add in variables.sqf:

GearStorags = ["WeaponHolder","WoodCrate_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","VaultStorage","LockboxStorage"];

add in dayz_spaceInterrupt.sqf:

//Esc
if (_dikCode == 0x01) then {
	_nill = execvm "scripts\esc.sqf"; //if use Anti-Duping by F507DMT (http://epochmod.com/forum/index.php?/topic/32889-release-anti-duping-by-f507dmt-working/)
	DZE_cancelBuilding = true;
	call dayz_EjectPlayer;
	OpenGear = nil;
};

//Anti-Theft from locked vehicles by F507DMT
if ((_dikCode in actionKeys "Gear") && !(vehicle player != player)) then {
	if (isNil "OpenGear") then {
		(findDisplay 106) closeDisplay 1;
		if (!(cursorTarget isKindOf "Man") and (player distance cursorTarget <= 7) and ((typeOf cursorTarget in GearStorags) or (cursortarget isKindOf "AllVehicles"))) then {
			player action ["gear", cursortarget];
			} else {
			createGearDialog [player, "RscDisplayGear"];
		};
		OpenGear = true;
	} else {
		(findDisplay 106) closeDisplay 1;
		OpenGear = nil;
	};
	_handled = true;
};

P.S.

I recomend add "Open self Backpack" on button "H"

add in  dayz_spaceInterrupt.sqf:

//open backpack on H button
if (_dikCode == 0x23) then {
	if (isNil "OpenGear") then {
		(findDisplay 106) closeDisplay 1;
		player action ["gear", unitBackpack player];
		OpenGear = true;
		} else {
		(findDisplay 106) closeDisplay 1;
		OpenGear = nil;
	};
	_handled = true;
};

with: Losing connection, drop loot, Esc, exit yes and Esc + G, losing connection, drop loot, exit yes.

Share this post


Link to post
Share on other sites

am lost... Dose this allow you to access gear while vehicle is locked?

Epoch have a bug, anyone can open gear vehicles, when vehicle locked! Dose this fix this bug.

+ And now if you near vehicle, jast press G and open vehicle gear, if it unlocked.

Share this post


Link to post
Share on other sites

This didn't work for me. Before I installed this, I spawned in a vehicle, put a crow bar in it, saw that I can remove it from the vehicle, even if the vehicle is locked. I then installed this, went back to the vehicle (it was locked) and the option to remove the crow bar was still there.

Share this post


Link to post
Share on other sites

This didn't work for me. Before I installed this, I spawned in a vehicle, put a crow bar in it, saw that I can remove it from the vehicle, even if the vehicle is locked. I then installed this, went back to the vehicle (it was locked) and the option to remove the crow bar was still there.

if you out in vehicles 1 item, or loot. and this inem have scroll menu "take"(if intem on a floor). bandage, knife, crowbar, some ammo. U put only 1 item in vehecle, u can take this from locked vehicle.

 

CH53 can acsess to gear every time(locked or not), scroll rotor))

Share this post


Link to post
Share on other sites

After this fix, if you want open gear, you need press G twise.

And

if (_dikCode == 0x01) then {
    _nill = execvm "scripts\esc.sqf"; //if use Anti-Duping by F507DMT (http://epochmod.com/forum/index.php?/topic/32889-release-anti-duping-by-f507dmt-working/)
    DZE_cancelBuilding = true;
    call dayz_EjectPlayer;
    OpenGear = nil;       <------- This doesn't work if you close gear on ESC.
};

 

Much better:

if ((_dikCode in actionKeys "Gear") && !(vehicle player != player)) then {
	if (!isNull (findDisplay 106)) then {
		(findDisplay 106) closeDisplay 1;
	} else {
		if (!(cursorTarget isKindOf "Man") and (player distance cursorTarget <= 7) and ((typeOf cursorTarget in GearStorags) or (cursortarget isKindOf "AllVehicles"))) then {
			player action ["gear", cursortarget];
		} else {
			createGearDialog [player, "RscDisplayGear"];
		};
	};
	_handled = true;
};

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By thegdog
      2:08:04 Error Type Any, expected String 2:08:04 File z\addons\dayz_server\compile\server_playerSync.sqf, line 41 2:08:12 Server: Object 3:54 not found (message 70) 2:08:12 "Server_PublishVehicle2 error: Wrong parameter format" 2:08:12 "Trader Menu: jeffdog (76561198147272349) purchased 1x BAF_Merlin_DZE into gear at Aircraft Trader for 1 ItemObsidian" 2:08:12 Error in expression <ceFoot = 0; trying to buy aircraft from the default aircraft trader.  never touched any of it and it giving this error.  no vehicle spawns.  it shows the arrow.  EDIT:  i tried other traders, all vehicles dont spawn when bought.
    • By webbie
      Hi all, Ive been looking for a while now for a vehicle flip script for a single player.
      Ive tried stuff ive used on previous servers but its not allowing the option so im guessing epoch has something that interferes with it.
      If anyone knows of a simple script to allow players to do this could you link it to me please,
      Thanks in advance.
      PS. Im aware the jacks flip vehicles but I actually  find this to be incredibly painstaking unless theirs a trick to it.
    • By Honey Bee
      Hallo zusammen,
      Die glorreiche Idee den Fahrzeugen das Volumen zu nehmen war jetzt nicht gerade der Bringer. Alle beschweren. Jetzt hab ich mal geschaut aber finde nix wo die Kapazität der Fahrzeuge drin steht. Jemand Erfahrung damit?
       
      Hi,
      how can i change the Vehicle capacity?
       
      THX
    • By unconditional
      Hi everybody,
      scuse me for intrusion :)
      If I did not make mistakes ... maybe I could create a script to unlock the doors through use of the hotwirekit...
      I did not understand how the system of credits on scripts works ... so I want to clarify that my work was based on a script of @salival to which I wrote in private before publishing this. I waited a week but not having received an answer...i think it is still right to make available to the community as much as I did...
      So all the credits go @salival because i am based on his garagedooropener...
      Now...this is my work:
      -1) custom variable.sqf:
      -2) custom fn_selfActions.sqf:
      -3) in custom script folder (under mission folder);
      red text in the script below is needed only if you want to log in .rpt when someone try a hotwiring. If you want this, you have to leave red text in the script and you also have to do step 4
       
      STEP 4 and 5 to do ONLY if you want to see log in .rpt
      -4) in inf.sqf (mission folder);
      -5) in custom script folder (under mission folder);
      - FINISH :-)
      Obviously i think it can be improved and for this reason i make it public, so that those who know more than me can suggest additions or modifications...

      For example ... I added a public variable to know via the .rpt file when a hotwire was used and whether it was successful or not.
      Maybe you can also add a routine to signal in the map or through text message for all the players that someone is trying to force a door...

      I tried it on my server and it seems to work fine.

      I await your observations and suggestions.

      I repeat: ALL CREDITS GO TO @SALIVAL

      Thanks for the attention.
    • By Zoranth
      Based on Hacked Vehicles release by @Bricktop and Additional code by @Hooty from here:
      This is my first release
      This mod and code is not all my original work. 
      Credits to: 
      @Bricktop for the "Hacked Vehicles" https://epochmod.com/forum/topic/43750-hacked-vehicles-1061/
      @Hooty for his input in Bricktop's release on how to install it differently and to add support for Virtual Garage.
      What I did is took their information and made it modular and easier to install / customize. This way, you just need to #include which weapon systems you want to add into each vehicle that you want to modify.
      >> DOWNLOAD HERE <<  CURRENTLY ON HOLD DUE TO UNFORESEEN ERROR
      Install Directions:
      1.    Copy the Vehicle_Weapons directory into the root of your dayz_server directory
      2.    Next paste
      #include "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";    in dayz_server\system\sever_monitor.sqf under
      3.    Then paste
      #include "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";  in dayz_server\compile\server_publishVehicle2.sqf under
      4.    Then paste
      #include "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";   in dayz_server\compile\spawn_vehicles.sqf under
      Installation with Virtual Garage:
      If you have @salival's Virtual Garage installed then add :
      #include "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";   to dayz_server\compile\garage\server_spawnVehicles.sqf under
      How To Customize:
      If you would like to create your very own weapons pack for a vehicle, use the following instructions:
      1. Make a copy of "\z\addons\dayz_server\Vehicle_Weapons\vehicles\Generic_Add_Weapon.sqf" rename it like "<vehicle_classname>_Add_Weapons.sqf". Replace the <vehicle_classname> with the actual classname of the vehicle you want to add weapons to.
      2. Comment out or Delete the Weapon_Systems that you do not want to use on your new vehicle.
      3. Make a new #include "\z\addons\dayz_server\Vehicle_Weapons\vehicles\<Class_Name>_Add_Weapons.sqf"; line with your new vehicle file and add it to "\z\addons\dayz_server\Vehicle_Weapons\Add_Vehicle_Weapons.sqf";
      4. In the new vehicle file you just made.  Rearrange the Weapon_Systems in an order that makes sense to you. For example, list all guns, then all missiles so they are grouped together in your scroll menu for easier selection.
      Adding / Restricting an Ammo Type
      For Weapon_Systems that have multiple ammo types, You can go into that specific file and comment out an ammo type or make an extra file with just the ammo you want if you want to restrict it from your server. Example:
      In the file: "\z\addons\dayz_server\Vehicle_Weapons\Vehicles\Weapon_Systems\D81_125mm_Cannon.sqf". You could comment out an Ammo Type as shown Below.
      If you do this, you will want to save that as a new file such as : "D81_125mm_Cannon_SABOT_ONLY.sqf.
      List of Vehicle Weapons and Ammo:
      WARNING: Not all Weapon Systems work with all vehicles. For example, You obviously do not want to put a "GBU12_Bomb_Launcher" on an "ArmoredSUV_PMC", or "MLRS Rocket System" on the "ArmoredSUV_PMC".
      These weapons spawn on the vehicle when purchased and remain after restart.  This does not work with admin spawned vehicles nor does it work (for now) with the Deploy Anything Mod.  I do not have Virtual Garage installed on my test server,so I am unable to test that but it should work.
      Have Fun
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...