Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SWEP:Deploy()
- if SERVER then
- self.Owner:DrawViewModel(false)
- end
- if CLIENT then
- if game.SinglePlayer() then
- chat.AddText(Color(255,255,255), ply, "총 안보이는게 정상입니다.")
- chat.AddText(Color(255,0,0), ply, "싱글 플레이 상태입니다. 광고가 보이지 않습니다.")
- else
- chat.AddText(Color(255,255,255), ply, "총 안보이는게 정상입니다.")
- end
- end
- end
- if CLIENT then
- local speed = 1 -- speed multiplier
- local pow = 2 -- This will make the sine curve shaper if you think it'S too smooth. Normal is 1
- local tex_cafe = surface.GetTextureID("ending/cafebene")
- local tex_ivy = surface.GetTextureID("ending/ivyclub")
- local tex_afreeca = surface.GetTextureID("ending/afreecatv")
- local tex_afreeca2 = surface.GetTextureID("ending/afreecatv2")
- local function draw_texture(tex)
- surface.SetTexture(tex)
- surface.SetDrawColor (255, 255, 255, 255)
- surface.DrawTexturedRect(W /2 - 70, H -166, 256, 85)
- end
- -- time starts from 0 counts up.
- function SWEP:DoEffects(time)
- time = time * speed
- local F = math.sin(time) ^ pow
- local W, H = ScrW(), ScrH()
- surface.SetFont("ProduceSupport")
- surface.SetTextPos(W /2 - 190, H -140)
- surface.SetTextColor(255, 255, 255, 255)
- surface.DrawText("제작지원")
- -- I don't know if this order is correct..
- if time < 0.25 then
- draw_texture(tex_cafe)
- elseif time < 0.5 then
- draw_texture(tex_ivy)
- elseif time < 0.75 then
- draw_texture(tex_afreeca)
- elseif time < 0.8 then
- draw_texture(tex_afreeca2)
- end
- local params = {}
- params["$pp_colour_addr"] = 0
- params["$pp_colour_addg"] = 0
- params["$pp_colour_addb"] = 0
- params["$pp_colour_brightness"] = F
- params["$pp_colour_contrast"] = 1
- params["$pp_colour_colour"] = F
- params["$pp_colour_mulr"] = 0
- params["$pp_colour_mulg"] = 0
- params["$pp_colour_mulb"] = 0
- DrawColorModify(params)
- -- add alpha, draw alpha, delay
- DrawMotionBlur(0.8, 0.95, 0)
- DrawBloom(
- 0, -- darken
- 1, -- multiply
- 2, -- sizex
- 2, -- sizey
- 3, -- passes
- 1, -- red multiplier
- 1, -- green multiplier
- 1 -- blue multiplier
- )
- if F < 0 then
- return false
- end
- end
- end
- if SERVER then
- function SWEP:DoEffects(time)
- -- setting it lower than 0.25 might cause the game to run into issues
- game.SetTimeScale(math.Clamp(time, 0.25, 1))
- end
- end
- function SWEP:PrimaryAttack()
- if not self:CanPrimaryAttack() then return end
- local owner = self.Owner
- local bullet = {}
- bullet.Num = self.Primary.NumberofShots -- is this correct? (lower case "of")
- bullet.Src = owner:GetShootPos()
- bullet.Dir = owner:GetAimVector()
- bullet.Spread = Vector(1, 1, 0) * self.Primary.Spread * 0.1
- bullet.Tracer = 0
- bullet.Force = self.Primary.Force
- bullet.Damage = self.Primary.Damage
- bullet.AmmoType = self.Primary.Ammo
- local recoil = self.Primary.Recoil
- owner:FireBullets(bullet)
- owner:ViewPunch(Angle(recoil * -1, recoil * math.Rand(-1, 1), recoil * -1))
- self:TakePrimaryAmmo(self.Primary.TakeAmmo)
- self:ShootEffects()
- self:EmitSound(self.Primary.Sound)
- if not self.pp_start then
- self.pp_start = UnPredictedCurTime()
- local event = CLIENT and "RenderScreenspaceEffects" or "Think"
- hook.Add(name, tostring(self), function()
- if
- not self:IsValid() or
- not self:GetOwner():IsValid() or
- self:GetOwner():GetActiveWeapon() ~= self or
- self:DoEffects(UnPredictedCurTime() - self.pp_start) ~= false
- then
- hook.Remove(name, tostring(self))
- end
- end)
- end
- self:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement