I want stream this for all palyers
#1

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

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

Is this for rcon only??
Reply
#4

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

I got error
error 017: undefined symbol "GetPlayerPoolSize"
Reply
#6

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

or

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)