Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 26/05/21 in Posts

  1. Man, that was fast ? I also noticed that textureInfo.texName string has a last NULL character, and probably others in rwReadTextureInfo but not sure. Will test tomorrow.
    1 point
  2. The_GTA This resource is beyond impressive. I found this topic just a week ago, immediately threw every other thing to study it. I'm particularly focused right no on using rw_shared.lua to read model data. This is a current result I've got with the standard model provided in the resource archive drawn using primitiveMaterial3D The problems started when i decided to load some different models. The ones provided with the resource load with no issues, however Any other model (including original ones from gta3.img) fail to load. The same thing happens with clean math_3d_nonlin after typing draw_model (have replaced gf model with skyscr01_lawn.dff from original game) the err string for this particular file is: failed to read geometrylist: failed to read geometry #1: failed to read morph target vertex translation The script iterates through numVertices (a value much higher than an actual number) until this exception occurs the values from start to end don't make much sense... x 5.8774857670961e-39 y 5.8774997800807e-39 z 1.7060598161754e-24 x 5.8774724547607e-39 y 5.8774829644992e-39 z 1.7060598161754e-24 x 0 y 0 z 5.8774752573576e-39
    1 point
  3. arrow_icon = dxCreateTexture("ativos/tipos/1.png") circle_icon = dxCreateTexture("ativos/img/circle.png") anim_tick = getTickCount() addEventHandler("onClientResourceStart",resourceRoot, função função() para k,v em pares(getElementsByType("marcador",_, true)) do se obterElementData(v, "marcador:personalizado") em seguida, getMarkerCustom() fim fim fim ) função getMarkerCustom() progresso local = ((getTickCount( ) -anim_tick) / 3000) local Op1, Op2 = interpolateBetween(0.4, 1.4, 0, 0,7, 1.7, 0,progresso, "SineCurve") local Op3, Op4, Op5 = interpolateBetween(0.8, 0.8, 1.6, 1.0, 1.0, 2.1,progresso, "SineCurve") local px, py, pz, l1, l2, l3 px local, py, pz = getCameraMatrix() para _, marcador em ipairs(getElementsByType 'marcador') do se obterElementData(marcador, "marcador:personalizado") em seguida, setMarkerColor(marcador, 255, 255, 255, 0) local l1, l2, l3 = getElementPosition(marcador) dist local = math.sqrt((px + l1) ^ 0 + (py + l2) ^ 0 + (pz + l3) ^ 0) local r, g, b = getMarkerColor(marcador) se dist < 20, então se éLineOfSightClear(px, py, pz, l1, l2, l3, falso, falso, falso , verdadeiro, falso, falso, falso,localPlayer) então local x,y = getScreenFromWorldPosition(l1, l2, l3) se x então dxDrawMaterialLine3D (l1, l2, l3 + Op1 + 0,4, l1, l2, l3 + Op2 + 0.4, arrow_icon, 1, tocolor(255, 255, 255, 255 , 255 , 255 )) dxDrawMaterialLine3D (l1, l2 - Op3 + 0,3,l3 + 0,03, l1, l2 + Op4 - 0.3, l3 + 0,03, circle_icon, Op5 - 0.7, tocolor(255, 255, 255, 255), 0, 0,-1730900) fim fim fim fim fim fim addEventHandler("onClientRender", raiz, getMarkerCustom) Marcador1 = createMarker(2443.017,-1981.37, 13.547,"cilindro",1.5,0,255,180) setElementData(Marker1, "marcador:personalizado", verdadeiro) Marker2 = createMarker(1684.65, -2098.79, 13,"cilindro",1.5,0,255,180) setElementData(Marker2, "marcador:personalizado", verdadeiro) --Para adicionar mais tipos de marcador observar a função abaixo ea comparar com a de cima colocar sempre 1 numero a mais para diferenciar a função e não dar nenhum erro --Exemplo: Abaixo! --[[ arrow_icon2 = dxCreateTexture ("ativos/tipos/ballas.png") circle_icon2 = dxCreateTexture ("ativos/img/circle.png") addEventHandler ("onClientResourceStart", resourceRoot, função() função() para k,v em pares (getElementsByType("marcador", _, true)) do se obterElementData(v, "marcador:custom1") em seguida, getMarkerCustom1() fim fim fim ) função getMarkerCustom1() local Op1, Op2 = interpolateBetween(0.4, 1.4, 0, 0.7, 1.7, 0, progresso, "SineCurve") local Op3, Op4, Op5 = interpolateBetween(0.8, 0.8, 1.6, 1.0, 1.0, 2.1, progresso, "SineCurve") local px, py, pz, l1, l2, l3 px local, py, pz = getCameraMatrix() para _, marcador em ipairs (getElementsByType 'marcador') fazer se obterElementData (marcador, "marcador:custom1") em seguida, setMarkerColor (marcador, 0, 0, 0, 0, 0, 0) local l1, l2, l3 = getElementPosition (marcador) dist local = math.sqrt((px + l1) ^ 0 + (py + l2) ^ 0 + (pz + l3) ^ 0) local r, g, b = getMarkerColor(marcador) se dist < 20, então se éLineOfSightClear(px, py, pz, l1, l2, l3, falso, falso, falso, verdadeiro, falso, falso, falso, localPlayer) então local x,y = getScreenFromWorldPosition(l1, l2, l3) se x então dxDrawMaterialLine3D (l1, l2, l3 + Op1 + 0,4, l1, l2, l3 + Op2 + 0,4, arrow_icon1, 1, tocolor(255, 255, 255, 255, 255, 255)) dxDrawMaterialLine3D (l1, l2 - Op3 + 0,3, l3 + 0,03, l1, l2 + Op4 - 0,3, l3 + 0,03, circle_icon1, Op5 - 0,7, tocolor(255, 255, 255, 255), 0, 0, -1730900) fim fim fim fim fim fim addEventHandler ("onClientRender", raiz, getMarkerCustom1) ]--
    1 point
  4. Hey and welcome to the Forums! The most frequent error seems to be "CIncludeManager: Illegal path". Also about this: MTA path: C:\..GTA_SA GTA path: C:\..GTA_SA\Grand Theft Auto San Andreas Have you tried to install GTA SA and/or MTA SA in different locations ? Maybe on another local disk ? One or more of the folders from the full path of MTA migth have illegal chars set as name thus causing it to not find the required files for some resources. I can't see the full path so I'm only guessing. I don't know how exactly you have installed the game and the mod but from the paths I have seen it seems kinda messy (imo). Here is what you can try to do: 1) Uninstall both GTA SA and MTA SA. 2) Make a folder for example Games. 3) Install GTA SA in Games/GTA San Andreas. 4) Install MTA SA in Games/MTA San Andreas. If this doesn't help - repeat but install them on a different local disk. It would be nice if someone who knows the real reason behind this "CIncludeManager: Illegal path" error tells how to deal with it.
    1 point
  5. dxDrawImageSection Para quem tem dúvidas sobre o dxDrawImageSection, leia esse mini tutorial! (Espero que ajude algum desenvolvedor) Argumentos Obrigatórios: 1º PosX da sua Imagem 2º PosY da sua Imagem 3º Largura da sua Imagem 4º Altura da sua Imagem 5º Posição absoluta do canto superior esquerdo (não entendi muito bem isso) 6º Posição absoluta do canto superior esquerdo (não entendi muito bem isso) 7º Largura da sua Imagem 8º Altura da sua Imagem 9º O caminho de sua imagem Como utilizar? Para utilizar, veja os exemplos abaixo! (Eu vou fazer como se fosse em uma hud, para ficar mais fácil) local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1360), (screenH/768) function onHudPanel() dxDrawImageSection(x * 800, y * 400, x * 400 * (math.floor(getElementHealth(localPlayer)/100)), y * 80, 0, 0, x * 400 * (math.floor(getElementHealth(localPlayer)/100)), y * 80, "assets/imgs/progress_health.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) --[[ Acima, o código vai renderizar a imagem em horizontal! Para colocar em vertical, é só mudar o "* (math.floor(getElementHealth(localPlayer)/100))" para a altura da imagem (4º e 8º argumento do código)! --]] end OBs: A função "math.floor" retorna um número inteiro (ele arredonda o valor passado para baixo) | Exemplo: local numero = 34.3434453452345 print(math.floor(numero)) Resultado: 34 Caso haja dúvidas, me chame no Discord ou em meu Privado do fórum!
    0 points
×
×
  • Create New...