![](https://forum.multitheftauto.com/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
wesley souza angelo
Members-
Posts
11 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
wesley souza angelo's Achievements
![Rank: Square (6/54) Square](https://forum.multitheftauto.com/uploads/set_resources_22/84c1e40ea0e759e3f1505eb1788ddf3c_default_rank.png)
Square (6/54)
0
Reputation
-
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
vlw, Funcionou Onde eu estava errando ? -
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
local screenH, screenW = guiGetScreenSize() local x, y = (screenH/1366), (screenW/768) local fonte = dxCreateFont("files/fonts/fonte.ttf", 10) --[[ dxDrawRectangle(451, 298, 186, 97, tocolor(0, 0, 0, 122), false) dxDrawRectangle(461, 308, 166, 77, tocolor(229, 112, 17, 208), false) ]] local hud_rendering = false function HUD () if getElementData(getLocalPlayer(), "isPolice") then jobPolice = "Policial" else jobPolice = nil end local showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer)) local showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer) local showammo3 = getPedTotalAmmo(getLocalPlayer()) local clip = getPedAmmoInClip (getLocalPlayer()) local weapon = getPedWeapon ( getLocalPlayer() ) local arma = getWeaponNameFromID ( weapon ) local SaldoBanco = getElementData(localPlayer,"banco:Saldo") or 0 local Procurado = getPlayerWantedLevel(localPlayer) local Level = getElementData(localPlayer,"Level") or 0 local Fome = getElementData(getLocalPlayer(), "hunger") or 0 local Emp = jobPolice or (getElementData(getLocalPlayer(), "Emprego") or "Desempregado") local Sede = getElementData(getLocalPlayer(), "sede") or 0 local Sono = getElementData(getLocalPlayer(), "AirNew:Sono") or 0 local dinheiro1 = ("%008d"):format(getPlayerMoney(getLocalPlayer())) local color1 = tocolor(0,0,0,178) local color2 = tocolor(0,0,0,178) local color3 = tocolor(0,0,0,178) if arma == Fist then arma = Sono end if Fome > 10 then color1 = tocolor(0,0,0,178) else color1 = tocolor(238,89,16,math.abs(math.sin(getTickCount()/200))*200) end if Sede > 10 then color2 = tocolor(0,0,0,178) else color2 = tocolor(65,105,225,math.abs(math.sin(getTickCount()/200))*200) end if Sono > 10 then color3 = tocolor(0,0,0,178) else color3 = tocolor(34,139,34,math.abs(math.sin(getTickCount()/200))*200) end if Fome < 100 then ptfome = x*1148 else ptfome = x*1143 end if Sede < 100 then ptsede = x*1210 else ptsede = x*1205 end if Sono < 100 then ptsono = x*1273 else ptsono = x*1268 end dxDrawImage(x*1110, y*-25, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*16, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*61, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*107, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*154, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), false) dxDrawImage(x*1134, y*18, x*26, y*30, "files/img/IconeMala.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1134, y*54, x*31, y*38, "files/img/IconeDinheiro.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1139, y*102, x*23, y*26, "files/img/IconeCartao.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1140, y*198, x*23, y*21, "files/img/EstrelaIcone.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("Level: "..Level, x*1139, y*154, x*1202, y*173, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawCircle (x*1161, y*270, x*20, 0.0, 360.0, color1, color1 ) dxDrawCircle (x*1223, y*270, x*20, 0.0, 360.0, color2, color2 ) dxDrawCircle (x*1284, y*270, x*20, 0.0, 360.0, color3, color3 ) dxDrawText(math.floor(Fome).. "%",ptfome , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(math.floor(Sede).. "%",ptsede , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(math.floor(Sono).. "%",ptsono , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawImage(x*1270, y*256, x*27, y*31, "files/img/SonoIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawImage(x*1207, y*256, x*30, y*27, "files/img/DrinkIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawImage(x*1146, y*256, x*26, y*27, "files/img/ComidaIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawText(""..SaldoBanco, x*1175, y*107, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(""..Procurado, x*1169, y*198, x*1189, y*219, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText("$"..dinheiro1, x*1175, y*61, x*1195, y*82, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(Emp, x*1175, y*-16, x*1195, y*82, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText("Arma: "..arma.. " || Pente: " ..tostring (showammo1).." / "..tostring (showammo2), x*1143, y*400, x*1195, y*82, tocolor(255, 255, 255, 255), x*0.9, fonte, "left", "center", false, false, true, false, false) end function setHudVisible( bool ) if type(bool) == "boolean" then if bool == hud_rendering then return end local addRemove = bool and addEventHandler or removeEventHandler addRemove( "onClientRender", root, HUD ) hud_rendering = bool end end addEvent( "onServerRequestSetHudVisible", true ) addEventHandler( "onServerRequestSetHudVisible", root, setHudVisible ) function OnStop () setPlayerHudComponentVisible("armour", true) setPlayerHudComponentVisible("wanted", true) setPlayerHudComponentVisible("weapon", true) setPlayerHudComponentVisible("money", true) setPlayerHudComponentVisible("health", true) setPlayerHudComponentVisible("clock", true) setPlayerHudComponentVisible("breath", true) setPlayerHudComponentVisible("ammo", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), OnStop) function OnStart () setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), OnStart ) local hudTable = { "ammo", "armour", "clock", "health", "money", "weapon", "wanted", "area_name", "vehicle_name", "breath", "clock" } addEventHandler("onClientResourceStart", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, false) end end ) addEventHandler("onClientResourceStop", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, true) end end ) <meta> <info name="Hud RP" author="Sem Autor" version="1.0.0" type="script" /> <script src="c.Lua" type="client" /> <script src="server.Lua" type="server" /> <export function="setHudVisible" type="shared"/> <file src="files/fonts/fonte.ttf" /> <file src="files/img/Circulo.png" /> <file src="files/img/ComidaIcone.png" /> <file src="files/img/DrinkIcone.png" /> <file src="files/img/EstrelaIcone.png" /> <file src="files/img/IconeCartao.png" /> <file src="files/img/IconeDinheiro.png" /> <file src="files/img/IconeMala.png" /> <file src="files/img/RetanguloHud.png" /> <file src="files/img/SonoIcone.png" /> </meta> addEventHandler("onPlayerLogin", root, function() setTimer( function(player) setHudVisible( player, true ) end, 500, 1, source ) end, true, "low") function setHudVisible( player, bool ) if isElement(player) and type(bool) == "boolean" then return triggerClientEvent(player, "onServerRequestSetHudVisible", player, bool) end return false end Eu ja coloquei Minusculo... Ta ai as pastas >> c << meta<< >> server.Lua<< -
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
são quatro pastas >> files >> c >> meta >> server.Lua -
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
eu sei e porque quando joga aqui fica maiúscula -
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
<meta> <info name="Hud RP" author="Sem Autor" version="1.0.0" type="script" /> <script src="c.Lua" type="client" /> <script src="server.Lua" type="server" /> <export function="setHudVisible" type="shared"/> <file src="files/fonts/fonte.ttf" /> <file src="files/img/Circulo.png" /> <file src="files/img/ComidaIcone.png" /> <file src="files/img/DrinkIcone.png" /> <file src="files/img/EstrelaIcone.png" /> <file src="files/img/IconeCartao.png" /> <file src="files/img/IconeDinheiro.png" /> <file src="files/img/IconeMala.png" /> <file src="files/img/RetanguloHud.png" /> <file src="files/img/SonoIcone.png" /> </meta> -
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
ERROR: Problem with resource: hud; Couldn't find script server.Lua for resource hud fica sim -
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
addEventHandler("onPlayerLogin", root, function() setTimer( function(player) setHudVisible( player, true ) end, 500, 1, source ) end, true, "low") function setHudVisible( player, bool ) if isElement(player) and type(bool) == "boolean" then return triggerClientEvent(player, "onServerRequestSetHudVisible", player, bool) end return false end <meta> <info name="Hud RP" author="Sem Autor" version="1.0.0" type="script" /> <script src="c.Lua" type="client" /> <script src="server.Lua" type="server" /> <export function="setHudVisible" type="shared"/> <file src="files/fonts/fonte.ttf" /> <file src="files/img/Circulo.png" /> <file src="files/img/ComidaIcone.png" /> <file src="files/img/DrinkIcone.png" /> <file src="files/img/EstrelaIcone.png" /> <file src="files/img/IconeCartao.png" /> <file src="files/img/IconeDinheiro.png" /> <file src="files/img/IconeMala.png" /> <file src="files/img/RetanguloHud.png" /> <file src="files/img/SonoIcone.png" /> </meta> local screenH, screenW = guiGetScreenSize() local x, y = (screenH/1366), (screenW/768) local fonte = dxCreateFont("files/fonts/fonte.ttf", 10) --[[ dxDrawRectangle(451, 298, 186, 97, tocolor(0, 0, 0, 122), false) dxDrawRectangle(461, 308, 166, 77, tocolor(229, 112, 17, 208), false) ]] function HUD () if getElementData(getLocalPlayer(), "isPolice") then jobPolice = "Policial" else jobPolice = nil end local showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer)) local showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer) local showammo3 = getPedTotalAmmo(getLocalPlayer()) local clip = getPedAmmoInClip (getLocalPlayer()) local weapon = getPedWeapon ( getLocalPlayer() ) local arma = getWeaponNameFromID ( weapon ) local SaldoBanco = getElementData(localPlayer,"banco:Saldo") or 0 local Procurado = getPlayerWantedLevel(localPlayer) local Level = getElementData(localPlayer,"Level") or 0 local Fome = getElementData(getLocalPlayer(), "hunger") or 0 local Emp = jobPolice or (getElementData(getLocalPlayer(), "Emprego") or "Desempregado") local Sede = getElementData(getLocalPlayer(), "sede") or 0 local Sono = getElementData(getLocalPlayer(), "AirNew:Sono") or 0 local dinheiro1 = ("%008d"):format(getPlayerMoney(getLocalPlayer())) local color1 = tocolor(0,0,0,178) local color2 = tocolor(0,0,0,178) local color3 = tocolor(0,0,0,178) if arma == Fist then arma = Sono end if Fome > 10 then color1 = tocolor(0,0,0,178) else color1 = tocolor(238,89,16,math.abs(math.sin(getTickCount()/200))*200) end if Sede > 10 then color2 = tocolor(0,0,0,178) else color2 = tocolor(65,105,225,math.abs(math.sin(getTickCount()/200))*200) end if Sono > 10 then color3 = tocolor(0,0,0,178) else color3 = tocolor(34,139,34,math.abs(math.sin(getTickCount()/200))*200) end if Fome < 100 then ptfome = x*1148 else ptfome = x*1143 end if Sede < 100 then ptsede = x*1210 else ptsede = x*1205 end if Sono < 100 then ptsono = x*1273 else ptsono = x*1268 end dxDrawImage(x*1110, y*-25, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*16, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*61, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*107, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*154, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), false) dxDrawImage(x*1134, y*18, x*26, y*30, "files/img/IconeMala.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1134, y*54, x*31, y*38, "files/img/IconeDinheiro.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1139, y*102, x*23, y*26, "files/img/IconeCartao.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1140, y*198, x*23, y*21, "files/img/EstrelaIcone.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("Level: "..Level, x*1139, y*154, x*1202, y*173, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawCircle (x*1161, y*270, x*20, 0.0, 360.0, color1, color1 ) dxDrawCircle (x*1223, y*270, x*20, 0.0, 360.0, color2, color2 ) dxDrawCircle (x*1284, y*270, x*20, 0.0, 360.0, color3, color3 ) dxDrawText(math.floor(Fome).. "%",ptfome , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(math.floor(Sede).. "%",ptsede , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(math.floor(Sono).. "%",ptsono , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawImage(x*1270, y*256, x*27, y*31, "files/img/SonoIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawImage(x*1207, y*256, x*30, y*27, "files/img/DrinkIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawImage(x*1146, y*256, x*26, y*27, "files/img/ComidaIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawText(""..SaldoBanco, x*1175, y*107, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(""..Procurado, x*1169, y*198, x*1189, y*219, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText("$"..dinheiro1, x*1175, y*61, x*1195, y*82, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(Emp, x*1175, y*-16, x*1195, y*82, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText("Arma: "..arma.. " || Pente: " ..tostring (showammo1).." / "..tostring (showammo2), x*1143, y*400, x*1195, y*82, tocolor(255, 255, 255, 255), x*0.9, fonte, "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", getRootElement(), HUD) function OnStop () setPlayerHudComponentVisible("armour", true) setPlayerHudComponentVisible("wanted", true) setPlayerHudComponentVisible("weapon", true) setPlayerHudComponentVisible("money", true) setPlayerHudComponentVisible("health", true) setPlayerHudComponentVisible("clock", true) setPlayerHudComponentVisible("breath", true) setPlayerHudComponentVisible("ammo", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), OnStop) function OnStart () setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), OnStart ) local hudTable = { "ammo", "armour", "clock", "health", "money", "weapon", "wanted", "area_name", "vehicle_name", "breath", "clock" } addEventHandler("onClientResourceStart", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, false) end end ) addEventHandler("onClientResourceStop", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, true) end end ) addEventHandler("onPlayerLogin", root, function() setTimer( function(player) setHudVisible( player, true ) end, 500, 1, source ) end, true, "low") function setHudVisible( player, bool ) if isElement(player) and type(bool) == "boolean" then return triggerClientEvent(player, "onServerRequestSetHudVisible", player, bool) end return false end <meta> <info name="Hud RP" author="Sem Autor" version="1.0.0" type="script" /> <script src="c.Lua" type="client" /> <script src="server.Lua" type="server" /> <export function="setHudVisible" type="shared"/> <file src="files/fonts/fonte.ttf" /> <file src="files/img/Circulo.png" /> <file src="files/img/ComidaIcone.png" /> <file src="files/img/DrinkIcone.png" /> <file src="files/img/EstrelaIcone.png" /> <file src="files/img/IconeCartao.png" /> <file src="files/img/IconeDinheiro.png" /> <file src="files/img/IconeMala.png" /> <file src="files/img/RetanguloHud.png" /> <file src="files/img/SonoIcone.png" /> </meta> local screenH, screenW = guiGetScreenSize() local x, y = (screenH/1366), (screenW/768) local fonte = dxCreateFont("files/fonts/fonte.ttf", 10) --[[ dxDrawRectangle(451, 298, 186, 97, tocolor(0, 0, 0, 122), false) dxDrawRectangle(461, 308, 166, 77, tocolor(229, 112, 17, 208), false) ]] function HUD () if getElementData(getLocalPlayer(), "isPolice") then jobPolice = "Policial" else jobPolice = nil end local showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer)) local showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer) local showammo3 = getPedTotalAmmo(getLocalPlayer()) local clip = getPedAmmoInClip (getLocalPlayer()) local weapon = getPedWeapon ( getLocalPlayer() ) local arma = getWeaponNameFromID ( weapon ) local SaldoBanco = getElementData(localPlayer,"banco:Saldo") or 0 local Procurado = getPlayerWantedLevel(localPlayer) local Level = getElementData(localPlayer,"Level") or 0 local Fome = getElementData(getLocalPlayer(), "hunger") or 0 local Emp = jobPolice or (getElementData(getLocalPlayer(), "Emprego") or "Desempregado") local Sede = getElementData(getLocalPlayer(), "sede") or 0 local Sono = getElementData(getLocalPlayer(), "AirNew:Sono") or 0 local dinheiro1 = ("%008d"):format(getPlayerMoney(getLocalPlayer())) local color1 = tocolor(0,0,0,178) local color2 = tocolor(0,0,0,178) local color3 = tocolor(0,0,0,178) if arma == Fist then arma = Sono end if Fome > 10 then color1 = tocolor(0,0,0,178) else color1 = tocolor(238,89,16,math.abs(math.sin(getTickCount()/200))*200) end if Sede > 10 then color2 = tocolor(0,0,0,178) else color2 = tocolor(65,105,225,math.abs(math.sin(getTickCount()/200))*200) end if Sono > 10 then color3 = tocolor(0,0,0,178) else color3 = tocolor(34,139,34,math.abs(math.sin(getTickCount()/200))*200) end if Fome < 100 then ptfome = x*1148 else ptfome = x*1143 end if Sede < 100 then ptsede = x*1210 else ptsede = x*1205 end if Sono < 100 then ptsono = x*1273 else ptsono = x*1268 end dxDrawImage(x*1110, y*-25, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*16, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*61, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*107, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*154, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), false) dxDrawImage(x*1134, y*18, x*26, y*30, "files/img/IconeMala.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1134, y*54, x*31, y*38, "files/img/IconeDinheiro.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1139, y*102, x*23, y*26, "files/img/IconeCartao.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1140, y*198, x*23, y*21, "files/img/EstrelaIcone.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("Level: "..Level, x*1139, y*154, x*1202, y*173, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawCircle (x*1161, y*270, x*20, 0.0, 360.0, color1, color1 ) dxDrawCircle (x*1223, y*270, x*20, 0.0, 360.0, color2, color2 ) dxDrawCircle (x*1284, y*270, x*20, 0.0, 360.0, color3, color3 ) dxDrawText(math.floor(Fome).. "%",ptfome , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(math.floor(Sede).. "%",ptsede , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(math.floor(Sono).. "%",ptsono , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawImage(x*1270, y*256, x*27, y*31, "files/img/SonoIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawImage(x*1207, y*256, x*30, y*27, "files/img/DrinkIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawImage(x*1146, y*256, x*26, y*27, "files/img/ComidaIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawText(""..SaldoBanco, x*1175, y*107, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(""..Procurado, x*1169, y*198, x*1189, y*219, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText("$"..dinheiro1, x*1175, y*61, x*1195, y*82, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(Emp, x*1175, y*-16, x*1195, y*82, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText("Arma: "..arma.. " || Pente: " ..tostring (showammo1).." / "..tostring (showammo2), x*1143, y*400, x*1195, y*82, tocolor(255, 255, 255, 255), x*0.9, fonte, "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", getRootElement(), HUD) function OnStop () setPlayerHudComponentVisible("armour", true) setPlayerHudComponentVisible("wanted", true) setPlayerHudComponentVisible("weapon", true) setPlayerHudComponentVisible("money", true) setPlayerHudComponentVisible("health", true) setPlayerHudComponentVisible("clock", true) setPlayerHudComponentVisible("breath", true) setPlayerHudComponentVisible("ammo", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), OnStop) function OnStart () setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), OnStart ) local hudTable = { "ammo", "armour", "clock", "health", "money", "weapon", "wanted", "area_name", "vehicle_name", "breath", "clock" } addEventHandler("onClientResourceStart", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, false) end end ) addEventHandler("onClientResourceStop", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, true) end end ) Mesmo Assim Não Deu... Testei E A Hud Continua Iniciando Junto Com O Painel -
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
<meta> <info name="Hud RP" author="Sem Autor" version="1.0.0" type="script" /> <script src="c.Lua" type="client" /> <export function="setHudVisible" type="shared"/> <file src="files/fonts/fonte.ttf" /> <file src="files/img/Circulo.png" /> <file src="files/img/ComidaIcone.png" /> <file src="files/img/DrinkIcone.png" /> <file src="files/img/EstrelaIcone.png" /> <file src="files/img/IconeCartao.png" /> <file src="files/img/IconeDinheiro.png" /> <file src="files/img/IconeMala.png" /> <file src="files/img/RetanguloHud.png" /> <file src="files/img/SonoIcone.png" /> </meta> -
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
Desculpa e que sou Novo aqui, E não sabia Onde Posta, Mas Ainda estou com duvida de onde colocar serv e esse <export function="setHudVisible" type="shared"/> Desculpa E que Realmente Nao sei Nada de script -
Hud aparecendo Junto com o Painel Login
wesley souza angelo replied to wesley souza angelo's topic in Programação em Lua
como faço isso ? local screenH, screenW = guiGetScreenSize() local x, y = (screenH/1366), (screenW/768) local fonte = dxCreateFont("files/fonts/fonte.ttf", 10) --[[ dxDrawRectangle(451, 298, 186, 97, tocolor(0, 0, 0, 122), false) dxDrawRectangle(461, 308, 166, 77, tocolor(229, 112, 17, 208), false) ]] function HUD () if getElementData(getLocalPlayer(), "isPolice") then jobPolice = "Policial" else jobPolice = nil end local showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer)) local showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer) local showammo3 = getPedTotalAmmo(getLocalPlayer()) local clip = getPedAmmoInClip (getLocalPlayer()) local weapon = getPedWeapon ( getLocalPlayer() ) local arma = getWeaponNameFromID ( weapon ) local SaldoBanco = getElementData(localPlayer,"banco:Saldo") or 0 local Procurado = getPlayerWantedLevel(localPlayer) local Level = getElementData(localPlayer,"Level") or 0 local Fome = getElementData(getLocalPlayer(), "hunger") or 0 local Emp = jobPolice or (getElementData(getLocalPlayer(), "Emprego") or "Desempregado") local Sede = getElementData(getLocalPlayer(), "sede") or 0 local Sono = getElementData(getLocalPlayer(), "AirNew:Sono") or 0 local dinheiro1 = ("%008d"):format(getPlayerMoney(getLocalPlayer())) local color1 = tocolor(0,0,0,178) local color2 = tocolor(0,0,0,178) local color3 = tocolor(0,0,0,178) if arma == Fist then arma = Sono end if Fome > 10 then color1 = tocolor(0,0,0,178) else color1 = tocolor(238,89,16,math.abs(math.sin(getTickCount()/200))*200) end if Sede > 10 then color2 = tocolor(0,0,0,178) else color2 = tocolor(65,105,225,math.abs(math.sin(getTickCount()/200))*200) end if Sono > 10 then color3 = tocolor(0,0,0,178) else color3 = tocolor(34,139,34,math.abs(math.sin(getTickCount()/200))*200) end if Fome < 100 then ptfome = x*1148 else ptfome = x*1143 end if Sede < 100 then ptsede = x*1210 else ptsede = x*1205 end if Sono < 100 then ptsono = x*1273 else ptsono = x*1268 end dxDrawImage(x*1110, y*-25, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*16, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*61, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*107, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) dxDrawImage(x*1110, y*154, x*215, y*112, "files/img/RetanguloHud.png", 0, 0, 0, tocolor(0, 0, 0, 255), false) dxDrawImage(x*1134, y*18, x*26, y*30, "files/img/IconeMala.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1134, y*54, x*31, y*38, "files/img/IconeDinheiro.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1139, y*102, x*23, y*26, "files/img/IconeCartao.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawImage(x*1140, y*198, x*23, y*21, "files/img/EstrelaIcone.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("Level: "..Level, x*1139, y*154, x*1202, y*173, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawCircle (x*1161, y*270, x*20, 0.0, 360.0, color1, color1 ) dxDrawCircle (x*1223, y*270, x*20, 0.0, 360.0, color2, color2 ) dxDrawCircle (x*1284, y*270, x*20, 0.0, 360.0, color3, color3 ) dxDrawText(math.floor(Fome).. "%",ptfome , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(math.floor(Sede).. "%",ptsede , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(math.floor(Sono).. "%",ptsono , y*474, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawImage(x*1270, y*256, x*27, y*31, "files/img/SonoIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawImage(x*1207, y*256, x*30, y*27, "files/img/DrinkIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawImage(x*1146, y*256, x*26, y*27, "files/img/ComidaIcone.png", 0, 0, 0, tocolor(254, 254, 254, 187), false) dxDrawText(""..SaldoBanco, x*1175, y*107, x*1195, y*128, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(""..Procurado, x*1169, y*198, x*1189, y*219, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText("$"..dinheiro1, x*1175, y*61, x*1195, y*82, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText(Emp, x*1175, y*-16, x*1195, y*82, tocolor(255, 255, 255, 255), x*1.00, fonte, "left", "center", false, false, true, false, false) dxDrawText("Arma: "..arma.. " || Pente: " ..tostring (showammo1).." / "..tostring (showammo2), x*1143, y*400, x*1195, y*82, tocolor(255, 255, 255, 255), x*0.9, fonte, "left", "center", false, false, true, false, false) end addEventHandler("onClientRender", getRootElement(), HUD) function OnStop () setPlayerHudComponentVisible("armour", true) setPlayerHudComponentVisible("wanted", true) setPlayerHudComponentVisible("weapon", true) setPlayerHudComponentVisible("money", true) setPlayerHudComponentVisible("health", true) setPlayerHudComponentVisible("clock", true) setPlayerHudComponentVisible("breath", true) setPlayerHudComponentVisible("ammo", true) end addEventHandler("onClientResourceStop", getResourceRootElement(getThisResource()), OnStop) function OnStart () setPlayerHudComponentVisible("armour", false) setPlayerHudComponentVisible("wanted", false) setPlayerHudComponentVisible("weapon", false) setPlayerHudComponentVisible("money", false) setPlayerHudComponentVisible("health", false) setPlayerHudComponentVisible("clock", false) setPlayerHudComponentVisible("breath", false) setPlayerHudComponentVisible("ammo", false) end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), OnStart ) local hudTable = { "ammo", "armour", "clock", "health", "money", "weapon", "wanted", "area_name", "vehicle_name", "breath", "clock" } addEventHandler("onClientResourceStart", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, false) end end ) addEventHandler("onClientResourceStop", resourceRoot, function() for id, hudComponents in ipairs(hudTable) do showPlayerHudComponent(hudComponents, true) end end ) -
https://imgur.com/wO2FoV3