Help needed
#1

Alright so, I'm working on my own stereo system. I've created commands to place/destroy stereos. The question I want to ask is.. How can I play AudioStream using this object? for example, the object is a boombox/stereo. Now, I want the music to be hear-able to the players around the boombox, how's that possible?

Thanks in advance!
Reply
#2

Well, make it like they can't do the command if thet are not in range of the object, and when they do the command, and it succeeds, then use the coords of the object and usepos = 1 of the playaudiostreamforplayer function, then set the range e.t.c

Something like this:
pawn Код:
CMD:stereoon(playerid,params[])
{
    if(/*check if he is in rnage of object here*/)
    {
    PlayAudioStreamForPlayer(playerid,URL[],X,Y,Z,15.0,1);
    }
    return 1;
}
Reply
#3

Alright thanks, now the question is.. How can I make that when they go far away, they hear the music lower, and once they are close to the object they hear it loudly?
Reply
#4

Quote:
Originally Posted by Mr.1337
Посмотреть сообщение
Alright thanks, now the question is.. How can I make that when they go far away, they hear the music lower, and once they are close to the object they hear it loudly?
It does that automatically when you use the usepos settings.
I made a example command in my edit
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)