💬DrawText
Learn how to use the built-in NUI drawtext function!
Function or Event
Description
HideText
-- Source code for reference
local function hideText()
SendNUIMessage({
action = 'HIDE_TEXT',
})
end
exports('HideText', hideText)
-- Export example
local function examplefunction()
exports['qb-core']:DrawText('This is a test', 'left')
Wait(5000) -- display text for 5 seconds
exports['qb-core']:HideText()
end
-- Client example
local function examplefunction()
TriggerEvent('qb-core:client:DrawText', 'This is a test', 'left')
Wait(5000) -- display text for 5 seconds
TriggerEvent('qb-core:client:HideText')
end
-- Server example
local function examplefunction()
TriggerClientEvent('qb-core:client:DrawText', source, 'This is a test', 'left')
Wait(5000) -- display text for 5 seconds
TriggerClientEvent('qb-core:client:HideText', source)
endDrawText
ChangeText
KeyPressed
Last updated
Was this helpful?
