EntityClientNot in this build

attachEntityToEntityPhysicallyOverrideInverseMass

ATTACH_ENTITY_TO_ENTITY_PHYSICALLY_OVERRIDE_INVERSE_MASS0x168A09D1B25B0BA4

The GTA V native ATTACH_ENTITY_TO_ENTITY_PHYSICALLY_OVERRIDE_INVERSE_MASS of the ENTITY namespace, as LS:MP client scripts call it: the global function attachEntityToEntityPhysicallyOverrideInverseMass, in JavaScript and in Lua.

SignatureJavaScript
attachEntityToEntityPhysicallyOverrideInverseMass(
  firstEntityIndex: Entity,
  secondEntityIndex: Entity,
  firstEntityBoneIndex: number,
  secondEntityBoneIndex: number,
  secondEntityOffsetX: number,
  secondEntityOffsetY: number,
  secondEntityOffsetZ: number,
  firstEntityOffsetX: number,
  firstEntityOffsetY: number,
  firstEntityOffsetZ: number,
  vecRotationX: number,
  vecRotationY: number,
  vecRotationZ: number,
  physicalStrength: number,
  constrainRotation: boolean,
  doInitialWarp: boolean,
  collideWithEntity: boolean,
  addInitialSeperation: boolean,
  rotOrder: number,
  invMassScaleA: number,
  invMassScaleB: number
): void
SignatureLua
attachEntityToEntityPhysicallyOverrideInverseMass(
  firstEntityIndex: Entity,
  secondEntityIndex: Entity,
  firstEntityBoneIndex: integer,
  secondEntityBoneIndex: integer,
  secondEntityOffsetX: number,
  secondEntityOffsetY: number,
  secondEntityOffsetZ: number,
  firstEntityOffsetX: number,
  firstEntityOffsetY: number,
  firstEntityOffsetZ: number,
  vecRotationX: number,
  vecRotationY: number,
  vecRotationZ: number,
  physicalStrength: number,
  constrainRotation: boolean,
  doInitialWarp: boolean,
  collideWithEntity: boolean,
  addInitialSeperation: boolean,
  rotOrder: integer,
  invMassScaleA: number,
  invMassScaleB: number
)
⚠
Not in this game build

The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.

Usage

JavaScript
attachEntityToEntityPhysicallyOverrideInverseMass(
  firstEntityIndex, secondEntityIndex, firstEntityBoneIndex, secondEntityBoneIndex,
  secondEntityOffsetX, secondEntityOffsetY, secondEntityOffsetZ, firstEntityOffsetX,
  firstEntityOffsetY, firstEntityOffsetZ, vecRotationX, vecRotationY, vecRotationZ,
  physicalStrength, constrainRotation, doInitialWarp, collideWithEntity, addInitialSeperation,
  rotOrder, invMassScaleA, invMassScaleB
);
Lua
attachEntityToEntityPhysicallyOverrideInverseMass(
    firstEntityIndex, secondEntityIndex, firstEntityBoneIndex, secondEntityBoneIndex,
    secondEntityOffsetX, secondEntityOffsetY, secondEntityOffsetZ, firstEntityOffsetX,
    firstEntityOffsetY, firstEntityOffsetZ, vecRotationX, vecRotationY, vecRotationZ,
    physicalStrength, constrainRotation, doInitialWarp, collideWithEntity, addInitialSeperation,
    rotOrder, invMassScaleA, invMassScaleB
)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
attachEntityToEntityPhysicallyOverrideInverseMass(
  firstEntityIndex, secondEntityIndex, firstEntityBoneIndex, secondEntityBoneIndex,
  secondEntityOffset, firstEntityOffset, vecRotation, physicalStrength, constrainRotation,
  doInitialWarp, collideWithEntity, addInitialSeperation, rotOrder, invMassScaleA, invMassScaleB
);
Lua · with vectors
attachEntityToEntityPhysicallyOverrideInverseMass(
    firstEntityIndex, secondEntityIndex, firstEntityBoneIndex, secondEntityBoneIndex,
    secondEntityOffset, firstEntityOffset, vecRotation, physicalStrength, constrainRotation,
    doInitialWarp, collideWithEntity, addInitialSeperation, rotOrder, invMassScaleA,
    invMassScaleB
)

Parameters

ParameterTypeJavaScriptLua
firstEntityIndexEntitynumberinteger
secondEntityIndexEntitynumberinteger
firstEntityBoneIndexintnumberinteger
secondEntityBoneIndexintnumberinteger
secondEntityOffsetXfloatnumbernumber
secondEntityOffsetYfloatnumbernumber
secondEntityOffsetZfloatnumbernumber
firstEntityOffsetXfloatnumbernumber
firstEntityOffsetYfloatnumbernumber
firstEntityOffsetZfloatnumbernumber
vecRotationXfloatnumbernumber
vecRotationYfloatnumbernumber
vecRotationZfloatnumbernumber
physicalStrengthfloatnumbernumber
constrainRotationBOOLbooleanboolean
doInitialWarpBOOLbooleanboolean
collideWithEntityBOOLbooleanboolean
addInitialSeperationBOOLbooleanboolean
rotOrderintnumberinteger
invMassScaleAfloatnumbernumber
invMassScaleBfloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Entity ENTITY
In the game
void ATTACH_ENTITY_TO_ENTITY_PHYSICALLY_OVERRIDE_INVERSE_MASS(Entity firstEntityIndex, Entity secondEntityIndex, int firstEntityBoneIndex, int secondEntityBoneIndex, float secondEntityOffsetX, float secondEntityOffsetY, float secondEntityOffsetZ, float firstEntityOffsetX, float firstEntityOffsetY, float firstEntityOffsetZ, float vecRotationX, float vecRotationY, float vecRotationZ, float physicalStrength, BOOL constrainRotation, BOOL doInitialWarp, BOOL collideWithEntity, BOOL addInitialSeperation, int rotOrder, float invMassScaleA, float invMassScaleB)
Hash
0x168A09D1B25B0BA4
Introduced
Game build 2944 legacy numbering

Open in the interactive natives reference