Audio help
#1

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.
Reply
#2

http://forum.sa-mp.com/showthread.ph...ighlight=Audio
Reply
#3

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.
Reply
#4

Код:
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)
Reply
#5

Thank you,i think will test this know,but what shoud i put i "radius" ? I am totaly new in this.
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)