mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-02 11:00:47 +00:00
Fixed vonurability
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user