First of all, try learning GS2 instead of using GS1. In GS2 you'd do:
PHP Code:
function onPlayerChats()
{
}
To be able to read what the player said, you can read the
player.chat string. An example of this would be:
PHP Code:
function onPlayerChats()
{
if (player.chat == "hello world") {
// do stuff
}
}