As far as I know you can't. See if it returns anything. Make it a music brick and blah.setMusic?
Right, I decided to try it with AlxPlay, and AlxStop.
So far it works great but I've hit a problem with AlxStop, I can not seem to figure out what it means by "Handle", I've set it up to use the following variables, none seem to stop the previous sound. My code is at the bottom of this post, which includes an example of every peice of code I am using.
Variables:%play
PERP_Rock_1
PERP_Rock_2
$StationSong[%this.StationID]
Example of AlxStop:alxStop( handle )
Purpose
Use the alxStop function to stop a currently playing sound as specified by handle.
Syntax
handle – The ID (a non-negative integer) corresponding to a previously set up sound source.
Returns
No return value.
See Also
alxIsPlaying, alxPlay, alxStopAll
//Radio
$RadioDistance = 30;
$Station[0] = "Off";
$Station[1] = "WPJ";
$Station[2] = "KJR";
$MaxStations = 2;
$StationSong[1] = $CurrentSong[1];
$CurrentSong[1] = "PERP_Rock_1";
$StationSong[2] = $CurrentSong[2];
$CurrentSong[2] = "PERP_Rock_2";
datablock AudioProfile(PERP_Rock_1)
{
filename = "Add-ons/Kunit_DarkRP/Sounds/Radio/1/1.wav";
description = AudioClosest3D;
preload = true;
};
function GameConnection::NextStation(%client,%this) //Called by the previous func
{
alxStop(//VariablesHere);
%this.StationID += 1;
%play = alxPlay($StationSong[%this.StationID],%this.getPosition());
%client.Dis("\c6Radio: \c0" @ $Station[%this.StationID] @ "");
echo("Next Station!");
}
function GameConnection::StationOff(%client,%this) //Called by the previous func
{
echo("Radio: Off");
%this.StationID = 0;
%this.IsPlaying = 0;
%client.Dis("\c6Radio: \c0Off!");
return;
}