Skip to main content

showAdvancedNotification

xPlayer.showAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)

This function shows an advanced notification.

Arguments

ArgumentData TypeOptionalDefault ValueExplanation
senderstringNo-Message header
subjectstringNo-Message subject
msgstringNo-Message content
textureDictstringNo-Texture directory, see Texture Directory for accepted values
iconTypenumberNo-Icon type, see Icon Types for accepted values
flashbooleanYesfalseFlash the notification?
savetoBreifbooleanYestrueSave to brief? Located in Pause Menu > Help
hudColorIndexnumberYesnilThe background color, see https://gyazo.com/68bd384455fceb0a85a8729e48216e15 for available colors

Example

function notification(playerId, msg)
local xPlayer = ESX.GetPlayerFromId(playerId)
xPlayer.showAdvancedNotification('title', 'subject', 'msg', 'CHAR_BANK_MAZE', 9)
end

Advanced Notification Example Picture

Texture Directory

To specify an texture directory you can either simply parse an already existing notification image, or you can for example create a player mugshot with ESX on the client side.

Icon Types

Icon TypeExplantation
1Chat Box
2Email
3Add Friend Request
7Right Jumping Arrow
8RP Icon
9$ Icon