Jump to content

Help Altitude Script


xRGamingx

Recommended Posts

How can I get the number 0 out when I'm on the ground? 

yIQniu6.jpg?1

function height()

local jet = doesPedHaveJetPack ( localPlayer )
local x,y,z = getElementPosition (getLocalPlayer())
local height = math.floor((z*0))
if ( jet ) then
dxDrawText("Altitude: " .. (z).."", 17, 461, 110, 498, tocolor(254, 17, 17, 254), 0.50, "bankgothic", "left", "top", false)
end
end
addEventHandler ( "onClientRender", getRootElement(), height ) 

 

Link to comment
function height()

local jet = doesPedHaveJetPack ( localPlayer )
local x,y,z = getElementPosition (getLocalPlayer())
local height = math.floor((z*0))
if ( jet ) then
if isPedOnGround(localPlayer) then
z = 0
end
dxDrawText("Altitude: " .. (z).."", 17, 461, 110, 498, tocolor(254, 17, 17, 254), 0.50, "bankgothic", "left", "top", false)
end
end
addEventHandler ( "onClientRender", getRootElement(), height ) 

 

  • Thanks 1
Link to comment
1 minute ago, URBAN said:

function height()

local jet = doesPedHaveJetPack ( localPlayer )
local x,y,z = getElementPosition (getLocalPlayer())
local height = math.floor((z*0))
if ( jet ) then
if isPedOnGround(localPlayer) then
z = 0
end
dxDrawText("Altitude: " .. (z).."", 17, 461, 110, 498, tocolor(254, 17, 17, 254), 0.50, "bankgothic", "left", "top", false)
end
end
addEventHandler ( "onClientRender", getRootElement(), height ) 

 

Now it works
But why do the other numbers come out? example 13.9585 I want him to come out only on the 13th 

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