Raised This Month: $ Target: $400
 0% 

Entity Touch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kiske
Veteran Member
Join Date: May 2009
Old 11-28-2010 , 15:19   Entity Touch
Reply With Quote #1

I want to make an entity is SOLID_NOT for which he played, but when you touch it, it becomes SOLID_NOT for everyone.

Code:
PHP Code:
register_forwardFM_Touch"FORWARD_FMTouch")

public 
FORWARD_FMTouchiEntityIndex )
{
    if ( !
is_valid_entIndex ) || !is_valid_entiEntity ) )
        return 
FMRES_IGNORED;
    
    static 
szEntClassName[32];
    
entity_get_stringiEntityEV_SZ_classnameszEntClassName31 )
    
    if ( 
equalszEntClassName"Entidad_04" ) )
    {
        if ( 
is_user_aliveIndex ) )
        {
            if ( !
task_existsTASK_NOTSOLID iEntity ) && !task_existsTASK_SOLID iEntity ) )
                
set_task0.09"FUNCTION_EntityNotSolid"TASK_NOTSOLID iEntity )
        }
    }

    return 
FMRES_IGNORED;
}

public 
FUNCTION_EntityNotSolidiEntity )
{
    
iEntity -= TASK_NOTSOLID
    
    
if ( is_valid_entiEntity ) )
    {
        
set_peviEntitypev_solidSOLID_NOT )
        
set_peviEntitypev_rendermodekRenderTransAdd )
        
set_peviEntitypev_renderamt55.0 )
        
        
set_task0.9"FUNCTION_EntitySolid"TASK_SOLID iEntity )
    }
}

public 
FUNCTION_EntitySolidiEntity )
{
    
iEntity -= TASK_SOLID
    
    
if ( is_valid_ent(iEntity) )
    {
        
set_peviEntitypev_solidSOLID_BBOX )
        
set_peviEntitypev_rendermodekRenderNormal )
    }

__________________

Kiske is offline
Send a message via Skype™ to Kiske
 



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:25.


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