[PAID] [QB-CORE] [ESX] Unique Barn Find System

bannerresourcebarn

This script was made to give some players the ability to find and own imported vehicles in a manor never seen before on any FiveM server.

This script could be better but I will leave that up to you guys and will leave the code none obfuscated.

What is Barn Finds?:

  • Barn finds is a resource that allows you to put a run down vehicle anywhere on the map for a player to claim as there own.
  • Once the vehicle is claimed that vehicle is then theres.
  • Once claimed the player has to then use resources such as plastic and rubber to replensih the car back into good health.
  • Once you have fufilled all resources needed the car will then get swooped into your garage and be able to drive it away.
  • Barn finds on server restart will not lose its position.
  • Vehicles in barns spawn fully broken.

Bad points (sort of):

  • Only one vehicle can be out at a time, Even once claimed until that player has finished the repairs no other find can be put out.
  • When the player has fully repaired there vehicle and then the server restarts if the script has not been turned off or stopped it will run again with the same car at the same location.

How do players use the resources and repair the vehicle?:

  • This is currently done via commands as shown below.
/copper AMOUNT
/aluminium AMOUNT
/steel AMOUNT
/plastic AMOUNT
/glass AMOUNT
/rubber AMOUNT

PRE WARNING: In the server.lua on line 60 you will need to add your own garage systems storing method, This resource was made with BB Garages, Simple enough to do, Just go to your car shop resource and see how they do it. (I can also help with this if needed)

QBCore.Functions.ExecuteSql(false,"INSERT INTO `bbvehicles` (`citizenid`, `plate`, ` ETC ETC ETC

The script was made to be easily edited as shown below this is the config:

Config = {
    VehicleName = 'challenger', --HERE YOU CHANGE THE CAR YOU WANT TO SPAWN
    VehicleLoc = { --THE LOCATION OF WHERE THE VEHICLE WILL BE
        x = 1981.8708,
        y = 5174.2685,
        z = 46.858005,
        h = 130.32205,
    },
    VehicleCost = { --THE COST IN RESOURCES IT TAKES TO REPAIR THE VEHICLE
        copper = 650,
        aluminum = 650,
        steel = 750,
        plastic = 320,
        glass = 150,
        rubber = 200,
    },
    ShopLoc = { --WHERE THE CAR GOES ONCE CLAIMED
        x = 103.88192,
        y = 6623.1044,
        z = 31.824226,
        h = 224.93014,
    },
    IsClaimed = false, --DONT EDIT
    Winner = nil,      --DONT EDIT
    WinnerCid = nil,   --DONT EDIT
    Bop = false,       --DONT EDIT
}

SHOWCASE:

DEPENDANCIES:
ghmattmysql
qbcore

FEATURES:

  • Unique system.
  • Easily Configured.
  • Made to be as efficient as possible.

GET IT HERE: https://kazumidevelopments.tebex.io/package/4991078

ESX VERSION THANKS TO @ToXicGlo > https://kazumidevelopments.tebex.io/package/4993790

If you run into issues please feel free to message me here on the FiveM Forums.

3 Likes

ESX compatible?

Really cool idea. Also, GoodGuyDev for leaving the code open. I imagine a lot of people have different ideas on how to repair the vehicle.

1 Like

I will work on a ESX version :blush:

Any chance you could release it as standalone so we could convert it to our own framework?

The resource only uses QB-CORE for the following:

CreateCallback/TriggerCallBack.
GetPlayerData.
Notify.
Get Item Needed.

So if you know what your doing it’s easy to convert to the framework of choice :slight_smile:

1 Like

Okay cool, just wanted to make sure it wasn’t locked

1 Like

Unfortunately, it is impossible to message you. The forums messenger is a bit scuffed. I could use your assistance :slight_smile: Using MojiaGarages and okokVS, cant seem to alter into a funtionable state within your script.

1 Like

new link for preview?

Edited the post also :slight_smile: Thank you

alg i just have one question tho, will only one vehicle out at a time stay like that or is there a plat to fix it ?

I dont currently plan on taking it further, The code is open for anyoen to edit thou :slight_smile:

1 Like

how do you claim the vehicle? also unable to access the server.lua on line 60 to change garage.

Thanks

I have Looked and my server.lua file is encrypted for some reason i can’t change where the garage stuff goes to please help asap

No its not i got it and it is not open to edit please help. I need to change the Garage

Wish i had read your message before purchasing. Didn’t realize its now encrypted so now i cant change the garage nor can i convert it to ESX since the creator has taken down the listing for the ESX version of the script.

Haha all good, heaps of time has passed I have moved on from that project and now working on heaps of other stuff, cheers though mate

Its fine now anyway, Kazumi sent me the unescrowed version of the script so i can convert it to ESX and additionally change the garage script

Really? how much for the script?

can i get the unescrowed copy of the server.lua please i just buy the script and want to use it