help - 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: help (
/showthread.php?tid=417375)
help -
DerickClark - 21.02.2013
it's not playing the music.
Don't get it.
Код:
[17:35:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[17:35:29] sscanf warning: String buffer overflow.
Код:
COMMAND:audio(playerid,params[])
{
new URL[250];
if (APlayerData[playerid][PlayerLevel] >= 7)
if(sscanf(params,"s",URL)) return SendClientMessage(playerid,0xFF0000AA,"USAGE:/audio [URL]");
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
PlayAudioStreamForPlayer(i,URL);
}
SendClientMessage(playerid,0xFF0000AA,"You have played a song for all players!");
format(cmdstr, sizeof(cmdstr), "Admin %s has started the Global Playback of{FFFFFF} %s", FormatName(playerid), URL);
SendClientMessageToAll(0xFF0000AA, cmdstr);
return 1;
}
Plz edit code
Re: help -
MattSlater - 21.02.2013
pawn Код:
COMMAND:audio(playerid,params[])
{
new URL[250];
if (APlayerData[playerid][PlayerLevel] >= 7)
if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,0xFF0000AA,"USAGE:/audio [URL]");
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i)) PlayAudioStreamForPlayer(i,URL);
}
SendClientMessage(playerid,0xFF0000AA,"You have played a song for all players!");
format(cmdstr, sizeof(cmdstr), "Admin %s has started the Global Playback of{FFFFFF} %s", FormatName(playerid), URL);
SendClientMessageToAll(0xFF0000AA, cmdstr);
return 1;
}
Re: help -
DerickClark - 21.02.2013
Thank you so much.