[Release][Free][ESX] esx_garaging

What

esx_garaging is a new way to store your vehicles across the map. It allows players to buy garages at different locations and with different sizes. They can then enter there garage get there vehicles out. It also allows player to return there vehicles via the laptop inside each garage.

Configuration

This resource as a very extended configuration. It makes it possible to add/remove garage types. Add/remove garage locations. And change the prices that the garages are sold for!

Performance

Idle:


In Garage:

Preview

https://streamable.com/2uipz1

Download

You can download the resource form my GitHub!

12 Likes

Is it instanced? Can others come into the garage?

Can 2 players purchase the same garage?

I ask this cause I have a server with 300+ people, they like the idea of seeing their cars like this, it gives more RP feeling, but I dont want to have 300 garages all over the map lol

2 Likes

I took a look at the code and it looks like it’s not instanced.

1 Like

No, Only the owner of the garage can see their vehicles inside. You can also not invite people.

2 Likes

Yes. Every garage can be bought for each player seperately. This means that 10 players can have the same garage and be inside it all at once. You con’t like “double” buy a garage.

I am currently using this on my own (dutch) server with around 30 players at once. I am nog experiencing and lag issues so i think you should be good with many people using it.

Hello, I wanted to ask if there is a solution for esx_kashacters that not every character has the garage

You will have to rewrite the garage saving bit. Right now it saves it on the players steam id. I think you can use the steam and character id to achieve the multi character part.

1 Like

Okey Thank you, I still have one question, why can you park vehicles even though you haven’t bought the garage?

And there is still a problem if there is a vehicle outside and the exit point is blocked, you can still park your vehicle and all cars are upside down xD

I mean I can park in all garages then the car is inside and when I go out I don’t get it anymore because I have to buy the garage now xD

Fixed the bug where you could park vehicles even if you don’t own the garage. You wil just have to download the latest version and it should be fixed!

1 Like

How could you disable it so that nobody gets 1 garage for free?

Go inside Client/Main.lua and remove the if statement inside the ‘CheckGarageOwned’ function.

1 Like

What if we wanted to park cars we don’t own? Is there a setting for this perhaps?

There is no option for this. But you can modify the code to make it not check if the vehicle is owned by the player!

1 Like

Unfortunately I did not understand what you mean, what should I change here?

function CheckGarageOwned(GarageID)
local Owned = false

if GarageID == 1 then
	Owned = true
else
	for Index, CurrentGarage in pairs(PlayerGarages) do
		if CurrentGarage.id == GarageID then
			Owned = true
		end
	end
end

return Owned

end

This should work!

function CheckGarageOwned(GarageID)
	local Owned = false

	for Index, CurrentGarage in pairs(PlayerGarages) do
		if CurrentGarage.id == GarageID then
			Owned = true
		end
	end

	return Owned
end
1 Like

When I try to put the car in the garage it says its not my car any fix for this?

Is the car owned by you? It basically uses the ‘owned_vehicles’ table inside the database provided by esx_vehicleshop.

yep vehicle is saving to the database under the owned_vehicles table