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);
if(something)
function();
function();
function();
if(something)
{
function();
function();
function();
}
|
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 Код:
pawn Код:
|
|
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 Код:
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);