搜索
查看: 4038|回复: 6

[AMXX 带源码] enterleave.sma 编译不了。

[复制链接]
发表于 2009-3-9 01:23:25 | 显示全部楼层 |阅读模式 来自 中国–广东–珠海–香洲区
为什么不编译会出错?内容:fatal error 100: cannot read from file:"Li_geoip"
用过几个编译工具了。附上源码:
  1. /*此插件和 li_geoip 模块和 点通签名插件以及 Statx 插件配套使用.
  2. *如有问题请到点通论坛提问.*/

  3. #include <amxmodx>
  4. #include <csstats>
  5. #include <unlimited_money>
  6. #include "li_geoip"
  7. #include "signs"

  8. #define PLUGIN_NAME "DT-EnterLeave"
  9. #define PLUGIN_VERSION "1.0"
  10. #define PLUGIN_AUTHOR "ahcat"

  11. #define STATS_KILLS 0
  12. #define STATS_DEATHS 1
  13. #define STATS_HS 2
  14. #define STATS_TKS 3
  15. #define STATS_SHOTS 4
  16. #define STATS_HITS 5
  17. #define STATS_DAMAGE 6

  18. new g_JoinedTeam[33]
  19. new g_SpecMode[33]
  20. new szName[32]
  21. new g_msgid

  22. new rank[8]
  23. new iRankPos


  24. public plugin_init(){
  25.        
  26.         register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
  27.        
  28. //        register_event( "TeamInfo", "EventJoinedTeam", "a", "2!UNASSIGNED");
  29.        
  30.         register_event( "StatusValue", "DisplayInfo", "bd", "1=2");
  31.        
  32.         register_event( "TextMsg", "SetSpecMode", "bd", "2&ec_Mod");
  33.        
  34.         g_msgid = get_user_msgid("SayText");
  35. }

  36. public client_connect(id){       
  37.         g_JoinedTeam[id] = 0;
  38. }

  39. public EventJoinedTeam(){
  40.        
  41.         new id=read_data(1);
  42.         if( g_JoinedTeam[id] == 0){
  43.                 g_JoinedTeam[id]=1;
  44.                 get_user_name( id, szName, 31);

  45.                 new szIP[16], szCountry[40], szArea[64];
  46.                 get_user_ip( id, szIP, 15, 1);
  47.                 get_ipinfo( szIP, szCountry, szArea, 39, 63);
  48.                
  49.                 new izStats[8], izBody[8];
  50.                 new iRankMax;
  51.                 new szMessage[192];
  52.                 iRankPos = get_user_stats( id, izStats, izBody);
  53.                 iRankMax = get_statsnum();

  54.        
  55.                 format( szMessage, 191, "^x01* 欢迎【^x04%s^x01】^x03%s^x01【排名】^x04%d^x01(共^x04%d^x01)^x04%s",iRank(), szName, iRankPos, iRankMax, szCountry, szArea);
  56.                 display_chat( szMessage);               
  57.                 new szSignature[96];

  58.                 if( dt_getsign( szName, szSignature, 95)){       
  59.                         format( szMessage, 191, "^x01* 【^x04个性签名^x01】^x04%s", szSignature);
  60.                         display_chat( szMessage);
  61.                 }
  62.                
  63.         }
  64. }


  65. /*
  66. public client_disconnect(id){
  67.         get_user_name( id, szName, 31);       
  68.         new szMessage[128];
  69.         format( szMessage, 128,"^x01* 【^x04%s^x01】^x03%s^x01 离开了游戏", iRank(), szName);       
  70.         display_chat( szMessage);
  71. }
  72. */

  73. public SetSpecMode(id){       
  74.         new arg[12];
  75.         read_data( 2, arg, 11);
  76.         g_SpecMode[id] = ( arg[10] == '4' );
  77. }

  78. public DisplayInfo(id){

  79.         if ( g_SpecMode[id]){
  80.                
  81.                 new player = read_data(2);
  82.                 if ( is_user_connected( player)){
  83.                        
  84.                         new szName[32];
  85.                         get_user_name( player, szName, 31);
  86.                        
  87.                         new szIP[16], szCountry[40], szArea[64];
  88.                         get_user_ip( player, szIP, 15, 1);
  89.                         get_ipinfo( szIP, szCountry, szArea, 39, 63);
  90.                        
  91.                         new izStats[8], izBody[8];
  92. //                        new iRankMax;
  93.                         iRankPos = get_user_stats( player, izStats, izBody);
  94. //                        iRankMax = get_statsnum();
  95.                        
  96. //                        new szSignature[96], HasSignature;
  97. //                        HasSignature = dt_getsign( szName, szSignature, 95);
  98.                        
  99.                         new Money
  100.                         Money = cs_get_user_money2(player)
  101.                        
  102.                         new szMessage[256];
  103.                         format( szMessage, 255, "【%s】%s ^n排名:  %d  杀敌:  %d  爆头:  %d  金钱:  %d  ^n来自: %s  %s",
  104.                                 iRank(),
  105.                                 szName,
  106.                                 iRankPos,
  107.                                 izStats[STATS_KILLS],
  108.                                 izStats[STATS_HS],
  109.                                 Money,
  110.                                 szCountry,
  111.                                 szArea);
  112.                        
  113.                         set_hudmessage( 255, 250, 250, -1.0, 0.80, 0, 6.0, 8.0, 0.5, 0.15, 1) ;                       
  114.                         show_hudmessage( id, szMessage);
  115.                 }
  116.         }
  117. }

  118. get_ipinfo( szIP[], szCountry[], szArea[], clen, alen){
  119.        
  120.         //可能 li_geoip 模块将 192.168.*.* 网段固定为"内网用户", 这里提供修改的办法.
  121.         if( strfind( szIP, "192.168.") == 1){
  122.                
  123.                 /*修改成你自己的网吧的地区名*/
  124.                 copy( szCountry, clen, "***内网***");
  125.                
  126.                 /*修改成你自己的网吧的名称*/
  127.                 copy( szArea, alen, "“六联网吧”CS服务器");
  128.         }
  129.         else
  130.                 geoip_info( szIP, szCountry, szArea, clen, alen);
  131. }

  132. display_chat( szMessage[]){
  133.        
  134.         message_begin( MSG_ALL, g_msgid);
  135.         write_byte(1);
  136.         write_string( szMessage);
  137.         message_end();
  138. }

  139. //进出服务器级别定义开始
  140. public iRank(){       

  141.                 if(iRankPos<=10)
  142.                         rank = "上将"
  143.                 else
  144.                         {
  145.                                 if(iRankPos<=20)
  146.                                         rank = "中将"
  147.                                 else
  148.                                         {
  149.                                                 if(iRankPos<=40)
  150.                                                         rank = "少将"
  151.                                                 else
  152.                                                         {
  153.                                                                 if(iRankPos<=70)
  154.                                                                         rank = "大校"
  155.                                                                 else
  156.                                                                         {
  157.                                                                                 if(iRankPos<=110)
  158.                                                                                         rank = "上校"
  159.                                                                                 else
  160.                                                                                         {
  161.                                                                                         if(iRankPos<=160)
  162.                                                                                                 rank = "中校"
  163.                                                                                         else
  164.                                                                                                 {
  165.                                                                                                         if(iRankPos<=220)
  166.                                                                                                                 rank = "少校"
  167.                                                                                                         else
  168.                                                                                                                 {
  169.                                                                                                                         if(iRankPos<=290)
  170.                                                                                                                                 rank = "上尉"
  171.                                                                                                                         else
  172.                                                                                                                                 {
  173.                                                                                                                                         if(iRankPos<=370)
  174.                                                                                                                                                 rank = "中尉"
  175.                                                                                                                                         else
  176.                                                                                                                                                 {
  177.                                                                                                                                                         if(iRankPos<=460)
  178.                                                                                                                                                                 rank = "少尉"
  179.                                                                                                                                                         else
  180.                                                                                                                                                                 rank = "列兵"                               
  181.                         }        }                }                }                }        }                }                }                }
  182.                 return        rank
  183. }
复制代码
发表于 2009-3-9 02:34:28 | 显示全部楼层 来自 中国–江苏–南京
fatal error 100: cannot read from file:"Li_geoip"
加载Li_geoip模块就可以了
回复

使用道具 举报

 楼主| 发表于 2009-3-9 13:33:44 | 显示全部楼层 来自 中国–广东–珠海
本帖最后由 filly 于 2009-3-9 14:24 编辑
fatal error 100: cannot read from file:"Li_geoip"
加载Li_geoip模块就可以了


我已经把Li_geoip_amxx.dll放在modules里面,然后在lodules.ini里面添加了加载,不过加载会提示不成功,不知道怎么解决。
请问如何加载????
回复

使用道具 举报

发表于 2009-3-11 13:42:48 | 显示全部楼层 来自 中国–广东–韶关
缺少模块,我帮你编译上来了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

 楼主| 发表于 2009-3-12 12:49:00 | 显示全部楼层 来自 中国–广东–珠海
是缺少了ins文件,我已经解决了,还是谢谢
8874323

版主
回复

使用道具 举报

发表于 2011-9-16 16:47:35 | 显示全部楼层 来自 中国–山东–淄博
我来看看吧 哈
回复

使用道具 举报

发表于 2014-1-23 10:46:36 | 显示全部楼层 来自 中国–河南–濮阳
 不错!下载来用一用!
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

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