SA-MP Forums Archive
How can I make Audio Streamer play the same song over and over again? - 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: How can I make Audio Streamer play the same song over and over again? (/showthread.php?tid=374243)



How can I make Audio Streamer play the same song over and over again? - MrBorsh - 02.09.2012

Title says it all.. Here's the code.

pawn Код:
public OnPlayerSpawn(playerid)
{
    PlayAudioStreamForPlayer(playerid, "song.mp3");
    return 1;
}
It works perfectly, but it plays only one time How can I make it automatically play over and over again?


Re: How can I make Audio Streamer play the same song over and over again? - MrBorsh - 02.09.2012

anyone?


Re: How can I make Audio Streamer play the same song over and over again? - Your:RP - 02.09.2012

From Here:
https://sampforum.blast.hk/showthread.php?tid=355296
Rules And Guidelines, the sticky at the top of this section. The rule you haven't followed is in bold.

Quote:
Rules

1.First and foremost, the main forum rules still apply here.
2.You may only bump your thread after 48 hours has passed since the last reply.
3.If you do not get help, please re-evaluate the explanation of the issue you provided, it may not be providing enough information for people to help you.
5.If you are unsure or don't know how to proceed with solving an issue, then do not respond to the thread, it will be considered spam.
6.Use a proper thread title, it should sum up the general problem you're having in a few words. (For example, do not use silly babble like "HELP PLS HELP PLS REP+++", use "Issue with SetPlayerPos and interiors")
7.You should always be providing code! People cannot help you if they cannot see what's wrong with the code.
8.If you are requesting a script, post in the Script Request Thread
9Do not post untested code.
EDIT: you posted this thread 2 times :O

https://sampforum.blast.hk/showthread.php?pid=2094971#pid2094971

It only took for me to ****** how to do it and you came up 2 times...


Re: How can I make Audio Streamer play the same song over and over again? - leonardo1434 - 02.09.2012

use gettime.

when the gettime be equal to the size of the song make it repeat.


Re: How can I make Audio Streamer play the same song over and over again? - TaLhA XIV - 02.09.2012

PHP код:
public OnPlayerSpawn(playerid)
{
    
SetTimer("song",10000,true);
    return 
1;
}

forward song(playerid);
public 
song(playerid)
{
    
PlayAudioStreamForPlayer(playerid"song.mp3");

This may help.


Re: How can I make Audio Streamer play the same song over and over again? - MrBorsh - 02.09.2012

forward song(playerid) - This is kinda stupid tbh. Because I use kiwi6 to play the audio stream. And that gives a comment when adding the link. Like http://kiwi6.com/blablabala(playerid); it becomes a comment -_-


Re: How can I make Audio Streamer play the same song over and over again? - TaLhA XIV - 02.09.2012

lol did not understand what you needed really.


Re: How can I make Audio Streamer play the same song over and over again? - Your:RP - 02.09.2012

Quote:
Originally Posted by MrBorsh
Посмотреть сообщение
forward song(playerid) - This is kinda stupid tbh. Because I use kiwi6 to play the audio stream. And that gives a comment when adding the link. Like http://kiwi6.com/blablabala(playerid); it becomes a comment -_-
Change it to www.kiwi6.com/blablabala(playerid); then


Re: How can I make Audio Streamer play the same song over and over again? - MrBorsh - 02.09.2012

well I want to song to play over and over again ^^ haha I tried to loop it but it didn't work really..

pawn Код:
public OnPlayerSpawn(playerid)
{
 for(new a = 0; a < 10; a++)
    {
        PlayAudioStreamForPlayer(playerid, "weblinkofsong.mp3");
        a++;
    }
   return 1;
}


and..



Quote:
Originally Posted by Your:RP
Посмотреть сообщение
well, i tried to enter the same link using www. but with no success