cokacola Posted November 25, 2009 Share Posted November 25, 2009 Okay, i am making a custom radio, with a selection of songs, but my problem is, that playSound3D only works for the local player. Is there someway to make it play for all players within a certain distance from the players car? maybe some form of code that checks a players distance and then uses playSound3D for them? i must admit, i was disappointed that 3d sounds only worked for the local player (BTW, i am trying to keep it clientside, as the radio is a GUI with a list of songs) Link to comment
Gamesnert Posted November 25, 2009 Share Posted November 25, 2009 You only need to notify other clients a sound is running. You can do this using: 1. Events. (triggerServerEvent + triggerClientEvent) 2. Element data, which is also synced in (most) occasions. (setElementData. Note though that this is only recommended for a low amount of uses. Doesn't require any server-side code though) If you want to know the distance, just supply the target position/element and let the client decide if he's inside the range or not. Link to comment
madis Posted November 25, 2009 Share Posted November 25, 2009 You seem to be making EXACTLY the same thing as I did last week https://forum.multitheftauto.com/viewtop ... 08&t=25851 Link to comment
cokacola Posted November 26, 2009 Author Share Posted November 26, 2009 i see, i could just use that one Link to comment
madis Posted November 26, 2009 Share Posted November 26, 2009 Great, also, I would have nothing against it, if you could enhance it or make it better in case you find any bug. Link to comment
cokacola Posted November 28, 2009 Author Share Posted November 28, 2009 I have found a rather weird problem, I had a few songs at first, and it worked. I now have 9 songs, and it fails to download them, the only way you can use it without being disconnected, is to copy the songs to the radio3d resource folder in your MTA client downloaded mods.. its only on my local server, but thats abit of a problem(BTW, it came to about 25-30 MB, if its just an MTA limit) but anyway, it works good after I have copied them Link to comment
Gamesnert Posted November 28, 2009 Share Posted November 28, 2009 its only on my local server, but thats abit of a problem(BTW, it came to about 25-30 MB, if its just an MTA limit) I've once downloaded over 100 MB out of 800 on a server. So I guess it isn't a MTA limit. Link to comment
cokacola Posted November 28, 2009 Author Share Posted November 28, 2009 okay, it might be the code then.. just curios..which server had 100MB(or 800MB) download? what in there was that big, was it like a total conversion server or something ^.^ Link to comment
madis Posted November 28, 2009 Share Posted November 28, 2009 The disconnecting problem occurred on my testing with only a specific .mp3 file, so it might have been that for you too. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now