Garry's Mod Wiki

notification.AddProgress

  notification.AddProgress( any id, string strText, number frac = nil )

Description

Adds a notification with an animated progress bar.

Arguments

1 any id
Can be any type. It's used as an index.
2 string strText
The text to show
3 number frac = nil
If set, overrides the progress bar animation with given percentage. Range is 0 to 1.

Example

Add a notification that says "Downloading file...", and remove after three seconds.

notification.AddProgress("FileDownload", "Downloading file...") timer.Simple(3, function() notification.Kill("FileDownload") end)
Output: Adds a progress notification that says Downloading file...
image.png