Exterminate.lua GMod


SUBMITTED BY: Guest

DATE: Aug. 17, 2012, 3:38 p.m.

FORMAT: Lua

SIZE: 642 Bytes

HITS: 2195

  1. -- EXTERMINATE AND DESTROY
  2. function exterminate(ply, text)
  3. if (string.match(text, "!exterminate") != nil) then
  4. players = player.GetAll()
  5. for k,v in pairs(players) do
  6. v:SetVelocity(Vector(math.random()*5000, math.random()*5000, math.random()*5000))
  7. local boom = ents.Create("env_explosion")
  8. boom:SetOwner(v)
  9. boom:SetPos(v:GetPos())
  10. boom:SetKeyValue("iMagnitude","100000")
  11. boom:SetKeyValue("iDamage", "100000")
  12. boom:Spawn()
  13. boom:Fire("explode", "", 0)
  14. v:Kill()
  15. end
  16. end
  17. end
  18. hook.Add("PlayerSay", "Extermination", exterminate)

comments powered by Disqus