# MISC::COPY_SCRIPT_STRUCT

- **Hash:** `0xF7AC7DC0DEE7C9BE`
- **Namespace:** MISC
- **Runtime name (Lua/JS):** `CopyScriptStruct`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/MISC/COPY_SCRIPT_STRUCT

## Signature

```c
void COPY_SCRIPT_STRUCT(Any* dst, Any* src, int size);
```

## Parameters

- `dst` (`Any*`)
- `src` (`Any*`)
- `size` (`int`)

## Returns

`void`

## Description

Old name: _COPY_MEMORY

## Usage

### Lua

```lua
local dst, src = CopyScriptStruct(size)

-- always available, by hash
local dst, src = Citizen.InvokeNative(0xF7AC7DC0DEE7C9BE, Citizen.PointerValueInt(), Citizen.PointerValueInt(), size)
```

### JavaScript

```js
const [dst, src] = CopyScriptStruct(size);

// by hash
const [dst, src] = Citizen.invokeNative('0xF7AC7DC0DEE7C9BE', Citizen.pointerValueInt(), Citizen.pointerValueInt(), size);
```

### C#

```csharp
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: alloc8or RDR3 NativeDB.*
