RedM Index logoRedM Index
NativesHashesClothesBlipsPropsItem Tool
Sign inGet started

Reference

  • Natives
  • Hashes
  • Clothes
  • Blips
  • Props

Namespace

  1. Reference
  2. Natives
  3. APPLY_FORCE_TO_ENTITY

APPLY_FORCE_TO_ENTITY

```cpp enum eApplyForceTypes { APPLY_TYPE_FORCE = 0, APPLY_TYPE_IMPULSE = 1, APPLY_TYPE_EXTERNAL_FORCE = 2, APPLY_TYPE_EXTERNAL_IMPULSE = 3, APPLY_TYPE_TORQUE = 4, APPLY_TYPE_ANGULAR_IMPULSE = 5 } ``` **This is the server-side RPC native equivalent of the client native [APPLY_FORCE_TO_ENTITY](?\_0xC5F68BE9613E2D18).**

CFX

Signature

lua
ApplyForceToEntity(entity, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, true, true, true, true, true)
-- returns void

Parameters

NameTypeDescription
EntityThe entity handle
intThe force type
floatThe x component of the force to apply
floatThe y component of the force to apply
floatThe z component of the force to apply
floatOffset from center of entity (X)
floatOffset from center of entity (Y)
floatOffset from center of entity (Z)
intComponent of the entity to apply the force too. Only matters for breakable or articulated (ragdoll) physics. 0 means the root or parent component
BOOLSpecifies whether the force vector passed in is in local or world coordinates. `true` means the force will get automatically transformed into world space before being applied
BOOLSpecifies whether the offset passed in is in local or world coordinates
BOOLSpecifies whether to scale the force by mass
BOOLSpecifies whether to play audio events related to the force being applied. The audio will depend on the entity type. Currently vehicles are the only entity types supported, and will play a suspension squeal depending on the magnitude of the force
BOOLSpecifies whether to scale the force by time warp. Default is `true`

Usage

lua
ApplyForceToEntity(entity, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, true, true, true, true, true)

Generated from the native name, hash, and parameter list. Add a real example.

Details

Hash
API set
Source
cfx

Source: cfx

On this page

  • Signature
  • Parameters
  • Usage
  • Details