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


I am using ESX, how can I fix this error?

okay perfect thanks

Looks like your fxmanifest is broken, don’t change the resource name, keep it as zerodream_parking and try again.

The impound issue is fixed in the newest version.

PS: When you impound cars, you should enter the full plate include space.

Use:

/impound DSA 892

Not:

/impound DSA892

Hey Akkariin really awesome script. if you update this script can you make it to where he locks the vehicle when he parks, that would be awesome.

works great very very nice work bro i love you´re scripts

1 Like

The parked cars are locked for other players, only the owner can open the door.

ohhhh i see cool thanks.

The ESX code is broken when using Multichar.
On line 301 till 305

   -- Load player data
    DebugPrint('Loading player data...')
    TriggerServerCallback('zerodream_parking:getPlayerData', function(data)
        _g.identifier = data.identifier
    end)

This Script trys instantly to fetch the Player data on join. But on Multichar Server it won’t work. Becouse on the join the Player don’t have the right identifier. I think if u implement esx:onPlayerSpawn here it should work. I am currently testing it and I can do a pull reqeust if its working on my end if you want

ERROR:

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

More Information:

I’m not quite sure if its happend becouse of that error. But when a Player Joins no Cars are Spawned. They are Only Spawned for the client if I restart the Script while the Player is on the Server.(No error if I do that becouse the Script can get the right identifier)

Edit:
https://github.com/kasuganosoras/zerodream_parking/pull/1

I`m trying to start the resource but does not work
image

You should rename it to zerodream_parking, also you need to install mysql-async, and you should start this resource after the es_extended (if you are using the ESX framework), modify the startup order in your server.cfg

if you want it to show character name in server/api.lua line 24
return xPlayer.getName()

Added a Wait (15000) to the CB in server/main.lua
Should look like this(starts at line 64):
RegisterServerCallback(‘zerodream_parking:getPlayerData’, function(source, cb)
local _source = source
if Config.framework == ‘esx’ then
Wait (15000)
local xPlayer = _g.ESX.GetPlayerFromId(_source)
cb({ identifier = xPlayer.identifier })
return
end
cb({ identifier = GetIdentifierById(source) })
end)

People will have to fly in as soon as they can and not sit on the character select screen for too long or they won’t be able to park their vehicles because the error. And you don’t want it too long for it may not register their vehicle when parked the first time. Only edit time for those who have a bad ping(long distance from base server location[i.e. USA base location and a player is in Aussy]) they may take longer to load in and only increase by 2000 is my suggestion.

Can you change it that not everyone can park any vehicle

Hi.

Be careful when you publish a resource, I think it is necessary (resource releasing tos) to have a link to the repo (not a direct download link).

Visible link like that* :

Just here friendly.

King regards,
Alzhe

Great job.Such a cool scenario and accessible to everyone, you’re just a hero =).
Will oxmsql support be added? And is it possible to set up parking with garages?(for example cd_garage). so that players cannot duplicate their vehicles from the garage if it is parked on the street.

thanks for remind, I append the link to the installation.

1 Like

I didn’t use oxmysql before, but you can easily to modify it to use another MySQL libraries.

By default, it is supporting the esx_advancedgarage, when you are parking a car, the script will update the vehicle stored status to 2 in the owned_vehicles table, that can prevent players duplicate the cars.

oxmysql is 100% compatible with mysql-async if you wonder, it can replace it without any edit in the scripts

Hello, when I was suddenly offline, after going online again, I found that my car disappeared and could not be found. Is there a solution to it? I would appreciate it!
If a player buys a car but doesn’t save it in time, his car will disappear forever, this question which should be fatal for the server.