30.06.2012, 15:29
Jб tentaram PlayAudioStreamForPlayer usando os parвmetros opcionais?
Wiki:
Wiki:
Code:
Parameters: (playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0) playerid The player you want to stream the audio for. url[] The url to open. Valid formats are mp3 and ogg/vorbis. Float:PosX The X position at which to play the audio. Default 0.0. Has no effect unless usepos is set to 1. Float:PosY The Y position at which to play the audio. Default 0.0. Has no effect unless usepos is set to 1. Float:PosZ The Z position at which to play the audio. Default 0.0. Has no effect unless usepos is set to 1. Float:distance The distance over which the audio will be heard. Has no effect unless usepos is set to 1. usepos Use the positions and distance specified. Default disabled (0). Returns This function doesn't return a specific value Example public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/play radio", cmdtext, true) == 0) { PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls"); return 1; } if (strcmp("/radio in my pos", cmdtext, true) == 0) { new Float:X, Float:Y, Float:Z, Float:Distance = 5.0; GetPlayerPos(playerid, X, Y, Z); PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1); return 1; } return 0; }