📄Installation Guide

Do not skim the instructions. You need to follow every step of the Install Guide to make sure you're installing the script correctly

Dependencies

1. Add the script to your server resources

We highly recommend putting jim-parking in a new folder called [jim]

NOTE: IF YOU ALREADY HAVE A [jim] FOLDER PUT IT IN THAT FOLDER YOU DO NOT NEED TO CREATE A NEW ONE.

Then add ensure [jim] after your other scripts have started in your server.cfg

2. Run the vehaddon.sql

This sql file adds the parking info column to your player_vehicles database

  • Double check the config with the usage below to choose your settings

CD Garage Setup

  1. In the Config set Enable to True

cdGarage = {
	enable = false, <-- this one
	default_price = 1000,
	enableImpound = true, -- If you have disabled the use of the impound or not
	CDImpounds = {
		[1] = { value = 1, text = "Car Impound (City)" },
		[2] = { value = 2, text = "Car Impound (Sandy)" },
		[3] = { value = 3, text = "Boat Impound" },
		[4] = { value = 4, text = "Air Impound" },
	}
}
  1. Inside CD_GARAGE look for Config.ResetGarageState you will need to keep this as false

  2. Inside CD_GARAGE in the server_customise_me.lua under OTHER add this line

  3. Then in CD_GARAGE > CLIENT > FUNCTIONS.LUA change this if statement at line 500 from:

if Config.Return_Vehicle.ENABLE then
		local return_price = GetReturnVehiclePrice(model)
		return { result = result, message = L('return_vehicle')..''..return_price, return_price = return_price }
	else
		local return_price = GetReturnVehiclePrice(model)
		return { result = result, message = L('return_vehicle_disabled'), return_price = '' }
	end

to

if Config.Return_Vehicle.ENABLE then
	local p = promise.new() QBCore.Functions.TriggerCallback('cd_garage:checkParked', function(cb) p:resolve(cb) end, plate)
	if Citizen.Await(p) == 3 then
		return {result = result, message = "Vehicle is Parked Outside", return_price = '' }
	else
		local return_price = GetReturnVehiclePrice(model)
		return {result = result, message = L('return_vehicle')..''..return_price, return_price = return_price }
	end
else
	local return_price = GetReturnVehiclePrice(model)
	return {result = result, message = L('return_vehicle_disabled'), return_price = ''}
end

Impound may have trouble, don't use the /impound event because it won't work, use the built-in check vehicle menu to impound a parked vehicle

Usage

These all depend on what settings you have chosen: - These mainly make use of an updated qb-radialmenu that can make make use of the AddOption export - You can access the Park Vehicle function here and access the Parked List

  • To unpark your vehicle or check the info as a specific job role, use qb-target to look at the car.

  • The AutoCleanup event is run on server start + every time a player connects

    • This is to reduce lag of a loop constantly checking for expiration (so some cars may be lucky and stay around longer than they should)

  • 0.00ms idle time

Last updated