{"hash":"0x4F5EBE70081E5A20","ns":"PED","name":"_CREATE_GRAVITY_WELL","slug":"_CREATE_GRAVITY_WELL","official":false,"named":true,"luaName":"CreateGravityWell","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"xPos","type":"float"},{"name":"yPos","type":"float"},{"name":"zPos","type":"float"},{"name":"heading","type":"float"},{"name":"radius","type":"float"},{"name":"p5","type":"float"},{"name":"p6","type":"float"},{"name":"p7","type":"float"},{"name":"stopAtDestination","type":"BOOL"}],"summary":"Creates a handle to an instance of \"CScriptResource_GravityWell\", this system forces local ped to target specified position when moving, however player still can interrupt this.","descriptions":[{"source":"alloc8or","format":"text","body":"Creates a handle to an instance of \"CScriptResource_GravityWell\", this system forces local ped to target specified position when moving, however player still can interrupt this.\nCan be useful to \"point\" player at some specific position.\nOnly works while on-foot.\n\n_CREATE_[P-Z]"}],"examples":[],"aliases":[],"enums":[],"related":["0x87247BC60B60BED8"],"build":"1207","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/PED/_CREATE_GRAVITY_WELL","markdownUrl":"https://natives.borderlinerp.com/natives/PED/_CREATE_GRAVITY_WELL.md","snippets":{"lua":"local retval = CreateGravityWell(xPos, yPos, zPos, heading, radius, p5, p6, p7, stopAtDestination)","luaInvoke":"local retval = Citizen.InvokeNative(0x4F5EBE70081E5A20, xPos, yPos, zPos, heading, radius, p5, p6, p7, stopAtDestination, Citizen.ResultAsInteger())","js":"const retval = CreateGravityWell(xPos, yPos, zPos, heading, radius, p5, p6, p7, stopAtDestination);","jsInvoke":"const retval = Citizen.invokeNative('0x4F5EBE70081E5A20', xPos + 0.0000001, yPos + 0.0000001, zPos + 0.0000001, heading + 0.0000001, radius + 0.0000001, p5 + 0.0000001, p6 + 0.0000001, p7 + 0.0000001, stopAtDestination, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"int retval = Function.Call<int>((Hash)0x4F5EBE70081E5A20, xPos, yPos, zPos, heading, radius, p5, p6, p7, stopAtDestination);","notes":["Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.","The name is a community guess and may change. If the named call is missing in your client build, use `InvokeNative` with the hash — it always works."]}}