Jump to content

getZoneName


Recommended Posts

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 by Leinad Raiz
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...