SA-MP Forums Archive
how to fix this? - 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 to fix this? (/showthread.php?tid=314804)



how to fix this? - niels44 - 31.01.2012

hey guys,

i have made it that when a player joins server and chooses a skin(onplayerrequestclass) then there plays a song while the player is choosing his skin... but now i have a problem... when a player presses on the NEXT button to choose another skin then the screen stops moving for about 5 seconds and then the song starts again... how can i make it that the song just doesn't stops but just goes on with playing?

this is my code:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 2106.7463,1002.0556,45.6641);
    SetPlayerCameraPos(playerid, 2111.1670,999.0892,45.6591);
    SetPlayerCameraLookAt(playerid, 2106.7463,1002.0556,45.6641);
    SetPlayerFacingAngle(playerid, 270.1425);
    PlayAudioStreamForPlayer(playerid, "http://www.*******-mp3.org/get?video_id=_ovdm2yX4MA&h=e5dda6ce00166e58122425f9180b27bd&r=1328027258209");
    return 1;
}
can anyone help me?

greets niels


AW: how to fix this? - Rimeau - 31.01.2012

If you use PlayAudioStreamForPlayer in OnPlayerRequestClass, it is called every time a player looks at a player class.

Moving it to OnPlayerConnect should solve the problem


Re: how to fix this? - niels44 - 31.01.2012

ah ok thnx man i will try XD

EDIT: yeah it works thnx for help man REP+