PlayAudioStreamForPlayer
#1

Hi Thank You For Visiting

PHP код:
CMD:music(playeridparams[])
{
    
PlayAudioStreamForPlayer(playerid"http://0up.ir/do.php?downf=clip3.mp3");
    return 
1;

My Problem Is When Finish Music Its Not REpeat

And Learn Me How I Can Start New Audio When Before Audio Finished

Please Help Thanks
Reply
#2

You should know when will this song finish. Take as an example, it will finish in 2 minutes. When the player do /music, set a timer for 2 minutes & when the music will finish, it will auto-restart.
Reply
#3

Код:
CMD:music(playerid, params[]) 
{ 
    SetTimer("SONGGGGG", 123000, true);

    return 1; 
}  
CMD:stopmusic(playerid, params[]) 
{ 
    StopAudioStreamForPlayer(playerid);

    return 1; 
}  



forward SONGGGGG(playerid);
public SONGGGGG(playerid)
{
PlayAudioStreamForPlayer(playerid, "http://0up.ir/do.php?downf=clip3.mp3"); 
}
Reply
#4

This Music Time is 2:11 2 Minute And 11 Seconds Please Show Me Timer For This Thanks For Helping
Reply
#5

Just need to put time in miliseconds, for example: 3000(3 seconds), 120000(2 minutes)
Reply
#6

Im Undrestand You Thank,s

]Rafaellos[ said to me You have to make the source repeating or calculate the seconds and create a timer of starting it again.

i dont know source repeat , but i need it

Thank You For Helping

Sry for My Bad English bros
Reply
#7

Next time use the correct section.

pawn Код:
CMD:music(playerid, params[])
{
    playSong(playerid);
    return 1;
}

forward playSong(playerid);
public playSong(playerid)
{
    StopAudioStreamForPlayer(playerid);
    PlayAudioStreamForPlayer(playerid, "http://0up.ir/do.php?downf=clip3.mp3");
   
    SetTimerEx("playSong", 131000, true, "d", playerid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)