[Free] Skye Restaurant - Tallest Restaurant in LS

Check now I have edited the post

1 Like

Thanks alot

1 Like

Hello @PYRO_MAPS a command or a command button added. also fixed some things check the text for more

For 2 elevators

Fix for elevator 2

local elevator2BaseX = -162.735

local elevator2BaseY = -580.867

local elevator2BaseZ = 192.17164611816

–local elevator2BaseHeading = 270.0

Fix for elevator2 spawn

local la_nacelle_estelle_la2 = false

function spawnProp2(propName, x, y, z)
local model = GetHashKey(propName)

if IsModelValid(model) then
	local pos = GetEntityCoords(GetPlayerPed(-1), true)

	local forward = 5.0
	local heading = GetEntityHeading(GetPlayerPed(-1))
	local xVector = forward * math.sin(math.rad(heading)) * -1.0
	local yVector = forward * math.cos(math.rad(heading))
	
	elevator2Prop = createObject(model, x, y, z)
	local propNetId = ObjToNet(elevator2Prop)
	SetNetworkIdExistsOnAllMachines(propNetId, true)
	NetworkSetNetworkIdDynamic(propNetId, true)
	SetNetworkIdCanMigrate(propNetId, false)
	
	SetEntityLodDist(elevator2Prop, 0xFFFF)
	SetEntityCollision(elevator2Prop, true, true)
	FreezeEntityPosition(elevator2Prop, true)
	SetEntityCoords(elevator2Prop, x, y, z, false, false, false, false) -- Patch un bug pour certains props.
	SetEntityHeading(elevator2Prop, elevator2BaseHeading)

	la_nacelle_estelle_la2 = true -- la nacelle est là
end

end

Fix for 2 elevator to spawn at the top close to the elevator so you can actually use the elevator if you spawn up in resturant

    if not la_nacelle_estelle_la and (Vdist(-162.735, -580.867, 49.125, pos.x, pos.y, pos.z - 1) < Config.spawndistance) then
    	spawnProp("pyro_elevator1", elevatorBaseX, elevatorBaseY, elevatorBaseZ)
    	Wait(1000)
	elseif not la_nacelle_estelle_la2 and (Vdist(-162.81019592285, -580.25952148438, 192.17164611816, pos.x, pos.y, pos.z) < 10) then
                    spawnProp2("pyro_elevator1", elevator2BaseX, elevator2BaseY, elevator2BaseZ)
    	Wait(1000)
	end

if you want a command button instead use this:

local closetoelevator1 = false
local closetoelevator2 = false

RegisterCommand(“elevator”, function()
if closetoelevator1 then
garage_menu = not garage_menu
Main()
end
if closetoelevator2 then
garage_menu = not garage_menu
Main2()
end
end)

RegisterKeyMapping(‘elevator’, ‘PYROakaPARTH SkyResturant Elevator’, ‘keyboard’, ‘F11’)

– key controls
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)

	local pos = GetEntityCoords(GetPlayerPed(-1), false)
	
	if (Vdist(-162.735, -580.867, 49.125, pos.x, pos.y, pos.z - 1) < 5) then -- Si on est a moins de 1.5 de distance de cette coordonnée
		closetoelevator1 = true
	elseif (Vdist(-162.81019592285, -580.25952148438, 192.17164611816, pos.x, pos.y, pos.z - 1) < 5) then
		closetoelevator2 = true 

if you want a command only instead use this:

local closetoelevator1 = false
local closetoelevator2 = false

RegisterCommand(“elevator”, function()
if closetoelevator1 then
garage_menu = not garage_menu
Main()
end
if closetoelevator2 then
garage_menu = not garage_menu
Main2()
end
end)

– key controls
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)

	local pos = GetEntityCoords(GetPlayerPed(-1), false)
	
	if (Vdist(-162.735, -580.867, 49.125, pos.x, pos.y, pos.z - 1) < 5) then -- Si on est a moins de 1.5 de distance de cette coordonnée
		closetoelevator1 = true
	elseif (Vdist(-162.81019592285, -580.25952148438, 192.17164611816, pos.x, pos.y, pos.z - 1) < 5) then
		closetoelevator2 = true

For 1 elevator

if you want a command button then:

RegisterCommand(“elevator”, function()
if closetoelevator1 then
garage_menu = not garage_menu
Main()
end
end)

RegisterKeyMapping(‘elevator’, ‘PYROakaPARTH SkyResturant Elevator’, ‘keyboard’, ‘F11’)

– key controls
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)

	local pos = GetEntityCoords(GetPlayerPed(-1), false)
	
	if (Vdist(-162.735, -580.867, 49.125, pos.x, pos.y, pos.z) < 5) then -- Si on est a moins de 1.5 de distance de cette coordonnée
		closetoelevator1 = true
	elseif (Vdist(-162.81019592285, -580.25952148438, 192.17164611816, pos.x, pos.y, pos.z) < 5) then
		closetoelevator1 = true 

if you want command only then :

RegisterCommand(“elevator”, function()
if closetoelevator1 then
garage_menu = not garage_menu
Main()
end
end)

– key controls
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)

	local pos = GetEntityCoords(GetPlayerPed(-1), false)
	
	if (Vdist(-162.735, -580.867, 49.125, pos.x, pos.y, pos.z) < 5) then -- Si on est a moins de 1.5 de distance de cette coordonnée
		closetoelevator1 = true
	elseif (Vdist(-162.81019592285, -580.25952148438, 192.17164611816, pos.x, pos.y, pos.z) < 5) then
		closetoelevator1 = true

Fix for 1 elevator to spawn at the top close to the elevator so you can actually use the elevator if you spawn up in resturant

    if not la_nacelle_estelle_la and (Vdist(-162.735, -580.867, 49.125, pos.x, pos.y, pos.z - 1) < Config.spawndistance) then
    	spawnProp("pyro_elevator1", elevatorBaseX, elevatorBaseY, elevatorBaseZ)
    	Wait(1000)
	elseif not la_nacelle_estelle_la and (Vdist(-162.81019592285, -580.25952148438, 192.17164611816, pos.x, pos.y, pos.z) < 10) then
		spawnProp("pyro_elevator1", elevatorBaseX, elevatorBaseY, elevatorBaseZ)
    	Wait(1000)
	end
4 Likes

nice work bro

3 Likes

Thanks for your contribution @GoonScripts, Im still trying to understand this as I am not a scripts person :sweat_smile:

1 Like

If you offer it for free, you can’t only offer it via Tebex.

2 Likes

@Reddegger yes it is you put 0.0 and you get it for free

1 Like

nice one

1 Like

i paid for it on your Tebex Store and then saw that the direct link is in this article -.-

2 Likes

thank you

1 Like

:moyai: Dont worry you have donated for a cause. Haha jk, contact me if you want a refund.

no no don’t worry :wink: it was just for all others, that they not are going to do the same fault. :sweat_smile:

1 Like

This looks cool the only thing that throws me off is it is a restaurant with no kitchen lol. Where do they cook the food?

1 Like

No direct download

nice work bro

we just want fix for the elevator

very nice work, but I cant make the elevator work, im running qbcore.

I am issues with the elevator not working as well. Any fix?

Can you drop your elevator file? I tried your additions and I keep getting errors.