SA-MP Forums Archive
I want stream this for all palyers - 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: I want stream this for all palyers (/showthread.php?tid=615263)



I want stream this for all palyers - KochJaber - 19.08.2016

CMD:yt(playerid, params[])
{
if(IsPlayerAdmin[playerid])
if(isnull(params)) return SendClientMessage(playerid, -1, "{996600}ERROR: /yt [URL]");
format(params, 145, "http://www.*******inmp3.com/fetch/?video=%s", params);
PlayAudioStreamForPlayer(playerid, params);
return 1;
}


Re: I want stream this for all palyers - Jefff - 19.08.2016

pawn Код:
CMD:yt(playerid, params[])
{
    //if(IsPlayerAdmin[playerid])
    if(isnull(params)) SendClientMessage(playerid, -1, "{996600}ERROR: /yt [URL]");
    else
    {
        new str[200];
        format(str, sizeof(str), "http://www.*******inmp3.com/fetch/?video=%s", params);
        for(new i = GetPlayerPoolSize(); i > -1; i--)
            if(IsPlayerConnected(i))
                PlayAudioStreamForPlayer(i, str);
    }
    return 1;
}



Re: I want stream this for all palyers - KochJaber - 19.08.2016

Is this for rcon only??


Re: I want stream this for all palyers - Jefff - 19.08.2016

rcon is IsPlayerAdmin(playerid) not [playerid] uncomment and add return 0;
pawn Код:
if(!IsPlayerAdmin(playerid)) return 0;



Re: I want stream this for all palyers - KochJaber - 20.08.2016

I got error
error 017: undefined symbol "GetPlayerPoolSize"


Re: I want stream this for all palyers - Jefff - 20.08.2016

Its for samp 0.3.7, change GetPlayerPoolSize() to GetMaxPlayers() - 1

or

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)



Re: I want stream this for all palyers - Sew_Sumi - 20.08.2016

If you have 0.3.7 and are still hitting that same undefined symbol error, you need to update your samp includes.

Been seeing this a lot lately, and I've even had it cause trouble with random includes seemingly not being updated when extracting the server package.