Advertisement
Guest User

Untitled

a guest
Sep 20th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. local ZombieSpawnPoints = {
  2.  
  3. Vector( -10744.872070, 8951.499023, 136.031250 ),
  4. Vector( -10671.409180, 9722.273438, 136.031250 ),
  5. Vector( -2123.650879, 887.135925, 41.031250 ),
  6. Vector( -648.224121, 2280.922607, 41.031250 ),
  7. Vector( -674.037415, 3889.012451, 41.031250 ),
  8. Vector( 1398.665894, 4111.017578, 41.031250 ),
  9. Vector( 1391.172729, 1106.842773, 41.031250 ),
  10. Vector( 1594.428345, -980.007568, 41.031250 ),
  11. Vector( -220.279266, -877.248230, 73.032227 ),
  12. Vector( -2124.053711, 851.510925, 41.031250 ),
  13. Vector( -2145.654053, -1475.522461, 41.031250 ),
  14. Vector( -3533.449951, -1811.220947, 41.031250 ),
  15. Vector( -3484.442627, 3512.846680, 41.031250 ),
  16. Vector( -1141.693115, 4553.960938, 49.031250 ),
  17. Vector( 541.590210, 852.819275, -86.968750 )
  18. }
  19.  
  20. local numZombies = 0
  21. local maxZombies = 500
  22.  
  23. function ZombieSpawns()
  24.  
  25. timer.Create( "Respawner", 60, 500, function()
  26.  
  27. if ( numZombies < maxZombies ) then
  28.  
  29. for k, v in pairs( ZombieSpawnPoints ) do
  30.  
  31. local zombie = ents.Create( "npc_zombie" )
  32. zombie:SetPos( v )
  33. zombie:SetCustomCollisionCheck( true )
  34. zombie:Spawn()
  35. zombie:Activate()
  36.  
  37. numZombies = numZombies + 1
  38.  
  39. end
  40.  
  41. end
  42.  
  43. end )
  44. timer.Start("Respawner")
  45. end
  46.  
  47. hook.Add( "ShouldCollide", "ZombieNoCollide", function( ent1, ent2 )
  48.  
  49. if ( ent1:GetClass() == "npc_zombie" and ent2:GetClass() == "npc_zombie" ) then
  50.  
  51. return false
  52.  
  53. end
  54.  
  55. end )
  56.  
  57. hook.Add( "InitPostEntity", "StartZombieSpawning", ZombieSpawns )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement