SA-MP Forums Archive
Music at gameplay? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Music at gameplay? (/showthread.php?tid=96508)



Music at gameplay? - -.- Haha -.- - 08.09.2009

HI!!
one little noob question:
Is it possible to play music at: OnPlayerSpawn, or OnPlayerRequestSpawn??
i have ever heared something about playplayersound(playerid, blahblah)
but i can't script veeeeery good,
pls anybody gimme a code? THANX!
cya.
ps, sorry for my GREAT english ^^ joke


Re: Music at gameplay? - Clavius - 08.09.2009

Yes, you can use PlayerPlaySound, add it to wherever you want it, and later, play an empty sound to stop the music.
https://sampwiki.blast.hk/wiki/PlayerPlaySound

Sound IDs are listed here:
https://sampwiki.blast.hk/wiki/SoundID


Re: Music at gameplay? - -.- Haha -.- - 08.09.2009

Quote:
Originally Posted by player007
Yes, you can use PlayerPlaySound, add it to wherever you want it, and later, play an empty sound to stop the music.
https://sampwiki.blast.hk/wiki/PlayerPlaySound

Sound IDs are listed here:
https://sampwiki.blast.hk/wiki/SoundID
thanx yo


Re: Music at gameplay? - Peter_Corneile - 08.09.2009

Just add the sound you want under OnPlayerRequestSpawn


pawn Код:
public OnPlayerRequestClass(playerid,classid)
PlayerPlayerSOund9playerid,soundid,0.0,0.0,0.0);//The sound that you want to play
And then
pawn Код:
public OnPlayerSpawn(playerid)
PlayPlayerSOund(playerid,soundid,0.0,0.0,0.0); //a blank sound , any sound id or maybe a slap sound
Adding a slap sound at spawn will stop the music sound ... Try it
Credits to SAMP Wiki


Re: Music at gameplay? - -.- Haha -.- - 09.09.2009

Quote:
Originally Posted by Peter Corneile
Just add the sound you want under OnPlayerRequestSpawn


pawn Код:
public OnPlayerRequestClass(playerid,classid)
PlayerPlayerSOund9playerid,soundid,0.0,0.0,0.0);//The sound that you want to play
And then
pawn Код:
public OnPlayerSpawn(playerid)
PlayPlayerSOund(playerid,soundid,0.0,0.0,0.0); //a blank sound , any sound id or maybe a slap sound
Adding a slap sound at spawn will stop the music sound ... Try it
Credits to SAMP Wiki
also thanx. i tryed it, and it works! ^^


Re: Music at gameplay? - Peter_Corneile - 09.09.2009

No Problem


Re: Music at gameplay? - buster_ - 09.01.2011

ey what do i need to include