Posts: 34
Threads: 7
Joined: Jul 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;
}
Posts: 2,593
Threads: 34
Joined: Dec 2007
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;
}
Posts: 34
Threads: 7
Joined: Jul 2016
Posts: 2,593
Threads: 34
Joined: Dec 2007
rcon is IsPlayerAdmin(playerid) not [playerid] uncomment and add return 0;
pawn Код:
if(!IsPlayerAdmin(playerid)) return 0;
Posts: 34
Threads: 7
Joined: Jul 2016
I got error
error 017: undefined symbol "GetPlayerPoolSize"
Posts: 2,593
Threads: 34
Joined: Dec 2007
Its for samp 0.3.7, change GetPlayerPoolSize() to GetMaxPlayers() - 1
or
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
Posts: 6,242
Threads: 8
Joined: Jun 2008
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.