• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] How to add music to skin selection menu?
#4
(2021-03-25, 09:12 PM)DandoRYx Wrote:
PHP Code:
public OnPlayerRequestClass(playeridclassid)

{

// your skin code...

if(GetPVarInt(playerid"playedSong") == 0)

{

SetPVarInt(playerid"playedSong"1);

PlayAudioStreamForPlayer(playeridYOUR_AUDIO_STREAM);

}

}



public 
OnPlayerSpawn(playerid)

{

// your spawn code...

StopAudioStreamForPlayer(playerid);

SetPVarInt(playerid"playedSong"0);

return 
1;





hi im not sure if im doing it right but, is it something like this?



PHP Code:
public OnPlayerRequestClass(playeridclassid)

{

SetPlayerPos(playerid2014.6443,1077.2521,48.8207);?

SetPlayerFacingAngle(playerid357.1971);

SetPlayerCameraPos(playerid,? 2014.90191083.770149.8680);?

SetPlayerCameraLookAt(playerid2014.86581082.772549.7031);?





if(
GetPVarInt(playerid"playedSong") == 0)

? ? {

? ? ? ? 
SetPVarInt(playerid"playedSong"1);

? ? ? ? 
PlayAudioStreamForPlayer(playerid"https://www.youtube.com/watch?v=y6120QOlsfU");

? ? }

? ? 

? return 
1;





I want to stream the audio from youtube?if possible, or if i do download it how do i stream it during skin selection?
  Reply


Messages In This Thread
RE: How to add music to skin selection menu? - by CrypticSin - 2021-03-25, 09:53 PM

Forum Jump: