PlayAudioStreamForPlayer -
AnonScripter - 16.10.2013
why is this send a client message to the player that the audio is playing while he chooses the skin and when he switch skins, the audio stops and plays again.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
PlayAudioStreamForPlayer(playerid, "http://www.*******-mp3.org/get?video_id=oEc6zDyJWvg&h=9ca967a27d60410da677e87d62963a50&r=1381966843868");
Re: PlayAudioStreamForPlayer -
DarkLored - 16.10.2013
What do you mean by stopping and playing agian??
explain more
Re: PlayAudioStreamForPlayer -
AnonScripter - 16.10.2013
when the player switch between skins, the audio stops on each switch and plays again, it explain itself,
if you don't get it, try it if you could :)
Re: PlayAudioStreamForPlayer -
DarkLored - 17.10.2013
Put the audio stream under onplayerconnect
and under onplayerspawn put this
StopAudioStreamForPlayer(playerid);
Re: PlayAudioStreamForPlayer -
AnonScripter - 17.10.2013
but i don't want to play it on player connect, i want to play it while the player is choosing a skin
Re: PlayAudioStreamForPlayer -
DarkLored - 17.10.2013
Look when a player connects it plays the music and when he spawns it stops it
and its the only way i think and most of the servers use that
it also plays when you choose the skin
Try it and tell me your thoughts
Respuesta: PlayAudioStreamForPlayer -
[CG]Milito - 17.10.2013
Of course, that callback gets called when you switch between skins.
Try using OnPlayerConnect callback and stop the music when the player spawns
pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
PlayAudioStreamForPlayer(playerid,blablablabla);
return 1;
}
public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
return 1;
}
Re: PlayAudioStreamForPlayer -
AnonScripter - 17.10.2013
well it worked, thanks but the client message is still appear
Respuesta: PlayAudioStreamForPlayer -
[CG]Milito - 17.10.2013
Yeah, You can't remove that message.
Re: Respuesta: PlayAudioStreamForPlayer -
AnonScripter - 17.10.2013
Quote:
Originally Posted by [CG]Milito
Yeah, You can't remove that message.
|
are you sure ?