搜索
查看: 4484|回复: 10

[AMXX 带源码] 应“求一个前5名杀人奖励插件”要求!

[复制链接]
发表于 2009-5-21 13:09:23 | 显示全部楼层 |阅读模式 来自 中国–广东–广州
本帖最后由 kk阿朗 于 2009-5-21 13:12 编辑

应以下要求:

http://www.dt-club.net/forum/thread-44271-1-1.html

本人试写了一个,单机试通过!
特此附上源码!
  1. /*本插件是应点通会员Subject的要求写的,version1.0只有T杀人奖励200块
  2. version1.1改成了第一个T杀人奖励2500,第二个1500,第三个1000,可以自定义再往后加!
  3. */

  4. /*I write this plugin for Dian Tong member who name Subject

  5.         verion 1.0
  6.         only TERRORIST kill CT award.
  7.        
  8.         verion 1.1
  9.         change the award way
  10.         {
  11.                 the first TERRORIST kill award 2500$;
  12.                 the second kill award 1500$;
  13.                 the third kill award 1000$.
  14.         }
  15.         you can change the award way as you like!
  16.         and have you fun!!
  17.        
  18.                                                 Made By K.K.Lv
  19.                                                 Date:2009. 05. 21
  20. */

  21. #include <amxmodx>
  22. #include <csstats>
  23. #include <cstrike>

  24. #define PLUGIN_NAME        "te_kill_award"
  25. #define PLUGIN_VERSION        "1.1"
  26. #define PLUGIN_AUTHOR        "K.K.Lv"

  27. new g_round

  28. public plugin_init()
  29. {
  30.         register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
  31.        
  32.         register_event("DeathMsg", "DeathAward", "a")
  33.         register_logevent("roundstart",2,"0=World triggered","1=Round_Start")
  34.         g_round = 0
  35. }

  36. public roundstart()
  37. {
  38.         g_round = 0
  39. }

  40. public DeathAward()
  41. {
  42.         new killer = read_data(1)
  43.         new victim = read_data(2)
  44.         new killer_name[32]
  45.         get_user_name(killer, killer_name, 31)
  46.         if (get_user_team(killer)!=get_user_team(victim))
  47.         {
  48.                 if (cs_get_user_team(killer) == CS_TEAM_T)
  49.                 {
  50.                         if (g_round == 0)
  51.                         {
  52.                                 set_hudmessage(200, 100, 0, -1.0, 0.20, 1, 0.5, 3.0, 0.080, 2.0, 4)
  53.                                 show_hudmessage(0, "恐怖份子 %s 第一个英勇杀敌,额外奖励人民币 2500 大元!", killer_name)
  54.                                 cs_set_user_money(killer, cs_get_user_money(killer) + 2500)
  55.                                 g_round = 1
  56.                         }
  57.                         else if (g_round == 1)
  58.                         {
  59.                                 set_hudmessage(200, 100, 0, -1.0, 0.20, 1, 0.5, 3.0, 0.080, 2.0, 4)
  60.                                 show_hudmessage(0, "恐怖份子 %s 第二个英勇杀敌,额外奖励人民币 1500 大元!", killer_name)
  61.                                 cs_set_user_money(killer, cs_get_user_money(killer) + 1500)
  62.                                 g_round = 2
  63.                         }
  64.                         else if (g_round == 2)
  65.                         {
  66.                                 set_hudmessage(200, 100, 0, -1.0, 0.20, 1, 0.5, 3.0, 0.080, 2.0, 4)
  67.                                 show_hudmessage(0, "恐怖份子 %s 第三个英勇杀敌,额外奖励人民币 1000 大元!", killer_name)
  68.                                 cs_set_user_money(killer, cs_get_user_money(killer) + 1000)
  69.                                 g_round = 3
  70.                         }
  71.                 }
  72.         }
  73.         return PLUGIN_CONTINUE
  74. }
复制代码
如果那位高手发现bug,还垦请不吝赐教!

评分

参与人数 1经验 +6 收起 理由
8874323 + 6

查看全部评分

发表于 2009-5-21 13:21:45 | 显示全部楼层 来自 中国–辽宁–沈阳
谢谢了!!
回复

使用道具 举报

发表于 2009-5-21 14:41:43 | 显示全部楼层 来自 中国–吉林–长春
:)谢谢咯
回复

使用道具 举报

发表于 2009-5-22 18:14:20 | 显示全部楼层 来自 中国–广西–河池
我想要个前三名杀人奖励的,本别是5000大洋、3000大洋、1000大洋。前五名杀人奖没意思。
回复

使用道具 举报

 楼主| 发表于 2009-5-22 19:00:45 | 显示全部楼层 来自 中国–广东–广州
4# takenb


你看清楚了没,现在就是前三名杀人奖励!
回复

使用道具 举报

发表于 2009-7-12 08:04:21 | 显示全部楼层 来自 中国–福建–厦门
楼主写的是T的头3名杀人奖励,能写个所有玩家头3名杀人奖励,集合刀杀奖励、爆头奖励、手雷杀人奖励吗?
拜谢!
回复

使用道具 举报

发表于 2009-9-11 16:01:25 | 显示全部楼层 来自 中国–湖北–武汉
有难度哦
回复

使用道具 举报

发表于 2009-9-13 16:32:20 | 显示全部楼层 来自 中国–广东–广州–天河区
only te???
回复

使用道具 举报

发表于 2009-9-14 17:02:32 | 显示全部楼层 来自 中国–福建–厦门
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2009-10-4 00:02:59 | 显示全部楼层 来自 中国–广东–汕尾
为什么只有T?CT呢?
回复

使用道具 举报

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

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