Fixed vonurability

This commit is contained in:
ElPumpo
2019-03-09 16:56:58 +01:00
parent f4265fec52
commit 5b5be01457
2 changed files with 2 additions and 5 deletions
-1
View File
@@ -65,7 +65,6 @@ function OpenBoatShop(shop)
local vehicle = GetVehiclePedIsIn(playerPed, false)
local props = ESX.Game.GetVehicleProperties(vehicle)
props.plate = plate
props.modelAlt = data.current.model
ESX.TriggerServerCallback('esx_boat:buyBoat', function (bought)
+2 -4
View File
@@ -18,9 +18,7 @@ end
ESX.RegisterServerCallback('esx_boat:buyBoat', function(source, cb, vehicleProps)
local xPlayer = ESX.GetPlayerFromId(source)
local price = getPriceFromModel(vehicleProps.modelAlt)
vehicleProps.modelAlt = nil
local price = getPriceFromModel(vehicleProps.model)
-- vehicle model not found
if price == 0 then
@@ -103,7 +101,7 @@ end)
function getPriceFromModel(model)
for i=1, #Config.Vehicles, 1 do
if Config.Vehicles[i].model == model then
if GetHashKey(Config.Vehicles[i].model) == model then
return Config.Vehicles[i].price
end
end