20_DT币 求个支持金钱无上限的 前人杀敌奖励
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
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
}
以我发布的金钱无上限插件为例:
前面添加 #include <unlimited_money>
然后把所有 cs_get_user_money 改为 cs_get_user_money2,
然后把所有 cs_set_user_money 改为 cs_set_user_money2。 Rulzy..我的一个奖励插件根本用不了..在记录上这样显示
AMXX] Plugin "miscstatsReward.amxx" failed to load: Plugin uses an unknown function (name "cs_set_user_money2") - check your modules.ini
开了以下模块
yan_geoip
fun
engine
fakemeta
geoip
sockets
regex
nvault
cstrike
csx
hamsandwich 快快给20dt给我,我帮你改了代码,记得把附件中的unlimited_money.inc放到到include文件夹中.再编译unlimited_money.sma 成amxx 放到这个插件前面,然后再编译本插件,要不然会出错的!!
#include <amxmodx>
#include <csstats>
#include <cstrike>
#include "unlimited_money"
#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
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_money2(killer, cs_get_user_money2(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_money2(killer, cs_get_user_money2(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_money2(killer, cs_get_user_money2(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_money2(killer, cs_get_user_money2(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_money2(killer, cs_get_user_money2(killer)+500)
g_round = 5
}
}
return PLUGIN_CONTINUE
}
public plugin_precache(){
precache_sound( "misc/coin01.wav")
return PLUGIN_CONTINUE
} Rulzy..我的一个奖励插件根本用不了..在记录上这样显示
AMXX] Plugin "miscstatsReward.amxx" failed to load: Plugin uses an unknown function (name "cs_set_user_money2") - check your modules.ini
开了以下模 ...
702033080 发表于 2009-9-20 11:29 http://www.dt-club.net/forum/images/common/back.gif那是因为你没有加载我写的金钱无上限插件。 晕,怎么lz不回复,我的dt啊
页:
[1]