Particles

I need to make a gun fire particles. Could someone point me in the right direction, i havent worked with particles yet.

Now i have this…

function smoke(ent, speed, rate, size1, size2, length)
if SERVER then
local smoke = ents.Create(“env_steam”)
if ent:IsPlayer() then
smoke:SetPos(ent:GetShootPos())
smoke:SetKeyValue(“Angles”, tostring(ent:EyeAngles()))
else
smoke:SetPos(ent:GetPos())
smoke:SetKeyValue(“Angles”, tostring(Angle(0,0,0)))
end

smoke:SetKeyValue(“InitialState”, “1”)
smoke:SetKeyValue(“Speed”, speed)
smoke:SetKeyValue(“Rate”, rate)
smoke:SetKeyValue(“StartSize”, size1)
smoke:SetKeyValue(“EndSize”, size2)
smoke:SetKeyValue(“JetLength”, length)
smoke:SetKeyValue(“SpreadSpeed”, “2”)
smoke:SetKeyValue(“SpawnFlags”, “1”)
smoke:Spawn()
smoke:Activate()
end
emitter:Finish()
end

And the emitters wont stop.

There seems to be an extra end in your code.

Oh, nevermind i fixed it. Sry