Nextbots 2.0 - Addfrags, addmoney, constantly spawn zombies !help!

I’m really frustrated with this. zombies work fine, but when it comes to them dieing; they dont add kill count to scoreboard, they dont add money to player, and they stop spawning after 15-45 seconds.

This makes them spawn in the gamemode. (I’m Not Sure, Another Coder Coded it)


if(#ents.FindInSphere(self:GetPos(),32) > 0) then
self:SetPos(self:GetPos() + Vector(math.random(-64),math.random(64),0))
end


This Adds Frags


if(IsValid(dmginfo:GetAttacker()) && dmginfo:GetAttacker():IsPlayer()) then
dmginfo:GetAttacker():AddFrags(1)
end


and this (i’m thinking) gives the money


table.sort(self.Damages,function(a,b) return a[2] > b[2] end)
for k,v in pairs(self.Damages) do

	v[1]:SetNWInt("Money",v[1]:GetNWInt("Money",0) + (#self.Damages-k)*10)

end


Just seeing if I can add it to the nextbots shared.lua. I already have the nextbot shared.lua’s in a addon folder so i can customize it manually.

This is the nextbot code i’m using

http://pastebin.com/raw.php?i=S1cbPFGF

and this is the original nextbot code

http://pastebin.com/raw.php?i=yNS15dMm

If this is too big of a job, can i at least get some examples. :confused:

also, they dont drop items. :’(

The code in the OnKilled function will only work when the spawner dies not when the zombies die.