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
ToggleHudDescription:
Toggle the HUD visibility based on the provided boolean, turning it on or off.
Usage:
exports["cloud-hud"]:ToggleHud(toggle)
TriggerEvent("cloud-hud:ToggleHud", source, toggle)Parameters:
toggle(boolean)
ShowNotify
ShowNotifyDescription:
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.luawill 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
ShowAnnounceDescription:
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.luawill 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
StartProgressDescription:
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
scenarioordictmust be specified.
playEnter?(boolean): Plays the enter animation.Default:
true
dict?(string): Animation dictionary.Either
scenarioordictmust 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):trueif the progress completed,falseif it was canceled.
Example:
ShowProgressUI
ShowProgressUIDescription:
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
CancelProgressDescription:
Cancels the currently active progress bar.
Usage:
IsProgressActive
IsProgressActiveDescription:
Checks if a progress bar is currently active.
Usage:
Returns:
isActive(boolean):trueif a progress bar is active,falseotherwise.
Last updated