|
之前我发了个Ryu版扔钱的模仿插件,给安乐X乐的个别人说我是去集成别人的插件,这个我先不去说,让我们先来看一看几个代码!- public check_start_maxmoney()
- {
- g_maxmoney = get_cvar_num("amx_maxmoney")
- if(g_maxmoney<16000)
- g_maxmoney = 16000
- g_startmoney = get_cvar_num("amx_startmoney")
- if(g_startmoney>g_maxmoney)
- g_startmoney = g_maxmoney
- else if(g_startmoney<800)
- g_startmoney=800
- set_cvar_num("amx_maxmoney", g_maxmoney)
- set_cvar_num("amx_startmoney", g_startmoney)
- }
- public read_gmsg_Money(id)
- {
- check_start_maxmoney()
- new current_total = read_data(1) //变化后当前真正的钱
- new newmoney
- if(current_total%5==1) //只有是CS给予玩家默认的第一局钱,其尾数才可能是1或6,游戏中真正加减钱都会是5的倍数
- {
- total_money[id] = 0
- newmoney = g_startmoney
- }else{
- if(total_money[id]>MONEY_TIER)
- newmoney = total_money[id] - MONEY_TIER + current_total
- else if(total_money[id]%5==1)
- newmoney = current_total+1
- else
- newmoney = current_total
- }
- native_cs_set_user_money2(id, newmoney, 1)
- }
复制代码 上面这个是R版的giveoutmoney插件的
再看看下面这个- public read_gmsg_Money(id) {
- if(!is_user_connected(id)) return PLUGIN_HANDLED
-
- new current_total = read_data(1)
-
- if(current_total == 801){ // If CS is spawning you with mp_startmoney default
- current_total = get_pcvar_num(amx_startmoney) // current total is actually amx_startmoney
- cs_set_user_money(id, current_total,0) // so set user money to amx_startmoney
- money_total[id] = 0 // reset
- }
- if(current_total >= MONEY_TIER && !money_total[id]) // If first time above MONEY_TIER
- {
- money_total[id] = current_total // Keep track of current total
-
- send_moneymsg(id,current_total-MONEY_TIER,read_data(2)) // send money msg of current total
-
- return PLUGIN_CONTINUE
- }
- if(money_total[id]) // If was over tier on last money message
- {
- money_total[id] += current_total - MONEY_TIER // figure the term of current total - tier
-
- if(money_total[id] < MONEY_TIER){ // If less then tier set user money to money_total[id] and stop keeping track
- cs_set_user_money(id,money_total[id],1)
- money_total[id] = 0
- }
- else{
- send_moneymsg(id,current_total-MONEY_TIER,read_data(2)) // else send money message
- }
-
- return PLUGIN_CONTINUE
- }
-
- return PLUGIN_CONTINUE
- }
复制代码 这个是"NL)Ramon(NL"的" Unlimited Money"插件里面的!
还有一个- public read_gmsg_Money(id)
- {
- new current_total = read_data(1)
-
- if(current_total == 801) // If CS is spawning you with mp_startmoney default
- {
- current_total = get_cvar_num("amx_startmoney") // current total is actually amx_startmoney
- cs_set_user_money(id, current_total,0) // so set user money to amx_startmoney
- money_total[id] = 0 // reset
- }
- if(current_total >= MONEY_TIER && !money_total[id]) // If first time above MONEY_TIER
- {
- money_total[id] = current_total // Keep track of current total
- send_moneymsg(id,1) // send money msg of current total
- return PLUGIN_CONTINUE
- }
- if(money_total[id]) // If was over tier on last money message
- {
- money_total[id] += current_total - MONEY_TIER // figure the term of current total - tier
- if(money_total[id] < MONEY_TIER) // If less then tier set user money to money_total[id] and stop keeping track
- {
- cs_set_user_money(id,money_total[id],1)
- money_total[id] = 0
- }
- else
- {
- send_moneymsg(id,1) // else send money message
- }
-
- return PLUGIN_CONTINUE
- }
- return PLUGIN_CONTINUE
- }
复制代码 最后这个是 Zhao的First Killer Rewad插件里面的!
我个人看法是这样的,觉得他们并没有谁去抄谁的插件,只是这个代码就是要这么写!
再说,我模仿的那个插件跟R版的有点不一样!R版是用菜单来实现的,我的是用丢小刀来发钱的!
还有就是用到的函数,我是在官方网的教程里面学的,再加上参考一下其它人写的代码,就是这样,
如果我这样写的代码,连我自己的名字都不加!那我也无话可说!
在这里我再发一下那个教程给大家看看!看我说的是不是假的!
请点击这里
最好能请R版亲自来指点一下!看我这个是不是集成别人的插件!
如果是,我二话不说,马上把源码删掉!还有,我觉得点通有很多人还是可以的!
我们根本就不用老是跑到国外去求助!只要你们愿意站出来,我们中国人永远都不会去输给其它国家的人! |
|