Notification
A library to display notification on the player screen
jo.notif.left()
Notification on the left with title, icon, color and sound
Syntax
jo.notif.left(source,title, text, dict, icon, color, duration,soundset_ref,soundset_name)
Parameters
source
: integer
The source ID of the player
title
: string
The title of the notification
text
: string
The text of the notification
dict
: string
The dictonnary of the icon
icon
: string
The name of the icon
color
: string Optional
The color of the text
default : "COLOR_WHITE"
duration
: integer Optional
The duration of the notification in ms
default: 3000
soundset_ref
: string Optional
The dictionnary of the soundset
default : "Transaction_Feed_Sounds"
soundset_name
: string Optional
The name of the soundset
default : "Transaction_Positive"
Example
local source = 1
local title = 'Title'
local text = 'The text'
local dict = "hud_textures"
local icon = "check"
local color = "COLOR_GREEN"
local duration = 5000
jo.notif.left(source,title,text, dict, icon, color,duration)
Preview
jo.notif.right()
Notification on the right with icon, color and sound
Syntax
jo.notif.right(source,text, dict, icon, color, duration,soundset_ref,soundset_name)
Parameters
source
: integer
The source ID of the player
text
: string
The text of the notification
dict
: string
The dictonnary of the icon
icon
: string
The name of the icon
color
: string Optional
The color of the text
default : "COLOR_WHITE"
duration
: integer Optional
The duration of the notification in ms
default: 3000
soundset_ref
: string Optional
The dictionnary of the soundset
default : "Transaction_Feed_Sounds"
soundset_name
: string Optional
The name of the soundset
default : "Transaction_Positive"
Example
local source = 1
local text = 'Success notification'
local dict = "hud_textures"
local icon = "check"
local color = "COLOR_GREEN"
local duration = 5000
jo.notif.right(source,text, dict, icon, color, duration)
Preview
jo.notif.rightError()
A shortcut to display an error notification
Syntax
jo.notif.rightError(source,text)
Parameters
source
: integer
The source ID of the player
text
: string
The text of the notification
Example
local source = 1
jo.notif.rightError(source,"Error !")
Preview
jo.notif.rightSuccess()
A shortcut to display a successfull notification
Syntax
jo.notif.rightSuccess(source,text)
Parameters
source
: integer
The source ID of the player
text
: string
The text of the notification
Example
local source = 1
jo.notif.rightSuccess(source,"Success notification")
Preview
jo.notif.simpleTop()
Notification on the top with big title and subtitle (native mission start/end)
Syntax
jo.notif.simpleTop(source, title, subtitle, duration)
Parameters
source
: integer
The source ID of the player
title
: string
the title of the notification
subtitle
: string
The text of the notification
duration
: integer Optional
The duration of the notification in ms
default: 3000
Example
local title = 'Mission Started'
local subtitle = "You just start a great mission !"
local duration = 5000
jo.notif.simpleTop(source,title, subtitle, duration)