PDA

View Full Version : How to make it stop streaming?


iChiCkeNBuTT
22/02/2014, 11:19 AM
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! :)

iJumbo
22/02/2014, 11:54 AM
http://wiki.sa-mp.com/wiki/StopAudioStreamForPlayer

Is better to start stream on connect..