SA-MP Forums Archive
Interior audio stream - 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: Interior audio stream (/showthread.php?tid=392825)



Interior audio stream - DarkOrion11 - 15.11.2012

I want to stream audio when player is in Alhambra interior. And a command to change music of interior like /changemusic [URL]. But I want only if player in Alhambra interior stream audio to player, if player goes out on Alhambra stop stream for player.


Re: Interior audio stream - N0FeaR - 15.11.2012

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


Re: Interior audio stream - DarkOrion11 - 16.11.2012

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
I want detailed tutorial or prepared codes.


Respuesta: Interior audio stream - [CG]Milito - 16.11.2012

An example

Код:
 public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/play radio", cmdtext, true) == 0) 
    {
        PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
        return 1;
    }
    if (strcmp("/radio in my pos", cmdtext, true) == 0)
    {
        new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
        GetPlayerPos(playerid, X, Y, Z);
	PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
	return 1;
    }
    return 0;
}



Re: Respuesta: Interior audio stream - DarkOrion11 - 16.11.2012

Quote:
Originally Posted by [CG]Milito
Посмотреть сообщение
An example

Код:
 public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/play radio", cmdtext, true) == 0) 
    {
        PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
        return 1;
    }
    if (strcmp("/radio in my pos", cmdtext, true) == 0)
    {
        new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
        GetPlayerPos(playerid, X, Y, Z);
	PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
	return 1;
    }
    return 0;
}
Didin't works.


Re : Respuesta: Interior audio stream - alfa drive - 17.11.2012

when i compile it error can not compile ? pls help