Presentation:
I present to you my first release on the forum, mgil_realparking. This mod allows vehicles to be parked physically in parkings and/or streets and is responsible for making them persistent and for them to reappear if they are deleted or if the server is restarted. It has a vehicle seizure system and also prevents vehicles from parking in the middle of the road. Everything in the most optimized way possible.
PURCHASE ON TEBEX: mgil_realparking
What sets mgil_realparking apart?
Discover the unique features that make mgil_realparking stand out from the rest:
- Road Detection System: Never worry about vehicles cluttering the streets. Our innovative road detection system prevents haphazard parking, ensuring a realistic and orderly environment.
- Persistent Vehicle Storage: Vehicles can be parked physically in designated areas or on streets, and mgil_realparking ensures their persistence. No more lost vehicles after server restarts or accidental deletions.
- Optimized Performance: Experience seamless performance with an extremely optimized script. Check out the resmon data in our showcase video to witness the efficiency firsthand.
- Configurability at Its Best: Tailor the script to your server’s needs with an extensive range of configuration options. From parking fees to prohibited zones, mgil_realparking adapts to your unique server setup.
- Dedicated Support: I take pride in offering top-notch support. As a responsive and customer-focused developer, I am committed to helping my clients promptly. Your success is my priority, and I am open to adding new features to better align mgil_realparking with your server’s vision.
Script Features:
-
Extremely optimized (See resmon in the video)
-
The vehicles are generated from the server and validated by the owner of the entity (In the rest of the clients it has no impact on performance)
-
Extremely configurable and modular
-
You can park the vehicles in the different parkings or on the street itself
-
Road detection system that prevents you from parking in the middle of the road
-
Vehicles allowed or prohibited can be configured individually for each car park
-
The parking is paid according to the time you use it
-
Police managed seizure system
-
Vehicle recovery system (Allows to recover vehicles that have disappeared, does not allow duplicating a vehicle that already exists)
-
Allows you to create zones where you cannot use /park
-
Vehicles do not disappear when restarting the server
-
If a vehicle is deleted for some reason the server will respawn it
-
Seized vehicles are kept at the nearest depot or at the one selected by the police
Showcase:
-
Using a garage + persistence demo: Watch showcase_general | Streamable
-
Parking outside a car park + demonstration of the system that prevents you from parking on the road: Watch showcase_park_everywhere | Streamable
-
Vehicle seizure: showcase_impound
-
Recovery of lost vehicles: showcase_lost_vehicle
-
Zones in which parking is prohibited (For the demonstration, the police station zone is considered as not suitable for parking, you can configure your own zones): showcase_parkEverywhereBlacklistedZones
-
Performance demonstration (In this video 10 parked vehicles are eliminated and the server regenerates them, all the vehicles belong to the client on the screen, the rest of the clients would have a much lower consumption. During normal use of the script the vehicles are not regenerated, so the usual consumption would be 0.00ms): showcase_performance
Config:
Config.cfg
----------------------------------------------------------------------
----------------------------------------------------------------------
-------------------------General configuration------------------------
----------------------------------------------------------------------
----------------------------------------------------------------------
Config = {}
-- Debug levels (It is recommended to use the "error" level): none|error|info|debug
Config.debug = 'error'
--Set the server framework
Config.framework = 'esx' -- 'esx'|'qb'
--Set the target framework. If using a custom framework, you need to set Config.enableLocalNpcForClient to true
Config.target = 'disabled' -- 'disabled'|'ox_target'|'custom'
--Set to true to be able to modify the fuel system in client/customizable.lua
Config.customFuelSystem = false
--Set to true to be able to modify notifications in server/customizable.lua
Config.customNotifications = false
--Set to true to be able to modify the text UI in client/customizable.lua
Config.customTextUI = false
--Set to true to use qb menu interface instead of the ox_lib menu
Config.useQBMenuInterface = false
--Set to true to use the advanced vehicle property saving system
Config.advancedVehiclePropertySavingSystem = true
--Establish how often the server checks that all the vehicles in the parking lots still exist, if any car has disappeared it will reload it (in milliseconds)
Config.verificationPersistenceInterval = 300000
--Config of the appearance of the blips
Config.blips = {
parkings = {
enabled = true,
sprite = 357,
scale = 0.8,
colour = 3
},
impounds = {
enabled = true,
sprite = 524,
scale = 0.8,
colour = 1
}
}
--Enable the command to find the vehicle, this command will show the location of the vehicle in a notification and will mark the position on the GPS
Config.enableFindVehicleCommand = true
--Command to find vehicles
Config.findVehicleCommand = 'findv'
----------------------------------------------------------------------
----------------------------------------------------------------------
---------------------Parkings module configuration--------------------
----------------------------------------------------------------------
----------------------------------------------------------------------
--Enable the parking module
Config.enableParkingsModule = true
--List of car parks
--[[
parkingId = {
name = 'Parking name',
coords = vec3(0.0, 0.0, 0.0),
size = vec3(0.0, 0.0, 0.0),
rotation = 0.0,
price = 0, --Parking price per hour, to make it free, set to 0.
restrictions = { --Parking restrictions (It is optional).
enabled = true, --Enable parking restrictions.
mode = 'blacklist', --Restriction mode, use 'whitelist' so that only the indicated vehicles can park, use 'blacklist' to prevent the indicated vehicles from parking (whitelist|blacklist)
bigVehicle = false, --Allow / prohibit heavy vehicles. Setting it to false will cause no restrictions to be applied on them. Setting it to true will cause them to be disallowed/allowed based on the restriction mode.
restrictionsList = {
{restrictionType = 'vehicleType', name = 'heli'}, --It allows applying restrictions by type of vehicle or by model
{restrictionType = 'vehicleType', name = 'plane'}, -- restrictionType: 'vehicleType', name: automobile|bike|boat|heli|plane|submarine|trailer|train
{restrictionType = 'vehicleModel', name = `t20`} -- restrictionType: 'vehicleModel', name: `model`
}
}
}
--]]
Config.parkings = {
central = {
name = 'Central garage',
coords = vec3(236.0, -777.0, 35.0),
size = vec3(48, 76.0, 10.0),
rotation = 340.0,
price = 7,
restrictions = {
enabled = true,
mode = 'blacklist',
bigVehicle = true,
restrictionsList = {
{restrictionType = 'vehicleType', name = 'heli'},
{restrictionType = 'vehicleType', name = 'plane'}
}
}
},
downtown = {
name = 'Downtown parking',
coords = vec3(42.0, -865.0, 31.5),
size = vec3(39.0, 50.0, 4.0),
rotation = 340.0,
price = 4
},
beach = {
name = 'Beach garage',
coords = vec3(-1192.0, -1487.0, 5.0),
size = vec3(25.0, 33.0, 4.0),
rotation = 35.0,
price = 6
},
airport1 = {
name = 'Airport garage 1',
coords = vec3(-933.7, -2646.3, 27.5),
size = vec3(49.7, 106.2, 29.5),
rotation = 330.0,
price = 4
},
pier = {
name = 'Pier garage',
coords = vec3(-1642.0, -896.0, 9.0),
size = vec3(113.0, 109.0, 5.0),
rotation = 320.0,
price = 5
}
}
----------------------------------------------------------------------
----------------------------------------------------------------------
-----------------Park everywhere module configuration-----------------
----------------------------------------------------------------------
----------------------------------------------------------------------
--Enable the park everywhere module
Config.enableParkEverywhereModule = true
Config.parkEverywhere = {
--Prevents vehicles from parking in areas that are considered roads
preventParkingInTheMiddleOfTheRoad = true,
--Defines how strict "preventParkingInTheMiddleOfTheRoad" is (low|normal|strict)
severityLevelOfPreventParkingInTheMiddleOfTheRoad = 'normal',
--Command to park vehicles
parkCommand = 'park',
--Command to unpark vehicles
unparkCommand = 'unpark'
}
--Configuration of this type of parking
Config.parkings.global = {
price = 0,
restrictions = {
enabled = false,
mode = 'blacklist',
bigVehicle = false,
restrictionsList = {}
}
}
--Areas where you can not park
Config.parkEverywhereBlacklistedZones = {
{
coords = vec3(408.0, -993.0, 30.0),
size = vec3(6.0, 34.0, 4.0),
rotation = 0.0,
}
}
----------------------------------------------------------------------
----------------------------------------------------------------------
---------------------Impouds module configuration---------------------
----------------------------------------------------------------------
----------------------------------------------------------------------
--Enable the impounds module
Config.enableImpoundsModule = true
--This option can prevent npc synchronization errors on clients
Config.enableLocalNpcForClient = true
--Police job name
Config.policeJobName = "police"
--If it is true, the police determine where the vehicles are seized, otherwise they are seized at the nearest point.
Config.impoundPlaceIsDefinedByThePolice = true
--If it is true, the recovery price of the vehicles is set by the police, otherwise it is set by the configuration of the warehouse in which the vehicle is seized
Config.impoundPriceIsDefinedByThePolice = true
--Maximum price that the police can set to recover the vehicle
Config.maxPoliceImpoundPrice = 5000
--Allows police to confiscate vehicles with ox_target or with command
Config.remotelyImpoundVehicles = true
--Command to confiscate vehicles
Config.remotelyImpoundVehiclesCommand = 'impound'
--Allow to seize the vehicle with the command without being inside it
Config.impoundVehicleFromOutsideOfIt = true
--Allow to recover lost vehicles (Vehicles that are not saved in any parking and are not spawned).
Config.recoverLostVehicles = true
--By enabling this option, it will be checked if the vehicle exists outside of a parking lot in order to recover it. If it is not activated, the vehicle can be recovered as long as it is not already parked in a parking lot.
Config.checkExistenceOfEntitiesForRecoverLostVehicles = true
Config.impounds = {
city = {
name = 'City impound',
recoveryImpoundedVehiclePrice = 110,
recoveryLostVehiclePrice = 100,
npc = {
model = -1868718465,
name = 'Franc',
coords = vec3(409.4731, -1623.1594, 29.2919),
heading = 228.8940,
radius = 2.5
},
spawnPoint = {
coords = vec3(407.1526, -1645.6893, 29.2919),
heading = 233.1965
}
},
sandy = {
name = 'Sandy shores impound',
recoveryImpoundedVehiclePrice = 100,
recoveryLostVehiclePrice = 90,
npc = {
model = -1868718465,
name = 'Sergio',
coords = vec3(1728.9913, 3707.5894, 34.1620),
heading = 17.9043,
radius = 2.5
},
spawnPoint = {
coords = vec3(1723.5222, 3721.5168, 34.0902),
heading = 23.5586
}
},
paleto = {
name = 'Paleto bay impound',
recoveryImpoundedVehiclePrice = 110,
recoveryLostVehiclePrice = 95,
npc = {
model = -1868718465,
name = 'Joel',
coords = vec3(-215.3242, 6218.8887, 31.4916),
heading = 228.1174,
radius = 2.5
},
spawnPoint = {
coords = vec3(-206.2535, 6210.9160, 31.4895),
heading = 219.1927
}
}
}
Latest updates:
Latest updates
Version 2.1.26 (18-06-2024)
- Minor translation fixes
Version 2.1.25 (16-06-2024)
- The vehicle status saving system has been improved (The status of the windows, headlights, doors and deformations is now saved)
Version 2.1.24 (16-06-2024)
- Minor fixes
Version 2.1.23 (16-06-2024)
- Added the ability to configure the gasoline script that is used
Version 2.1.22 (16-04-2024)
- Added boat parking support. Now the boats stay correctly in their fixed position without errors (They only move in the y axis through the waves).
Version 2.1.21 (01-04-2024)
- Added support for qb-menu
Version 2.1.20 (27-03-2024)
- Added the ability to integrate scripts similar to ox_target.
Version 2.1.19 (26-03-2024)
- Added the ability to customize the “press x key to perform an action” indicator.
Version 2.1.18 (30-01-2024)
- Minor changes.
Version 2.1.17 (13-01-2024)
- Improved the way to check that the vehicle hash does not change.
Will the script continue to receive updates?:
I plan to continue with its development and continue to implement improvements and new features, especially if I see that it receives support (I already have a good list of things to add . At no additional cost, obviously).
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | +3000 |
Requirements | oxmysql, ox_lib, es_extended or (qb-core and qb-vehiclekeys) and OneSync Infinity |
Support | Yes |
Requirements:
- OneSync
- oxmysql
- ox_lib
- es_extended or (qb-core, qb-vehiclekeys and qb-phone*)
- ox_target*
*optional
In closing, thanks for reading the release and I appreciate any suggestions or ideas to add to the script