GetHeliBladeCollisionsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool getHeliBladeCollisionsEnabled ( vehicle theVehicle )
bool getHeliBladeCollisionsEnabled ( vehicle theVehicle )
</syntaxhighlight>  
</syntaxhighlight>
{{New feature/item|3.0141|1.4.0|6987|{{OOP||[[vehicle]]:areHeliBladeCollisionsEnabled|heliBladeCollisionsEnabled|setHeliBladeCollisionsEnabled}}}}


===Required Arguments===  
===Required Arguments===  
Line 30: Line 31:


==See Also==
==See Also==
{{Vehicle functions}}
{{Client vehicle functions}}

Latest revision as of 14:06, 31 December 2014

This function gets the state of the helicopter blades collisions on the specified vehicle.

Syntax

bool getHeliBladeCollisionsEnabled ( vehicle theVehicle )

OOP Syntax Help! I don't understand this!

Method: vehicle:areHeliBladeCollisionsEnabled(...)
Variable: .heliBladeCollisionsEnabled
Counterpart: setHeliBladeCollisionsEnabled

Required Arguments

  • theVehicle: The vehicle that will be checked.

Returns

Returns true if the collisions are enabled for specified vehicle, false if the collisions aren't enabled for the specified vehicle, if the vehicle is not a helicopter or if invalid arguments are specified.

Example

Click to collapse [-]
Client

This example shows the blade collisions state

function onVehicleEnter ( seat, jacked )
	--If the player entered a helicopter
	if ( getVehicleType ( source ) == "Helicopter" ) then
		local state = getHeliBladeCollisionsEnabled‎(source )
		outputChatBox("Helicopter blades collisions are turned ".. (state and "on" or "off") )
	end
end
addEventHandler ( "onClientVehicleEnter", localPlayer, onVehicleEnter )

See Also