Audio stream - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Audio stream (
/showthread.php?tid=360321)
Audio stream -
farCry.xD - 17.07.2012
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]);
Re: Audio stream -
Vince - 17.07.2012
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.
Re: Audio stream -
Andi_Evandy - 17.07.2012
pawn Код:
new RandomAudioStream[3][] =
{
{"Link"},
{"Link"},
{"Link"}
};
pawn Код:
PlayAudioStreamForPlayer(playerid, RandomAudioStream[Random]);
Respuesta: Audio stream -
farCry.xD - 17.07.2012
Thx , it work's
Re: Audio stream -
DandyCorleone - 06.12.2016
working :v thanks