SA-MP Forums Archive
Sound? - 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: Sound? (/showthread.php?tid=97223)



Sound? - MB@ - 13.09.2009

Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 2108.1409,1911.1537,10.8203);
  SetPlayerFacingAngle(playerid, 269.9582);
	SetPlayerCameraPos(playerid, 2116.1033,1911.2902,10.8203);
	SetPlayerCameraLookAt(playerid, 2108.1409,1911.1537,10.8203);
 	PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0); <====
	return 1;
}
When i spawn the sound still goes...How can i make when i spawn that the sound turns off??


I tryed

Код:
public OnPlayerSpawn(playerid)
{
PlayerPlaySound(playerid, 0, 0.0, 0.0, 0.0); 
return 1;
}
But the sound still plays


Can U please help me


Re: Sound? - brett7 - 13.09.2009

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


Re: Sound? - Sayaron - 13.09.2009

Do like this:
pawn Код:
public OnPlayerSpawn(playerid)
{
    StopMusic(playerid);
     return 1;
}



Re: Sound? - eXchainZ-FoReVeR - 13.09.2009

Quote:
Originally Posted by brett7
stock StopMusic(playerid)
{
PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
}
Quote:
Originally Posted by [LRP
Sayaron ]
Do like this:
pawn Код:
public OnPlayerSpawn(playerid)
{
    StopMusic(playerid);
     return 1;
}
Those both codes should work, But i'd prefer the second one mate..

GL!


Re: Sound? - Sayaron - 13.09.2009

Mine works 100%, or should as it works for me


Re: Sound? - x-cutter - 13.09.2009

Use this to stop music:
Код:
PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);



Re: Sound? - Sayaron - 13.09.2009

Quote:
Originally Posted by X Cutter
Use this to stop music:
Код:
PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
lol, no. Use this :P
pawn Код:
public OnPlayerSpawn(playerid)
{
    StopMusic(playerid);
     return 1;
}



Re: Sound? - Nero_3D - 13.09.2009

Quote:
Originally Posted by [LRP
Sayaron ]
lol, no. Use this :P
pawn Код:
public OnPlayerSpawn(playerid)
{
    StopMusic(playerid);
     return 1;
}
lol. no. I can only tell you that this function doesnt exist!
If you use a self made function, you need to post the function itself, too.


Re: Sound? - x-cutter - 13.09.2009

Quote:
Originally Posted by [LRP
Sayaron ]
Quote:
Originally Posted by X Cutter
Use this to stop music:
Код:
PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
lol, no. Use this :P
pawn Код:
public OnPlayerSpawn(playerid)
{
    StopMusic(playerid);
     return 1;
}
StopMusic doesn't exist.....

EDIT: Whoops somebody posted that before meh lawl....


Re: Sound? - Sayaron - 13.09.2009

Quote:
Originally Posted by X Cutter
Quote:
Originally Posted by [LRP
Sayaron ]
Quote:
Originally Posted by X Cutter
Use this to stop music:
Код:
PlayerPlaySound(playerid, 1069, 0.0, 0.0, 0.0);
lol, no. Use this :P
pawn Код:
public OnPlayerSpawn(playerid)
{
    StopMusic(playerid);
     return 1;
}
StopMusic doesn't exist.....

EDIT: Whoops somebody posted that before meh....
Why does it work for me then??