用这个方法简单但不能透过障碍物看到图标

#include < amxmodx >
#include < fakemeta >
#include < engine >
new Diamond[ 33 ];
public plugin_init() register_forward( FM_AddToFullPack, "AddToFullPack_Post", true );
public plugin_precache() precache_model( "sprites/ctteammate.spr" );
public AddToFullPack_Post( ES_Handle, e, iEntity, iHost, iHostFlags, iPlayer, iSet )
{
if( iEntity == Diamond[ iHost ] ) set_es( ES_Handle, ES_Effects, EF_NODRAW );
if( !iPlayer ) return;
if( !is_valid_ent( Diamond[ iEntity ] ) )
{
Diamond[ iEntity ] = create_entity( "env_sprite" );
engfunc( EngFunc_SetModel, Diamond[ iEntity ], "sprites/ctteammate.spr" );
set_rendering( Diamond[ iEntity ], kRenderFxNone, 255, 255, 255, kRenderTransAdd, 255 );
DispatchKeyValue( Diamond[ iEntity ], "scale", "0.5" );
DispatchKeyValue( Diamond[ iEntity ], "framerate", "10.0" );
DispatchSpawn( Diamond[ iEntity ] )
}
static Float: org[ 3 ], Float: ofs[ 3 ];
get_es( ES_Handle, ES_Origin, org );
get_es( ES_Handle, ES_Maxs, ofs );
org[ 2 ] += ofs[ 2 ];
set_pev( Diamond[ iEntity ], pev_origin, org );
}
public client_disconnect( Client )
{
if( is_valid_ent( Diamond[ Client ] ) )
{
remove_entity( Diamond[ Client ] );
Diamond[ Client ] = 0;
}
}
