Jump to content

Shuubaru

Members
  • Posts

    41
  • Joined

  • Last visited

About Shuubaru

  • Birthday 06/06/1995

Details

  • Gang
    [?] Incognito

Recent Profile Visitors

2,082 profile views

Shuubaru's Achievements

Rat

Rat (9/54)

7

Reputation

  1. much love to Alex for his wheel scale functions, seriously you made life happier for modders and of course, huge thanks to mta team and contributors!!
  2. Not sure if it is possible but it'd be wonderful if we can to select specific objects in screen by making a border selection like in blender:
  3. Thanks for the answer, it'll be nice to have that feature. I'm currently using it and works really good! Thanks for sharing it!
  4. Awesome! I built my server using your very very first version of the mgm, it got a lot of bugs but was also a nice start to me since thanks to it a learned a lot of scripting and new scripting techniques. It's nice to see you are releasing now a really improved version.
  5. Just a quick question, what about ACL users that have no access to resources and such, those options are also limited on the software when loggin?
  6. Creo que ahi dice bien claro cual era mi problema con los zips: el modulo para extraerlos generaba un loop gigantesco el cual MTA aborta. Con la ayuda de un par de tutoriales de coroutines logre hacerlo. Mi intencion era hacer un sistema de subida de archivos de la mano con dropbox, la verdad dudo que alguien alguna vez implemente esto por 3 razones algo triviales, la primera es el uso de CPU para extraer archivos de mas de 2mb, la segunda que para los jugadores esto podria ser algo tedioso (sobretodo para el jugador promedio de MTA que se le rompe el mundo cuando un server pesa mas de 20mb), y la tercera que la mayoria usan subidas desde las web de los servidores y se ahorran todo este trabajo. Esto en todo caso no fue mas que un experimento para ver si es que era posible hacer todo este sistema, y vaya que lo fue.
  7. ya logre solucionarlo, porfa cierren el tema! por alguna razon ya no puedo editarlo
  8. Hola buenas, a falta de la necesidad de un descompresor de archivos zip en mta (lo cual me sorprende que en pleno 2018 aun no tenga uno), me vi en la obligacion de usar una libreria existente. Necesito saber como reescribir parte de la funcion getb() puesto que el loop que genera en archivos superiores a 2mb puede llegar a ser realmente gigantesco y MTA por consiguiente termina abortandolo. He visto que hay formas de hacerlo con coroutines (pausandolas y resumiendolas), pero no logro entender como adaptar parte de las funciones que estan dentro de la funcion principal, puesto que estan en OOP, lo cual para mi sigue siendo medio chino. Ojalas me puedan echar una mano con esto, mas alla de que parte del codigo ya haya estado hecho, la verdad es que me tomo bastante tiempo adaptarlo a las funciones de MTA y escribir todo el resto, horas y horas de testeo. Se tambien que con debug.setHook(nil) se pueden forzar loops largos pero el lag que generaria realmente no lo compensa. -- file = string obtenido desde fileRead local function bitstream_init(file) local bs = { file = file, buf = nil, len = nil, pos = 1, b = 0, n = 0, } function bs:flushb(n) self.n = self.n - n self.b = bitRShift(self.b,n) end function bs:getb(n) while self.n < n do if self.pos > self.len then self.buf = self.file:read(4096) self.len = self.buf:len() self.pos = 1 end self.b = self.b + bitLShift(self.buf:byte(self.pos),self.n) self.pos = self.pos + 1 self.n = self.n + 8 end local ret = bitAnd(self.b,bitLShift(1,n)-1) self.n = self.n - n self.b = bitRShift(self.b,n) return ret end function bs:getv(hufftable,n) while self.n < n do if self.pos > self.len then self.buf = self.file:read(4096) self.len = self.buf:len() self.pos = 1 end self.b = self.b + bitLShift(self.buf:byte(self.pos),self.n) self.pos = self.pos + 1 self.n = self.n + 8 end local h = reverse[bitAnd(self.b,255)] local l = reverse[bitAnd(bitRShift(self.b,8),255)] local v = bitAnd(bitRShift(bitLShift(h,8)+l,16-n),bitLShift(1,n)-1) local e = hufftable[v] local len = bitAnd(e,15) local ret = bitRShift(e,4) self.n = self.n - len self.b = bitRShift(self.b,len) return ret end function bs:close() if self.file then self.file:close() end end if type(file) == "string" then bs.file = nil bs.buf = file end bs.len = bs.buf:len() return bs end Gracias de antemano!
  9. Usa el map editor de GTA, ubica el objeto y ya tendras la ID para eliminarlo.
  10. Well, it's seems the problem was that executeBrowserJavascript function was called first, before that the page itself were loaded... I've used a timer to call that function in 2 seconds and now it does work in the way I want: setTimer(executeBrowserJavascript,2000,1,theBrowser, "document.getElementById('UsernameInput').value = '"..username.."';") setTimer(executeBrowserJavascript,2000,1,theBrowser, "document.getElementById('PasswordInput').value = '"..password.."';")
  11. Hello, I'm having some problems with this functions as I'm not familiar with javascript, I'm working with a HTML login which is almost done except for one thing, the user data saving. I've seen some "examples" about the use of javascript in login panels and follow the examples didn't work in any way. I just want to load the username and password from some xml and then autofilling them on the login panel, like this: This is what I tried: HTML <form action="javascript:loginTrigger()" method="post"> <input id="UsernameInput" type="text" class="username" placeholder="Username"> <input id="PasswordInput" type="password" class="password" placeholder="Password"> <button type="submit" class="log_button">Login</button> <div class="error"><span style="color:#999">+</span></div> </form> LUA username = magicalFunctionThatLoadTheUsername() password = magicalFunctionThatLoadThePassword() executeBrowserJavascript(theBrowser, 'document.getElementById("UsernameInput").val = "'..username..'";') executeBrowserJavascript(theBrowser, 'document.getElementById("PasswordInput").val = "'..password..'";') I'm not experienced with javascript (as you can obviously see) but I don't really get why it does not work as I'm follow the same steps as other examples I've seen around the web.
  12. Official stuff will never return sound.
  13. Does anybody knows about a good youtube api? Please refrain to say "youtubeinmp3" (returned links from fetchRemote don't work) or "youtubemp3script" (you need an api key, and they never answer the emails asking for an api key).
×
×
  • Create New...