1.如何關閉火焰彈?
---
找第2個 Fire Grenade
看見
複製程式
if (equal(model[7], "w_he", 4)) // Fire Grenade
後
把
複製程式
if (equal(model[7], "w_he", 4)) // Fire Grenade
{
// Give it a glow
fm_set_rendering(ent, kRenderFxGlowShell, 200, 0, 0, kRenderNormal, 16)
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(ent) // entity
write_short(g_trailSprite) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(200) // r
write_byte(0) // g
write_byte(0) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(ent, PEV_NADE_TYPE, NADE_TYPE_FIRE)
}
刪去
再把
複製程式
else if (equal(model[7], "w_fl", 4)) // Frost Grenade
改為
複製程式
if (equal(model[7], "w_fl", 4)) // Frost Grenade
再找 Fire Grenade
刪去
複製程式
case NADE_TYPE_FIRE: // Fire Grenade
{
// Reset nada to prevent loop in here again
set_pev(ent, PEV_NADE_TYPE, 0)
// Fire grenade explode sound
emit_sound(ent, CHAN_WEAPON, SOUND_FIRE_EXPLODE, 1.0, ATTN_NORM, 0, PITCH_NORM)
static Float:origin[3]
pev(ent, pev_origin, origin)
fire_explode(origin)
}
應該可以了