[FREE] qb-rental (QBCore)

[FREE] qb-rental

A simple vehicle rental system for the QBCore Framework

[GITHUB]

qb-rental.zip (5.4 KB)

Dependencies:

Features:

  • rent vehicles and turn them back for a deposit
  • multiple rent npcs with custom vehicle list
  • server sided vehicle spawning
  • vehicle spawnslot system
  • 0ms resmon
  • language support

Installation:

  • git clone repository into your resource folder
  • add ensure qb-rental into your server.cfg

Configuration:

Config.Rentals  = {
	[1] = {
	 	id  =  "normal_01",
		pedhash  =  "a_m_y_business_03",
		title = "Normal Vehicle Rental",
		icon  =  "fas fa-box-circle-check",
		event  =  "",
		spawnpoint = vector4(x,y,z,h),
		carspawns = {
		        [1] = vector4(x,y,z,h),
		        [2] = vector4(x,y,z,h),
		        [3] = vector4(x,y,z,h),
		},
		vehiclelist  =  "vehlist01"
	},
	[2] = {
		id  =  "normal_02",
		pedhash  =  "a_m_y_business_03",
	        title = "Normal Vehicle Rental",
		icon  =  "fas fa-box-circle-check",
		event  =  "",
	        spawnpoint = vector4(x,y,z,h),
		carspawns = {
                 [1] = vector4(x,y,z,h),
	             [2] = vector4(x,y,z,h),
	             [3] = vector4(x,y,z,h),
		},
		vehiclelist  =  "vehlist01"
	}
}

Config.VehicleList  = {
	["vehlist01"] = {
		[1] = {
			name = "Car 1",
			model  =  "car1",
			price  =  1000,
			returnprice  =  200,
		},
		[2] = {
			name  =  "Car 2",
			model  =  "car2",
			price  =  550,
			returnprice  =  100,
		},
	},
	["vehlist02"] = {
		[1] = {
			name = "Car 3",
			model  =  "car3",
			price  =  1000,
			returnprice  =  200,
		},
		[2] = {
			name  =  "Car 2",
			model  =  "car2",
			price  =  550,
			returnprice  =  100,
		},
	}
}
Code is accessible Yes
Subscription-based No
Lines (approximately) 300+
Requirements qb-core, qb-target, qb-menu
Support No
3 Likes

No vehicle nearby… Any way to fix this??? Cause I’m as close with the rented vehicle as possible, lol.

Edit: Turns out I needed to change LegacyFuel with the one I’m using in my server (cdn-fuel).

Edit 2: For cars its ideal, but for sea vehicles its a pain in the *ss!!! I literally park it in front of the NPC and he still tells me there are no vehicles nearby… :face_with_symbols_over_mouth::face_with_symbols_over_mouth::face_with_symbols_over_mouth::face_with_symbols_over_mouth:

Edit 3: Okay, now I can’t return any vehicle! :roll_eyes: Guess its time to find myself another rental script then! Seeing how the creator isn’t responding, lol. Not going to wait forever!

Having the same problem as above, (No Vehicle Nearby) ruins the script altogether.