应“求一个前5名杀人奖励插件”要求!
本帖最后由 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
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,还垦请不吝赐教! 谢谢了!! :)谢谢咯 我想要个前三名杀人奖励的,本别是5000大洋、3000大洋、1000大洋。前五名杀人奖没意思。 4# takenb
你看清楚了没,现在就是前三名杀人奖励! 楼主写的是T的头3名杀人奖励,能写个所有玩家头3名杀人奖励,集合刀杀奖励、爆头奖励、手雷杀人奖励吗?
拜谢! 有难度哦 only te??? 为什么只有T?CT呢?
页:
[1]
2