Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 18/08/21 in all areas

  1. You can find Multi Theft Auto on video media platforms YouTube and Twitch! Subscribe to us on YouTube Follow us on Twitch
    2 points
  2. Olá! Primeiro de tudo, você precisa atualizar o intervalo de tempo (tick). Para isso, você pode usar o evento onClientPlayerDamage, anexado no localPlayer. Também, são necessárias algumas variáveis para salvar o estado atual da vida. Fiz um código de exemplo, que você pode usar para fazer o colete também. local screenX, screenY = guiGetScreenSize() local barWidth, barHeight = 220, 20 local barX, barY = screenX / 2 - barWidth / 2, screenY - (barHeight + 10) local changeTick = 0 local currentHealth = getElementHealth(localPlayer) local playerHealth = currentHealth addEventHandler("onClientPlayerDamage", localPlayer, function(_, _, _, loss) if loss > 0 then changeTick = getTickCount() end end) addEventHandler("onClientRender", root, function() local changeHealth = getElementHealth(localPlayer) if changeHealth ~= currentHealth then playerHealth = interpolateBetween(currentHealth, 0, 0, getElementHealth(localPlayer), 0, 0, (getTickCount() - changeTick) / 800, "InOutQuad") if playerHealth == changeHealth then currentHealth = changeHealth end end dxDrawRectangle(barX, barY, barWidth, barHeight, tocolor(20, 21, 22, 200), false) dxDrawRectangle(barX, barY, barWidth * (playerHealth / 100), barHeight, tocolor(255, 55, 55, 255), false) dxDrawRectangle(barX, barY, barWidth * (changeHealth / 100), barHeight, tocolor(255, 255, 255, 255), false) end) Demonstração: https://streamable.com/jnyky9
    1 point
  3. @report - we removed the IP from server browser for copying the name of another established server - as it appears the server owner has changed the name I'll go ahead and remove the blacklist for you
    1 point
  4. This sounds like you do not agree with the Lua language design. The idea of named parameters could be nice if the Lua function call were extended to be a key-value map for parameters in general. Right now the parameters to a function are an integer-map. By adding a new opcode "LUA_CALL_MAPPED" each parameter could first pass the ID and then the value. This would prevent the creation of a table for each function call (IIYAMA made an excellent point why creation of a table would be a bad idea). I disagre with your syntax though, so here is mine: function named_args map( one, two : two, three : 1 ) -- one = 1 -- two = 2 -- three = 3 end named_args( "one" = 1, two : 2, 3 ) This syntax is backwards compatible with the old way of calling Lua functions.
    1 point
  5. Hola buenas, queria consultar si alguien posee algún script en el que se pueda meterne el maletero armas (por municion) , chaleco, ect, si hay que pagar o algo joaxi#0303 ese es mi discord, se agradeceria muchisimo !
    0 points
×
×
  • Create New...