Fixed selling society owned vehicles too

This commit is contained in:
ElPumpo
2018-12-08 15:44:09 +01:00
parent f79f8df02e
commit 2706c28ace
+3 -1
View File
@@ -378,6 +378,7 @@ ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function (source, cb
if vehicle.plate == plate then
xPlayer.addMoney(resellPrice)
RemoveOwnedVehicle(plate)
cb(true)
else
print(('esx_vehicleshop: %s attempted to sell an vehicle with plate mismatch!'):format(xPlayer.identifier))
@@ -400,10 +401,11 @@ ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function (source, cb
local vehicle = json.decode(result[1].vehicle)
if vehicle.model == GetHashKey(model) then
if vehicle.model == model then
if vehicle.plate == plate then
xPlayer.addMoney(resellPrice)
RemoveOwnedVehicle(plate)
cb(true)
else
print(('esx_vehicleshop: %s attempted to sell an vehicle with plate mismatch!'):format(xPlayer.identifier))