I am trying to check whether the player kills a certain npc
I am not sure where to start besides something like this:
[CODE]function KillCheck( victim, inflictor, attacker )
if ( attacker:Quest() == "Slay a wild beast" && victim != attacker ) then
QuestComplete(attacker, 1)
end
if( attacker:Quest() == "Slay a mythical beast" && victim == "npc_carnophage")then
QuestComplete(attacker, 3)
end
end
hook.Add("OnNPCKilled","KillCounter", KillCheck)[/CODE]
The line in question:
[CODE]if( attacker:Quest() == "Slay a mythical beast" && victim == "npc_carnophage")then[/CODE]
Is there a way to check the victim's ent class instead of this? Because I'm sure this doesn't work.
Thanks in advance and sorry for my frequent most likely stupid posts...
*Cough* Found it myself....sorry.
Sorry, you need to Log In to post a reply to this thread.