e2 docs chat - wiremod/wire GitHub Wiki

Jump to table of contents

Chat

runOnChat(Number Activate)

If set to 0, the chip will no longer run on chat events, otherwise it makes this chip execute when someone chats. Only needs to be called once, not in every execution (3 ops)

Number = chatClk()

Returns 1 if the chip is being executed because of a chat event. Returns 0 otherwise (3 ops)

Number = chatClk(Entity Ply)

Returns 1 if the chip is being executed because of a chat event by player E. Returns 0 otherwise (3 ops)

hideChat(Number Hide)

Hides the chat messages written by E2 owner (3 ops)

Entity = lastSpoke()

Returns the last player to speak (3 ops)

String = lastSaid()

Returns the last message in the chat log (3 ops)

Number = lastSaidWhen()

Returns the time the last message was sent (3 ops)

Number = lastSaidTeam()

Returns 1 if the last message was sent in the team chat, 0 otherwise (3 ops)

String = Entity:lastSaid()

Returns what the player E last said (3 ops)

Number = Entity:lastSaidWhen()

Returns when the given player last said something (3 ops)

Number = Entity:lastSaidTeam()

Returns 1 if the last message was sent in the team chat, 0 otherwise (3 ops)