Help with audio stream -
N0FeaR - 18.04.2012
I want so they are inside the house heard the aduio stream but is not working whats the problem.
pawn Код:
if(PlayerInfo[playerid][pMaskuse] == 1)
{
GetPlayerPos(giveplayerid,x,y,z);
if(IsPlayerInRangeOfPoint(giveplayerid,10.0,x,y,z))
PlayAudioStreamForPlayer(giveplayerid,"http://www.fileden.com/files/2012/4/18/3293679/Knocking%20on%20Wooden%20Door%20%20%20Sound%20Effect.mp3",x,y,z,distance,10);
format(string, sizeof(string), "[DOOR] KNOCK!! KNOCK!! (([Stranger_%d]))", maskid);
SendClientMessage(p, COLOR_PURPLE, string);
}
else
{
GetPlayerPos(giveplayerid,x,y,z);
if(IsPlayerInRangeOfPoint(giveplayerid,10.0,x,y,z))
PlayAudioStreamForPlayer(giveplayerid,"http://www.fileden.com/files/2012/4/18/3293679/Knocking%20on%20Wooden%20Door%20%20%20Sound%20Effect.mp3",x,y,z,distance,10);
format(string, sizeof(string), "[DOOR] KNOCK!! KNOCK!! ((%s))", GetPlayerNameEx(playerid));
SendClientMessage(p, COLOR_PURPLE, string);
Re: Help with audio stream -
MP2 - 18.04.2012
1. The parameters for PlayAudioStreamForPlayer are (playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0) - you have the last one set to 10. It should be 1 if you want to play it at certain coordinates. However, I would just use playerid and url if I were you, there's no need to set the position!
2. You can't do
pawn Код:
if(something)
function();
function();
function();
you need to use brackets:
pawn Код:
if(something)
{
function();
function();
function();
}
3. The URL is all messed up with %20 shit.
Re: Help with audio stream -
N0FeaR - 18.04.2012
Quote:
Originally Posted by MP2
1. The parameters for PlayAudioStreamForPlayer are (playerid, url[], Float  osX = 0.0, Float  osY = 0.0, Float  osZ = 0.0, Float:distance = 50.0, usepos = 0) - you have the last one set to 10. It should be 1 if you want to play it at certain coordinates. However, I would just use playerid and url if I were you, there's no need to set the position!
2. You can't do
pawn Код:
if(something) function(); function(); function();
you need to use brackets:
pawn Код:
if(something) { function(); function(); function(); }
3. The URL is all messed up with %20 shit.
|
The link working perfect.
Re: Help with audio stream -
N0FeaR - 18.04.2012
What do you mean with if(something), you should explain more
Re: Help with audio stream -
SuperViper - 19.04.2012
Quote:
Originally Posted by MP2
1. The parameters for PlayAudioStreamForPlayer are (playerid, url[], Float  osX = 0.0, Float  osY = 0.0, Float  osZ = 0.0, Float:distance = 50.0, usepos = 0) - you have the last one set to 10. It should be 1 if you want to play it at certain coordinates. However, I would just use playerid and url if I were you, there's no need to set the position!
2. You can't do
pawn Код:
if(something) function(); function(); function();
you need to use brackets:
pawn Код:
if(something) { function(); function(); function(); }
3. The URL is all messed up with %20 shit.
|
%20 specifies a space. Special characters use %ASCII-HEX.
Use
pawn Код:
PlayAudioStreamForPlayer(giveplayerid,"http://www.fileden.com/files/2012/4/18/3293679/Knocking%20on%20Wooden%20Door%20%20%20Sound%20Effect.mp3",x,y,z,distance,1);