Chat

A way for players to communicate and run commands.

Functions

impulse.RegisterChatClass(id, onReceive)

View source »

Registered a new chat class for players, must be ran on the client, IDs must match the servers to work properly.

Parameters

  • id int

    Chat class ID.

  • onReceive function

    Callback when the chat class is received

impulse.RegisterChatCommand(name, cmdData)

View source »

Registers a new chat command for players, must be ran on both client & server.

Parameters

  • name string

    Command name, must begin with "/".

  • cmdData

    Command data.

Player:SendChatClassMessage(id, message, target)

View source »

Sends a chat class to the associated player.

Parameters

  • id int

    Chat class ID.

  • message string

    Message to send.

  • target Player optional

    Target player.

Tables

cmdData

View source »

Data required to build a command.

Fields

  • onRun function

    Callback when the command is run.

  • adminOnly boolean optional

    Admin Only Command.

  • leadAdminOnly boolean optional

    Lead Admin Only Command.

  • communityManagerOnly boolean optional

    Community Manager Only Command.

  • superAdminOnly boolean optional

    Super Admin Only Command.

  • requiresArg boolean optional

    Command requires additional arguments?

  • requiresAlive boolean optional

    Command runner is alive.

  • description string

    Command description.

  • descriptors optional

    A table of descriptors to assist users.