I am having an issue, I am working on a add-on for my server. This add-on is a really simple one at that but this one thing has me stuck.
The add-on is a health station and whenever it is used it emits a sound but the sound that I have created for it just gets spammed rapidly over and over again even tho I have it cut so that there is time after it. From time to time out of the blue the sound will play correctly but it doesn’t do it all the time. The sound is just a single beep from a EKG machine and about 2.5 seconds of nothing after it. The way it is written is the same way that printers work in DarkRP. Any insight on how to fix my issue is greatly appreciated.
if self:GetNWInt("Health_amount") > 0 and caller:Health() < 100 then self:EmitSound("weapons/health_station/station.wav", 75, 100, 1, CHAN_AUTO)