Since I heard a lot of people are searching for a simple, lightweight but advanced garage script, I tried to create one for you guys.
DEPENDENCIES
es_extended (1.2, older will not work at this moment due to the money functions)
LegacyFuel
esx_vehicleshop
a police job and mechanic job to let the commands work, or you’d simply need to change the jobnames
FEATURES
Saves fuel in database (LegacyFuel exports) and restores it on vehicle when spawning it
Saves engine health in database and restores it on vehicle when spawning it
Vehicle can only be spawned in the garage it initially got stored
Vehicle stays visible in garage even if its impounded or in the car depot, but you can’t get it out, player will need to get it out of the public impound (car depot) or contact PD if their vehicle got impounded
Easy to edit config and easy to add garages
Police impound (fully impound a vehicle which will cause the player not being able to get their vehicle out)
Mechanic impound (if vehicle doesn’t get stored but rather left alone on the streets, vehicle will be automatically transfered to the impound)
Other players can park your car
Commands for PD and Mechanics for impounding vehicles
COMMANDS
Police: /policeimpound -> Places vehicle in an impound they can’t access (which means player cannot use vehicle until Police gets it out in their impound). If a vehicle got impounded by Police, player will see this in the vehicle menu where they initially stored their vehicle. To get it back, they’ll need to contact PD to get it out of their impound.
Police and mechanics: /impound PRICE -> Places vehicle in a public impound which players can access. PD and mechanics can set a price which the player will need to pay to get their vehicle out.
VIDEO
Since my FiveM is having some issues, I’ll create a video when it works again lmao
Nice, i got very similar, but more advanced (cars in garage visible for all, paid transport between garages, garage spot limits, pagination, etc) own garage system.
I think you forget to mention that people should define default garage, or implement default garage selection into vehicleshop, because it can happen that someone buys a car and dont store it.
Default garage is set up through a default column value in the database. If you don’t park your car, its ment to go to the public impound. Players will always need to park them.
You’re missing the ‘type’ varchar(50) column which should have a default value set to ‘car’.
Also pushed an update temporary deleting the checkPlate callback since I didn’t test that one and its giving errors. I’ll fix that when I’m back at my PC.