|
本帖最后由 kk阿朗 于 2009-5-21 13:12 编辑
应以下要求:
http://www.dt-club.net/forum/thread-44271-1-1.html
本人试写了一个,单机试通过!
特此附上源码!- /*本插件是应点通会员Subject的要求写的,version1.0只有T杀人奖励200块
- version1.1改成了第一个T杀人奖励2500,第二个1500,第三个1000,可以自定义再往后加!
- */
- /*I write this plugin for Dian Tong member who name Subject
- verion 1.0
- only TERRORIST kill CT award.
-
- verion 1.1
- change the award way
- {
- the first TERRORIST kill award 2500$;
- the second kill award 1500$;
- the third kill award 1000$.
- }
- you can change the award way as you like!
- and have you fun!!
-
- Made By K.K.Lv
- Date:2009. 05. 21
- */
- #include <amxmodx>
- #include <csstats>
- #include <cstrike>
- #define PLUGIN_NAME "te_kill_award"
- #define PLUGIN_VERSION "1.1"
- #define PLUGIN_AUTHOR "K.K.Lv"
- new g_round
- public plugin_init()
- {
- register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
-
- register_event("DeathMsg", "DeathAward", "a")
- register_logevent("roundstart",2,"0=World triggered","1=Round_Start")
- g_round = 0
- }
- public roundstart()
- {
- g_round = 0
- }
- public DeathAward()
- {
- new killer = read_data(1)
- new victim = read_data(2)
- new killer_name[32]
- get_user_name(killer, killer_name, 31)
- if (get_user_team(killer)!=get_user_team(victim))
- {
- if (cs_get_user_team(killer) == CS_TEAM_T)
- {
- if (g_round == 0)
- {
- set_hudmessage(200, 100, 0, -1.0, 0.20, 1, 0.5, 3.0, 0.080, 2.0, 4)
- show_hudmessage(0, "恐怖份子 %s 第一个英勇杀敌,额外奖励人民币 2500 大元!", killer_name)
- cs_set_user_money(killer, cs_get_user_money(killer) + 2500)
- g_round = 1
- }
- else if (g_round == 1)
- {
- set_hudmessage(200, 100, 0, -1.0, 0.20, 1, 0.5, 3.0, 0.080, 2.0, 4)
- show_hudmessage(0, "恐怖份子 %s 第二个英勇杀敌,额外奖励人民币 1500 大元!", killer_name)
- cs_set_user_money(killer, cs_get_user_money(killer) + 1500)
- g_round = 2
- }
- else if (g_round == 2)
- {
- set_hudmessage(200, 100, 0, -1.0, 0.20, 1, 0.5, 3.0, 0.080, 2.0, 4)
- show_hudmessage(0, "恐怖份子 %s 第三个英勇杀敌,额外奖励人民币 1000 大元!", killer_name)
- cs_set_user_money(killer, cs_get_user_money(killer) + 1000)
- g_round = 3
- }
- }
- }
- return PLUGIN_CONTINUE
- }
复制代码 如果那位高手发现bug,还垦请不吝赐教! |
评分
-
查看全部评分
|