AddMenuItem(Radio, 0, "Dubstep FM"); AddMenuItem(Radio, 0, "Capital FM"); AddMenuItem(Radio, 0, "Pulse Radio"); AddMenuItem(Radio, 0, "Radio Klass Romania"); AddMenuItem(Radio, 0, "Its a Trap Radio"); AddMenuItem(Radio, 0, "Russian Hits Radio"); AddMenuItem(Radio, 0, "Madein Hits Radio"); AddMenuItem(Radio, 0, "Absolute Hits Radio"); AddMenuItem(Radio, 0, "DnB Pirate Radio"); AddMenuItem(Radio, 0, "I Love To Dance Radio"); AddMenuItem(Radio, 0, "Electronic Playground Radio"); AddMenuItem(Radio, 0, "Turn Off");
AddMenuItem(Radio, 0, "REPLACE ME"); // case 0 AddMenuItem(Radio, 0, "REPLACE ME"); // case 1 AddMenuItem(Radio, 0, "REPLACE ME"); // case 2 AddMenuItem(Radio, 0, "REPLACE ME"); // case 3 AddMenuItem(Radio, 0, "REPLACE ME"); // case 4 AddMenuItem(Radio, 0, "REPLACE ME"); // case 5 AddMenuItem(Radio, 0, "REPLACE ME"); // case 6 AddMenuItem(Radio, 0, "REPLACE ME"); // case 7 AddMenuItem(Radio, 0, "REPLACE ME"); // case 8 AddMenuItem(Radio, 0, "REPLACE ME"); // case 9 AddMenuItem(Radio, 0, "REPLACE ME"); // case 10 AddMenuItem(Radio, 0, "Turn Off"); // case 11
case 0:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=40568");
SendClientMessage(playerid, -1, "You are tuned into Dubstep FM");
}
}
case 1:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://media-ice.musicradio.com/CapitalMP3.m3u");
SendClientMessage(playerid, -1, "You are tuned into Capital FM");
}
}
case 2:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://icy3.abacast.com/pulse87-pulse87mp3-64");
SendClientMessage(playerid, -1, "You are tuned into Pulse 87");
}
}
case 3:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=7581");
SendClientMessage(playerid, -1, "You are tuned into Radio Klass Romania");
}
}
case 4:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3146548/listen.m3u");
SendClientMessage(playerid, -1, "You are tuned into Its a Trap Radio");
}
}
case 5:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/1891409/listen.m3u");
SendClientMessage(playerid, -1, "You are tuned into Russian Hits Radio");
}
}
case 6:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3064006/listen.m3u");
SendClientMessage(playerid, -1, "You are tuned into Madein Hits Radio");
}
}
case 7:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3367058/listen.m3u");
SendClientMessage(playerid, -1, "You are tuned into Absolute Hits Radio");
}
}
case 8:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3728175/listen.m3u");
SendClientMessage(playerid, -1, "You are tuned into DnB Pirate Radio");
}
}
case 9:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3710153/listen.m3u");
SendClientMessage(playerid, -1, "You are tuned into I Love To Dance Radio");
}
}
case 10:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "http://dir.xiph.org/listen/3813588/listen.m3u");
SendClientMessage(playerid, -1, "You are tuned into Electronic Playground Radio");
}
}
case 11:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = false;
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, -1,"Music off");
}
}
case 0:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into Dubstep FM");
}
}
case 1:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 2:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 3:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 4:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 5:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 6:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 7:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 8:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 9:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 10:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = true;
PlayAudioStreamForPlayer(playerid, "MUSIC URL");
SendClientMessage(playerid, -1, "You are tuned into RADIO NAME");
}
}
case 11:
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && PLAYER_STATE_PASSENGER)
{
IsRadioOn[playerid] = false;
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, -1,"Music off");
}
}
Nice!
I love how Dubstep FM is first. I'd suggest you to make an array for all radio stations and also an automatic page-wrapper if the user wants more than 12 radio stations, also it's easier to insert new radio stations. |