30.01.2012, 19:29
Im working on an Advanced DJ system in my script..
When they enter the File URL in the my Input Dialog, It sets new FILEONE[MAX_PLAYERS];
to
FILEONE[playerid] = file;
Heres the coding for it.
When FILONE[playeripd] = file: is called in the main command,
%s is not being replaced with FILEONE's Variable. (The URL Link)
But, The setup is the same for the DROPBOX, But its using %d instead of %s. Any idea?
When they enter the File URL in the my Input Dialog, It sets new FILEONE[MAX_PLAYERS];
to
FILEONE[playerid] = file;
Heres the coding for it.
Код:
switch( dialogid )
{
case DIALOG_FILEONE:
{
if ( !response ) return SendClientMessage(playerid,COLOR_RED,"Gone Back.");
if( response )
{
new file = (strval(inputtext));
FILEONE[playerid] = file;
ShowPlayerDialog(playerid,DIALOG_SLOTONE,DIALOG_STYLE_LIST,"Slot One","File\nSong Name\nPlay Song","Select", "Cancel");
}
}
}
Код:
switch(dialogid)
{
case DIALOG_SLOTONE:
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,DIALOG_FILEONE,DIALOG_STYLE_INPUT,"File URL.","Enter your file URL below:","Select","Cancel");
}
case 1:
{
ShowPlayerDialog(playerid,DIALOG_NAMEONE,DIALOG_STYLE_INPUT,"Song Name","Enter The Name Of The Song Below:","Select","Cancel");
}
case 2:
{
new string[128],string2[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
format(string,sizeof(string),"http://dl.dropbox.com/u/""%d""/""%s"".mp3",DROPBOX[playerid],FILEONE[playerid]);
PlayAudioStreamForPlayer(i,string);
}
}
}
}
}
But, The setup is the same for the DROPBOX, But its using %d instead of %s. Any idea?

