Black2 Posted July 3, 2015 Share Posted July 3, 2015 I have erro here it opens when the map opens but then does not close how i fix ? Thx local localPlayer = getLocalPlayer() local screenWidth, screenHeight = guiGetScreenSize() local position_lbl = guiCreateLabel( 10, screenHeight-24, screenWidth, 22, " ", false ) function renderPosition() if not isPlayerMapVisible( ) then return end local _x, _y, _z = getElementPosition( localPlayer ) local _rot = getPlayerRotation( localPlayer ) guiSetText( position_lbl, "X: " .. tostring( _x ) .. "; Y: " .. tostring( _y ) .. "; Z: " .. tostring( _z ) .. "; RotZ: " .. tostring(_rot) ) end addEventHandler( "onClientRender", getRootElement(), renderPosition ) Link to comment
joaosilva099 Posted July 4, 2015 Share Posted July 4, 2015 local localPlayer = getLocalPlayer() local screenWidth, screenHeight = guiGetScreenSize() local position_lbl = guiCreateLabel( 10, screenHeight-24, screenWidth, 22, " ", false ) function renderPosition() if not isPlayerMapVisible( ) then return guiSetText(position_lbl, "") end local _x, _y, _z = getElementPosition( localPlayer ) local _rot = getPlayerRotation( localPlayer ) guiSetText( position_lbl, "X: " .. tostring( _x ) .. "; Y: " .. tostring( _y ) .. "; Z: " .. tostring( _z ) .. "; RotZ: " .. tostring(_rot) ) end addEventHandler( "onClientRender", getRootElement(), renderPosition ) Should work 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