Entity::setCoords: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
Line 13: Line 13:
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
{{ClientsideCode|
// todo
<pre>
</syntaxhighlight>
//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);
</pre>
}}
==See also==
==See also==
{{Entity_function_c}}
{{Entity_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 14:13, 17 May 2020

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