SA-MP Forums Archive
[HELP] playerplaysound - 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)
+--- Thread: [HELP] playerplaysound (/showthread.php?tid=519670)



[HELP] playerplaysound - Luca12 - 15.06.2014

Hello I have on registration that playerplaysound and know when is registration over the song are still played how can I stop it if you know what I mean? Thanks


Re: [HELP] playerplaysound - RenovanZ - 15.06.2014

The sound will stop when it ends, there's no function to stop PlayerPlaySound audio. Or try StopAudioStreamForPlayer (not sure about this).


Re: [HELP] playerplaysound - ThatThoseTheThy - 15.06.2014

if it's a song with a link then StopAudioStreamForPlayer should do the trick.


Re: [HELP] playerplaysound - Luca12 - 15.06.2014

no it's not it's playerpaysound


Re: [HELP] playerplaysound - Parallex - 16.06.2014

Put this in the code when registration is done:
pawn Код:
PlayerPlaySound(playerid,1063,0.0,0.0,0.0);



Re: [HELP] playerplaysound - Threshold - 16.06.2014

Код:
SOUND_GOGO_TRACK_START	 1062 (music)
SOUND_GOGO_TRACK_STOP	 1063 (music)
SOUND_DUAL_TRACK_START	 1068 (music)
SOUND_DUAL_TRACK_STOP	 1069 (music)
SOUND_BEE_TRACK_START	 1076 (music)
SOUND_BEE_TRACK_STOP	 1077 (music)
SOUND_AWARD_TRACK_START	 1097 (music)
SOUND_AWARD_TRACK_STOP	 1098 (music)
SOUND_DRIVING_AWARD_TRACK_START	 1183 (music)
SOUND_DRIVING_AWARD_TRACK_STOP	 1184
SOUND_BIKE_AWARD_TRACK_START	 1185 (music)
SOUND_BIKE_AWARD_TRACK_STOP	 1186
SOUND_PILOT_AWARD_TRACK_START	 1187 (music)
SOUND_PILOT_AWARD_TRACK_STOP	 1188
Source: https://sampwiki.blast.hk/wiki/Sounds

As you can see above, each (looping) music track has its corresponding 'stop' track which will stop the track from playing. I think you can just use one 'stop' track to stop any track completely but I can't completely confirm that just yet.

Eg.
pawn Код:
PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
Would require:
pawn Код:
PlayerPlaySound(playerid, 1063, 0.0, 0.0, 0.0);
In order to stop the sound, as mentioned above.


Re: [HELP] playerplaysound - Luca12 - 16.06.2014

I was use this stop bike track and work's fine

1186

thanks