Raised This Month: $ Target: $400
 0% 

Entity Touch


Post New Thread Reply   
 
Thread Tools Display Modes
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
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 11-28-2010 , 15:45   Re: Entity Touch
Reply With Quote #2

You can set pev_owner to a player id and it will act like SOLID_NOT for that player. All other players will abide by the normal solid flag.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Old 11-28-2010, 15:50
Kiske
This message has been deleted by Kiske.
Kiske
Veteran Member
Join Date: May 2009
Old 11-28-2010 , 16:30   Re: Entity Touch
Reply With Quote #4

I do not understand.
No where to put that code.

A small example please.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-28-2010 , 16:34   Re: Entity Touch
Reply With Quote #5

Let's start to describe what your plugin does.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Kiske
Veteran Member
Join Date: May 2009
Old 11-28-2010 , 17:41   Re: Entity Touch
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
Let's start to describe what your plugin does.
It is a wall (fake) with model that when you touched it becomes transparent and can pass through.

Sorry for my english, i use the translate google.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
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 11:25.


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