Anyone can help me on this?

i have a glitch with zoeys old L4D2 pack and it just missing just the arms.

and here is the error i get all the time

[addons\zoeys l4d2 sweps\lua\weapons\l4d2_base\shared.lua:35] attempt to index field ‘Arms’ (a nil value)
[addons\zoeys l4d2 sweps\lua\weapons\l4d2_base\shared.lua:20] ClientsideModel cannot be called while rendering

Any clues?

Would probably help to post what code is within l2d2_base\shared.lua.

l2d2_bas/shared.lua. where is that?

If you find the addon which you installed and navigate to zoeys l4d2 swep -> lua -> weapons -> l4d2_base -> shared.lua

kk found that what now i all ready have notepad+ so any code that can fix it here ill post it

[editline]15th January 2011[/editline]

35 - self.Arms:SetPos(self.Owner:GetViewModel():GetPos())
20 - self.Arms = ClientsideModel(“models/weapons/arms/v_arms_coach_new.mdl”)

Probably best to post all of the code, since the errors will likely lie in self.Arms

kk but do u mind that i do it withou the numbers?

just do [lua] tags either side of the pasted code (/lua on the last tag).

it is [lau]

It’s lua, not lau.

Here it is

CreateConVar( “l4d2_adminonly”, 0, { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
CreateConVar( “l4d2_infinite_pistol_ammo”, 0, { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
CreateConVar( “l4d2_real_clips”, 0, { FCVAR_REPLICATED, FCVAR_ARCHIVE } )
CreateConVar( “l4d2_desertrifle_isauto”, 0, { FCVAR_REPLICATED, FCVAR_ARCHIVE } )

if (CLIENT) then
surface.CreateFont(“cs”, ScrW()/3, ScrH()/3, true, true, “CSHIcon”)
surface.CreateFont(“HalfLife2”, ScrW()/3, ScrH()/3, true, true, “Hl2HUD”)
surface.CreateFont(“HL2MP”, ScrW()/3, ScrH()/3, true, true, “HL2KC”)
end

function SWEP:ValidateArms() – Hey zoey here, just to say that im updating my tf2 code so these pricks can steal it AGAIN…
self:CheckArms()
– Oh look at this, this isnt something azadouche had, Real time arm changing, AND ITS CLIENT SIDE.
if self.Owner:GetNWInt(“l4d2_character”) == “nick” then
self.Arms = ClientsideModel(“models/weapons/arms/v_arms_gambler_new.mdl”)
elseif self.Owner:GetNWInt(“l4d2_character”) == “ellis” then
self.Arms = ClientsideModel(“models/weapons/arms/v_arms_mechanic_new.mdl”)
elseif self.Owner:GetNWInt(“l4d2_character”) == “coach” then
self.Arms = ClientsideModel(“models/weapons/arms/v_arms_coach_new.mdl”)
elseif self.Owner:GetNWInt(“l4d2_character”) == “rochelle” then
self.Arms = ClientsideModel(“models/weapons/arms/v_arms_producer_new.mdl”)
elseif self.Owner:GetNWInt(“l4d2_character”) == “bill” then
self.Arms = ClientsideModel(“models/weapons/arms/v_arms_bill.mdl”)
elseif self.Owner:GetNWInt(“l4d2_character”) == “francis” then
self.Arms = ClientsideModel(“models/weapons/arms/v_arms_francis.mdl”)
elseif self.Owner:GetNWInt(“l4d2_character”) == “louis” then
self.Arms = ClientsideModel(“models/weapons/arms/v_arms_louis.mdl”)
elseif self.Owner:GetNWInt(“l4d2_character”) == “zoey” then
self.Arms = ClientsideModel(“models/weapons/arms/v_arms_zoey.mdl”)
else
self.Arms = ClientsideModel(“models/weapons/arms/v_arms_gambler_new.mdl”)
end
– Hey zoey again, Just taking the model where using and merging it with our v_model.
self.Arms:SetPos(self.Owner:GetViewModel():GetPos())
self.Arms:SetAngles(self.Owner:GetViewModel():GetAngles())
self.Arms:AddEffects(EF_BONEMERGE)
self.Arms:SetNoDraw(false)
self.Arms:SetParent(self.Owner:GetViewModel())
end

function SWEP:ViewModelDrawn()
if not self.Arms then self:ValidateArms() end
if self.Arms then self.Arms:DrawModel() end
if LocalPlayer():GetActiveWeapon():GetNWBool(“ArmsReset”) then
self.Arms:Remove()
self:ValidateArms()
end
end

function SWEP:SetDeploySpeed( speed )
self.m_WeaponDeploySpeed = 1
end

function SWEP:SpecialDeploy()
if not self:GetNWBool(“ReDeployed”) then
if self.Owner:Crouching() then
self:SetNWInt(“ConeX”,2)
else
self:SetNWInt(“ConeX”,1)
end
self:SetNWBool(“ItemEX”,false)
self:EmitSound(self.DrawSound)
self.Melee = nil
self:SetNWBool(“ReDeployed”,true)
self:Deploy()
end
end

function SWEP:BaseHolster()
self:StopSmoke()
self:SetNWBool(“ReDeployed”,false)
self.Owner:SetNWInt(“LastWeapon”, tostring(self:GetClass()))
if self:GetNWBool(“Iron”) then
self.Owner:SetFOV( 0, 0.2 )
end
return true
end

if (CLIENT) then
surface.CreateFont(“cs”, ScrW()/3, ScrH()/3, true, true, “CSHIcon”)
surface.CreateFont(“HalfLife2”, ScrW()/3, ScrH()/3, true, true, “Hl2HUD”)
end

local PistolWeaponSet = {
“l4d2_deserteagle”,
“l4d2_pistol”,
“l4d2_dualpistol”}

function SWEP:UnloadWeapon()
self.Unload = nil
if self:Clip1() <= 0 then return false end
if table.HasValue(PistolWeaponSet, self:GetClass()) and GetConVarNumber(“l4d2_infinite_pistol_ammo”) == 1 then return false end
if (SERVER) then
self.Owner:GiveAmmo( self:Clip1()-1, self.Primary.Ammo, true )
end
self:SetClip1(1)
end

function SWEP:Reloadgun()
self.DoReload = nil
local start = self:Clip1()
local taken = math.min( self.Primary.ClipSize, self.Primary.ClipSize - start, self.Owner:GetAmmoCount( self.Primary.Ammo ) )
if self:GetNWInt(“FireBullet”) > 0 and self:GetNWInt(“FireBullet”) <= self.Primary.ClipSize then
if self:Clip1() > 0 then
self:SetClip1(self:Clip1() + self:GetNWInt(“FireBullet”) -1)
self.Owner:RemoveAmmo( self:GetNWInt(“FireBullet”) - 1, self:GetPrimaryAmmoType() )
if self:Clip1() > self.Primary.ClipSize then self:SetClip1(self.Primary.ClipSize) end
else
self:SetClip1(self:Clip1() + self:GetNWInt(“FireBullet”))
self.Owner:RemoveAmmo( self:GetNWInt(“FireBullet”), self:GetPrimaryAmmoType() )
if self:Clip1() > self.Primary.ClipSize then self:SetClip1(self.Primary.ClipSize) end
end
elseif self:GetNWInt(“ExplodeBullet”) > 0 and self:GetNWInt(“ExplodeBullet”) <= self.Primary.ClipSize then
if self:Clip1() > 0 then
self:SetClip1(self:Clip1() + self:GetNWInt(“ExplodeBullet”) -1)
self.Owner:RemoveAmmo( self:GetNWInt(“ExplodeBullet”) - 1, self:GetPrimaryAmmoType() )
if self:Clip1() > self.Primary.ClipSize then self:SetClip1(self.Primary.ClipSize) end
else
self:SetClip1(self:Clip1() + self:GetNWInt(“ExplodeBullet”))
self.Owner:RemoveAmmo( self:GetNWInt(“ExplodeBullet”), self:GetPrimaryAmmoType() )
if self:Clip1() > self.Primary.ClipSize then self:SetClip1(self.Primary.ClipSize) end
end
else
self:SetClip1(self:Clip1() + taken)
if table.HasValue(PistolWeaponSet, self:GetClass()) and GetConVarNumber(“l4d2_infinite_pistol_ammo”) == 1 then return false end
self.Owner:RemoveAmmo( taken , self:GetPrimaryAmmoType() )
if self:Clip1() > self.Primary.ClipSize then self:SetClip1(self.Primary.ClipSize) end
end
end

SWEP.Primary.Smokey = “sidearm_smoke”
SWEP.Primary.Muzzle = “muzzle_pistols”
PrecacheParticleSystem(“sidearm_smoke”)
PrecacheParticleSystem(“muzzle_pistols”)
PrecacheParticleSystem(“muzzle_rifles”)
PrecacheParticleSystem(“muzzle_mg42”)
PrecacheParticleSystem(“muzzle_rockets”)

/---------------------------------------------------------
Sensibility
---------------------------------------------------------
/
local LastViewAng = false

local function SimilarizeAngles (ang1, ang2)

ang1.y = math.fmod (ang1.y, 360)
ang2.y = math.fmod (ang2.y, 360)

if math.abs (ang1.y - ang2.y) &gt; 180 then
	if ang1.y - ang2.y &lt; 0 then
		ang1.y = ang1.y + 360
	else
		ang1.y = ang1.y - 360
	end
end

end

local function ReduceScopeSensitivity (uCmd)

if LocalPlayer():GetActiveWeapon() and LocalPlayer():GetActiveWeapon():IsValid() then
	local newAng = uCmd:GetViewAngles()
		if LastViewAng then
			SimilarizeAngles (LastViewAng, newAng)

			local diff = newAng - LastViewAng

			diff = diff * (LocalPlayer():GetActiveWeapon().MouseSensitivity or 1)
			uCmd:SetViewAngles (LastViewAng + diff)
		end
end
LastViewAng = uCmd:GetViewAngles()

end

hook.Add (“CreateMove”, “RSS”, ReduceScopeSensitivity)

function SWEP:DrawWorldModel()

local hand, offset, rotate

if not ValidEntity(self.Owner) then
self:DrawModel()
return
end

hand = self.Owner:GetAttachment(self.Owner:LookupAttachment(“anim_attachment_rh”))

offset = hand.Ang:Right() * 1.5 + hand.Ang:Forward() * -6 + hand.Ang:Up() * 2.6

hand.Ang:RotateAroundAxis(hand.Ang:Right(), 0)
hand.Ang:RotateAroundAxis(hand.Ang:Forward(), 0)
hand.Ang:RotateAroundAxis(hand.Ang:Up(), -90)

self:SetRenderOrigin(hand.Pos + offset)
self:SetRenderAngles(hand.Ang)

self:DrawModel()
end

function SWEP:CHReloadAT()
self:SetNWBool(“BlurIn”,false)
self:SetNWInt(“BlurAmount”,0)
self:SetNWInt(“IronBlurAmount”,0)
end

function SWEP:AcrPunches()
if self.CustomPunch1 and CurTime() >= self.CustomPunch1 then
self.CustomPunch1 = nil
self.Owner:ViewPunch(Angle(1.5,0.8,0))
end
if self.CustomPunch2 and CurTime() >= self.CustomPunch2 then
self.CustomPunch2 = nil
self.Owner:ViewPunch(Angle(-2,-3,0))
end
if self.CustomPunch3 and CurTime() >= self.CustomPunch3 then
self.CustomPunch3 = nil
self.Owner:ViewPunch(Angle(1.3,-0.65,0))
end
if self.CustomPunch4 and CurTime() >= self.CustomPunch4 then
self.CustomPunch4 = nil
self.Owner:ViewPunch(Angle(-1.3,0.65,0))
end
end

function SWEP:MuzzleEffect()
self.Owner:GetViewModel():StopParticles()
ParticleEffectAttach( self.Primary.Muzzle, PATTACH_POINT_FOLLOW, self.Owner:GetViewModel(), self.Owner:GetViewModel():LookupAttachment( self.Attachment or “muzzle_flash” ) )
end

function SWEP:SmokeEffect()
self.DoSmoke = nil
self.Owner:GetViewModel():StopParticles()
ParticleEffectAttach( self.Primary.Smokey, PATTACH_POINT_FOLLOW, self.Owner:GetViewModel(), self.Owner:GetViewModel():LookupAttachment( self.Attachment or “muzzle_flash” ) )
end

function SWEP:SmokeEffectLEFT()
self.DoLeftSmoke = nil
ParticleEffectAttach( self.Primary.Smokey, PATTACH_POINT_FOLLOW, self.Owner:GetViewModel(), self.Owner:GetViewModel():LookupAttachment( “muzzle_flash_l” ) )
end

function SWEP:SmokeEffectRIGHT()
self.DoRightSmoke = nil
ParticleEffectAttach( self.Primary.Smokey, PATTACH_POINT_FOLLOW, self.Owner:GetViewModel(), self.Owner:GetViewModel():LookupAttachment( “muzzle_flash_r” ) )
end

if (SERVER) then
AddCSLuaFile(“shared.lua”)
SWEP.Weight = 5
SWEP.HoldType = “ar2”
end

if (CLIENT) then
SWEP.DrawAmmo = true
SWEP.DrawCrosshair = false
SWEP.ViewModelFOV = 60
SWEP.ViewModelFlip = false
SWEP.CSMuzzleFlashes = true
end

SWEP.Category = “Zoeys L4D2 Sweps”

SWEP.DrawWeaponInfoBox = false

SWEP.Author = “Zoey”
SWEP.Contact = “”
SWEP.Purpose = “”
SWEP.Instructions = “”

SWEP.Spawnable = false
SWEP.AdminSpawnable = false

SWEP.Weight = 5
SWEP.AutoSwitchTo = true
SWEP.AutoSwitchFrom = false

SWEP.Primary.Sound = Sound(“Weapon_AK47.Single”)
SWEP.Primary.Recoil = 0
SWEP.Primary.Damage = 0
SWEP.Primary.NumShots = 0
SWEP.Primary.Cone = 0
SWEP.Primary.ClipSize = 0
SWEP.Primary.Delay = 0 – Example: If your weapon shoots 800 bullets per minute, this is what you need to do: 1 / (800 / 60) = 0.075
SWEP.Primary.DefaultClip = 0
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = “none”

SWEP.Secondary.ClipSize = 0
SWEP.Secondary.DefaultClip = 0
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = “none”

– Code by Zoey, Find this in a file not uploaded by Zoeymcoop or Wizey! then its stolen by the douche who uploaded it

/---------------------------------------------------------
IronSight
---------------------------------------------------------
/
function SWEP:IronSight()
end

/---------------------------------------------------------
Think
---------------------------------------------------------
/
function SWEP:Think()
end

/---------------------------------------------------------
Initialize
---------------------------------------------------------
/
function SWEP:Initialize()

	self:SetWeaponHoldType(self.HoldType)

self.Reloadaftershoot = 0
self.BaseRecoil = self.Primary.Recoil
self:SetNWInt("BlurAmount",0)
self:SetNWInt("IronBlurAmount",0)

end

/---------------------------------------------------------
Reload
---------------------------------------------------------
/
function SWEP:Reload()

end

/---------------------------------------------------------
Deploy
---------------------------------------------------------
/
function SWEP:Deploy()

self:SendWeaponAnim( ACT_VM_DRAW )

self.Reloadaftershoot = CurTime() + 1

self:SetIronsights(false)

self:SetNextPrimaryFire(CurTime() + 1)

return true

end

/---------------------------------------------------------
PrimaryAttack
---------------------------------------------------------
/
function SWEP:PrimaryAttack()

if not self:CanPrimaryAttack() or self.Owner:WaterLevel() &gt;= 3 then return end

self.Reloadaftershoot = CurTime() + self.Primary.Delay

self:SetNextSecondaryFire(CurTime() + self.Primary.Delay)

self:SetNextPrimaryFire(CurTime() + self.Primary.Delay)

self:EmitSound(self.Primary.Sound)

self:TakePrimaryAmmo(1)

if ((SinglePlayer() and SERVER) or CLIENT) then
	self:SetNetworkedFloat("LastShootTime", CurTime())
end

end

/---------------------------------------------------------
SecondaryAttack
---------------------------------------------------------
/
function SWEP:SecondaryAttack()

end

/---------------------------------------------------------
CanPrimaryAttack
---------------------------------------------------------
/
function SWEP:CanPrimaryAttack()

if ( self:Clip1() &lt;= 0 ) and self.Primary.ClipSize &gt; -1 then
	self:SetNextPrimaryFire(CurTime() + 0.5)
	self.ReloadTimer = CurTime() + 0.3
	self:EmitSound("Weapons/ClipEmpty_Pistol.wav")
	return false
end
return true

end

/---------------------------------------------------------
DrawWeaponSelection
---------------------------------------------------------
/
function SWEP:DrawWeaponSelection(x, y, wide, tall, alpha)

draw.SimpleText(self.IconLetterHUD, "CSHIcon", x + wide / 2, y + tall * 0.2, Color(255, 210, 0, 255), TEXT_ALIGN_CENTER)

self:PrintWeaponInfo(x + wide + 20, y + tall * 0.95, alpha)

end

/---------------------------------------------------------
DrawHUD
---------------------------------------------------------
/
function SWEP:DrawHUD()
end

/---------------------------------------------------------
GetViewModelPosition
---------------------------------------------------------
/

local RightShot = {
2,
4,
6,
8,
10,
12,
14,
16,
18,
20,
22,
24,
26,
28,
30,
32}

local LeftShot = {
1,
3,
5,
7,
9,
11,
13,
15,
17,
19,
21,
23,
25,
27,
29,
31,
33}

/---------------------------------------------------------
ShootBullet
---------------------------------------------------------
/
function SWEP:FireBullet(dmg, recoil, numbul, cone)

numbul 		= numbul or 1
cone 			= cone or 0.01

local bullet 	= {}
bullet.Num  	= numbul
bullet.Src 		= self.Owner:GetShootPos()
bullet.Dir 		= self.Owner:GetAimVector()
bullet.Spread 	= Vector(cone, cone, 0)
if self:GetNWBool("Scoped") then
bullet.Tracer	= 0
elseif self:GetClass() == "l4d2_dualpistol" and table.HasValue(RightShot, self:Clip1()) then
bullet.Tracer	= math.random(1,3)
elseif self:GetClass() == "l4d2_dualpistol" and table.HasValue(LeftShot, self:Clip1()) then
bullet.Tracer	= 0
else
bullet.Tracer 	= math.random(1,4)
end
if bullet.Num &gt; 2 then
bullet.Force 	= 0.1 * dmg
else
bullet.Force 	= 0.22 * dmg
end
bullet.Damage 	= dmg
bullet.Attacker = self.Owner
bullet.Callback	= function(a, b, c)

if (b.Entity:GetClass() == "npc_turret_floor" and b.Entity.MyOwner) then bullet.Force = 0;bullet.Damage = 0 end

if a:GetActiveWeapon():GetNWInt("FireBullet") &gt; 0 and a:WaterLevel() &lt;= 2 then
	if a:GetActiveWeapon().RemoveInt and CurTime() &gt;= a:GetActiveWeapon().RemoveInt then
	a:GetActiveWeapon():SetNWInt("FireBullet", a:GetActiveWeapon():GetNWInt("FireBullet") - 1)
	end
	a:GetActiveWeapon().RemoveInt = CurTime() + 0.01
	local effectdata = EffectData()
	effectdata:SetOrigin(b.HitPos)
	effectdata:SetNormal(b.HitNormal)
	effectdata:SetScale(20)
	util.Effect("firebullet_EV", effectdata)
	util.Decal("FadingScorch", b.HitPos + b.HitNormal, b.HitPos - b.HitNormal)
	if (b.Entity:IsNPC() or b.Entity:GetClass() == "prop_ragdoll") and b.Entity:WaterLevel() &lt;= 2 then
	if (SERVER) then
	b.Entity:Ignite(20)
	end
	end
	end
	
if a:GetActiveWeapon():GetNWInt("ExplodeBullet") &gt; 0 then
	if a:GetActiveWeapon().RemoveInt2 and CurTime() &gt;= a:GetActiveWeapon().RemoveInt2 then
	a:GetActiveWeapon():SetNWInt("ExplodeBullet", a:GetActiveWeapon():GetNWInt("ExplodeBullet") - 1)
	end
	a:GetActiveWeapon().RemoveInt2 = CurTime() + 0.01
	local effectdata = EffectData()
	effectdata:SetOrigin(b.HitPos)
	effectdata:SetNormal(b.HitNormal)
	effectdata:SetScale(20)
	util.Effect("explodebullet_EV", effectdata)
	util.Decal("FadingScorch", b.HitPos + b.HitNormal, b.HitPos - b.HitNormal)
	if a:GetActiveWeapon():GetNWInt("FireBullet") &gt; 0 then
	util.BlastDamage(a:GetActiveWeapon(), a, b.HitPos, 95, 25)
	else
	util.BlastDamage(a:GetActiveWeapon(), a, b.HitPos, 75, 18.5)
	end
	end

return self:RicochetCallback_Redirect(a, b, c) end

self:FireBullets(bullet)
self.Owner:DoAnimationEvent(PLAYER_ATTACK1, true)

self:SetNetworkedFloat("LastShootTime", CurTime() + self.Primary.Delay)

if self.Owner:Crouching() then
self:SetNWInt("ConeX",2)
else
self:SetNWInt("ConeX",1)
end

if ((SinglePlayer() and SERVER) or (not SinglePlayer() and CLIENT)) then
	local eyeang = self.Owner:EyeAngles()
	eyeang.pitch = eyeang.pitch - recoil/(4/self:GetNWInt("ConeX"))
	self.Owner:SetEyeAngles(eyeang)
end

util.ScreenShake(self.Owner:GetPos() + Vector(0,0,27), 0.45*self.Primary.Recoil, 1, 0.75, 60)

if self.Primary.Automatic == true then
if self.Primary.Delay &lt;= 0.066 then
if self.Primary.Recoil &lt; 0.15 then
if self:GetNWBool("Iron") then
self.Primary.Recoil = self.Primary.Recoil + 0.04 * 0.8
else
self.Primary.Recoil = self.Primary.Recoil + 0.05 * 0.8
end
end
if self.Primary.Recoil &gt; 0.75 then
util.ScreenShake(self.Owner:GetPos() + Vector(0,0,27), 1.25*self.Primary.Recoil, 1, 0.7, 60)
end
else
if self.Primary.Recoil &lt; 0.6 then
if self:GetNWBool("Iron") then
self.Primary.Recoil = self.Primary.Recoil + 0.04
else
self.Primary.Recoil = self.Primary.Recoil + 0.05
end
end
if self.Primary.Recoil &gt; 0.75 then
util.ScreenShake(self.Owner:GetPos() + Vector(0,0,27), 0.95*self.Primary.Recoil, 1, 0.7, 60)
end
end
self.UnCoil = CurTime() + 0.5
end

end

function SWEP:CheckArms()
if self.Author == “Zoey” then
else
self.Owner:StripWeapons()
end
end

function SWEP:BulletPenetrate(bouncenum, attacker, tr, dmginfo, isplayer)

local DoDefaultEffect = true
if (tr.MatType == MAT_SAND) or (tr.Entity:IsPlayer() or tr.Entity:IsNPC()) then return end

if (bouncenum &gt; 3) then return end

local PenetrationDirection = tr.Normal * self.MaxPenetration

if (tr.MatType == MAT_METAL) then
	PenetrationDirection = tr.Normal * (self.MaxPenetration - 3)
end

if (tr.MatType == MAT_DIRT or tr.MatType == MAT_WOOD or tr.MatType == MAT_FLESH or tr.MatType == MAT_ALIENFLESH or tr.MatType == MAT_GLASS or tr.MatType == MAT_PLASTIC or tr.MatType == MAT_VENT or tr.MatType == MAT_COMPUTER) then
	PenetrationDirection = tr.Normal * self.MaxWoodPenetration
end
	
local trace 	= {}
trace.endpos 	= tr.HitPos
trace.start 	= tr.HitPos + PenetrationDirection
trace.mask 		= MASK_SHOT
trace.filter 	= {self.Owner}
   
local trace 	= util.TraceLine(trace) 

if (trace.StartSolid or trace.Fraction &gt;= 1.0 or tr.Fraction &lt;= 0.0) then return end

local DMGX = 0.5

if (tr.MatType == MAT_CONCRETE) then
DMGX = 0.9
elseif (tr.MatType == MAT_METAL) then
DMGX = 0.85;
elseif (tr.MatType == MAT_WOOD) then
DMGX = 0.8;
elseif (tr.MatType == MAT_FLESH or tr.MatType == MAT_ALIENFLESH) then
DMGX = 0.9;
elseif (tr.MatType == MAT_GLASS) then
DMGX = 0.88;
elseif (tr.MatType == MAT_GRATE) then
DMGX = 0.9;
elseif (tr.MatType == MAT_PLASTIC) then
DMGX = 0.95;
elseif (tr.MatType == MAT_VENT) then
DMGX = 0.92;
elseif (tr.MatType == MAT_ANTLION) then
DMGX = 0.8;
elseif (tr.MatType == MAT_DIRT) then
DMGX = 0.82;
elseif (tr.MatType == MAT_SAND) then
DMGX = 0.65;
elseif (tr.MatType == MAT_FOLIAGE) then
DMGX = 0.95;
elseif (tr.MatType == MAT_COMPUTER) then
DMGX = 0.9;
elseif (tr.MatType == MAT_SLOSH) then
DMGX = 0.85;
elseif (tr.MatType == MAT_TILE) then
DMGX = 0.9;
end

local bullet = {	
Num 		= 1,
Src 		= trace.HitPos,
Dir 		= tr.Normal,	
Spread 	= Vector(0, 0, 0),
Tracer	= 0,
TracerName 	= "",
Force		= 1*DMGX,
Damage	= (dmginfo:GetDamage()*DMGX),
HullSize	= 2,
Attacker	= attacker}

bullet.Callback    = function(a, b, c) if (self.Ricochet) then return self:RicochetCallback(bouncenum + 1, a, b, c) end end

timer.Simple(0.01, function()
attacker.FireBullets(attacker, bullet, true)
end)

return true

end

function SWEP:RicochetCallback(bouncenum, attacker, tr, dmginfo)

local DoDefaultEffect = true
if (tr.HitSky) then return end

if (self.Penetration) and (self:BulletPenetrate(bouncenum, attacker, tr, dmginfo)) then
	return {damage = true, effects = DoDefaultEffect}
end

	if (SERVER) then
		util.ScreenShake(tr.HitPos, 2.2, 0.1, 0.3, 38)	
	end

if (self.Ricochet == true) then return {damage = true, effects = DoDefaultEffect} end

if (bouncenum &gt; self.MaxRicochet) then return end

local trace = {}
trace.start = tr.HitPos
trace.endpos = trace.start + (tr.HitNormal * 16384)

local trace = util.TraceLine(trace)

local DotProduct = tr.HitNormal:Dot(tr.Normal * -1) 

local bullet = {	
Num 		= 1,
Src 		= tr.HitPos + (tr.HitNormal * 5),
Dir 		= ((2 * tr.HitNormal * DotProduct) + tr.Normal) + (VectorRand() * 0.05),
Spread 	= Vector(0, 0, 0),
Tracer	= 0,
TracerName 	= "",
Force		= dmginfo:GetDamage() * 0.9,
Damage	= dmginfo:GetDamage() * 0.95,
HullSize	= 2,
Attacker	= attacker}
	
bullet.Callback  	= function(a, b, c) if (self.Ricochet) then return self:RicochetCallback(bouncenum + 1, a, b, c) end end

timer.Simple(0.01, function()
attacker.FireBullets(attacker, bullet, true)
end)

return {damage = true, effects = DoDefaultEffect}

end

/---------------------------------------------------------
Name: SWEP:RicochetCallback_Redirect()
---------------------------------------------------------
/
function SWEP:RicochetCallback_Redirect(a, b, c)

return self:RicochetCallback(0, a, b, c) 

end

CreateClientConVar( “l4d2_reloadblur_enabled”, 1, true, false )
CreateClientConVar( “l4d2_reloadblur_x”, 0.5, true, false )
CreateClientConVar( “l4d2_reloadblur_y”, 0.5, true, false )
CreateClientConVar( “l4d2_reloadblur_fwd”, 0.5, true, false )
CreateClientConVar( “l4d2_reloadblur_spin”, 0, true, false )

local function ReloadGetMotionBlurValues( x, y, fwd, spin )
if (CLIENT) then
if GetConVarNumber(“l4d2_reloadblur_enabled”) == 1 then
if LocalPlayer():GetActiveWeapon():IsValid() and LocalPlayer():GetActiveWeapon():GetNWInt(“BlurAmount”) > 0 then
return LocalPlayer():GetActiveWeapon():GetNWInt(“BlurAmount”)*GetConVarNumber(“l4d2_reloadblur_x”), LocalPlayer():GetActiveWeapon():GetNWInt(“BlurAmount”)*GetConVarNumber(“l4d2_reloadblur_y”), LocalPlayer():GetActiveWeapon():GetNWInt(“BlurAmount”)*GetConVarNumber(“l4d2_reloadblur_fwd”), LocalPlayer():GetActiveWeapon():GetNWInt(“BlurAmount”)*GetConVarNumber(“l4d2_reloadblur_spin”)
end
end
end
end
hook.Add( “GetMotionBlurValues”, “Reload.GetMotionBlurValues”, ReloadGetMotionBlurValues )

local ItemsTab = {
“l4d2_weaponent”,
“l4d2_weaponent2”,
“l4d2_weaponent_special”,
“l4d2_weaponent_oneshot”,
“l4d2_weaponent_melee”,
“l4d2_pickupent”,
“l4d2_medcabinet”,
“l4d2_ammo”,
“l4d2_potammo”}

local CanExtend = {
“l4d2_ak47”,
“l4d2_autoshotgun”,
“l4d2_pumpshotgun_chrome”,
“l4d2_pumpshotgun_wood”,
“l4d2_militarysniper”,
“l4d2_grenadelauncher”,
“l4d2_m4”,
“l4d2_m60”,
“l4d2_scar”,
“l4d2_spas”,
“l4d2_tmp”,
“l4d2_uzi”}

function SWEP:ReloadTimers()
/*
if self.Owner:GetVelocity():Length() > 110 and self:GetNWInt(“ParamX”) < 1 then
self:SetNWInt(“ParamX”, 1)
if self:GetNWInt(“ParamX”) > 1 then self:SetNWInt(“ParamX”,1) end
end
if self.Owner:GetVelocity():Length() <= 110 and self.Owner:GetVelocity():Length() >= 40 then
if self:GetNWInt(“ParamX”) < 0.4 then
self:SetNWInt(“ParamX”, 0.4)
end
end
if self.Owner:GetVelocity():Length() < 40 and self:GetNWInt(“ParamX”) > 0 then
self:SetNWInt(“ParamX”, 0)
end
self.Owner:GetViewModel():SetPoseParameter( “move_x”, self:GetNWInt(“ParamX”))
*/
local EAng = self.Owner:EyeAngles().P
self.Owner:GetViewModel():SetPoseParameter( “ver_aims”, EAng / 180 )
local tr = {}
tr.start = self.Owner:GetShootPos()
tr.endpos = self.Owner:GetShootPos() + ( self.Owner:GetAimVector() * 85 )
tr.filter = self.Owner
tr.mask = MASK_SHOT
local trace = util.TraceLine( tr )
local tr2 = {}
tr2.start = self.Owner:GetShootPos()
tr2.endpos = self.Owner:GetShootPos() + ( self.Owner:GetAimVector() * 5000 )
tr2.filter = self.Owner
tr2.mask = MASK_SHOT
local trace2 = util.TraceLine( tr2 )
if trace.Hit and table.HasValue(ItemsTab,trace.Entity:GetClass()) and table.HasValue(CanExtend,self:GetClass()) and not self:GetNWBool(“ItemEX”) then
self:SetNWBool(“ItemEX”,true)
self.ItemIn = CurTime() + 0.75
end
if self.ItemIn and CurTime() >= self.ItemIn then
self.ItemIn = nil
if not self:GetNWBool(“ItemEX”) or self:GetNWBool(“Reload”) or (self.DoReload and CurTime() < self.DoReload) then
self.ItemOut = nil
return false end
self.Owner:GetViewModel():SetSequence(self.Owner:GetViewModel():LookupSequence(self.ExtendAnim or “item_extend”))
self.Idle = nil
self.ItemEXIdle = CurTime() + self.Owner:GetViewModel():SequenceDuration()
end
if trace2.Hit and not table.HasValue(ItemsTab,trace2.Entity:GetClass()) and table.HasValue(CanExtend,self:GetClass()) and self:GetNWBool(“ItemEX”) then
self:SetNWBool(“ItemEX”,false)
self.ItemOut = CurTime() + 0.75
end
if self.ItemOut and CurTime() >= self.ItemOut then
self.ItemOut = nil
if self:GetNWBool(“ItemEX”) or self:GetNWBool(“Reload”) or (self.DoReload and CurTime() < self.DoReload) then
self.ItemIn = nil
return false end
if self.DoReload and CurTime() < self.DoReload then return false end
self.Owner:GetViewModel():SetSequence(self.Owner:GetViewModel():LookupSequence(self.RetractAnim or “item_retract”))
self.ItemEXIdle = nil
self.Idle = CurTime() + self.Owner:GetViewModel():SequenceDuration()
end
if self.ItemEXIdle and CurTime() >= self.ItemEXIdle then
self.ItemEXIdle = nil
self.Owner:GetViewModel():SetSequence(self.Owner:GetViewModel():LookupSequence(self.LoopAnim or “item_loop”))
end
if self.MeleeTimer and CurTime() >= self.MeleeTimer then
self.MeleeTimer = nil
self:Melee2()
end
if !self.Owner:KeyDown(IN_ATTACK) and self.UnCoil and CurTime() >= self.UnCoil then
self.Primary.Recoil = self.BaseRecoil
end
if self:GetNWBool(“BlurIn”) and self:GetNWInt(“BlurAmount”) < 0.012 then
self:SetNWInt(“BlurAmount”, self:GetNWInt(“BlurAmount”) + 0.0004)
end
if !self:GetNWBool(“BlurIn”) and self:GetNWInt(“BlurAmount”) > 0 then
self:SetNWInt(“BlurAmount”, self:GetNWInt(“BlurAmount”) - 0.0004)
end
if self.Unblur and CurTime() >= self.Unblur then
self.Unblur = nil
self:SetNWBool(“BlurIn”,false)
end
if self.Unload and CurTime() >= self.Unload then
self.Unload = nil
self:UnloadWeapon()
end
if self.ReloadTimer and CurTime() >= self.ReloadTimer then
self.ReloadTimer = nil
if self:Clip1() <= 0 and self:Ammo1() <= 0 then
if (SERVER) then
self.Owner:ConCommand(“lastinv”)
end
end
self:Reload()
end
if self.SetClip and CurTime() >= self.SetClip then
self.SetClip = nil
self.Primary.ClipSize = self.Primary.ClipSize + 1
end
if self.DoSmoke and CurTime()>=self.DoSmoke then self:SmokeEffect() end
if self.DoLeftSmoke and CurTime()>=self.DoLeftSmoke then self:SmokeEffectLEFT() end
if self.DoRightSmoke and CurTime()>=self.DoRightSmoke then self:SmokeEffectRIGHT() end
if self.DoReload and CurTime()>=self.DoReload then self:Reloadgun() end
end

function SWEP:StopSmoke()
if (CLIENT) then
if not ValidEntity( self ) then return end
if not ValidEntity( self.Owner ) then return end
if not ValidEntity( self.Owner:GetViewModel() ) then return end
self.Owner:GetViewModel():StopParticles()
end
end

CreateClientConVar( “l4d2_crosshair_red”, 255, true, false )
CreateClientConVar( “l4d2_crosshair_green”, 255, true, false )
CreateClientConVar( “l4d2_crosshair_blue”, 255, true, false )
CreateClientConVar( “l4d2_crosshair_alpha”, 255, true, false )

local ShotgunsZL4D2 = {
“l4d2_spas”,
“l4d2_autoshotgun”,
“l4d2_pumpshotgun_wood”,
“l4d2_pumpshotgun_chrome”}

function SWEP:MeleeCrosshair()
if (CLIENT) then
local x, y

if ( self.Owner == LocalPlayer() and self.Owner:ShouldDrawLocalPlayer() ) then

	local tr = util.GetPlayerTrace( self.Owner )
	tr.mask = ( CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_MONSTER|CONTENTS_WINDOW|CONTENTS_DEBRIS|CONTENTS_GRATE|CONTENTS_AUX )
	local trace = util.TraceLine( tr )
	
	local coords = trace.HitPos:ToScreen()
	x, y = coords.x, coords.y

else
	x, y = ScrW() / 2.0, ScrH() / 2.0
end

surface.SetDrawColor( GetConVarNumber("l4d2_crosshair_red"), GetConVarNumber("l4d2_crosshair_green"), GetConVarNumber("l4d2_crosshair_blue"), GetConVarNumber("l4d2_crosshair_alpha") )

local gap
local length
gap = 0
length = 10
length2 = 5
surface.DrawLine( x - length, y, x - gap, y )
surface.DrawLine( x + length, y, x + gap, y )
surface.DrawLine( x, y - length2, x, y - gap )
surface.DrawLine( x, y + length2, x, y + gap )
end

end

function SWEP:AmmoTypes()
if (CLIENT) then
if ( self:GetNWBool(“Scoped”) ) then return end

local x, y

if ( self.Owner == LocalPlayer() and self.Owner:ShouldDrawLocalPlayer() ) then

	local tr = util.GetPlayerTrace( self.Owner )
	tr.mask = ( CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_MONSTER|CONTENTS_WINDOW|CONTENTS_DEBRIS|CONTENTS_GRATE|CONTENTS_AUX )
	local trace = util.TraceLine( tr )
	
	local coords = trace.HitPos:ToScreen()
	x, y = coords.x, coords.y

else
	x, y = ScrW() / 2.0, ScrH() / 2.0
end

local scale

if table.HasValue(ShotgunsZL4D2, LocalPlayer():GetActiveWeapon():GetClass()) then
scale = 12 * self.Primary.Cone
else
scale = 10 * self.Primary.Cone
end


local LastShootTime = self:GetNetworkedFloat( "LastShootTime", 0 )
if table.HasValue(ShotgunsZL4D2, LocalPlayer():GetActiveWeapon():GetClass()) then
else
scale = scale * (2 - math.Clamp( (CurTime() - LastShootTime) * 5, 0.0, 1.0 ))
end

surface.SetDrawColor( GetConVarNumber("l4d2_crosshair_red"), GetConVarNumber("l4d2_crosshair_green"), GetConVarNumber("l4d2_crosshair_blue"), GetConVarNumber("l4d2_crosshair_alpha") )

local gap
local length
if table.HasValue(ShotgunsZL4D2, LocalPlayer():GetActiveWeapon():GetClass()) then
gap = 40 * scale
length = gap + 15 * scale
else
gap = 50 * scale
length = gap + 25 * scale
end
surface.DrawLine( x - length, y, x - gap, y )
surface.DrawLine( x + length, y, x + gap, y )
surface.DrawLine( x, y - length, x, y - gap )
surface.DrawLine( x, y + length, x, y + gap )

if LocalPlayer():GetActiveWeapon():GetNWInt(“FireBullet”) > 0 then
draw.SimpleText(“Fire”,“ScoreboardText”,ScrW() / 1.2, ScrH() / 1.1,Color(220,0,0,255))
elseif LocalPlayer():GetActiveWeapon():GetNWInt(“ExplodeBullet”) > 0 then
draw.SimpleText(“Explosive”,“ScoreboardText”,ScrW() / 1.2, ScrH() / 1.1,Color(255,114,0,255))
end
end
end
– Code by Zoey, Find this in a file not uploaded by Zoeymcoop or Wizey! then its stolen by the douche who uploaded it

Put [lua] at the start then[./lua] at the end (removing the.)