_CREATE_GRAVITY_WELL
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
int _CREATE_GRAVITY_WELL(float xPos, float yPos, float zPos, float heading, float radius, float p5, float p6, float p7, BOOL stopAtDestination); // 0x4F5EBE70081E5A20 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | xPos | float |
| 2 | yPos | float |
| 3 | zPos | float |
| 4 | heading | float |
| 5 | radius | float |
| 6 | p5 | float |
| 7 | p6 | float |
| 8 | p7 | float |
| 9 | stopAtDestination | BOOL |
Facts
| 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.
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)// 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)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
);Related PED natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.