PlayAudioStreamForPlayer
#3

pawn Код:
for
is used for looping and so the line
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
is going to loop through MAX_PLAYERS. Meaning that whenever this function is called it would loop through all players and if they are connected, will begin the audio stream for them.

And also, be careful because SendClientMessageToAll(-1, "Hardwell ft. Mitch Crown - Call Me A Spaceman"); will be announced to the whole server everytime you loop and find a connected player. So to explain, you loop and find that player ID 0 is connected, it will play the stream and send a client message to everyone. The same thing happens for player's 1 and 2, 3 and 4, etc until the chat is spammed with that message.

Instead, just use SendClientMessage(i, -1, message);

Hope I helped!
Reply


Messages In This Thread
PlayAudioStreamForPlayer - by Micko123 - 10.05.2016, 08:07
Re: PlayAudioStreamForPlayer - by Nin9r - 10.05.2016, 09:22
Re: PlayAudioStreamForPlayer - by BornHuman - 10.05.2016, 09:48
Re: PlayAudioStreamForPlayer - by Micko123 - 10.05.2016, 16:03
Re: PlayAudioStreamForPlayer - by MBilal - 10.05.2016, 17:04
Re: PlayAudioStreamForPlayer - by Micko123 - 10.05.2016, 17:29

Forum Jump:


Users browsing this thread: 1 Guest(s)