How can i make it where each npc gives a different amount of points in pointshop?
5 replies, posted
I tried OnNPCKilled but this gives me points for every npc i kill. I want points for specific npc deaths.
if ( ent:GetClass() == "specialNPC" ) then else end
i keep getting this error
attempt to index global 'entity' (a function value)
Here is my code
function GM:OnNPCKilled( victim, killer, weapon )
if ( Entity:GetClass() == "npc_zombie" ) then
killer:PS_GivePoints(60)
else
end
end
hook.Add("OnNPCKilled", "GivePoints", OnNPCKilled)
You are attempting to use an undefined variable. Entity should be victim.
-Ninja'd-
[QUOTE=Robotboy655;43625074]You are attempting to use an undefined variable. Entity should be victim.[/QUOTE]
holy dicks it works, thank you.
Sorry, you need to Log In to post a reply to this thread.