Making cars specific job only.

How would I go about making cars specific to certain jobs, e.g police

	local TB2Insert = {}
		TB2Insert.VehicleName = "dbstdm"
		TB2Insert.CarName = "Aston Martin DBS"
		TB2Insert.CarPrice = 110000
		TB2Insert.CarRefund = 69000
		TB2Insert.IsSCar = false -- set this to ' true' if its SCar.
		TB2Insert.Description = "A nice piece of work!"

if ply:Team() == TEAM_COP then

I could use


do you want cars to only be able to be enter able as certain jobs, or only buyable as certain jobs

Only buyable as certain jobs, i.e police cars only buyable as police

[editline]15th March 2015[/editline]

allowed = Jobs_that_can_buy_it, – Optional

Thanks, I changed it slightly to match the format.

TB2Insert.AvaliableTeam = {TEAM_POLICE, TEAM_CHIEF}

oh you are not using darkrp XD that should work though