XXII Posted July 16, 2020 Share Posted July 16, 2020 Olá, eu estava querendo colocar o nick do jogador na hud que estou fazendo, porém quando eu coloco ele aparece por exemplo: "Meu#929292Nick", ou seja, com o código da cor, alguém sabe como retira isso? function SousaHud ( ... ) if (not isPlayerMapVisible()) then local dinheiro = getPlayerMoney(localPlayer) local banco = getElementData(localPlayer, "bank.money") or "0" local muniarma = getPedAmmoInClip (localPlayer) local munitotal = getPedTotalAmmo (localPlayer) local vida = math.floor(getElementHealth(getLocalPlayer())) local colete = math.floor(getPedArmor(getLocalPlayer())) local fome = getElementData(getLocalPlayer(), "fome") or 100 local sede = getElementData(getLocalPlayer(), "sede") or 100 local nome = getPlayerName (localPlayer) dxDrawRectangle(screenW * 0.7897, screenH * 0.0495, screenW * 0.2103, screenH * 0.2487, tocolor(0, 0, 0, 215), false) dxDrawRectangle(screenW * 0.7978, screenH * 0.0651, screenW * 0.1949, screenH * 0.0352, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.7978, screenH * 0.1133, screenW * 0.0941, screenH * 0.0326, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.8993, screenH * 0.1133, screenW * 0.0941, screenH * 0.0326, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.7978, screenH * 0.1589, screenW * 0.0941, screenH * 0.0326, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.8985, screenH * 0.1589, screenW * 0.0941, screenH * 0.0326, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.8985, screenH * 0.2044, screenW * 0.0941, screenH * 0.0326, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.7971, screenH * 0.2044, screenW * 0.0941, screenH * 0.0326, tocolor(255, 255, 255, 255), false) dxDrawRectangle(screenW * 0.7978, screenH * 0.2500, screenW * 0.1949, screenH * 0.0352, tocolor(255, 255, 255, 255), false) dxDrawText(""..nome.. "", screenW * 0.7971, screenH * 0.0651, screenW * 0.9926, screenH * 0.1003, tocolor(0, 0, 0, 254), 1.20, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("R$"..dinheiro , screenW * 0.7971, screenH * 0.1120, screenW * 0.8912, screenH * 0.1458, tocolor(0, 0, 0, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("R$"..banco , screenW * 0.8985, screenH * 0.1120, screenW * 0.9926, screenH * 0.1458, tocolor(0, 0, 0, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Fome " ..fome.. "%", screenW * 0.7971, screenH * 0.1576, screenW * 0.8912, screenH * 0.1914, tocolor(0, 0, 0, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Sede " ..sede.. "%", screenW * 0.8985, screenH * 0.1576, screenW * 0.9926, screenH * 0.1914, tocolor(0, 0, 0, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Vida " ..vida.. "%", screenW * 0.7971, screenH * 0.2031, screenW * 0.8912, screenH * 0.2370, tocolor(0, 0, 0, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Colete " ..colete.. "%", screenW * 0.8985, screenH * 0.2031, screenW * 0.9926, screenH * 0.2370, tocolor(0, 0, 0, 254), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Rawer Roleplay", 1084, 191, 1350, 219, tocolor(0, 0, 0, 254), 1.50, "default-bold", "center", "center", false, false, false, false, false) end Link to comment
ber Posted July 16, 2020 Share Posted July 16, 2020 No dxDrawText o penúltimo parâmetro é o ColorCoded, ele converte as cores, basta mudar de false para true que irá funcionar! Ficará assim: dxDrawText(""..nome.. "", screenW * 0.7971, screenH * 0.0651, screenW * 0.9926, screenH * 0.1003, tocolor(0, 0, 0, 254), 1.20, "default-bold", "center", "center", false, false, false, true, false) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now