找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1173|回复: 10

【已解决】 求关闭水纹理!

[复制链接]

该用户从未签到

发表于 2010-11-2 20:31:08 | 显示全部楼层 |阅读模式
怎么能关闭水纹理?
水纹理 会让我跳图的时候 变卡 FPS 低~
之前在FTW 服务器 关闭了 水纹理 结果跳起来 那个爽啊~ 流畅死了~
谁 有 ~先说谢谢了

该用户从未签到

发表于 2010-11-2 20:55:40 | 显示全部楼层
不知道  这不是长久之计吧  所以 换机器吧

该用户从未签到

发表于 2010-11-2 21:11:16 | 显示全部楼层
不懂啊。   我跳的一直很不流畅!  




60秒。要求该成3小时!

该用户从未签到

发表于 2010-11-2 21:13:23 | 显示全部楼层
赛盟长跳服有,论坛也有很多人发过,我家也收藏了,现在手机没办法帮你…

该用户从未签到

发表于 2010-11-2 21:27:37 | 显示全部楼层
自己去找原来的老帖里面有 叫什么in什么的

该用户从未签到

 楼主| 发表于 2010-11-2 22:35:21 | 显示全部楼层
4L 你回家可以发上来吗~谢谢

该用户从未签到

发表于 2010-11-3 10:41:15 | 显示全部楼层
点我签名

该用户从未签到

 楼主| 发表于 2010-11-3 14:34:27 | 显示全部楼层
楼上的 你那插件好多个 是下载那一个?
还有我是用 正版cs的 可以用吗?

该用户从未签到

发表于 2010-11-3 15:45:21 | 显示全部楼层
回复 8# q812632767


    下载整合插件包,从里面找出invis插件。正版CS完全可以用。

该用户从未签到

发表于 2010-11-3 18:26:09 | 显示全部楼层
  1. #include <amxmodx>
  2. #include <engine>
  3. #include <fakemeta>
  4. #include <hamsandwich>

  5. #pragma semicolon 1

  6. #define MAX_ENTITYS 900+15*32 // (900+15*SERVER_SLOTS) is the calculation cs uses but it can be bypassed by the "-num_edicts <x>"-parameter

  7. new bool:g_bPlayerInvisible[33];
  8. new bool:g_bWaterInvisible[33];

  9. new bool:g_bWaterEntity[MAX_ENTITYS];
  10. new bool:g_bWaterFound;

  11. new g_iSpectatedId[33];

  12. public plugin_init( )
  13. {
  14. register_plugin( "Invis", "2.0", "SchlumPF" );

  15. register_clcmd( "say /invis", "menuInvisDisplay" );
  16. register_menucmd( register_menuid( "\rInvisibility - SchlumPF^n^n" ), 1023, "menuInvisAction" );

  17. register_forward( FM_AddToFullPack, "fwdAddToFullPack_Post", 1 );
  18. RegisterHam( Ham_Spawn, "player", "hamSpawnPlayer_Post", 1 );

  19. register_event( "SpecHealth2", "eventSpecHealth2", "bd" );
  20. }

  21. public plugin_cfg( )
  22. {
  23. // precache in a boolean variable whether an entity is func_water or not.
  24. // this will save a lot performance since AddToFullPack is called very often.
  25. // i could set the ents iuser variable to avoid using such a huge variable
  26. // and problems with the "-num_edicts" parameter but this is a lot faster
  27. // than retrieving pev_iuser in AddToFullPack. another way would have been
  28. // using a binary system to store the data in less than a huge array but in
  29. // fact a huge array takes a few kb ram which is for me less than a constant
  30. // usage of the cpu since i would need to use a few operators to read the data
  31. // out of the bianry system. all in all a binary storing system is at least a good
  32. // alternative which some iuser variable of the private ent values (pev) would not be.

  33. new ent = -1;
  34. while( ( ent = find_ent_by_class( ent, "func_water" ) ) != 0 )
  35. {
  36. // pev( ent, pev_skin ) == CONTENTS_WATER is also true on func_water entities

  37. if( !g_bWaterFound )
  38. {
  39. g_bWaterFound = true;
  40. }

  41. g_bWaterEntity[ent] = true;
  42. }

  43. // thanks to connor for finding the following two detections
  44. ent = -1;
  45. while( ( ent = find_ent_by_class( ent, "func_illusionary" ) ) != 0 )
  46. {
  47. if( pev( ent, pev_skin ) == CONTENTS_WATER )
  48. {
  49. if( !g_bWaterFound )
  50. {
  51. g_bWaterFound = true;
  52. }

  53. g_bWaterEntity[ent] = true;
  54. }
  55. }

  56. ent = -1;
  57. while( ( ent = find_ent_by_class( ent, "func_conveyor" ) ) != 0 )
  58. {
  59. if( pev( ent, pev_spawnflags ) == 3 )
  60. {
  61. if( !g_bWaterFound )
  62. {
  63. g_bWaterFound = true;
  64. }

  65. g_bWaterEntity[ent] = true;
  66. }
  67. }
  68. }

  69. public fwdAddToFullPack_Post( es_handle, e, ent, host, hostflags, player, pset )
  70. {
  71. if( player && g_bPlayerInvisible[host] && host != ent && ent != g_iSpectatedId[host] )
  72. {
  73. static const Float:corner[8][3] =
  74. {
  75. { -4096.0, -4096.0, -4096.0 },
  76. { -4096.0, -4096.0, 4096.0 },
  77. { -4096.0, 4096.0, -4096.0 },
  78. { -4096.0, 4096.0, 4096.0 },
  79. { 4096.0, -4096.0, -4096.0 },
  80. { 4096.0, -4096.0, 4096.0 },
  81. { 4096.0, 4096.0, -4096.0 },
  82. { 4096.0, 4096.0, 4096.0 }
  83. };

  84. // rounded; distance from the map's center to the corners; sqrt( 4096^2 + 4096^2 + 4096^2 )
  85. static const Float:map_distance = 7094.480108;

  86. static Float:origin[3];
  87. get_es( es_handle, ES_Origin, origin );

  88. static i;
  89. while( get_distance_f( origin, corner[i] ) > map_distance )
  90. {
  91. if( ++i >= sizeof( corner ) )
  92. {
  93. // better to nullify the varibale now then doing it each time before the loop
  94. i = 0;
  95. }
  96. }

  97. set_es( es_handle, ES_Origin, corner[i] );
  98. set_es( es_handle, ES_Effects, get_es( es_handle, ES_Effects ) | EF_NODRAW );
  99. }
  100. else if( g_bWaterInvisible[host] && g_bWaterEntity[ent])
  101. {
  102. set_es( es_handle, ES_Effects, get_es( es_handle, ES_Effects ) | EF_NODRAW );
  103. }
  104. }

  105. public hamSpawnPlayer_Post( plr )
  106. {
  107. g_iSpectatedId[plr] = 0;
  108. }

  109. // thanks to xPaw who told me about this event
  110. public eventSpecHealth2( plr )
  111. {
  112. g_iSpectatedId[plr] = read_data( 2 );
  113. }

  114. public menuInvisDisplay( plr )
  115. {
  116. static menu[256];

  117. new len = formatex( menu, 255, "\rInvisibility - SchlumPF^n^n" );

  118. len += formatex( menu[len], 255 - len, "\r1. \wPlayers: %s^n", g_bPlayerInvisible[plr] ? "invisible" : "visible" );

  119. if( g_bWaterFound )
  120. {
  121. len += formatex( menu[len], 255 - len, "\r2. \wWater: %s^n", g_bWaterInvisible[plr] ? "invisible" : "visible" );
  122. }
  123. //else
  124. //{
  125. // len += formatex( menu[len], 255 - len, "\r2. \wWater: There is no water on this map!^n" );
  126. //}

  127. len += formatex( menu[len], 255 - len, "^n\r0. \wExit" );

  128. show_menu( plr, ( 1<<0 | 1<<1 | 1<<9 ), menu, -1 );

  129. return PLUGIN_HANDLED;
  130. }

  131. public menuInvisAction( plr, key )
  132. {
  133. switch( key )
  134. {
  135. case 0:
  136. {
  137. g_bPlayerInvisible[plr] = !g_bPlayerInvisible[plr];
  138. menuInvisDisplay( plr );
  139. }
  140. case 1:
  141. {
  142. if( g_bWaterFound )
  143. {
  144. g_bWaterInvisible[plr] = !g_bWaterInvisible[plr];
  145. }

  146. menuInvisDisplay( plr );
  147. }
  148. case 9: show_menu( plr, 0, "" );
  149. }
  150. }

  151. public client_connect( plr )
  152. {
  153. g_bPlayerInvisible[plr] = false;
  154. g_bWaterInvisible[plr] = false;
  155. g_iSpectatedId[plr] = 0;
  156. }
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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