29.07.2011, 19:39
(
Последний раз редактировалось Riddick94; 30.07.2011 в 09:23.
)
How to do this.. for player playing sound for players around playing 3D position sound? because.. it's playing for player two sounds at once.. and not too good result come out.
edit://
Maybe this could be like that?
Now sound is okey but i need to test it with someone..
edit2://
To remove 3D position i need again use foreach?
pawn Код:
foreach2(i, MAX_PLAYERS)
{
Audio_PlayEx(playerid, 1, false, false, true);
Audio_Set3DPositionEx(i, 1, 30.0);
}
pawn Код:
stock Audio_Set3DPositionEx(playerid, audioid, Float:distance)
{
new Float:X, Float:Y, Float:Z;
Audio_Remove3DPosition(playerid, PlayerInfo[playerid][pAudio3DPlaying]);
PlayerInfo[playerid][pAudio3DPlaying] = Audio_Set3DPosition(playerid, audioid, X, Y, Z, distance);
return true;
}
stock Audio_PlayEx(playerid, audioid, bool:pause, bool:loop, bool:downmix)
{
Audio_Stop(playerid, PlayerInfo[playerid][pAudio3DPlaying]);
PlayerInfo[playerid][pAudioPlaying] = Audio_Play(playerid, audioid, pause, loop, downmix);
return true;
}
edit://
Maybe this could be like that?
pawn Код:
foreach2(i, MAX_PLAYERS)
{
Audio_PlayEx(i, 1, false, false, true);
Audio_Set3DPositionEx(i, 1, 30.0);
}
edit2://
To remove 3D position i need again use foreach?
pawn Код:
foreach2(i, MAX_PLAYERS)
{
Audio_Stop(i, 1);
Audio_Remove3DPositon(i, 1);
}