Stock Music
#1

Is there a way to play the music that came with the game (Car radio) when someone enters an area? I've found something called PlayAudioStreamForPlayer, but I can't figure it out.
Reply
#2

Easy, very easy
pawn Код:
public OnGameModeInit()
{
    SetTimer("Music", 1000, true);
    return 1;
}

forward Music();
public Music()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    if(IsPlayerInRangeOfPoint(i, 5, x, y, z))
    {
        PlayAudioStreamForPlayer(i, URL, 0, 0, 0, 50.0, 0);
    }
}
Change "x, y, z" to whatever you like....
Also change "URL" with the URL of the song (must be a .mp3 link)
And that's it, good luck, any issues, PM me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)