mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 18:58:54 +00:00
Use vector types, digit grouping, improved threads, locale file indent
This commit is contained in:
+2
-4
@@ -31,8 +31,7 @@ ESX.RegisterServerCallback('esx_boat:buyBoat', function(source, cb, vehicleProps
|
||||
if xPlayer.getMoney() >= price then
|
||||
xPlayer.removeMoney(price)
|
||||
|
||||
MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle, type) VALUES (@owner, @plate, @vehicle, @type)',
|
||||
{
|
||||
MySQL.Async.execute('INSERT INTO owned_vehicles (owner, plate, vehicle, type) VALUES (@owner, @plate, @vehicle, @type)', {
|
||||
['@owner'] = xPlayer.identifier,
|
||||
['@plate'] = vehicleProps.plate,
|
||||
['@vehicle'] = json.encode(vehicleProps),
|
||||
@@ -81,8 +80,7 @@ ESX.RegisterServerCallback('esx_boat:getGarage', function(source, cb)
|
||||
local vehicles = {}
|
||||
|
||||
for i=1, #result, 1 do
|
||||
local vehicleProps = json.decode(result[i].vehicle)
|
||||
table.insert(vehicles, vehicleProps)
|
||||
table.insert(vehicles, result[i].vehicle)
|
||||
end
|
||||
|
||||
cb(vehicles)
|
||||
|
||||
Reference in New Issue
Block a user