Arsilex Posted August 31, 2012 Share Posted August 31, 2012 function M1 (thePlayer) local vehicle = getPedOccupiedVehicle ( thePlayer ) local x,y,z = getElementPosition( vehicle ) sound1 = playSound3D( "http://listen.radionomy.com/a-rockradio.m3u", x, y, z, true ) setSoundVolume( sound, 5 ) setSoundMaxDistance( sound, 10 ) end por que me da error en getElementPosition????? Link to comment
NodZen Posted August 31, 2012 Share Posted August 31, 2012 function M1 (thePlayer) local vehicle = getPedOccupiedVehicle ( thePlayer ) local x,y,z = getElementPosition( vehicle ) sound1 = playSound3D( "http://listen.radionomy.com/a-rockradio.m3u", x, y, z, true ) setSoundVolume( sound, 5 ) setSoundMaxDistance( sound, 10 ) end por que me da error en getElementPosition????? Segun veo hay errores , por ejemplo , no reproduce formato .m3u. , y seria playSound ... Link to comment
Arsilex Posted August 31, 2012 Author Share Posted August 31, 2012 sound = playSound3D( "http://listen.radionomy.com/radio--enigma.m3u", 487.89, -14.51, 1000.67, false ) setElementDimension( sound, 72 ) setElementInterior( sound, 17 ) setSoundVolume( sound, 3 ) setSoundMaxDistance( sound, 100 ) y esto si lo reproduce? PD: Mi problema es el getElementPosticion no lo de musica. Link to comment
NodZen Posted August 31, 2012 Share Posted August 31, 2012 sound = playSound3D( "http://listen.radionomy.com/radio--enigma.m3u", 487.89, -14.51, 1000.67, false ) setElementDimension( sound, 72 ) setElementInterior( sound, 17 ) setSoundVolume( sound, 0.5 ) setSoundMaxDistance( sound, 100 ) y esto si lo reproduce? Probalo asi... Link to comment
BorderLine Posted August 31, 2012 Share Posted August 31, 2012 Note: The only supported audio formats are MP3, WAV, OGG, RIFF, MOD, XM, IT and S3M. Link to comment
Arsilex Posted August 31, 2012 Author Share Posted August 31, 2012 y por que en la disco me funciona ? Link to comment
Arsilex Posted August 31, 2012 Author Share Posted August 31, 2012 de paso eso no es un adio formato es una web Link to comment
BorderLine Posted August 31, 2012 Share Posted August 31, 2012 pero si vos ejecutas un audio desde una web tambien debe ser con los formatos que soporta edit: Estas seguro ke entras al mismo interior y la misma dimencion ke le as puesto al sound? Link to comment
Arsilex Posted August 31, 2012 Author Share Posted August 31, 2012 Si entro en la disco y acabo de poner otra de esas fuera y funciona si no me crees ven a mi server Fort carson Role Play y lo miras tio Link to comment
Castillo Posted August 31, 2012 Share Posted August 31, 2012 Como ejecutas la funcion: "M1"? Link to comment
Arsilex Posted August 31, 2012 Author Share Posted August 31, 2012 addEventHandler ( "onClientGUIClick", Rock, M1, false ) Link to comment
Castillo Posted August 31, 2012 Share Posted August 31, 2012 Entonces 'thePlayer' no es un jugador, sino un argumento del evento ese. Tenes que usar 'localPlayer' function M1 ( ) local vehicle = getPedOccupiedVehicle ( localPlayer ) local x,y,z = getElementPosition( vehicle ) sound1 = playSound3D( "http://listen.radionomy.com/a-rockradio.m3u", x, y, z, true ) setSoundVolume( sound, 5 ) setSoundMaxDistance( sound, 10 ) end Link to comment
Arsilex Posted August 31, 2012 Author Share Posted August 31, 2012 como ago que cuando el vehicule se mueve que me siga el sound? Link to comment
BorderLine Posted August 31, 2012 Share Posted August 31, 2012 (edited) function M1 ( ) local vehicle = getPedOccupiedVehicle ( localPlayer ) local x,y,z = getElementPosition( vehicle ) sound = playSound3D( "http://listen.radionomy.com/a-rockradio.m3u", x, y, z, true ) setSoundVolume( sound, 5 )-- arriba lo abias definido como sound1 y setSoundVolume tenia sound. setSoundMaxDistance( sound, 10 ) end Edit: Creo que debes usar la funcion attachElement nose si me quivoco Edited August 31, 2012 by Guest Link to comment
Castillo Posted August 31, 2012 Share Posted August 31, 2012 como ago que cuando el vehicule se mueve que me siga el sound? attachElements Link to comment
Arsilex Posted August 31, 2012 Author Share Posted August 31, 2012 asi attachElements ( sound, vehicle, x, y, z ) Link to comment
Castillo Posted August 31, 2012 Share Posted August 31, 2012 function M1 ( ) local vehicle = getPedOccupiedVehicle ( localPlayer ) local x, y, z = getElementPosition( vehicle ) sound1 = playSound3D ( "http://listen.radionomy.com/a-rockradio.m3u", x, y, z, true ) setSoundVolume ( sound1, 5 ) setSoundMaxDistance ( sound1, 10 ) attachElements ( sound1, vehicle ) end Link to comment
Recommended Posts