From 4452ac28a11bc8cbe14d2c0d3d41a00473253b0a Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Thu, 31 Oct 2024 18:49:36 +0100 Subject: [PATCH] chore: removal of elevators --- .../bpt_ambulancejob/client/job.lua | 38 ------------------- .../[bpt_addons]/bpt_ambulancejob/config.lua | 32 ---------------- 2 files changed, 70 deletions(-) diff --git a/server-data/resources/[bpt_addons]/bpt_ambulancejob/client/job.lua b/server-data/resources/[bpt_addons]/bpt_ambulancejob/client/job.lua index 6fb15a1c..b4d4ab5c 100644 --- a/server-data/resources/[bpt_addons]/bpt_ambulancejob/client/job.lua +++ b/server-data/resources/[bpt_addons]/bpt_ambulancejob/client/job.lua @@ -253,20 +253,6 @@ CreateThread(function() end end end - - -- Fast Travels (Prompt) - for k, v in ipairs(hospital.FastTravels) do - local distance = #(playerCoords - v.From) - - if distance < Config.DrawDistance then - sleep = 0 - DrawMarker(v.Marker.type, v.From, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Marker.x, v.Marker.y, v.Marker.z, v.Marker.r, v.Marker.g, v.Marker.b, v.Marker.a, false, false, 2, v.Marker.rotate, nil, nil, false) - - if distance < v.Marker.x then - isInMarker, currentHospital, currentPart, currentPartNum = true, hospitalNum, "FastTravels", k - end - end - end end -- Logic for exiting & entering markers @@ -303,12 +289,6 @@ AddEventHandler("bpt_ambulancejob:hasEnteredMarker", function(hospital, part, pa CurrentAction = part CurrentActionMsg = TranslateCap("helicopter_prompt") CurrentActionData = { hospital = hospital, partNum = partNum } - elseif part == "FastTravels" then - local travelItem = Config.Hospitals[hospital][part][partNum] - - CurrentAction = part - CurrentActionMsg = travelItem.Prompt - CurrentActionData = { to = travelItem.To.coords, heading = travelItem.To.heading } end ESX.TextUI(CurrentActionMsg) @@ -337,8 +317,6 @@ CreateThread(function() OpenVehicleSpawnerMenu("car", CurrentActionData.hospital, CurrentAction, CurrentActionData.partNum) elseif CurrentAction == "Helicopters" then OpenVehicleSpawnerMenu("helicopter", CurrentActionData.hospital, CurrentAction, CurrentActionData.partNum) - elseif CurrentAction == "FastTravels" then - FastTravel(CurrentActionData.to, CurrentActionData.heading) end CurrentAction = nil @@ -346,22 +324,6 @@ CreateThread(function() end local playerCoords, letSleep = GetEntityCoords(PlayerPedId()), true - - for hospitalNum, hospital in pairs(Config.Hospitals) do - -- Fast Travels - for k, v in ipairs(hospital.FastTravels) do - local distance = #(playerCoords - v.From) - - if distance < Config.DrawDistance then - sleep = 0 - DrawMarker(v.Marker.type, v.From, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Marker.x, v.Marker.y, v.Marker.z, v.Marker.r, v.Marker.g, v.Marker.b, v.Marker.a, false, false, 2, v.Marker.rotate, nil, nil, false) - - if distance < v.Marker.x then - FastTravel(v.To.coords, v.To.heading) - end - end - end - end Wait(sleep) end end) diff --git a/server-data/resources/[bpt_addons]/bpt_ambulancejob/config.lua b/server-data/resources/[bpt_addons]/bpt_ambulancejob/config.lua index c259b323..cab1e110 100644 --- a/server-data/resources/[bpt_addons]/bpt_ambulancejob/config.lua +++ b/server-data/resources/[bpt_addons]/bpt_ambulancejob/config.lua @@ -72,38 +72,6 @@ Config.Hospitals = { }, }, }, - - FastTravels = { - -- roof access (ok) - { - From = vector3(329.393402, -601.081299, 42.282104), - To = { coords = vector3(341.076935, -581.604370, 74.150879), heading = 0.0 }, - Marker = { type = 1, x = 1.5, y = 1.5, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false }, - }, - - -- DW main - { - From = vector3(339.454956, -584.175842, 73.150879), - To = { coords = vector3(331.371429, -595.424194, 43.282104), heading = 0.0 }, - Marker = { type = 1, x = 2.0, y = 2.0, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false }, - }, - - -- Garage dw - { - From = vector3(327.217590, -603.560425, 42.282104), - To = { coords = vector3(339.283508, -584.479126, 28.791260), heading = 0.0 }, - Marker = { type = 1, x = 2.0, y = 2.0, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false }, - }, - - -- Garage up - { - From = vector3(340.892303, -580.378052, 27.791260), - To = { coords = vector3(332.175812, -595.569214, 43.282104), heading = 0.0 }, - Marker = { type = 1, x = 2.0, y = 2.0, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false }, - }, - - -- Roof access end - }, }, }