-
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
ca3d658
commit 0681447
Showing
4 changed files
with
97 additions
and
64 deletions.
There are no files selected for viewing
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
4 changes: 2 additions & 2 deletions
4
server-data/resources/[bpt_addons]/bpt_teleport/locales/en.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,4 +1,4 @@ | ||
Locales["en"] = { | ||
["press_to_enter"] = "press ~INPUT_CONTEXT~ to enter the building.", | ||
["press_to_exit"] = "press ~INPUT_CONTEXT~ to exit the building.", | ||
["press_to_enter"] = "press ~INPUT_CONTEXT~ to enter the building.", | ||
["press_to_exit"] = "press ~INPUT_CONTEXT~ to exit the building.", | ||
} |
4 changes: 2 additions & 2 deletions
4
server-data/resources/[bpt_addons]/bpt_teleport/locales/it.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,4 +1,4 @@ | ||
Locales["it"] = { | ||
["press_to_enter"] = "Premi ~INPUT_CONTEXT~ per entrare nell edificio.", | ||
["press_to_exit"] = "Premi ~INPUT_CONTEXT~ per uscire dall edificio.", | ||
["press_to_enter"] = "Premi ~INPUT_CONTEXT~ per entrare nell edificio.", | ||
["press_to_exit"] = "Premi ~INPUT_CONTEXT~ per uscire dall edificio.", | ||
} |
137 changes: 85 additions & 52 deletions
137
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,60 +1,93 @@ | ||
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(_U('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(_U("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 | ||
|
||
-- import exit | ||
if GetDistanceBetweenCoords(playerCoords.x, playerCoords.y, playerCoords.z, 1022.123108, -2398.377930, 30.122314, true) <= 3.0 then | ||
ESX.ShowHelpNotification(_U('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(_U("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 | ||
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(_U('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(_U('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 | ||
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(_U("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(_U("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 | ||
end) |