Jump to content

Arsilex

Members
  • Posts

    1,410
  • Joined

  • Last visited

Everything posted by Arsilex

  1. Para que la función se repita automáticamente sin necesidad de re-ejecutarla de nuevo mediante esa linea así hasta que no encuentre un área libre la función seguirá ejecutándose repeat until no serviria? Si, seriviria pero yo suelo usar while local Area1 = createRadarArea ( 325,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area1Col = createColRectangle ( 325,-4046, 150, 150 ) --- GREEN local Area2 = createRadarArea ( 325+150,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area2Col = createColRectangle ( 325+150,-4046, 150, 150 ) --- GREEN localArea3 = createRadarArea ( 325+300,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area3Col = createColRectangle ( 325+300,-4046, 150, 150 ) --- GREEN localArea4 = createRadarArea ( 325+450,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area4Col = createColRectangle ( 325+450,-4046, 150, 150 ) --- GREEN local Area5 = createRadarArea ( 325+600,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area5Col = createColRectangle ( 325+600,-4046, 150, 150 ) --- GREEN local Area6 = createRadarArea ( 325,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area6Col = createColRectangle ( 325,-4046+150, 150, 150 ) --- GREEN local Area18 = createRadarArea ( 325+150,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area18Col = createColRectangle ( 325+150,-4046+150, 150, 150 ) --- RED local Area20 = createRadarArea ( 325+300,-4046+150, 150, 150, 0, 0, 0, 255 ) --- CENTRO Area20Col = createColRectangle ( 325+300,-4046+150, 150, 150 ) --- CENTRO local Area19 = createRadarArea ( 325+450,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area19Col = createColRectangle ( 325+450,-4046+150, 150, 150 ) --- RED local Area7 = createRadarArea ( 325+600,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area7Col = createColRectangle ( 325+600,-4046+150, 150, 150 ) --- GREEN local Area8 = createRadarArea ( 325,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area8Col = createColRectangle ( 325,-4046+300, 150, 150 ) --- GREEN local Area15 = createRadarArea ( 325+150,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area15Col = createColRectangle ( 325+150,-4046+300, 150, 150 ) -- Yellow local Area16 = createRadarArea ( 325+300,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area16Col = createColRectangle ( 325+300,-4046+300, 150, 150 ) -- Yellow local Area17 = createRadarArea ( 325+450,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area17Col = createColRectangle ( 325+450,-4046+300, 150, 150 ) -- Yellow local Area9 = createRadarArea ( 325+600,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area9Col = createColRectangle ( 325+600,-4046+300, 150, 150 ) --- GREEN local Area10 = createRadarArea ( 325,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area10Col = createColRectangle ( 325,-4046+450, 150, 150 ) --- GREEN local Area11 = createRadarArea ( 325+150,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area11Col = createColRectangle ( 325+150,-4046+450, 150, 150 ) --- GREEN local Area12 = createRadarArea ( 325+300,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area12Col = createColRectangle ( 325+300,-4046+450, 150, 150 ) --- GREEN local Area13 = createRadarArea ( 325+450,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area13Col = createColRectangle ( 325+450,-4046+450, 150, 150 ) --- GREEN local Area14 = createRadarArea ( 325+600,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area14Col = createColRectangle ( 325+600,-4046+450, 150, 150 ) --- GREEN local randomSpawnTable = { Area1, Area2, Area3, Area4, } function ComenzarAreasGreen () while true do local RandomArea = randomSpawnTable [ math.random(1, #randomSpawnTable) ] if not( isRadarAreaFlashing ( RandomArea ) ) then setRadarAreaFlashing ( RandomArea, true ) break end end end addCommandHandler("lol", function() ComenzarAreasGreen() end) acabo de probarlo y funciona bien.
  2. local Area1 = createRadarArea ( 325,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area1Col = createColRectangle ( 325,-4046, 150, 150 ) --- GREEN local Area2 = createRadarArea ( 325+150,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area2Col = createColRectangle ( 325+150,-4046, 150, 150 ) --- GREEN localArea3 = createRadarArea ( 325+300,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area3Col = createColRectangle ( 325+300,-4046, 150, 150 ) --- GREEN localArea4 = createRadarArea ( 325+450,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area4Col = createColRectangle ( 325+450,-4046, 150, 150 ) --- GREEN local Area5 = createRadarArea ( 325+600,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area5Col = createColRectangle ( 325+600,-4046, 150, 150 ) --- GREEN local Area6 = createRadarArea ( 325,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area6Col = createColRectangle ( 325,-4046+150, 150, 150 ) --- GREEN local Area18 = createRadarArea ( 325+150,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area18Col = createColRectangle ( 325+150,-4046+150, 150, 150 ) --- RED local Area20 = createRadarArea ( 325+300,-4046+150, 150, 150, 0, 0, 0, 255 ) --- CENTRO Area20Col = createColRectangle ( 325+300,-4046+150, 150, 150 ) --- CENTRO local Area19 = createRadarArea ( 325+450,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area19Col = createColRectangle ( 325+450,-4046+150, 150, 150 ) --- RED local Area7 = createRadarArea ( 325+600,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area7Col = createColRectangle ( 325+600,-4046+150, 150, 150 ) --- GREEN local Area8 = createRadarArea ( 325,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area8Col = createColRectangle ( 325,-4046+300, 150, 150 ) --- GREEN local Area15 = createRadarArea ( 325+150,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area15Col = createColRectangle ( 325+150,-4046+300, 150, 150 ) -- Yellow local Area16 = createRadarArea ( 325+300,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area16Col = createColRectangle ( 325+300,-4046+300, 150, 150 ) -- Yellow local Area17 = createRadarArea ( 325+450,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area17Col = createColRectangle ( 325+450,-4046+300, 150, 150 ) -- Yellow local Area9 = createRadarArea ( 325+600,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area9Col = createColRectangle ( 325+600,-4046+300, 150, 150 ) --- GREEN local Area10 = createRadarArea ( 325,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area10Col = createColRectangle ( 325,-4046+450, 150, 150 ) --- GREEN local Area11 = createRadarArea ( 325+150,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area11Col = createColRectangle ( 325+150,-4046+450, 150, 150 ) --- GREEN local Area12 = createRadarArea ( 325+300,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area12Col = createColRectangle ( 325+300,-4046+450, 150, 150 ) --- GREEN local Area13 = createRadarArea ( 325+450,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area13Col = createColRectangle ( 325+450,-4046+450, 150, 150 ) --- GREEN local Area14 = createRadarArea ( 325+600,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area14Col = createColRectangle ( 325+600,-4046+450, 150, 150 ) --- GREEN local randomSpawnTable = { Area1, Area2, Area3, Area4, } function ComenzarAreasGreen () while true do local RandomArea = randomSpawnTable [ random ] if not( isRadarAreaFlashing ( RandomArea ) ) then setRadarAreaFlashing ( RandomArea, true ) break end end end setTimer(ComenzarAreasGreen,15000,0)
  3. Por que haces un while? Para que la función se repita automáticamente sin necesidad de re-ejecutarla de nuevo mediante esa linea así hasta que no encuentre un área libre la función seguirá ejecutándose
  4. local Area1 = createRadarArea ( 325,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area1Col = createColRectangle ( 325,-4046, 150, 150 ) --- GREEN local Area2 = createRadarArea ( 325+150,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area2Col = createColRectangle ( 325+150,-4046, 150, 150 ) --- GREEN localArea3 = createRadarArea ( 325+300,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area3Col = createColRectangle ( 325+300,-4046, 150, 150 ) --- GREEN localArea4 = createRadarArea ( 325+450,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area4Col = createColRectangle ( 325+450,-4046, 150, 150 ) --- GREEN local Area5 = createRadarArea ( 325+600,-4046, 150, 150, 0, 255, 0, 100 ) --- GREEN Area5Col = createColRectangle ( 325+600,-4046, 150, 150 ) --- GREEN local Area6 = createRadarArea ( 325,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area6Col = createColRectangle ( 325,-4046+150, 150, 150 ) --- GREEN local Area18 = createRadarArea ( 325+150,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area18Col = createColRectangle ( 325+150,-4046+150, 150, 150 ) --- RED local Area20 = createRadarArea ( 325+300,-4046+150, 150, 150, 0, 0, 0, 255 ) --- CENTRO Area20Col = createColRectangle ( 325+300,-4046+150, 150, 150 ) --- CENTRO local Area19 = createRadarArea ( 325+450,-4046+150, 150, 150, 255, 0, 0, 100 ) --- RED Area19Col = createColRectangle ( 325+450,-4046+150, 150, 150 ) --- RED local Area7 = createRadarArea ( 325+600,-4046+150, 150, 150, 0, 255, 0, 100 ) --- GREEN Area7Col = createColRectangle ( 325+600,-4046+150, 150, 150 ) --- GREEN local Area8 = createRadarArea ( 325,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area8Col = createColRectangle ( 325,-4046+300, 150, 150 ) --- GREEN local Area15 = createRadarArea ( 325+150,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area15Col = createColRectangle ( 325+150,-4046+300, 150, 150 ) -- Yellow local Area16 = createRadarArea ( 325+300,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area16Col = createColRectangle ( 325+300,-4046+300, 150, 150 ) -- Yellow local Area17 = createRadarArea ( 325+450,-4046+300, 150, 150, 255,255,0, 100 ) -- Yellow Area17Col = createColRectangle ( 325+450,-4046+300, 150, 150 ) -- Yellow local Area9 = createRadarArea ( 325+600,-4046+300, 150, 150, 0, 255, 0, 100 ) --- GREEN Area9Col = createColRectangle ( 325+600,-4046+300, 150, 150 ) --- GREEN local Area10 = createRadarArea ( 325,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area10Col = createColRectangle ( 325,-4046+450, 150, 150 ) --- GREEN local Area11 = createRadarArea ( 325+150,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area11Col = createColRectangle ( 325+150,-4046+450, 150, 150 ) --- GREEN local Area12 = createRadarArea ( 325+300,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area12Col = createColRectangle ( 325+300,-4046+450, 150, 150 ) --- GREEN local Area13 = createRadarArea ( 325+450,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area13Col = createColRectangle ( 325+450,-4046+450, 150, 150 ) --- GREEN local Area14 = createRadarArea ( 325+600,-4046+450, 150, 150, 0, 255, 0, 100 ) --- GREEN Area14Col = createColRectangle ( 325+600,-4046+450, 150, 150 ) --- GREEN local randomSpawnTable = { {Area1}, {Area2}, {Area3}, {Area4}, } function ComenzarAreasGreen () while true do local RandomArea = randomSpawnTable [ random ] if not( isRadarAreaFlashing ( RandomArea ) ) then setRadarAreaFlashing ( RandomArea, true ) break end end end setTimer(ComenzarAreasGreen,15000,0) Prueba esto.
  5. function verlec(client) local leccionboss = math.random (1,3) if leccionboss == 1 then outputChatBox ("eleccion 1 hecha",client, 0, 255, 0) elseif leccionboss == 2 then outputChatBox ("eleccion 2 hecha",client, 0, 255, 0) else outputChatBox ("eleccion 3 hecha",client, 0, 255, 0) end end addCommandHandler ( "eleccion", verlec)
  6. How the gamemode "paradise" is a public gamemode this modificacion of it will be public to i dont what that guys sell this Gamemode and get money and say that he created it: https://www.dropbox.com/s/dy11ztarzrd6gd5/RC.zip?dl=0 There is it. For u all
  7. That gamemode was created by me and Mr.Aleks so i dont think u have it and i dont think u have permission to sell it. First video release from the gamemode.
  8. Arsilex

    [DX] Problema

    Aquí te dejo mi dxEdit de mi librería personal no estoy seguro de si funciona al 100% separado de ella entera pero si falla algo avísame jeje local sX, sY = guiGetScreenSize() local event = false local edits = {} function drawCompontentes() for i, data in ipairs(edits) do if data.active == false then dxDrawEdit(data.x, data.y, data.w, 32, data.text, data.empty) else dxDrawEdit(data.x, data.y, data.w, 32, data.text, false) end if getKeyState("mouse1") then if isCursorHover(data.x, data.y, data.w, 32) then data.active = true else data.active = false end end if data.tick > 0 and getKeyState("backspace") then if data.bfase == 0 and (getTickCount() - data.tick > 500) then data.text = string.sub(data.text,1,string.len(data.text)-1) data.tick = getTickCount() data.bfase = 1 elseif data.bfase == 1 and (getTickCount() - data.tick > 50) then data.text = string.sub(data.text,1,string.len(data.text)-1) data.tick = getTickCount() end end if data.active then local textEnd = (dxGetTextWidth ( data.text, 0.5, getMainFont() ) + 3) > data.w and (data.w) or dxGetTextWidth ( data.text, 0.5, getMainFont() ) + 3 dxDrawLine(data.x + textEnd, data.y + 1, data.x + textEnd, data.y + 30,tocolor(0,0,0,255),1) end edits[k] = data end end function dxCreateEdit(x, y, w, h, text, empty) if x and y and w and h then local edit = createElement ( "dxEdit" ) if edit then local data = {} data.x = x data.y = y data.w = w data.h = h data.text = text or "" data.active = false data.tick = 0 data.bfase = 0 data.hover = false data.empty = empty or "" data.img = img or false edits[edit] = data if not event then addEventHandler("onClientRender", root, drawCompontentes) addEventHandler("onClientCharacter", getRootElement(), updateEdits) event = true end return edit else outputDebugString("dxLib: Can't create the element.") end else outputDebugString("dxLib: Wrong arguments defined on dxEdit.") end return false end function dxDrawEdit(x, y, w, h, text, empty) --local color = c and {230, 230, 230} or {200, 200, 200} dxDrawRectangle ( x, y, w, 32 tocolor (150, 150, 150, 255) ) --shodow(x, y, w, h, {1, 1, 1, 1}, {0, 0, 0}) if dxGetTextWidth ( text, 0.5, getMainFont() ) > w then alignX = "right" else alignX = "left" end dxDrawText( text or "", x + 2, y, w - 2 + x, y + 32, tocolor(0,0,0,255), 0.5, getMainFont(), alignX, "center", true, false ) if #text == 0 and empty then dxDrawText( empty, x + 2, y, w - 2 + x, y + 32, tocolor(0,0,0,255), 0.5, getMainFont(), alignX, "center", true, false ) end end function dxDestroyed() if getElementType(source) == "dxEdit" then edits[source] = nil if #getElementsByType("dxEdit") - 1 <= 0 then removeEventHandler("onClientRender", root, drawCompontentes) removeEventHandler("onClientCharacter", getRootElement(), updateEdits) event = false end end end addEventHandler("onClientElementDestroy", root, dxDestroyed) function updateEdits(character) for i,k in pairs(edits) do local data = k if data.active then data.text = data.text..""..character edits[i] = data end end end function updateEditsKey(button, press) if button == "backspace" then for i,k in pairs(edits) do local data = k if data.active then if press then data.text = string.sub(data.text,1,string.len(data.text)-1) data.tick = getTickCount() data.bfase = 0 edits[i] = data else data.tick = 0 data.bfase = 0 edits[i] = data end end end end end addEventHandler("onClientKey", root, updateEditsKey) function getEditText(element) if getElementType(element) == "dxEdit" then return edits[element].text end return false end Syntax: element dxCreateEdit(x float, y float, w float, h float, text string, empty string) Ejemplo: local edit = dxCreateEdit(0, 0, 20, 20, "AsuS", "Nombre de usuario") Y sobre lo de la función de movimiento básicamente funciona poniendo 4 posiciones 1º La posición donde esta la camera. 2º La posición a donde mira. 3º La posición donde debe quedar la camera. 4º La posición donde debe mirar la camera. Es algo básico esa función así que si quieres te dejo mi función con posibilidad de poner muchos movimientos a la vez sin tener que usar ningún tipo de timers ni nada de eso ya sabes donde encontrarme
  9. Ya eh solucionado mi problema. Pueden cerrar el tema.
  10. Se perfectamente para que sirve el interplate y la cosa es que poniendo valores grandes como puede ser 10 segundo el progress aun va por 0.01 pero ya llego al máximo de conteo osea si pongo local x, y, z = interpolateBetween ( x, y, z, data[1], data[2], data[3], progress, "Linear") x, y, z ya llegaron al data[1] .... y el progress aun sigue contando por que le falta como 0.9 para llegar a 1 osea que va por 0.1 o menos.
  11. Se perfectamente para que sirve el interplate y la cosa es que poniendo valores grandes como puede ser 10 segundo el progress aun va por 0.01 pero ya llego al máximo de conteo osea si pongo local x, y, z = interpolateBetween ( x, y, z, data[1], data[2], data[3], progress, "Linear") x, y, z ya llegaron al data[1] .... y el progress aun sigue contando por que le falta como 0.9 para llegar a 1 osea que va por 0.1 o menos.
  12. Tengo una pequeña duda para que sirve el progress de esta función me refiero. No ralentiza el movimiento o lo acelera no hace que termine de contar cuando llegue a 1 ( aveces termina hasta con llegar a 0.01) influye de alguna manera esa variable en la velocidad de la animación? Por que después de unas pruebas eh recibiendo esto: Y con esto me refiero es el progreso cuando la animación que yo ejecutaba ya había terminado. Ya soy consciente de que si pongo local endTime = tick + 50 La animación termina antes pero y si yo quiero que la animación dure un rato mas alguna manera de hacerlo?
  13. I think the only one way is don't use stealed gamemodes.
  14. Hello guys today i'm working on a dxGirdlist but i have some problem i need help whit clip attribute can anyone explain me how i need to use it?
  15. Hay algunos en la comunidad de mta https://community.multitheftauto.com/
  16. MODULE: Unable to load modules/mta_mysql.so (mods/deathmatch/modules/mta_mysql.so: wrong ELF class: ELFCLASS32)! can anyone tell me why i have that error? I'm using CentOS 6 x64 bits.
  17. Arsilex

    XML

    This script need to get the information from the meta.xml like script linked to they and download all that after whit loader load the code from .lua
  18. Arsilex

    XML

    Lo que estoy haciendo es un resource de descarga y cargado de código mediante un sistema diferente al de mta y el "m" elemento es un element: xasdas13 osea un nodo basicamente el primer nodo que viene siendo info esta bien en cambio el de
  19. Arsilex

    XML

    yes that works if the is the same script but i used this line to read the meta.xml from another resource.
  20. Arsilex

    XML

    <?xml version="1.0"?> type="script" version="1.0.0" author="AsuS" name="Test"/>
  21. Arsilex

    XML

    i try to do this: for i, m in ipairs(metaChildern) do outputChatBox(tostring(xmlNodeGetName(m))) and i have this: info false false false false false
  22. Arsilex

    XML

    for i, m in ipairs(metaChildern) do m return a node. if you dont see the outputDebugString is under local metaChildern = xmlNodeGetChildren(metaXML) so this need to return table if i will put the outputDebugString into a loop i will get a node and i get it but the script make a error.
  23. Arsilex

    XML

    There is the return of the outputDebugString: meta: userdata: 0x100ff18 xmlNodeGetChildren: table: 0x1641870
  24. Arsilex

    XML

    Hello guys i have this code: local metaXML = xmlLoadFile(":"..path.."/meta.xml") if metaXML then for i, m in ipairs(xmlNodeGetChildren(metaXML)) do local metaXMLName = xmlNodeGetName(m) but i have this error: i'm sure that the "m" argument is a node-xml element.
  25. Arsilex

    XML

    Bueno puesto yo tengo esto: local metaXML = xmlLoadFile(":"..path.."/meta.xml") if metaXML then for i, m in ipairs(xmlNodeGetChildren(metaXML)) do local metaXMLName = xmlNodeGetName(m) la cosa es que me dice esto: y si m es un elemento (userdata: 0x100ff23)
×
×
  • Create New...