View Single Post
eyal282
Veteran Member
Join Date: Aug 2011
Old 03-27-2024 , 07:07   Re: [L4D2] How can I hook and block usermsg for only certain clients?
Reply With Quote #4

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;

Are both "Fade" and "PZDmgMsg" exclusive to one player? If not, he's gonna have a bad time working it out.

The hook should refer to each client receiving.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline