SA-MP Forums Archive
[HELP]audiostreaming - 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: [HELP]audiostreaming (/showthread.php?tid=298959)



[HELP]audiostreaming - Meisternuke - 23.11.2011

i try to play a sound 4 everyone...
this is my code:

[pwn]
if(strcmp(cmdtext, "/join", true) == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayAudioStreamForPlayer(i, "http://www.e-jessen.de/joinmeister.mp3");
return 1;
}
else return 1;
}
}[/pwn]

ive tried to play it 4 my self and it works...
why does it not play 4 everyone on the server?


Re: [HELP]audiostreaming - marwan - 23.11.2011

you have to write /join to hear music if you want to play it for every one without cmd post
PlayAudioStreamForPlayer(i, "http://www.e-jessen.de/joinmeister.mp3");
on On player spawn


Re: [HELP]audiostreaming - leong124 - 23.11.2011

pawn Код:
if(strcmp(cmdtext, "/join", true) == 0)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            PlayAudioStreamForPlayer(i, "http://www.e-jessen.de/joinmeister.mp3");
        }
    }
    return 1;
}
Do you know return 1 will instantly breaks the loop and stop that command?
Also, this is not related to 0.3d. It should be moved to scripting discussion.