21.07.2013, 21:21
(
Last edited by GNewZ; 22/07/2013 at 02:05 PM.
)
This is a simple, brief tutorial on how to add music to your skin selection.
Okay, so first you want to you want the music to start playing as soon as the player has connected and is viewing your skin selection, so you put it under OnPlayerConnect. So what you need to do is:
Put this under: public OnPlayerConnect(playerid)
The url there, is just the music I use, you can change it to whatever. This code is pretty much self explanatory, and simple to use, and does not really need explaining. the ~r~ is to symbolise the colour red of the text you may want to add, you can for example change it to green by putting ~g~.
But, you want the music to stop after they have picked your skin, so, add this under: public OnPlayerSpawn(playerid)
If you get errors, tell me as you may have done something wrong.
Okay, so first you want to you want the music to start playing as soon as the player has connected and is viewing your skin selection, so you put it under OnPlayerConnect. So what you need to do is:
Put this under: public OnPlayerConnect(playerid)
Code:
PlayAudioStreamForPlayer(playerid, "http://ivyleaguespins.files.wordpress.com/2011/10/05-hood-gone-love-it-ft-kendrick-lemar-dopehood-com.mp3"); if(playerid == 0) GameTextForPlayer(playerid,"~r~What ever you want here, could be your server name etc, this is just an addon in theory, I dont think it is needed.",5000,5);
But, you want the music to stop after they have picked your skin, so, add this under: public OnPlayerSpawn(playerid)
Code:
StopAudioStreamForPlayer(playerid);