Skip to content

ClearPlayerChat

Empties a player’s chat.

The player’s chat forgets every line it holds. The F9 window keeps its own copy of the lines. Nothing is said to the player: send a line afterwards if they should be told.

ClearPlayerChat(pid)
Parameter Type
pid number the player

boolean - false when not connected

RegisterCommand("clear", function(pid)
ClearPlayerChat(pid)
SendChatMessage(pid, "Your chat was emptied.")
end, { help = "Empty your chat" })

SendChatMessage · SendClientMessage · RegisterCommand · the Chat and commands group of the index