Entity::setCoords

From RAGE Multiplayer Wiki
Revision as of 17:52, 1 May 2024 by Shr0x (talk | contribs) (→‎See also)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

p7 is always 1 in the scripts. Set to 1, an area around the destination coords for the moved entity is cleared from other entities.

Often ends with 1, 0, 0, 1); in the scripts. It works.

Axis - Invert Axis Flags

Syntax

entity.setCoords(xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea);

Required Arguments

  • xPos: float
  • yPos: float
  • zPos: float
  • xAxis: Boolean
  • yAxis: Boolean
  • zAxis: Boolean
  • clearArea: Boolean

Return value

  • Undefined

Example

Client-Side
//Set your ped off in to the sky
mp.players.local.setCoords(mp.players.local.getCoords(true).x, mp.players.local.getCoords(true).y, mp.players.local.getCoords(true).z + 500.0, true, false, false, false);

See also