Stopping music?
#1

How to stop music? (playerplaysound)
Reply
#2

http://forum.sa-mp.com/index.php?action=search
Reply
#3

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
Reply
#4

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)
Reply
#5

Try it
Reply
#6

Works fine. Thanks.
Reply
#7

Hehe :P
Reply
#8

or you could use this

stock StopMusic(playerid)
{
PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
}
Reply
#9

Ok.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)