PDA

View Full Version : [HELP] I need help about Onplayerrequestclass . +REP1


VenomMancer
22/10/2013, 10:48 AM
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.

]Rafaellos[
22/10/2013, 11:44 AM
You can use THIS (http://wiki.sa-mp.com/wiki/PlayAudioStreamForPlayer).

VenomMancer
22/10/2013, 12:41 PM
Rafaellos[;2750731']You can use THIS (http://wiki.sa-mp.com/wiki/PlayAudioStreamForPlayer).

How to make the music is of when player spawn ?

newbie scripter
22/10/2013, 12:58 PM
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!

VenomMancer
23/10/2013, 03:26 AM
anyone can make for me ?

i am a newbe scripter :D

[CG]Milito
23/10/2013, 03:35 AM
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

newbie scripter
23/10/2013, 11:48 AM
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

mahardika
24/10/2013, 02:07 AM
OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid, http://media.soundcloud.com/stream/TlAsBOPpA3Vm.mp3); //harlem shake yeah!
return 1;
}

OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
return 1;
}

[CG]Milito
24/10/2013, 02:14 AM
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?

mahardika
24/10/2013, 02:17 AM
Milito;2752888']Did you just copy my code?

a little... just add the music...
i know how to make it, but i dont know how to make player listen music like "Harlem Shake,Titanium etc."