Hemos añadido diferentes funciones para manejar los interiores que hay agregados para las diferentes casas. Los interiores que usamos son IPLs de GTA.
We've added various functions to manage the interiors added for the different houses. The interiors we use are GTA IPLs.
client/custom_interiors.lua
function customHouseInterior(interiorShell)
local playerPed = PlayerPedId()
local playerCoords = GetEntityCoords(playerPed)
local distanceInterior = nil
if interiorShell == 'luxuryHouse1' then
distanceInterior = #(playerCoords - vector3(117.2, 560.14, 184.3))
elseif interiorShell == 'luxuryHouse2' then
distanceInterior = #(playerCoords - vector3(-682.44, 592.59, 145.38))
elseif interiorShell == 'lowHouse' then
distanceInterior = #(playerCoords - vector3(266.17, -1007.41, -101.01))
elseif interiorShell == 'midLowHouse' then
distanceInterior = #(playerCoords - vector3(346.57, -1012.9, -99.2))
end
return distanceInterior
end
function teleportToCustomInterior(interior)
local player = PlayerPedId()
if interior == 'luxuryHouse1' then
SetEntityCoords(player, 117.2, 560.14, 184.3, false, false, false, false)
SetEntityHeading(player, 185.49)
elseif interior == 'luxuryHouse2' then
SetEntityCoords(player, -682.44, 592.59, 145.38, false, false, false, false)
SetEntityHeading(player, 219.34)
elseif interior == 'lowHouse' then
SetEntityCoords(player, 266.17, -1007.41, -101.01, false, false, false, false)
SetEntityHeading(player, 10.75)
elseif interior == 'midLowHouse' then
SetEntityCoords(player, 346.57, -1012.9, -99.2, false, false, false, false)
SetEntityHeading(player, 1.8)
end
end