Garry's Mod Wiki

Revision Difference

notification.AddProgress#510677

<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&#x27;s used as an index.</arg>⤶ <arg name="strText" type="string">The text to show</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>