1. You need to first, have spam protection at the beginning so this is where you would compare strings using %string1 $= %string2.
2. You also need a lot more arguments, each word a player types will be an argument. (
%chat1,%chat2,%chat3, etc).
3. Then check if
%client has an object (
%client.player).
4. After that, you'd probably loop through the client group (
clientgroup.getCount(); and
clientGroup.getObject(index);), grab each player (if it exists) and using the
vectorDist(transform1,transform2) function check if player a's position is near player b's position.
5. After this, you can can send a message to the player's client object and voila.
Check
this out, it's not done and needs improvement (like flood protection, stripping ML characters, etc) but will give you a base to get started with. I also want you to finish the the vectorDist part of it where it actually sends the message.
I did not test this, so if anyone can spot any errors, let me know.
Also, check out this guide:
TSForBlockland