View Single Post
little_froy
Senior Member
Join Date: May 2021
Old 03-26-2024 , 16:59   Re: [L4D2] How can I hook and block usermsg for only certain clients?
Reply With Quote #3

Quote:
Originally Posted by HarryPotter View Post
You can see this as an example: https://forums.alliedmods.net/showthread.php?t=339035

PHP Code:

g_umFade 
GetUserMessageId("Fade");
HookUserMessage(g_umFadeFadeHooktrue);

Action FadeHook(UserMsg msg_idBfRead bf, const int[] playersint playersNumbool reliablebool init)
{
    
int client players[0];
    ......
    return 
Plugin_Handled;

seems like "Fade" only send to 1 client, but I need to block such thing like "PZDmgMsg", it will send to all real client.
little_froy is offline