/astream [mp3 link] help [SIMPLE]
#2

Try this
pawn Код:
CMD:astream(playerid, params[])
{
    if(gPlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, -1, "SERVER: You are not allowed to use this command");
    {
        if(isnull(params)) return SendClientMessage(playerid, -1, "{878787}USAGE: /music [mp3 link]");
        {
            foreach(Player, i)
            {
                PlayAudioStreamForPlayer(i, params);
            }
        }
        new string[128];
        format(string, sizeof(string), "SERVER: Administrator %s has played a music", GetName(playerid));
        SendClientMessageToAll(COL_ORANGE, string);
    }
    return 1;
}
Your Mistakes
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
// and //
foreach(Player, i)
Both of them are loop, they work the same, you don't need two! you just need one.

pawn Код:
PlayAudioStreamForPlayer(i, string);
// should be //
PlayAudioStreamForPlayer(i, params);
String is a string, obviously the music won't play, string and params works different
Reply


Messages In This Thread
/astream [mp3 link] help [SIMPLE] - by PabloDiCostanzo - 30.09.2013, 20:35
Re: /astream [mp3 link] help [SIMPLE] - by Patrick - 30.09.2013, 20:39
Re: /astream [mp3 link] help [SIMPLE] - by AphexCCFC - 30.09.2013, 21:25

Forum Jump:


Users browsing this thread: 1 Guest(s)