[ESX] Kuana_Garage 3.0 (make your garage system more realistic)

So alot of ppl ask me if i can solve some bugs or even update the 2.0 version. Yep its right here.

What is kuana_garage 3.0?
Its a system that saves cars where you leave them. So no markers to store your vehicle, just leave them where you want.

Why is different/new?
Now it saves the damage of the windows, doors (if you lost your door) and tires. And like i said some bugs were solved.

How can i impound cars with this garage?
You can create a local where only mechanics and polices can get in, and leave the car there. If you are a cop you have the command to despawn the car (/apre).

This work with my house garage?
Yes just make a teleport to your house garage and leave it there.

Can others player steal my car?
Yes they can, be careful.

PS:
You can spawn the car everywhere in the map. If you leave the server inside the car the position will not save. It only save if you leave the car. (to not lag the server).

Commands:
/garagem - open your garage;
/apre - to impound the vehicle - only police can do it
/procarro - to search the car owner and know where is it on the map - only police can do it
/givecarkeys - give the keys to another player
U - to lock your car.

Video: https://www.youtube.com/watch?v=cIZeFYG6BMo
Download: https://github.com/Kuanaxd/kuana_garage
To prevent cars despawn: https://github.com/Kuanaxd/2

VehicleShop - server side:

RegisterServerEvent('carshop:setVehicleOwned')
AddEventHandler('carshop:setVehicleOwned', function (vehicleProps)
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)

	MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle, x, y, z, h, health) VALUES (@owner, @plate, @vehicle, @xx, @yy, @zz, @hh, @vida)',
	{
		['@owner']   = xPlayer.identifier,
		['@plate']   = vehicleProps.plate,
		['@vehicle'] = json.encode(vehicleProps),
		["@xx"] = -245.86,
		["@yy"] = 6257.2,
		["@zz"] = 31.09,
		["@hh"] = 223.97,
		["@vida"] = 1000
	}, function (rowsChanged)
		TriggerClientEvent('esx:showNotification', _source, "O Carro com a matricula ~y~"..vehicleProps.plate.."~w~ foi lhe ~g~entregue~w~.")
	end)
end)

19 Likes

interesting

1 Like

damn :slight_smile:

1 Like

i love you

1 Like

Is there a way to modify it with public garages, to park your car?

That car despawn prevent is really nice! Tnx for sharing

1 Like

Really nice release. Btw which one is that vehicleshop script?

3 Likes

You will need alot of changes if i give my vehicle shop. So i think im not going to release that.

@Michael23 Like you can still use the eden_garage if you want but try to change the coords when you put your can in the garage.

Is it possible to make it visible after saving it? I wanted to know if a person gets out of the car and it stays there. Like I want to stop the despawn even if people go away. Cool release btw

Also it would be awesome if you save Vehicle Fuel to DB.

Not sure if I am incorrectly doing something. But, how do you say a vehicle in the garage after purchasing it? as of right now script is running no errors, sqls ran, no errors in console…but still no way to SAVE a vehicle after purchase. So when you use /garagem it just comes up as a blank list.

@afasf There is a link for that thing, under the download link.

@James_Porter So ppl have different scripts to vehicle shops, so i didnt post any code for that. But when i arrive home i will share the way i do it.

@afasf To prevent cars despawn: https://github.com/Kuanaxd/2

Vehicle Fuel? Can you add fuel saving?

@afasf Im not going to do that im sorry…

Getting this error with /garagem trying to spawn a vehicle

I was only able to spawn the first car in the menu list just if I type /garagem and click several times the ‘return’ key fast enough …

@fosti can you show me your owned_vehicles table on the database?

@fosti And if you get mysql errors try to use this version of mysql_async https://github.com/Kuanaxd/mysql-async