Garry's Mod Wiki

Revision Difference

notification.AddProgress#526725

<function name="AddProgress" parent="notification" type="libraryfunc"> <description>Adds a notification with an animated progress bar.</description> <realm>Client and Menu</realm> <args> <arg name="id" type="any">Can be any type. It's used as an index.</arg> <arg name="strText" type="string">The text to show</arg> <arg name="frac" type="number" default="nil">If set, overrides the progress bar animation with given percentage. Range is 0 to 1.</arg>⤶ </args> </function> <example> <description>Add a notification that says "Downloading file...", and remove after three seconds.</description> <code> notification.AddProgress("FileDownload", "Downloading file...") timer.Simple(3, function() notification.Kill("FileDownload") end) </code> </example>