|
Author
|
Message
|
|
Veteran Member
|

11-28-2010
, 15:19
Entity Touch
|
#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_forward( FM_Touch, "FORWARD_FMTouch", 0 )
public FORWARD_FMTouch( iEntity, Index ) { if ( !is_valid_ent( Index ) || !is_valid_ent( iEntity ) ) return FMRES_IGNORED; static szEntClassName[32]; entity_get_string( iEntity, EV_SZ_classname, szEntClassName, 31 ) if ( equal( szEntClassName, "Entidad_04" ) ) { if ( is_user_alive( Index ) ) { if ( !task_exists( TASK_NOTSOLID + iEntity ) && !task_exists( TASK_SOLID + iEntity ) ) set_task( 0.09, "FUNCTION_EntityNotSolid", TASK_NOTSOLID + iEntity ) } }
return FMRES_IGNORED; }
public FUNCTION_EntityNotSolid( iEntity ) { iEntity -= TASK_NOTSOLID if ( is_valid_ent( iEntity ) ) { set_pev( iEntity, pev_solid, SOLID_NOT ) set_pev( iEntity, pev_rendermode, kRenderTransAdd ) set_pev( iEntity, pev_renderamt, 55.0 ) set_task( 0.9, "FUNCTION_EntitySolid", TASK_SOLID + iEntity ) } }
public FUNCTION_EntitySolid( iEntity ) { iEntity -= TASK_SOLID if ( is_valid_ent(iEntity) ) { set_pev( iEntity, pev_solid, SOLID_BBOX ) set_pev( iEntity, pev_rendermode, kRenderNormal ) } }
__________________
|
|
|
|