SA-MP Forums Archive
How to make it stop streaming? - 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: How to make it stop streaming? (/showthread.php?tid=496470)



How to make it stop streaming? - iChiCkeNBuTT - 22.02.2014

NOTE: Fixed, my mistake

Hey guys,

I know it's very dumb question but i don't know how to set it up. I want the audio stream (music) to "stop" once player got spawned. I mean let it play only when player logging in/register and selecting teams/classes and once player spawned stop streaming it (stop the music).

Here is it:

Код:
public OnPlayerRequestClass(playerid, classid)
{
    Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
    Update3DTextLabelText(Duty[playerid], 0xFFFFFFFF, " ");
    Update3DTextLabelText(DM[playerid], 0xFFFFFFFF, " ");
        PlayAudioStreamForPlayer(playerid, "http://blabla.mp3");
        if(PlayerInfo[playerid][LoggedIn] == 1)
        {
        new String[200];
        new team1count = GetTeamCount(TEAM_EURASIA);
    new team2count = GetTeamCount(TEAM_USA);
    new team3count = GetTeamCount(TEAM_ARAB);
    new team4count = GetTeamCount(TEAM_SOVIET);
    new team5count = GetTeamCount(TEAM_AUS);
    new team7count = GetTeamCount(TEAM_MERC);
        new team8count = GetTeamCount(TEAM_IND);
        format(String, sizeof(String),""cblue"Usa [P:%d]\n"cgreen"Eurasia [P:%d]\n"corange"Arabia [P:%d]\n"cred"Soviet [P:%d]\n"cpurple"Austraillia [P:%d]\nMercenary [P:%d]\n"cyellow"India [P:%d]",team2count, team1count, team3count, team4count, team5count, team7count,team8count);
        ShowPlayerDialog(playerid, 1432, DIALOG_STYLE_LIST, "Select Team",String,"Select","Back");
        }
        return 1;
}
Thanks in advance!


Re: How to make it stop streaming? - iJumbo - 22.02.2014

https://sampwiki.blast.hk/wiki/StopAudioStreamForPlayer

Is better to start stream on connect..