Use vector types, digit grouping, improved threads, locale file indent

This commit is contained in:
ElPumpo
2019-03-09 16:53:25 +01:00
parent 54cae91fc4
commit f4265fec52
7 changed files with 147 additions and 173 deletions
+2 -4
View File
@@ -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)