23.04.2012, 01:18
I made that when a player uses the command / Music, DIALOG_STYLE_INPUT him out, and bring the link of a song. There are no eror but the problem is that it will not load link of the song.
I do not know what the problem.
I do not know what the problem.
pawn Код:
if(strcmp(cmd, "/muzika", true) ==0)
{
ShowPlayerDialog(playerid, 125, DIALOG_STYLE_INPUT, "Muzika", "Unesite link pesme.", "Pusti", "Otkazi" );
return 1;
}
pawn Код:
if(dialogid == 125)
{
if(strlen(inputtext))
{
new linkbre;
linkbre = strval(inputtext);
new link[128];
format(link, sizeof(link), "%s",linkbre);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 50 , X, Y, Z))
{
PlayAudioStreamForPlayer(i, link, X, Y, Z, 50, 1);
return 1;
}
return 1;
}
}
}
}