SA-MP Forums Archive
Music in Skin Selection Problem - 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 in Skin Selection Problem (/showthread.php?tid=444197)



Music in Skin Selection Problem - JoshP - 15.06.2013

Well I'm trying to play a song in the skin selection so i did.

Code:
public OnPlayerRequestClass(playerid, classid)
{
PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/h286pk3c97/themusic.mp3");
if(classid == 0) GameTextForPlayer(playerid,"~b~blahblah",2000,5);
{
    SetPlayerPos(playerid,1268.7476,-900.2996,42.8828);
    SetPlayerCameraPos(playerid,1268.6455,-904.1758,42.8828);
    SetPlayerFacingAngle(playerid,187.4978);
    SetPlayerCameraLookAt(playerid,1268.7476,-900.2996,42.882);
but the music plays in skin selection, but stops when i press left or right then starts again from the beginning and when i press spawn it continues to play, any help?


Re: Music in Skin Selection Problem - Passout - 15.06.2013

Put PlayAudioStreamForPlayer under OnPlayerConnect


Re: Music in Skin Selection Problem - JoshP - 15.06.2013

Well now it stops restarting when going left or right but it continues to play after u spawn


Re: Music in Skin Selection Problem - WillyP - 15.06.2013

Under OnPlayerSpawn add a function that will stop the music from playing.


Re: Music in Skin Selection Problem - JoshP - 15.06.2013

Like...


Re: Music in Skin Selection Problem - WillyP - 15.06.2013

pawn Code:
StopAudioStreamForPlayer(playerid);



Re: Music in Skin Selection Problem - Scenario - 15.06.2013

You really need to start searching.

StopAudioStreamForPlayer().