Mimimiguel
Members-
Posts
146 -
Joined
-
Last visited
Everything posted by Mimimiguel
-
try addEventHandler( "OnElementClicked", pedvar, yourfunction )
-
Hello all, at first thanks for read it, another of my noobish questions, this: function actualizarPosicionSonido( sound, vehicle ) if sound and vehicle then x, y, z = getElementPosition( vehicle ) setElementPosition( sound, x, y, z ) end end function getSoundPath( id ) if id == 1 then return "http://salvajefm.com/modules/mod_ngs_shoutcast/singleplaylist.php?ip=94.75.209.28&port=8188&format=ASX" elseif id == 2 then return "http://194.169.201.177:8085/live3.mp3" elseif id == 3 then return "http://194.169.201.177:8085/liveDial.mp3" elseif id == 4 then return "http://194.169.201.177:8085/liveser.mp3" elseif id == 5 then return "http://rtve.stream.flumotion.com/rtve/radio1.mp3.m3u" elseif id == 7 then return "http://streaming.tst.es/stcasx/va90winlive2001/play.asx" end end sound = { [1] = {}, [2] = {}, [3] = {}, [4] = {}, [5] = {}, [6] = {}} addEvent( "playsound", true ) addEventHandler( "playsound", getRootElement(), function( veh, id, player ) if getElementData( player, "radio" ) == false then x, y, z = getElementPosition( veh ) path = getSoundPath( id ) sound[ player ] = playSound3D( path, x, y, z, false ) sound[1] = path sound[2] = x sound[3] = y sound[4] = z sound[5] = guiScrollBarGetScrollPosition (volumebar) / 50 sound[6] = setTimer( actualizarPosicionSonido, 50, 0, sound[player], getPedOccupiedVehicle( player ) ) setSoundMaxDistance( sound[player], maxdistance ) setElementData( player, "radio", true ) setSoundVolume( sound[player], sound[5] or 1 ) else stopSound( sound[ player ] ) sound[ player ] = nil sound[1] = nil sound[2] = nil sound[3] = nil sound[4] = nil sound[5] = nil killTimer( sound[6] ) sound[6] = nil setElementData( player, "radio", false ) end end ) returns: 'attempt to index global 'sound' ( a userdata value )' I did never had a error of this kind before so I don't know whats going on here
-
MTA:SA 1.1 Released: Harder, Better, Stronger, Faster
Mimimiguel replied to darkdreamingdan's topic in News
It isnt returning any error I'm trying to fix them but it is harder if I don't know where it is the error, as debugscript doesn't return anything. -
MTA:SA 1.1 Released: Harder, Better, Stronger, Faster
Mimimiguel replied to darkdreamingdan's topic in News
I did never have more bugs in my scripts than now, I dont know why but in 1.0.5 those scripts were working fine. The new features are nice, but if should be more stable imo. -
Did it and worked fine, thanks!
-
So instead of playSound3D( sound, x, y, z, false ) it should be for example playSound3D( "sound.mp3", x, y, z, false) ?
-
Well, the sync worked fine but I had another bug that i still couldnt solve: sound = {} addEvent( "playsound", true ) addEventHandler( "playsound", getRootElement(), function( veh, sound, player ) if getElementData( player, "radio" ) == false then x, y, z = getElementPosition( veh ) sound[ player ] = playSound3D( sound, x, y, z, false ) setTimer( actualizarPosicionSonido, 50, 0, sound, veh ) setSoundMaxDistance( sound, maxdistance ) setElementData( player, "radio", true ) else stopSound( sound[ player ] ) sound[ player ] = nil setElementData( player, "radio", false ) end end ) Returns: Attempt to index local 'sound' ( a string value )
-
Lets try it, ill post the results, thanks for the help.
-
Yes, but the event starts from a gui so what should i do? trigger the event from the gui to the server and then trigger it again to the client?
-
Yes, please, i think i take the idea but im not sure of how can i create a sound for everyone in clientside starting of a gui event. The idea its to use the playSound3D function, so when another player gets nearly the sound he can hear it.
-
Is there any way to do this? In my radio system only the one who's playing it can hear the sound, so, is there any way to make everyone hear it? Thanks
-
Cambia eso y debe funcionar.
-
Ponlo client-side, postea el meta.xml
-
Where is it located? I couldn't find it, if someone knows where it is, post it please The garage name is: 'SFPD Police Impound Garage'
-
The gamemode creates it automatically, it only need a database empty.
-
Client-side: function switchRadio( player ) if getElementData( player, "radiomtasa" ) == false then radio = playSound( "http://84.120.31.176:34977/VîrtualDJ.ogg", true ) setElementData( player, "radiomtasa", true ) else stopSound( radio ) setElementData( player, "radiomtasa", false ) end end addCommandHandler( "radio", switchRadio ) Si no funciona usa /debugscript 2 y pon los errores que te de.
-
Depende de para lo que lo quieras usar es más fácil de una manera u otra, para los markers es más simple la primera pero más coñazo, puedes hacer una tabla con las posiciones x, y, z; y aún más datos si quieres y luego hacer un 'for' con lo que creas los markers de una tirada. Queda bien hacer lo de los markers con una tabla de SQL y obtener de ahí los datos.
-
Como reducir fps?
Mimimiguel replied to HistoriaConVos's topic in Ayuda relacionada al cliente/servidor
Abre todos los programas que puedas -
check out community.multitheftauto.com
-
basicamente nos estas diciendo que te los hagamos, si fuese ayudar por lo menos lo intentarías
-
no sería mas facil el comando en el clientside directamente y quitar unas líneas? si tienes miedo de que te lo roben usa un compilador y ya está
-
y por que no: