How can I make Audio Streamer play the same song over and over again?
#1

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?
Reply
#2

anyone?
Reply
#3

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...
Reply
#4

use gettime.

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

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

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

This may help.
Reply
#6

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 -_-
Reply
#7

lol did not understand what you needed really.
Reply
#8

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
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)