Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions modules/lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,22 @@ else
ClearDrawOrigin()
end

---@class LibDrawMissionTextParams
---@field text string
---@field time number default: 5000 - 5s

---Draws default GTAV notification text with a given time on the screen.
---@param params LibDrawMissionTextParams
function qbx.drawMissionText(params)
local text = params.text
local time = params.time or 5000
ClearPrints()
ClearSmallPrints()
BeginTextCommandPrint('STRING')
AddTextComponentSubstringPlayerName(text)
EndTextCommandPrint(time, true)
end

---Gets and returns an entity handle and network id from a state bag name
---([source](https://github.com/overextended/ox_core/blob/main/client/utils.lua)).
---@async
Expand Down