• Help with making addon
    2 replies, posted
Ok well I'm trying to make a poison zombie torso NPC. right now it is basically based on npc_poisonzombie and i removed the throwing headcrabs part but the only problem i have is when it dies it always drops an extra poison headcrab? this is the death code AddCSLuaFile() hook.Add("OnNPCKilled", "npc_poisonzombie_torso_death", function(victim, Inflictor, killer) if victim:IsNPC() and victim:GetClass() == "npc_poisonzombie" and victim:GetName() == "Poison Zombie Torso" then victim:SetModel("models/zombie/poison_torsos.mdl") victim:SetKeyValue( "crabcount", 0 ) end end) i dont know how to stop the extra poison headcrab from dropping
You can run NPC:SetSaveValue("m_fIsTorso", true) before the NPC is killed.
[QUOTE=code_gs;52402051]You can run NPC:SetSaveValue("m_fIsTorso", true) before the NPC is killed.[/QUOTE] Thx
Sorry, you need to Log In to post a reply to this thread.