# MISC::GET_RANDOM_INT_IN_RANGE

- **Hash:** `0xD53343AA4FB7DD28`
- **Namespace:** MISC
- **Runtime name (Lua/JS):** `GetRandomIntInRange`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/MISC/GET_RANDOM_INT_IN_RANGE

## Signature

```c
int GET_RANDOM_INT_IN_RANGE(int startRange, int endRange);
```

## Parameters

- `startRange` (`int`)
- `endRange` (`int`)

## Returns

`int`

## Usage

### Lua

```lua
local retval = GetRandomIntInRange(startRange, endRange)

-- always available, by hash
local retval = Citizen.InvokeNative(0xD53343AA4FB7DD28, startRange, endRange, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetRandomIntInRange(startRange, endRange);

// by hash
const retval = Citizen.invokeNative('0xD53343AA4FB7DD28', startRange, endRange, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xD53343AA4FB7DD28, startRange, endRange);
```

*Sources: alloc8or RDR3 NativeDB.*
