SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/06/2013, 06:48 PM   #1
JoshP
Big Clucker
 
Join Date: May 2013
Posts: 68
Reputation: 0
Default Music in Skin Selection Problem

Well I'm trying to play a song in the skin selection so i did.

Code:
public OnPlayerRequestClass(playerid, classid)
{
PlayAudioStreamForPlayer(playerid, "http://k002.kiwi6.com/hotlink/h286pk3c97/themusic.mp3");
if(classid == 0) GameTextForPlayer(playerid,"~b~blahblah",2000,5);
{
    SetPlayerPos(playerid,1268.7476,-900.2996,42.8828);
    SetPlayerCameraPos(playerid,1268.6455,-904.1758,42.8828);
    SetPlayerFacingAngle(playerid,187.4978);
    SetPlayerCameraLookAt(playerid,1268.7476,-900.2996,42.882);
but the music plays in skin selection, but stops when i press left or right then starts again from the beginning and when i press spawn it continues to play, any help?
JoshP is offline   Reply With Quote
Old 15/06/2013, 07:29 PM   #2
Passout
Banned
 
Join Date: Jul 2010
Posts: 217
Reputation: 17
Default Re: Music in Skin Selection Problem

Put PlayAudioStreamForPlayer under OnPlayerConnect
Passout is offline   Reply With Quote
Old 15/06/2013, 07:58 PM   #3
JoshP
Big Clucker
 
Join Date: May 2013
Posts: 68
Reputation: 0
Default Re: Music in Skin Selection Problem

Well now it stops restarting when going left or right but it continues to play after u spawn
JoshP is offline   Reply With Quote
Old 15/06/2013, 08:07 PM   #4
WillyP
High-roller
 
WillyP's Avatar
 
Join Date: Jul 2010
Location: England
Posts: 2,027
Reputation: 63
Default Re: Music in Skin Selection Problem

Under OnPlayerSpawn add a function that will stop the music from playing.
__________________
once average now terrible
WillyP is offline   Reply With Quote
Old 15/06/2013, 08:32 PM   #5
JoshP
Big Clucker
 
Join Date: May 2013
Posts: 68
Reputation: 0
Default Re: Music in Skin Selection Problem

Like...
JoshP is offline   Reply With Quote
Old 15/06/2013, 08:34 PM   #6
WillyP
High-roller
 
WillyP's Avatar
 
Join Date: Jul 2010
Location: England
Posts: 2,027
Reputation: 63
Default Re: Music in Skin Selection Problem

pawn Code:
StopAudioStreamForPlayer(playerid);
__________________
once average now terrible
WillyP is offline   Reply With Quote
Old 15/06/2013, 08:34 PM   #7
Scenario
Godfather
 
Scenario's Avatar
 
Join Date: Feb 2010
Location: Heaven
Posts: 7,801
Reputation: 701
Default Re: Music in Skin Selection Problem

You really need to start searching.

StopAudioStreamForPlayer().
Scenario is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Skin selection problem. SpeAroX Scripting Help 0 04/11/2012 05:48 PM
Skin selection problem k3nw00d_kri5ty Scripting Help 6 11/01/2012 07:49 AM
Music in Class Selection Chrillzen Scripting Help 6 01/11/2011 07:50 AM
class selection music and animation problem sandisk125 Help Archive 8 18/08/2009 04:56 PM
How do you add music to character selection GTAgetaway Help Archive 2 31/05/2009 02:18 AM


All times are GMT. The time now is 03:53 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.