Exports
In this section, you'll find easy-to-use exports for notifications, announcements, progress bars, and more, ensuring seamless integration with your existing scripts.
ToggleHud
ToggleHud
Description:
Toggle the HUD visibility based on the provided boolean, turning it on or off.
Usage:
Parameters:
toggle
(boolean)
ShowNotify
ShowNotify
Description:
Displays a notification with customizable content, type, and duration.
Usage:
Parameters:
data
(table): Data table containing the following keys:icon?
(string): The icon of the notification. (use Iconify for icons)If not specified, the default icon defined in
sh_config_alerts.lua
will be used.
title
(string): The title of the notification.description
(string): The detailed message or description displayed in the notification.type
(string): Specifies the style of the notification.Available Types:
"info"
: Informational messages"success"
: Success messages"warning"
: Warning messages"error"
: Error messages
duration
(number): The duration (in milliseconds) for which the notification will be displayed.
Example:
ShowAnnounce
ShowAnnounce
Description:
Displays an announcement with customizable content, type, and duration.
Usage:
Parameters:
data
(table): Data table containing the following keys:icon?
(string): The icon of the announcement. (use Iconify for icons)If not specified, the default icon defined in
sh_config_alerts.lua
will be used.
title
(string): The title of the announcement.description
(string): The detailed message or description displayed in the announcement.type
(string): Specifies the style of the announcement.Available Types:
"announce"
: Announcement messages"info"
: Informational messages"success"
: Success messages"warning"
: Warning messages"error"
: Error messages
duration
(number): The duration (in milliseconds) for which the announcement will be displayed.
Example:
StartProgress
StartProgress
Description:
Starts a progress bar with detailed customization options, including animations, restrictions, and props.
Usage:
Parameters:
data
(table): Data table containing the following keys:title
(string): The text displayed as the progress bar's title.duration
(number): The duration of the progress bar in milliseconds.allow?
(table): Conditions under which the progress bar is allowed to continue:whileDead
(boolean): Allow while the player is dead.whileRagdoll
(boolean): Allow while ragdolling.whileFalling
(boolean): Allow while falling.whileSwimming
(boolean): Allow while swimming.whileCuffed
(boolean): Allow while cuffed.cancel
(boolean): Allow the player to cancel the progress manually.
disable?
(table): Actions disabled during the progress:move
(boolean): Disable movement.sprint
(boolean): Disable sprinting.combat
(boolean): Disable combat actions.mouse
(boolean): Disable mouse look controls.car
(boolean): Disable vehicle controls.
anim?
(table): Animation played during the progress bar:scenario?
(string): Scenario name.Either
scenario
ordict
must be specified.
playEnter?
(boolean): Plays the enter animation.Default:
true
dict?
(string): Animation dictionary.Either
scenario
ordict
must be specified.
name
(string): Animation name.blendIn?
(float): Animation blend in speed.Default:
3.0
blendOut?
(float): Animation blend out speed.Default:
1.0
duration?
(number): Animation duration.Default:
-1
flag?
(number): Animation flag.Default:
49
playbackRate?
(number): Animation playback rate.Default:
0
lockX?
(boolean): Locks the animation on the X-axis.lockY?
(boolean): Locks the animation on the Y-axis.lockZ?
(boolean): Locks the animation on the Z-axis.
prop?
(table): Prop attached to the player during the progress bar:model
(hash): Prop model hash.bone
(number): Bone number.Default:
60309
pos
(vector3): Position offset for the prop.rot
(vector3): Rotation offset for the prop.rotOrder
(number): The order in which yaw, pitch, and roll are applied.Default:
0
Returns:
progress
(boolean):true
if the progress completed,false
if it was canceled.
ShowProgressUI
ShowProgressUI
Description:
Displays the progress bar UI without any additional functionality or restrictions.
Usage:
Parameters:
title
(string): The text displayed as the progress bar's title.duration
(number): The duration of the progress bar in milliseconds.
CancelProgress
CancelProgress
Description:
Cancels the currently active progress bar.
Usage:
IsProgressActive
IsProgressActive
Description:
Checks if a progress bar is currently active.
Usage:
Returns:
isActive
(boolean):true
if a progress bar is active,false
otherwise.
Example:
ToggleIndicator
ToggleIndicator
Description:
Displays a customizable indicator icon at the bottom center of the screen.
Usage:
Parameters:
data
(table): Data table containing the following keys:key
(string): A unique identifier for the indicator.active
(boolean): A toggle to show or hide the indicator.style?
(table): A set of styles specifically applied to the icon.iconName
(string): The name of the icon. (use Iconify for icons)iconColor
(string): The color of the icon.iconSize
(string): The size of the icon.
Example:
Last updated