Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plate = vehicleProps["owner"]
- local isFound = false
- RetrievePlayerVehicles(xPlayer.identifier, function(ownedVehicles)
- for id, v in pairs(ownedVehicles) do
- if Trim(plate) == Trim(v.plate) and #Config.VehiclePositions ~= VehiclesForSale then
- MySQL.Async.execute("INSERT INTO vehicles_for_sale (seller, vehicleProps, price) VALUES (@sellerIdentifier, @vehProps, @vehPrice)",
- {
- ["@sellerIdentifier"] = xPlayer["identifier"],
- ["@vehProps"] = json.encode(vehicleProps),
- ["@vehPrice"] = price
- }
- )
- MySQL.Async.execute('DELETE FROM owned_vehicles WHERE owner = @owner', { ["@owner"] = plate})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement