Why is this crashing my game?
#1

Hey guys, I'm trying to stream some sounds when a player enters a specific area but each time I go to the area it crashes my game as soon as the audio file starts to play. What I have is below, any help would be great!

pawn Код:
#include <a_samp>

new MusicCheck;
public OnPlayerConnect(playerid)
{
    MusicCheck = SetTimer("StartMusic", 1000, 1);
    return 1;
}

forward StartMusic();
public StartMusic()
{
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(i, X, Y, Z);
        if(IsPlayerInRangeOfPoint(i, 60, -2805.3826,-1525.0806,139.7182))
        {
            new Float:Distance = 60;
            PlayAudioStreamForPlayer(i, "http://ft.dtupload.com/Uo/Dark_Ambient.mp3", X, Y, Z, Distance, 1);
            KillTimer(MusicCheck);
        }
    }
}
Reply


Messages In This Thread
Why is this crashing my game? - by V1ceC1ty - 01.10.2012, 14:12
Re: Why is this crashing my game? - by trapstar2020 - 01.10.2012, 14:24
Re: Why is this crashing my game? - by Dizzle - 01.10.2012, 14:33
Re: Why is this crashing my game? - by trapstar2020 - 01.10.2012, 14:38
Re: Why is this crashing my game? - by V1ceC1ty - 01.10.2012, 14:48

Forum Jump:


Users browsing this thread: 1 Guest(s)