Author Topic: Play Sound in a Car  (Read 1229 times)

I have a car and I want it so that when I press the spacebar it will put on a siren and have it looping until I press the spacebar again. (I have a sound file for it). How would I do this in the script and where would I have to put the sound file---also what format would it be, .wav I believe?
« Last Edit: June 24, 2010, 09:21:13 AM by joey888joey »

First toast. :/ I just helped to stop the newbs.

First toast. :/ I just helped to stop the newbs.

Thanks I guess.

I'm pretty sure there's a car radio addon, just make the siren a music file. (.ogg, I think.)

If you press space bar then what do you have for a brake?

If you press space bar then what do you have for a brake?

Or if you click, something like that, but how would I make it so when you do that it would play a sound, and not a radio, a .wav and have it loop.

There was an add-on, so when you went in a vehicle, you type /radio and you choose a list of all the server's music. Ogg files.

There was an add-on, so when you went in a vehicle, you type /radio and you choose a list of all the server's music. Ogg files.
/stereo
http://forum.blockland.us/index.php?topic=74002.0

There was an add-on, so when you went in a vehicle, you type /radio and you choose a list of all the server's music. Ogg files.

No, I want to develop a car add-on that is a cop car, what do I have to add to the script to make it do that?

Look at the diagram below:

Space Pressed > Play .wav File (Looping) > Press Space Again > Stop Playback

All what I need is the portion of the script that I have to put in the server.cs or whatever file it is.



That train: box does that with the bells. You should check it out.