SA-MP Forums Archive
Music - 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: Music (/showthread.php?tid=656761)



Music - hamrlg - 23.07.2018

hi .

how to add a Music in the game mode?

that: player joined the server >> play stream with url ..if player selected a character and spawned, the stream is going off

how to add??

sry for my bad english


Re: Music - Chyakka - 23.07.2018

https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer

Have it run on your onplayerconnect callback
Код:
public OnPlayerConnect(playerid)
{
    PlayAudioStreamForPlayer(playerid, "audiourl", 0, 0, 0, 50, 0);
    return 1;
}
Then use
https://sampwiki.blast.hk/wiki/StopAudioStreamForPlayer

for when the player spawns.

Код:
public OnPlayerSpawn(playerid)
{
    StopAudioStreamForPlayer(playerid);
    return 1;
}