How to make it stop streaming?
#1

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!
Reply
#2

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

Is better to start stream on connect..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)