SB_CHAT_MESSAGE

From SmartBots Developers Docs
AdminBot for LSLEvents
Revision as of 11:47, 3 November 2017 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE: SB_CHAT_MESSAGE}} <onlyinclude>Raised when bot receives the group chat message.</onlyinclude> {{AdminBot Event Variables Table|event=SB_CHAT_SUCCESS}} {{API V...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Raised when bot receives the group chat message.

// Event usage:
link_message(integer sender, integer cmd, string data, key id) {

    if(cmd == SB_CHAT_SUCCESS) {
        llOwnerSay("Event " + cmd + " arrived! Data:\n" + data);     }
}

Event parameters

link_message event receives cmd, str and id parameters. Their meaning for SB_CHAT_SUCCESS event is explained below:

Variable Type Description
cmd integer the SB_CHAT_SUCCESS's numeric ID
data string Contains resident name and message, joined by ": ". Example: Glaznah Gassner: Hello there!
id key Resident UUID

Comments

Remember that Group Chat SmartBots service must be activated for the group.