{"hash":"0x57EC5FA4D4D6AFCA","ns":"SCRIPT","name":"GET_EVENT_DATA","slug":"GET_EVENT_DATA","official":true,"named":true,"luaName":"GetEventData","game":"rdr3","apiset":"client","returnType":"BOOL","params":[{"name":"eventGroup","type":"int"},{"name":"eventIndex","type":"int"},{"name":"eventData","type":"Any*"},{"name":"eventDataSize","type":"int"}],"summary":"","descriptions":[{"source":"alloc8or","format":"text","body":"eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork), 2 = unk, 3 = unk, 4 = SCRIPT_EVENT_QUEUE_SCRIPT_ERRORS (CEventGroupScriptErrors)\n\nNote: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!).\n\nhttps://github.com/femga/rdr3_discoveries/tree/master/AI/EVENTS"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","gtaHash":"0x2902843FCD2B2D79","gtaJhash":"0x4280F92F","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/SCRIPT/GET_EVENT_DATA","markdownUrl":"https://natives.borderlinerp.com/natives/SCRIPT/GET_EVENT_DATA.md","snippets":{"lua":"local retval, eventData = GetEventData(eventGroup, eventIndex, eventDataSize)","luaInvoke":"local retval, eventData = Citizen.InvokeNative(0x57EC5FA4D4D6AFCA, eventGroup, eventIndex, Citizen.PointerValueInt(), eventDataSize, Citizen.ReturnResultAnyway())","js":"const [retval, eventData] = GetEventData(eventGroup, eventIndex, eventDataSize);","jsInvoke":"const [retval, eventData] = Citizen.invokeNative('0x57EC5FA4D4D6AFCA', eventGroup, eventIndex, Citizen.pointerValueInt(), eventDataSize, Citizen.returnResultAnyway());","csharp":"var eventData = new OutputArgument();\nbool retval = Function.Call<bool>((Hash)0x57EC5FA4D4D6AFCA, eventGroup, eventIndex, eventData, eventDataSize);\n// eventData.GetResult<int>()","notes":["Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.","`Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below."]}}