SetAircraftMaxHeight: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 5: Line 5:
   bgcolorhex = FF7777 |
   bgcolorhex = FF7777 |
   image = File:Emblem-important.png |
   image = File:Emblem-important.png |
   message = This function has a known bug since it was introduced where any high values could break falling off a bike so use care and turn it back to default when not required. |  
   message = This function has a known bug since it was introduced where any high values could break falling off a bike so use care and turn it back to default when not required. *FIXED IN r3635* |  
}}
}}
This function changes the maximum flying height of aircraft.
This function changes the maximum flying height of aircraft.

Revision as of 04:53, 2 January 2012

Emblem-important.png This function has a known bug since it was introduced where any high values could break falling off a bike so use care and turn it back to default when not required. *FIXED IN r3635*

This function changes the maximum flying height of aircraft.

Syntax

bool setAircraftMaxHeight ( float Height )

Required Arguments

  • Height The height you want aircraft to be able to go.

Returns

Returns true if successful, false otherwise.

Example

Click to collapse [-]
Client

This example shows you a command to set your maximum aircraft height.

function setAircraftHeight ( command, ve1 )
	local height = tonumber ( ve1 )
	if height then
		if height > 0 then
			local wert = setAircraftMaxHeight ( height )
			if wert == true then
				outputChatBox ( "Aircraft height set!", 0, 200, 0 )
			else
				outputChatBox ( "Error to set Aircraft height!", 255, 0, 0 )
			end
		else
			outputChatBox ( "Value must be above 0", 255, 0, 0 )
		end
	else
		outputChatBox ( "Error to set Aircraft height!", 255, 0, 0 )
	end
end
addCommandHandler ( "aircraft", setAircraftHeight )

See Also