Scripting/Server/Functions/PlayAudioStreamForPlayer

Plays a network audio stream for one player, like SA-MP. url must start with http:// or https:// and may be an .mp3 file, an internet radio stream (MP3) or a .pls / .m3u / .asx playlist that points at one. With usepos = true the sound is positional: full volume at x, y, z, fading to silence at distance metres. A player hears one stream at a time; a new call replaces the old one. PC and Android; ogg/aac are not supported.

Syntax

PlayAudioStreamForPlayer(player, url [, x, y, z, distance, usepos])

Arguments

Returns

nothing

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "playaudiostreamforplayer" )
	{
		PlayAudioStreamForPlayer( player, "http://example.com/" );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Audio streams, object editor and object picker (v0.3)

Categories: Server functions | Audio streams, object editor and object picker (v0.3)