Removed keys table, minor improvements, final commit v1.0.0

This commit is contained in:
ElPumpo
2019-08-03 10:41:30 +02:00
parent 28a275a30a
commit 8bd77249d5
7 changed files with 25 additions and 68 deletions
+5 -5
View File
@@ -70,7 +70,7 @@ ESX.RegisterServerCallback('esx_boat:storeVehicle', function (source, cb, plate)
end)
ESX.RegisterServerCallback('esx_boat:getGarage', function(source, cb)
MySQL.Async.fetchAll('SELECT * FROM owned_vehicles WHERE owner = @owner AND type = @type AND `stored` = @stored', {
MySQL.Async.fetchAll('SELECT vehicle FROM owned_vehicles WHERE owner = @owner AND type = @type AND `stored` = @stored', {
['@owner'] = GetPlayerIdentifiers(source)[1],
['@type'] = 'boat',
['@stored'] = true
@@ -100,11 +100,11 @@ ESX.RegisterServerCallback('esx_boat:buyBoatLicense', function(source, cb)
end)
function getPriceFromModel(model)
for i=1, #Config.Vehicles, 1 do
if GetHashKey(Config.Vehicles[i].model) == model then
return Config.Vehicles[i].price
for k,v in ipairs(Config.Vehicles) do
if GetHashKey(v.model) == model then
return v.price
end
end
return 0
end
end