17.08.2012, 18:59
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.
And on this: Clearly, a missing ")" on the format line.
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;
}
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;
}