SA-MP Forums Archive
Radio Help[rep] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Radio Help[rep] (/showthread.php?tid=331979)



Radio Help[rep] - Dan_Barocu - 06.04.2012

i made a dialog list and i want to make an playlist and put my music so if person picks Personal musics it plays 1 song and then the after one get it i hope im ROmanian!

PHP код:

case 23:
    {
    new 
vehid GetPlayerVehicleID(playerid);
    for(new 
0i<MAX_PLAYERSi++)
    {
    if(
IsPlayerInVehicle(ivehid))
    {
    
PlayAudioStreamForPlayer(i"http://stream.profm.ro:8242/profmro.mp3" || ("http://stream.profm.ro:8242/profmro.mp3")
    
SendClientMessage(i0xFF330000"{ACFF05}Ascultati Radio Live: Personal Music");
    }
     }
    return 
1;
    }
    }
    }
    }
    return 
1;
    } 



Re: Radio Help[rep] - Kitten - 06.04.2012

Not possible but there is a way but not very efficient but works.

pawn Код:
PlayAudioStreamForPlayer(..............................................); // Get the song length like 2:00 Min of the song

// Set a timer, for 2 min

SetTimer("NextSong",120000,false); // 120000 = 2 min

forward NextSong(playerid);
public NextSong(playerid) return PlayAudioStreamForPlayer(..............................................);