SA-MP Forums Archive
got little problem with OnPlayerAudiostream - 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: got little problem with OnPlayerAudiostream (/showthread.php?tid=308676)



got little problem with OnPlayerAudiostream - niels44 - 04.01.2012

hey guys,
well i know plapaudiostream thing is for 0.3d but now i thought lets copy it from teh a_players include from the 0.3d server and put that native thing in my script and well it looks like this:
pawn Код:
#define DIALOG_MUSICPLAYER  1
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
pawn Код:
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, "http://www.youtube.com/watch?v=_ovdm2yX4MA&ob=av2n"); // Play the song
               }
               if(listitem == 1) // We now check if the player clicked the second song
               {
                       PlayAudioStreamForPlayer(playerid, "http://www.youtube.com/watch?v=dLhFDYQHDQY&ob=av2e"); // Play the song
               }
               if(listitem == 2) // or the third song.
               {
                       PlayAudioStreamForPlayer(playerid, "http://www.youtube.com/watch?v=Wa5B22KAkEk&ob=av2e"); // Play the song
               }
           }
      }
pawn Код:
CMD:radio(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_MUSICPLAYER, DIALOG_STYLE_LIST, "Music Player", "Avicii - Levels\nTaio Cruz ft. Flo Rida -Hangover\nSnoop Dogg & Wiz Khalifa - Young, Wild and Free ft. Bruno Mars", "Play", "Close"); //This shows the dialog, notice we used DIALOG_MUSICPLAYER for the dialogid!
    return 1;
}
but when i start my server then it says file or function is not found... but the script isnt giving errors... can anyone help me?

greets niels


Re: got little problem with OnPlayerAudiostream - [MG]Dimi - 04.01.2012

Usually caused by plugins missing. BUT if you want to run 0.3c script with 0.3d function on 0.3c Server it won'r work coz of reason you said. You only copied native but SA-MP Default functions are defined in another non-pawno file.


Re: got little problem with OnPlayerAudiostream - niels44 - 04.01.2012

so u saying it's impossible? or wut?


Re: got little problem with OnPlayerAudiostream - [MG]Dimi - 04.01.2012

Yes. It's impossible to run 0.3c script with 0.3d function on 0.3c server.


Re: got little problem with OnPlayerAudiostream - niels44 - 04.01.2012

thats stupid... and its also stupid that my gamemode NYD_Drifting still wont work on 0.3d shit goddamn man


Re: got little problem with OnPlayerAudiostream - [MG]Dimi - 04.01.2012

It's not stupid. That's how everything works. But why does you script don't work on 0.3d?


Re: got little problem with OnPlayerAudiostream - niels44 - 05.01.2012

yeah i understand XD and btw i solved the problem with my gamemode it is now finnaly 0.3d but eehm i have now 0.3d and i have got a new bugg... when i use /radio then there shows up the dialog and then i click one and it says that it's streaming but the music isnt wokring... can someone help me? the code is exactly the same as i already posted...


Re: got little problem with OnPlayerAudiostream - [MG]Dimi - 05.01.2012

Check options inside your GTA SA Menu. Go to Audio Setting and raise sfx and music volume there.