30.12.2014, 17:02
Код:
forward song(); public song() { new rand = random(3); for(new i = 0; i < MAX_PLAYERS; i++) if(radiop[i] == 1) { StopAudioStreamForPlayer(i); switch(rand) { case 0: { PlayAudioStreamForPlayer(i, "http://iusmix.altervista.org/Radio/Skrillex_First_of_the_year.mp3"); SendClientMessage(i, COLOR_YELLOW, "*** Brano corrente: Skrillex - First Of The Year."); varxkill = SetTimer("song", 263000, false); break; } case 1: { PlayAudioStreamForPlayer(i, "http://iusmix.altervista.org/Radio/Skrillex_-_Rock_n_Roll__Will_Take_You_to_the_Mountain_.mp3"); SendClientMessage(i, COLOR_YELLOW, "*** Brano corrente: Skrillex - Rock n' Roll."); varxkill = SetTimer("song", 270000, false); break; } case 2: { PlayAudioStreamForPlayer(i, "http://iusmix.altervista.org/Radio/Skrillex_-_Right_In.mp3"); SendClientMessage(i, COLOR_YELLOW, "*** Brano corrente: Skrillex - Right In."); varxkill = SetTimer("song", 183000, false); break; } } SendClientMessage(i, COLOR_YELLOW, "*** Per fermare questo brano digita/stop!"); } }
Why break quit the switch and for, and how can i resolve it?
Sorry for my bad english.