SWEP not shooting...

So “finished” coding my new SWEP. I tested it, no script/lua errors. But when I spawn it, the model works, and all is good. But when I try to shoot, it doesn’t work
My code:


if (SERVER) then
	AddCSLuaFile()
	SWEP.HoldType = "smg"
end

if (CLIENT) then
	SWEP.PrintName          = "SuperSMG"
	SWEP.Author		= "Stan"
	SWEP.Contact		= "fudgieman@swbell.net"
	SWEP.Category = "Admin_SMG"
	SWEP.Slot = 2
	SWEP.SlotPos = 3
	SWEP.DrawAmmo = false
end

SWEP.Base = "weapon_cs_base2"

SWEP.Spawnable = true
SWEP.AdminSpawnable = true

SWEP.ViewModel = "models/weapons/v_smg_mp5.mdl"
SWEP.WorldModel = "models/weapons/w_smg_mp5.mdl"

function SWEP:PrimaryAttack()
	self.Owner:SetAnimation( PLAYER_MOUSE1 )
end

SWEP.Weight = 1
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
SWEP.Primary.Sound = Sound("Weapon_MP5Navy.Single")
SWEP.Primary.Recoil = 0.1
SWEP.Primary.Damage = 1000000000
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0.005
SWEP.Primary.ClipSize = 100
SWEP.Primary.Delay = 0.03
SWEP.Primary.DefaultClip = 100
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = "smg1"

SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"

SWEP.IronSightsPos = Vector(4.7659, -3.0823, 1.8818)
SWEP.IronSightsAng = Vector(0.9641, 0.0252, 0)

[editline]6th October 2013[/editline]

I saw the problem of some errors, so I took SWEP.Base = “weapon_cs_base2” out. i also replaced the MOUSE1 with attack1. so no more errors, but still doesn’t shoot. Please help.


(User was banned for this post ("wrong section" - postal))

Wrong place to post this, see help & support or developer discussion.


(User was banned for this post ("Report, don't reply" - postal))