Skip to content

Commit

Permalink
refactor: move vehicle name setting to main.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 committed Jan 9, 2024
1 parent 214177c commit c2a3021
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 1 addition & 9 deletions client/loops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 9 additions & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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)

0 comments on commit c2a3021

Please sign in to comment.