Sound looping?

Well, I’ve made this code, where the entity fires a rocket, and it plays the sound. But when the sound plays, it loops over and over again, and it won’t stop unless I type “stopsounds” in console. I don’t know why it keeps playing the sound over and over, heres the code:

[lua]
function ENT:FireDrone()
local pos = self.Entity:GetPos();
local vel = self.Entity:GetVelocity() * 99999999;
local up = self.Entity:GetUp();

local e = ents.Create("rocket"); 
self.Entity:EmitSound("weapons/rpg/rocket1.wav"); -- This is the sound it loops.

e.Parent = self.Entity;
e:SetPos(pos);
e:SetOwner(self.Pilot);
e.Owner = self.Entity.Owner;
util.SpriteTrail(e, 0, Color(100, 100, 100), false, 20, 1, 4, 1/(15 + 1) * 0.5, "trails/smoke.vmt")
e:Spawn();
e:GetPhysicsObject():SetVelocity(self.Pilot:GetAimVector() * 9999999999999 + vel);

end
[/lua]

I think that’s because the sound is marked as looping. Try Entity.StopSound whenever you want the sound to stop.

eg. self.Entity:StopSound(“weapons/rpg/rocket1.wav”)

So if I call that right after I play the sound it will only play once, then stop the loop yeah? I don’t want it to stop early.

Ok, the sound is still looping and this is what I’ve done:

[lua]
function ENT:FireDrone()
local pos = self.Entity:GetPos();
local vel = self.Entity:GetVelocity() * 99999999;
local up = self.Entity:GetUp();

local e = ents.Create("sent_cluster_main");
self.Entity:EmitSound("weapons/rpg/rocket1.wav");
self.Entity:StopSound("weapons/rpg/rocket1.wav");

e.Parent = self.Entity;
e:SetPos(pos);
e:SetOwner(self.Pilot);
e.Owner = self.Entity.Owner;
util.SpriteTrail(e, 0, Color(0, 100, 0), false, 20, 1, 4, 1/(15 + 1) * 0.5, "trails/smoke.vmt")
e:Spawn();
e:GetPhysicsObject():SetVelocity(self.Pilot:GetAimVector() * 9999999999999 + vel);

end
[/lua]