Skip to content

Commit

Permalink
refactor: vehicletext
Browse files Browse the repository at this point in the history
* vehicletext v6.9

* Update client/main.lua

Co-authored-by: Manason <clanerp@gmail.com>

* Update main.lua

* fix

---------

Co-authored-by: Manason <clanerp@gmail.com>
  • Loading branch information
TonybynMp4 and Manason committed Jan 13, 2024
1 parent a5a1ad6 commit fa86f6e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,13 @@ AddTextEntry('FE_THDR_GTAO', mapText)

CreateThread(function()
for _, v in pairs(GetVehiclesByName()) do
if v.hash and v.name then
AddTextEntryByHash(v.hash, v.name)
end
if v.model and v.name then
local gameName = GetDisplayNameFromVehicleModel(v.model)
if gameName and gameName ~= "CARNOTFOUND" then
AddTextEntryByHash(joaat(gameName), v.name)
else
lib.print.warn('Could not find gameName value in vehicles.meta for vehicle model %s', v.model)
end
end
end
end)
end)

0 comments on commit fa86f6e

Please sign in to comment.