There are a couple you can use.
A lot of people use newchathud_addline(%text) because it doesn't have other arguments that you need to deal with.
Other alternatives are clientcmdchatmessage() which has like a bajillion arguments that I'm not really familiar with, but the one that is printed to chat is the fourth one.
Also there is onChatMessage(%message, %something1, %something2) which is probably your best bet if you just want to know when someone says something.