Skip to content

MaDHouSe79/mh-parking

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
July 25, 2023 12:23
March 8, 2022 13:26
March 8, 2022 13:21
November 22, 2022 16:42
January 31, 2023 14:34
November 12, 2022 00:38
July 24, 2023 02:10
March 20, 2022 09:37
May 4, 2023 10:08
February 3, 2023 15:34

Hi ๐Ÿ‘‹, I'm MaDHouSe

A passionate allround developer

mh-parking

  • An Advanced Parking System build by MaDHouSe79.

subscribe to my channel It helps the channel grow Youtube

๐Ÿ“ธ Screenshot ๐Ÿ‘Š๐Ÿ˜๐Ÿ‘

foto1 foto1 foto1 foto1 foto1 foto1 foto1 foto1 foto1 foto1 foto1

๐ŸŽฅ Video ๐Ÿ‘Š๐Ÿ˜๐Ÿ‘

Watch the video1 Watch the video1

๐Ÿ’ช Dependencies

๐Ÿ’ช Optional

๐Ÿ™ How to install and do not forget anything, or it will not work, or give many errors.

  • ๐Ÿ‘‰ Step 1: First stop your server. ๐Ÿ˜
  • ๐Ÿ‘‰ Step 2: Copy the directory mh-parking to resources/[mh]/
  • ๐Ÿ‘‰ Step 3: Add the player_parking.sql with 2 tables to your correct database.
  • ๐Ÿ‘‰ Step 4: Start your server.
  • ๐Ÿ‘‰ Step 5: Add your self or other as vip, you can use the command: /park-addvip [id]
  • ๐Ÿ‘‰ Step 6: Most important step -> Enjoy ๐Ÿ‘Š๐Ÿ˜Ž๐Ÿ‘

๐ŸŽฎ Commands

  • ๐Ÿ‘‰ Typ "/park" to park or drive your vehicle where you are at that moment. (Users and Admins)
  • ๐Ÿ‘‰ Typ "/park-names if you want to display the names ontop of the vehicle that is parked. (Users and Admins)
  • ๐Ÿ‘‰ Typ "/park-lotnames if you want to display the names of the parking lots. (Users and Admins)
  • ๐Ÿ‘‰ Typ "/park-cmenu" to create a new parking space (Admin only)
  • ๐Ÿ‘‰ Typ "/park-bmode" to go in to build mode (Admin only)
  • ๐Ÿ‘‰ Typ "/park-system" if you want to turn on or off the system. (Admin Only)
  • ๐Ÿ‘‰ Typ "/park-usevip" to turn on and of the vip system
  • ๐Ÿ‘‰ Typ "/park-addvip [id]" if you want to add a vip. (Admin Only)
  • ๐Ÿ‘‰ Typ "/park-removevip [id]" if you want to remove a vip. (Admin Only)
  • ๐Ÿ‘‰ If you want to use the F5 button, you must add it to your /binds and add on F5 the word "park"

๐Ÿ‘‰ NOTE DONT FORGET TO ADD YOUR SELF AS VIP

๐Ÿ’ฏ What i recommend for using this mod

  • ๐Ÿ‘‰ I recommend to use this mod only for vip players or for players who are most online on you server.
  • ๐Ÿ‘‰ Try not to spawn too many vehicles in world space, this can cause issues and hiccups.
  • ๐Ÿ‘‰ It is also recommended to have a good computer/server to use this mod, cause you will need it.
  • ๐Ÿ‘‰ To keep the server nice and clean for everyody, use this system only for vip players.

๐Ÿ’ฏ I tested this mod on a computer/server with the following settings

  • โœ… Prossessor: I7 12xCore
  • โœ… Memory: 16 gig memory
  • โœ… Graphics: GTX 1050 TI 4GB

Unpark trigger event (use this server side)

  • this only unpark the vehicle, it does not delete the entity from the gameworld.
  • use this trigger in qb-policejob/server/main.lua, replace it with this (around line 888)
RegisterNetEvent('police:server:Impound', function(plate, fullImpound, price, body, engine, fuel)
    local src = source
    price = price and price or 0
    if IsVehicleOwned(plate) then
        TriggerEvent('mh-parking:server:unpark', plate) -- <----- OR ADD THIS TRIGGER HERE (mh-parking)
        if not fullImpound then
            MySQL.query('UPDATE player_vehicles SET state = ?, depotprice = ?, body = ?, engine = ?, fuel = ? WHERE plate = ?', {0, price, body, engine, fuel, plate})
            TriggerClientEvent('QBCore:Notify', src, Lang:t("info.vehicle_taken_depot", {price = price}))
        else
            MySQL.query(
                'UPDATE player_vehicles SET state = ?, body = ?, engine = ?, fuel = ? WHERE plate = ?',
                {2, body, engine, fuel, plate})
            TriggerClientEvent('QBCore:Notify', src, Lang:t("info.vehicle_seized"))
        end
    end
end)

Optional qb-garages integration, this part is also for the phone app

  • you need to find this in your qb-garages server and client file
if v.state == 0 then
    v.state = Lang:t("status.out")
elseif v.state == 1 then
    v.state = Lang:t("status.garaged")
elseif v.state == 2 then
    v.state = Lang:t("status.impound")
end

Example qb-garages integration, this part is also for the phone app

  • you need to add a state 3
if v.state == 0 then
    v.state = Lang:t("status.out")
elseif v.state == 1 then
    v.state = Lang:t("status.garaged")
elseif v.state == 2 then
    v.state = Lang:t("status.impound")
elseif v.state == 3 then                 -- <--- ADD HERE
    v.state = "Parked outside"
end
  • if you get this error
  • script:qb-core] SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:741: SCRIPT ERROR: @qb-phone/server/main.lua:233: attempt to index a nil value (field 'Garages')

Check the config file from qb-phone

  • check if you have this
Config.Garages = Garages

๐Ÿ‘‡ To keep things nice and clean for the qb-core system and database.

  • โœ… Go to resources[qb]/qb-core/server/player.lua around line 506, and find, local playertables = {}.
  • โœ… This is, if we want to delete a character, we also want to delete the parked vehicles in the database,
  • โœ… Place the line below at the bottom in playertables (there are more insite), so place this one at the bottom.
{ table = 'player_parking' },
{ table = 'player_parking_vips' },

Contributers

๐Ÿž Any bugs issues or suggestions, let my know. ๐Ÿ‘Š๐Ÿ˜Ž

๐Ÿ™ˆ Youtube & Discord

LICENSE

GPL LICENSE
ยฉ MaDHouSe79

About

QBCore Advanced Parking System Created by MaDHouSe79

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •