Skip to content

Commit

Permalink
chore: bpt_teleport 🎨 Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Feb 28, 2024
1 parent ca3d658 commit 0681447
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 64 deletions.
16 changes: 8 additions & 8 deletions server-data/resources/[bpt_addons]/bpt_teleport/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ fx_version("cerulean")
game("gta5")
author("bitpredator")
description("bpt_teleport")
version("1.0.0")
version("1.0.1")

shared_script("@es_extended/imports.lua")

client_scripts({
"@es_extended/locale.lua",
"locales/*.lua",
"config.lua",
"warehouses.lua",
"@es_extended/locale.lua",
"locales/*.lua",
"config.lua",
"warehouses.lua",
})

server_scripts({
"@es_extended/locale.lua",
"locales/*.lua",
"config.lua",
"@es_extended/locale.lua",
"locales/*.lua",
"config.lua",
})
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.",
}
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 server-data/resources/[bpt_addons]/bpt_teleport/warehouses.lua
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)

0 comments on commit 0681447

Please sign in to comment.