Help with radio..
#1

Hey, I want to make a radio so everyone inside of a vehicle can hear the music, so the driver OR any passanger could do /radio ( already have that set up ) and choose a song for everyone in a car, how could I do this?
Reply
#2

If you have downloaded the SA:MP 0.3d server package you will see a filterscript already in it named iradio that is an example on making a radio system.
Reply
#3

I'v searched, cant find a Radio filterscript to look on, just MP3 Player, and ******* player, I need it so whoever types /radio and chooses a station plays the song for everyone in the car., At the moment I have it so it just plays for the person who does /radio
Reply
#4

did you check out iradio btw there ARE a lot of radio systems see this
https://sampforum.blast.hk/showthread.php?tid=248209
https://sampforum.blast.hk/showthread.php?tid=298884
https://sampforum.blast.hk/showthread.php?tid=291970
Reply
#5

Cool filterscripts, but not one of them say it plays for everyone inside of the vehicle, There all just simple ( which mine is )

Now I need some one to show me how I can play it for everyone inside of the vehicle. and so it stops for everyone inside of the vehicle when they shut the radio off..

Thanks for the help though
Reply
#6

rip of ******* player's code as it has a system by which you can select the area for which the music will play . just modify it...i think so maybe :P
Reply
#7

I was thinking about playing the song for the area then OnPlayerUpdate playing the audiostream for the players XYZ and assign a global variable for when they put a song on, but I think that would restart the song..

EDIT: DID NOT WORK, crashes the client :P

EDIT x2: I THINK I FIXED IT, Just make it like this
PHP код:
new Float:xFloat:yFloat:zFloat:distance 3.0;
                    
GetPlayerPos(playerid,x,y,z);
                    if(
IsPlayerInRangeOfPoint(playerid,3.0,x,y,z))
                    {
                        
PlayAudioStreamForPlayer(playerid,"http://yp.shoutcast.com/sbin/tunein-station.pls?id=668943",x,y,z,distance,0);
                    } 
If anyone could get on my server to test it, it'd be great, ip is in the signature
Reply
#8

You are getting a player's position and then check if the player is at that position. That means the code actually check if a player is at his position, which is obviously useless.

For iradio, find it in the filterscripts folder of your server, if you have installed the 0.3d server.
You can set a variable to allow or disallow them to play radio in OnPlayerStateChange (check if they entered/left a vehicle).
Reply
#9

Wouldn't that check if some one else is in their radius? I want to know how to do this, I dont want to use a filterscript

Can you get on my server so I can test it? The IP is in my signature
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)