Raised This Month: $ Target: $400
 0% 

can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-03-2009 , 17:34   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #1

btw, just looked at your code again, with it i can either stop effect or let it show as it should, but what about my topic +_+ can i make it only show\not show to specific players?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 04-03-2009 , 17:37   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #2

Quote:
Originally Posted by .Owyn. View Post
btw, just looked at your code again, with it i can either stop effect or let it show as it should, but what about my topic +_+ can i make it only show\not show to specific players?
You need to redo the message. Messages like tempentities would be something like:

PHP Code:
emessage_begin(MSG_PVS,SVC_TEMPENTITY,origin[3], 0
To send it to one player, you need to recheck all the arguments...
PHP Code:
emessage_begin(MSG_ONE_UNRELIABLE,SVC_TEMPENTITY,origin[3], id
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.

Last edited by ot_207; 04-03-2009 at 17:45.
ot_207 is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-04-2009 , 07:25   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #3

Quote:
Originally Posted by ot_207 View Post
You need to redo the message. Messages like tempentities would be something like:

PHP Code:
emessage_begin(MSG_PVS,SVC_TEMPENTITY,origin[3], 0
To send it to one player, you need to recheck all the arguments...
PHP Code:
emessage_begin(MSG_ONE_UNRELIABLE,SVC_TEMPENTITY,origin[3], id
just tested it alone, seemed to work, but with more than one player it doesn't, it just multiplies message, eg. if i send it to 10 clients all 10 clients will get 10x more messages than normal


PHP Code:
stock Create_TE_LARGEFUNNEL(position[3], iSpriteflags){

    for( new 
id 1id <= max_clientsid++ )
    {
    if( 
is_user_connected(id) && !is_user_bot(id) && p_data[id][P_SHOWICONS] )
    {
    
    
message_beginMSG_BROADCASTSVC_TEMPENTITY, {0,0,0}, id )    
    
write_byteTE_LARGEFUNNEL )
    
write_coordposition[0] )        // origin, x
    
write_coordposition[1] )        // origin, y
    
write_coordposition[2] )        // origin, z
    
write_shortiSprite )            // sprite (0 for none)
    
write_shortflags )            // 0 for collapsing, 1 for sending outward
    
message_end() 
    
    }
    }

ps- sry for double post
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 04-04-2009 at 07:33.
Owyn is offline
Send a message via ICQ to Owyn
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-03-2009 , 17:49   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #4

that's what i was looking for O_o
but will it work for MSG_BRADCAST? cuz that's supposted to affect everything, will it work even for MSG_ALL if i put id argument like you showed me, yes? o_O so should i just loop throug all clients and send message to them checking after who has effects off setting ?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 04-03-2009 at 18:18.
Owyn is offline
Send a message via ICQ to Owyn
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 04-04-2009 , 04:48   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #5

It will work for all message types ...
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-04-2009 , 07:03   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #6

got it to work, thx, but only thing i worry about is should MSG_PVS be sent to all the clients normally?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-04-2009 , 07:09   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #7

When using MSG_PVS, only player which can potentially see the provided origin will get this message.
Arkshine is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-04-2009 , 07:17   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #8

so if do this emessage_begin(MSG_PVS,SVC_TEMPENTITY,origin[3], id)

so player with id won't get my message if he can not potenitally see the provied origin and i don't have to worry about it?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-04-2009 , 07:56   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #9

MSG_BROADCAST or MSG_ALL means ALL PLAYERS. Don't loop through all players with such msg type. Use MSG_ONE or MSG_ONE_UNRELIABLE. Note "ONE" meaning ONE player.
Arkshine is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-04-2009 , 08:11   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #10

but will it work if i just change MSG_BRADCAST, MSG_ALL and MSG_PVS to MSG_ONE leaving everything else as is? if so is there a way to get list of players which can potentially see the provided origin as list of IDs?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 04-04-2009 at 08:13.
Owyn is offline
Send a message via ICQ to Owyn
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 02:20.


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