Stopping music? - 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: Stopping music? (
/showthread.php?tid=98390)
Stopping music? -
AiVAMAN - 20.09.2009
How to stop music? (playerplaysound)
Re: Stopping music? -
Correlli - 20.09.2009
http://forum.sa-mp.com/index.php?action=search
Re: Stopping music? -
Peter_Corneile - 20.09.2009
You must have added the sound under OnPlayerConnect like this
pawn Код:
public OnPlayerConnect(playerid)
{
PlayerPlaySound(soundid,0.0,0.0,0.0);
return 1:
}
Then add a blank sound or a slap sound under OnPlayerSpawn like this
pawn Код:
public OnPlayerSpawn(playerid)
{
PlayerPlaySound(Blanksound,0.0,0.0,0.0);
return 1;
}
This will stop the music when the player spawns and For God's Sake next time search on the forums before posting
Re: Stopping music? -
AiVAMAN - 21.09.2009
Solved..
pawn Код:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
PlayerPlaySound(1186, X, Y, Z)
1186 is sound to stop music. (I think)
Re: Stopping music? -
Peter_Corneile - 21.09.2009
Try it
Re: Stopping music? -
AiVAMAN - 21.09.2009
Works fine. Thanks.
Re: Stopping music? -
Peter_Corneile - 22.09.2009
Hehe :P
Re: Stopping music? -
brett7 - 22.09.2009
or you could use this
stock StopMusic(playerid)
{
PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
}
Re: Stopping music? -
AiVAMAN - 22.09.2009
Ok.