SA-MP Forums Archive
MP3 Player - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MP3 Player (/showthread.php?tid=431418)



FIXED! - ryanhawk31 - 18.04.2013

FIXED!


Re: MP3 Player - Scenario - 18.04.2013

Uh, show about 10 lines above the one you've posted please; there's no error on that line according to my eyes...


Re: MP3 Player - ryanhawk31 - 18.04.2013

Код:
CMD:radio(playerid, params[])
{
    if(!IsPlayerInAnyVehicle) return SendClientMessage(playerid, -1, "You need to be in a vehicle to use this command!");
    ShowPlayerDialog(playerid, DIALOG_MUSICPLAYER, DIALOG_STYLE_LIST, "Radio Vinewood", "Chicosci - Raspberry Girl\nI Like That - Richard Vission & Static\nAsking Alexandria- Not The American Average\nChamillionaire - Ridin' ft. Krayzie Bone\nKid Frost ft Big Tank - I'm a Bad Ass\nChris Brown - Should've Kissed You", "Play", "Close");
    return 1;
}
If i remove no error if i have this command above i get 1 error


Re: MP3 Player - ryanhawk31 - 18.04.2013

I have also added
Код:
#define DIALOG_MUSICPLAYER  1
and
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_MUSICPLAYER) // This checks to see if the dialog the players viewing is the music player one
    {
          if(response) // If the player clicked a song
          {
               if(listitem == 0) // Since this is a list, we check if they clicked the first song on the list.
               {
                       PlayAudioStreamForPlayer(playerid, "URL"); // Play the song 
               }
               if(listitem == 1) // We now check if the player clicked the second song
               {
                       PlayAudioStreamForPlayer(playerid, "URL"); // Play the song
               }
               if(listitem == 2) // or the third song.
               {
                       PlayAudioStreamForPlayer(playerid, "URL"); // Play the song
               }
           }
      }
    return 1;
}



Re: MP3 Player - MarTaTa - 18.04.2013

it should be
pawn Код:
...
if(!IsPlayerInAnyVehicle(playerid)) // and the rest of the code
...
PS sorry, i'm from my phone


Re: MP3 Player - ryanhawk31 - 18.04.2013

Quote:
Originally Posted by MarTaTa
Посмотреть сообщение
it should be
pawn Код:
...
if(!IsPlayerInAnyVehicle(playerid)) // and the rest of the code
...
PS sorry, i'm from my phone
Thank you very much