Audio plugin problem
#1

I made a little script, which can help me to play sounds with 3D effect. So when the player gets further away from it, the music gets more and more quiet by the range variable. But the whole thing just doesn't work at all. Do you see any flaws in it?

Код:
stock PlaySoundEx(playerid, sound, Float:range)
{
        new Float:x, Float:y, Float:z, handle;
        GetPlayerPos(playerid, x, y, z);
        foreach(Player, i) if(IsPlayerInRangeOfPoint(i, range, x, y, z))
        {
                handle = Audio_Play(i, sound, false, false, true);
                Audio_Set3DPosition(i, handle, x, y, z, range);
        }
        return 1;
}
use:
Код:
#define CAT_SOUND               1
 
PlaySoundEx(playerid, CAT_SOUND, 10.0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)