Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ent:PHinfect()
- ent.phinfected = 1
- timer.Create( ent:SteamID().."surccumb", 60, 0, PHsurccumb, ent)
- timer.Create( ent:SteamID().."cough", 30, 0, PHcough, ent)
- function ent:StartTouch(hitEnt)
- if ent.phinfected == 1 do
- hitEnt:PHinfect()
- end
- end
- end
- end
- function ENT:Destruct()
- local vPoint = self:GetPos()
- local effectdata = EffectData()
- local infectees = ents.FindInSphere(vPoint, 200)
- WorldSound("ambient/materials/cupdrop.wav",vPoint,65,100)
- effectdata:SetStart(vPoint)
- effectdata:SetOrigin(vPoint)
- effectdata:SetScale(1)
- util.Effect("StriderBlood", effectdata)
- for k, v in pairs(infectees) do
- local ply = v
- ply:infect()
- end
- end
- function PHsurccumb(ply)
- if ply.phinfected == 1 do
- ply.phinfected = 0
- ply:kill()
- end
- end
- end
- function PHcough(ply)
- if ply.phinfected == 1 do
- WorldSound("ambient/voices/cough1.wav",ply:GetPos(),70,100)
- timer.Create( ply:SteamID().."cough", math.Rand(2,10), 0, PHcough, ply)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement