[Dev] Doomsday/Smugglers Run Interiors/Props/IPLs/Teleport

Since people were asking here are some Coordinates/Interior Props for Doomsday and Smugglers Run stuff. I am not making a script to teleport or generate this stuff. It’s up to yourself or someone else to make the script.

Interior Locations (Good for teleporting)

-- Avon Hertz Chiliad Bunker -- X, Y, Z, H
1259.5418701172, 4812.1196289062, -39.77448272705, 344.82873535156

-- Doomsday Facility -- X, Y, Z, H
483.2006225586, 4810.5405273438, -58.919288635254, 18.04705619812

-- IAA Facility -- X, Y, Z, H
2151.1369628906, 2921.3303222656, -61.901874542236, 85.827827453614

-- IAA Server Bank -- X, Y, Z, H
2158.1184082032, 2920.9382324218, -81.075386047364, 270.48007202148

-- Doomsday Submarine -- X, Y, Z, H
514.29266357422, 4885.8706054688, -62.589862823486, 180.25909423828

-- Smugglers Run Hangar -- X, Y, Z, H
-1266.9995117188, -3014.6135253906, -49.517987060546, 359.93737792968

Doomsday Facility Interior Props (These are set to a particular paint job and colour scheme, Not sure what the others are)

	interiorID = GetInteriorAtCoords(483.2, 4810.5, -58.9)
	
	if IsValidInterior(interiorID) then
		EnableInteriorProp(interiorID, "set_int_02_decal_01")
		EnableInteriorProp(interiorID, "set_int_02_lounge1")
		EnableInteriorProp(interiorID, "set_int_02_cannon")
		EnableInteriorProp(interiorID, "set_int_02_clutter1")
		EnableInteriorProp(interiorID, "set_int_02_crewemblem")	
		EnableInteriorProp(interiorID, "set_int_02_shell")
		EnableInteriorProp(interiorID, "set_int_02_security")
		EnableInteriorProp(interiorID, "set_int_02_sleep")
		EnableInteriorProp(interiorID, "set_int_02_trophy1")
		EnableInteriorProp(interiorID, "set_int_02_paramedic_complete")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_paramedic")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_serverfarm")
		SetInteriorPropColor(interiorID, "set_int_02_decal_01", 1)
		SetInteriorPropColor(interiorID, "set_int_02_lounge1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_cannon", 1)
		SetInteriorPropColor(interiorID, "set_int_02_clutter1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_shell", 1)
		SetInteriorPropColor(interiorID, "set_int_02_security", 1)
		SetInteriorPropColor(interiorID, "set_int_02_sleep", 1)
		SetInteriorPropColor(interiorID, "set_int_02_trophy1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_paramedic_complete", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_paramedic", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_serverfarm", 1)
		RefreshInterior(interiorID)
	end	

Smugglers Run Hangar Interior Props (These are set to a particular paint job and colour scheme, Not sure what the others are)

	interiorID = GetInteriorAtCoords(-1266.0, -3014.0, -47.0)
	
	if IsValidInterior(interiorID) then
		EnableInteriorProp(interiorID, "set_lighting_hangar_a")
		EnableInteriorProp(interiorID, "set_tint_shell")
		EnableInteriorProp(interiorID, "set_bedroom_tint")
		EnableInteriorProp(interiorID, "set_crane_tint")
		EnableInteriorProp(interiorID, "set_modarea")
		EnableInteriorProp(interiorID, "set_lighting_tint_props")
		EnableInteriorProp(interiorID, "set_floor_1")
		EnableInteriorProp(interiorID, "set_floor_decal_1")
		EnableInteriorProp(interiorID, "set_bedroom_modern")
		EnableInteriorProp(interiorID, "set_office_modern")
		EnableInteriorProp(interiorID, "set_bedroom_blinds_open")
		EnableInteriorProp(interiorID, "set_lighting_wall_tint01")
		SetInteriorPropColor(interiorID, "set_tint_shell", 1)
		SetInteriorPropColor(interiorID, "set_bedroom_tint", 1)
		SetInteriorPropColor(interiorID, "set_crane_tint", 1)
		SetInteriorPropColor(interiorID, "set_modarea", 1)
		SetInteriorPropColor(interiorID, "set_lighting_tint_props", 1)
		SetInteriorPropColor(interiorID, "set_floor_decal_1", 1)
		RefreshInterior(interiorID)
	end

IPL’s to Load (You need these for anything to work)

		RequestIpl("sm_smugdlc_interior_placement")
		RequestIpl("sm_smugdlc_interior_placement_interior_0_smugdlc_int_01_milo_")
		RequestIpl("xm_x17dlc_int_placement")
		RequestIpl("xm_x17dlc_int_placement_interior_0_x17dlc_int_base_ent_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_10_x17dlc_int_tun_straight_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_11_x17dlc_int_tun_slope_flat_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_12_x17dlc_int_tun_flat_slope_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_13_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_14_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_15_x17dlc_int_tun_straight_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_16_x17dlc_int_tun_straight_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_17_x17dlc_int_tun_slope_flat_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_18_x17dlc_int_tun_slope_flat_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_19_x17dlc_int_tun_flat_slope_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_1_x17dlc_int_base_loop_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_20_x17dlc_int_tun_flat_slope_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_21_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_22_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_23_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_24_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_25_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_26_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_27_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_28_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_29_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_2_x17dlc_int_bse_tun_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_30_v_apart_midspaz_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_31_v_studio_lo_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_32_v_garagem_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_33_x17dlc_int_02_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_34_x17dlc_int_lab_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_35_x17dlc_int_tun_entry_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_3_x17dlc_int_base_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_4_x17dlc_int_facility_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_5_x17dlc_int_facility2_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_6_x17dlc_int_silo_01_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_7_x17dlc_int_silo_02_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_8_x17dlc_int_sub_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_9_x17dlc_int_01_milo_")
		RequestIpl("xm_x17dlc_int_placement_strm_0")
		RequestIpl("xm_bunkerentrance_door")
		RequestIpl("xm_hatch_01_cutscene")
		RequestIpl("xm_hatch_02_cutscene")
		RequestIpl("xm_hatch_03_cutscene")
		RequestIpl("xm_hatch_04_cutscene")
		RequestIpl("xm_hatch_06_cutscene")
		RequestIpl("xm_hatch_07_cutscene")
		RequestIpl("xm_hatch_08_cutscene")
		RequestIpl("xm_hatch_09_cutscene")
		RequestIpl("xm_hatch_10_cutscene")
		RequestIpl("xm_hatch_closed")
		RequestIpl("xm_hatches_terrain")
		RequestIpl("xm_hatches_terrain_lod")
		RequestIpl("xm_mpchristmasadditions")
		RequestIpl("xm_siloentranceclosed_x17")

Here. A client lua file that will generate markers at each Doomsday location and teleport the player inside. If it’s the Facility they can drive a vehicle in. I said I wouldn’t do it. But I’m sick of seeing people begging.

local xnmark = xnmark or {}
local distance = 50.5999

xnmark.locations = {
	["Doomsday Finale"] = {
		["markin"] = {-360.8825378418, 4826.5556640625, 143.14414978028},
		["markout"] = {1256.2868652344, 4798.3833007812, -39.471000671386},
		["locin"] = {1259.5418701172, 4812.1196289062, -39.77448272705, 344.82873535156},
		["locout"] = {-353.65161132812, 4815.8237304688, 142.7413635254},
	},
	["Doomsday Silo"] = {
		["markin"] = {598.3062133789, 5556.9243164062, -716.76141357422}, -- Not Used
		["markout"] = {369.55322265625, 6319.6455078125, -159.92749023438},
		["locin"] = {369.46231079102, 6319.7626953125, -659.92739868164}, -- Not Used
		["locout"] = {602.27032470704, 5546.9267578125, 716.38928222656, 246.04162597656},
	},
	["Doomsday Facility"] = {
		["markin"] = {1286.9239501954, 2845.8833007812, 49.394256591796},
		["markout"] = {489.0622253418, 4785.3623046875, -58.929149627686},
		["locin"] = {483.2006225586, 4810.5405273438, -58.919288635254, 18.04705619812},
		["locout"] = {1267.4091796875, 2830.9741210938, 48.444499969482, 128.1668395996},
	},
	["IAA Facility"] = {
		["markin"] = {2049.8181152344, 2949.5847167968, 47.735733032226},
		["markout"] = {2155.0627441406, 2921.0417480468, -61.902416229248},
		["locin"] = {2151.1369628906, 2921.3303222656, -61.901874542236, 85.827827453614},
		["locout"] = {2053.8020019532, 2953.4047851562, 47.664855957032, 354.8461303711},
	},
	["IAA Server"] = {
		["markin"] = {2477.6774902344, -402.14556884766, 94.817413330078},
		["markout"] = {2154.7639160156, 2921.0678710938, -81.075424194336},
		["locin"] = {2158.1184082032, 2920.9382324218, -81.075386047364, 270.48007202148},
		["locout"] = {2482.9174804688, -405.25631713868, 93.735389709472, 318.76651000976},
	},
	["Doomsday Sub"] = {
		["markin"] = {493.83395385742, -3222.7514648438, 10.49820137024},
		["markout"] = {514.42980957032, 4888.4028320312, -62.589431762696},
		["locin"] = {514.29266357422, 4885.8706054688, -62.589862823486, 180.25909423828},
		["locout"] = {496.30267333984, -3222.6359863282, 6.0695104599, 270.0},
	},
}

function TeleportIntoInterior(locationdata, ent)
	local x,y,z,h = table.unpack(locationdata)
	DoScreenFadeOut(1000)
	while IsScreenFadingOut() do Citizen.Wait(0) end
	NetworkFadeOutEntity(GetPlayerPed(-1), true, false)
	Wait(1000)
	SetEntityCoords(GetPlayerPed(-1), x, y, z)
	SetEntityHeading(GetPlayerPed(-1), h)
	NetworkFadeInEntity(GetPlayerPed(-1), 0)
	Wait(1000)
	FreezeEntityPosition(PlayerPedId(), false)
	SetGameplayCamRelativeHeading(0.0)
	DoScreenFadeIn(1000)
	while IsScreenFadingIn() do Citizen.Wait(0)	end
end

function TeleportIntoInteriorVehicle(locationdata, ent)
	local x,y,z,h = table.unpack(locationdata)
	DoScreenFadeOut(1000)
	while IsScreenFadingOut() do Citizen.Wait(0) end
	NetworkFadeOutEntity(GetPlayerPed(-1), true, false)
	Wait(1000)
	SetEntityCoords(GetVehiclePedIsIn(PlayerPedId(), false), x, y, z)
	SetEntityHeading(GetVehiclePedIsIn(PlayerPedId(), false), h)
	NetworkFadeInEntity(GetPlayerPed(-1), 0)
	Wait(1000)
	FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), false)
	SetGameplayCamRelativeHeading(0.0)
	DoScreenFadeIn(1000)
	while IsScreenFadingIn() do Citizen.Wait(0)	end
end

function SpawnFacility()
	interiorID = GetInteriorAtCoordsWithType(345.0041, 4842.001, -59.9997, "xm_x17dlc_int_02")
	
	if IsValidInterior(interiorID) then
		EnableInteriorProp(interiorID, "set_int_02_decal_01")
		EnableInteriorProp(interiorID, "set_int_02_lounge1")
		EnableInteriorProp(interiorID, "set_int_02_cannon")
		EnableInteriorProp(interiorID, "set_int_02_clutter1")
		EnableInteriorProp(interiorID, "set_int_02_crewemblem")	
		EnableInteriorProp(interiorID, "set_int_02_shell")
		EnableInteriorProp(interiorID, "set_int_02_security")
		EnableInteriorProp(interiorID, "set_int_02_sleep")
		EnableInteriorProp(interiorID, "set_int_02_trophy1")
		EnableInteriorProp(interiorID, "set_int_02_paramedic_complete")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_paramedic")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_serverfarm")
		SetInteriorPropColor(interiorID, "set_int_02_decal_01", 1)
		SetInteriorPropColor(interiorID, "set_int_02_lounge1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_cannon", 1)
		SetInteriorPropColor(interiorID, "set_int_02_clutter1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_shell", 1)
		SetInteriorPropColor(interiorID, "set_int_02_security", 1)
		SetInteriorPropColor(interiorID, "set_int_02_sleep", 1)
		SetInteriorPropColor(interiorID, "set_int_02_trophy1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_paramedic_complete", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_paramedic", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_serverfarm", 1)
		RefreshInterior(interiorID)
	end	
end

function DespawnFacility()
	interiorID = GetInteriorAtCoordsWithType(345.0041, 4842.001, -59.9997, "xm_x17dlc_int_02")
	
	DisableInteriorProp(interiorID,  "set_int_02_decal_01")
	DisableInteriorProp(interiorID,  "set_int_02_lounge1")
	DisableInteriorProp(interiorID,  "set_int_02_cannon")
	DisableInteriorProp(interiorID,  "set_int_02_clutter1")
	DisableInteriorProp(interiorID,  "set_int_02_crewemblem")
	DisableInteriorProp(interiorID,  "set_int_02_shell")
	DisableInteriorProp(interiorID,  "set_int_02_security")
	DisableInteriorProp(interiorID,  "set_int_02_sleep")
	DisableInteriorProp(interiorID,  "set_int_02_trophy1")
	DisableInteriorProp(interiorID,  "set_int_02_paramedic_complete")
	DisableInteriorProp(interiorID,  "Set_Int_02_outfit_paramedic")
	DisableInteriorProp(interiorID,  "Set_Int_02_outfit_serverfarm")
end


Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		if not IsEntityDead(PlayerPedId(-1)) then
			for k,v in pairs(xnmark.locations) do
			
				local ix,iy,iz = table.unpack(v["markin"])
				local ox,oy,oz = table.unpack(v["markout"])
			
				if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ix, iy, iz, true) < 50.5999 then -- Outside Marker
					DrawMarker(2, ix,iy,iz, 0.0, 0.0, 0.0, 180.0, 0.0, 0.0, 0.75, 0.75, 0.75, 255, 255, 0, 100, false, true, 2, false, false, false, false)
					if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ix, iy, iz, true) < 1.0 then
						if k == "Doomsday Facility" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locin"], false)
								SpawnFacility()
							else
								FreezeEntityPosition(PlayerPedId(), true)
								SpawnFacility()
								TeleportIntoInterior(v["locin"], false)
							end
						elseif k == "Doomsday Finale" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locin"], false)
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locin"], false)
							end
						else		
							FreezeEntityPosition(PlayerPedId(), true)
							TeleportIntoInterior(v["locin"], false)
						end
					end
				end
				
				if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ox, oy, oz, true) < 50.5999 then -- Inside Marker
					DrawMarker(2, ox, oy, oz, 0.0, 0.0, 0.0, 180.0, 0.0, 0.0, 0.75, 0.75, 0.75, 255, 255, 0, 100, false, true, 2, false, false, false, false)
					if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ox, oy, oz, true) < 1.0 then
						if k == "Doomsday Facility" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locout"], false)
								DespawnFacility()
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locout"], false)
								DespawnFacility()
							end
						elseif k == "Doomsday Finale" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locout"], false)
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locout"], false)
							end
						else
							FreezeEntityPosition(PlayerPedId(), true)
							TeleportIntoInterior(v["locout"], false)
						end
					end
				end
				
			end
		end
	end
end)

I added markers at each end of the Doomsday Facility to make it easier. Because I couldn’t get the sub to load at Paleto where it normally does, the entrance for it is at the under construction sub at the Merry Weather Dock.

17 Likes

Thanks you!! Just perfect!

2 Likes

Do you know how to make it into a client.lua @Tracid_TV

Here. A client lua file that will generate markers at each Doomsday location and teleport the player inside. If it’s the Facility they can drive a vehicle in. I said I wouldn’t do it. But I’m sick of seeing people begging.

local xnmark = xnmark or {}
local distance = 50.5999

xnmark.locations = {
	["Doomsday Finale"] = {
		["markin"] = {-360.8825378418, 4826.5556640625, 143.14414978028},
		["markout"] = {1256.2868652344, 4798.3833007812, -39.471000671386},
		["locin"] = {1259.5418701172, 4812.1196289062, -39.77448272705, 344.82873535156},
		["locout"] = {-353.65161132812, 4815.8237304688, 142.7413635254},
	},
	["Doomsday Silo"] = {
		["markin"] = {598.3062133789, 5556.9243164062, -716.76141357422}, -- Not Used
		["markout"] = {369.55322265625, 6319.6455078125, -159.92749023438},
		["locin"] = {369.46231079102, 6319.7626953125, -659.92739868164}, -- Not Used
		["locout"] = {602.27032470704, 5546.9267578125, 716.38928222656, 246.04162597656},
	},
	["Doomsday Facility"] = {
		["markin"] = {1286.9239501954, 2845.8833007812, 49.394256591796},
		["markout"] = {489.0622253418, 4785.3623046875, -58.929149627686},
		["locin"] = {483.2006225586, 4810.5405273438, -58.919288635254, 18.04705619812},
		["locout"] = {1267.4091796875, 2830.9741210938, 48.444499969482, 128.1668395996},
	},
	["IAA Facility"] = {
		["markin"] = {2049.8181152344, 2949.5847167968, 47.735733032226},
		["markout"] = {2155.0627441406, 2921.0417480468, -61.902416229248},
		["locin"] = {2151.1369628906, 2921.3303222656, -61.901874542236, 85.827827453614},
		["locout"] = {2053.8020019532, 2953.4047851562, 47.664855957032, 354.8461303711},
	},
	["IAA Server"] = {
		["markin"] = {2477.6774902344, -402.14556884766, 94.817413330078},
		["markout"] = {2154.7639160156, 2921.0678710938, -81.075424194336},
		["locin"] = {2158.1184082032, 2920.9382324218, -81.075386047364, 270.48007202148},
		["locout"] = {2482.9174804688, -405.25631713868, 93.735389709472, 318.76651000976},
	},
	["Doomsday Sub"] = {
		["markin"] = {493.83395385742, -3222.7514648438, 10.49820137024},
		["markout"] = {514.42980957032, 4888.4028320312, -62.589431762696},
		["locin"] = {514.29266357422, 4885.8706054688, -62.589862823486, 180.25909423828},
		["locout"] = {496.30267333984, -3222.6359863282, 6.0695104599, 270.0},
	},
}

function TeleportIntoInterior(locationdata, ent)
	local x,y,z,h = table.unpack(locationdata)
	DoScreenFadeOut(1000)
	while IsScreenFadingOut() do Citizen.Wait(0) end
	NetworkFadeOutEntity(GetPlayerPed(-1), true, false)
	Wait(1000)
	SetEntityCoords(GetPlayerPed(-1), x, y, z)
	SetEntityHeading(GetPlayerPed(-1), h)
	NetworkFadeInEntity(GetPlayerPed(-1), 0)
	Wait(1000)
	FreezeEntityPosition(PlayerPedId(), false)
	SetGameplayCamRelativeHeading(0.0)
	DoScreenFadeIn(1000)
	while IsScreenFadingIn() do Citizen.Wait(0)	end
end

function TeleportIntoInteriorVehicle(locationdata, ent)
	local x,y,z,h = table.unpack(locationdata)
	DoScreenFadeOut(1000)
	while IsScreenFadingOut() do Citizen.Wait(0) end
	NetworkFadeOutEntity(GetPlayerPed(-1), true, false)
	Wait(1000)
	SetEntityCoords(GetVehiclePedIsIn(PlayerPedId(), false), x, y, z)
	SetEntityHeading(GetVehiclePedIsIn(PlayerPedId(), false), h)
	NetworkFadeInEntity(GetPlayerPed(-1), 0)
	Wait(1000)
	FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), false)
	SetGameplayCamRelativeHeading(0.0)
	DoScreenFadeIn(1000)
	while IsScreenFadingIn() do Citizen.Wait(0)	end
end

function SpawnFacility()
	interiorID = GetInteriorAtCoordsWithType(345.0041, 4842.001, -59.9997, "xm_x17dlc_int_02")
	
	if IsValidInterior(interiorID) then
		EnableInteriorProp(interiorID, "set_int_02_decal_01")
		EnableInteriorProp(interiorID, "set_int_02_lounge1")
		EnableInteriorProp(interiorID, "set_int_02_cannon")
		EnableInteriorProp(interiorID, "set_int_02_clutter1")
		EnableInteriorProp(interiorID, "set_int_02_crewemblem")	
		EnableInteriorProp(interiorID, "set_int_02_shell")
		EnableInteriorProp(interiorID, "set_int_02_security")
		EnableInteriorProp(interiorID, "set_int_02_sleep")
		EnableInteriorProp(interiorID, "set_int_02_trophy1")
		EnableInteriorProp(interiorID, "set_int_02_paramedic_complete")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_paramedic")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_serverfarm")
		SetInteriorPropColor(interiorID, "set_int_02_decal_01", 1)
		SetInteriorPropColor(interiorID, "set_int_02_lounge1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_cannon", 1)
		SetInteriorPropColor(interiorID, "set_int_02_clutter1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_shell", 1)
		SetInteriorPropColor(interiorID, "set_int_02_security", 1)
		SetInteriorPropColor(interiorID, "set_int_02_sleep", 1)
		SetInteriorPropColor(interiorID, "set_int_02_trophy1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_paramedic_complete", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_paramedic", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_serverfarm", 1)
		RefreshInterior(interiorID)
	end	
end

function DespawnFacility()
	interiorID = GetInteriorAtCoordsWithType(345.0041, 4842.001, -59.9997, "xm_x17dlc_int_02")
	
	DisableInteriorProp(interiorID,  "set_int_02_decal_01")
	DisableInteriorProp(interiorID,  "set_int_02_lounge1")
	DisableInteriorProp(interiorID,  "set_int_02_cannon")
	DisableInteriorProp(interiorID,  "set_int_02_clutter1")
	DisableInteriorProp(interiorID,  "set_int_02_crewemblem")
	DisableInteriorProp(interiorID,  "set_int_02_shell")
	DisableInteriorProp(interiorID,  "set_int_02_security")
	DisableInteriorProp(interiorID,  "set_int_02_sleep")
	DisableInteriorProp(interiorID,  "set_int_02_trophy1")
	DisableInteriorProp(interiorID,  "set_int_02_paramedic_complete")
	DisableInteriorProp(interiorID,  "Set_Int_02_outfit_paramedic")
	DisableInteriorProp(interiorID,  "Set_Int_02_outfit_serverfarm")
end


Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		if not IsEntityDead(PlayerPedId(-1)) then
			for k,v in pairs(xnmark.locations) do
			
				local ix,iy,iz = table.unpack(v["markin"])
				local ox,oy,oz = table.unpack(v["markout"])
			
				if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ix, iy, iz, true) < 50.5999 then -- Outside Marker
					DrawMarker(2, ix,iy,iz, 0.0, 0.0, 0.0, 180.0, 0.0, 0.0, 0.75, 0.75, 0.75, 255, 255, 0, 100, false, true, 2, false, false, false, false)
					if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ix, iy, iz, true) < 1.0 then
						if k == "Doomsday Facility" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locin"], false)
								SpawnFacility()
							else
								FreezeEntityPosition(PlayerPedId(), true)
								SpawnFacility()
								TeleportIntoInterior(v["locin"], false)
							end
						elseif k == "Doomsday Finale" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locin"], false)
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locin"], false)
							end
						else		
							FreezeEntityPosition(PlayerPedId(), true)
							TeleportIntoInterior(v["locin"], false)
						end
					end
				end
				
				if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ox, oy, oz, true) < 50.5999 then -- Inside Marker
					DrawMarker(2, ox, oy, oz, 0.0, 0.0, 0.0, 180.0, 0.0, 0.0, 0.75, 0.75, 0.75, 255, 255, 0, 100, false, true, 2, false, false, false, false)
					if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ox, oy, oz, true) < 1.0 then
						if k == "Doomsday Facility" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locout"], false)
								DespawnFacility()
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locout"], false)
								DespawnFacility()
							end
						elseif k == "Doomsday Finale" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locout"], false)
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locout"], false)
							end
						else
							FreezeEntityPosition(PlayerPedId(), true)
							TeleportIntoInterior(v["locout"], false)
						end
					end
				end
				
			end
		end
	end
end)

I added markers at each end of the Doomsday Facility to make it easier. Because I couldn’t get the sub to load at Paleto where it normally does, the entrance for it is at the under construction sub at the Merry Weather Dock.

2 Likes

@Smallo Hi, I need some help. I did a __resource.lua and then a client.lua in which I added all the text above this comment. but I do not get the teleport points, which is exactly what I have to do to make this script work? I hope help thanks in advance

There aren’t map blips if thats what you are looking for. Make sure you have the client file in the resource.lua

The markers are located at the red points. You have to be within a certain distance for them to appear.

Oh and I forgot to mark the one at the satelite dishes.

1 Like

ready thanks you :smiley: BRO

I couldnt get any of them to work using the lua provided above. Do you have any ideas?

You must be doing something wrong. Works perfectly fine on my server. Whats not showing? The markers? The Interiors?

The bunker teleports. No markers. Unless i am looking in the wrong place then they arent there on my screen.

One in the tunnel under chilliad, just like in the heist. One at the Doomsday Facility just south of the desert airfield. One at the sub in the merryweather facility at the docks, one under the satellite dishes in the desert and one at the facility to the right of the map, same as in the heist when you go to the server bank.

I posted an image up above.

I will try it and get back to you with results.

I don’t know why I’m having so many issues with getting two of these interiors to load properly.

I use zap-hosting for my server and idk if the FiveM update loads some of the new IPL’s automatically but I see the IAA interiors and the submarine with 0 issues without loading any props or IPLs, however, with the Doomsday Facility interior, Avon hertz bunker, and smugglers run hangar, even when I (think) I have clients RequestIPL for all of them, then run a client function to enable to props and refresh the interior, everything in there still remains black or unloaded with the exception of some flatscreens, the railings, etc… just floating in the abyss.

I am not using your script because I’m trying to make a function within my vRP gamemode for entering the Doomsday Facility. I’m not sure if the IPLs have to be loaded at a specific time or if the props have be enabled a certain way but It does not seem to be loading the props or IPL’s for those three buildings. I haven’t had any issues with older DLC content like the CEO offices which I can seem to load and unload those IPLs easily.

If you have any idea what I might be doing wrong I would appreciate it.

At first, thank you for what you have done, many of us will surely use it as me.

Everything is working well except the Doomsday Facility. When I go on the marker my entity is freeze like its coded but I have the following issue in console about the global variable GetInteriorAtCoordsWithType.

I’ve never used this function before, do I have to declare it or something else. Does anyone get this issue?

My client.lua

Citizen.CreateThread(function()
--		RequestIpl("sm_smugdlc_interior_placement")     --Already loaded in iplLoader
		RequestIpl("sm_smugdlc_interior_placement_interior_0_smugdlc_int_01_milo_")
		RequestIpl("xm_x17dlc_int_02")
		RequestIpl("xm_x17dlc_int_placement")
		RequestIpl("xm_x17dlc_int_placement_interior_0_x17dlc_int_base_ent_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_10_x17dlc_int_tun_straight_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_11_x17dlc_int_tun_slope_flat_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_12_x17dlc_int_tun_flat_slope_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_13_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_14_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_15_x17dlc_int_tun_straight_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_16_x17dlc_int_tun_straight_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_17_x17dlc_int_tun_slope_flat_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_18_x17dlc_int_tun_slope_flat_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_19_x17dlc_int_tun_flat_slope_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_1_x17dlc_int_base_loop_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_20_x17dlc_int_tun_flat_slope_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_21_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_22_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_23_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_24_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_25_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_26_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_27_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_28_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_29_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_2_x17dlc_int_bse_tun_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_30_v_apart_midspaz_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_31_v_studio_lo_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_32_v_garagem_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_33_x17dlc_int_02_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_34_x17dlc_int_lab_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_35_x17dlc_int_tun_entry_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_3_x17dlc_int_base_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_4_x17dlc_int_facility_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_5_x17dlc_int_facility2_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_6_x17dlc_int_silo_01_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_7_x17dlc_int_silo_02_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_8_x17dlc_int_sub_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_9_x17dlc_int_01_milo_")
		RequestIpl("xm_x17dlc_int_placement_strm_0")
		RequestIpl("xm_bunkerentrance_door")
		RequestIpl("xm_hatch_01_cutscene")
		RequestIpl("xm_hatch_02_cutscene")
		RequestIpl("xm_hatch_03_cutscene")
		RequestIpl("xm_hatch_04_cutscene")
		RequestIpl("xm_hatch_06_cutscene")
		RequestIpl("xm_hatch_07_cutscene")
		RequestIpl("xm_hatch_08_cutscene")
		RequestIpl("xm_hatch_09_cutscene")
		RequestIpl("xm_hatch_10_cutscene")
		RequestIpl("xm_hatch_closed")
		RequestIpl("xm_hatches_terrain")
		RequestIpl("xm_hatches_terrain_lod")
		RequestIpl("xm_mpchristmasadditions")
		RequestIpl("xm_siloentranceclosed_x17")

end)

local xnmark = xnmark or {}
local distance = 50.5999

xnmark.locations = {
	["Doomsday Finale"] = {
		["markin"] = {-360.8825378418, 4826.5556640625, 143.14414978028},
		["markout"] = {1256.2868652344, 4798.3833007812, -39.471000671386},
		["locin"] = {1259.5418701172, 4812.1196289062, -39.77448272705, 344.82873535156},
		["locout"] = {-353.65161132812, 4815.8237304688, 142.7413635254},
	},
	["Doomsday Silo"] = {
		["markin"] = {598.3062133789, 5556.9243164062, -716.76141357422}, -- Not Used
		["markout"] = {369.55322265625, 6319.6455078125, -159.92749023438},
		["locin"] = {369.46231079102, 6319.7626953125, -659.92739868164}, -- Not Used
		["locout"] = {602.27032470704, 5546.9267578125, 716.38928222656, 246.04162597656},
	},
	["Doomsday Facility"] = {
		["markin"] = {1286.9239501954, 2845.8833007812, 49.394256591796},
		["markout"] = {489.0622253418, 4785.3623046875, -58.929149627686},
		["locin"] = {483.2006225586, 4810.5405273438, -58.919288635254, 18.04705619812},
		["locout"] = {1267.4091796875, 2830.9741210938, 48.444499969482, 128.1668395996},
	},
	["IAA Facility"] = {
		["markin"] = {2049.8181152344, 2949.5847167968, 47.735733032226},
		["markout"] = {2155.0627441406, 2921.0417480468, -61.902416229248},
		["locin"] = {2151.1369628906, 2921.3303222656, -61.901874542236, 85.827827453614},
		["locout"] = {2053.8020019532, 2953.4047851562, 47.664855957032, 354.8461303711},
	},
	["IAA Server"] = {
		["markin"] = {2477.6774902344, -402.14556884766, 94.817413330078},
		["markout"] = {2154.7639160156, 2921.0678710938, -81.075424194336},
		["locin"] = {2158.1184082032, 2920.9382324218, -81.075386047364, 270.48007202148},
		["locout"] = {2482.9174804688, -405.25631713868, 93.735389709472, 318.76651000976},
	},
	["Doomsday Sub"] = {
		["markin"] = {493.83395385742, -3222.7514648438, 10.49820137024},
		["markout"] = {514.42980957032, 4888.4028320312, -62.589431762696},
		["locin"] = {514.29266357422, 4885.8706054688, -62.589862823486, 180.25909423828},
		["locout"] = {496.30267333984, -3222.6359863282, 6.0695104599, 270.0},
	},
}

function TeleportIntoInterior(locationdata, ent)
	local x,y,z,h = table.unpack(locationdata)
	DoScreenFadeOut(1000)
	while IsScreenFadingOut() do Citizen.Wait(0) end
	NetworkFadeOutEntity(GetPlayerPed(-1), true, false)
	Wait(1000)
	SetEntityCoords(GetPlayerPed(-1), x, y, z)
	SetEntityHeading(GetPlayerPed(-1), h)
	NetworkFadeInEntity(GetPlayerPed(-1), 0)
	Wait(1000)
	FreezeEntityPosition(PlayerPedId(), false)
	SetGameplayCamRelativeHeading(0.0)
	DoScreenFadeIn(1000)
	while IsScreenFadingIn() do Citizen.Wait(0)	end
end

function TeleportIntoInteriorVehicle(locationdata, ent)
	local x,y,z,h = table.unpack(locationdata)
	DoScreenFadeOut(1000)
	while IsScreenFadingOut() do Citizen.Wait(0) end
	NetworkFadeOutEntity(GetPlayerPed(-1), true, false)
	Wait(1000)
	SetEntityCoords(GetVehiclePedIsIn(PlayerPedId(), false), x, y, z)
	SetEntityHeading(GetVehiclePedIsIn(PlayerPedId(), false), h)
	NetworkFadeInEntity(GetPlayerPed(-1), 0)
	Wait(1000)
	FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), false)
	SetGameplayCamRelativeHeading(0.0)
	DoScreenFadeIn(1000)
	while IsScreenFadingIn() do Citizen.Wait(0)	end
end

function SpawnFacility()
	interiorID = GetInteriorAtCoordsWithType(345.0041, 4842.001, -59.9997, "xm_x17dlc_int_02")
	
	if IsValidInterior(interiorID) then
		EnableInteriorProp(interiorID, "set_int_02_decal_01")
		EnableInteriorProp(interiorID, "set_int_02_lounge1")
		EnableInteriorProp(interiorID, "set_int_02_cannon")
		EnableInteriorProp(interiorID, "set_int_02_clutter1")
		EnableInteriorProp(interiorID, "set_int_02_crewemblem")	
		EnableInteriorProp(interiorID, "set_int_02_shell")
		EnableInteriorProp(interiorID, "set_int_02_security")
		EnableInteriorProp(interiorID, "set_int_02_sleep")
		EnableInteriorProp(interiorID, "set_int_02_trophy1")
		EnableInteriorProp(interiorID, "set_int_02_paramedic_complete")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_paramedic")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_serverfarm")
		SetInteriorPropColor(interiorID, "set_int_02_decal_01", 1)
		SetInteriorPropColor(interiorID, "set_int_02_lounge1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_cannon", 1)
		SetInteriorPropColor(interiorID, "set_int_02_clutter1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_shell", 1)
		SetInteriorPropColor(interiorID, "set_int_02_security", 1)
		SetInteriorPropColor(interiorID, "set_int_02_sleep", 1)
		SetInteriorPropColor(interiorID, "set_int_02_trophy1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_paramedic_complete", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_paramedic", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_serverfarm", 1)
		RefreshInterior(interiorID)
	end	
end

function DespawnFacility()
	interiorID = GetInteriorAtCoordsWithType(345.0041, 4842.001, -59.9997, "xm_x17dlc_int_02")
	
	DisableInteriorProp(interiorID,  "set_int_02_decal_01")
	DisableInteriorProp(interiorID,  "set_int_02_lounge1")
	DisableInteriorProp(interiorID,  "set_int_02_cannon")
	DisableInteriorProp(interiorID,  "set_int_02_clutter1")
	DisableInteriorProp(interiorID,  "set_int_02_crewemblem")
	DisableInteriorProp(interiorID,  "set_int_02_shell")
	DisableInteriorProp(interiorID,  "set_int_02_security")
	DisableInteriorProp(interiorID,  "set_int_02_sleep")
	DisableInteriorProp(interiorID,  "set_int_02_trophy1")
	DisableInteriorProp(interiorID,  "set_int_02_paramedic_complete")
	DisableInteriorProp(interiorID,  "Set_Int_02_outfit_paramedic")
	DisableInteriorProp(interiorID,  "Set_Int_02_outfit_serverfarm")
end


Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		if not IsEntityDead(PlayerPedId(-1)) then
			for k,v in pairs(xnmark.locations) do
			
				local ix,iy,iz = table.unpack(v["markin"])
				local ox,oy,oz = table.unpack(v["markout"])
			
				if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ix, iy, iz, true) < 50.5999 then -- Outside Marker
					DrawMarker(2, ix,iy,iz, 0.0, 0.0, 0.0, 180.0, 0.0, 0.0, 0.75, 0.75, 0.75, 255, 255, 0, 100, false, true, 2, false, false, false, false)
					if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ix, iy, iz, true) < 1.0 then
						if k == "Doomsday Facility" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locin"], false)
								SpawnFacility()
							else
								FreezeEntityPosition(PlayerPedId(), true)
								SpawnFacility()
								TeleportIntoInterior(v["locin"], false)
							end
						elseif k == "Doomsday Finale" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locin"], false)
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locin"], false)
							end
						else		
							FreezeEntityPosition(PlayerPedId(), true)
							TeleportIntoInterior(v["locin"], false)
						end
					end
				end
				
				if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ox, oy, oz, true) < 50.5999 then -- Inside Marker
					DrawMarker(2, ox, oy, oz, 0.0, 0.0, 0.0, 180.0, 0.0, 0.0, 0.75, 0.75, 0.75, 255, 255, 0, 100, false, true, 2, false, false, false, false)
					if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ox, oy, oz, true) < 1.0 then
						if k == "Doomsday Facility" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locout"], false)
								DespawnFacility()
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locout"], false)
								DespawnFacility()
							end
						elseif k == "Doomsday Finale" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locout"], false)
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locout"], false)
							end
						else
							FreezeEntityPosition(PlayerPedId(), true)
							TeleportIntoInterior(v["locout"], false)
						end
					end
				end
				
			end
		end
	end
end)

BR

1 Like

“doomsday facility” seems to be the only location where the script freezes your character and loads the interior before teleporting you. Just swap SpawnFacility() and TeleportIntoInterior(v["locin"], false) lines in homeboys code. When you finally get in you’ll notice it fails to load the interior props. I’m pretty sure SpawnFacility() just isn’t firing and that’s why having it load before you teleport gets you hung up.

Fixes teleport but SpawnFacility() still not functioning
if k == "Doomsday Facility" then
  if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
    FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
    TeleportIntoInteriorVehicle(v["locin"], false)
    SpawnFacility()
  else
    FreezeEntityPosition(PlayerPedId(), true)
    --SpawnFacility()
    --TeleportIntoInterior(v["locin"], false)
    -- start carrucan								
    TeleportIntoInterior(v["locin"], false)
    SpawnFacility()
    -- end carrucan
  end
elseif k == "Doomsday Finale" then
  if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
	  FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
	  TeleportIntoInteriorVehicle(v["locin"], false)
  else
	  FreezeEntityPosition(PlayerPedId(), true)
	  TeleportIntoInterior(v["locin"], false)
  end
else		
    FreezeEntityPosition(PlayerPedId(), true)
    TeleportIntoInterior(v["locin"], false)
end

take out the extra space after the 3rd END statement theres 1 too many spaces causing not to close properly

--		RequestIpl("sm_smugdlc_interior_placement")     --Already loaded in iplLoader
		RequestIpl("sm_smugdlc_interior_placement_interior_0_smugdlc_int_01_milo_")
		RequestIpl("xm_x17dlc_int_02")
		RequestIpl("xm_x17dlc_int_placement")
		RequestIpl("xm_x17dlc_int_placement_interior_0_x17dlc_int_base_ent_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_10_x17dlc_int_tun_straight_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_11_x17dlc_int_tun_slope_flat_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_12_x17dlc_int_tun_flat_slope_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_13_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_14_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_15_x17dlc_int_tun_straight_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_16_x17dlc_int_tun_straight_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_17_x17dlc_int_tun_slope_flat_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_18_x17dlc_int_tun_slope_flat_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_19_x17dlc_int_tun_flat_slope_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_1_x17dlc_int_base_loop_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_20_x17dlc_int_tun_flat_slope_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_21_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_22_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_23_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_24_x17dlc_int_tun_30d_r_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_25_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_26_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_27_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_28_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_29_x17dlc_int_tun_30d_l_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_2_x17dlc_int_bse_tun_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_30_v_apart_midspaz_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_31_v_studio_lo_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_32_v_garagem_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_33_x17dlc_int_02_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_34_x17dlc_int_lab_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_35_x17dlc_int_tun_entry_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_3_x17dlc_int_base_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_4_x17dlc_int_facility_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_5_x17dlc_int_facility2_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_6_x17dlc_int_silo_01_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_7_x17dlc_int_silo_02_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_8_x17dlc_int_sub_milo_")
		RequestIpl("xm_x17dlc_int_placement_interior_9_x17dlc_int_01_milo_")
		RequestIpl("xm_x17dlc_int_placement_strm_0")
		RequestIpl("xm_bunkerentrance_door")
		RequestIpl("xm_hatch_01_cutscene")
		RequestIpl("xm_hatch_02_cutscene")
		RequestIpl("xm_hatch_03_cutscene")
		RequestIpl("xm_hatch_04_cutscene")
		RequestIpl("xm_hatch_06_cutscene")
		RequestIpl("xm_hatch_07_cutscene")
		RequestIpl("xm_hatch_08_cutscene")
		RequestIpl("xm_hatch_09_cutscene")
		RequestIpl("xm_hatch_10_cutscene")
		RequestIpl("xm_hatch_closed")
		RequestIpl("xm_hatches_terrain")
		RequestIpl("xm_hatches_terrain_lod")
		RequestIpl("xm_mpchristmasadditions")
		RequestIpl("xm_siloentranceclosed_x17")

end)

local xnmark = xnmark or {}
local distance = 50.5999

xnmark.locations = {
	["Doomsday Finale"] = {
		["markin"] = {-360.8825378418, 4826.5556640625, 143.14414978028},
		["markout"] = {1256.2868652344, 4798.3833007812, -39.471000671386},
		["locin"] = {1259.5418701172, 4812.1196289062, -39.77448272705, 344.82873535156},
		["locout"] = {-353.65161132812, 4815.8237304688, 142.7413635254},
	},
	["Doomsday Silo"] = {
		["markin"] = {598.3062133789, 5556.9243164062, -716.76141357422}, -- Not Used
		["markout"] = {369.55322265625, 6319.6455078125, -159.92749023438},
		["locin"] = {369.46231079102, 6319.7626953125, -659.92739868164}, -- Not Used
		["locout"] = {602.27032470704, 5546.9267578125, 716.38928222656, 246.04162597656},
	},
	["Doomsday Facility"] = {
		["markin"] = {1286.9239501954, 2845.8833007812, 49.394256591796},
		["markout"] = {489.0622253418, 4785.3623046875, -58.929149627686},
		["locin"] = {483.2006225586, 4810.5405273438, -58.919288635254, 18.04705619812},
		["locout"] = {1267.4091796875, 2830.9741210938, 48.444499969482, 128.1668395996},
	},
	["IAA Facility"] = {
		["markin"] = {2049.8181152344, 2949.5847167968, 47.735733032226},
		["markout"] = {2155.0627441406, 2921.0417480468, -61.902416229248},
		["locin"] = {2151.1369628906, 2921.3303222656, -61.901874542236, 85.827827453614},
		["locout"] = {2053.8020019532, 2953.4047851562, 47.664855957032, 354.8461303711},
	},
	["IAA Server"] = {
		["markin"] = {2477.6774902344, -402.14556884766, 94.817413330078},
		["markout"] = {2154.7639160156, 2921.0678710938, -81.075424194336},
		["locin"] = {2158.1184082032, 2920.9382324218, -81.075386047364, 270.48007202148},
		["locout"] = {2482.9174804688, -405.25631713868, 93.735389709472, 318.76651000976},
	},
	["Doomsday Sub"] = {
		["markin"] = {493.83395385742, -3222.7514648438, 10.49820137024},
		["markout"] = {514.42980957032, 4888.4028320312, -62.589431762696},
		["locin"] = {514.29266357422, 4885.8706054688, -62.589862823486, 180.25909423828},
		["locout"] = {496.30267333984, -3222.6359863282, 6.0695104599, 270.0},
	},
}

function TeleportIntoInterior(locationdata, ent)
	local x,y,z,h = table.unpack(locationdata)
	DoScreenFadeOut(1000)
	while IsScreenFadingOut() do Citizen.Wait(0) end
	NetworkFadeOutEntity(GetPlayerPed(-1), true, false)
	Wait(1000)
	SetEntityCoords(GetPlayerPed(-1), x, y, z)
	SetEntityHeading(GetPlayerPed(-1), h)
	NetworkFadeInEntity(GetPlayerPed(-1), 0)
	Wait(1000)
	FreezeEntityPosition(PlayerPedId(), false)
	SetGameplayCamRelativeHeading(0.0)
	DoScreenFadeIn(1000)
	while IsScreenFadingIn() do Citizen.Wait(0)	end
end

function TeleportIntoInteriorVehicle(locationdata, ent)
	local x,y,z,h = table.unpack(locationdata)
	DoScreenFadeOut(1000)
	while IsScreenFadingOut() do Citizen.Wait(0) end
	NetworkFadeOutEntity(GetPlayerPed(-1), true, false)
	Wait(1000)
	SetEntityCoords(GetVehiclePedIsIn(PlayerPedId(), false), x, y, z)
	SetEntityHeading(GetVehiclePedIsIn(PlayerPedId(), false), h)
	NetworkFadeInEntity(GetPlayerPed(-1), 0)
	Wait(1000)
	FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), false)
	SetGameplayCamRelativeHeading(0.0)
	DoScreenFadeIn(1000)
	while IsScreenFadingIn() do Citizen.Wait(0)	end
end

function SpawnFacility()
	interiorID = GetInteriorAtCoordsWithType(345.0041, 4842.001, -59.9997, "xm_x17dlc_int_02")
	
	if IsValidInterior(interiorID) then
		EnableInteriorProp(interiorID, "set_int_02_decal_01")
		EnableInteriorProp(interiorID, "set_int_02_lounge1")
		EnableInteriorProp(interiorID, "set_int_02_cannon")
		EnableInteriorProp(interiorID, "set_int_02_clutter1")
		EnableInteriorProp(interiorID, "set_int_02_crewemblem")	
		EnableInteriorProp(interiorID, "set_int_02_shell")
		EnableInteriorProp(interiorID, "set_int_02_security")
		EnableInteriorProp(interiorID, "set_int_02_sleep")
		EnableInteriorProp(interiorID, "set_int_02_trophy1")
		EnableInteriorProp(interiorID, "set_int_02_paramedic_complete")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_paramedic")
		EnableInteriorProp(interiorID, "set_Int_02_outfit_serverfarm")
		SetInteriorPropColor(interiorID, "set_int_02_decal_01", 1)
		SetInteriorPropColor(interiorID, "set_int_02_lounge1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_cannon", 1)
		SetInteriorPropColor(interiorID, "set_int_02_clutter1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_shell", 1)
		SetInteriorPropColor(interiorID, "set_int_02_security", 1)
		SetInteriorPropColor(interiorID, "set_int_02_sleep", 1)
		SetInteriorPropColor(interiorID, "set_int_02_trophy1", 1)
		SetInteriorPropColor(interiorID, "set_int_02_paramedic_complete", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_paramedic", 1)
		SetInteriorPropColor(interiorID, "set_Int_02_outfit_serverfarm", 1)
		RefreshInterior(interiorID)
	end	
end

function DespawnFacility()
	interiorID = GetInteriorAtCoordsWithType(345.0041, 4842.001, -59.9997, "xm_x17dlc_int_02")
	
	DisableInteriorProp(interiorID,  "set_int_02_decal_01")
	DisableInteriorProp(interiorID,  "set_int_02_lounge1")
	DisableInteriorProp(interiorID,  "set_int_02_cannon")
	DisableInteriorProp(interiorID,  "set_int_02_clutter1")
	DisableInteriorProp(interiorID,  "set_int_02_crewemblem")
	DisableInteriorProp(interiorID,  "set_int_02_shell")
	DisableInteriorProp(interiorID,  "set_int_02_security")
	DisableInteriorProp(interiorID,  "set_int_02_sleep")
	DisableInteriorProp(interiorID,  "set_int_02_trophy1")
	DisableInteriorProp(interiorID,  "set_int_02_paramedic_complete")
	DisableInteriorProp(interiorID,  "Set_Int_02_outfit_paramedic")
	DisableInteriorProp(interiorID,  "Set_Int_02_outfit_serverfarm")
end


Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		if not IsEntityDead(PlayerPedId(-1)) then
			for k,v in pairs(xnmark.locations) do
			
				local ix,iy,iz = table.unpack(v["markin"])
				local ox,oy,oz = table.unpack(v["markout"])
			
				if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ix, iy, iz, true) < 50.5999 then -- Outside Marker
					DrawMarker(2, ix,iy,iz, 0.0, 0.0, 0.0, 180.0, 0.0, 0.0, 0.75, 0.75, 0.75, 255, 255, 0, 100, false, true, 2, false, false, false, false)
					if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ix, iy, iz, true) < 1.0 then
						if k == "Doomsday Facility" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locin"], false)
								SpawnFacility()
							else
								FreezeEntityPosition(PlayerPedId(), true)
								SpawnFacility()
								TeleportIntoInterior(v["locin"], false)
							end
						elseif k == "Doomsday Finale" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locin"], false)
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locin"], false)
							end
						else		
							FreezeEntityPosition(PlayerPedId(), true)
							TeleportIntoInterior(v["locin"], false)
						end
					end
				end
				
				if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ox, oy, oz, true) < 50.5999 then -- Inside Marker
					DrawMarker(2, ox, oy, oz, 0.0, 0.0, 0.0, 180.0, 0.0, 0.0, 0.75, 0.75, 0.75, 255, 255, 0, 100, false, true, 2, false, false, false, false)
					if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), ox, oy, oz, true) < 1.0 then
						if k == "Doomsday Facility" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locout"], false)
								DespawnFacility()
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locout"], false)
								DespawnFacility()
							end
						elseif k == "Doomsday Finale" then
							if IsPedInVehicle(PlayerPedId(), GetVehiclePedIsIn(PlayerPedId(), false), false) then
								FreezeEntityPosition(GetVehiclePedIsIn(PlayerPedId(), false), true)
								TeleportIntoInteriorVehicle(v["locout"], false)
							else
								FreezeEntityPosition(PlayerPedId(), true)
								TeleportIntoInterior(v["locout"], false)
							end
						else
							FreezeEntityPosition(PlayerPedId(), true)
							TeleportIntoInterior(v["locout"], false)
						end
					end
				end			
			end
		end
	end
end)```

Lua is a freeform syntax language. That extra space doesn’t matter.

Just replace

GetInteriorAtCoordsWithType(345.0041, 4842.001, -59.9997, "xm_x17dlc_int_02")

with

GetInteriorAtCoords(345.0041, 4842.001, -59.9997)

It works fine with me for the first way, but if it’s causing issues then try the second way.

https://gyazo.com/776d63a6e4718138ab770f5225f74e9e

Uhm, somethin is wrong here :smiley:

Done some small testing, and these seem to be the availlable colors:

Colors list
  1. https://www.vespura.com/hi/i/2018-04-17_23-58_%pn_2b42ff88b4f660d676.jpg
  2. https://www.vespura.com/hi/i/2018-04-18_00-00_%pn_7e71daea8e53830a1d.jpg
  3. https://www.vespura.com/hi/i/2018-04-18_00-01_%pn_2cc528888feb45a584.jpg
  4. https://www.vespura.com/hi/i/2018-04-18_00-01_%pn_10d9346a27cb6bef4a.jpg
  5. https://www.vespura.com/hi/i/2018-04-18_00-02_%pn_91bf852ecd9093ab90.jpg
  6. https://www.vespura.com/hi/i/2018-04-18_00-02_%pn_0997f861bc92c410b7.jpg
  7. (7 and up) https://www.vespura.com/hi/i/2018-04-18_00-03_%pn_9287648902e81a2dfb.jpg

Used the same number for each of those natives every time: