local objects = 
{
	--Maxime
	createObject(16656,517.4000244,2387.6000977,437.3999939,0.0000000,0.0000000,0.0000000,43), --object(a51_rocketlab,43), (1,43),
	createObject(5422,516.4000244,2390.3000488,436.3999939,0.0000000,0.0000000,0.0000000,43), --object(laespraydoor1,43), (1,43),
	createObject(5422,516.3994141,2383.5996094,436.3999939,0.0000000,0.0000000,0.0000000,43), --object(laespraydoor1,43), (2,43),
	createObject(2433,524.4000244,2383.3999023,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(cj_ff_disp1,43), (1,43),
	createObject(2434,521.3800049,2381.5639648,434.3999939,0.0000000,0.0000000,270.0000000,43), --object(cj_ff_conter_2b,43), (1,43),
	createObject(2435,521.4000244,2382.5000000,434.3999939,0.0000000,0.0000000,270.0000000,43), --object(cj_ff_conter_2,43), (1,43),
	createObject(2362,521.5999756,2385.1999512,435.5000000,0.0000000,0.0000000,270.0000000,43), --object(cj_sweetie_tray_1,43), (1,43),
	createObject(1885,527.5000000,2380.0000000,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(shop_baskets,43), (1,43),
	createObject(1569,524.0000000,2378.8000488,434.3999939,0.0000000,0.0000000,180.0000000,43), --object(adam_v_door,43), (1,43),
	createObject(1569,521.0000000,2378.7998047,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(adam_v_door,43), (2,43),
	createObject(2435,517.9000244,2381.3999023,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ff_conter_2,43), (2,43),
	createObject(2435,517.0000000,2381.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ff_conter_2,43), (3,43),
	createObject(2435,517.0000000,2381.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ff_conter_2,43), (4,43),
	createObject(2435,517.8994141,2381.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ff_conter_2,43), (5,43),
	createObject(2435,524.4599609,2385.3000488,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(cj_ff_conter_2,43), (6,43),
	createObject(2433,521.5000000,2384.4499512,434.3999939,0.0000000,0.0000000,270.0000000,43), --object(cj_ff_disp1,43), (2,43),
	createObject(2435,518.9600220,2386.1999512,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(cj_ff_conter_2,43), (7,43),
	createObject(2435,518.9599609,2385.2998047,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(cj_ff_conter_2,43), (8,43),
	createObject(2434,518.7998047,2381.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ff_conter_2b,43), (2,43),
	createObject(2435,522.5000000,2381.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ff_conter_2,43), (9,43),
	createObject(2435,523.4000244,2381.3999023,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ff_conter_2,43), (10,43),
	createObject(2434,524.2999878,2381.3999023,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ff_conter_2b,43), (3,43),
	createObject(2435,521.4000244,2385.3999023,434.3999939,0.0000000,0.0000000,269.9945068,43), --object(cj_ff_conter_2,43), (11,43),
	createObject(2435,521.4000244,2386.3000488,434.3999939,0.0000000,0.0000000,269.9945068,43), --object(cj_ff_conter_2,43), (12,43),
	createObject(2435,518.9599609,2382.5000000,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(cj_ff_conter_2,43), (13,43),
	createObject(2433,518.8994141,2383.3994141,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(cj_ff_disp1,43), (3,43),
	createObject(2435,524.4599609,2382.5000000,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(cj_ff_conter_2,43), (14,43),
	createObject(2435,524.4599609,2386.1999512,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(cj_ff_conter_2,43), (15,43),
	createObject(1889,518.0000000,2393.0000000,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(shop_dblshlf01,43), (1,43),
	createObject(1885,527.5000000,2379.5000000,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(shop_baskets,43), (2,43),
	createObject(2362,524.0996094,2385.5996094,435.5000000,0.0000000,0.0000000,90.0000000,43), --object(cj_sweetie_tray_1,43), (2,43),
	createObject(1885,527.5000000,2380.5000000,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(shop_baskets,43), (3,43),
	createObject(1885,527.5000000,2381.0000000,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(shop_baskets,43), (4,43),
	createObject(1885,524.5000000,2387.0000000,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(shop_baskets,43), (5,43),
	createObject(1885,521.5999756,2387.1000977,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(shop_baskets,43), (6,43),
	createObject(1885,519.0000000,2387.0000000,434.3999939,0.0000000,0.0000000,90.0000000,43), --object(shop_baskets,43), (7,43),
	createObject(2362,518.6992188,2385.5996094,435.5000000,0.0000000,0.0000000,90.0000000,43), --object(cj_sweetie_tray_1,43), (3,43),
	createObject(1889,521.0000000,2393.0000000,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(shop_dblshlf01,43), (2,43),
	createObject(1888,527.4000244,2391.1000977,434.3999939,0.0000000,0.0000000,270.0000000,43), --object(shop_shelf12,43), (1,43),
	createObject(1890,524.0000000,2393.0000000,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(shop_dblshlf02,43), (1,43),
	createObject(1887,527.4000244,2388.1000977,434.3999939,0.0000000,0.0000000,270.0000000,43), --object(shop_shelf11,43), (3,43),
	createObject(1959,524.4000244,2384.5000000,435.3999939,0.0000000,0.0000000,315.0000000,43), --object(shop_till,43), (1,43),
	createObject(1959,521.3994141,2384.5000000,435.3999939,0.0000000,0.0000000,44.9945068,43), --object(shop_till,43), (2,43),
	createObject(1959,521.3994141,2384.5000000,435.3999939,0.0000000,0.0000000,44.9945068,43), --object(shop_till,43), (3,43),
	createObject(1959,518.7999878,2384.5000000,435.3999939,0.0000000,0.0000000,315.0000000,43), --object(shop_till,43), (4,43),
	createObject(1990,527.5000000,2395.6999512,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(kb_coolerlft,43), (1,43),
	createObject(1990,526.5999756,2395.6999512,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(kb_coolerlft,43), (2,43),
	createObject(2412,521.2504272,2382.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_detector,43), (1,43),
	createObject(2412,525.3200073,2382.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_detector,43), (2,43),
	createObject(2412,519.8070068,2382.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_detector,43), (3,43),
	createObject(2412,526.7600098,2382.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_detector,43), (4,43),
	createObject(2412,528.2000122,2382.3994141,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_detector,43), (5,43),
	createObject(2488,521.4000244,2386.1999512,435.6000061,0.0000000,0.0000000,270.0000000,43), --object(manhunt_toy_1,43), (1,43),
	createObject(2488,524.3994141,2386.0996094,435.6000061,0.0000000,0.0000000,90.0000000,43), --object(manhunt_toy_1,43), (2,43),
	createObject(2488,519.0996094,2386.0996094,435.6000061,0.0000000,0.0000000,90.0000000,43), --object(manhunt_toy_1,43), (3,43),
	createObject(2490,524.9000244,2386.1000977,435.1000061,0.0000000,0.0000000,90.0000000,43), --object(vice_toy_1,43), (1,43),
	createObject(2490,520.9000244,2386.5000000,435.1000061,0.0000000,0.0000000,270.0000000,43), --object(vice_toy_1,43), (2,43),
	createObject(2490,519.3994141,2386.2998047,435.1000061,0.0000000,0.0000000,90.0000000,43), --object(vice_toy_1,43), (3,43),
	createObject(2491,524.9000244,2388.7998047,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(model_stand,43), (1,43),
	createObject(2491,521.7998047,2388.7998047,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(model_stand,43), (2,43),
	createObject(2491,519.0996094,2388.7998047,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(model_stand,43), (3,43),
	createObject(2492,518.8320923,2388.3000488,435.3999939,0.0000000,0.0000000,0.0000000,43), --object(manhunt_toy2_1,43), (1,43),
	createObject(2492,521.5499878,2388.3000488,435.3999939,0.0000000,0.0000000,0.0000000,43), --object(manhunt_toy2_1,43), (2,43),
	createObject(2492,524.6259766,2388.3000488,435.3999939,0.0000000,0.0000000,0.0000000,43), --object(manhunt_toy2_1,43), (3,43),
	createObject(2492,518.8699951,2388.8000488,435.3999939,0.0000000,0.0000000,180.0000000,43), --object(manhunt_toy2_1,43), (4,43),
	createObject(2492,524.6494141,2388.7998047,435.3999939,0.0000000,0.0000000,179.9945068,43), --object(manhunt_toy2_1,43), (5,43),
	createObject(2492,521.5703125,2388.7998047,435.3999939,0.0000000,0.0000000,179.9945068,43), --object(manhunt_toy2_1,43), (6,43),
	createObject(2493,524.4000244,2388.5500488,435.3999939,0.0000000,0.0000000,270.0000000,43), --object(vice_toy2_1,43), (1,43),
	createObject(2493,519.0996094,2388.5595703,435.3999939,0.0000000,0.0000000,90.0000000,43), --object(vice_toy2_1,43), (2,43),
	createObject(2493,521.7998047,2388.5498047,435.3999939,0.0000000,0.0000000,90.0000000,43), --object(vice_toy2_1,43), (3,43),
	createObject(2493,524.8994141,2388.5498047,435.3999939,0.0000000,0.0000000,90.0000000,43), --object(vice_toy2_1,43), (4,43),
	createObject(2493,521.2999878,2388.5500488,435.3999939,0.0000000,0.0000000,269.9945068,43), --object(vice_toy2_1,43), (5,43),
	createObject(2493,518.5999756,2388.5500488,435.3999939,0.0000000,0.0000000,269.9945068,43), --object(vice_toy2_1,43), (6,43),
	createObject(2507,527.7000122,2386.3999023,435.2000122,0.0000000,0.0000000,270.0000000,43), --object(model_toy_3,43), (1,43),
	createObject(2507,527.7000122,2386.0000000,435.2000122,0.0000000,0.0000000,269.9945068,43), --object(model_toy_3,43), (2,43),
	createObject(2536,517.0000000,2395.8000488,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ss_1_l,43), (1,43),
	createObject(2535,518.0000000,2395.8000488,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ss_1_m,43), (1,43),
	createObject(2539,474.2999878,2454.8999023,373.2999878,0.0000000,0.0000000,0.0000000,43), --object(cj_ss_2_m,43), (1,43),
	createObject(2539,522.5000000,2395.6999512,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ss_2_m,43), (2,43),
	createObject(2537,520.0000000,2395.8000488,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ss_1_r,43), (2,43),
	createObject(2540,521.5000000,2395.6999512,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ss_2_l,43), (2,43),
	createObject(2535,519.0000000,2395.8000488,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ss_1_m,43), (2,43),
	createObject(2539,523.5000000,2395.6999512,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ss_2_m,43), (3,43),
	createObject(2538,524.5000000,2395.6999512,434.3999939,0.0000000,0.0000000,0.0000000,43), --object(cj_ss_2_r,43), (1,43),


}

local col = createColSphere( 522.4501953125, 2379.2119140625, 435.39999389648, 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




