From Official DarkRP Wiki
Revision as of 15:10, 30 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
Function name DarkRP.definePrivilegedChatCommand(string chat command, string privilege, function callback)
Create a chat command that calls the function if the player has the right CAMI privilege. Will automatically notify the user when they don't have access. Note that chat command functions registered with this function can NOT override the chat that will appear after the command has been executed.
Returns: nil
Part of Library: DarkRP
Realm: NewerServer.png
BBCode Link: [b][url=]DarkRP.definePrivilegedChatCommand[/url][/b]

Function parameters

  1. chat command (string)
  2. The registered chat command

  3. privilege (string)
  4. The name of the CAMI privilege

  5. callback (function)
  6. The function that is called when the chat command is executed

Function return values

This function does not return any value.