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



PlayAudioStreamForPlayer - Dima_Tkach - 09.01.2012

PlayAudioStreamForPlayer - how to include a person who has just come?


Re: PlayAudioStreamForPlayer - Tanush123 - 09.01.2012

Under your register code
pawn Код:
PlayerAudioStreamForPlayer(playerid,link);
when he spawns
pawn Код:
StopAudioStreamForPlayer(playerid);



Re: PlayAudioStreamForPlayer - Dima_Tkach - 09.01.2012

Oh, I did not say so.
How to start playing music to the player who just came to me?


Re: PlayAudioStreamForPlayer - Tanush123 - 09.01.2012

Oh under onplayerupdate ( i think this will work)
pawn Код:
New name[MAX_PLAYER_NAME];
if(strcmp,name,"Dima",true,10)
{
        for(new i=0; i<MAX_PLAYERS; i++)
        {
                GetPlayerPos(name,X,Y,Z);
                if(IsPlayerInRangeOfPoint(i, 10, X,Y,Z))
                {
                          PlayerAudiostream...
                }
        }
        return 1;
}
im not sure if it will work, try it


Re: PlayAudioStreamForPlayer - Dima_Tkach - 09.01.2012

Quote:
Originally Posted by Tanush123
Посмотреть сообщение
Oh under onplayerupdate ( i think this will work)
pawn Код:
New name[MAX_PLAYER_NAME];
if(strcmp,name,"Dima",true,10)
{
        for(new i=0; i<MAX_PLAYERS; i++)
        {
                GetPlayerPos(name,X,Y,Z);
                if(IsPlayerInRangeOfPoint(i, 10, X,Y,Z))
                {
                          PlayerAudiostream...
                }
        }
        return 1;
}
im not sure if it will work, try it
Have you seen a boombox on LSRP? Here's how they do so?


Re: PlayAudioStreamForPlayer - Dima_Tkach - 09.01.2012

On LSRP function PlayAudioStreamForPlayer as was done?No one knows?


Re: PlayAudioStreamForPlayer - Dima_Tkach - 15.01.2012

I'll ask again, no one knows how to do it:
1.That when I went into the distance, for example 50 meters, then occurred StopAudioStreamForPlayer.
2.That when I was not even close, I go and I automatically PlayerAudioStreamForPlayer.

If you can help, I'd be very grateful.
Thanks in advance.