[Standalone | ESX | QBCore] ZeroDream Parking | Parking your car like in real life

Every time when I start the console, I report an error. The Config has also been modified to esx1.9.

1 Like

will this replace my garage script or work with?

If the driver parks while the passenger has not exited, the passenger becomes invisible.

How do i fix this
esx1.9

1 Like

It doesn’t work for esx1.9 because of that error:


When I trying to use standalone version It says that too long value for “owner” column when saving to database.

That is because the new version of ESX is using a hash as identifier, but the old ESX is Steam ID. You can fix it easily by changing the max length of ‘owner’ column to 255.

I think i was able to fix the issue with colors not saving correctly.

I had to make the following adjustments in the client/utils.lua

local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
local paintType1, whoCaresColor1, nnn = GetVehicleModColor_1(vehicle)
local paintType2, whoCaresColor2 = GetVehicleModColor_2(vehicle)
local color3 = {}
local color4 = {}
color3[1], color3[2], color3[3] = GetVehicleCustomPrimaryColour(vehicle)
color4[1], color4[2], color4[3] = GetVehicleCustomSecondaryColour(vehicle)

– local color1, color2 = GetVehicleColours(vehicle)
– local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
– local c1r, c1g, c1b = GetVehicleCustomPrimaryColour(vehicle)
– local c2r, c2g, c2b = GetVehicleCustomSecondaryColour(vehicle)
– local customcolor1 = { r = c1r, g = c1g, b = c1b }
– local customcolor2 = { r = c2r, g = c2g, b = c2b }
– local customcolor1 = { r = c1r, g = c1g, b = c1b }
– local customcolor2 = { r = c2r, g = c2g, b = c2b }

color1 = color1,
color2 = color2,
color1 = colorPrimary,
color2 = colorSecondary,
color3 = color3,
color4 = color4,

–[[]
if props.color1 ~= nil then
local color1, color2 = GetVehicleColours(vehicle)
SetVehicleColours(vehicle, props.color1, color2, color3, color4)
end

if props.color2 ~= nil then
	local color1, color2 = GetVehicleColours(vehicle)
	SetVehicleColours(vehicle, color1, props.color2, color3, color4)
end]]

if props.color1 then SetVehicleColours(vehicle, props.color1, colorSecondary) end
if props.color2 then SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2) end
if props.color3 ~= nil then 
	ClearVehicleCustomPrimaryColour(vehicle)
	SetVehicleCustomPrimaryColour(vehicle, props.color3[1], props.color3[2], props.color3[3])
end
if props.color4 ~= nil then
	ClearVehicleCustomSecondaryColour(vehicle)
	SetVehicleCustomSecondaryColour(vehicle, props.color4[1], props.color4[2], props.color4[3])
end

basically. I had to change how the script saves and gets color.

1 Like

Hello, i have 1 problem, if i buy a car at the cardealer for example somewone can just steal my car and claim it in the parking. Can somewone help me fix this?

Which framework you’re using? sounds like the script is running in standalone mode.

I do, do i need to put it on ESX because i’m using esx.

Got an error now,

[script:zerodream_par] SCRIPT ERROR: @zerodream_parking/server/main.lua:83: attempt to index a nil value (local ‘xPlayer’)

Hello, i already had the owner colom on 255.

Still not working.
Can somewone help me?

1 Like

Hi i got a problem I cant use the comand /impund.
image

server/main.lua:83: attempt to index a nil value (local ‘xPlayer’)

RegisterServerCallback(zerodream_parking:getPlayerData’, function(source, cb)
local _source = source
if Config.framework == ‘esx’ or Config.framework == ‘esx1.9’ then
local xPlayer = _g.ESX.GetPlayerFromId(_source)
cb({ identifier = xPlayer.getIdentifier })
return
end

Did you ever find fix

RegisterServerCallback(‘zerodream_parking:getPlayerData’, function(source, cb)
local _source = source
if Config.framework == ‘esx’ then
local xPlayer = _g.ESX.GetPlayerFromId(_source)
if xPlayer ~= nil then
cb({ identifier = xPlayer.identifier })
return
end
end
cb({ identifier = GetIdentifierById(source) })
end)

Did you ever get a fix for this? I had it working at one time, but now that I reinstalled the script, it only works on standalone settings, esx bugs it out and won’t even park. I go to get the vehicle back after going back to standalone, and it says You are not the owner.

Thanks,for some reason, I had the problem of saving the custom color with the painting script with RGB mode, and with these lines changed it has been solved