Raised This Month: $32 Target: $400
 8% 

Retrieving Da Actual chat msg from hooked "SayText" message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 12-08-2010 , 12:14   Retrieving Da Actual chat msg from hooked "SayText" message
Reply With Quote #1

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
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-08-2010 , 13:06   Re: Retrieving Da Actual chat msg from hooked "SayText" message
Reply With Quote #2

get_msg_arg_string(4

Tt may depends on what you want to do, my advice or recommandation could have been specific.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode