Adding Unscoped Accuracy?

Hey so I need some help adding in the ability for Sniper Rifles to have less accuracy while unscoped. I want it so that while scoped, the weapon is dead accurate and while unscoped, the weapon becomes less accurate.

So I got something like this so far using sims base “weapon_dod_sim_base.lua”

[LUA]
/---------------------------------------------------------
Name: SWEP:ShootBulletInformation()
Desc: This function add the damage, the recoil, the number of shots and the cone on the bullet.
---------------------------------------------------------
/
function SWEP:ShootBulletInformation()

local CurrentDamage
local CurrentRecoil
local CurrentCone

if self.Weapon:GetDTBool(3) then
	CurrentDamage = self.Primary.Damage * self.data.Damage * DamageMul:GetFloat()
	CurrentRecoil = self.Primary.Recoil * self.data.Recoil * RecoilMul:GetFloat()
	CurrentCone = self.Primary.Cone * self.data.Cone
else
	CurrentDamage = self.Primary.Damage * DamageMul:GetFloat()
	CurrentRecoil = self.Primary.Recoil * RecoilMul:GetFloat()
	CurrentCone = self.Primary.Cone
end

if self.Owner:IsNPC() then
	self:ShootBullet(CurrentDamage, CurrentRecoil, self.Primary.NumShots, self.Primary.Cone)
	return
end

// When we have collected some fuel, we do a lot of damage! >:D
if self.Owner:GetNetworkedInt("Fuel") > 0 then
	CurrentDamage = CurrentDamage * 1.25
end

// Player is moving
elseif self.Owner:KeyDown(IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT) then
	// Player is aiming
	if (self.Weapon:GetDTBool(1)) then
		self:ShootBullet(CurrentDamage, CurrentRecoil, self.Primary.NumShots, CurrentCone + 0.1)
		self.Owner:ViewPunch( Angle( -0, 0, 0 ) * CurrentRecoil )
	// Player is not aiming
	else
		self:ShootBullet(CurrentDamage, CurrentRecoil, self.Primary.NumShots, CurrentCone + 0.1)
		self.Owner:ViewPunch( Angle( -0, 0, 0 ) * CurrentRecoil )
	end
// Player is crouching
elseif self.Owner:Crouching() then
	// Player is aiming
	if (self.ScopeZooms[1]) then
		self:ShootBullet(CurrentDamage, CurrentRecoil / 2, self.Primary.NumShots, CurrentCone)
		self.Owner:ViewPunch( Angle( -0, 0, 0 ) * ( CurrentRecoil / 2 ) )
	// Player is not aiming
	else
		self:ShootBullet(CurrentDamage, CurrentRecoil / 2, self.Primary.NumShots, CurrentCone + 0.1)
		self.Owner:ViewPunch( Angle( -0, 0, 0 ) * ( CurrentRecoil / 2 ) )
	end
// Player is doing nothing
else
	// Player is aiming
	if (self.ScopeZooms[1]) then
		self:ShootBullet(CurrentDamage, CurrentRecoil, self.Primary.NumShots, CurrentCone)
		self.Owner:ViewPunch( Angle( -0, 0, 0 ) * CurrentRecoil )
	// Player is not aiming
	else
		self:ShootBullet(CurrentDamage, CurrentRecoil, self.Primary.NumShots, CurrentCone + 0.1)
		self.Owner:ViewPunch( Angle( -0, 0, 0 ) * CurrentRecoil )
	end
end

end
[/LUA]

I’m trying to make it so that while I am Zoomed in with a Scope, my accuracy is my CurrentCone which is 0.00001 (defined in my swep) otherwise if I am not zoomed in, my accuracy goes to 0.10001.

My problem is that I still get Accurate shots even while unscoped. Obviously there is a problem and it isn’t working, so any help is appreciated.

I got this base from http://www.facepunch.com/showthread.php?t=932830