Interior audio stream
#1

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.
Reply
#2

https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer
Reply
#3

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

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;
}
Reply
#5

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.
Reply
#6

when i compile it error can not compile ? pls help
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)