Audio help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Audio help (
/showthread.php?tid=345608)
Audio help -
[SRB]Genius - 25.05.2012
Hi,i am using simple DM script,and i want to make a DM server.
I have a question,how to put audio mp3 song in my script,but in diffrent areas,i don't know if you can understand me,i have a bad English.But i need to put 1 song in one area,2 song in second area etc...Can someone paste me a tutorial,or any help,i really don't kow how to make it...
And i am using 0.3d.
Re: Audio help -
HighPitchedVoice - 25.05.2012
http://forum.sa-mp.com/showthread.ph...ighlight=Audio
Re: Audio help -
[SRB]Genius - 25.05.2012
Yess,i know for this but i dont need to play it when i want,i need it to play even if i (rcon admin) am not connected on server.
So when player go in some area,the song should start,i hope you know what i meen,i saw this on one server,every time i come i chuch the bells start ringing.
AW: Audio help -
EthanR - 25.05.2012
Код:
if(IsPlayerInRangeOfPoint(playerid, putradiushere, coordx, coordy, coordz) && AudioStreamOn[playerid] == 0)
{
PlayAudioStreamForPlayer(playerid, "audiostreamurlhere");
AudioStreamOn[playerid] = 1;
}
// This somewhere into your gamemode.
new AudioStreamOn[MAX_PLAYERS];
and something like AudioStreamOn[playerid] = 0; OnPlayerConnect, to reset the value for joining players.
EDIT: You should put the InRange check into a 1-2 second timer, OnPlayerUpdate isn't really needed here. (OnPlayerInteriorChange might be good though)
Re: Audio help -
[SRB]Genius - 26.05.2012
Thank you,i think will test this know,but what shoud i put i "radius" ? I am totaly new in this.
Re: Audio help -
Kitten - 26.05.2012
Depends on what your using in the range if it's a vending machine or a certain object i would recommend 4.0 to 6.0 Radius.