[HELP] I need help about Onplayerrequestclass . +REP1
#1

Hello all

I need help OnplayerRequestClass ..
I want player listen music.
i know how to make it, but i dont know how to make player listen music like "Harlem Shake,Titanium etc."

If you understand please help me for make it

Thanks be4 +REP1.
Reply
#2

You can use THIS.
Reply
#3

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
You can use THIS.
How to make the music is of when player spawn ?
Reply
#4

When A Player Spawns, here
Код:
public OnPlayerSpawn(playerid)
{
 // The Code LIke PlayAudioStreamForPlayer(blablabla);
return 1;
}
On Request Class

Код:
public OnPlayerRequestClass(playerid, classid)
{
   // code
return 1;
}
and more!
Reply
#5

anyone can make for me ?

i am a newbe scripter
Reply
#6

pawn Код:
OnPlayerConnect(playerid)
{
    PlayAudioStreamForPlayer(playerid, YOUR URL);
    return 1;
}

OnPlayerSpawn(playerid)
{
    StopAudioStreamForPlayer(playerid);
    return 1;
}
I don't recommend you using OnPlayerRequestClass callback because it gets called when a player changes the skin so the song will repeat and repeat whenever they just choose the skin.
That's why I made the code using OnPlayerConnect and OnPlayerSpawn callbacks
Reply
#7

where do you want to play the music? and also tell us the URL we will or i will make 1 for u or PM me
Reply
#8

Код:
OnPlayerConnect(playerid)
{
       PlayAudioStreamForPlayer(playerid, http://media.soundcloud.com/stream/TlAsBOPpA3Vm.mp3); //harlem shake yeah!
       return 1;
}

OnPlayerSpawn(playerid)
{
      StopAudioStreamForPlayer(playerid);
      return 1;
}
Reply
#9

Quote:
Originally Posted by mahardika
Посмотреть сообщение
Код:
OnPlayerConnect(playerid)
{
       PlayAudioStreamForPlayer(playerid, http://media.soundcloud.com/stream/TlAsBOPpA3Vm.mp3); //harlem shake yeah!
       return 1;
}

OnPlayerSpawn(playerid)
{
      StopAudioStreamForPlayer(playerid);
      return 1;
}
Did you just copy my code?
Reply
#10

Quote:
Originally Posted by [CG]Milito
Посмотреть сообщение
Did you just copy my code?
a little... just add the music...
Quote:
Originally Posted by VenomMancer
Посмотреть сообщение
i know how to make it, but i dont know how to make player listen music like "Harlem Shake,Titanium etc."
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)