Implemented plate generation from esx_migrate

This commit is contained in:
ElPumpo
2018-07-24 16:20:52 +02:00
parent 1f6cbe9d8d
commit 6a4ccf0cd7
7 changed files with 105 additions and 12 deletions
+9 -1
View File
@@ -31,7 +31,7 @@ function LoadVehicles()
for j=1, #Categories, 1 do
if Categories[j].name == vehicle.category then
vehicle.categoryLabel = Categories[j].label
break --todo confirm
break
end
end
@@ -371,6 +371,14 @@ ESX.RegisterServerCallback('esx_vehicleshop:getPlayerInventory', function (sourc
cb({ items = items })
end)
ESX.RegisterServerCallback('esx_vehicleshop:isPlateTaken', function (source, cb, plate)
MySQL.Async.fetchAll('SELECT * FROM owned_vehicles WHERE @plate = plate', {
['@plate'] = plate
}, function (result)
cb(result[1] ~= nil)
end)
end)
if Config.EnablePvCommand then
TriggerEvent('es:addGroupCommand', 'pv', 'user', function(source, args, user)
TriggerClientEvent('esx_vehicleshop:openPersonnalVehicleMenu', source)