Jump to content

Juniorr

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by Juniorr

  1. Opa, agora deu certo! ^^ Eu usei: local vida = math.min(getElementHealth(localPlayer)/100,1) e usei: _dxDrawImageSection(1138, 102, 34,34,0,0,34,34,"files/img/health.png",0,0,0,99,150,255,255,false,1-vida) Mt obrigado Gw8!
  2. Aqui ficou com um monte de círculos ;-; meu código: _dxDrawImageSection(1138, 102, 34,34,0,0,34,34,"files/img/health.png",0,0,0,99,150,255,255,false,vida) E coloquei a função _dxDrawImageSection no código tb, mas ficou assim:
  3. ;-; Mesmo assim ficou errado, ficou esticado dos lados local vida = getElementHealth(localPlayer) dxDrawImageSection(1138, 102, 34, 34, 0, 0, 34, 34*(vida/100), 'files/img/health.png', 180, 0, 0, tocolor(255, 255, 255, 255))
  4. Se a vida do player estiver em 100, fica normal, no lugar certo, mas se o player perde vida o círculo vai subindo Meu código: local vida = getElementHealth(localPlayer) dxDrawImageSection(1138, 102, 34, 34*(vida/100), 0, 0, 34, 34*(vida/100), 'files/img/health.png', 180, 0, 0, tocolor(255, 255, 255, 255))
  5. Muito obrigado cara! Tu é o cara Realmente com o image section da, mas como eu posso calcular pra fzer como na foto? pode me ajudar novamente? kkk por exemplo calcular a vida do player vida = getElementHealth(localPlayer) Eu tentei usar 34/100*vida (34 é o tamanho da imagem), mas a imagem só ficou esticada ;-;
  6. Eae galera, to com uma dúvida aqui, como que eu faço pra deixar um dxCircle com o topo reto? ou usando um shader.fx? :s Exemplo:
  7. Can you explain it better? ;-;
  8. Hello guys, I wanted to ask a question here, how can I do to make a dx circle, when I change the height it looks like this, with the top straight ^^ reference image:
  9. Hello, I have a resource here in html and when I put it in the MTA, it has a white background, I don't understand practically anything about html and css and I already tried to make the body background as transparent, but the background was white ? body { background: transparent; } Does anyone know how to make it transparent to help me, please ?
  10. Opa, eu tenho uma resource aqui em html e quando eu coloco no MTA, ela fica com o fundo branco, eu não entendo praticamente nada de html e css e eu já tentei colocar o background do body como transparent, mas o fundo ficou branco ? body { background: transparent; } Alguém sabe como deixa transparente pra me ajudar, pfv? ???
  11. Hello, I am in doubt about how to get the ids system of this resource to implement in my chat resource. IDS Resource Link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=2322 Everything I have so far from my script: function twitter ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) local uncoloredMsg = string.gsub(message, "#%x%x%x%x%x%x", "") --Delete all HEX codes. local nick = getPlayerName(thePlayer) local uncoloredNick = string.gsub(nick, "#%x%x%x%x%x%x", "") --Delete all HEX codes. outputChatBox ( "[TWITTER] "..uncoloredNick.."[ID]: "..uncoloredMsg, root, 255, 255, 255, true ) end addCommandHandler ( "twitter", twitter )
  12. For me to get the player ID I have to use: getElementData( source, "ID" ) not? with me not caught (I'm new sorry :v)
  13. Hello everyone, I come first to apologize for my English ? (google translator) I have this ID system code below, but I wanted it when the player enters the server, save the ID of it, and when it returns on the server it is with the same ID. local playerid = { } function newPlayerID( player ) for i = 1, getMaxPlayers( ) do if not ( playerid[ i ] ) then playerid[ i ] = player setElementData( player, "roleplayid", i ) break end end end function getPlayerByID( id ) for i = 1, getMaxPlayers( ) do if ( playerid[ i ] ) then print( getPlayerName( playerid[ i ] ) ) return playerid[ i ] end end end addEventHandler( "onPlayerQuit", root, function( ) for i = 1, getMaxPlayers do if ( playerid[ i ] == source ) then playerid[ i ] = nil break end end end ) addEventHandler( "onPlayerJoin", root, function( ) newPlayerID( source ) end ) addEventHandler( "onResourceStart", resourceRoot, function( ) local players = getElementsByType( "player" ) for i = 1, #players do newPlayerID( players[ i ] ) end end )
×
×
  • Create New...