mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 18:58:54 +00:00
Removed keys table, minor improvements, final commit v1.0.0
This commit is contained in:
+5
-5
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user