Need help OnplayerRequest to play music.. + REp - 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: Need help OnplayerRequest to play music.. + REp (
/showthread.php?tid=324847)
Need help OnplayerRequest to play music.. + REp -
Scrillex - 11.03.2012
So here is my code but the problem is how to put the music playing thingy.. To not play for each selection but only for thous skins?
Please help me out with this question..
Код:
else if(classid == 36 || classid == 37 || classid == 38 || classid == 39 || classid == 40 || classid == 41)
{
PlayAudioStreamForPlayer(playerid, "http://www.tm-rp.com/music/Retarded.mp3");
gTeam[playerid] = LSPD;
GameTextForPlayer(playerid,"~w~Los Santos Police Department",3000,5);
SetPlayerPos(playerid, 254.327987, 80.159652, 1003.640625);
SetPlayerFacingAngle(playerid, 185.023376);
SetPlayerCameraLookAt(playerid, 254.327987, 80.159652, 1003.640625);
SetPlayerCameraPos(playerid, 254.327987 + (5 * floatsin(-185.023376, degrees)), 80.159652 + (5 * floatcos(-185.023376, degrees)), 1003.640625);
SetPlayerInterior(playerid,6);
SetPlayerVirtualWorld(playerid,1);
SetPlayerColor(playerid,0x55FF00FF);
}
Re: Need help OnplayerRequest to play music.. + REp -
eesh - 11.03.2012
pawn Код:
else if(classid == 36 || classid == 37 || classid == 38 || classid == 39 || classid == 40 || classid == 41)
{
if(radiostreaming[playerid] == 0)//will check if the stream already started playing for a different skin and play if its not.
{
PlayAudioStreamForPlayer(playerid, "http://www.tm-rp.com/music/Retarded.mp3");
radiostreaming[playerid] = 1;
}
gTeam[playerid] = LSPD;
GameTextForPlayer(playerid,"~w~Los Santos Police Department",3000,5);
SetPlayerPos(playerid, 254.327987, 80.159652, 1003.640625);
SetPlayerFacingAngle(playerid, 185.023376);
SetPlayerCameraLookAt(playerid, 254.327987, 80.159652, 1003.640625);
SetPlayerCameraPos(playerid, 254.327987 + (5 * floatsin(-185.023376, degrees)), 80.159652 + (5 * floatcos(-185.023376, degrees)), 1003.640625);
SetPlayerInterior(playerid,6);
SetPlayerVirtualWorld(playerid,1);
SetPlayerColor(playerid,0x55FF00FF);
}
thats one thing i thought of. Another idea maybe playing the skin on classid 36 and not using PlayAudioStreamForPlayer till 42nd class(As it wont change the stream till the 41st because your not using the function there :P ).
Re: Need help OnplayerRequest to play music.. + REp -
Scrillex - 11.03.2012
Hmm have problem with if(radiostreaming[playerid] == 0)
Giving error error 017: undefined symbol "radiostreaming"
Re: Need help OnplayerRequest to play music.. + REp -
eesh - 11.03.2012
new radiostreaming[MAX_PLAYERS];
put that on top
Re: Need help OnplayerRequest to play music.. + REp -
Scrillex - 11.03.2012
°Thank you It worked

+ rep
Re: Need help OnplayerRequest to play music.. + REp -
eesh - 11.03.2012
your welcome