03.08.2018, 13:44
i want to code, if play join the game, the music will play and loops?
pls help me, i need a example
pls help me, i need a example
Audio Stream: http://example.com/folder/subfolder/index.php?file=example&extension=mp3
Audio Stream: http://example.com/folder/subfolder/index.php?file=example&extension=mp3
Audio Stream: http://example.com/folder/subfolder/index.php?file=example&extension=mp3
Audio Stream: http://example.com/folder/subfolder/index.php?file=example&extension=mp3
Audio Stream: http://example.com/folder/subfolder/index.php?file=example&extension=mp3
Audio Stream: http://example.com/folder/subfolder/index.php?file=example&extension=mp3
Audio Stream: http://example.com/folder/subfolder/index.php?file=example&extension=mp3
...
#define MUSIC_TIME 3*60*60 // 3 minutes (The length of the music you play).
public OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid, "Link"); // Firstly play once they connect.
SetTimerEx("PlayMusic", MUSIC_TIME, true, "i", playerid);//The timer to constantly play the music.
return 1;
}
forward PlayMusic(playerid);
public PlayMusic(playerid)
{
StopAudioStreamForPlayer(playerid); // Stop the audio stream in case if it was running.
PlayAudioStreamForPlayer(playerid, "Link"); // Replay it.
return 1;
}