music in game
#1

Hi,

I have a musics in formats .mp3, but how launch them in game? for radio i use PlayAudioStreamForPlayer, but how i can to upload my music into server.
Reply
#2

Use an Audio Plugin.
Reply
#3

This topic may give u a little idea! https://sampforum.blast.hk/showthread.php?tid=411802
Reply
#4

Upload it to a website and stream it in with PlayAudioStreamForPlayer
Reply
#5

Try This:

Audio Plugin

or

You can play MP3 (or any Music Formats) on your own using "PlayAudioStreamForPlayer", Just upload your MP3 (or any Music Formats) on any other Websites, and Stream it.

Here is the Format:

Код:
PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0)
Код:
playerid = The ID of the player to play the audio for.
url[] = The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist.
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).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)