-.Paradox.- Posted October 19, 2013 Posted October 19, 2013 Hello i need some help here when i click the play bouton it dont play the radio addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.button[1] then local row = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if row == 0 then function radio( ) for i,v in ipairs( getElementsByType( "player" ) ) do local x, y, z = getElementPosition( v ); local playButton = playSound3D( 'http://www.181.fm/playing.php?station=181-party&embed=1') setSoundMaxDistance( playButton, 100 ) end end end end end) If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted October 19, 2013 Posted October 19, 2013 That doesn't make any sense. You're trying to create a 3D sound to play for every player? if so, then you're doing it the wrong way. You must trigger a server side event, then trigger back to the client side to play the sound. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted October 19, 2013 Author Posted October 19, 2013 Can't understand? You mean like that? Here is my server side script addEvent("firstSound", true) addEventHandler("firstSound", root, function( ) for i,v in ipairs( getElementsByType( "player" ) ) do local x, y, z = getElementPosition( v ); local playButton = playSound( 'http://www.181.fm/playing.php?station=181-party&embed=1') setSoundMaxDistance( playButton, 100 ) end end) addEvent("firstSoundStop", true) addEventHandler("firstSoundStop", root, function ( ) if(isSoundPaused(playButton)) then --sound is paused, un-pause it setSoundPaused(playButton, false) else --sound is not paused, pause it setSoundPaused(playButton, true) end end) If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted October 19, 2013 Posted October 19, 2013 No, that makes no sense either. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
xXMADEXx Posted October 19, 2013 Posted October 19, 2013 -- Client addEventHandler ("onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[1] ) then local row, col = guiGirdListGetSelectedItem ( GUIEditor.gridlist[1] ) if ( row ~= -1 and col ~= 0 ) then radio ( ) end end end ) function radio ( ) triggerServerEvent ( "StartTheSound", localPlayer ) end addEvent ( "StartTheSound_C", true ) addEventHandler ( "StartTheSound_C", root, function ( ) if not isElement ( sound ) then local x, y, z = getElementPosition ( localPlayer ) sound = playSound3D( 'http://www.181.fm/playing.php?station=181-party&embed=1', x, y, z ) end end ) -- Server addEvent ( "StartTheSound", true ) addEventHandler ( "StartTheSound", root, function ( ) triggerClientEvent ( root, "StartTheSound_C", root ) end ) The Ultimate Lua Tutorial! | MTA PHP SDK
-.Paradox.- Posted October 19, 2013 Author Posted October 19, 2013 Attempt to call guiGirdListGetSelectedItem (a nil value) If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted October 19, 2013 Posted October 19, 2013 He made a typo, put guiGridListGetSelectedItem. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted October 19, 2013 Author Posted October 19, 2013 (edited) When i press the play sound i dont hear the radio, nothing in debug this time. Edited October 19, 2013 by Guest If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted October 19, 2013 Posted October 19, 2013 If you replaced it with what I said, then it's not possible. Post your script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted October 19, 2013 Author Posted October 19, 2013 I want to keep it secret, can i send it to you in pm? If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted October 19, 2013 Posted October 19, 2013 On that code you sent me, what is the problem and in what line? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted October 19, 2013 Author Posted October 19, 2013 It show nothing in debug it dont want to play sound neither If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted October 19, 2013 Posted October 19, 2013 I think that you didn't notice it wasn't 100% client side? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted October 19, 2013 Author Posted October 19, 2013 It's client side here is the server side addEvent ( "StartTheSound", true ) addEventHandler ( "StartTheSound", root, function ( ) triggerClientEvent ( root, "StartTheSound_C", root ) end ) If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted October 19, 2013 Posted October 19, 2013 Check your inbox. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted October 20, 2013 Author Posted October 20, 2013 Still nothing, the radio URL is good and i didn't find the problem If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Moderators Sarrum Posted October 20, 2013 Moderators Posted October 20, 2013 Change 'http://www.181.fm/playing.php?station=181-party&embed=1' to 'http://relay4.181.fm:8036'
-.Paradox.- Posted October 20, 2013 Author Posted October 20, 2013 Thanks man working Thank you Castillo and xXMadeXx One little problem i want when player click on pause it stop the sound If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Castillo Posted October 20, 2013 Posted October 20, 2013 Do the same as you did to play the sound, but this time to stop it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
-.Paradox.- Posted October 22, 2013 Author Posted October 22, 2013 But I want to put 10 other radio channels working good but when I click on play all the radio channels play in the same time and I want only to play selected item If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
-.Paradox.- Posted October 25, 2013 Author Posted October 25, 2013 Help?! If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
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