Very good script . 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
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ā¦
I donāt think so, I have tried several vehicle stores and it works correctly
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
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
nice job!!
I donāt know the reason why they are not giving you the brand of vehicle
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.
- How do i open garage creation menu?
- 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