COPY_SCRIPT_STRUCT
Old name: _COPY_MEMORY
Hash
0xF7AC7DC0DEE7C9BERuntime name
CopyScriptStructNamespaceMISC
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x213AEB2B90CBA7ACSignature
void COPY_SCRIPT_STRUCT(Any* dst, Any* src, int size);Parameters
| Name | Type | Description |
|---|---|---|
dst | Any* | — |
src | Any* | — |
size | int | — |
Returns void
Description
Old name: _COPY_MEMORY
Usage
local dst, src = CopyScriptStruct(size)
-- always works, by hash
local dst, src = Citizen.InvokeNative(0xF7AC7DC0DEE7C9BE, Citizen.PointerValueInt(), Citizen.PointerValueInt(), size)JavaScript and C#
const [dst, src] = CopyScriptStruct(size);
// by hash
const [dst, src] = Citizen.invokeNative('0xF7AC7DC0DEE7C9BE', Citizen.pointerValueInt(), Citizen.pointerValueInt(), size);var dst = new OutputArgument();
var src = new OutputArgument();
Function.Call((Hash)0xF7AC7DC0DEE7C9BE, dst, src, size);
// dst.GetResult<int>()
// src.GetResult<int>()- 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.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.