RedM Index logoRedM Index
NativesHashesClothesBlipsPropsItem Tool
Sign inGet started

Reference

  • Natives
  • Hashes
  • Clothes
  • Blips
  • Props

Namespace

  1. Reference
  2. Natives
  3. SET_ENTITY_ROTATION

SET_ENTITY_ROTATION

Sets the rotation of a specified entity in the game world. ``` NativeDB Introduced: v323 ``` **This is the server-side RPC native equivalent of the client native [SET_ENTITY_ROTATION](?\_0x8524A8B0171D5E07).**

CFX

Signature

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

Parameters

NameTypeDescription
EntityThe entity to rotate.
floatThe pitch (X-axis) rotation in degrees.
floatThe roll (Y-axis) rotation in degrees.
floatThe yaw (Z-axis) rotation in degrees.
intSpecifies the order in which yaw, pitch, and roll are applied, see [`GET_ENTITY_ROTATION`](#\_0xAFBD61CC738D9EB9) for the available rotation orders.
BOOLUsually set to `true`. Determines whether to check if the entity is dead before applying the rotation.

Usage

lua
SetEntityRotation(entity, 0.0, 0.0, 0.0, 0, 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