[HELP]audiostreaming
#1

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)