Entity Play Sound on Spawn

Hi, I want my entity to play a global sound to all of the players when it spawns(sounds/entities/siren.wav)

How can I do this?

What do you mean?, do you want to play the sound starting from the entity, or a normal sound (like when you press a button)

I just want it to play a regular sound, say as if a gun was fired, you can hear it everywhere.

Ok, on ENT:Initialize function stick this code:

self:EmitSound(“sounds/entities/siren.wav”, 100, 100)

Thanks Loures, Testing it…
Also, Nice Justin Bieber <3er avatar.

[editline]23rd October 2010[/editline]

Bah… Its broken

if !SinglePlayer() then


	self:EmitSound("sound/nuclearprinter/nuclearprinter.wav", 100, 100)
	self:EmitSound("sound/printers/nuclearprinter.mp3", 100, 100)

Tried both, neither worked.
yes they download
Yes they are in the correct path.

Please post the whole entity code you have.

[lua]edited to prevent code stealing :frowning:

When do you want the sound to be played?

when it spawns.

Are you serious…

http://wiki.garrysmod.com/?title=Constructive_thread near the bottom

I …
Spend alot of time on my servers.

Remove sound/ from the path.

Fixed it
You don’t include sound/ or sounds/

EDIT: to OP: Thanks, kinda late though.