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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-04-2009 , 08:26   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #1

What do you want to do EXACTLY ?!
Arkshine is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-04-2009 , 08:33   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #2

Quote:
can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
i want to do something so i can make an option to let player choose to see or not to see MSG_BRADCAST and other effects i posted in the 1st page
__________________
☜ 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 , 09:19   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #3

Then use MSG_ONE_UNRELIABLE, loop through all players and filter depending your need.
Arkshine is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-04-2009 , 09:27   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #4

so this will be ok?
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_ONE_UNRELIABLESVC_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() 
    
    }
    }

but about my 2nd question, how can i get a list of players who can potentially see the provided origin from MSG_PVS? (so i don't send to to players who wont need it when i replace MSG_PVS with MSG_ONE_UNRELIABLE )
__________________
☜ 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 , 09:31   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #5

Yes. is_user_connected/is_user_bot is not needed I think.

No, you can't get a list.
Arkshine is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-04-2009 , 10:08   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #6

This should work normally too.
PHP Code:
stock Create_TE_LARGEFUNNELposition[3], iSpriteflags ) {
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
    
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( );

__________________

Last edited by xPaw; 04-04-2009 at 11:45.
xPaw is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-04-2009 , 10:16   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #7

xPaw, it's wrong. MSG_BROADCAST means it will send for ALL players. id will be probably ignored here.
Arkshine is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 04-04-2009 , 11:37   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #8

thx, working +_+ too bad i can't get list of players depending on origin for PAS\PVS for MSG_ONE_UNRELIABLE )=
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
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