AttachEntityToEntity

From GT-MP
Jump to: navigation, search
AttachEntityToEntity
Shared Function
Utilities-terminal.png Server-Side System-users.png Client-Side
Csharp.png C# Javascript.png JavaScript

Attaches an entity to another one. Can later be detached using detachEntity.

Syntax

In C#
Server-Side Function

API.attachEntityToEntity(NetHandle entity, NetHandle entityTarget, String bone, Vector3 positionOffset, Vector3 rotationOffset);
  • entity: parameter input should be in NetHandle type.
  • entityTarget: parameter input should be in NetHandle type.
  • bone: parameter input should be in String type.
  • positionOffset: parameter input should be in Vector3 type.
  • rotationOffset: parameter input should be in Vector3 type.

In Javascript
Client-Side Function

Dialog-warning.png Note: This feature is currently not in the API, or is currently not accurate on the wiki due to upcoming API changes. New API functions and changes will be released with the next update.
API.attachEntityToEntity(LocalHandle entity, LocalHandle entityTarget, String bone, Vector3 positionOffset, Vector3 rotationOffset);
  • entity: parameter input should be in LocalHandle type.
  • entityTarget: parameter input should be in LocalHandle type.
  • bone: parameter input should be in String type.
  • positionOffset: parameter input should be in Vector3 type.
  • rotationOffset: parameter input should be in Vector3 type.

Special note: To attach an Entity to an Object, use "0" as the bone value.

Usage example(s)