Raised This Month: $ Target: $400
 0% 

[CSS] Detect messages before being received


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Paaf
Member
Join Date: Dec 2010
Old 12-03-2013 , 13:48   [CSS] Detect messages before being received
Reply With Quote #1

Hi everyone,

I would like to detect messages before being received by clients. In my plugin, I need to hook every messages with HookUserMessage so that I can also detect plugin messages. This is my code so far :

PHP Code:
public OnPluginStart()
{
    
g_textmsg GetUserMessageId("TextMsg");
    
HookUserMessage(g_textmsgUserMessageHooktrue);     
}
 
public 
Action:UserMessageHook(UserMsg:msg_idHandle:bf, const players[], playersNumbool:reliablebool:init)
{
...

I would like to know which client the message is sent to ? Can I find this in bf variable ? const players[] array ?

Thk you for your help,
Paaf is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 12-03-2013 , 14:30   Re: [CSS] Detect messages before being received
Reply With Quote #2

Quote:
Originally Posted by Paaf View Post
const players[] array ?
Yes.
__________________
11530 is offline
Paaf
Member
Join Date: Dec 2010
Old 12-03-2013 , 14:50   Re: [CSS] Detect messages before being received
Reply With Quote #3

How ? What is this array made of ?
Paaf is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-03-2013 , 15:12   Re: [CSS] Detect messages before being received
Reply With Quote #4

Quote:
Originally Posted by Paaf View Post
How ? What is this array made of ?
loop through the array, and itll show all the client indexs that the message was sent to.
Mitchell is offline
Paaf
Member
Join Date: Dec 2010
Old 12-03-2013 , 16:06   Re: [CSS] Detect messages before being received
Reply With Quote #5

It works,

Thank you ;)
Paaf 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 08:27.


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