Require a specific vehicle for job

Hi i am creating my own job system but need some help as i wanted to create a way were it requires you to use a specific vehicle and if you don’t have the required vehicle then you can not do the job.

I have look for natives that could do this but i have had no luck

Thanks in advanced.

Untested but something like this could do the trick.

local requiredModel = GetHashKey("buffalo")

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(1)
		ped = PlayerPedId()	
		if IsPedInAnyVehicle(ped, true) then
			currentCar = GetVehiclePedIsIn(ped, false)
			carModel = GetEntityModel(currentCar)
			if IsVehicleModel(currentCar, requiredModel)
				print("Valid car")
			else
				print("Invalid car")
			end
		end
	end

end)

Thank so much for the quick reply i am going to try and give it a go now :slightly_smiling_face: Thanks again.

I wanted to use a trailer of my own as the required vehicle for my job system. Is there a way we could get it to check vehicle (Trailer) withing a blip or radius? :slight_smile:

Anyone able to help? I would really appreciate the help :slight_smile:

Thanks in advanced

I wanted to use a trailer of my own as the required vehicle for my job system. Is there a way we could get it to check vehicle (Trailer) withing a blip or radius? :slight_smile: