[HELP]need asistance with Audio_Set3DPosition (Plugin made by Incognito)
#1

i would like to know how to use the 3d audio !
i would like to , for example if a player die , to set a special audio sound for all the player who are next to this player (using Audio_Set3DPosition )
if some one can just give me a small example ( 4 or 5 lines ) just to know how to use it
thnks
Reply
#2

why not like this?
PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    new 
Float:x,Float:y,Float:z;
    
GetPlayerPos(playerid,x,y,z);
    for(new 
t;t<MAX_PLAYERS;t++)
    if(
IsPlayerInRangeOfPoint(t,5.0,x,y,z))
    {
        
Audio_PlayStream//or whatever for playerid "t"!!!
        
return 1;
    }
    return 
1;

Reply
#3

cause the cmd Audio_Set3DPosition already exist and i would like to know how to use it
( i already has something like this thnks for trying man i appreciate)
Reply
#4

From the official topic of Audio Plugin v0.5:
Quote:

Audio_Set3DPosition(playerid, handleid, Float, Float:y, Float:z, Float:distance);

* Sets the 3D position (game world coordinates) of an audio stream assigned to a player's handle ID
Note: The audio stream must be downmixed to mono (see the last parameter of Audio_Play, Audio_PlayStreamed, and Audio_PlaySequence) for panning to work properly.

Reply
#5

i saw that ... but i still don't know if Audio_Set3DPosition(playerid, handleid, Float, Float:y, Float:z, Float:distance); will be the only one how will have acces to the sound
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)