Arsilex Posted August 31, 2012 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?????
NodZen Posted August 31, 2012 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 ...
Arsilex Posted August 31, 2012 Author 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.
NodZen Posted August 31, 2012 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...
BorderLine Posted August 31, 2012 Posted August 31, 2012 Note: The only supported audio formats are MP3, WAV, OGG, RIFF, MOD, XM, IT and S3M.
Arsilex Posted August 31, 2012 Author Posted August 31, 2012 de paso eso no es un adio formato es una web
BorderLine Posted August 31, 2012 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?
Arsilex Posted August 31, 2012 Author 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
Arsilex Posted August 31, 2012 Author Posted August 31, 2012 addEventHandler ( "onClientGUIClick", Rock, M1, false )
Castillo Posted August 31, 2012 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
Arsilex Posted August 31, 2012 Author Posted August 31, 2012 como ago que cuando el vehicule se mueve que me siga el sound?
BorderLine Posted August 31, 2012 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
Castillo Posted August 31, 2012 Posted August 31, 2012 como ago que cuando el vehicule se mueve que me siga el sound? attachElements
Arsilex Posted August 31, 2012 Author Posted August 31, 2012 asi attachElements ( sound, vehicle, x, y, z )
Castillo Posted August 31, 2012 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
Recommended Posts