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
[url]http://pastebin.com/raw.php?i=S1cbPFGF[/url]
and this is the original nextbot code
[url]http://pastebin.com/raw.php?i=yNS15dMm[/url]
If this is too big of a job, can i at least get some examples. :/
also, they dont drop items. :'(
The code in the OnKilled function will only work when the spawner dies not when the zombies die.
Sorry, you need to Log In to post a reply to this thread.