Functions/DarkRP/Server/definePrivilegedChatCommand

From Official DarkRP Wiki
Jump to navigation Jump to search
Function
Function name DarkRP.definePrivilegedChatCommand(string chat command, string privilege, function callback)
Description:
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=http://wiki.darkrp.com/index.php?title=Functions/DarkRP/Server/definePrivilegedChatCommand]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.