Hooks/Server/canChatCommand

From Official DarkRP Wiki
Revision as of 14:43, 31 October 2015 by DarkRPBot (talk | contribs) (Wikibot updated DarkRP documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hook
Hook name canChatCommand(Player ply, string command, string arguments)
Description:
Called when a player tries to run any chat command or uses the DarkRP console command.
Returns: boolean canChatCommand
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/canChatCommand]canChatCommand hook[/url][/b]

Parameters

  1. ply (Player)
  2. The player who spoke.

  3. command (string)
  4. The thing they said.

  5. arguments (string)
  6. The arguments of the chat command, given as one string.

Return values

  1. canChatCommand (boolean)
  2. Whether the player is allowed to run the chat command.