搜索
查看: 3011|回复: 4

[AMXX 带源码] 有兴趣的人可以进来讨论一下

[复制链接]
发表于 2009-7-31 13:10:09 | 显示全部楼层 |阅读模式 来自 中国–广东–东莞
之前我发了个Ryu版扔钱的模仿插件,给安乐X乐的个别人说我是去集成别人的插件,这个我先不去说,让我们先来看一看几个代码!
  1. public check_start_maxmoney()
  2. {
  3.         g_maxmoney = get_cvar_num("amx_maxmoney")
  4.         if(g_maxmoney<16000)
  5.                 g_maxmoney = 16000
  6.         g_startmoney = get_cvar_num("amx_startmoney")
  7.         if(g_startmoney>g_maxmoney)
  8.                 g_startmoney = g_maxmoney
  9.         else if(g_startmoney<800)
  10.                 g_startmoney=800
  11.         set_cvar_num("amx_maxmoney", g_maxmoney)
  12.         set_cvar_num("amx_startmoney", g_startmoney)
  13. }

  14. public read_gmsg_Money(id)
  15. {
  16.         check_start_maxmoney()
  17.         new current_total = read_data(1)   //变化后当前真正的钱
  18.         new newmoney
  19.         if(current_total%5==1)  //只有是CS给予玩家默认的第一局钱,其尾数才可能是1或6,游戏中真正加减钱都会是5的倍数
  20.         {
  21.                 total_money[id] = 0
  22.                 newmoney = g_startmoney
  23.         }else{
  24.                 if(total_money[id]>MONEY_TIER)
  25.                         newmoney = total_money[id] - MONEY_TIER + current_total
  26.                 else if(total_money[id]%5==1)
  27.                         newmoney = current_total+1
  28.                 else
  29.                         newmoney = current_total
  30.         }
  31.         native_cs_set_user_money2(id, newmoney, 1)
  32. }
复制代码
上面这个是R版的giveoutmoney插件的
再看看下面这个
  1. public read_gmsg_Money(id) {
  2.         if(!is_user_connected(id)) return PLUGIN_HANDLED
  3.        
  4.         new current_total = read_data(1)
  5.        
  6.         if(current_total == 801){         // If CS is spawning you with mp_startmoney default
  7.                 current_total = get_pcvar_num(amx_startmoney)      // current total is actually amx_startmoney
  8.                 cs_set_user_money(id, current_total,0)         // so set user money to amx_startmoney
  9.                 money_total[id] = 0 // reset
  10.         }
  11.         if(current_total >= MONEY_TIER && !money_total[id]) // If first time above MONEY_TIER
  12.         {
  13.                 money_total[id] = current_total // Keep track of current total
  14.                
  15.                 send_moneymsg(id,current_total-MONEY_TIER,read_data(2)) // send money msg of current total
  16.                
  17.                 return PLUGIN_CONTINUE
  18.         }
  19.         if(money_total[id]) // If was over tier on last money message
  20.         {
  21.                 money_total[id] += current_total - MONEY_TIER  // figure the term of current total - tier
  22.                
  23.                 if(money_total[id] < MONEY_TIER){  // If less then tier set user money to money_total[id] and stop keeping track
  24.                         cs_set_user_money(id,money_total[id],1)
  25.                         money_total[id] = 0
  26.                 }
  27.                 else{
  28.                         send_moneymsg(id,current_total-MONEY_TIER,read_data(2)) // else send money message
  29.                 }
  30.                
  31.                 return PLUGIN_CONTINUE
  32.         }
  33.        
  34.         return PLUGIN_CONTINUE
  35. }
复制代码
这个是"NL)Ramon(NL"的" Unlimited Money"插件里面的!
还有一个
  1. public read_gmsg_Money(id)
  2. {       
  3.         new current_total = read_data(1)
  4.        
  5.         if(current_total == 801)                        // If CS is spawning you with mp_startmoney default
  6.         {
  7.                 current_total = get_cvar_num("amx_startmoney")                // current total is actually amx_startmoney
  8.                 cs_set_user_money(id, current_total,0)                        // so set user money to amx_startmoney
  9.                 money_total[id] = 0 // reset
  10.         }
  11.         if(current_total >= MONEY_TIER && !money_total[id]) // If first time above MONEY_TIER
  12.         {
  13.                 money_total[id] = current_total // Keep track of current total
  14.                 send_moneymsg(id,1) // send money msg of current total
  15.                 return PLUGIN_CONTINUE
  16.         }
  17.         if(money_total[id]) // If was over tier on last money message
  18.         {
  19.                 money_total[id] += current_total - MONEY_TIER  // figure the term of current total - tier

  20.                 if(money_total[id] < MONEY_TIER)  // If less then tier set user money to money_total[id] and stop keeping track
  21.                 {
  22.                         cs_set_user_money(id,money_total[id],1)
  23.                         money_total[id] = 0
  24.                 }
  25.                 else
  26.                 {
  27.                         send_moneymsg(id,1) // else send money message
  28.                 }
  29.                
  30.                 return PLUGIN_CONTINUE               
  31.         }

  32.         return PLUGIN_CONTINUE
  33. }
复制代码
最后这个是 Zhao的First Killer Rewad插件里面的!
我个人看法是这样的,觉得他们并没有谁去抄谁的插件,只是这个代码就是要这么写!
再说,我模仿的那个插件跟R版的有点不一样!R版是用菜单来实现的,我的是用丢小刀来发钱的!
还有就是用到的函数,我是在官方网的教程里面学的,再加上参考一下其它人写的代码,就是这样,
如果我这样写的代码,连我自己的名字都不加!那我也无话可说!
在这里我再发一下那个教程给大家看看!看我说的是不是假的!
请点击这里
最好能请R版亲自来指点一下!看我这个是不是集成别人的插件!
如果是,我二话不说,马上把源码删掉!还有,我觉得点通有很多人还是可以的!
我们根本就不用老是跑到国外去求助!只要你们愿意站出来,我们中国人永远都不会去输给其它国家的人!
发表于 2009-7-31 13:31:24 | 显示全部楼层 来自 中国–广东–广州–从化区
支持楼主,有些人自己写不出插件来就说别人抄其他的插件,而且那些人有得到你的源码后又改成自己的名字当作者,那些人太可恶了....楼主不要管那些人..
回复

使用道具 举报

发表于 2009-7-31 16:15:04 | 显示全部楼层 来自 中国–内蒙古–巴彦淖尔
永远走自己的路!!
回复

使用道具 举报

发表于 2009-10-4 20:21:20 | 显示全部楼层 来自 中国–广东–汕尾
我永远支持你!
我们中国人永远都不会去输给其它国家的人!
回复

使用道具 举报

发表于 2012-8-7 21:43:25 | 显示全部楼层 来自 中国–云南–玉溪
永远走自己的路!!
回复

使用道具 举报

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

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