local screenWidth, screenHeight = guiGetScreenSize ( ) -- Get the screen resolution (width and height)
function createText ( )
local playerX, playerY, playerZ = getElementPosition ( localPlayer ) -- Get our player's coordinates.
local playerZoneName = getZoneName ( playerX, playerY, playerZ ) -- Get name of the zone the player is in.
-- Draw zone name text's shadow.
dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" )
-- Draw zone name text.
dxDrawText ( playerZoneName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" )
end
function HandleTheRendering ( )
addEventHandler ( "onClientRender", root, createText ) -- keep the text visible with onClientRender.
end
addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering )