errors
#2

On this code: You had "x, y, z" in there.. these are the coordinates. But you haven't taken the player's coordinates! You cant just put XYZ, you have to get them also. And also you have to write the distance (the last parameter on PlayerAudioStreamForPlayer). I suggest looking the wiki example also.

pawn Код:
stock PlayAudioStreamForAll(url[])
{
    for(new i; i<GetMaxPlayers(); i++)
    {
        if(IsPlayerConnected(i))
        {
            new Float:Pos[3];
            GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
            PlayAudioStreamForPlayer(i, url, x, y, z, 1);
        }
    }
    return 1;

}
And on this: Clearly, a missing ")" on the format line.

pawn Код:
YCMD:music(playerid, params[], help)
{
    if (help)
    {
        SendClientMessage(playerid, 0xFF0000AA, "Pustite pesna.");
    }
    else
    {
        new
            str[32];
        if (isnull(params))
        {
            format(str, sizeof (str), "Koristi: \"/music [link]\"");
            SendClientMessage(playerid, 0xFF0000AA, str);
        }
        else
        {
            PlayAudioStreamForAll(params);
        }
    }
    return 1;
}
Reply


Messages In This Thread
errors - by Vizi - 17.08.2012, 18:55
Re: errors - by Dan. - 17.08.2012, 18:59
Re: errors - by leonardo1434 - 17.08.2012, 19:06
Re: errors - by Vizi - 17.08.2012, 19:06
Re: errors - by Dan. - 17.08.2012, 19:08
Re: errors - by leonardo1434 - 17.08.2012, 19:23

Forum Jump:


Users browsing this thread: 2 Guest(s)