View Single Post
01-23-12, 01:08 AM   #1
kitwinz
A Defias Bandit
Join Date: Jan 2012
Posts: 3
Question How to trigger events by chat?

I'm trying to learn a bit of lua in my free time and I got a little stuck. I want to make a code that can read what other players say in chatbox in the SAY channel, and if it matches a command, then execute the script for that command.

For example:

player1 says "hello world"

player2 has lua script and when player1 says "hello world", executes a script that makes player2 say "hi"

Sort of like auto responding to certain things.
Can someone please give me a small example of this to go by?
  Reply With Quote