Jump to content

Erknneto

Members
  • Posts

    47
  • Joined

  • Last visited

2 Followers

About Erknneto

  • Birthday 29/03/1998

Details

  • Gang
    MTA EVO:RUST
  • Location
    Belo Horizonte, Brazil
  • Occupation
    Enthusiastic
  • Interests
    Development

Recent Profile Visitors

1,694 profile views

Erknneto's Achievements

Rat

Rat (9/54)

8

Reputation

  1. Amigo, você vai precisar usar a vida e o colete para calcular o tamanho das barras do HUD, é uma matemática simples. Como você quer um fundo, vamos usar uma largura de valor 200. A largura desse fundo não pode mudar quando o jogador sofrer dano, então temos que fazer um cálculo onde o resultado é sempre 200. Na barra que mostra a vida ou o colete, a largura deve mudar ao sofrer dano, então vamos apenas trocar o 100, que é o valor chave do cálculo, pelo valor da vida/colete do jogador. local vida = getElementHealth(localPlayer) -- Valor da vida do jogador local colete = getPedArmor(localPlayer) -- Valor do colete do jogador dxDrawRectangle(screenW*0.4870, screenH*0.4005, screenW*200/100*100, screenH*0.0046, tocolor(0, 0, 0, 250), false) -- Calculo o fundo da vida, valor máximo é 100. dxDrawRectangle(screenW*0.4870, screenH*0.4005, screenW*200/100*vida, screenH*0.0046, tocolor(255, 255, 255, 255), false) -- Calculo a barra de vida, substituindo o máximo pelo valor da vida do jogador. dxDrawRectangle(screenW*0.4870, screenH*0.4074, screenW*200/100*100, screenH*0.0046, tocolor(0, 0, 0, 250), false) -- Calculo o fundo do colete, valor máximo é 100. dxDrawRectangle(screenW*0.4870, screenH*0.4074, screenW*200/100*colete, screenH*0.0046, tocolor(255, 255, 255, 255), false) -- Calculo a barra de colete, substituindo o máximo pelo valor do colete do jogador.
  2. I've sold it, the new server IP is mtasa:13.95.1.226:22003
  3. IT'S ALREADY BEEN SOLD The new server IP is mtasa://13.95.1.226:22003 SELLING - Rust gamemode + Facebook page with 4.2k likes Hello! I'm selling my Rust gamemode I've been creating since 2016. It has been tested once as a server with 80+ players. The reason I'm selling is because I'm leaving MTA forever. I'll show some screenshots, some old videos people made on the server, and I'll show you what's so special about this gamemode. ABOUT THE GAMEMODE I started making this gamemode back in 2016 with two friends of mine, we slowly made it and it became a server in 2017. From that day, we've improved the gamemode and added a bunch of new stuff. We were the first Rust server ever to be online! SCREENSHOTS AND VIDEOS youtu.be/BF2Eq2-4RnU youtu.be/E6SI_lA21M4 youtu.be/0qn-jq_cS1o youtu.be/4pE1EE7rKKY youtu.be/8AvMt9sb7u8 ALL SCREENSHOTS CAN BE FOUND HERE BASIC INFORMATION The gamemode is complete, it has a lot of systems, exclusive contents, all done by us 3 No errors showing up the 'debugscript 3' A custom anticheat to prevent a lot of griefers 3 languages (en-US, pt-BR, ca-ES) All data stored at separated databases (MySQL) Exclusive objects and systems It comes with 10+ extra resources It has a Facebook page with 4.2k likes A lot of bugs that were found over 3 years of server are fixed (including duplicating items WHAT SYSTEMS DOES IT HAS? Full base systems, players can build the way they want Full raid systems, players can raid other players to steal their items using C4 Full building and crafting mode with +30 exclusives objects Full resources scavenging systems, players can get resources scavenging Full MySQL data storage, all data is stored in separated databases Full lobby with tutorial and player editor Inventory, backpacks, items, weapons, resources Health, hunger and thirsty Group system Beds Chests, safe boxes Furnaces Workbenchs Campfires Vehicles (including players can craft a Bicycle) Animals Airdrops and supply boxes players can call using an item Sentry guns players can put to deffend their bases Light Machine Gun players can put in the back of a truck to shoot and raid other players Radioactive areas A store where players can buy and sell items A factory where players can make a stronger metal for strongers bases Big cities are blocked Map weather changes as the days goes by Implemented VIP systems and a lot more... PRICE SOLD CONTACT SOLD
  4. function peds(player) local rx,ry,rz = getElementRotation(localPlayer) local px, py, pz = getElementPosition(localPlayer) local rz = math.floor(rz) setClipboard("{179 ,"..px..", "..py..", "..pz..", "..rz.."};") outputChatBox("Todas as informações para adicionar o ped foram copiadas!") end addCommandHandler("localped", peds) Bom, eu colocaria dessa forma. A função 'math.floor' vai te dar o menor valor inteiro dentro de um número, acredito que funcionaria melhor nesse caso. Ali eu só pedi pro script me retornar o 'rz' novamente, mas no caso o 'rz' inteiro, diferente do primeiro rz que foi dado, entende? Por exemplo: x = 1,5 Se eu fizer o math.floor(x), ele vai me dar x = 1
  5. We need more information. You need to show us screenshots of any errors occurring when you use the '/svp' command. Use '/debugscript' 3 to do it. But for now I suppose you should check if you're set as an admin to use that command, try to set your admin element data using the admin panel.
  6. function ... () local username = getPlayerName(source) local qh_account = dbQuery(db, "SELECT * FROM accounts WHERE username=(?) LIMIT 1", username) local result_account = dbPoll(qh_account,-1)[1] if ( result_account ) then local serial = tostring(result_account.serial) local userSerial = getPlayerSerial(source) if ( serial == userSerial ) then outputChatBox("Yes.",source) return else outputChatBox("No.",source) return end end return end The code you're using is kind different from the ones I use about databases, but this might work. You just needed to set the serial from the db as a string and check if it's the same as the one from the player.
  7. Você deve postar na área de português, amigo... lá nós brasileiros podemos te ajudar. Essa aqui é a área exclusiva para dúvidas em inglês. Link: ÁREA DE PORTUGUÊS
  8. Erknneto

    Replace Error

    You're using a non-compatible model for the weapons, try to use another models. It might work.
  9. I think you were setting the wrong element datas, try this code function apagarRadar () setPlayerHudComponentVisible(source,"radar",false) setElementData(source,"showRadar",false) end addEventHandler("onPlayerJoin",getRootElement(),apagarRadar) function mostrarRadar (source) if not ( getElementData(source,"showRadar") ) then setElementData(source,"showRadar",true) setPlayerHudComponentVisible(source,"radar",true) else outputChatBox("Já tens um mapa.",source) end end addCommandHandler("mapa",mostrarRadar)
  10. That code works for all resolutions, just put your resolution there and edit. It will work fine in all resolutions, just edit in your resolution and test in others.
  11. function interiorEnter (element) if ( getElementType(element) == "player" ) then if ( getPlayerMoney(element) >= 100 ) then takePlayerMoney(element,100) setElementPosition(element,834.6,7.4,1004.1) setElementInterior(element,3) else outputChatBox("#ff0000You don't have enough money!",element,255,255,255,true) end end end addEventHandler("onMarkerHit",markerJoin,interiorEnter) Try this, m8.
  12. Well, I always use this code to draw DX stuff, and I recommend you to try it so local sx,sy = guiGetScreenSize() local px,py = 1366,768 --Put your resolution here local x,y = (sx/px),(sy/py) --Example code dxDrawRectangle(x*0, y*0, x*1366, y*80, tocolor(0, 0, 0, 170), false) dxDrawText("Test", x*0, y*0, x*1366, y*80, tocolor(255, 255, 255, 255), 1.5, "pricedown", "center", "center", false, false, false, false, false) It always fits in all resolutions.
  13. You can use the function showCursor. for example: function inventory () showCursor(true,false) --it will show the cursor and the player will still be able to move, etc end bindKey("tab","down",inventory) https://wiki.multitheftauto.com/wiki/ShowCursor
  14. Oh, sorry! You can ignore that, that is an old code from my resources! You can remove that return if you want!
×
×
  • Create New...