Bullet Spread

[lua]
local bullet = {}
bullet.Num = 15
bullet.Src = self.Entity:GetPos()
bullet.Dir = Vector( 0, 0, -1 )
bullet.Spread = Vector( 0.75, 0.75, 0 )
bullet.Tracer = 1
bullet.Force = 200
bullet.Damage = 10
bullet.AmmoType = “Pistol”
bullet.TracerName = “betsy_tracer”
bullet.Callback = function ( attacker, tr, dmginfo )

end

self.Entity:GetOwner():FireBullets( bullet )[/lua]

It does fire the bullets, but for some reason the spread doesn’t randomize. Every bullet goes to the exact same place when it’s called more than once.

How would i fix this?

[lua]
local offset = 0.75
local random_vector = Vector( math.random( -offset, offset ), math.random( -offset, offset ), 0 )
[/lua]

i assume it randomized the spray based on the vector you give it (look at weapon_cs_base, it doesn’t use math.random for the spread).