Audio stream
#1

Hey , I try to make a Random Audio stream
In the top of script :
Код:
new Float:RandomAudioStream[3][0] =
{
	{"Link"},
	{"Link"},
	{"Link"}
};
And at onplayerconnect :
Код:
new Random = random(sizeof(RandomAudioStream));
    PlayAudioStreamForPlayer(playerid, RandomAudioStream[Random][0], RandomAudioStream[Random][1], RandomAudioStream[Random][2]);
But I get some warnings :
Код:
C:\Documents and Settings\nearCry\Desktop\ASTA\gamemodes\RNSGM.pwn(242) : warning 213: tag mismatch
C:\Documents and Settings\nearCry\Desktop\ASTA\gamemodes\RNSGM.pwn(243) : warning 213: tag mismatch
C:\Documents and Settings\nearCry\Desktop\ASTA\gamemodes\RNSGM.pwn(244) : warning 213: tag mismatch
C:\Documents and Settings\nearCry\Desktop\ASTA\gamemodes\RNSGM.pwn(14880) : warning 213: tag mismatch
242 - 244 is :
Код:
{"Link"},
	{"Link"},
	{"Link"}
and 14880 is :
Код:
PlayAudioStreamForPlayer(playerid, RandomAudioStream[Random][0], RandomAudioStream[Random][1], RandomAudioStream[Random][2]);
Reply
#2

You have no idea what you're doing, do you? I don't even know where to start explaining ...
  • Strings are obviously not floats
  • Remove the sizes from the array
  • If you want the music to play at the player's position, then simply get his pos
  • To get a random string from the array, only use RandomAudioStream[Random]
  • The amount of parameters in PlayAudioStreamForPlayer is incorrect.
Reply
#3

pawn Код:
new RandomAudioStream[3][] =
{
    {"Link"},
    {"Link"},
    {"Link"}
};
pawn Код:
PlayAudioStreamForPlayer(playerid, RandomAudioStream[Random]);
Reply
#4

Thx , it work's
Reply
#5

working :v thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)