ZeroDream Parking
A car parking script for FiveM | Standalone | Custom framework support
Preview Video
Features
- Stored the cars like the real life, your cars will not disappear when you are offline.
- When you are outside the car, you can press key to save/drive it.
- Store vehicle damage (Windows, tires, doors, deformations).
- On global parking mode, you can park your car anywhere.
- Require parking fees for player, also player not need to pay if they have parking card.
- Blacklist for vehicles model support, separately set in each parking.
- Custom key binds support, player can define the key binds themselves.
- Standalone script, it can run without any framework.
- ESX / QBCore or other custom framework support.
- Database will be import automatically, you donβt need to import it yourself.
- Optimized performance (0.01ms in common, 0.05ms when close to vehicles).
IMPORTANT
!!! CHANGE THE KEY BINDS BEFORE YOU START IT !!!
!!! CHANGE THE KEY BINDS BEFORE YOU START IT !!!
!!! CHANGE THE KEY BINDS BEFORE YOU START IT !!!This script is using
RegisterKeyMapping
, when you run the script, the key bindings are sent to the clients, you cannot modify them again by changing the configuration, every player needs to change it in pause menu by themselves.
Requirements
- mysql-async (or oxmysql)
- esx_vehicleshop (optional)
Download & Installation
Manually
- Download Zip File
- Unzip the archive and rename the folder to
zerodream_parking
- Put it in your
resources
folder
Using Git
GitHub Repo: GitHub - kasuganosoras/zerodream_parking: π A car parking script for FiveM
git clone https://github.com/kasuganosoras/zerodream_parking
Installation
- Add
ensure zerodream_parking
to yourserver.cfg
. - Restart your server, the script will create the database table automatically.
- Restart your server again to take effect.
Commands
name | args | description |
---|---|---|
/impound | <plate> |
Impound a car and remove it from the parking |
/findveh | <plate> |
Find a car by plate number |
Custom API
All the code related to the framework or balance system is in the client/api.lua and server/api.lua file, you can modify it to fit your needs.
By default, I have added the ESX support, you can enable it by change the framework type in config.lua
to esx
.
You can visit the documents to learn more: GitHub Wiki
Configuration
Here is an example configuration file
Config = {
-- Debug mode
debug = false,
-- Locale (en / zh / es)
locale = 'en',
-- Which framework you are using, can be 'standalone', 'esx', 'esx1.9' or 'qbcore'
framework = 'standalone',
-- Require stop the engine before parking car?
stopEngine = true,
-- Allow park not owned vehicles?
notOwnedCar = true,
-- Locked car for everyone (included owner)?
lockedCar = true,
-- Parking card item name
parkingCard = 'parkingcard',
-- Command settings, use false to disable (Only can disable engine control / find vehicle)
commands = {
-- Control engine command
engineControl = 'enginecontrol',
-- Park vehicle command
parkingVehicle = 'parkingvehicle',
-- Find the vehicle command
findVehicle = 'findveh',
},
-- Default key binding, use false to disable, player can change key binding in pause menu > settings > key binding > FiveM
keyBinding = {
-- Turn on/off engine
engineControl = 'G',
-- Park vehicle
parkingVehicle = 'L',
},
-- Impound settings
impound = {
command = 'impound',
job = { 'police', 'admin' },
},
-- Parking setting
parking = {
-- Parking id, should be unique, DO NOT USE 'global' AS PARKING ID
['parking_1'] = {
-- Parking name
name = 'Parking 1',
-- Parking position
pos = vec3(-320.1, -921.38, 30.0),
-- The parking size
size = 50.0,
-- Max cars can be parked in this parking
maxCars = 10,
-- Allow vehicle class, can be find here: https://docs.fivem.net/natives/?_0x29439776AAA00A62 (use -1 means all, use , to separate multiple types)
allowTypes = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, -- if you want to allow all class, change to { -1 },
-- Parking fee per day in real life time
parkingFee = 1000,
-- Display notification?
notify = true,
-- White list, can be identifier, ip and job name, player will not need to pay parking fee if they are in the whitelist
whitelist = {
'identifier.steam:110000131d62281',
'ip.127.0.0.1',
'job.admin',
},
-- Black list of vehicle model
blacklist = {
'adder',
'banshee',
},
},
},
-- Global parking
globalParking = {
-- if true, player can park their vehicle in any where
enable = true,
-- Max cars can be parked on the map
maxCars = 100,
-- Allow vehicle class, can be find here: https://docs.fivem.net/natives/?_0x29439776AAA00A62 (use -1 means all, use , to separate multiple types)
allowTypes = { -1 }, -- if you want to allow all class, change to { -1 },
-- Render distance
distance = 50.0,
-- Parking fee per day in real life time
parkingFee = 1000,
-- white list, can be identifier, ip and job name, player will not need to pay parking fee if they are in the whitelist
whitelist = {
'identifier.steam:110000131d62281',
'ip.127.0.0.1',
'job.admin',
},
-- Black list of vehicle model
blacklist = {
'adder',
'banshee',
},
}
}
Changelog
Click to view the changelog
1.0.3
- Fixed ESX Multi-character cannot get identifier when player join game issue.
- Fixed the space char in vehicle plate will cause the server cannot find the vehicle issue.
- Fixed MySQL table creation issue.
- Added locking car for everyone option.
- Added impound command for console support.
- Added
IsParkingVehicle
andImpoundVehicle
exports for client scripts. - Added
ImpoundVehicle
export for server scripts. - Default global parking allow vehicle types change to
-1
.
1.0.2
- Added ESX 1.9 support
- Added QBCore support
- Added oxmysql support
- Bugs fix
1.0.1
- Bugs fix
- Added new API features
- Added deformation save
- Added bulletproof tires save
- Added broken windows save
- Added burst tires save
1.0.0
- First release of this script
- Base parking API support
- Added ESX support
Enjoy!
Happy new year to everyone!