Ok thanks for the help, Ive added my music to my powerplant meltdown. Now I just need to know how to make sounds. Anyone know?
Same thing, except sounds need to be .wav files and have a small line of code to add the datablock. Worry not, it's very easy.
datablock AudioProfile(soundnameyouwant)
{
filename = "./sound.wav";
description = AudioClosest3d;
preload = false;
};
Replace soundnameyouwant with whatever you want it to be. This name will be in the list of the playsound event.
Replace sound.wav with the path to your file. The ./ saves a lot of time by directing the script to it's parent file. So, if you put hi.wav and the script in the same .zip file, you can just use filename = "./hi.wav"; to get to it.
Leave the rest of the things alone, and save as server.cs. Make sure it ends with .cs and not be .cs.txt.
Make sure both the sound(s) and the .cs file are in the same .zip file or folder. Move to add-ons. Done.