Advertisement
HK47

komnata gm_bigcity

Apr 26th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.55 KB | None | 0 0
  1. if CLIENT then
  2.     local emit = ParticleEmitter(Vector(-227, 2683, -9343))
  3.    
  4.     hook.Add("PostDrawOpaqueRenderables", "kal", function()
  5.         local dlight = DynamicLight("govno")
  6.                
  7.         dlight.Pos = Vector(-185, 2498, -9300)
  8.         dlight.r = 255
  9.         dlight.g = 255
  10.         dlight.b = 255
  11.         dlight.Brightness = 0
  12.         dlight.Size = 500
  13.         dlight.Decay = 0
  14.         dlight.DieTime = CurTime() + 0.2
  15.    
  16.         cam.Start3D2D(Vector(-112, 2679, -9288), Angle(0, 0, 90), 0.15)
  17.             draw.DrawText("Конец HK47", "super", 0, 0, Color(0, 255, 0, 255), TEXT_ALIGN_CENTER)
  18.         cam.End3D2D()
  19.        
  20.         for i = 1, math.random(1, 6) do
  21.             local vec = VectorRand()
  22.             vec.y = 0
  23.             vec.z = 0
  24.             local p = emit:Add("sprites/blueglow2", Vector(-227, 2683, -9343) + vec * 30)
  25.             p:SetDieTime(math.random(1, 5))
  26.             p:SetGravity(Vector(0, 0, math.random(30, 60)))
  27.             p:SetStartAlpha(255)
  28.             p:SetEndAlpha(0)
  29.             p:SetRoll(math.random(-10, 10))
  30.             p:SetRollDelta(math.random(-10, 10))
  31.             p:SetStartSize(3)
  32.             p:SetEndSize(0)
  33.         end
  34.        
  35.         for i = 1, math.random(1, 6) do
  36.             local vec = VectorRand()
  37.             vec.y = 0
  38.             vec.z = 0
  39.             local p = emit:Add("sprites/blueglow2", Vector(-190, 2307, -9307) + vec * 60)
  40.             p:SetDieTime(math.random(1, 5))
  41.             p:SetGravity(Vector(0, 0, math.random(10, 30)))
  42.             p:SetStartAlpha(255)
  43.             p:SetEndAlpha(0)
  44.             p:SetRoll(math.random(-10, 10))
  45.             p:SetRollDelta(math.random(-10, 10))
  46.             p:SetStartSize(3)
  47.             p:SetEndSize(0)
  48.         end
  49.     end)
  50.    
  51.     local EFF = {}
  52.    
  53.     function EFF:Init(data)
  54.         self.Pos = data:GetOrigin()
  55.        
  56.         self.Emitter = ParticleEmitter(self.Pos)
  57.        
  58.         local p = self.Emitter:Add("sprites/redglow1", self.Pos + VectorRand() * math.random(1, 8))
  59.         p:SetDieTime(math.Rand(1, 3))
  60.         p:SetStartSize(math.Rand(0.1, 1))
  61.         p:SetEndSize(math.random(2, 7))
  62.         p:SetStartAlpha(255)
  63.         p:SetEndAlpha(0)
  64.         p:SetGravity(Vector(0, 0, math.random(-50, -30)))
  65.        
  66.         self.Emitter:Finish()
  67.     end
  68.    
  69.     function EFF:Think()
  70.         return false
  71.     end
  72.    
  73.     function EFF:Render()
  74.     end
  75.    
  76.     effects.Register(EFF, "skull_effect_blyat")
  77. end
  78.  
  79. local function checkc(pos, min, max)
  80.     if pos.x < min.x then return false end
  81.     if pos.y < min.y then return false end
  82.     if pos.z < min.z then return false end
  83.                
  84.     if pos.x > max.x then return false end
  85.     if pos.y > max.y then return false end
  86.     if pos.z > max.z then return false end
  87.                
  88.     return true
  89. end
  90.  
  91. local min = Vector(-382, 2312, -9345)
  92. local max = Vector(-1, 2678, -9200)
  93.  
  94. if SERVER then
  95.  
  96.     local skull = ents.Create("prop_physics")
  97.     skull:SetPos(Vector(-344, 2346, -9305))
  98.     skull:SetAngles(Angle(0, 45, 0))
  99.     skull:SetModel("models/Gibs/HGIBS.mdl")
  100.     skull:Spawn()
  101.     skull:SetModelScale(2.5, 0)
  102.     skull:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
  103.    
  104.     timer.Create("effectsskullbl", 0.1, 0, function()
  105.         if not IsValid(skull) then timer.Stop("effectsskullbl") return end
  106.        
  107.         local ef = EffectData()
  108.         ef:SetOrigin(skull:GetPos())
  109.        
  110.         for i = 1, math.random(2, 5) do
  111.             util.Effect("skull_effect_blyat", ef)
  112.         end
  113.     end)
  114.    
  115.     timer.Create("pointteslalol", 0.8, 0, function()
  116.         local tes = ents.Create("point_tesla")
  117.         tes:SetPos(Vector(-185, 2498, -9220))
  118.         tes:SetKeyValue("thick_min", "0.1")
  119.         tes:SetKeyValue("thick_max", "1")
  120.         tes:SetKeyValue("lifetime_min", "1")
  121.         tes:SetKeyValue("lifetime_max", "1")
  122.         tes:SetKeyValue("interval_min", "0.1")
  123.         tes:SetKeyValue("interval_max", "1")
  124.         tes:SetKeyValue("beamcount_min", "14")
  125.         tes:SetKeyValue("beamcount_max", "19")
  126.         tes:SetKeyValue("m_flRadius", "500")
  127.         tes:SetKeyValue( "texture", "effects/laser1.vmt")
  128.         tes:SetKeyValue("m_Color", "Color(0, 255, 255)")
  129.         tes:Spawn()
  130.         tes:Fire("DoSpark", "1", 1)
  131.     end)
  132.    
  133.     hook.Add("Think", "skullver", function()
  134.         for k, v in pairs(player.GetAll()) do
  135.             if checkc(v:GetPos(), min, max) and v:Nick() != "unknown" then
  136.                 v:Kill()
  137.                 v:Spawn()
  138.             end
  139.         end
  140.    
  141.         if not IsValid(skull) then
  142.             skull = ents.Create("prop_physics")
  143.             skull:SetPos(Vector(-344, 2346, -9305))
  144.             skull:SetAngles(Angle(0, 45, 0))
  145.             skull:SetModel("models/Gibs/HGIBS.mdl")
  146.             skull:Spawn()
  147.             skull:SetModelScale(2.5, 0)
  148.             skull:SetCollisionGroup(COLLISION_GROUP_DEBRIS)
  149.            
  150.             timer.Create("effectsskullbl", 0.1, 0, function()
  151.                 if not IsValid(skull) then timer.Stop("effectsskullbl") return end
  152.                
  153.                 local ef = EffectData()
  154.                 ef:SetOrigin(skull:GetPos())
  155.                
  156.                 for i = 1, math.random(2, 5) do
  157.                     util.Effect("skull_effect_blyat", ef)
  158.                 end
  159.             end)
  160.            
  161.             return
  162.         end
  163.        
  164.         skull:SetPos(Vector(-344, 2346, -9305 + math.sin(CurTime() * 1.1) * 4))
  165.        
  166.         if skull:IsOnFire() then skull:Extinguish() end
  167.  
  168.         skull:SetAngles(Angle(math.sin(CurTime()) * 10, 45, 0))
  169.     end)
  170. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement