下面是引用 Rubbish-Nec 于 2010-02-17 01:30 发表的 :
近日装了太多插件,游戏变成有点卡了
就找一些没用的/能取代的给删掉
寒冰弹就删掉了,能教我如何改
燃烧弹能杀死丧尸
.......
燃烧弹能杀死僵尸是吗…方法如下:
1.先加入杀敌讯息
复制程式
stock log_kill(killer, victim, weapon[], headshot)
{
set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET)
ExecuteHamB(Ham_Killed, victim, killer, 1) // set last param to 2 if you want victim to gib
set_msg_block(get_user_msgid("DeathMsg"), BLOCK_NOT)
message_begin(MSG_BROADCAST, get_user_msgid("DeathMsg"))
write_byte(killer)
write_byte(victim)
write_byte(headshot)
write_string(weapon)
message_end()
new attacker_frags = get_user_frags(killer)
if(get_user_team(killer)!=get_user_team(victim))
attacker_frags += 1
if(get_user_team(killer)==get_user_team(victim))
attacker_frags -= 1
new kname[32], vname[32], kauthid[32], vauthid[32], kteam[10], vteam[10]
get_user_name(killer, kname, 31)
get_user_team(killer, kteam, 9)
get_user_authid(killer, kauthid, 31)
get_user_name(victim, vname, 31)
get_user_team(victim, vteam, 9)
get_user_authid(victim, vauthid, 31)
log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^"",
kname, get_user_userid(killer), kauthid, kteam,
vname, get_user_userid(victim), vauthid, vteam, weapon)
return PLUGIN_CONTINUE;
}
2.寻找ZP主插件里的「fire_explode(ent)」,在里面新增内容:
复制程式
// Get attacker
static attacker
attacker = pev(ent, pev_owner)
3.一样是寻找「fire_explode(ent)」里的内容,将以下内容
// Our task params
static params[1]
换成
复制程式
// Our task params
static params[2]
params[1] = attacker
4.寻找「public burning_flame(args[1], taskid)」并将这段改成
复制程式
public burning_flame(args[2], taskid)
5.将「public burning_flame(args[2], taskid)」里的
// Get player origin and flags
static Float:originF[3], flags
pev(ID_BLOOD, pev_origin, originF)
flags = pev(ID_BLOOD, pev_flags)
改成
复制程式
// Get player origin and flags
new attacker = args[1]
static Float:originF[3], flags
pev(ID_BLOOD, pev_origin, originF)
flags = pev(ID_BLOOD, pev_flags)
6.最后将「public burning_flame(args[2], taskid)」里的
// Take damage from the fire
if (health > firedamage)
fm_set_user_health(ID_BLOOD, health - firedamage)
改成
复制程式
// Take damage from the fire
if (health > firedamage)
{
fm_set_user_health(ID_BLOOD, health - firedamage)
// Store damage dealt
g_damagedealt[attacker] += firedamage
// Get damage required to get an ammo pack
static ammodamage
ammodamage = get_pcvar_num(cvar_ammodamage)
// Reward ammo packs for every [ammo damage] dealt
while (g_damagedealt[attacker] >= ammodamage)
{
g_ammopacks[attacker]++
g_damagedealt[attacker] -= ammodamage
}
}
else
{
log_kill(attacker,ID_BLOOD,"grenade",0)
g_ammopacks[attacker] += 1 // ammo packs given to human for kill
}
最后可以杀人的内容我自己多写了点内容,多的内容主要效果是:
燃烧弹造成的伤害也会和枪伤一样累积,累积到一定程度也会增加子弹包,如果烧死僵尸也会+1子弹包。