Skip to content

Commit

Permalink
feat(modules/lib): getVehicleModName and getVehicleLiveryName
Browse files Browse the repository at this point in the history
  • Loading branch information
mafewtm committed Apr 28, 2024
1 parent 55eaeea commit ccd258f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions modules/lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,23 @@ else
return GetLabelText(GetMakeNameFromVehicleModel(GetEntityModel(vehicle)))
end

---Returns the mod type name of the given vehicle.
---@param vehicle integer
---@param modType integer
---@param modIndex integer
---@return string
function qbx.getVehicleModName(vehicle, modType, modIndex)
return GetLabelText(GetModTextLabel(vehicle, modType, modIndex))
end

---Returns the livery name of the given vehicle.
---@param vehicle integer
---@param liveryIndex integer
---@return string
function qbx.getVehicleLiveryName(vehicle, liveryIndex)
return GetLabelText(GetLiveryName(vehicle, liveryIndex))
end

---Returns the street name and cross section name at the given coords.
---@param coords vector3
---@return { main: string, cross: string }
Expand Down

0 comments on commit ccd258f

Please sign in to comment.