local objects = 
{
	--Maxime
	createObject(14876,2031.6992200,-2030.0996100,39.1000000,0.0000000,0.0000000,0.0000000,34), --object(michelle-garage,34), (2,34),
	createObject(14407,2032.0999800,-2023.6999500,34.8000000,0.0000000,0.0000000,90.0000000,34), --object(carter-stairs01,34), (2,34),
	createObject(16096,2036.6999500,-2023.0999800,36.3000000,0.0000000,0.0000000,0.0000000,34), --object(des_a51guardbox04,34), (1,34),
	createObject(17951,2029.1999500,-2037.6999500,35.7000000,0.0000000,0.2500000,89.7500000,34), --object(cjgaragedoor,34), (1,34),
	createObject(14384,2034.4000200,-2034.1999500,39.7000000,0.0000000,0.0000000,180.0000000,34), --object(kitchen_bits,34), (1,34),
	createObject(7191,2008.2998000,-2029.5996100,40.2000000,0.0000000,0.0000000,270.0000000,34), --object(vegasnnewfence2b,34), (1,34),
	createObject(7191,2030.3994100,-2053.2998000,40.0000000,0.0000000,0.0000000,0.0000000,34), --object(vegasnnewfence2b,34), (2,34),
	createObject(7191,2030.4000200,-2051.6999500,42.9000000,0.0000000,0.0000000,0.0000000,34), --object(vegasnnewfence2b,34), (3,34),
	createObject(1502,2026.3000500,-2025.5999800,34.0000000,0.0000000,0.0000000,0.0000000,34), --object(gen_doorint04,34), (2,34),
	createObject(1502,2030.4000200,-2031.1999500,38.4000000,0.0000000,0.0000000,90.2470000,34), --object(gen_doorint04,34), (3,34),
	createObject(1502,2035.5000000,-2025.5999800,38.2000000,0.0000000,0.0000000,0.0000000,34), --object(gen_doorint04,34), (1,34),
	createObject(1538,2028.0000000,-2037.5999800,34.0000000,0.0000000,0.0000000,180.2500000,34), --object(sl_dtdoor1,34), (1,34),
	createObject(2637,2034.5999800,-2033.9000200,38.6000000,0.0000000,0.0000000,0.0000000,34), --object(cj_pizza_table2,34), (1,34),
	createObject(2636,2036.0000000,-2033.9000200,38.8000000,0.0000000,0.0000000,0.0000000,34), --object(cj_pizza_chair,34), (1,34),
	createObject(2636,2035.0999800,-2032.9000200,38.8000000,0.0000000,0.0000000,90.7500000,34), --object(cj_pizza_chair,34), (2,34),
	createObject(2636,2034.1999500,-2032.9000200,38.8000000,0.0000000,0.0000000,88.2500000,34), --object(cj_pizza_chair,34), (3,34),
	createObject(2636,2033.1999500,-2033.9000200,38.8000000,0.0000000,0.0000000,181.2500000,34), --object(cj_pizza_chair,34), (4,34),
	createObject(2636,2035.0000000,-2034.9000200,38.8000000,0.0000000,0.0000000,269.0000000,34), --object(cj_pizza_chair,34), (5,34),
	createObject(2636,2034.0999800,-2034.9000200,38.8000000,0.0000000,0.0000000,268.0000000,34), --object(cj_pizza_chair,34), (6,34),
	createObject(1761,2034.0999800,-2029.0000000,38.2000000,0.0000000,0.0000000,177.7500000,34), --object(swank_couch_2,34), (1,34),
	createObject(1798,2029.6992200,-2029.0000000,38.1000000,2.2470000,0.0000000,90.0000000,34), --object(swank_bed_1,34), (1,34),
	createObject(2330,2026.9000200,-2027.1999500,38.1000000,0.5000000,0.0000000,1.0000000,34), --object(cj_bedroom1_w,34), (1,34),
	createObject(2296,2032.1999500,-2026.0999800,38.2000000,0.0000000,0.0000000,0.0000000,34), --object(tv_unit_1,34), (1,34),
	createObject(2528,2028.0000000,-2030.1999500,38.5000000,0.0000000,0.0000000,0.0000000,34), --object(cj_toilet3,34), (1,34),
	createObject(2522,2026.8000500,-2031.5000000,38.4000000,0.0000000,359.5000000,89.7500000,34), --object(cj_bath3,34), (2,34),
	createObject(2132,2029.8000500,-2031.8000500,38.4000000,0.0000000,0.0000000,270.5000000,34), --object(cj_kitch2_sink,34), (1,34),
	createObject(1446,2028.0999800,-2037.0000000,38.9000000,270.9020000,326.3150000,326.8180000,34), --object(dyn_f_r_wood_4,34), (1,34),
	createObject(1446,2028.0996100,-2035.5000000,38.9000000,270.7470000,179.9780000,179.7310000,34), --object(dyn_f_r_wood_4,34), (2,34),
	createObject(1446,2028.0999800,-2036.6999500,38.8000000,357.0000000,180.0000000,180.0000000,34), --object(dyn_f_r_wood_4,34), (3,34),
	createObject(1446,2028.0999800,-2037.4000200,39.6000000,274.0000000,180.0000000,180.0000000,34), --object(dyn_f_r_wood_4,34), (4,34),
	createObject(1446,2028.0999800,-2037.6999500,40.3000000,346.4970000,179.4840000,179.8770000,34), --object(dyn_f_r_wood_4,34), (5,34),
	createObject(1649,2028.1992200,-2034.6992200,40.1000000,0.0000000,0.0000000,180.2470000,34), --object(wglasssmash,34), (2,34),
	createObject(1649,2028.1999500,-2034.8000500,40.1000000,0.0000000,0.0000000,0.2470000,34), --object(wglasssmash,34), (3,34),
	createObject(1649,2028.1999500,-2036.4000200,41.8000000,88.4790000,9.4640000,350.0310000,34), --object(wglasssmash,34), (4,34),
	createObject(1649,2028.1992200,-2036.3994100,41.8000000,271.7690000,171.8720000,171.3620000,34), --object(wglasssmash,34), (5,34),
	createObject(1777,2029.4000200,-2035.1999500,39.3000000,0.0000000,0.0000000,0.0000000,34), --object(cj_cooker1,34), (1,34),
	createObject(1569,2026.3000500,-2034.6999500,38.3000000,0.0000000,0.0000000,0.0000000,34), --object(adam_v_door,34), (1,34),
	createObject(14455,2038.0996100,-2032.0996100,39.8000000,359.7470000,0.0000000,89.7470000,34), --object(gs_bookcase,34), (2,34),
	createObject(2406,2038.0000000,-2022.9000200,39.4000000,343.7500000,0.0000000,276.0000000,34), --object(cj_surf_board3,34), (1,34),
	createObject(14860,2034.8000500,-2039.9000200,40.6000000,0.0000000,0.0000000,0.0000000,34), --object(coochie-posters,34), (2,34),
	createObject(2755,2030.6999500,-2032.6999500,39.9000000,0.0000000,0.0000000,89.7500000,34), --object(dojo_wall,34), (1,34),
	createObject(1731,2030.6999500,-2030.0999800,41.2000000,0.0000000,358.0000000,178.9950000,34), --object(cj_mlight3,34), (1,34),
	createObject(1731,2030.6999500,-2030.6999500,41.2000000,0.0000000,0.0000000,178.9950000,34), --object(cj_mlight3,34), (2,34),
	createObject(18066,2030.5000000,-2032.4000200,42.8000000,0.0000000,0.0000000,90.0000000,34), --object(posterv,34), (1,34),
	createObject(2732,2032.4000200,-2029.8000500,43.3000000,0.0000000,0.0000000,0.0000000,34), --object(cj_zip_post_2,34), (1,34),
	createObject(2733,2033.6999500,-2029.8000500,43.3000000,0.0000000,0.0000000,0.0000000,34), --object(cj_zip_post_1,34), (1,34),
	createObject(2734,2035.0000000,-2029.8000500,43.3000000,0.0000000,0.0000000,359.7500000,34), --object(cj_zip_post_3,34), (1,34),
	createObject(2735,2036.3000500,-2029.8000500,43.3000000,0.0000000,0.0000000,0.0000000,34), --object(cj_zip_post_4,34), (1,34),
	createObject(10281,2030.5000000,-2026.1999500,36.6000000,1.0000000,0.0000000,0.0000000,34), --object(michsign_sfe,34), (1,34),
	createObject(1177,2025.3000500,-2025.8000500,36.0000000,1.7330000,97.8110000,99.8820000,34), --object(rbmp_lr_br2,34), (1,34),
	createObject(2964,2030.3000500,-2028.0999800,34.0000000,0.0000000,0.0000000,0.0000000,34), --object(k_pooltablesm,34), (1,34),
	createObject(2482,2033.0000000,-2031.0000000,34.0000000,0.0000000,0.0000000,271.2500000,34), --object(cj_hobby_shelf_4,34), (1,34),
	createObject(2482,2033.0000000,-2032.4000200,34.0000000,0.0000000,0.0000000,271.2470000,34), --object(cj_hobby_shelf_4,34), (2,34),
	createObject(1344,2032.5000000,-2036.5999800,34.8000000,0.0000000,0.0000000,266.0000000,34), --object(cj_dumpster2,34), (1,34),
	createObject(1656,2030.4000200,-2030.5000000,38.3000000,0.0000000,0.0000000,270.0000000,34), --object(esc_step,34), (1,34),
	createObject(1656,2030.4000200,-2030.3000500,38.3000000,0.0000000,0.0000000,269.9950000,34), --object(esc_step,34), (2,34),

}

local col = createColSphere(2027.2197265625, -2037.1748046875, 35.029685974121, 20)

local function watchChanges( )
	if getElementDimension( getLocalPlayer( ) ) > 0 and getElementDimension( getLocalPlayer( ) ) ~= getElementDimension( objects[1] ) and getElementInterior( getLocalPlayer( ) ) == getElementInterior( objects[1] ) then
		for key, value in pairs( objects ) do
			setElementDimension( value, getElementDimension( getLocalPlayer( ) ) )
		end
	elseif getElementDimension( getLocalPlayer( ) ) == 0 and getElementDimension( objects[1] ) ~= 65535 then
		for key, value in pairs( objects ) do
			setElementDimension( value, 65535 )
		end
	end
end
addEventHandler( "onClientColShapeHit", col,
	function( element )
		if element == getLocalPlayer( ) then
			addEventHandler( "onClientRender", root, watchChanges )
		end
	end
)
addEventHandler( "onClientColShapeLeave", col,
	function( element )
		if element == getLocalPlayer( ) then
			removeEventHandler( "onClientRender", root, watchChanges )
		end
	end
)

-- Put them standby for now.
for key, value in pairs( objects ) do
	setElementDimension( value, 65535 )
end


for index, object in ipairs ( objects ) do
    setElementDoubleSided ( object, true )
	if getElementModel(object) == 10281 then
		setObjectScale ( object, 0.60000002384186  )
	end
	setElementCollisionsEnabled ( object, true )
end




