a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Client / Timerbar
Create a Timerbar. It’s automatically added to the internal Timerbar array and drawn in a FIFO (first in, first out) way.
// Create simple Timerbar
const myTimerbar = new Cfx.Timerbar("Hello");
myTimerbar.Text = "World";
// Disable Timerbar later on
myTimerbar.Visible = false;
new Timerbar(
title
,useProgressBar
):Timerbar
Constructor for the Timerbar class.
• title: string
The title of the Timerbar.
• useProgressBar: boolean
= false
Whether to use a progress bar.
get
PlayerStyle():boolean
Gets the player style of the Timerbar.
set
PlayerStyle(value
):void
Sets the player style of the Timerbar.
• value: boolean
True to use player style, false otherwise.
boolean
True if using player style, false otherwise.
get
Progress():number
Gets the progress value of the Timerbar.
set
Progress(value
):void
Sets the progress value of the Timerbar.
• value: number
The new progress value, between 0.0 and 1.0.
number
The progress value, between 0.0 and 1.0.
get
ProgressbarBgColor():number
|number
[]
Gets the background color of the progress bar.
set
ProgressbarBgColor(value
):void
Sets the background color of the progress bar.
• value: number
| number
[]
The new background color as an array or a number.
number
| number
[]
The background color as an array or a number.
get
ProgressbarFgColor():number
|number
[]
Gets the foreground color of the progress bar.
set
ProgressbarFgColor(value
):void
Sets the foreground color of the progress bar.
• value: number
| number
[]
The new foreground color as an array or a number.
number
| number
[]
The foreground color as an array or a number.
get
Sprite():Sprite
Gets the sprite associated with the Timerbar.
The sprite object.
get
Text():string
Gets the text of the Timerbar.
set
Text(value
):void
Sets the text of the Timerbar.
• value: string
The new text for the Timerbar.
string
The text as a string.
get
TextColor():number
|number
[]
Gets the text color of the Timerbar.
set
TextColor(value
):void
Sets the text color of the Timerbar.
• value: number
| number
[]
The new text color as an array or a number.
number
| number
[]
The text color as an array or a number.
get
Title():string
Gets the title of the Timerbar.
set
Title(value
):void
Sets the title of the Timerbar.
• value: string
The new title for the Timerbar.
string
The title as a string.
get
UseProgressBar():boolean
Gets if the Timerbar is using a progress bar.
boolean
True if the Timerbar is using a progress bar, false otherwise.
get
Visible():boolean
Gets the visibility of the Timerbar.
set
Visible(value
):void
Sets the visibility of the Timerbar.
• value: boolean
True to make the Timerbar visible, false otherwise.
boolean
True if the Timerbar is visible, false otherwise.