搜索
查看: 10520|回复: 30

[AMXX 带源码] 发个原码,金钱无限,掉钱,小刀杀人奖励,进出显示排名

[复制链接]
发表于 2009-1-31 09:09:39 | 显示全部楼层 |阅读模式 来自 中国–广东–东莞
本帖最后由 yangxi2008 于 2009-1-31 09:14 编辑

考虑到有些人不能下载,这个是原代码,自己复制出来新建立一个文本文档另存为.sma 要UTF-8的,3段代码合并为一个插件,1 2 3楼都要复制啊 不然不要说我的代码不全  这样就可以了
  1. /* Rewarding
  2.    ver 0.1
  3. */
  4. #include <amxmodx>
  5. #include <csx>
  6. #include <amxmisc>
  7. #include <cstrike>
  8. #include <engine>
  9. #include <mysql>
  10. #include <csstats>

  11. //#define DEBUG
  12. #define MONEY_TIER 8000 // DON'T MESS WITH, Money total at which the plugin switches over

  13. keeping track of money
  14. #define MAX_DROPED_MONEY_COUNT 100
  15. #define TE_GLOWSPRITE      23      
  16. #define Maxsounds 1
  17. #define BIG_MONEY_INDEX 16
  18. #define OPEN_SQL
  19. #define MONEY_REWARD
  20. // coord, coord, coord (pos) short (model index) byte (scale / 10)

  21. new soundlist[Maxsounds][] = {"Half-Life17"} //Connecting Music
  22. new money_total[33] // Keep track of peeps money if above MONEY_TIER
  23. new gmsg_Money
  24. new playerkilled[33],teamjoined[33]

  25. new rewards[20]=

  26. {50,100,300,500,1000,3000,5000,8000,10000,15000,20000,25000,40000,50000,80000,100000,150000,2

  27. 00000,500000,900000}//Rewarding Ramdon
  28. new g_firstblood,Round_Control
  29. new g_random,g_roundcount
  30. new g_money11,g_money22,g_money33
  31. new rewardedbig,g_iRoundEndTriggered
  32. //new connectingmp3

  33. new droped_money_postion[MAX_DROPED_MONEY_COUNT][3]
  34. new droped_money_ammount[MAX_DROPED_MONEY_COUNT][2]//[.][0] is money,[][1] is the round
  35. new droped_money_count

  36. new g_buffer[512]


  37. public client_putinserver(id){
  38.         client_cmd(id,"mp3 stop")
  39.         return PLUGIN_CONTINUE
  40. }

  41. public team_join(){
  42.         new id=read_data(1)
  43. //        server_print("Ok, This Team_Join,id:%d",id)
  44.         if(teamjoined[id]) return
  45.         teamjoined[id]=1
  46.         new welcomemsg[129],username[33]
  47.         new izStats[8], izBody[8]
  48.         new iRankPos, iRankMax
  49.         get_user_name(id,username,32)
  50.         if (cvar_exists("csstats_reset")){
  51.                 iRankPos = get_user_stats( id, izStats, izBody )
  52.                 iRankMax = get_statsnum()
  53.                 format(welcomemsg,128,"^x01欢迎^x03%s^x01,排名第^x04%d^x01名[共^x04%d^x01

  54. 名]",username,iRankPos,iRankMax)
  55.         }else        format(welcomemsg,128,"^x01欢迎^x03%s^x01,无排名",username)
  56.         client_color(0,id,welcomemsg)
  57. }

  58. public client_disconnect(id){
  59.         new name[32]
  60.         get_user_name(id,name,31)
  61.         format(g_buffer,511,"%s 离开了服务器.",name)
  62.         set_hudmessage(255, 150, 50, 0.10, 0.5, 0, 6.0, 10.0, 0.5, 0.15, 9)
  63.         show_hudmessage(0, g_buffer)
  64.         playerkilled[id]=0
  65.         return PLUGIN_CONTINUE
  66. }

  67. public abs(num){
  68.                 return (num>=0)?num:-num
  69. }

  70. public client_connect(id){
  71.         new i
  72.         i = random_num(0,Maxsounds-1)
  73.         client_cmd(id,"mp3 play media/%s",soundlist[i])
  74.         set_cvar_float("mp_startmoney", 801.0) // So you can track when to change to

  75. amx_startmoney ammount, I know.. a crude method
  76.         money_total[id] = 0
  77.         //client_cmd(id,"mp3 play ^"../valve/media/half-life17.mp3^"");
  78. }

  79. public read_gmsg_Money(id)
  80. {       
  81.         new current_total = read_data(1)
  82.        
  83.         if(current_total == 801){                        // If CS is spawning you with

  84. mp_startmoney default
  85.                 current_total = get_cvar_num("amx_startmoney")                // current total is

  86. actually amx_startmoney
  87.                 cs_set_user_money(id, current_total,0)                        // so set user money

  88. to amx_startmoney
  89.                 money_total[id] = 0 // reset
  90.         }
  91.         if(current_total >= MONEY_TIER && !money_total[id]) // If first time above MONEY_TIER
  92.         {
  93.                 money_total[id] = current_total // Keep track of current total
  94.                 send_moneymsg(id,1) // send money msg of current total
  95.                 return PLUGIN_CONTINUE
  96.         }
  97.         if(money_total[id]) // If was over tier on last money message
  98.         {
  99.                 money_total[id] += current_total - MONEY_TIER  // figure the term of current

  100. total - tier

  101.                 if(money_total[id] < MONEY_TIER){  // If less then tier set user money to

  102. money_total[id] and stop keeping track
  103.                         cs_set_user_money(id,money_total[id],1)
  104.                         money_total[id] = 0
  105.                 }
  106.                 else{
  107.                         send_moneymsg(id,1) // else send money message
  108.                 }
  109.                
  110.                 return PLUGIN_CONTINUE               
  111.         }

  112.         return PLUGIN_CONTINUE
  113. }

  114. public send_moneymsg(id,flash)
  115. {
  116.         cs_set_user_money(id,MONEY_TIER,flash) //Set user money to tier ammount so easy to

  117. track add and subtract terms
  118.        
  119.         static MAXAMMOUNT
  120.        
  121.         MAXAMMOUNT = get_cvar_num("amx_maxmoney")
  122.        
  123.         if(money_total[id] > MAXAMMOUNT)
  124.                 money_total[id] = MAXAMMOUNT

  125.         message_begin( MSG_ONE , gmsg_Money , {0,0,0}, id) //Send money message with ammount

  126. stored in money_total[id]
  127.         write_long(money_total[id])
  128.         write_byte(flash)
  129.         message_end()
  130. }

  131. public ramdon_money(params[]){
  132.         new killer=params[0]
  133.         new oldamount=params[1]
  134.         new amount
  135.         new killername[32]
  136.         new random_range,randomvalue
  137.         random_range=(rewardedbig)?BIG_MONEY_INDEX:20//控制大额的奖励不会出现太多次
  138.         for(;;){
  139.                 randomvalue=random(random_range)
  140.                 amount=rewards[randomvalue]
  141.                 if (amount!=oldamount) break;
  142.         }
  143.         get_user_name(killer,killername,31)
  144.         if (g_random>0){
  145.                 g_random--
  146.                 set_hudmessage(0,255,0,0.05,0.25,0, 0.02, 0.4, 0.01, 0.1, 2)
  147.                 show_hudmessage(0,"%s最先杀敌,奖励给%6d金钱",killername,amount)
  148.                 new param[2]
  149.                 param[0]=killer       
  150.                 param[1]=amount
  151.                 set_task(0.3,"ramdon_money",0,param,1)
  152.         }
  153.         else {
  154.                 if(randomvalue>=BIG_MONEY_INDEX) rewardedbig=1
  155.                 //set_hudmessage(0,255,0,0.75,0.18,0, 1.0, 5.0, 0.1, 0.2, 1)
  156.                 set_hudmessage(0,255,0,0.05, 0.25, 0, 0.02, 6.0, 0.01, 0.1, 2)
  157.                 show_hudmessage(0,"%s最先杀敌,奖励给%6d金钱",killername,amount)
  158.                 add_player_money(killer,amount)
  159.                 new msg[512]
  160.                 format(msg,511,"^x03%s^x01 最先杀敌,奖励给^x04 %d ^x01金

  161. 钱",killername,amount)
  162.                 client_color(0,killer,msg)
  163.         }
  164. }

  165. public add_player_money(player,ammount){
  166.                                 static MAXAMMOUNT
  167.                                 MAXAMMOUNT = get_cvar_num("amx_maxmoney")
  168.                                 new new_total_money
  169.                                 if(money_total[player]){
  170.                                         new_total_money=money_total[player]+ammount
  171.                                 }
  172.                                 else
  173.                                         new_total_money=cs_get_user_money(player) + ammount
  174.                                 if (new_total_money>=MONEY_TIER){
  175.                                         money_total[player]=new_total_money
  176.                                         if(money_total[player]>MAXAMMOUNT) money_total

  177. [player]=MAXAMMOUNT
  178.                                         send_moneymsg(player,1) // send money msg of current

  179. total                                               
  180.                                 }
  181.                                 else {
  182.                                         cs_set_user_money(player,new_total_money)
  183.                                         money_total[player]=0
  184.                                 }
  185. }

  186. public random_drop_money(ori_ammount){
  187.                 new drop_control
  188.                 if(ori_ammount>10000){
  189.                         drop_control=random(100000)
  190.                         if(ori_ammount>=drop_control){//按照钱的多少,我们产生不同的掉钱的随

  191. 机数。
  192.                                 //现在我们决定要调多少。最多是0.6,0.5  0.4 0.3 0.2,0.1
  193.                                 return random(6)+1
  194.                         }else return 0       
  195.                 }
  196.                 return 0
  197. }

  198. //public client_death(killer,victim,wpnindex,hitplace,TK){
  199. public eDeathMsg(){
  200.         new killer,victim,TK
  201.         killer=read_data(1)
  202.         if(!killer) return PLUGIN_CONTINUE
  203.         victim=read_data(2)
  204.         TK=(get_user_team(killer)==get_user_team(victim))?1:0
  205.         //headshot=read_data(3)
  206.         new wpnname[4]
  207.         read_data(4,wpnname,3)
  208.         new killername[32]
  209.         //if (wpnindex==CSW_C4||TK) return PLUGIN_CONTINUE
  210.         if(equal(wpnname,"c4")||TK) return PLUGIN_CONTINUE
  211. //        new headshot = ( hitplace==HIT_HEAD ) ? 1:0
  212.         new selfkill = ( killer==victim ) ? 1:0
  213.         if (selfkill) return PLUGIN_CONTINUE
  214.         playerkilled[killer]++
  215.         if(equal(wpnname,"kni")){
  216.                 add_player_money(killer,10000)
  217.                 get_user_name(killer,killername,31)
  218.                 set_hudmessage(0,255,0,0.05,0.25,0, 0.2, 6.0, 0.1, 0.1, 2)
  219.                 //set_hudmessage(0,255,0,0.75,0.18,0, 1.0, 1.0, 0.1, 0.2, 12)
  220.                 show_hudmessage(0,"%s小刀杀敌,奖励10000金钱",killername)
  221.                 new msg[100]
  222.                 format(msg,99,"^x03%s^x01小刀杀敌,奖励^x04 10000 ^x01 金钱",killername)
  223.                 client_color(0,killer,msg)
  224.                 //log_message("%s小刀杀敌,奖励10000金钱",killername)
  225.         }
  226.        
  227.         if (g_firstblood){
  228.                 g_firstblood=0
  229.                 g_random=6
  230.                 new param[2]
  231.                 param[0]=killer
  232.                 param[1]=0;
  233.                 ramdon_money(param)
  234.         }
  235.         //The Victim Will Drop Some Money
  236.         new victim_money
  237.         if(money_total[victim]==0) victim_money=cs_get_user_money(victim)
  238.         else victim_money=money_total[victim]
  239.         //if (victim_money>= MONEY_TIER&&
  240.         if (droped_money_count<MAX_DROPED_MONEY_COUNT){
  241.                 new drop_prec=random_drop_money(victim_money)
  242.                 //new int:dropedmoney=*victim_money
  243.                 if(drop_prec>0){
  244.                         new dropedmoney=(victim_money*drop_prec/10000)*1000
  245.                         add_player_money(victim,-dropedmoney)
  246.                         new victim_coord[3]
  247.                         get_user_origin(victim, victim_coord)               
  248.                         new i
  249.                         for (i=0;i<MAX_DROPED_MONEY_COUNT;i++)
复制代码
 楼主| 发表于 2009-1-31 09:10:30 | 显示全部楼层 来自 中国–广东–东莞
  1. {
  2.                                 if(droped_money_ammount[i][0]==0){
  3.                                         droped_money_count++
  4.                                         droped_money_postion[i][0]=victim_coord[0]
  5.                                         droped_money_postion[i][1]=victim_coord[1]
  6.                                         droped_money_postion[i][2]=victim_coord[2]
  7.                                         droped_money_ammount[i][1]=g_roundcount//We record

  8. which round droped the money
  9.                                         droped_money_ammount[i][0]=dropedmoney*8/10 //We Drop

  10. 20 precent money
  11.                                         break;
  12.                                 }
  13.                         }
  14.                         //new ammount_desc[32]
  15.                         new victimname[32]
  16.                         get_user_name(victim,victimname,31)
  17.                         new msg[100]
  18.                         format(msg,99,"^x03%s^x01掉了^x04%d^x01钱.",victimname,dropedmoney)
  19.                         client_color(0,victim,msg)
  20.                 }
  21.         }
  22.         return PLUGIN_CONTINUE
  23. }

  24. public show_droped_money(){
  25.         new i
  26.         new money_model_id
  27.         for (i=0;i<MAX_DROPED_MONEY_COUNT;i++){
  28.                 if (droped_money_ammount[i][0]>0){
  29.                         //We Display the money;
  30.                         if(droped_money_ammount[i][0]<10000){
  31.                                 money_model_id=g_money11
  32.                         }
  33.                         else if (droped_money_ammount[i][0]<100000){
  34.                                 money_model_id=g_money22
  35.                         } else money_model_id=g_money33
  36.                         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  37.                         write_byte(17)//#define TE_SPRITE  17      // additive sprite, plays

  38. 1 cycle,More Info,plz reffer to HLSDK
  39.                         write_coord(droped_money_postion[i][0]);
  40.                         write_coord(droped_money_postion[i][1]);
  41.                         write_coord(droped_money_postion[i][2]+20);
  42.                         write_short(money_model_id)
  43.                         write_byte(2)
  44.                         write_byte(128)
  45.                         message_end()
  46.                 }
  47.         }
  48. }
  49. public check_player_pos(){
  50.         new playerslist[32]
  51.         new i,playerscount,j,moneyammount
  52.         new playerspos[3],playername[32]
  53.         get_players(playerslist,playerscount,"a") //we only check the alive players
  54.         for(i=0;i<playerscount;i++){
  55.                 get_user_origin(playerslist[i],playerspos)
  56.                 for(j=0;j<MAX_DROPED_MONEY_COUNT;j++){
  57.                                 if(droped_money_ammount[j][0]>0&&
  58.                                          abs(playerspos[0]-droped_money_postion[j][0])<=20&&
  59.                                          abs(playerspos[1]-droped_money_postion[j][1])<=20&&
  60.                                          abs(playerspos[2]-droped_money_postion[j][2])<=30)

  61. {//Pick Up Money
  62.                                          moneyammount=droped_money_ammount[j][0]
  63.                                          droped_money_ammount[j][0]=0;
  64.                                          droped_money_count--;
  65.                                          add_player_money(playerslist[i],moneyammount)
  66.                                          get_user_name(playerslist[i],playername,31)
  67.                                           new msg[100]
  68.                                          format(msg,99,"^x03%s^x01捡到^x04%d^x01

  69. 钱.",playername,moneyammount);
  70.                                          client_color(0,playerslist[i],msg)
  71.                                          break;
  72.                                 }
  73.                 }
  74.         }       
  75. }

  76. public new_round(){
  77.         new i
  78.         if (!Round_Control){
  79.                 g_roundcount++
  80.                 Round_Control = 1
  81.                 g_firstblood=1
  82.                 g_iRoundEndTriggered=0
  83.                 for(i=0;i<=32;i++)playerkilled[i]=0;
  84.                 //We Remove the droped money 3 round ago
  85.                 for(i=0;i<MAX_DROPED_MONEY_COUNT;i++){
  86.                         if (droped_money_ammount[i][0]>0&&g_roundcount>(droped_money_ammount

  87. [i][1]+2)){
  88.                                 droped_money_ammount[i][0]=0
  89.                                 droped_money_ammount[i][1]=0
  90.                                 droped_money_count--
  91.                         }
  92.                 }
  93.         }
  94. }

  95. public eEndRound(){
  96.                 if (g_iRoundEndTriggered) return
  97.                 g_iRoundEndTriggered=1
  98.                 Round_Control=0
  99.                 new i,maxkillcount
  100.                 maxkillcount=0
  101.                 new RoundEndMsg[513],ipos
  102.                 new playerslist[32],playerscount
  103.                 ipos=0
  104.                 ipos+=format(RoundEndMsg[ipos],512-ipos,"本局杀敌最多的玩家")

  105.                 get_players(playerslist,playerscount)//Get  Players
  106.                 for(i=0;i<playerscount;i++){
  107.                         if(playerkilled[playerslist[i]]&&playerkilled[playerslist[i]]

  108. >maxkillcount) maxkillcount=playerkilled[playerslist[i]]
  109.                 }
  110.                 if(maxkillcount){
  111.                         new playername[33],playeradded=0
  112.                         ipos+=format(RoundEndMsg[ipos],512-ipos,"  (杀%d人)^n---------------

  113. ------------------^n",maxkillcount)
  114.                         for(i=0;i<playerscount;i++){
  115.                                 if(playerkilled[playerslist[i]]==maxkillcount){//WeiGet this

  116. players
  117.                                         if (get_user_name(playerslist[i],playername,32))
  118.                                                 ipos+=format(RoundEndMsg[ipos],512-ipos,"%

  119. s^n",playername)
  120.                                         else ipos+=format(RoundEndMsg[ipos],512-ipos,"未知或

  121. 已离开游戏^n")
  122.                                         ++playeradded
  123.                                 }
  124.                                
  125.                                 if(playeradded>=2){
  126.                                         ipos+=format(RoundEndMsg[ipos],512-ipos,"......^n")
  127.                                         break;
  128.                                 }
复制代码
回复

使用道具 举报

 楼主| 发表于 2009-1-31 09:10:57 | 显示全部楼层 来自 中国–广东–东莞
  1. }
  2.                                
  3.                 }
  4.                 else{
  5.                         ipos+=format(RoundEndMsg[ipos],512-ipos,"^n-------------------------

  6. --------^n大家太客气了,都没有杀敌^n")
  7.                 }
  8.                 ipos+=format(RoundEndMsg[ipos],512-ipos,"^n金钱最多的玩家^n-----------------

  9. ----------------^n")       
  10.                 new maxctmoney=0,maxtmoney=0,maxmoneytid=0,maxmoneyctid=0
  11.                 for(i=0;i<playerscount;i++){
  12.                         new userid=playerslist[i]
  13.                         new usermoney
  14.                         if(!is_user_connected(userid)) continue
  15.                         if(money_total[userid]) usermoney=money_total[userid]
  16.                         else usermoney=cs_get_user_money(userid)
  17.                         if(cs_get_user_team(userid)==CS_TEAM_T){
  18.                                 if(usermoney>maxtmoney){
  19.                                         maxtmoney=usermoney
  20.                                         maxmoneytid=userid
  21.                                 }
  22.                         }
  23.                         else {
  24.                                 if(usermoney>maxctmoney){
  25.                                         maxctmoney=usermoney
  26.                                         maxmoneyctid=userid
  27.                                 }
  28.                         }
  29.                        
  30.                 }
  31.                 new ctname[33],tname[33]
  32.                 if(maxmoneytid)get_user_name(maxmoneytid,tname,32)
  33.                 else tname="没有人"
  34.                 if(maxmoneyctid)get_user_name(maxmoneyctid,ctname,32)
  35.                 else ctname="没有人"
  36.                 ipos+=format(RoundEndMsg[ipos],512-ipos,"反恐精英^n%s   %d^n恐怖分子^n%s   %

  37. d",ctname,maxctmoney,tname,maxtmoney)
  38.                 set_hudmessage( 100, 200, 0, 0.05, 0.55, 0, 0.02, 5.0, 0.1, 0.2, 2 )
  39.                 show_hudmessage(0,RoundEndMsg)
  40. }

  41. public eRestart(){
  42.         new i
  43.         g_roundcount = 0
  44.         g_firstblood = 0
  45.         Round_Control = 0
  46.         rewardedbig = 0
  47.         for(i=0;i<=32;i++)        money_total[i]=0;
  48.         for(i=0;i<=32;i++)playerkilled[i]=0;
  49.         for(i=0;i<MAX_DROPED_MONEY_COUNT;i++){
  50.                 droped_money_ammount[i][0]=0
  51.                 droped_money_ammount[i][1]=0
  52.         }
  53.         droped_money_count=0
  54. //        client_print(0,print_chat,"Round Restart and Roundcount=%d",g_roundcount)
  55. }

  56. public plugin_precache()
  57. {
  58.         g_money11 = precache_model("sprites/money11.spr");
  59.         g_money22 = precache_model("sprites/money22.spr");
  60.         g_money33 = precache_model("sprites/money33.spr");
  61.         //precache_sound("../valve/media/half-life17.mp3");
  62. }
  63. public client_color(playerid,colorid,msg[]){
  64.                 new playerslist[32],playerscount//,i
  65.                 get_players(playerslist,playerscount,"c")
  66.                 new userid
  67.                 if(playerid==0){
  68.                         userid=playerid
  69.                         message_begin(MSG_ALL, get_user_msgid("SayText"), {0,0,0}, userid)
  70.                         write_byte(colorid)
  71.                         write_string(msg)
  72.                         message_end()
  73.                                
  74.                 }
  75.                 else{
  76.                         userid=playerid
  77.                         message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, userid)
  78.                         write_byte(colorid)
  79.                         write_string(msg)
  80.                         message_end()
  81.                 }
  82. }
  83. public color_radio(msgid, msgDest, msgEnt){
  84.         new argNum = get_msg_args()
  85.         if (argNum!=5) return PLUGIN_CONTINUE
  86.         if (get_msg_argtype(1)!=ARG_BYTE) return PLUGIN_CONTINUE
  87.         new arg1=get_msg_arg_int(1)
  88.         if (arg1!=5) return PLUGIN_CONTINUE
  89.         new arg3[256]
  90.         get_msg_arg_string(3,arg3,255)
  91.         if(equal(arg3,"#Game_radio")){
  92.                 new arg4[33],arg5[129]
  93.                 get_msg_arg_string(4,arg4,32)
  94.                 get_msg_arg_string(5,arg5,128)
  95.                 new saymsg[256]
  96.                 if(equal(arg5,"#Go_go_go")){//Msg GoGoGo
  97.                         format(saymsg,255,"^x03%s(对讲机): ^x04Go go go!",arg4)
  98.                 }
  99.                 else if(equal(arg5,"#Stick_together_team")){
  100.                         format(saymsg,255,"^x03%s(对讲机): ^x04Stick together, team.",arg4)
  101.                 }
  102.                 else if(equal(arg5,"#Team_fall_back")){
  103.                         format(saymsg,255,"^x03%s(对讲机):^x04 Team, fall back!",arg4)
  104.                 }
  105.                 else if(equal(arg5,"#Cover_me")){
  106.                         format(saymsg,255,"^x03%s(对讲机):^x04 Cover Me!",arg4)
  107.                 }
  108.                 else if(equal(arg5,"#You_take_the_point")){
  109.                         format(saymsg,255,"^x03%s(对讲机):^x04 You Take the Point.",arg4)
  110.                 }
  111.                 else if(equal(arg5,"#Hold_this_position")){
  112.                         format(saymsg,255,"^x03%s(对讲机):^x04 Hold This Position.",arg4)
  113.                 }
  114.                 else if(equal(arg5,"#Regroup_team")){
  115.                         format(saymsg,255,"^x03%s(对讲机):^x04 Regroup Team.",arg4)
  116.                 }
  117.                 else if(equal(arg5,"#Follow_me")){
  118.                         format(saymsg,255,"^x03%s(对讲机):^x04 Follow Me.",arg4)
  119.                 }
  120.                 else if(equal(arg5,"#Taking_fire")){
  121.                         format(saymsg,255,"^x03%s(对讲机):^x04 Taking Fire...Need

  122. Assistance!",arg4)
  123.                 }
  124.                 else if(equal(arg5,"#Get_in_position_and_wait")){
  125.                         format(saymsg,255,"^x03%s(对讲机):^x04 Get in position and wait for

  126. my go.",arg4)
  127.                 }
  128.                 else if(equal(arg5,"#Storm_the_front")){
  129.                         format(saymsg,255,"^x03%s(对讲机):^x04 Storm the Front!",arg4)
  130.                 }
  131.                 else if(equal(arg5,"#Report_in_team")){
  132.                         format(saymsg,255,"^x03%s(对讲机):^x04 Report in, team.",arg4)
  133.                 }
  134.                 else if(equal(arg5,"#Affirmative")){
  135.                         format(saymsg,255,"^x03%s(对讲机):^x04 Affirmative.",arg4)
  136.                 }
  137.                 else if(equal(arg5,"#Roger_that")){
  138.                         format(saymsg,255,"^x03%s(对讲机):^x04 Roger that.",arg4)
  139.                 }
  140.                 else if(equal(arg5,"#Enemy_spotted")){
  141.                         format(saymsg,255,"^x03%s(对讲机):^x04 Enemy spotted.",arg4)
  142.                 }
  143.                 else if(equal(arg5,"#Need_backup")){
  144.                         format(saymsg,255,"^x03%s(对讲机):^x04 Need backup.",arg4)
  145.                 }
  146.                 else if(equal(arg5,"#Sector_clear")){
  147.                         format(saymsg,255,"^x03%s(对讲机):^x04 Sector clear.",arg4)
  148.                 }
  149.                 else if(equal(arg5,"#In_position")){
  150.                         format(saymsg,255,"^x03%s(对讲机):^x04 I'm in position.",arg4)
  151.                 }
  152.                 else if(equal(arg5,"#Reporting_in")){
  153.                         format(saymsg,255,"^x03%s(对讲机):^x04 Reporting in.",arg4)
  154.                 }
  155.                 else if(equal(arg5,"#Get_out_of_there")){
  156.                         format(saymsg,255,"^x03%s(对讲机):^x04 Get out of there, it's gonna

  157. blow!",arg4)
  158.                 }
  159.                 else if(equal(arg5,"#Negative")){
  160.                         format(saymsg,255,"^x03%s(对讲机):^x04 Negative.",arg4)
  161.                 }
  162.                 else if(equal(arg5,"#Enemy_down")){
  163.                         format(saymsg,255,"^x03%s(对讲机):^x04 Enemy down.",arg4)
  164.                 }
  165.                 else if(equal(arg5,"#Hostage_down")){
  166.                         format(saymsg,255,"^x03%s(对讲机):^x04 Hostage down.",arg4)
  167.                 }
  168.                 else if(equal(arg5,"#Fire_in_the_hole")){
  169.                         format(saymsg,255,"^x03%s(对讲机):^x04 Fire in the hole!",arg4)
  170.                 }
  171.                 else {
  172.                         return PLUGIN_CONTINUE
  173.                         //format(saymsg,255,"^x03%s(对讲机): ^x04What are you saying!",arg4)
  174.                 }
  175.                 message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, msgEnt)
  176.                 write_byte(msgEnt)
  177.                 write_string(saymsg)
  178.                 message_end()
  179.                 //client_color(0,msgEnt,saymsg)
  180.                 return PLUGIN_HANDLED
  181.         }
  182.         return PLUGIN_CONTINUE
  183. }

  184. public plugin_init(){
  185.         register_plugin("First Killer Reward","0.1","Zhao")
  186.         register_event("RoundTime", "new_round", "bc")        
  187. //        register_event("ResetHUD", "new_round", "abc")
  188.         #if defined MONEY_REWARD
  189.         register_event("DeathMsg","eDeathMsg","a")
  190.         register_event("Money","read_gmsg_Money","b")
  191.         #endif
  192.         register_event("SendAudio", "eEndRound", "a", "2&%!MRAD_terwin","2&%!

  193. MRAD_ctwin","2&%!MRAD_rounddraw")
  194.         register_event("TextMsg","eRestart","a","2&#Game_C","2&#Game_w")
  195. //        register_event("BarTime","bartime_event","b")
  196.         register_cvar("amx_startmoney", "800")
  197.         register_cvar("amx_maxmoney", "999999")

  198.         register_message(get_user_msgid("TextMsg"),"color_radio")
  199.         register_event("TeamInfo","team_join","a","2!UNASSIGNED") // Team Joining
  200.                
  201.         g_firstblood=1
  202.         rewardedbig = 0
  203.         droped_money_count=0
  204.         g_roundcount=0
  205.         gmsg_Money = get_user_msgid("Money")
  206.         #if defined MONEY_REWARD
  207.         set_task(0.5,"show_droped_money",887,"",0,"b")
  208.         set_task(0.1,"check_player_pos",888,"",0,"b")
  209.         #endif
  210. }
复制代码

评分

参与人数 1经验 +8 点通币 +20 收起 理由
点通粉丝 + 8 + 20 原创内容

查看全部评分

回复

使用道具 举报

发表于 2009-1-31 23:04:17 | 显示全部楼层 来自 中国–香港
不錯不錯先收下啊

评分

参与人数 1经验 -2 收起 理由
8874323 -2

查看全部评分

回复

使用道具 举报

发表于 2009-2-12 15:54:56 | 显示全部楼层 来自 中国–广东–珠海
顶一个吧
回复

使用道具 举报

发表于 2009-2-13 13:19:52 | 显示全部楼层 来自 中国–上海–上海
支持一下
回复

使用道具 举报

发表于 2009-2-15 16:14:22 | 显示全部楼层 来自 中国–福建–福州
gh 按楼主的要求做了,好像不是转AMXX
回复

使用道具 举报

发表于 2009-2-15 16:33:20 | 显示全部楼层 来自 中国–广东–揭阳
这个我有了!
回复

使用道具 举报

发表于 2009-2-15 16:41:40 | 显示全部楼层 来自 中国–福建–宁德
好像是一马当先的插件?
回复

使用道具 举报

发表于 2009-2-16 19:45:05 | 显示全部楼层 来自 中国–吉林–长春
好东西,收下了,谢谢lz分享
回复

使用道具 举报

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

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