Jump to content

[Dupe Fix] Virtual Garage Dupe Method


Hoplox

Recommended Posts

Recently I've come across a method of duping vehicles through virtual garage in which, when two players take a vehicle out at the same time, 2 of the same vehicle spawns. This can be easily fixed by following these steps:

1. Find your garage_spawnvehicle.sqf

2. Find the line 

_vehname = getText(configFile >> "cfgVehicles" >> (_vehicle select 0) >> "displayName");

Place this UNDER it:

//Dupe Check//
_dupecheck = count nearestObjects [player, ["CAManBase"], 10];
if ((_dupecheck) > 1) exitWith {cutText [format["[Antidupe] You cannot spawn the vehicle with another player/zombie within 10m of you"], "PLAIN DOWN"];}; 

This check makes sure there is not another player within 10 metres distance from you, so they cannot have the option to withdraw a vehicle. The distance may have to be changed depending on the distance range in which you have the option to withdraw in your fn_selfactions.

If there is another player within the 10m radius, it will not allow you to withdraw the vehicle.

3. Your are done!

4. I use this script on my very own server and it works fine so far.

Hope this worked for you guys. Have a great day. Feel free to like!

Credits to - 0verHeaT for making Virtual Garage.

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...