The mp3 thingy - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: The mp3 thingy (
/showthread.php?tid=439492)
The mp3 thingy -
Jardzskiiz - 25.05.2013
Bro's can someone know, like If I want to play from [url] everybody can here it? example... /play [url]
or any?? please
Re: The mp3 thingy -
DobbysGamertag - 25.05.2013
you mean?
pawn Код:
stock PlayAudioStreamForAll(url[])
{
for(new i; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected( i ))
{
PlayAudioStreamForPlayer(i, url, x, y, z, distance);
}
}
return 1;
}
Or for one player?
pawn Код:
PlayAudioStreamForPlayer(playerid, "URL HERE", X, Y, Z, Distance, 1);
https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer
Apparently PlayAudioStreamForAll isnt a native. I think the loop should work though.
Re: The mp3 thingy -
Hernando - 25.05.2013
Can be done with PlayAudioStreamForPlayer(playerid, url[]);
here is a simple code:
pawn Код:
// zCMD
CMD:play(playerid, params[])
{
if(strlen(params) == 0) return SendClientMessage(playerid, -1, "USAGE: /play [url]");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
StopAudioStreamForPlayer(i);
PlayAudioStreamForPlayer(i, params);
}
}
return 1;
}
Re: The mp3 thingy -
DerickClark - 25.05.2013
Here the Fs of /play
https://sampforum.blast.hk/showthread.php?tid=363930
credits:
lsfmd