Editable

function CustomFunction(text, duration)
Debug("Playing custom function")
if not duration then
duration = 5000
end
Citizen.CreateThread(function()
local startTime = GetGameTimer()
local endTime = startTime + duration
local lineHeight = 0.03 -- Line height adjustment (change as needed)
local startY = 0.4
-- Split text into words
local words = {}
for word in string.gmatch(text, "%S+") do
table.insert(words, word)
end

-- Construct lines based on actual text width
local lines = {}
local currentLine = ""
for i, word in ipairs(words) do
local testLine = currentLine == "" and word or (currentLine .. " " .. word)


On This Page
Editable