Jump to content

MaurO^

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by MaurO^

  1. this example is from the wiki: local start = getTickCount() function dxDrawLoading (x, y, width, height, x2, y2, size, color, color2, second) local now = getTickCount() local seconds = second or 5000 local color = color or tocolor(0,0,0,170) local color2 = color2 or tocolor(255,255,0,170) local size = size or 1.00 local with = interpolateBetween(0,0,0,width,0,0, (now - start) / ((start + seconds) - start), "Linear") local text = interpolateBetween(0,0,0,100,0,0,(now - start) / ((start + seconds) - start),"Linear") dxDrawText ( "Loading ... "..math.floor(text).."%", x2, y2 , width, height, tocolor ( 0, 255, 0, 255 ), size, "pricedown" ) dxDrawRectangle(x, y ,width ,height -10, color) dxDrawRectangle(x, y, with ,height -10, color2) end for use: sx ,sy = guiGetScreenSize() function dxLoad () local now = getTickCount() dxDrawLoading(196*sx/800, 482*sy/600,422*sx/800, 58*sy/600, 196*sx/800 , 450*sy/600 ,1.00*sx/800,tocolor(0,0,0,170),tocolor(0,255,0,170),10000) if now > start + 10000 then start = getTickCount() outputChatBox("Done Downloading",0,255,0) removeEventHandler("onClientRender",root,dxLoad) end end addEventHandler("onClientRender",root,dxLoad)
  2. function onResourceStart() local sound = playSound("sounds/respiracion.ogg", true) setSoundMaxDistance(sound, 20) end addEventHandler("onClientResourceStart", root, onResourceStart)
  3. Puede que el problema sea del acl, añade un nuevo usuario al acl y verifica que tu nick en mta sea el mismo que el usuario agregado a dicho acl al momento de registar la cuenta.
  4. si no te sirve prueba entrar de nuevo a mtaserver.conf y dejar esto asi en auth <auth_serial_groups>Admin</auth_serial_groups> luego abre tu sv y en la consola escribe lo siguente authserial "nombre de tu cuenta" (sin las comillas) y presiona enter
  5. Entra a mtaserver.conf y en auth serial dejalo así: <auth_serial_groups> </ auth_serial_groups>
  6. https://community.multitheftauto.com/index.php?p=resources&s=details&id=2540
  7. Te dejo acá un tutorial echo por Anzo usando elementData:
  8. ¿las posiciones donde se crea el radar área las tenes en un archivo .map?
  9. https://scriptingmtasa.wordpress.com/2014/11/05/tutorial-19-centrar-paneles-guis-dxdraw-imagenes-etc/
  10. MaurO^

    ayuda con esto

    @aka Blue Gracias era justamente ese mi problema
  11. Hola nesecito que me ayuden porque al momento de subir a un coche para que me diga su estado me tira números muy largos EJ: si el vehículo esta en 100% me dice que esta en 1000% y si esta en menos de 100% me tira un numero mucho mas largo. addEventHandler("onClientRender", root, function() vehicle = getPedOccupiedVehicle( localPlayer ) local estado = getElementHealth( vehicle ) if vehicle then dxDrawText("Estado: "..estado, 393, 10, 551, 29, tocolor(0, 255, 0, 255), 1.20, "sans", "left", "top", false, false, false, false, false) end end)
  12. MaurO^

    Duda!

    Hola quiero saber como se hace para que un texto solo salga una vez ej: function texto() outputChatBox("Hola") end addEventHandler("onClientGUIClick", button1, texto, false) osea si yo le doy al button 1 varias veces me saldran muchos textos diciendo "hola" yo quisiera saber si al presionar el button 1 ese texto solo lo diga una sola vez.
  13. Ayuda soy nuevo en esto y no se porque me sale este error "attempt to compare number with boolean" aca dejo el codigo: server-side function darArma() if getPlayerMoney(source) >= 200 then giveWeapon(source, 24, 20) takePlayerMoney(source, 200) else outputChatBox("No tienes suficiente dinero para comprar esta arma.") end end addEvent("onGet", true) addEventHandler("onGet", root, darArma)
  14. MaurO^

    Aprender lua

    @Cuboy Por casualidad tu no juegas a un server llamado Proyecto sx? he visto un player llamado así dentro de el :v
  15. @aka Blue si, olvide de poner el x, y, z en variable local. respecto al jugador lo entendí como que el mismo quería moverse ya que no vi ningún tipo objeto al cual mover.
  16. function key(thePlayer) x, y, z = getElementPosition(thePlayer) setElementPosition(thePlayer, x+1, y, z) end for i, v in ipairs (getElementsByType("player")) do bindKey(v, "w", "down", key) end
  17. ayuda quiero saber como puedo hacer que un robo de tienda/etc tenga cupos, es decir que en el robo de tienda solo se pueda hacer de un máximo de 5 jugadores. ¡GRACIAS!
×
×
  • Create New...