Skip to content

Commit

Permalink
Fixed a bunch of things, worldmodel not showing,
Browse files Browse the repository at this point in the history
recoil, No Icon in spawnmenu, spelling errors, and some others
  • Loading branch information
ELPatitoLoco committed Oct 25, 2023
1 parent 20c4f1b commit 26f28fc
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions lua/weapons/e.r.c.s.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ 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 = [[Left Click shoots a powerfull 12.7 mm sniper round that will destroy your enemies!!
At the moments our engineers are working on new features wich will provide more mass destruction!!
SWEP.Instructions = [[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.FiresUnderwater = true
SWEP.DrawWeaponInfoBox = true
SWEP.IconOverride = "materials/entities/weapon_357.png"

SWEP.Primary.ClipSize = 10
SWEP.Primary.DefaultClip = 10
SWEP.Primary.Automatic = true
Expand All @@ -29,7 +33,7 @@ SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true

SWEP.ViewModel = "models/weapons/v_357.mdl"
SWEP.WorldModel = " models/weapons/w_357.mdl"
SWEP.WorldModel = "models/weapons/w_357.mdl"

local ShootSound = Sound("weapons/mortar/mortar_fire1.wav")

Expand Down Expand Up @@ -60,12 +64,13 @@ function SWEP:PrimaryAttack()
Bullet.Src = ply:GetShootPos()
Bullet.Dir = ply:GetAimVector()
Bullet.Spread = Vector(self.Primary.Spread, self.Primary.Spread, 0)
Bullet.Tracer = self.Primary.Tracer
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.random(0, 1)
local RecoilRandomMultiplier = self.Primary.Recoil * math.random(-1, 1)

ply:ViewPunch(Angle(RecoilMultiplier, RecoilRandomMultiplier, RecoilMultiplier))

Expand All @@ -79,6 +84,11 @@ function SWEP:PrimaryAttack()
self:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
end

if CLIENT then --I got thjis from kilo swep hope you don't mind
killicon.Add("E_R_C_S", "vgui/face/grin", Color(255, 255, 255, 255))
--SWEP.WepSelectIcon = surface.GetTextureID("vgui/gmod_tool")
end

function SWEP:SecondaryAttack() end
--[[ All of this is seized until further improvment of my lua skills
function SWEP:DoImpactEffect(GaussTracer,2)
Expand Down

0 comments on commit 26f28fc

Please sign in to comment.