Raised This Month: $ Target: $400
 0% 

Solved Block MSG_ALL SVC_TEMPENTITY for a player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-23-2021 , 11:03   Re: Block MSG_ALL SVC_TEMPENTITY for a player
Reply With Quote #1

Quote:
Originally Posted by Natsheh View Post
So basically i need to copy all the message subsequent values and msg type then block the message then send the message to the desired clients, right?
Yes, so how I would do it is:
1. pfnMessageBegin called, initialize a structure to save message arguments. I would save it a list of (arg type, arg value) where arg type is short, string, entity, coord etc. Also save the message type(MSG_ALL/BROADCAST). Block the call.
2. On each call of pfnWrite* functions add an entry to your list/array, in the format (type, value). Block the calls.
3. On pfnMessageEnd block the original call, send a new message using MSG_ONE/MSG_ONE_UNRELIABLE(depending on if the original message was broadcast/all) to all players EXCEPT the ones you want to ignore. Compose the message back using the information you saved. Clear the list to prepare for a new message.
From pfnMessageEnd hook you may be unable to immediately send another message(needs to be tested). If you can't, add a small delay of 0.1 seconds.
__________________

Last edited by HamletEagle; 10-23-2021 at 11:05.
HamletEagle 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 11:35.


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