Jump to content

Zone help


manve1

Recommended Posts

How could i update player zone?

function zonename() 
local x, y, z = getElementPosition ( localPlayer ) 
local zone = guiCreateLabel( 0.305, 0.005, 0.2, 0.05, "Zone: ".. getZoneName( x, y, z, true ), true ) 
end 
addEventHandler('onClientPlayerJoin', getRootElement(), zonename) 
addEventHandler('onClientResourceStart', getRootElement(), zonename) 

Link to comment
function zonename ( ) 
    local x, y, z = getElementPosition ( localPlayer ) 
    zone = guiCreateLabel ( 0.305, 0.005, 0.2, 0.05, "Zone: ".. getZoneName( x, y, z, true ), true ) 
    setTimer ( 
        function ( ) 
            local x, y, z = getElementPosition ( localPlayer ) 
            guiSetText ( zone, "Zone: ".. getZoneName( x, y, z, true ) ) 
        end 
        ,1000, 0 
    ) 
end 
addEventHandler ( 'onClientResourceStart', resourceRoot, zonename ) 

That'll update it every second.

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...