PlayAudioStreamForPlayer
#1

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

What do you mean by stopping and playing agian??
explain more
Reply
#3

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 :)
Reply
#4

Put the audio stream under onplayerconnect
and under onplayerspawn put this
StopAudioStreamForPlayer(playerid);
Reply
#5

but i don't want to play it on player connect, i want to play it while the player is choosing a skin
Reply
#6

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

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

well it worked, thanks but the client message is still appear
Reply
#9

Yeah, You can't remove that message.
Reply
#10

Quote:
Originally Posted by [CG]Milito
Посмотреть сообщение
Yeah, You can't remove that message.
are you sure ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)