[HELP] playerplaysound
#1

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

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

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

no it's not it's playerpaysound
Reply
#5

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

Код:
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.
Reply
#7

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

1186

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)