Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 17/06/21 in Posts

  1. Olá, tudo bem? Bom amigo existe uma função aqui no fórum aonde você consegue colocar o script para ficar mais legível. https://prnt.sc/15qpv29 Já na função de criar o carro seria essa: createVehicle E a função de destruir o veiculo seria essa: destroyElement Tenha uma boa sorte
    1 point
  2. Either that or Installing and Configuring Nginx as an External Web Server should be helpful. The built-in HTTP server in MTA that takes care of downloading is a very simple server, and can't do things like transmission compression. Nginx or Squid (maybe? I haven't ever used it so I'm not entirely sure) should be able to compress the transmission and thus make it faster and use less bandwidth.
    1 point
  3. Olá. Você pode usar esta função: getPositionFromElementOffset - Código fonte: function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end Ela pega a posição de acordo com o que você deseja. Frente, trás, direita, esquerda, cima ou baixo. Basicamente o uso dela seria desta maneira (levando em consideração que você já colou aquela função dentro do seu código): addCommandHandler("object", function(player) local x, y, z = getPositionFromElementOffset(player, -2, 0, 0) -- -2 seria a posição X, horizontal. Sendo assim, -2 é à esquerda do jogador. local object = createObject(1337, 0, 0, 0) -- Cria o objeto no centro de San Andreas setElementPosition(object, x, y, z) -- Move o objeto para a posição que obtemos através daquela função end)
    1 point
  4. An example: local scale = interpolateBetween(0.7, 0, 0, 0, 0, 0, progress, "OutQuad") local width, height = dxGetTextWidth(getPlayerName(v),scaleF,settings.font,true), 2*scale local imageSize = 40 * scale local offset = 40 * scale local sx, sy = sx - (width / 2 + imageSize + offset), sy-height dxDrawImage(sx, sy, imageSize, imageSize, "files/typing.png",0,0,0,tocolor(255,181,64,255)) -- no imageSize since the image is drawn from left to right local sx, sy = sx + (width / 2 + offset), sy-height dxDrawImage(sx, sy, imageSize, imageSize, "files/typing.png",0,0,0,tocolor(255,181,64,255)) Anyway, I am wondering why you use the value '350'. The image was only 40 pixels and unscaled.
    1 point
  5. Hello. I guess you should get the index before the column name. Try changing from vehFuel["Fuel"] to vehFuel[1]["Fuel"]
    1 point
  6. Website: https://pastetr.com The purpose of our site is to enable you to quickly share any text online with others. It is usually designed for easy use by people involved in coding. We have 156 editors that support encoding languages. You can also share text without a member. As in the screenshot below, you can put time to share content to automatically delete when the specified time is over. IMG 1: IMG 2:
    1 point
×
×
  • Create New...