01.02.2013, 12:01
Well the error is in sscanf code .
You probably using it as
Edit:
Try sscanf like this
Full command here:
You probably using it as
pawn Код:
sscanf(str,"s",Name,Value);
//You should define string size in sscanf like
sscanf(str,"s[24]",Name);
Edit:
Try sscanf like this
pawn Код:
//define sizeof URL string
if(sscanf(params,"s[250]",URL))
Full command here:
pawn Код:
COMMAND:gplay(playerid,params[])
{
new URL[250];
if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,0xFF6347FF,"USAGE:/globalplay [URL]");
for(new i=0;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i)) continue;
PlayAudioStreamForPlayer(i,URL);
}
SendClientMessage(playerid,0xFF6347FF,"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(0xFF6347FF, cmdstr);
return 1;
}

