Jump to content

Hi friends ,help


xRGamingx

Recommended Posts

Hello friends, I need a little help

How can I make this height meter appear only for the jetpack ?

Sorry for my bad English
 

17707.png

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

 

Link to comment
44 minutes ago, xRGamingx said:

Hello friends, I need a little help

How can I make this height meter appear only for the jetpack ?

Sorry for my bad English
 

17707.png


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

 

function height()

		local jet = doesPedHaveJetPack ( localPlayer )
		if ( jet ) 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
addEventHandler ( "onClientRender", getRootElement(), height ) 

PD : ¿ do you speak spanish ?

  • Thanks 1
Link to comment
22 minutes ago, <~KaMiKaZe~> said:

function height()

		local jet = doesPedHaveJetPack ( localPlayer )
		if ( jet ) 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
addEventHandler ( "onClientRender", getRootElement(), height ) 

PD : ¿ do you speak spanish ?

Yes i speak spanish

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