# SCRIPT::BG_GET_SCRIPT_ID_FROM_NAME_HASH

- **Hash:** `0x829CD22E043A2577`
- **Namespace:** SCRIPT
- **Runtime name (Lua/JS):** `BgGetScriptIdFromNameHash`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **Note:** not used by the game's own scripts
- **URL:** https://natives.borderlinerp.com/natives/SCRIPT/BG_GET_SCRIPT_ID_FROM_NAME_HASH

## Signature

```c
int BG_GET_SCRIPT_ID_FROM_NAME_HASH(Hash p0);
```

## Parameters

- `p0` (`Hash`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = BgGetScriptIdFromNameHash(p0)

-- always available, by hash
local retval = Citizen.InvokeNative(0x829CD22E043A2577, p0, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = BgGetScriptIdFromNameHash(p0);

// by hash
const retval = Citizen.invokeNative('0x829CD22E043A2577', p0, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0x829CD22E043A2577, p0);
```

- Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat("name")` or a backtick literal like `` `name` ``.

*Sources: alloc8or RDR3 NativeDB.*
