i make a radio and when i press g i hear 2 radios..and overlapping i wold apreaciate it if i fix it!
PHP код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
StopAudioStreamForPlayer(playerid);
StopAudioStreamForPlayer(playerid); // sa pun 2...
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_ONFOOT)
{
StopAudioStreamForPlayer(playerid); // vreu sa vad folderul cu serverul
}
if(newstate == PLAYER_STATE_PASSENGER)
{
//new vehicle[MAX_PLAYERS];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
{
switch(RadioStation[i])
{
case 1: { SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Pro Fm");
PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8012/profm.mp3");
StopAudioStreamForPlayer(playerid);
StopAudioStreamForPlayer(playerid); }
case 2: { StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Ring Fm ");
PlayAudioStreamForPlayer(playerid, "http://86.127.81.176:8000/live");
StopAudioStreamForPlayer(playerid); }
case 3: { PlayAudioStreamForPlayer(playerid, "http://stream2.srr.ro:8000/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Actualitati "); }
case 4: { PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8092/90s.mp3");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica 90s ");
}
case 5: { PlayAudioStreamForPlayer(playerid, "http://ronix-live.rph.ro:8100/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Prahova");
}
case 6: { PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8122/80s.mp3");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica 80s ");
}
case 7: { PlayAudioStreamForPlayer(playerid, "http://82.77.45.227:8000");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Brasov ");
}
case 8: { PlayAudioStreamForPlayer(playerid, "http://86.35.4.198:8006/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Cluj ");
}
case 9: { PlayAudioStreamForPlayer(playerid, "http://95.76.53.191:8001/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Braila ");
}
case 10: { PlayAudioStreamForPlayer(playerid, "http://85.120.237.64:8000/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Galati ");
}
case 11: { PlayAudioStreamForPlayer(playerid, "http://89.238.227.6:8032/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Bucuresti");
}
case 12: { PlayAudioStreamForPlayer(playerid, "http://asculta.radiotaraf.com:7100/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Taraf");
}
case 13: { PlayAudioStreamForPlayer(playerid, "http://asculta.radiovenus.ro:8100/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Venus");
}
case 14: { PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8072/love.mp3");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: ProFm Love");
}
case 15: { PlayAudioStreamForPlayer(playerid, "http://hit-radio.no-ip.org:8374/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Hit");
}
case 16: { PlayAudioStreamForPlayer(playerid, "http://live.radioconstanta.ro:9002/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Constanta ");
}
case 17: { PlayAudioStreamForPlayer(playerid, "http://live.ardeleanulfm.ro:8000/live128");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Alba Iulia");
}
case 18: { PlayAudioStreamForPlayer(playerid, "http://94.23.232.141:8070/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica Populara");
}
case 19: { PlayAudioStreamForPlayer(playerid, "http://www.texfm.ro:8000/house");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica House ");
}
case 20: { PlayAudioStreamForPlayer(playerid, "http://radiohit-dance.no-ip.org:8888/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica Dance ");
}
case 21: { PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8262/kids.mp3");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica Copii ");
} // copii :))
case 22: { PlayAudioStreamForPlayer(playerid, "http://radiobluesky.net:8200/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Blue Sky Fm ");
}
case 23: { PlayAudioStreamForPlayer(playerid, "http://stream.radio.ubbcluj.ro:8000/ubb.mp3");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: UBB Radio ");
}
case 24: { PlayAudioStreamForPlayer(playerid, "http://stream.profm.ro:8242/profmro.mp3");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Muzica Romaneasca ");
}
case 25: { PlayAudioStreamForPlayer(playerid, "http://46.102.251.55:8000/stream/1/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Bacau ");
}
case 26: { PlayAudioStreamForPlayer(playerid, "http://82.79.122.196:8000/");
SendClientMessage(playerid, 0xFF330000, "{ACFF05}Ascultati Radio Live: Pitesti ");
}
}
}
}
}
//} // warning nu conteaza k ala nu face nik dak nu e ceva grav ho
//}
return 1;
}