Fixed #3, fixed exploit storing boat when not in driver seat, fixed storing boat not owned

- Async task for buying boats aswell
This commit is contained in:
ElPumpo
2018-08-05 13:17:12 +02:00
parent 2568a3755f
commit fa81033557
4 changed files with 15 additions and 12 deletions
+3 -4
View File
@@ -39,9 +39,9 @@ ESX.RegisterServerCallback('esx_boat:buyBoat', function (source, cb, vehicleProp
['@plate'] = vehicleProps.plate,
['@vehicle'] = json.encode(vehicleProps),
['@vehicleType'] = 'boat'
})
cb(true)
}, function (rowsChanged)
cb(true)
end)
else
cb(false)
end
@@ -73,7 +73,6 @@ 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 vehicleType = @vehicleType AND stored = @stored',
{
['@owner'] = GetPlayerIdentifiers(source)[1],