Sergioks Posted January 12, 2014 Share Posted January 12, 2014 Hola, Tengo Una Duda... ¿ Como Hago para que Los Sonidos que se reproduzcan con PlaySound3D Solo lo escuche el que lo ejecutó ? Osea, Como Hago para que El usuario que Puso la URL, sea el unico que la oiga, y que la musica lo siga, y no se quede en un solo sitio. ¿ se puede eso ? si se puede.. ¿ podrian decirme como, o con que Codigos ? Gracias. Link to comment
MTA Team 0xCiBeR Posted January 12, 2014 MTA Team Share Posted January 12, 2014 Para eso mejor usa: playSound EJ: function sonido(jugador,cmd,url) if url then playSound(url) end end addCommandHandler("url",sonido)--El comando seria /url [LINK AL SONIDO] Link to comment
Sergioks Posted January 12, 2014 Author Share Posted January 12, 2014 Para eso mejor usa: playSound EJ: function sonido(jugador,cmd,url) if url then playSound(url) end end addCommandHandler("url",sonido)--El comando seria /url [LINK AL SONIDO] ¡Gracias! Link to comment
MTA Team 0xCiBeR Posted January 12, 2014 MTA Team Share Posted January 12, 2014 De nada. Link to comment
Alexs Posted January 13, 2014 Share Posted January 13, 2014 Para eso mejor usa: playSound EJ: function sonido(jugador,cmd,url) if url then playSound(url) end end addCommandHandler("url",sonido)--El comando seria /url [LINK AL SONIDO] Una pequeña corrección: Los parámetros de las funciones manejadas por 'addCommandHandler' en client-side son el comando y los argumentos. Handler function parametersThese are the parameters for the handler function that is called when the command is used. Client string commandName, [string arg1, string arg2, ...] - commandName: The name of the command triggered. This is useful if multiple commands go through one function. - arg1, arg2, ...: Each word after command name in the original command is passed here in a seperate variable. If there is no value for an argument, its variable will contain nil. You can deal with a variable number of arguments using the vararg expression, as shown in Server Example 2 below. Link to comment
MTA Team 0xCiBeR Posted January 13, 2014 MTA Team Share Posted January 13, 2014 function sonido(cmd,url) if url then playSound(url) end end addCommandHandler("url",sonido)--El comando seria /url [LINK AL SONIDO] Link to comment
Sergioks Posted January 14, 2014 Author Share Posted January 14, 2014 cierto, aunque yo solo use: function() url = guiGetText (musicurl) if url then playSound (url) end end porque iva a usarlo en un boton, no comando jeje Link to comment
Recommended Posts