notification.AddLegacy

From GMod Wiki

Jump to: navigation, search
Function
Syntax notification.AddLegacy( String Text, Number Type, Number Length )
Where is this used?
Description:
Adds a standard notification to your screen.
Returns: nil
Part of Library: Notification
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Notification.AddLegacy]Notification.AddLegacy [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionAdds a prop undo notification to the screen, like in Sandbox.
Used onNewerClient.png
Code
notification.AddLegacy("Undone Prop", NOTIFY_UNDO, 2)
surface.PlaySound("buttons/button15.wav")
Msg("Prop undone\n")
OutputAdds a notice that says "Undone Prop", plays the undo sound, and adds a message to the console.


NOTIFY_ Enumerations

CLIENT | 0000000000000000 | 00000000000000000 | GENERIC
CLIENT | 0000000000000001 | 00000000000000001 | ERROR
CLIENT | 0000000000000002 | 00000000000000010 | UNDO
CLIENT | 0000000000000003 | 00000000000000011 | HINT
CLIENT | 0000000000000004 | 00000000000000100 | CLEANUP

Hintall.png

Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox