Player.ChatPrint

From GMod Wiki

Revision as of 14:50, 13 September 2009 by UnrealomegaBot (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Player:ChatPrint( String Text )
Description:
Prints a message into the player's chat area.
Returns: nil
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.ChatPrint]Player.ChatPrint [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints "You bad boy!" in the chat of player 1
Used onNewerServer.png
Code
player.GetByID( 1 ):ChatPrint("You bad boy!")
OutputYou bad boy!
DescriptionPrints "(the name of player 1) is a bad boy!" in everybody's chat
Used onNewerServer.png
Code
for _, v in pairs(player.GetAll()) do
	v:ChatPrint( player.GetByID( 1 ):Nick() .. " is a bad boy!" )
end
Output(for example:) Roelof is a bad boy


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox