SendNuiMessage
Docslocal retval = SendNuiMessage(jsonString)Parameters
| Name | Type | Description |
|---|---|---|
jsonString | char* | — |
Returns
BOOLReturns TRUE (1) or FALSE (0).
local retval = SendNuiMessage(jsonString)| Name | Type | Description |
|---|---|---|
jsonString | char* | — |
BOOLReturns TRUE (1) or FALSE (0).
-- Client-side notification
QBCore.Functions.Notify("Vehicle spawned!", "success", 5000)
-- With table format (text + caption)
QBCore.Functions.Notify({
text = "Mission complete",
caption = "Reward: $5000"
}, "success", 5000)
-- With custom icon
QBCore.Functions.Notify("Low fuel!", "error", 3000, "fas fa-gas-pump")Sends a NUI message with action "notify". Supports string or table text (with caption), type ("primary", "success", "error"), duration in ms, and optional Font Awesome icon.
-- Show on-screen text UI (uses NUI)
exports['qb-core']:DrawText("Press [E] to interact", "left")
-- Change existing text
exports['qb-core']:ChangeText("Press [G] to open", "left")
-- Hide text
exports['qb-core']:HideText()
-- Key press animation then auto-hide
exports['qb-core']:KeyPressed()DrawText system uses SendNUIMessage with DRAW_TEXT/CHANGE_TEXT/HIDE_TEXT/KEY_PRESSED actions. Position can be "left", "right", etc. Also available as events: qb-core:client:DrawText, qb-core:client:HideText.
No snippets yet. Be the first to contribute!