All pastes #957399 Raw Edit

Miscellany

public text v1 · immutable
#957399 ·published 2008-03-25 23:06 UTC
rendered paste body
			-- itt we loop and delete oldest if there's too many
			if #g_VehicleData>99 then
				local carltym=0
				local decision=nil
				for k,v in pairs(g_VehicleData) do
					if not getVehicleOccupant(k) then
						local curtime=getTickCount()
						if (curtime-g_VehicleData[k].IdleTime)>carltym then
							carltym=g_VehicleData[k].IdleTime
							decision=k
						end
					end
				end
				if decision then
					unloadVehicle(k)
				end
			end