The Complete Vehicle System - Buy Now on Tebex
This resource was created in under a month and was entirely written from scratch. Big props to the authors of PolyZone (meta-hub) and Kiminaze for deformation syncing.
IMPORTANT!
Created 4 versions of the resource. Standalone version, ESX version, QBUS version, and Parts only version after request. When you purchase the resource you receive all 4 copies, with all updates. Made for people who do not know how to code at all, other important thing. Unencrypted big chunks of code after a big rewrite to optimize the hell out of it. Only 8% is encrypted now.
YOUTUBE TRAILER:
YOUTUBE IN-DEPTH SHOWCASE:
Features:
Expand
- Server-Sided Spawned Vehicles with Statebags: This ensures all vehicles are synced, in all areas, and cannot be despawned âby mistakeâ.
- Park Anywhere: You may park any vehicles anywhere on the map; this gets saved server-side and into the database. It stores values such as (Vehicle Parts, Damages, Deformation, and Metadata)
- In-Depth Parts: This resource has many parts that have health, few examples would be radiator, engine, catalyst, tyres, oil age, and many more. They wear down depending on your drivestyle. So basically exactly like in real life. This is configurable as well throughout the config. Parts include a special UI as well, and an export function where you can fix each one separately.
- Crash System: TCVS includes a built-in crash system as well, fully configurable throughout the config. The crash system drowns down parts. This system is divided into two sections (minor crashes and big crashes), so we can take everything into consideration.
- Impound System: We also offer an impounding system, which is pretty much unbuggable since it is saved as metadata. People with the whitelisted jobs through the config may impound vehicles and set the reason and price there, as well as make sure a policeman needs to be there for the owner of the vehicle to unimpound it. All vehicle damages, and deformation are saved as well.
- Lock System: This resource has a built-in lock system way better than the regular ones in terms of syncing and usage. Locking the vehicle is saved as metadata, so even if the server restarts, the vehicle will still be locked. You may as well give vehicle keys to up to 5 friends, which will allow them to use the vehicle as well (Saved in the database).
- Hotwire System: Pretty much a standardized hotwire system; if you do not have the keys to the vehicle, it forces you to hotwire it. The only small addition is that by spamming W, there is a boost effect on how fast the hotwiring process takes; there is a minimal chance that the vehicle might explode while spamming W!
- Garage System: The whole garage system was pretty much my idea as I didnât particularly appreciate how garages were functioning normally. Garages are spawned with shells and are handled with PolyZones; you may park however you wish inside and bring as many vehicles you want, as long as the vehicles do actually fit in! You may enter with passengers as well and give garage keys to up to 5 friends.
- Insurance System: The insurance system was made in case the vehicle explodes or has been stolen by another player. If someone is driving your vehicle, you cannot re-spawn it with the insurance system (To Prevent possible trolls). Currently, the insurance system has a set fee, and if the vehicle was not exploded, the vehicle would arrive in its original condition. It will only come fully healthy if it has exploded.
- Keep Engine Running: On vehicle exit, the engine is kept on if it was on; this was made basically to make sure you donât need to re-hotwire the vehicle each time.
- VIN: We created vehicle vins that are only set once, this was made so players can change license plates on the vehicles, but we will have an actual identification number for vehicles, like in real life. It can be shown seen on Vehicle Info UI.
- Server-Synced Resource: This resource was quite extensive, so we made sure everything on it would be synced at all times, with the uses of statebags and events.
- Optimization: With 6000 lines, optimization was taken a lot into consideration. At the moment, this resource runs at 0.01-0.02 ms client side and 0.00-0.01 server side. As for databases, they only get updated on X amount of time (Set from config) and only update vehicles that have actual updates, so we avoid many queries.
Parts Explanation:
Expand
- Driving Distance: Each vehicle saves driving distance into the server and database, and this was made so we can keep track of how many KM/Miles have been driven with the vehicle. To add a bit more, roleplay has sense with Oil Changes as well.
- Oil Changing and Temperature: Upon creating the resource, I had the fun idea of adding oil changing, so basically, this calculates your driving distance and your suggested oil change value; if your oil is old, the vehicle has a chance that it can leak oil and overheat quite quickly. You may see oil temperature from the steering wheel in first-person mode as well. Oil temperatures are responsible for vehicle overheating, so possible fires and explosions.
- Engine: TCVS provides a very complex engine system. Vehicle engine wears down based on vehicle RPM and oil age. The less the Engine HP there is, the slower the vehicle goes; once the engine HP goes below 300 points, you will start seeing smoke effects and have limited speed. Taking Engine HP below 150 will superbly limit your speed and will shut down on high RPM. Once seeing such an effect, you should drive slow, not overheat the vehicle and take it to a mechanic.
- Gearbox: This resource as well provides a very detailed gearbox system. The gearbox wears down based on how often you shift with your vehicle. Once the gearboxâs HP gets below 300, there is a slight chance the gear can get stuck for a few seconds, and when it goes below 150 HP, it ultimately gets stuck on the first gear.
- Tires: Tires are pretty straightforward; they go down based on driving distances and crashesâthe less the tires HP, the less grip you have on the road. Real effects only come into place below 300 HP, with significantly less grip, and below 150 HP, the tires might pop as well.
- Brakes: Brakes are pretty straightforward, they wear down based on mileage, and the fewer brakes HP the vehicle has, the less brake force you have. So keep them fresh, or you wonât be able to stop!
- Axle: The vehicleâs axle may only wear down from crashes; when the axle goes below 300 HP, the steering of the vehicle suddenly becomes very heavy and hard. Below 150 HP, almost impossible to steer properly; staying in a straight line, though, is okay.
- Battery: The vehicleâs battery is responsible for the radio stations and the vehicleâs headlights. It is based on distance. Once you reach 300 HP on the battery life, there is a small chance the radio station might change, and the headlights might flicker. Below 150 HP, this happens constantly.
- Radiator & Catalyst: Both radiator and catalyst are responsible for vehicle overheating (Well, in reality, the catalyst isnât for that, but when it gets stuck, the vehicle overheats a lot, that is what the concept was). Once one of the two gets to 300 HP, the vehicle will start overheating quite rapidly at high RPM. Below 150, the effects are more extensive. Ultimately not being careful will cause the vehicle to catch fire or damage the engine itself.
- Fuel Tank: The fuel tank may only be damaged by crashing; once it gets below 700 HP, the vehicle will start leaking gas, losing you gas along the way, even if the vehicle is turned off.
- Suspension: COMING SOON
Optimization:
Expand
- Optimization: With 6000 lines, optimization was taken a lot into consideration. At the moment, this resource runs at 0.01-0.02 ms client side and 0.00-0.01 server side. As for databases, they only get updated on X amount of time (Set from config) and only update vehicles that have actual updates, so we avoid many queries.
Dependencies & Compatibility:
Expand
Framework Dependencies: none (This can be standalone or work with ANY framework, we already provide ESX and QBUS support on the get go (with Multicharacters as well))
Sql Resource Dependencies: Any SQL System is available, we provide from the get go support for OXMySql, MySQLAsync, GhmattiMySql (Thatâs already 99% of the all servers)
Resource Dependencies: 1) PolyZones
Locales/Translations: English, changeable through languages.lua
OneSync Compatibility: YES
Non-OneSync Compatibility: NO
Screenshots
FAQ:
Expand
When are the vehicles spawned? The vehicles are automatically spawned on script start with all metadata. Doesnât matter if people are connected or not.
Is this an easy to install resource? TCVS is super easy to install, was pretty much made to be PLUG-And-Play. You only need to run the SQL file, setup the config and add the 1 trigger event and 1 export for fixing parts. Full support is given for QBUS and ESX.
Are there any limitations with the resource? At the very moment after heavy testing, no. We have tested this resource with up to 500 vehicles spawned around the map at the same time without any issues.
Can i use it into my existing owned vehicle database table? Yes, but please do message me before doing so, i am able to set it up in around 30 minutes to be working with any existing vehicle database.
How easy is it to fix a part? We took a lot of consideration while building this resource, made it very user-friendly to install and very easy to configure. To fix a part you only need to call our export function which looks like this: exports[ârealisticVehicleSystemâ]:fixPart(partName, newHP, respawnVehicle)
Is it easy to embed it with our current vehicle shop? Yes!, we made it super easy for adding vehicles into the database. Once the vehicle is bought you only need to trigger this event and the rest is handled by us TriggerServerEvent(ârealisticVehicleSystem:server:addVehicleâ,
baller2
, vector4(coords.x, coords.y, coords.z, heading))
Does TCVS have multicharacter support? Of course fully! We have already made a function where you add youâre piece of code for identifier, you do not need to change. But by defauly it uses the GetPlayerIdentifier() function. We already have an example commented for QBus multicharacter support!
How much of the code is encypted? So basically we encrypted everything regarding syncing. We do allow you to edit many of the client sided luas, so you can have your basic needs.
Can i disable Parts and Crash System? Yes fully, through the config!
TO-DO Updates:
Expand
Vehicle Trackers: Will show to the owner of the vehicle where it is on the map.
NPC Mechanic: The NPC mechanic will be a mechanic which you can call. He will pick your vehicle and take some time fixing it, while again driving back to you. All with animations and such.
Rentable Garages: Add the possibility to not only purchase these garages, but to actually rent them on a weekly basis, if payment is forgotten, all vehicles inside the garage will be impounded
In-Depth Insurance System: Make insurance system work with a percentage of the cost of the vehicle. Example, the vehicle cheetah costed 100k. 10% of it will be the insurance cost when attempting to respawn it. + Make insurance be paid weekly, if you forget, insurance cannot be used, so basically you lose your vehicle. (Changed from config)
In-Depth Part System for Aircrafts and Boats: As the title says, didnât think about it earlier but i guess this shouldnât much of my time.
Flatbed Impounding: People with a flatbed can attach the vehicle onto the flatbed and then take it to the impound. (Suggestion by SamBradley)
Information Files (config.lua - README.md):
Changelog:
Expand
v1.0.1:
- Fixed some general issues with MySQLAsync
- Fixed some typos.
- Fixed hasMoney function. (Forgot to add price sending)
- Decrypted bunch of code you would need.
v1.0.2:
- Fixed hasMoney function again, for some reason sometimes the value was a string.
- Added Y button for Engine on/off, Disable from Config.
v1.0.3:
- Fixed Hotwire text when someone crashes into you
- Added functionality for Drift Tyres. New native for game build 2699.
v1.0.4:
- Added full compatibility for both QbCore and ESX, so basically this is a drag and drop resource now.
- Added Blip syncing when someone purchases a garage.
v1.0.5:
- Fixed minor bugs with commands. You need to update because givegaragekeys wonât work. (I swear building something big, every single small bit of code can break anything, my old gaming company always used to say this to me lol.)
- Fixed some SQL queries.
- Updates garages.lua,locksystem.lua minor bug.
- Added on player loaded event. client/frameworks.lua
v1.0.6:
- Removed timer since we are using on player load
v1.0.7:
- Added Loading Timers to ensure nothing will bug out server side.
- Rewrote code for vehicle plate finder. (Supports spaces in-between the text now.)
v1.0.8:
- Changed GetVehicleInDirection() function.
- Changed impound,vehiclekeys,givevehiclekeys command. Gets the closest vehicle now, not in direction.
- Fixed a weird bug with driving distance not bringing back value of 0.01, but it was bringing back 0.00999
- Fixed some CSS (Thanks to iSentrie)
- Added some more things into vehicle syncing.
- Added on resource restart for the data to come again.
- Fixed hotwiring not popping up on second attempt
v1.0.9:
- Added vehicle despawning check server-side for QB servers only. If vehicle was despawned by OneSync or some weird script you got, makes sure itâs respawned so vehicles never disappear. (Tested and working)
- Fixed an issue with plates having spaces. Some servers worked some not, added a fix
- Added 2 methods of getting closest vehicles for locksystem.
- Added a new export for getting vehicle data client sided.
v1.1.0:
- Added Config.UseParts, to disable/enable parts.
- Added a new export exports[ârealisticVehicleSystemâ]:giveVehicleKeysExtra(plate), gives temporarily vehicle keys to player with the car with those plates, can be used anywhere.
- Fixed some minor bugs, canât even remember. Coding too much.
v1.1.1:
- Added some more vehicle part fixing export and trigger event.
- Fixed some minor bugs (getting vehicleID for our table)
- Updated README.md
v2.0.0:
- Added public garages, impounds, insurance for all types of vehicles
- Rewrote very big chunks of the code for optimization for large servers. Supports up to 20k+ vehicles.
- Fixed a minor bug in insurance UI.
- Added vehicle locksystem for jobs, supports metadata that a vehicle is civilian or job one.
- Added support for different kind of shells for private garages.
- Fixed globalVehicleID bug.
- Unencrypted most of the code, only 5-10% is encrypted now. Everything is accesible and changeable.
- Added way more support for developers. (Transfer vehicle events and command. Numerous important exports.)
- Made extra keys serversided, in case some player crashes or relogs.
- Added option to use our garage systems, it is highly reccomended to use our methods though, or extra code is needed.
(INFO about v2.0.0) This update should fix any kind of weird issues as people reported, this should be bug-free and way more dev and user-friendly.
Code is accessible | 92% of code is accessible (Only spawning and syncing are encrypted - 500 lines encrypted out of 7,000) |
Subscription-based | No |
Lines (approximately) | 7000 without the config and languages |
Requirements | Standalone, read dependencies section |
Support | Yes, almost 24/7 |
Check out fully our Tebex store at https://store.voxit.xyz
Take care, peace, best.