From ab69bae88a57dab2dd3e6a4789f4f35696994643 Mon Sep 17 00:00:00 2001 From: Tony <97451137+TonybynMp4@users.noreply.github.com> Date: Mon, 8 Jan 2024 21:50:55 +0000 Subject: [PATCH] move loop to main.lua --- client/loops.lua | 10 +--------- client/main.lua | 10 +++++++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/loops.lua b/client/loops.lua index dc5a91a24..8a729c3f3 100644 --- a/client/loops.lua +++ b/client/loops.lua @@ -13,12 +13,4 @@ CreateThread(function() end end end -end) - -CreateThread(function() - for _, v in pairs(GetVehiclesByName()) do - if v.hash and v.name then - AddTextEntryByHash(GetHashKey(GetDisplayNameFromVehicleModel(v.model)), v.name) - end - end -end) +end) \ No newline at end of file diff --git a/client/main.lua b/client/main.lua index 3babc5ccb..e1ed94253 100644 --- a/client/main.lua +++ b/client/main.lua @@ -62,4 +62,12 @@ end) local mapText = require 'config.client'.pauseMapText if mapText == '' or type(mapText) ~= 'string' then mapText = 'FiveM' end -AddTextEntry('FE_THDR_GTAO', mapText) \ No newline at end of file +AddTextEntry('FE_THDR_GTAO', mapText) + +CreateThread(function() + for _, v in pairs(GetVehiclesByName()) do + if v.hash and v.name then + AddTextEntryByHash(GetHashKey(GetDisplayNameFromVehicleModel(v.model)), v.name) + end + end +end) \ No newline at end of file