View Single Post
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 03-26-2024 , 11:31   Re: [L4D2] How can I hook and block usermsg for only certain clients?
Reply With Quote #2

Quote:
Originally Posted by little_froy View Post
as the title.
I can't modify the "players" in https://sm.alliedmods.net/new-api/usermessages/MsgHook
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;

__________________

Last edited by HarryPotter; 03-26-2024 at 11:32.
HarryPotter is offline