Where should i put my code
#8

IsPlayerInRangeOfPoint has a set x,y,z
you should use the ones in your function xx, yy, zz

pawn Код:
forward PlayAudioStreamForPoint(url[], Float:range, Float:xx, Float:yy, Float:zz);
public PlayAudioStreamForPoint(url[], Float:range, Float:xx, Float:yy, Float:zz)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, range, xx,yy,zz))
            {
                PlayAudioStreamForPlayer(i, url);
            }
        }
    }
    return 1;
}

//use it in a timer
SetTimerEx("PlayAudioStreamForPoint",1000,true,"sffff",url,xx,yy,zz);
I removed the playerid argument as your looping threw all the players,
Reply


Messages In This Thread
Where should i put my code - by Jimbo01 - 19.04.2012, 18:34
Re: Where should i put my code - by fordawinzz - 19.04.2012, 18:47
Re: Where should i put my code - by Twisted_Insane - 19.04.2012, 19:16
Re: Where should i put my code - by Jimbo01 - 03.05.2012, 13:46
Re: Where should i put my code - by JaTochNietDan - 03.05.2012, 13:50
AW: Where should i put my code - by Jimbo01 - 03.05.2012, 13:55
AW: Where should i put my code - by Jimbo01 - 05.05.2012, 16:51
Re: Where should i put my code - by Jonny5 - 05.05.2012, 16:56

Forum Jump:


Users browsing this thread: 1 Guest(s)