The Lab
PED native

_CREATE_GRAVITY_WELL

returns int9 paramsbuild 1207

Based on its name and signature, here is our best reading:

Appears to create a gravity well at the given position that pulls peds towards it within radius, returning its handle.

Signature

C
int _CREATE_GRAVITY_WELL(float xPos, float yPos, float zPos, float heading, float radius, float p5, float p6, float p7, BOOL stopAtDestination); // 0x4F5EBE70081E5A20 b1207

Parameters

#NameType
1xPosfloat
2yPosfloat
3zPosfloat
4headingfloat
5radiusfloat
6p5float
7p6float
8p7float
9stopAtDestinationBOOL

Facts

Facts about _CREATE_GRAVITY_WELL
Name
_CREATE_GRAVITY_WELL
Hash
0x4F5EBE70081E5A20
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result = Citizen.InvokeNative(0x4F5EBE70081E5A20, -- _CREATE_GRAVITY_WELL
  0.0, -- float xPos
  0.0, -- float yPos
  0.0, -- float zPos
  0.0, -- float heading
  0.0, -- float radius
  0.0, -- float p5
  0.0, -- float p6
  0.0, -- float p7
  false, -- BOOL stopAtDestination
  Citizen.ResultAsInteger()
)
print(result)
JavaScript
// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x4F5EBE70081E5A20", // _CREATE_GRAVITY_WELL
  0.0, // float xPos
  0.0, // float yPos
  0.0, // float zPos
  0.0, // float heading
  0.0, // float radius
  0.0, // float p5
  0.0, // float p6
  0.0, // float p7
  false, // BOOL stopAtDestination
  Citizen.resultAsInteger()
);
console.log(result)
C#
int result = Function.Call<int>((Hash)0x4F5EBE70081E5A20, // _CREATE_GRAVITY_WELL
  0.0f, // float xPos
  0.0f, // float yPos
  0.0f, // float zPos
  0.0f, // float heading
  0.0f, // float radius
  0.0f, // float p5
  0.0f, // float p6
  0.0f, // float p7
  false // BOOL stopAtDestination
);
All PED natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.