Help with playing a sound to people in the proximity
2 replies, posted
Ok so I have a bank addon and I want to modify it so when someone robs the bank it plays a sound of a siren in repeat to people in the proximity. If someone could help me out with this I would be very happy.
If the siren is an entity, use this.
self.Entity:EmitSound("alarm.wave", 75, 100)
"75" is 75% of the normal audible distance and "100" is 100% of the normal sound pitch. You should leave the pitch at 100. You can change the audible distance ,but 75 "75%" is for people in the proximity.
so it would be like this all together if you sound the alarm by pressing use on it.
[CODE]function ENT:Use( activator, ent )
self.Entity:EmitSound("alarm.wave", 75, 100)
end[/CODE]
[QUOTE=FreeTacos.exe;41016041]If the siren is an entity, use this.
self.Entity:EmitSound("alarm.wave", 75, 100)
"75" is 75% of the normal audible distance and "100" is 100% of the normal sound pitch. You should leave the pitch at 100. You can change the audible distance ,but 75 "75%" is for people in the proximity.
so it would be like this all together if you sound the alarm by pressing use on it.
[CODE]function ENT:Use( activator, ent )
self.Entity:EmitSound("alarm.wave", 75, 100)
end[/CODE][/QUOTE]
ok thanks ill see if that works
Sorry, you need to Log In to post a reply to this thread.