12.02.2015, 19:02
Hold on, let me show you how a switch-statement should look:
See? It's way cleaner and it's easier to see the matching brackets this way. Use the TAB key to indent your code.
pawn Код:
stock RandomMusic(playerid)
{
new rand = random(5);
switch(rand)
{
case 0:
{
PlayAudioStreamForPlayer(playerid, "http://mp3.shmidt.net/files/from_flash/2156/f8d0b9b35fccc03a31d990b62940b9e448febe9db1a41661ce/Nelly_-_Here_Comes_The_Boom.mp3");
}
case 1:
{
PlayAudioStreamForPlayer(playerid, "http://raddad.free.fr/musiquepuce///'Til I collapse.mp3");
}
case 2:
{
PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_lpb606uHE91qhb27eo1.mp3");
}
case 3:
{
PlayAudioStreamForPlayer(playerid, "http://a.tumblr.com/tumblr_m0uvryGX7P1r60k0fo1.mp3");
}
case 4:
{
PlayAudioStreamForPlayer(playerid, "http://mp3ska4ka.ru/audio/107519246/54624629/Roy_Jones_Jr-Go_Hard_Or_Go_Home.mp3");
}
}
return 1;
}