G.PrintMessage
From GMod Wiki
| Function | |
| Syntax |
PrintMessage( Number type, String message ) Where is this used? |
| Description: | |
| Prints a message to all users in various places. | |
| Returns: | nil |
| Part of Library: | Global Functions |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.PrintMessage]G.PrintMessage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Prints "Hi There!" in the chat of all players. |
|---|---|
| Used on | |
| Code | PrintMessage( HUD_PRINTTALK, "Hi There!" ) |
| Output | Hi There! |
Additional Notes
- A message printed has a limit of 255 bytes, more than that will give a lua error.
- Uses these enumerations :
SHARED | 0000000000000001 | 00000000000000001 | HUD_PRINTCENTER - Prints to the center of the client's screen SHARED | 0000000000000002 | 00000000000000010 | HUD_PRINTCONSOLE - Prints to the client's console SHARED | 0000000000000003 | 00000000000000011 | HUD_PRINTNOTIFY - Same as HUD_PRINTCONSOLE SHARED | 0000000000000004 | 00000000000000100 | HUD_PRINTTALK - Prints to the chat area