Jump to content

summarize numbers


Dolinho

Recommended Posts

how can I summarize?

xr = math.floor(x) 
yr = math.floor(y) 
zr = math.floor(z) 

ex: 1603.9251708984,1829.6070556641,10.8203125 I want so 1603.925,1829.607,10.82

addEventHandler ("onClientGUIClick", root, 
function() 
    if (source == get) then 
        if guiCheckBoxGetSelected(Button[1]) == true then 
        local x,y,z = getElementPosition (getLocalPlayer()) 
        local rx, ry, rz = getElementRotation(getLocalPlayer()) 
        xr = math.floor(x) 
        yr = math.floor(y) 
        zr = math.floor(z) 
        rot = math.floor(rz) 
        guiSetText (Pos, xr..","..yr..","..zr.." R:"..rot ) 
        else 
        local x,y,z = getElementPosition (getLocalPlayer()) 
        guiSetText (Pos, (x)..","..(y)..","..(z) ) 
        end 
    end 
end 
) 

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