From d2ab18a8eecfd3dfb0425ec9e8931e7299837771 Mon Sep 17 00:00:00 2001 From: Derpius <49565664+Derpius@users.noreply.github.com> Date: Wed, 25 Oct 2023 21:21:42 +0100 Subject: [PATCH 1/2] Empty commit to trigger deployment From 3a8d17be79907694748d3b412a04623da942ce29 Mon Sep 17 00:00:00 2001 From: el_patito_loco <130762237+ELPatitoLoco@users.noreply.github.com> Date: Mon, 27 Nov 2023 18:01:11 +0100 Subject: [PATCH 2/2] Swep el patito e.r.c.s (#17) * V1.0 Just uploading the basic coede * Uploading code * Changing E.R.C.S.lua name to not create conflicts * Rename E.R.C.S.lua to e.r.c.s.lua Changing E.R.C.S.lua file name to lower case to not cause conflicts with linux * Fixed lots of unused stuff and also added recoil * Removed and commented a bunch of unused functions and variables and changed random math having constant value * Ultimate Commenting and fixing * Fixed a bunch of things, worldmodel not showing, recoil, No Icon in spawnmenu, spelling errors, and some others * Removed unesecary parts, got some usefull comments , got done some calibration to the bullets and still having an issue with the kill feed * Made the kill message functional by adding a killicon.AddFont * Removed a bunch of useless code and comments * Added more accurate comments --- lua/autorun/tas_weapons_init.lua | 2 +- lua/weapons/e.r.c.s.lua | 87 ++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 lua/weapons/e.r.c.s.lua diff --git a/lua/autorun/tas_weapons_init.lua b/lua/autorun/tas_weapons_init.lua index e3afdd7..d7d80a1 100644 --- a/lua/autorun/tas_weapons_init.lua +++ b/lua/autorun/tas_weapons_init.lua @@ -1,4 +1,4 @@ TASWeapons = { Category = "TAS Weapons", - Authors = { Derpius = "Derpius", Kilo = "Kilo" }, --STEAM_0:0:547731733 Derpius, STEAM_0:0:84051936 Kilo + Authors = { Derpius = "Derpius", Kilo = "Kilo", El_Patito = "el_patito" }, --STEAM_0:0:547731733 Derpius, STEAM_0:0:84051936 Kilo, STEAM_0:0:572655757 el_patito_loco } diff --git a/lua/weapons/e.r.c.s.lua b/lua/weapons/e.r.c.s.lua new file mode 100644 index 0000000..42777a5 --- /dev/null +++ b/lua/weapons/e.r.c.s.lua @@ -0,0 +1,87 @@ +SWEP.Author = "el_patito_loco" +SWEP.PrintName = "e.r.c.s" --"Experimental Rotating Chamber Sniper" +SWEP.Category = TASWeapons.Category +SWEP.Author = TASWeapons.Authors.El_Patito +SWEP.Instructions = + [[Experimental Rotating Chamber Sniper - Left Click shoots a powerful 12.7 mm sniper round that will destroy your enemies!! +At the moment our engineers are working on new features which will provide more mass destruction!! +]] + +SWEP.Spawnable = true +SWEP.AdminOnly = false + +SWEP.ViewModel = "models/weapons/v_357.mdl" +SWEP.WorldModel = "models/weapons/w_357.mdl" + +local ShootSound = Sound("weapons/mortar/mortar_fire1.wav") + +SWEP.DrawWeaponInfoBox = true +SWEP.IconOverride = "materials/entities/weapon_357.png" + +--ammo + +SWEP.Primary.ClipSize = -1 +SWEP.Primary.DefaultClip = -1 +SWEP.Primary.Automatic = true +SWEP.Primary.Ammo = "none" + +SWEP.Secondary.ClipSize = -1 +SWEP.Secondary.DefaultClip = -1 +SWEP.Secondary.Automatic = true +SWEP.Secondary.Ammo = "none" + +--Inventory related + +SWEP.Weight = 5 +SWEP.AutoSwitchTo = false +SWEP.AutoSwitchFrom = false + +SWEP.Slot = 4 +SWEP.SlotPos = 3 +SWEP.DrawAmmo = false +SWEP.DrawCrosshair = true + +--weapon properties + +SWEP.Primary.Recoil = 1 +SWEP.Primary.Damage = 75 +SWEP.Primary.NumShots = 10 +SWEP.Primary.Spread = 0 +SWEP.Primary.Delay = 1 + +function SWEP:Initialize() + self:SetHoldType("revolver") +end + +function SWEP:PrimaryAttack() + local owner = self:GetOwner() + + local Bullet = {} + Bullet.Num = self.Primary.NumShots + Bullet.Src = owner:GetShootPos() + Bullet.Dir = owner:GetAimVector() + Bullet.Spread = Vector(self.Primary.Spread, self.Primary.Spread, 0) + Bullet.Tracer = 1 + Bullet.TracerName = "AirboatGunTracer" + Bullet.Damage = self.Primary.Damage + Bullet.AmmoType = self.Primary.Ammo + + local RecoilMultiplier = self.Primary.Recoil * -1 + local RecoilRandomMultiplier = self.Primary.Recoil * math.Rand(-1, 1) + + owner:ViewPunch(Angle(RecoilMultiplier, RecoilRandomMultiplier, RecoilMultiplier)) + + self:DoImpactEffect("GaussTracer") + self:FireBullets(Bullet) + self:ShootEffects() + self:EmitSound(ShootSound) + self:ShootEffects() + self:SetNextPrimaryFire(CurTime() + self.Primary.Delay) +end + +if CLIENT then + killicon.AddAlias("e.r.c.s", "weapon_357") --Gives a killicon + language.Add("e.r.c.s", "E.R.C.S") -- This makes the name of the swep to be displayed in the kill feed. +end + +function SWEP:SecondaryAttack() end