Need help OnplayerRequest to play music.. + REp
#1

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);
    }
Reply
#2

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 ).
Reply
#3

Hmm have problem with if(radiostreaming[playerid] == 0)

Giving error error 017: undefined symbol "radiostreaming"
Reply
#4

new radiostreaming[MAX_PLAYERS];

put that on top
Reply
#5

°Thank you It worked + rep
Reply
#6

your welcome
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)