Hello friends, I need a little help
How can I make this height meter appear only for the jetpack ?
Sorry for my bad English
function height()
local Vehicle = getPedOccupiedVehicle(getLocalPlayer())
if Vehicle then
local Type = getVehicleType(Vehicle)
if Type == "Plane" then
dxDrawRectangle(40, 498, 20, 163, tocolor(0 , 0 , 0 , 100), false)
local x,y,z = getElementPosition (getLocalPlayer())
local height = math.floor((z*001))
if height < 161 then
dxDrawRectangle(30, 659-height, 45, 2, tocolor(255 , 255 , 255 , 115), false)
elseif height < 322 then
dxDrawRectangle(30, 820-height, 45, 2, tocolor(255 , 255 , 255 , 115), false)
elseif height < 483 then
dxDrawRectangle(30, 981-height, 45, 2, tocolor(255 , 255 , 255 , 115), false)
elseif height < 644 then
dxDrawRectangle(30, 1142-height, 45, 2, tocolor(255 , 255 , 255 , 115), false)
elseif height < 803 then
dxDrawRectangle(30, 1303-height, 45, 2, tocolor(255 , 255 , 255 , 115), false)
elseif height < 962 then
dxDrawRectangle(30, 1464-height, 45, 2, tocolor(255 , 255 , 255 , 115), false)
end
end
end
end
addEventHandler ( "onClientRender", getRootElement(), height )
--doesPedHaveJetPack