Hy All,
What i m trying to do is to hook player chat, so far after searching what i found was a post of ConnerMcLeod, which recommended to hook the "SayText" message and then do whatever you want with da chat instead of using register_clcmd( "say" , "hook_say" )
so i used da below code
Code:
public plugin_init() register_message(get_user_msgid("SayText"), "msg_say_text")
public msg_say_text( MSG_ID, MSG_DEST, MSG_ENTITY )
{
static sz_message[192]
get_msg_arg_string(2, sz_message, charsmax(sz_message))
// Make sure it is a chat message with which we will be messing
if (!equal( sz_message, "#Cstrike_Chat_" 14 )
return PLUGIN_CONTINUE;
// Code ..
}
So far da code looks gud, but the real problem is i cant retrieve the actual chat message witch da player sent, so if the player said "Hy", i am only able to catch #Cstrike_Chat_* message and not what da player has said so
is there a way to retrieve what the player actually said using only "SayText" message hook
__________________