Raised This Month: $51 Target: $400
 12% 

Solved ...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 01-15-2021 , 04:02   ...
Reply With Quote #1

...

Last edited by Theodore Bagwell; 02-13-2021 at 06:36.
Theodore Bagwell is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-16-2021 , 03:09   Re: Read data
Reply With Quote #2

It would make more sense to trigger off of some other event.
__________________
fysiks is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-16-2021 , 09:40   Re: Read data
Reply With Quote #3

Agree with fysiks. Explain what you're ultimately trying to do, there may be a much simpler way instead of scanning every single server message.
__________________
Bugsy is offline
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 01-16-2021 , 12:19   Re: Read data
Reply With Quote #4

Quote:
Originally Posted by Bugsy View Post
Agree with fysiks. Explain what you're ultimately trying to do, there may be a much simpler way instead of scanning every single server message.
Unfortunately I did not understand what fysiks says.
I just want to know if such a thing is possible at all?
Theodore Bagwell is offline
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 01-16-2021 , 12:23   Re: Read data
Reply With Quote #5

....

Last edited by Theodore Bagwell; 02-13-2021 at 06:36.
Theodore Bagwell is offline
hitD
Junior Member
Join Date: May 2017
Location: Lithuania
Old 01-16-2021 , 14:04   Re: Read data
Reply With Quote #6

For client print there exist fakemeta forward, just register this FM_ClientPrintf(haven't tried but it should work fine).
For color chat i guess it use SayText event so you need to register it. How to register if u don't know for client_print function
HTML Code:
public plugin_init()
{
   register_forward(FM_ClientPrintf, "yourfunction")
}
public yourfunction(id, chat_type, message[])
{
/// Do whatever you want
}
for custom say or w/e
HTML Code:
public plugin_init()
{
   register_message(get_user_msgid("SayText"), "yourfunction")
}
public yourfunction(msg_id, msg_dest, receiver)
{
/// Do whatever you want but if u want to read it just do get_msg_arg_{type}(param, ....)
///for arguments
///1 is Sender id
///2 is the message
}
I hope that's what you want.
hitD is offline
Old 01-16-2021, 14:19
ho83
This message has been deleted by ho83. Reason: Wrong
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-16-2021 , 16:30   Re: Read data
Reply With Quote #7

Tell us specifically what you are trying to do and we may be able to recommend a better and more efficient way to do it.

I understand you want to read console messages, but that does not answer my question.
__________________
Bugsy is offline
Theodore Bagwell
Member
Join Date: Jan 2021
Location: USA
Old 01-19-2021 , 11:41   Re: Read data
Reply With Quote #8

....

Last edited by Theodore Bagwell; 02-13-2021 at 06:37.
Theodore Bagwell is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 01-19-2021 , 12:54   Re: Read data
Reply With Quote #9

Stop glossing over questions and answer them. You still don't make sense as to what you want to achieve. We can't just throw around random code and get a "didn't work". It doesn't work because you didn't properly ask for what you want. This is where the "better and more efficient way" comes in when you properly ask a question, or in translation "way that works".
redivcram is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-19-2021 , 13:07   Re: Read data
Reply With Quote #10

If the message is sent by the server or one of the amxmodx natives (client_print, engclient_print, etc), you could use orpheu. if it's sent by some plugin using message_begin and SayText, you will need to edit the plugin (search for emessage_begin) so you are able to hook the message as hitD showed you in his second code. Orpheu could also be used in that case, but you would hook the message_begin native instead.

It would be easier to simply edit the plugin that sends the message or do what fysiks suggested to be honest, I'm not sure why you are not considering that option.
__________________








CrazY. is offline
Reply



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 13:59.


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