good chat hook

I need a client side chat hook, that returns the player and the text, and it works. Thanks. Btw i searched the wiki, but the search there is terrible…


(User was banned for this post ("Wrong section / dumb" - mahalis))

OnPlayerChat

Then why doesnt this work:

function ChatFunc(Plyindex,Plyname,Text)
//function content
end
hook.Add(“OnPlayerChat”,“lolhaiz”, ChatFunc)
??

FlapJack clearly said “OnPlayerChat” and not “ChatText” which is the old hook. Also, although it is a bit outdated, you would have found the hook with the search engine here.

Oh sorry, lol whoops. but anyway, onplayerchat doesnt seem to work either for me…


GM:OnPlayerChat( player player, string text, bool TeamChat, bool PlayerIsDead )

It said it in Overv’s link. You don’t have enough arguments.

function ChatFunc(ply, txt, isTeamChat, isDead)
//code
end