Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- Pictures And Sounds are taken from Youtube and Google. Voice Acting by OwnedbyCube
- ///////////////
- ////CREDITS////
- ///////////////
- ///Thanks to///
- ///Gamefreak///
- //for helping//
- //me with Lua//
- ///////////////
- ///Some Code///
- ///is taken////
- ///from////////
- ///Gamefreak///
- ///////////////
- SWEP.Primary.Delay = 10
- SWEP.Primary.Recoil = 0
- SWEP.Primary.Automatic = false
- SWEP.Primary.NumShots = 1
- SWEP.Primary.Damage = 0
- SWEP.Primary.Cone = 0
- SWEP.Primary.Ammo = nil
- SWEP.Primary.ClipSize = -1
- SWEP.Primary.ClipMax = -1
- SWEP.Primary.DefaultClip = -1
- SWEP.AmmoEnt = nil
- SWEP.Base = "weapon_tttbase"
- SWEP.HoldType = "slam"
- SWEP.AutoSpawnable = false
- SWEP.CanBuy = { ROLE_TRAITOR }
- SWEP.LimitedStock = true
- SWEP.InLoadoutFor = nil
- SWEP.HeadshotMultiplier = 0
- SWEP.AllowDrop = true
- SWEP.IsSilent = false
- SWEP.ViewModel = "models/weapons/c_csgo_c4.mdl"
- SWEP.WorldModel = "models/weapons/w_c4_planted.mdl"
- SWEP.AdminSpawnable = true
- SWEP.Primary.Ammo = "none"
- SWEP.AmmoEnt = "none"
- SWEP.NoSights = true
- SWEP.UseHands = true
- SWEP.Author = "OwnedbyCube (&Gamefreak)"
- SWEP.PrintName = "Armageddon"
- SWEP.Spawnable = true
- SWEP.AutoSpawnable = false
- SWEP.AdminSpawnable = true
- SWEP.AutoSwitchTo = false
- SWEP.AutoSwitchFrom = false
- SWEP.Kind = WEAPON_EQUIP2
- if SERVER then
- AddCSLuaFile()
- resource.AddFile("materials/vgui/TTT/icon_worms.vmt")
- resource.AddFile("materials/vgui/TTT/icon_worms.vmt")
- resource.AddFile( "materials/models/weapons/c_csgo_c4.mdl" )
- resource.AddFile( "materials/models/weapons/w_c4_planted.mdl" )
- util.AddNetworkString( "CALLINGWORM" )
- function ArmageddonBroadcast(...)
- local msg = {...}
- net.Start("CALLINGWORM")
- net.WriteTable(msg)
- net.Broadcast()
- end
- end
- if CLIENT then
- SWEP.PrintName = "Armageddon"
- SWEP.Slot = "7"
- SWEP.SlotPos = "8"
- SWEP.Icon = "vgui/TTT/icon_worms.vmt"
- SWEP.Instructions = "Left Mouse-Click to call it!"
- SWEP.Weight = "5"
- SWEP.ViewModelFOV = 60
- SWEP.ViewModelFlip = false
- SWEP.EquipMenuData = {
- type = "Weapon",
- desc = "Meteorites incoming! LM: To Call the Armageddon - Based on Worms"
- };
- net.Receive("CALLINGWORM",function(len)
- local msg = net.ReadTable()
- chat.AddText(unpack(msg))
- chat.PlaySound()
- surface.PlaySound("weapons/wormsarmageddon/funkspruch.wav")
- end)
- end
- function OneUpPlayer()
- local effectdata = EffectData()
- timer.Create("ArmageddonExe", 14, 1, function()
- local aliveplayer = {}
- for k,v in pairs(aliveplayer.GetAll()) do
- if v:IsTerror() then table.insert(aliveplayer,v) end
- end
- local randomply = aliveplayer[math.random(#aliveplayer)]
- randomply:EmitSound( Sound ("ambient/explosions/explode_4.wav") )
- util.BlastDamage( randomply, randomply, randomply:GetPos() , 300 , 150 )
- effectdata:SetStart( randomply:GetPos() + Vector(0,0,10) )
- effectdata:SetOrigin( randomply:GetPos() + Vector(0,0,10) )
- effectdata:SetScale( 1 )
- util.Effect( "HelicopterMegaBomb", effectdata )
- end )
- hook.Add("TTTPrepareRound", "TTTArmageddonExe", function() timer.Remove("ArmageddonExe") end)
- hook.Add("TTTEndRound", "TTTArmageddonExe", function() timer.Remove("ArmageddonExe") end)
- end
- function SWEP:PrimaryAttack()
- if SERVER then
- //original code taken from Gamefreak\\
- ArmageddonBroadcast("Armageddon: ", Color(255,0,0), net.ReadEntity():Nick().. ", is calling an Armageddon!")
- DamageLog("ARMAGEDDON: " .. self.Owner:Nick() .. " [" .. self.Owner:GetRoleString() .. "] called an Armageddon" )
- PrintMessage( HUD_PRINTCENTER, "ATTENTION! Armageddon incoming!")
- end
- function OneUpPlayer()
- end
- function OneUpPlayer()
- end
- function OneUpPlayer()
- end
- function OneUpPlayer()
- end
- --ENDE--
- end
- if CLIENT then
- net.Receive("CALLINGWORM", function()
- chat.AddText("Armageddon: ", Color(255,0,0), net.ReadEntity():Nick().. ", is calling an Armageddon!")
- chat.PlaySound()
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement