Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2|回复: 0
打印 上一主题 下一主题

[代码|Code]挂在头上的图标|Head Icon

[复制链接]

189

主题

189

帖子

580

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
580
跳转到指定楼层
楼主
发表于 2017-7-13 16:27:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

  1. #include < amxmodx >
  2. #include < fakemeta >
  3. #include < engine >

  4. new Diamond[ 33 ];

  5. public plugin_init() register_forward( FM_AddToFullPack, "AddToFullPack_Post", true );

  6. public plugin_precache() precache_model( "sprites/camper.spr" );

  7. public AddToFullPack_Post( ES_Handle, e, iEntity, iHost, iHostFlags, iPlayer, iSet )
  8. {
  9.         if( iEntity == Diamond[ iHost ] ) set_es( ES_Handle, ES_Effects, EF_NODRAW );

  10.         if( !iPlayer ) return;

  11.         if( !is_valid_ent( Diamond[ iEntity ] ) )
  12.         {
  13.                 Diamond[ iEntity ] = create_entity( "env_sprite" );
  14.                 engfunc( EngFunc_SetModel, Diamond[ iEntity ], "sprites/camper.spr" );
  15.                 set_rendering( Diamond[ iEntity ], kRenderFxNone, 255, 255, 255, kRenderTransAdd, 255 );
  16.                 DispatchKeyValue( Diamond[ iEntity ], "scale", "0.5" );
  17.                 DispatchKeyValue( Diamond[ iEntity ], "framerate", "10.0" );
  18.                 DispatchSpawn( Diamond[ iEntity ] )
  19.         }

  20.         static Float: org[ 3 ], Float: ofs[ 3 ];
  21.         get_es( ES_Handle, ES_Origin, org );
  22.         get_es( ES_Handle, ES_Maxs, ofs );
  23.         org[ 2 ] += ofs[ 2 ];
  24.         set_pev( Diamond[ iEntity ], pev_origin, org );
  25. }

  26. public client_disconnect( Client )
  27. {
  28.         if( is_valid_ent( Diamond[ Client ] ) )
  29.         {
  30.                 remove_entity( Diamond[ Client ] );
  31.                 Diamond[ Client ] = 0;
  32.         }
  33. }
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Comsenz Inc.  

GMT+8, 2026-10-26 05:55 , Processed in 0.223533 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表