The mp3 thingy
#1

Bro's can someone know, like If I want to play from [url] everybody can here it? example... /play [url]
or any?? please
Reply
#2

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.
Reply
#3

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;
}
Reply
#4

Here the Fs of /play
https://sampforum.blast.hk/showthread.php?tid=363930
credits:
lsfmd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)