mGarage - Garages, Impound and more [UPDATE 24/02/2025]

Very good script :slight_smile: . I have a question, could you add grade option if vehicle have job? For example:
job = ā€˜police’
grade = ā€˜3’

That’s already fixed, update your garage :slight_smile:

Can’t get TriggerEvent(ā€˜mVehicle:OnBuyVehicle’ trigger to work on my vehicleshop any possibility you could help me? I use lsrp_vehicleshop GitHub - mikigoalie/lsrp_vehicleshop

Can you ad d qbcore compatibility please!

I have a question because I’m using the regular esx_vehicleshop from esxlegacy I changed the line of code in server to what you provided and when I put a vehicle in the garage and then take it out my vehicle keys don’t work I have to add something to the vehicleshop or is it a bug?

the garage is only for ESX at the moment…

1 Like

I don’t think so, I have tried several vehicle stores and it works correctly


not working :smiling_face_with_tear:

I couldn’t find any brand for the vehicle.

Is it an ADDON vehicle?

So I probably haven’t added something to the server yet because I only added this line of code:

ESX.RegisterServerCallback(ā€˜esx_vehicleshop:buyVehicle’, function(source, cb, model, plate)
local xPlayer = ESX.GetPlayerFromId(source)
local modelPrice = getVehicleFromModel(model).price

if modelPrice and xPlayer.getMoney() >= modelPrice then
	xPlayer.removeMoney(modelPrice, "Vehicle Purchase")

	MySQL.insert('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (?, ?, ?)',
		{ xPlayer.identifier, plate, json.encode({ model = joaat(model), plate = plate })
		}, function(rowsChanged)
			xPlayer.showNotification(TranslateCap('vehicle_belongs', plate))
			ESX.OneSync.SpawnVehicle(joaat(model), Config.Zones.ShopOutside.Pos, Config.Zones.ShopOutside.Heading,
				{ plate = plate }, function(netId)
					Wait(100)
					local entity = NetworkGetEntityFromNetworkId(netId)

					Wait(300)
					TaskWarpPedIntoVehicle(GetPlayerPed(source), entity, -1)

– TRIGER EVENT HERE
TriggerEvent(ā€˜mVehicle:OnBuyVehicle’, source, entity)
end)
cb(true)
end)
else
cb(false)
end
end)

well and also after buying a car it doesn’t add my keys I mean it kind of does but the item itself because when I mouse over the keys it doesn’t write in the description plate

download mVehicle again :clap:t2:

Okay I think I found out the culprit because what I meant in general is that when I set the keys to work only under the item they didn’t work, when it comes to buying a car I gave the wrong export to the keys and the culprit is the garage because when I park the car and take it out again the keys under the item don’t work the keys themselves work but when I take the vehicle out of the garage they don’t work, the item adds everything but when I click bind to close the vehicle it’s like it doesn’t find the vehicle at all

T20 is GTA Car

this is fire :fire: :fire: :fire: nice job!!

1 Like

I don’t know the reason why they are not giving you the brand of vehicle :confused:

Garage menu not shown when i press e nothing happen, note that I stored my car
why this happen

I don’t know why you get that error, is the vehicle an ADDON?

Hello, I have 2 questions.

  1. How do i open garage creation menu?
  2. Is there any option to gift any vehicle into garage, for example if you do some task you will get new vehicle into your garage? - i mean export.

1 . command /mgarage
2. In the documentation you have several functions to do what you want