Raised This Month: $ Target: $400
 0% 

A dummy question about addtofullpack


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tuty
Veteran Member
Join Date: Jul 2008
Location: UK
Old 03-12-2011 , 05:05   A dummy question about addtofullpack
Reply With Quote #1

Like title said, i want to glow some entities on addtofullpack forward. i want only that player who has that ability to see entities glowing. But i tried something like this but doesn't work

PS: code isn't indented but you know what i am talking about

PHP Code:
register_forwardFM_AddToFullPack"forward_AddToFullPackPost");
        
public 
forward_AddToFullPackPostes_handleeenthosthostflagsplayerpSet )
{
    if( !
player || !is_user_alivehost ) || !pev_valident ) )
    {
        return 
FMRES_IGNORED;
    }
     
    new 
szClassname30 ];
    
peventpev_classnameszClassnamecharsmaxszClassname ) );
        
        if( 
equalszClassname"hostage_entity" ) )
        {
               
set_eses_handleES_RenderFxkRenderFxGlowShell );
        
set_eses_handleES_RenderColor, { 127255} );
        
set_eses_handleES_RenderAmt13 );
         }

        return 
FMRES_IGNORED;

__________________
tuty is offline
Send a message via ICQ to tuty Send a message via AIM to tuty
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-12-2011 , 07:34   Re: A dummy question about addtofullpack
Reply With Quote #2

if( !player )

This check will exit the function each time the entity passed is not a player...
Also, you would have better to do an internal plugin system to check if the entity is an hostage, may be an array, will be faster than check classname.

Code:
AddToFullPack

Return 1 if the entity state has been filled in for the ent and the entity will be propagated to the client, 0 otherwise

state is the server maintained copy of the state info that is transmitted to the client
a MOD could alter values copied into state to send the "host" a different look for a particular entity update, etc.
e and ent are the entity that is being added to the update, if 1 is returned
host is the player's edict of the player whom we are sending the update to
player is 1 if the ent/e is a player and 0 otherwise
pSet is either the PAS or PVS that we previous set up.  We can use it to ask the engine to filter the entity against the PAS or PVS.
we could also use the pas/ pvs that we set in SetupVisibility, if we wanted to.  Caching the value is valid in that case, but still only for the current frame
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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 14:31.


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