Functions/DarkRP/Client/addChatReceiver

From Official DarkRP Wiki
Jump to navigation Jump to search
Function
Function name DarkRP.addChatReceiver(string prefix, string text, function hearFunc)
Description:
Add a chat command with specific receivers
Returns: nil
Part of Library: DarkRP
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Functions/DarkRP/Client/addChatReceiver]DarkRP.addChatReceiver[/url][/b]

Function parameters

  1. prefix (string)
  2. The chat command itself ("/pm", "/ooc", "/me" are some examples)

  3. text (string)
  4. The text that shows up when it says "Some people can hear you X"

  5. hearFunc (function)
  6. A function(ply, splitText) that decides whether this player can or cannot hear you.


Function return values

This function does not return any value.