[PAID] [QB|ESX] mgil_realparking

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

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:

Config:

Config.cfg
----------------------------------------------------------------------
----------------------------------------------------------------------
-------------------------General configuration------------------------
----------------------------------------------------------------------
----------------------------------------------------------------------

Config = {}

-- Debug levels (It is recommended to use the "error" level): none|error|info|debug
Config.debug = 'error'

--
Config.framework = 'esx' -- 'esx'|'qb'

--Set to true to use ox_target
Config.target = false

--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
    }
}

----------------------------------------------------------------------
----------------------------------------------------------------------
---------------------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

--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 recover lost vehicles (Vehicles that are not saved in any parking and are not spawned).
Config.recoverLostVehicles = 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
        }
    }
}

Changelog:

2.1.0:

· Added qb support
· The possibility for the police to choose where the vehicle is seized has been added
· Minor fixes have been made

2.1.1:

· Minor bug fixes

2.1.2:

· Now you can impound the vehicle from outside it with the command
· Minor bug fixes

2.1.3:

· Added a function to check if a vehicle exists before respawning it

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 :smile:. At no additional cost, obviously).

Code is accessible No
Subscription-based No
Lines (approximately) +2000
Requirements oxmysql, ox_lib, es_extended or (qb-core and qb-vehiclekeys) and OneSync Infinity
Support Yes

Requirements:

*optional

In closing, thanks for reading the release and I appreciate any suggestions or ideas to add to the script

Why not use a keybind to park the car?

I have the same, and using a keybind for it, i really love it.

To park the vehicles the /park (Configurable) command is used, and if you are in a parking, you can also park using a keybind. As you can see in the first video on the right.

Perhaps an idea if the people lost there cars on the island,a place where they can retrieve there car on the map for a small amount of money. ( blips on the map) Great work my friend!

1 Like

I really want to buy it right now
The degree of damage to the vehicle and the inability to store the amount of fuel
I hesitate

The damage level is saved, tomorrow I can upload a video showing it. The fuel level is also saved if you use ox_fuel, I plan to add compatibility with other fuel scripts.

For all of you who are interested in the QB version, this week I will release the update that allows you to use the script with QB, I am already doing the last tests.

mgil_realparking is now available in qb!! :tada:

1 Like

If the driver parks with a passenger in the car, what happens to the passenger? Also, when you tune your car and park it, the tuning level is also saved?

The passenger would remain in the vehicle. When parking the vehicle, all its current state is saved, its tune level included (Here you can see all the properties that are saved, these are the properties that are saved by default in esx and qbcore, but with some extras.)

I’ve never seen such a well-functioning, error-free parking system, I bought it in less than 10 minutes and it’s one of the best scripts I’ve ever bought, highly recommend! everything is perfect

<3

1 Like