spawnVehicleFlyingComponent | Multi Theft Auto: Wiki Skip to content

spawnVehicleFlyingComponent

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function creates a dynamic (motion-dependent) falling vehicle component.

Note

The maximum number of components that can be created simultaneously is 150. Beyond this limit, no new components will be created until an existing component is removed and the count drops below 150.

OOP Syntax Help! I don't understand this!

  • Method:element:spawnFlyingComponent(...)

Syntax

bool spawnVehicleFlyingComponent ( vehicle theVehicle, number nodeIndex, number collisionType, number removalTime )
Required Arguments
  • theVehicle: The vehicle whose component is to be created.
  • nodeIndex: Specifies the component to be created (ranging from 1 to 24 ). Depending on the vehicle, these can be different components such as wheels, fenders, bicycle handlebars, helicopter propellers, train carriages, and many more. Check Nodes list .
  • collisionType: Specifies the type of collision for the component, by default it is selected based on the nodeIndex. 0: COL_BUMPER 1: COL_WHEEL 2: COL_DOOR 3: COL_BONNET 4: COL_BOOT 5: COL_PANEL
  • removalTime: The time in milliseconds after which the created component will be removed (it must be removed as it is a temporary object). If not specified, the default time depends on the number of created components.

Returns

  • bool: value

Returns true if the component was created, false otherwise.

Code Examples

Script Example Missing

Function spawnVehicleFlyingComponent needs a script example. Help out by writing one.

Contribution guidelines

See Also

Vehicle Functions