Strange audio stream problem
#1

When I play an audio stream for a player (or for all players for that matter)
it seems to play only for the people who are in any vehicle.
am i doing something wrong?
It shows the "playing audio stream: ................................." text for everyone,
but only the people inside a vehicle can actually hear it playback.
also, incase i dont wanna show the link of the audio, is there any way to hide it?
i searched a lot and everyone says it cant be done,
however i saw some include (forgot the name, sorry) which is in some other language,
that claims to be able to do that, just that i cant get a hold of it as all the links to download it seem to be broken (maybe an illegal file banned by everyone? )

Thanks in advance for any help.
P.S - If you do not know, please excuse me, and do not post. Just dont post random stuff here to increase you post count, try if you can, just dont say something like "Oh I'm sorry I dont know"
Reply
#2

To hide the Audio Steam : Link message there are only one solution that we send the player empty client messages which will clear his chat in random amount of seconds he won't be able to see any stuff above
pawn Код:
PlayAudioStreamForPlayer( playerid, "your link here!");
for(new i = 0; i < 50; i++) SendClientMessage(playerid,-1," ");//that line will clear the player chat by sending empty client messages!
Also you said that when the player enter the vehicle it send the client message to all the players , that's wrong it only send for the player who entered the vehicle 'if you didn't create a loop through all players with player the audio streamer for all ' , could you show me the codes that play the audio streamer when the player enter a vehicle ?
Reply
#3

No, I think you understood me wrong. What I said is....
When I play an audio stream, every user sees the message "playing audio stream......." (as it is supposed to)
but only the players who are (at that time) seated in ANY vehicle, can actually hear the playback.
Reply
#4

uhhh, can you show us your code at least?
Reply
#5

sure. nothing too complicated.
Код:
CMD:playmusic(playerid, params[])
{
	PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200", 321.139465, 1034.947753, 1098.914062, 120.0, 1);
	return 1;
}
Reply
#6

So theres the code and I still havent got any solution to it so any help wud be appreciated
Reply
#7

pawn Код:
CMD:playmusic(playerid, params[])
{
    PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200");
    return 1;
}
Read this: https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer

You will notice this:
Quote:
Originally Posted by SA-MP Wiki
Float:PosX The X position at which to play the audio. Default 0.0. Has no effect unless usepos is set to 1.
Float:PosY The Y position at which to play the audio. Default 0.0. Has no effect unless usepos is set to 1.
Float:PosZ The Z position at which to play the audio. Default 0.0. Has no effect unless usepos is set to 1.
Float:distance The distance over which the audio will be heard. Has no effect unless usepos is set to 1.
usepos Use the positions and distance specified. Default disabled (0).
When you use specific X, Y and Z coordinates, it will play at that location over a distance that you enter. Occasionally it will stream even when you're not within range of it. So you will see the message even when you're not near it, and you won't be able to hear it until you come within range of the X, Y and Z coordinates that you've set.

I'm still unsure why this code would be playing audio for each player in the server, perhaps look for any other 'PlayAudioStreamForPlayer' codes in your script, and post the full functions/callbacks that include them here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)