10.10.2016, 19:22
Hello.
You don't send the message to the player(s).![Wink](images/smilies/wink.png)
Try this.
You don't send the message to the player(s).
![Wink](images/smilies/wink.png)
Try this.
PHP код:
CMD:streamforall(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
new url[200],name[MAX_PLAYER_NAME];
if(sscanf(params,"s[200]",url))return SendClientMessage(playerid,-1,"{FF0000}Syntax: /streamforall [url]");
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"Song Played by %s.\tType /stopplay to stop the music",name);
SendClientMessage(playerid,-1,string);
for(new i;i<MAX_PLAYERS;i++)
{
if(!IsPlayerConnected(i) || IsPlayerNPC(i))continue;
PlayAudioStreamForPlayer(i,url);
}
}
else
{
SendClientMessage(playerid,-1,"{FF0000}Error:{FFFFFF} You are not authorized to use this command!");
}
return 1;
}