PlayAudioStreamForPlayer Help
#1

PlayAudioStreamForPlayer(playerid, "http://172.16.40.100/audio_files/event.mp3");

PlayAudioStreamForPlayer(playerid, "http://172.16.40.100/audio_files/event.ogg");

PlayAudioStreamForPlayer(playerid, "http://172.16.40.100/audio_files/event.wav");

Will any of these work or does it have to be a streaming .pls ??

** Issue resolved... Make sure to turn up the volume of the radio in GTA:SA sound options. I had my radio volume at 0 to avoid listening to the single player radio.
Reply
#2

https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer
Reply
#3

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
-Rep for that....

You dont think I have been there?
Reply
#4

As far as I know, you can only use mp3 and ogg.

Well have a look on this link: https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer

-FalconX
Reply
#5

Quote:
Originally Posted by FalconX
Посмотреть сообщение
As far as I know, you can only use mp3 and ogg.

Well have a look on this link: https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer

-FalconX
-Rep for the reference to the wiki.

I would not have posted if I have not search or read the wiki.
That command does not work for me and the file is available via apache.
Reply
#6

Quote:
Originally Posted by mprofitt
Посмотреть сообщение
-Rep for the reference to the wiki.

I would not have posted if I have not search or read the wiki.
That command does not work for me and the file is available via apache.
Well, I've tried to visit your link i.e http://172.16.40.100/audio_files/event.mp3 and I noticed that this link does not work. Try to upload your music somewhere else. Maybe try a free host i.e 000webhost.com

-FalconX
Reply
#7

Quote:
Originally Posted by FalconX
Посмотреть сообщение
Well, I've tried to visit your link i.e http://172.16.40.100/audio_files/event.mp3 and I noticed that this link does not work. Try to upload your music somewhere else. Maybe try a free host i.e 000webhost.com

-FalconX
That is obvioulsy not going to work for you or anyone else on the Internet because it is a RFC1918 private address. It does work on my LAN.
Reply
#8

Quote:
Originally Posted by mprofitt
Посмотреть сообщение
That is obvioulsy not going to work for you or anyone else on the Internet because it is a RFC1918 private address. It does work on my LAN.
Then what is wrong? show the errors you get while compiling?

pawn Код:
CMD:audio(playerid, params[])
{
    PlayAudioStreamForPlayer(playerid, "http://172.16.40.100/audio_files/event.mp3");
    return 1;
}
Are you doing something like this?
Reply
#9

pawn Код:
CMD:audio(playerid, params[])
{
    new Float:x, Float:y, Float:z,Float:distance = 3.0;
    GetPlayerPos(playerid,x,y,z);
    if(IsPlayerInRangeOfPoint(playerid,3.0,x,y,z))
    PlayAudioStreamForPlayer(playerid,"http://172.16.40.100/audio_files/event.mp3",x,y,z,distance,0);
    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
    return 1;
}
try this
Reply
#10

Quote:
Originally Posted by N0FeaR
Посмотреть сообщение
pawn Код:
CMD:audio(playerid, params[])
{
    new Float:x, Float:y, Float:z,Float:distance = 3.0;
    GetPlayerPos(playerid,x,y,z);
    if(IsPlayerInRangeOfPoint(playerid,3.0,x,y,z))
    PlayAudioStreamForPlayer(playerid,"http://172.16.40.100/audio_files/event.mp3",x,y,z,distance,0);
    GetVehicleParamsEx(veh,engine,lights,alarm,doors,bonnet,boot,objective);
    return 1;
}
try this
Thanks NOFeaR but this fixed it...
https://sampforum.blast.hk/showthread.php?tid=339279
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)