Python1320

Untitled

Jan 24th, 2011
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. cs_ents = cs_ents or {}
  2.  
  3. local me = nero.GetPlayer("oh")
  4.  
  5. for i in pairs(cs_ents) do
  6.     if cs_ents[i] and IsValid(cs_ents[i]) then FindMetaTable("Entity").Remove(cs_ents[i]) end
  7. end
  8.  
  9. for i=1, 400 do
  10.    
  11.     local ent = ents.Create("prop_physics")
  12.     ent:SetPos(me:GetPos() + VectorRand())
  13.     ent:SetModel("models/props_borealis/bluebarrel001.mdl")
  14.     ent:PhysicsInit(SOLID_VPHYSICS)
  15.     ent:SetMoveType(MOVETYPE_VPHYSICS)
  16.     ent:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
  17.     ent:Spawn()
  18.     ent:PhysWake()
  19.    
  20.     cs_ents[i] = ent
  21. end
  22.  
  23. timer.Create("hmm", 0.5, 0, function()
  24.     for i=1, 400 do
  25.         local phys = cs_ents[i]:GetPhysicsObject()
  26.         phys:AddVelocity(((me:GetShootPos() + (me:GetAimVector() * 2000)) - phys:GetPos()) + (VectorRand() * 600))
  27.     end
  28. end)
Advertisement
Add Comment
Please, Sign In to add comment