Leinad Raiz Posted December 26, 2021 Posted December 26, 2021 (edited) Tenho uma duvida muito importante em um script de hud! Nessa minha hud utilizei apenas a função (Client), E eu queria colocar uma função que ficava a hora e do lado a zona de onde você se localiza. Assim que a getZoneName, Ela precisa estar na função (Server), Dai eu queria saber como faço para traser a getZoneName para o cliente. O codigo fonte do hud está abaixo. -- HUD -- function HUD () local vida = getElementHealth ( localPlayer ) local Time = getRealTime(); local iHours = Time.hour; local iMinutes = Time.minute; local city = getZoneName(x, y, z, true) ------------------ Vida ----------------- dxDrawText(""..iHours ..":"..iMinutes.." "..city, x*1171, y*682, x*1352, y*703, tocolor(255, 255, 255, 255), 1.40, "default-bold", "left", "top", false, false, false, false, false) dxDrawRectangle(x*1171, y*713, x*185, y*28, tocolor(0, 0, 0, 179), false) dxDrawRectangle(x*1171, y*713, x*185/100*vida, y*28, tocolor(161, 0, 214, 255), false) dxDrawImage(x*1174, y*717, x*20, y*20, "img/vida.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) ------------------ LOGO ------------------ dxDrawImage(x*1210, y*7, x*120, y*118, "logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end addEventHandler("onClientRender", getRootElement(), HUD) Edited December 26, 2021 by Leinad Raiz
DNL291 Posted December 26, 2021 Posted December 26, 2021 O tópico foi movido para a seção portuguesa, note que temos as seções de outras linguagens para tópicos não-inglês. Sempre que postar tenha isso em mente. Please do not PM me with scripting related question nor support, use the forums instead.
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