下面是引用 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子彈包。