|
20_DT币 求个支持金钱无上限的 前五人杀敌奖励
哪位高手 帮忙改动下 1.76C 环境下编译
- #include <amxmodx>
- #include <csstats>
- #include <cstrike>
- #define PLUGIN_NAME "kill_award"
- #define PLUGIN_VERSION "1.3"
- #define PLUGIN_AUTHOR "Beowns"
- 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 (g_round == 0)
- {
- set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.02, 0.25, 1, 0.5, 3.0, 0.080, 2.0, 4)
- show_hudmessage(0, "%s^n第一个杀敌 奖励美元3000", killer_name)
- client_cmd(0, "spk misc/coin01")
- cs_set_user_money(killer, cs_get_user_money(killer)+3000)
- g_round = 1
- }
- else if (g_round == 1)
- {
- set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.02, 0.29, 1, 0.5, 3.0, 0.080, 2.0, 4)
- show_hudmessage(0, "%s^n第二个杀敌 奖励美元2000", killer_name)
- client_cmd(0, "spk misc/coin01")
- cs_set_user_money(killer, cs_get_user_money(killer)+2000)
- g_round = 2
- }
- else if (g_round == 2)
- {
- set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.02, 0.33, 1, 0.5, 3.0, 0.080, 2.0, 4)
- show_hudmessage(0, "%s^n第三个杀敌 奖励美元1500", killer_name)
- client_cmd(0, "spk misc/coin01")
- cs_set_user_money(killer, cs_get_user_money(killer)+1500)
- g_round = 3
- }
- else if (g_round == 3)
- {
- set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), 0.02, 0.37, 1, 0.5, 3.0, 0.080, 2.0, 4)
- show_hudmessage(0, "%s^n第四个杀敌 奖励美元1000", killer_name)
- client_cmd(0, "spk misc/coin01")
- cs_set_user_money(killer, cs_get_user_money(killer)+1000)
- g_round = 4
- }
- else if (g_round == 4)
- {
- set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255),0.02, 0.41, 1, 0.5, 3.0, 0.080, 2.0, 4)
- show_hudmessage(0, "%s^n第五个杀敌 奖励美元500", killer_name)
- client_cmd(0, "spk misc/coin01")
- cs_set_user_money(killer, cs_get_user_money(killer)+500)
- g_round = 5
- }
- }
-
- return PLUGIN_CONTINUE
- }
- public plugin_precache(){
- precache_sound( "misc/coin01.wav")
- return PLUGIN_CONTINUE
- }
复制代码 |
|