|
- #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/camper.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/camper.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;
- }
- }
复制代码 |
|