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:04   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #1

yes i suppose

here are list of my messages
effects.inl
PHP Code:
stock Create_TE_Smoke(originSight[3], position[3], iSpritescaleframerate){

    
message_beginMSG_PVSSVC_TEMPENTITYoriginSight )
    
write_byteTE_SMOKE )
    
write_coordposition[0] )            // Position
    
write_coordposition[1] )
    
write_coordposition[2] )
    
write_shortiSprite )                // Sprite index
    
write_bytescale )                    // scale * 10
    
write_byteframerate  )            // framerate
    
message_end()
}

stock Create_DeathMsg_CS(killer_id,victim_id,headshot,weaponname[]){

    
message_begin(MSG_ALL,gmsgDeathMsg)
    
write_byte(killer_id)
    
write_byte(victim_id)
    
write_byte(headshot)
    
write_string(weaponname)
    
message_end()
}

stock Create_TE_IMPLOSION(position[3], radiuscountlife){

    
message_beginMSG_BROADCASTSVC_TEMPENTITY )
    
write_byte TE_IMPLOSION )
    
write_coordposition[0] )            // position (X)
    
write_coordposition[1] )            // position (Y)
    
write_coordposition[2] )            // position (Z)
    
write_byte radius )                // radius
    
write_byte count )                // count
    
write_byte life )                    // life in 0.1's
    
message_end()
}

stock Create_TE_BEAMCYLINDER(origin[3], center[3], axis[3], iSpritestartFrameframeRatelifewidthamplituderedgreenbluebrightnessspeed){

    
message_beginMSG_PASSVC_TEMPENTITYorigin )
    
write_byteTE_BEAMCYLINDER )
    
write_coordcenter[0] )            // center position (X)
    
write_coordcenter[1] )            // center position (Y)
    
write_coordcenter[2] )            // center position (Z)
    
write_coordaxis[0] )                // axis and radius (X)
    
write_coordaxis[1] )                // axis and radius (Y)
    
write_coordaxis[2] )                // axis and radius (Z)
    
write_shortiSprite )                // sprite index
    
write_bytestartFrame )            // starting frame
    
write_byteframeRate )                // frame rate in 0.1's
    
write_bytelife )                    // life in 0.1's
    
write_bytewidth )                    // line width in 0.1's
    
write_byteamplitude )                // noise amplitude in 0.01's
    
write_bytered )                    // color (red)
    
write_bytegreen )                    // color (green)
    
write_byteblue )                    // color (blue)
    
write_bytebrightness )            // brightness
    
write_bytespeed )                    // scroll speed in 0.1's
    
message_end()
}

stock Create_TE_EXPLOSIONorigin[3], origin2[3], iSpritescaleframeRateflags ){

    
message_beginMSG_PVSSVC_TEMPENTITYorigin )
    
write_byteTE_EXPLOSION )
    
write_coordorigin2[0] )            // position (X)
    
write_coordorigin2[1] )            // position (Y)
    
write_coordorigin2[2]    )            // position (Z)
    
write_shortiSprite )                // sprite index
    
write_bytescale )                    // scale in 0.1's
    
write_byteframeRate )                // framerate
    
write_byteflags )                    // flags
    
message_end()
}

stock Create_ScreenShake(idamountdurationfrequency){

    if( 
is_user_connected(id) && !is_user_bot(id) )
    {

    
message_begin(MSG_ONE,gmsgScreenShake,{0,0,0},id
    
write_shortamount )                // ammount 
    
write_shortduration )                // lasts this long 
    
write_shortfrequency )            // frequency
    
message_end()
    
    }
}

stock Create_ScreenFade(iddurationholdtimefadetyperedgreenbluealpha){


    if( 
is_user_connected(id) && !is_user_bot(id) )
    {
    
message_beginMSG_ONE,gmsgScreenFade,{0,0,0},id )            
    
write_shortduration )            // fade lasts this long duration
    
write_shortholdtime )            // fade lasts this long hold time
    
write_shortfadetype )            // fade type (in / out)
    
write_bytered )                // fade red
    
write_bytegreen )                // fade green
    
write_byteblue )                // fade blue
    
write_bytealpha )                // fade alpha
    
message_end()
    }
}

stock Create_ScoreInfo(id,frags,deaths,playerClass,team ){

    
message_begin(MSG_ALL,gmsgScoreInfo)
    
write_byte(id)
    
write_short(frags)
    
write_short(deaths)
    
write_short(playerClass)
    
write_short(team)
    
message_end()
}

stock Create_TE_SPRITETRAIL(start[3], end[3], iSpritecountlifescalevelocityrandom ){

    
message_beginMSG_BROADCAST,SVC_TEMPENTITY)
    
write_byteTE_SPRITETRAIL )
    
write_coordstart[0] )                // start position (X)
    
write_coordstart[1] )                // start position (Y)
    
write_coordstart[2] )                // start position (Z)
    
write_coordend[0] )                // end position (X)
    
write_coordend[1] )                // end position (Y)
    
write_coordend[2] )                // end position (Z)
    
write_shortiSprite )                // sprite index
    
write_bytecount )                    // count
    
write_bytelife)                    // life in 0.1's
    
write_bytescale)                    // scale in 0.1's
    
write_bytevelocity )                // velocity along vector in 10's
    
write_byterandom )                // randomness of velocity in 10's
    
message_end()
}

stock Create_StatusText(idlinenumbertext[]){

    if( 
is_user_connected(id) && !is_user_bot(id) )
    {

    
message_beginMSG_ONEgmsgStatusText, {0,0,0}, id )
    
write_bytelinenumber )            // line number of status bar text
    
write_stringtext )                // status bar text
    
message_end()
    
    }
}

stock Create_BarTime(iddurationflag){

    if( 
is_user_connected(id) && !is_user_bot(id) )
    {

    
message_beginMSG_ONEgmsgBarTime, {0,0,0}, id )
    
write_byteduration // duration 
    
write_byteflag )
    
message_end() 
    
    }
}

stock Create_TE_BEAMFOLLOW(entityiSpritelifewidthredgreenbluealpha){

    
message_beginMSG_BROADCASTSVC_TEMPENTITY )
    
write_byteTE_BEAMFOLLOW )
    
write_shortentity )            // entity
    
write_shortiSprite )            // model
    
write_bytelife )                // life
    
write_bytewidth )                // width
    
write_bytered )                // red
    
write_bytegreen )                // green
    
write_byteblue )                // blue
    
write_bytealpha )                // brightness
    
message_end()
}

stock Create_TE_BEAMPOINTS(start[3], end[3], iSpritestartFrameframeRatelifewidthnoiseredgreenbluealphaspeed){

    
message_beginMSG_BROADCASTSVC_TEMPENTITY )
    
write_byteTE_BEAMPOINTS )
    
write_coordstart[0] )
    
write_coordstart[1] )
    
write_coordstart[2] )
    
write_coordend[0] )
    
write_coordend[1] )
    
write_coordend[2] )
    
write_shortiSprite )            // model
    
write_bytestartFrame )        // start frame
    
write_byteframeRate )            // framerate
    
write_bytelife )                // life
    
write_bytewidth )                // width
    
write_bytenoise )                // noise
    
write_bytered)                // red
    
write_bytegreen )                // green
    
write_byteblue )                // blue
    
write_bytealpha )                // brightness
    
write_bytespeed )                // speed
    
message_end()
}

stock Create_TE_BEAMENTS(startEntityendEntityiSpritestartFrameframeRatelifewidthnoiseredgreenbluealphaspeed){

    
message_beginMSG_BROADCASTSVC_TEMPENTITY )
    
write_byteTE_BEAMENTS )
    
write_shortstartEntity )        // start entity
    
write_shortendEntity )        // end entity
    
write_shortiSprite )            // model
    
write_bytestartFrame )        // starting frame
    
write_byteframeRate )            // frame rate
    
write_bytelife )                // life
    
write_bytewidth )                // line width
    
write_bytenoise )                // noise amplitude
    
write_bytered )                // red
    
write_bytegreen )                // green
    
write_byteblue )                // blue
    
write_bytealpha )                // brightness
    
write_bytespeed )                // scroll speed
    
message_end()
}

stock Create_TE_ELIGHT(entitystart[3], radiusredgreenbluelifedecayRate){

    
message_beginMSG_BROADCASTSVC_TEMPENTITY )
    
write_byteTE_ELIGHT )
    
write_shortentity )            // entity
    
write_coordstart[0] )            // initial position
    
write_coordstart[1] )            // initial position
    
write_coordstart[2] )            // initial position
    
write_coordradius )            // radius
    
write_bytered )                // red
    
write_bytegreen )                // green
    
write_byteblue )                // blue
    
write_bytelife )                // life
    
write_coorddecayRate )        // decay rate
    
message_end()
}

stock Create_TE_SPRAY(position[3], direction[3], iSpritecountspeednoiserendermode){

    
message_beginMSG_BROADCAST,SVC_TEMPENTITY 
    
write_byteTE_SPRAY )
    
write_coordposition[0] )        // Position
    
write_coordposition[1] ) 
    
write_coordposition[2] ) 
    
write_coorddirection[0] )        // Direction 
    
write_coorddirection[1] )  
    
write_coorddirection[2] ) 
    
write_shortiSprite )            // Sprite
    
write_bytecount )                // count 
    
write_bytespeed )                // speed 
    
write_bytenoise )                // noise
    
write_byterendermode )        // rendermode
    
message_end() 
}

stock Create_TE_SPRITE(position[3], iSpritescalealpha){

    
message_beginMSG_BROADCAST,SVC_TEMPENTITY 
    
write_byteTE_SPRITE 
    
write_coordposition[0] )        // position)
    
write_coordposition[1] ) 
    
write_coordposition[2] ) 
    
write_shortiSprite )            // sprite index
    
write_bytescale)                // scale in 0.1's
    
write_bytealpha )                // brightness
    
message_end() 
}

stock Create_StatusIcon(idstatussprite[], redgreenblue){

    if( 
is_user_connected(id) && !is_user_bot(id) )
    {

    
message_beginMSG_ONEgmsgStatusIcon, {0,0,0}, id 
    
write_bytestatus )            // status 
    
write_stringsprite )            // sprite name 
    
write_bytered )                // red 
    
write_bytegreen )                // green 
    
write_byteblue )                // blue 
    
message_end()
    
    }
}

stock Create_TE_LARGEFUNNEL(position[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() 
}

stock Create_TE_PLAYERATTACHMENT(identityvOffsetiSpritelife){

    if( 
is_user_connected(id) && !is_user_bot(id) )
    {

    
message_beginMSG_ONESVC_TEMPENTITY, { 00}, id )
    
write_byteTE_PLAYERATTACHMENT )
    
write_byteentity )            // entity
    
write_coordvOffset )            // vertical offset ( attachment origin.z = player origin.z + vertical offset )
    
write_shortiSprite )            // model index
    
write_shortlife )                // (life * 10 )
    
message_end()
    
    }
}
    
stock Create_TE_TELEPORT(position[3]){

    
message_beginMSG_PVSSVC_TEMPENTITYposition
    
write_byteTE_TELEPORT 
    
write_coordposition[0] ) 
    
write_coordposition[1] ) 
    
write_coordposition[2] ) 
    
message_end()

__________________
☜ 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:08   Re: can i make MSG_PVS or MSG_BRADCAST not be shown to specific players? possible?
Reply With Quote #2

Don't need that .


PHP Code:
// 23 comes from temp entity message, for other messages use get_user_msgid()
// in plugin_init()
register_message("23","msg_tempentity")

public 
msg_tempentity(msg_id,msg_dest,ent)
{
        
// do stuff
        
return PLUGIN_HANDLED // to block it

__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 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 02:20.


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