-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebff1a0
commit a8ad5e7
Showing
1 changed file
with
51 additions
and
84 deletions.
There are no files selected for viewing
135 changes: 51 additions & 84 deletions
135
server-data/resources/[bpt_addons]/bpt_teleport/warehouses.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,60 @@ | ||
ESX = exports["es_extended"]:getSharedObject() | ||
|
||
CreateThread(function() | ||
while true do | ||
Wait(0) | ||
local playerCoords = GetEntityCoords(PlayerPedId(), true) | ||
-- import enter check | ||
if | ||
GetDistanceBetweenCoords( | ||
playerCoords.x, | ||
playerCoords.y, | ||
playerCoords.z, | ||
1025.393433, | ||
-2398.905518, | ||
29.903320, | ||
true | ||
) <= 3.0 | ||
then | ||
ESX.ShowHelpNotification(TranslateCap("press_to_enter")) | ||
if IsControlPressed(0, 51) then | ||
DoScreenFadeOut(1000) | ||
Wait(1500) | ||
SetEntityCoords(PlayerPedId(), 1022.123108, -2398.377930, 30.122314) | ||
Wait(1000) | ||
DoScreenFadeIn(1000) | ||
end | ||
end | ||
while true do | ||
Wait(0) | ||
local playerCoords = GetEntityCoords(PlayerPedId(), true) | ||
-- import enter check | ||
if GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, 1025.393433, -2398.905518, 29.903320, true) <= 3.0 then | ||
ESX.ShowHelpNotification(TranslateCap("press_to_enter")) | ||
if IsControlPressed(0, 51) then | ||
DoScreenFadeOut(1000) | ||
Wait(1500) | ||
SetEntityCoords(PlayerPedId(), 1022.123108, -2398.377930, 30.122314, false, false, false, true) | ||
Wait(1000) | ||
DoScreenFadeIn(1000) | ||
end | ||
end | ||
|
||
-- import exit | ||
if | ||
GetDistanceBetweenCoords( | ||
playerCoords.x, | ||
playerCoords.y, | ||
playerCoords.z, | ||
1022.123108, | ||
-2398.377930, | ||
30.122314, | ||
true | ||
) <= 3.0 | ||
then | ||
ESX.ShowHelpNotification(TranslateCap("press_to_exit")) | ||
if IsControlPressed(0, 51) then | ||
DoScreenFadeOut(1000) | ||
Wait(1500) | ||
SetEntityCoords(PlayerPedId(), 1025.459351, -2398.865967, 29.903320, 239.736) | ||
Wait(1000) | ||
DoScreenFadeIn(1000) | ||
end | ||
end | ||
end | ||
-- import exit | ||
if GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, 1022.123108, -2398.377930, 30.122314, true) <= 3.0 then | ||
ESX.ShowHelpNotification(TranslateCap("press_to_exit")) | ||
if IsControlPressed(0, 51) then | ||
DoScreenFadeOut(1000) | ||
Wait(1500) | ||
SetEntityCoords(PlayerPedId(), 1025.459351, -2398.865967, 29.903320, false, false, false, true) | ||
Wait(1000) | ||
DoScreenFadeIn(1000) | ||
end | ||
end | ||
end | ||
end) | ||
|
||
-- Unicorn | ||
CreateThread(function() | ||
while true do | ||
Wait(0) | ||
local playerCoords = GetEntityCoords(PlayerPedId(), true) | ||
if | ||
GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, 132.608, -1293.978, 28.269, true) | ||
<= 3.0 | ||
then | ||
ESX.ShowHelpNotification(TranslateCap("press_to_enter")) | ||
if IsControlPressed(0, 51) then | ||
DoScreenFadeOut(1000) | ||
Wait(1500) | ||
SetEntityCoords(PlayerPedId(), 126.742, -1278.386, 28.569) | ||
Wait(1000) | ||
DoScreenFadeIn(1000) | ||
end | ||
end | ||
-- import exit | ||
if | ||
GetDistanceBetweenCoords( | ||
playerCoords.x, | ||
playerCoords.y, | ||
playerCoords.z, | ||
132.540665, | ||
-1290.329712, | ||
29.263062, | ||
true | ||
) <= 3.0 | ||
then | ||
ESX.ShowHelpNotification(TranslateCap("press_to_exit")) | ||
if IsControlPressed(0, 51) then | ||
DoScreenFadeOut(1000) | ||
Wait(1500) | ||
SetEntityCoords(PlayerPedId(), 132.527481, -1294.153809, 29.263062) | ||
Wait(1000) | ||
DoScreenFadeIn(1000) | ||
end | ||
end | ||
end | ||
while true do | ||
Wait(0) | ||
local playerCoords = GetEntityCoords(PlayerPedId(), true) | ||
if GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, 132.608, -1293.978, 28.269, true) <= 3.0 then | ||
ESX.ShowHelpNotification(TranslateCap("press_to_enter")) | ||
if IsControlPressed(0, 51) then | ||
DoScreenFadeOut(1000) | ||
Wait(1500) | ||
SetEntityCoords(PlayerPedId(), 126.742, -1278.386, 28.569, false, false, false, true) | ||
Wait(1000) | ||
DoScreenFadeIn(1000) | ||
end | ||
end | ||
-- import exit | ||
if GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, 132.540665, -1290.329712, 29.263062, true) <= 3.0 then | ||
ESX.ShowHelpNotification(TranslateCap("press_to_exit")) | ||
if IsControlPressed(0, 51) then | ||
DoScreenFadeOut(1000) | ||
Wait(1500) | ||
SetEntityCoords(PlayerPedId(), 132.527481, -1294.153809, 29.263062, false, false, false, true) | ||
Wait(1000) | ||
DoScreenFadeIn(1000) | ||
end | ||
end | ||
end | ||
end) |